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/cryptoApi.ts | |
parent | 122e069d914622343fa1a21c3990a2f416ea9dfe (diff) |
refactoring / refresh WIP
Diffstat (limited to 'lib/wallet/cryptoApi.ts')
-rw-r--r-- | lib/wallet/cryptoApi.ts | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/lib/wallet/cryptoApi.ts b/lib/wallet/cryptoApi.ts index 855afbb4e..ec20dd964 100644 --- a/lib/wallet/cryptoApi.ts +++ b/lib/wallet/cryptoApi.ts @@ -21,12 +21,12 @@ */ -import {PreCoin} from "./types"; -import {Reserve} from "./types"; +import {PreCoin, Coin, ReserveRecord, AmountJson} from "./types"; import {Denomination} from "./types"; import {Offer} from "./wallet"; import {CoinWithDenom} from "./wallet"; import {PayCoinInfo} from "./types"; +import {RefreshSession} from "./types"; interface RegistryEntry { resolve: any; @@ -228,7 +228,7 @@ export class CryptoApi { } - createPreCoin(denom: Denomination, reserve: Reserve): Promise<PreCoin> { + createPreCoin(denom: Denomination, reserve: ReserveRecord): Promise<PreCoin> { return this.doRpc("createPreCoin", 1, denom, reserve); } @@ -257,4 +257,17 @@ export class CryptoApi { rsaUnblind(sig: string, bk: string, pk: string): Promise<string> { return this.doRpc("rsaUnblind", 4, sig, bk, pk); } + + createWithdrawSession(kappa: number, meltCoin: Coin, + newCoinDenoms: Denomination[], + meltAmount: AmountJson, + meltFee: AmountJson): Promise<RefreshSession> { + return this.doRpc("createWithdrawSession", + 4, + kappa, + meltCoin, + newCoinDenoms, + meltAmount, + meltFee); + } } |