taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 83ef93d05b3fe104cdbc36111df31b9251d0ad25
parent 261f43eae8b53d4d5290d922f5b6ca50b96af3b4
Author: Florian Dold <florian@dold.me>
Date:   Sun,  3 Aug 2025 14:52:03 +0200

wallet-cli: new commands for deposit / bank accounts

Diffstat:
Mpackages/taler-wallet-cli/src/index.ts | 32++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+), 0 deletions(-)

diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts @@ -1164,6 +1164,24 @@ backupCli.subcommand("importDb", "import-db").action(async (args) => { }); }); +const bankAccountsCli = walletCli.subcommand( + "bankAccountArgs", + "bank-accounts", + { + help: "Subcommands for managing known bank accounts.", + }, +); + +bankAccountsCli.subcommand("listArgs", "list").action(async (args) => { + await withWallet(args, { lazyTaskLoop: true }, async (wallet) => { + const resp = await wallet.client.call( + WalletApiOperation.ListBankAccounts, + {}, + ); + console.log(`Bank accounts: ${j2s(resp)}`); + }); +}); + const depositCli = walletCli.subcommand("depositArgs", "deposit", { help: "Subcommands for depositing money to payto:// accounts", }); @@ -1185,6 +1203,20 @@ depositCli }); }); +depositCli + .subcommand("checkDepositArgs", "check") + .requiredArgument("amount", clk.AMOUNT) + .requiredArgument("targetPayto", clk.STRING) + .action(async (args) => { + await withWallet(args, { lazyTaskLoop: true }, async (wallet) => { + const resp = await wallet.client.call(WalletApiOperation.CheckDeposit, { + amount: args.checkDepositArgs.amount, + depositPaytoUri: args.checkDepositArgs.targetPayto, + }); + console.log(`Check deposit result: ${j2s(resp)}`); + }); + }); + const peerCli = walletCli.subcommand("peerArgs", "p2p", { help: "Subcommands for peer-to-peer payments.", });