diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-05-24 17:30:27 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-05-24 17:30:27 +0200 |
commit | 27a42f92572abfdb2e60f3f212e4f0fcc71a6961 (patch) | |
tree | cb07ba11b01b05baccbbec0d58b231d1d8c237f7 /lib/wallet/types.ts | |
parent | ce7f7b8321c89f9bdd62e9b148181865f8834871 (diff) | |
download | wallet-core-27a42f92572abfdb2e60f3f212e4f0fcc71a6961.tar.xz |
respond to failed payments
Diffstat (limited to 'lib/wallet/types.ts')
-rw-r--r-- | lib/wallet/types.ts | 56 |
1 files changed, 52 insertions, 4 deletions
diff --git a/lib/wallet/types.ts b/lib/wallet/types.ts index d3c1c781a..8cecc1e8e 100644 --- a/lib/wallet/types.ts +++ b/lib/wallet/types.ts @@ -93,9 +93,6 @@ export class Denomination { @Checkable.String master_sig: string; - @Checkable.Optional(Checkable.String) - pub_hash: string; - static checked: (obj: any) => Denomination; } @@ -103,7 +100,23 @@ export class Denomination { export interface IExchangeInfo { baseUrl: string; masterPublicKey: string; - denoms: Denomination[]; + + /** + * All denominations we ever received from the exchange. + * Expired denominations may be garbage collected. + */ + all_denoms: Denomination[]; + + /** + * Denominations we received with the last update. + * Subset of "denoms". + */ + active_denoms: Denomination[]; + + /** + * Timestamp for last update. + */ + last_update_time: number; } export interface WireInfo { @@ -151,13 +164,48 @@ export interface CoinPaySig { } +/** + * Coin as stored in the "coins" data store + * of the wallet database. + */ export interface Coin { + /** + * Public key of the coin. + */ coinPub: string; + + /** + * Private key to authorize operations on the coin. + */ coinPriv: string; + + /** + * Key used by the exchange used to sign the coin. + */ denomPub: string; + + /** + * Unblinded signature by the exchange. + */ denomSig: string; + + /** + * Amount that's left on the coin. + */ currentAmount: AmountJson; + + /** + * Base URL that identifies the exchange from which we got the + * coin. + */ exchangeBaseUrl: string; + + /** + * We have withdrawn the coin, but it's not accepted by the exchange anymore. + * We have to tell an auditor and wait for compensation or for the exchange + * to fix it. + */ + suspended?: boolean; } |