From d668eac4a63a9aa98c3efff395faa23cfcea1c1b Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Thu, 21 Mar 2024 17:08:37 +0100 Subject: [node] begin the great typescript rewrite --- nodejs/model/contract.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 nodejs/model/contract.ts (limited to 'nodejs/model/contract.ts') diff --git a/nodejs/model/contract.ts b/nodejs/model/contract.ts new file mode 100644 index 0000000..eb7add4 --- /dev/null +++ b/nodejs/model/contract.ts @@ -0,0 +1,22 @@ +export type Contract = { + id: string; + factionSymbol: string; + type: string; + terms: { + deadline: Date; + payment: { + onAccepted: number; + onFulfilled: number; + }, + deliver: Array<{ + tradeSymbol: string; + destinationSymbol: string; + unitsRequired: number; + unitsFulfilled: number; + }>; + }; + accepted: boolean; + fulfilled: boolean; + expiration: Date; + deadlineToAccept: Date; +}; -- cgit v1.2.3