diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-11-27 17:59:51 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-11-27 17:59:57 +0100 |
commit | c3ca556affe2f514aeb7fd052fe6d626d9319e99 (patch) | |
tree | ffd85c479b3201c6372d380bb0a2819af503539c /src/headless/taler-wallet-cli.ts | |
parent | d42b9e3df8d1bf0e2d0805a04663a79b22a2545d (diff) |
JS-only crypto (only primitives so far)
Diffstat (limited to 'src/headless/taler-wallet-cli.ts')
-rw-r--r-- | src/headless/taler-wallet-cli.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/headless/taler-wallet-cli.ts b/src/headless/taler-wallet-cli.ts index 0a6780808..bec098aca 100644 --- a/src/headless/taler-wallet-cli.ts +++ b/src/headless/taler-wallet-cli.ts @@ -15,6 +15,7 @@ */ import os = require("os"); +import fs = require("fs"); import { getDefaultNodeWallet, withdrawTestBalance } from "./helpers"; import { MerchantBackendConnection } from "./merchant"; import { runIntegrationTest } from "./integrationtest"; @@ -24,6 +25,7 @@ import * as clk from "./clk"; import { BridgeIDBFactory, MemoryBackend } from "idb-bridge"; import { Logger } from "../logging"; import * as Amounts from "../amounts"; +import { decodeCrock } from "../crypto/talerCrypto"; const logger = new Logger("taler-wallet-cli.ts"); @@ -255,6 +257,16 @@ const advancedCli = walletCli.subcommand("advancedArgs", "advanced", { }); advancedCli + .subcommand("decode", "decode", { + help: "Decode base32-crockford", + }) + .action(args => { + const enc = fs.readFileSync(0, 'utf8'); + fs.writeFileSync(1, decodeCrock(enc.trim())) + }); + + +advancedCli .subcommand("refresh", "force-refresh", { help: "Force a refresh on a coin.", }) |