aboutsummaryrefslogtreecommitdiff
path: root/lib/wallet/types.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/wallet/types.ts')
-rw-r--r--lib/wallet/types.ts63
1 files changed, 63 insertions, 0 deletions
diff --git a/lib/wallet/types.ts b/lib/wallet/types.ts
index 748df6f4c..feab1bcb1 100644
--- a/lib/wallet/types.ts
+++ b/lib/wallet/types.ts
@@ -150,6 +150,69 @@ export interface Coin {
}
+@Checkable.Class
+export class ExchangeHandle {
+ @Checkable.String
+ master_pub: string;
+
+ @Checkable.String
+ url: string;
+
+ static checked: (obj: any) => ExchangeHandle;
+}
+
+
+@Checkable.Class
+export class Contract {
+ @Checkable.String
+ H_wire: string;
+
+ @Checkable.Value(AmountJson)
+ amount: AmountJson;
+
+ @Checkable.List(Checkable.AnyObject)
+ auditors: any[];
+
+ @Checkable.String
+ expiry: string;
+
+ @Checkable.Any
+ locations: any;
+
+ @Checkable.Value(AmountJson)
+ max_fee: AmountJson;
+
+ @Checkable.Any
+ merchant: any;
+
+ @Checkable.String
+ merchant_pub: string;
+
+ @Checkable.List(Checkable.Value(ExchangeHandle))
+ exchanges: ExchangeHandle[];
+
+ @Checkable.List(Checkable.AnyObject)
+ products: any[];
+
+ @Checkable.String
+ refund_deadline: string;
+
+ @Checkable.String
+ timestamp: string;
+
+ @Checkable.Number
+ transaction_id: number;
+
+ @Checkable.String
+ fulfillment_url: string;
+
+ @Checkable.Optional(Checkable.String)
+ repurchase_correlation_id: string;
+
+ static checked: (obj: any) => Contract;
+}
+
+
export type PayCoinInfo = Array<{ updatedCoin: Coin, sig: CoinPaySig }>;