aboutsummaryrefslogtreecommitdiff
path: root/src/headless/taler-wallet-cli.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/headless/taler-wallet-cli.ts')
-rw-r--r--src/headless/taler-wallet-cli.ts35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/headless/taler-wallet-cli.ts b/src/headless/taler-wallet-cli.ts
index 278489d26..838e56f64 100644
--- a/src/headless/taler-wallet-cli.ts
+++ b/src/headless/taler-wallet-cli.ts
@@ -373,6 +373,41 @@ exchangesCli
});
});
+exchangesCli
+ .subcommand("exchangesAcceptTosCmd", "accept-tos", {
+ help: "Accept terms of service.",
+ })
+ .requiredArgument("url", clk.STRING, {
+ help: "Base URL of the exchange.",
+ })
+ .requiredArgument("etag", clk.STRING, {
+ help: "ToS version tag to accept",
+ })
+ .action(async (args) => {
+ await withWallet(args, async (wallet) => {
+ await wallet.acceptExchangeTermsOfService(
+ args.exchangesAcceptTosCmd.url,
+ args.exchangesAcceptTosCmd.etag
+ );
+ });
+ });
+
+ exchangesCli
+ .subcommand("exchangesTosCmd", "tos", {
+ help: "Show terms of service.",
+ })
+ .requiredArgument("url", clk.STRING, {
+ help: "Base URL of the exchange.",
+ })
+ .action(async (args) => {
+ await withWallet(args, async (wallet) => {
+ const tosResult = await wallet.getExchangeTos(
+ args.exchangesTosCmd.url,
+ );
+ console.log(JSON.stringify(tosResult, undefined, 2));
+ });
+ });
+
const advancedCli = walletCli.subcommand("advancedArgs", "advanced", {
help:
"Subcommands for advanced operations (only use if you know what you're doing!).",