diff options
Diffstat (limited to 'packages/taler-wallet-cli/src/index.ts')
-rw-r--r-- | packages/taler-wallet-cli/src/index.ts | 61 |
1 files changed, 49 insertions, 12 deletions
diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts index 36e7f7768..3fc86d0b5 100644 --- a/packages/taler-wallet-cli/src/index.ts +++ b/packages/taler-wallet-cli/src/index.ts @@ -244,7 +244,7 @@ async function createLocalWallet( const dbPath = walletCliArgs.wallet.walletDbFile ?? defaultWalletDbPath; const myHttpLib = createPlatformHttpLib({ enableThrottling: walletCliArgs.wallet.noThrottle ? false : true, - allowHttp: walletCliArgs.wallet.noHttp ? false : true, + requireTls: walletCliArgs.wallet.noHttp, }); const wallet = await createNativeWalletHost({ persistentStoragePath: dbPath !== ":memory:" ? dbPath : undefined, @@ -883,7 +883,7 @@ backupCli.subcommand("exportDb", "export-db").action(async (args) => { }); }); -backupCli.subcommand("storeBackup", "store-backup").action(async (args) => { +backupCli.subcommand("storeBackup", "store").action(async (args) => { await withWallet(args, async (wallet) => { const resp = await wallet.client.call( WalletApiOperation.CreateStoredBackup, @@ -893,6 +893,46 @@ backupCli.subcommand("storeBackup", "store-backup").action(async (args) => { }); }); +backupCli.subcommand("storeBackup", "list-stored").action(async (args) => { + await withWallet(args, async (wallet) => { + const resp = await wallet.client.call( + WalletApiOperation.ListStoredBackups, + {}, + ); + console.log(JSON.stringify(resp, undefined, 2)); + }); +}); + +backupCli + .subcommand("storeBackup", "delete-stored") + .requiredArgument("name", clk.STRING) + .action(async (args) => { + await withWallet(args, async (wallet) => { + const resp = await wallet.client.call( + WalletApiOperation.DeleteStoredBackup, + { + name: args.storeBackup.name, + }, + ); + console.log(JSON.stringify(resp, undefined, 2)); + }); + }); + +backupCli + .subcommand("recoverBackup", "recover-stored") + .requiredArgument("name", clk.STRING) + .action(async (args) => { + await withWallet(args, async (wallet) => { + const resp = await wallet.client.call( + WalletApiOperation.RecoverStoredBackup, + { + name: args.recoverBackup.name, + }, + ); + console.log(JSON.stringify(resp, undefined, 2)); + }); + }); + backupCli.subcommand("importDb", "import-db").action(async (args) => { await withWallet(args, async (wallet) => { const dumpRaw = await read(process.stdin); @@ -984,14 +1024,14 @@ peerCli peerCli .subcommand("confirmIncomingPayPull", "confirm-pull-debit") - .requiredArgument("peerPullPaymentIncomingId", clk.STRING) + .requiredArgument("peerPullDebitId", clk.STRING) .action(async (args) => { await withWallet(args, async (wallet) => { const resp = await wallet.client.call( WalletApiOperation.ConfirmPeerPullDebit, { - peerPullPaymentIncomingId: - args.confirmIncomingPayPull.peerPullPaymentIncomingId, + peerPullDebitId: + args.confirmIncomingPayPull.peerPullDebitId, }, ); console.log(JSON.stringify(resp, undefined, 2)); @@ -1000,14 +1040,14 @@ peerCli peerCli .subcommand("confirmIncomingPayPush", "confirm-push-credit") - .requiredArgument("peerPushPaymentIncomingId", clk.STRING) + .requiredArgument("peerPushCreditId", clk.STRING) .action(async (args) => { await withWallet(args, async (wallet) => { const resp = await wallet.client.call( WalletApiOperation.ConfirmPeerPushCredit, { - peerPushPaymentIncomingId: - args.confirmIncomingPayPush.peerPushPaymentIncomingId, + peerPushCreditId: + args.confirmIncomingPayPush.peerPushCreditId, }, ); console.log(JSON.stringify(resp, undefined, 2)); @@ -1219,10 +1259,7 @@ advancedCli help: "Run the 'bench-internal' benchmark", }) .action(async (args) => { - const myHttpLib = createPlatformHttpLib({ - enableThrottling: false, - allowHttp: true, - }); + const myHttpLib = createPlatformHttpLib(); const res = await createNativeWalletHost2({ // No persistent DB storage. persistentStoragePath: undefined, |