diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-10-13 02:23:24 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-10-13 02:23:24 +0200 |
commit | 250069d86097a966366d21e447f6c3fcc70659bd (patch) | |
tree | 0710d7957ece0997e217206622854bf112d8e9b6 /lib/wallet/types.ts | |
parent | 122e069d914622343fa1a21c3990a2f416ea9dfe (diff) | |
download | wallet-core-250069d86097a966366d21e447f6c3fcc70659bd.tar.xz |
refactoring / refresh WIP
Diffstat (limited to 'lib/wallet/types.ts')
-rw-r--r-- | lib/wallet/types.ts | 53 |
1 files changed, 32 insertions, 21 deletions
diff --git a/lib/wallet/types.ts b/lib/wallet/types.ts index 91b329842..9ff8680ca 100644 --- a/lib/wallet/types.ts +++ b/lib/wallet/types.ts @@ -42,6 +42,30 @@ export class AmountJson { } +export interface ReserveRecord { + reserve_pub: string; + reserve_priv: string, + exchange_base_url: string, + created: number, + last_query: number | null, + /** + * Current amount left in the reserve + */ + current_amount: AmountJson | null, + /** + * Amount requested when the reserve was created. + * When a reserve is re-used (rare!) the current_amount can + * be higher than the requested_amount + */ + requested_amount: AmountJson, + /** + * Amount we've already withdrawn from the reserve. + */ + withdrawn_amount: AmountJson; + confirmed: boolean, +} + + @Checkable.Class export class CreateReserveResponse { /** @@ -147,6 +171,13 @@ export interface PreCoin { coinValue: AmountJson; } +export interface RefreshPreCoin { + publicKey: string; + privateKey: string; + coinEv: string; + blindingKey: string +} + /** * Ongoing refresh @@ -173,20 +204,9 @@ export interface RefreshSession { */ newDenoms: string[]; - /** - * Blinded public keys for the requested coins. - */ - newCoinBlanks: string[][]; - /** - * Blinding factors for the new coins. - */ - newCoinBlindingFactors: string[][]; + preCoinsForGammas: RefreshPreCoin[][]; - /** - * Private keys for the requested coins. - */ - newCoinPrivs: string[][]; /** * The transfer keys, kappa of them. @@ -195,15 +215,6 @@ export interface RefreshSession { } -export interface Reserve { - exchange_base_url: string - reserve_priv: string; - reserve_pub: string; - created: number; - current_amount: AmountJson; -} - - export interface CoinPaySig { coin_sig: string; coin_pub: string; |