diff options
author | Florian Dold <florian@dold.me> | 2022-03-24 01:59:08 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-03-24 01:59:08 +0100 |
commit | 303c6e99b34ed4e8b0272fe89f300b0838bbe5e4 (patch) | |
tree | 35f1260ea714eb4a6ac0cc7b9c7b19bf824d4fda /packages/taler-wallet-cli/src | |
parent | 454b55aa56034f0599f88e92e0475f5928486ce7 (diff) |
wallet: allow using RPC crypto in more places
Diffstat (limited to 'packages/taler-wallet-cli/src')
-rw-r--r-- | packages/taler-wallet-cli/src/bench2.ts | 12 | ||||
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/test-wallet-dbless.ts | 12 |
2 files changed, 14 insertions, 10 deletions
diff --git a/packages/taler-wallet-cli/src/bench2.ts b/packages/taler-wallet-cli/src/bench2.ts index c1fa674c4..2ee53329a 100644 --- a/packages/taler-wallet-cli/src/bench2.ts +++ b/packages/taler-wallet-cli/src/bench2.ts @@ -31,7 +31,6 @@ import { depositCoin, downloadExchangeInfo, findDenomOrThrow, - generateReserveKeypair, NodeHttpLib, refreshCoin, SynchronousCryptoWorkerFactory, @@ -64,7 +63,7 @@ export async function runBench2(configJson: any): Promise<void> { for (let i = 0; i < numIter; i++) { const exchangeInfo = await downloadExchangeInfo(benchConf.exchange, http); - const reserveKeyPair = generateReserveKeypair(); + const reserveKeyPair = await cryptoApi.createEddsaKeypair({}); console.log("creating fakebank reserve"); @@ -73,12 +72,12 @@ export async function runBench2(configJson: any): Promise<void> { exchangeInfo, fakebankBaseUrl: benchConf.bank, http, - reservePub: reserveKeyPair.reservePub, + reservePub: reserveKeyPair.pub, }); console.log("waiting for reserve"); - await checkReserve(http, benchConf.exchange, reserveKeyPair.reservePub); + await checkReserve(http, benchConf.exchange, reserveKeyPair.pub); console.log("reserve found"); @@ -89,7 +88,10 @@ export async function runBench2(configJson: any): Promise<void> { const coin = await withdrawCoin({ http, cryptoApi, - reserveKeyPair, + reserveKeyPair: { + reservePriv: reserveKeyPair.priv, + reservePub: reserveKeyPair.pub, + }, denom: d1, exchangeBaseUrl: benchConf.exchange, }); diff --git a/packages/taler-wallet-cli/src/integrationtests/test-wallet-dbless.ts b/packages/taler-wallet-cli/src/integrationtests/test-wallet-dbless.ts index d8abae136..3837e567a 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-wallet-dbless.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-wallet-dbless.ts @@ -24,7 +24,6 @@ import { depositCoin, downloadExchangeInfo, findDenomOrThrow, - generateReserveKeypair, NodeHttpLib, refreshCoin, SynchronousCryptoWorkerFactory, @@ -52,11 +51,11 @@ export async function runWalletDblessTest(t: GlobalTestState) { const exchangeInfo = await downloadExchangeInfo(exchange.baseUrl, http); - const reserveKeyPair = generateReserveKeypair(); + const reserveKeyPair = await cryptoApi.createEddsaKeypair({}); await topupReserveWithDemobank( http, - reserveKeyPair.reservePub, + reserveKeyPair.pub, bank.baseUrl, exchangeInfo, "TESTKUDOS:10", @@ -64,14 +63,17 @@ export async function runWalletDblessTest(t: GlobalTestState) { await exchange.runWirewatchOnce(); - await checkReserve(http, exchange.baseUrl, reserveKeyPair.reservePub); + await checkReserve(http, exchange.baseUrl, reserveKeyPair.pub); const d1 = findDenomOrThrow(exchangeInfo, "TESTKUDOS:8"); const coin = await withdrawCoin({ http, cryptoApi, - reserveKeyPair, + reserveKeyPair: { + reservePriv: reserveKeyPair.priv, + reservePub: reserveKeyPair.pub, + }, denom: d1, exchangeBaseUrl: exchange.baseUrl, }); |