aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-cli
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-cli')
-rw-r--r--packages/taler-wallet-cli/package.json4
-rw-r--r--packages/taler-wallet-cli/src/index.ts61
-rw-r--r--packages/taler-wallet-cli/tsconfig.json4
3 files changed, 53 insertions, 16 deletions
diff --git a/packages/taler-wallet-cli/package.json b/packages/taler-wallet-cli/package.json
index 06df1da76..6196c8971 100644
--- a/packages/taler-wallet-cli/package.json
+++ b/packages/taler-wallet-cli/package.json
@@ -33,8 +33,8 @@
"@types/node": "^18.11.17",
"prettier": "^2.8.8",
"rimraf": "^3.0.2",
- "typedoc": "^0.24.8",
- "typescript": "^5.1.3"
+ "typedoc": "^0.25.1",
+ "typescript": "^5.2.2"
},
"dependencies": {
"@gnu-taler/taler-util": "workspace:*",
diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts
index 36e7f7768..3fc86d0b5 100644
--- a/packages/taler-wallet-cli/src/index.ts
+++ b/packages/taler-wallet-cli/src/index.ts
@@ -244,7 +244,7 @@ async function createLocalWallet(
const dbPath = walletCliArgs.wallet.walletDbFile ?? defaultWalletDbPath;
const myHttpLib = createPlatformHttpLib({
enableThrottling: walletCliArgs.wallet.noThrottle ? false : true,
- allowHttp: walletCliArgs.wallet.noHttp ? false : true,
+ requireTls: walletCliArgs.wallet.noHttp,
});
const wallet = await createNativeWalletHost({
persistentStoragePath: dbPath !== ":memory:" ? dbPath : undefined,
@@ -883,7 +883,7 @@ backupCli.subcommand("exportDb", "export-db").action(async (args) => {
});
});
-backupCli.subcommand("storeBackup", "store-backup").action(async (args) => {
+backupCli.subcommand("storeBackup", "store").action(async (args) => {
await withWallet(args, async (wallet) => {
const resp = await wallet.client.call(
WalletApiOperation.CreateStoredBackup,
@@ -893,6 +893,46 @@ backupCli.subcommand("storeBackup", "store-backup").action(async (args) => {
});
});
+backupCli.subcommand("storeBackup", "list-stored").action(async (args) => {
+ await withWallet(args, async (wallet) => {
+ const resp = await wallet.client.call(
+ WalletApiOperation.ListStoredBackups,
+ {},
+ );
+ console.log(JSON.stringify(resp, undefined, 2));
+ });
+});
+
+backupCli
+ .subcommand("storeBackup", "delete-stored")
+ .requiredArgument("name", clk.STRING)
+ .action(async (args) => {
+ await withWallet(args, async (wallet) => {
+ const resp = await wallet.client.call(
+ WalletApiOperation.DeleteStoredBackup,
+ {
+ name: args.storeBackup.name,
+ },
+ );
+ console.log(JSON.stringify(resp, undefined, 2));
+ });
+ });
+
+backupCli
+ .subcommand("recoverBackup", "recover-stored")
+ .requiredArgument("name", clk.STRING)
+ .action(async (args) => {
+ await withWallet(args, async (wallet) => {
+ const resp = await wallet.client.call(
+ WalletApiOperation.RecoverStoredBackup,
+ {
+ name: args.recoverBackup.name,
+ },
+ );
+ console.log(JSON.stringify(resp, undefined, 2));
+ });
+ });
+
backupCli.subcommand("importDb", "import-db").action(async (args) => {
await withWallet(args, async (wallet) => {
const dumpRaw = await read(process.stdin);
@@ -984,14 +1024,14 @@ peerCli
peerCli
.subcommand("confirmIncomingPayPull", "confirm-pull-debit")
- .requiredArgument("peerPullPaymentIncomingId", clk.STRING)
+ .requiredArgument("peerPullDebitId", clk.STRING)
.action(async (args) => {
await withWallet(args, async (wallet) => {
const resp = await wallet.client.call(
WalletApiOperation.ConfirmPeerPullDebit,
{
- peerPullPaymentIncomingId:
- args.confirmIncomingPayPull.peerPullPaymentIncomingId,
+ peerPullDebitId:
+ args.confirmIncomingPayPull.peerPullDebitId,
},
);
console.log(JSON.stringify(resp, undefined, 2));
@@ -1000,14 +1040,14 @@ peerCli
peerCli
.subcommand("confirmIncomingPayPush", "confirm-push-credit")
- .requiredArgument("peerPushPaymentIncomingId", clk.STRING)
+ .requiredArgument("peerPushCreditId", clk.STRING)
.action(async (args) => {
await withWallet(args, async (wallet) => {
const resp = await wallet.client.call(
WalletApiOperation.ConfirmPeerPushCredit,
{
- peerPushPaymentIncomingId:
- args.confirmIncomingPayPush.peerPushPaymentIncomingId,
+ peerPushCreditId:
+ args.confirmIncomingPayPush.peerPushCreditId,
},
);
console.log(JSON.stringify(resp, undefined, 2));
@@ -1219,10 +1259,7 @@ advancedCli
help: "Run the 'bench-internal' benchmark",
})
.action(async (args) => {
- const myHttpLib = createPlatformHttpLib({
- enableThrottling: false,
- allowHttp: true,
- });
+ const myHttpLib = createPlatformHttpLib();
const res = await createNativeWalletHost2({
// No persistent DB storage.
persistentStoragePath: undefined,
diff --git a/packages/taler-wallet-cli/tsconfig.json b/packages/taler-wallet-cli/tsconfig.json
index 100339e43..42f0d88a8 100644
--- a/packages/taler-wallet-cli/tsconfig.json
+++ b/packages/taler-wallet-cli/tsconfig.json
@@ -3,10 +3,10 @@
"compilerOptions": {
"composite": true,
"target": "ES2018",
- "module": "ESNext",
+ "module": "Node16",
"moduleResolution": "Node16",
"sourceMap": true,
- "lib": ["es6"],
+ "lib": ["ES2020"],
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"strict": true,