diff options
Diffstat (limited to 'packages/taler-wallet-cli')
-rw-r--r-- | packages/taler-wallet-cli/src/index.ts | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts index 36e7f7768..a0f44fb41 100644 --- a/packages/taler-wallet-cli/src/index.ts +++ b/packages/taler-wallet-cli/src/index.ts @@ -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); |