taler-typescript-core

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

commit bcd18410284f3fa3af9db774801cc0fcd339a1b3
parent 0919549917b361aa46f93bf224b02e1d14d69760
Author: Florian Dold <dold@taler.net>
Date:   Thu, 27 Aug 2026 19:29:18 +0200

wallet CLI: select exchange and check funds for peer-send

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

diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts @@ -2228,7 +2228,29 @@ walletCli help: "Summary to use in the contract terms.", }) .maybeOption("purseExpiration", ["--purse-expiration"], clk.STRING) + .maybeOption("exchange", ["--exchange"], clk.STRING, { + help: "Base URL of the exchange to use.", + }) + .flag("check", ["--check"], { + help: "Check whether the balance is sufficient without sending.", + }) .action(async (args) => { + if (args.payPush.check) { + await runCliAction(() => + withWallet(args, { lazyTaskLoop: true }, async (wallet) => { + const resp = await wallet.client.call( + WalletApiOperation.CheckPeerPushDebit, + { + amount: args.payPush.amount, + exchangeBaseUrl: args.payPush.exchange, + }, + ); + console.log(`Check peer-send result: ${j2s(resp)}`); + }), + ); + return; + } + let purseExpiration: AbsoluteTime; if (args.payPush.purseExpiration) { @@ -2247,6 +2269,7 @@ walletCli const resp = await wallet.client.call( WalletApiOperation.InitiatePeerPushDebit, { + exchangeBaseUrl: args.payPush.exchange, partialContractTerms: { amount: args.payPush.amount, summary: args.payPush.summary ?? "Payment",