diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-05-08 04:53:26 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-05-08 04:53:26 +0200 |
commit | 6904c2759ec75ab9c3a5ace358a20c582dfa1a1b (patch) | |
tree | ee9f6790f390c44219f5d0fd775199e58c78772d /src/talerTypes.ts | |
parent | 3db38fbd0b84d066d64f9b637f1efcc35ebf8ce3 (diff) | |
download | wallet-core-6904c2759ec75ab9c3a5ace358a20c582dfa1a1b.tar.xz |
implement payto URIs
Diffstat (limited to 'src/talerTypes.ts')
-rw-r--r-- | src/talerTypes.ts | 42 |
1 files changed, 16 insertions, 26 deletions
diff --git a/src/talerTypes.ts b/src/talerTypes.ts index f8fb72b93..db49b0747 100644 --- a/src/talerTypes.ts +++ b/src/talerTypes.ts @@ -852,29 +852,25 @@ export class WireFeesJson { } -/** - * Information about wire transfer methods supported - * by the exchange. - */ -@Checkable.Class({extra: true}) -export class WireDetailJson { - /** - * Name of the wire transfer method. - */ +@Checkable.Class() +export class AccountInfo { @Checkable.String() - type: string; + url: string; - /** - * Fees associated with the wire transfer method. - */ - @Checkable.List(Checkable.Value(() => WireFeesJson)) - fees: WireFeesJson[]; + @Checkable.String() + master_sig: string; +} - /** - * Verify that a value matches the schema of this class and convert it into a - * member. - */ - static checked: (obj: any) => WireDetailJson; + +@Checkable.Class({extra: true}) +export class ExchangeWireJson { + @Checkable.Map(Checkable.String(), Checkable.List(Checkable.Value(() => WireFeesJson))) + fees: { [methodName: string]: WireFeesJson[] }; + + @Checkable.List(Checkable.Value(() => AccountInfo)) + accounts: AccountInfo[]; + + static checked: (obj: any) => ExchangeWireJson; } @@ -884,12 +880,6 @@ export class WireDetailJson { */ export type WireDetail = object & { type: string }; -/** - * Type guard for wire details. - */ -export function isWireDetail(x: any): x is WireDetail { - return x && typeof x === "object" && typeof x.type === "string"; -} /** * Proposal returned from the contract URL. |