diff options
author | Florian Dold <florian@dold.me> | 2021-01-07 15:01:23 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-01-07 15:01:23 +0100 |
commit | e319e99ef9657f68c82e7b37dd928c126d865ecb (patch) | |
tree | 2cd7d8b9f7330619fa01b0f2fb169a52a9703bf3 /packages/taler-wallet-cli/src | |
parent | 3773a4cdfff26297981094cb5c48e755ac75a77c (diff) | |
download | wallet-core-e319e99ef9657f68c82e7b37dd928c126d865ecb.tar.xz |
restore denom selection on import
Diffstat (limited to 'packages/taler-wallet-cli/src')
-rw-r--r-- | packages/taler-wallet-cli/src/index.ts | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts index e8e09f8fa..f4970e73d 100644 --- a/packages/taler-wallet-cli/src/index.ts +++ b/packages/taler-wallet-cli/src/index.ts @@ -36,9 +36,6 @@ import { NodeThreadCryptoWorkerFactory, CryptoApi, rsaBlind, - encodeCrock, - rsaUnblind, - rsaVerify, } from "taler-wallet-core"; import * as clk from "./clk"; import { deepStrictEqual } from "assert"; @@ -401,6 +398,25 @@ exchangesCli }); }); +const backupCli = walletCli.subcommand("backupArgs", "backup", { + help: "Subcommands for backups", +}); + +backupCli.subcommand("exportPlain", "export-plain").action(async (args) => { + await withWallet(args, async (wallet) => { + const backup = await wallet.exportBackupPlain(); + console.log(JSON.stringify(backup, undefined, 2)); + }); +}); + + +backupCli.subcommand("importPlain", "import-plain").action(async (args) => { + await withWallet(args, async (wallet) => { + const data = JSON.parse(await read(process.stdin)); + await wallet.importBackupPlain(data); + }); +}); + const advancedCli = walletCli.subcommand("advancedArgs", "advanced", { help: "Subcommands for advanced operations (only use if you know what you're doing!).", |