@vapi-network/cli 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { drainCeilingSweeps, sweepAboveCeiling, sweepBack, WalletStore, type AuditEvent, type CeilingBalanceReader, type CeilingSiblingsFetcher, type CeilingTransfer, type DistributeArgs, type ListingVerification, type SecretStore, type SwarmCapitalDeps, type VapiConfig, type VapiPaymentAccount, type WalletBalanceReader, type WalletEntry, type WalletName, type TransferArgs } from "@vapi-network/core";
1
+ import { drainCeilingSweeps, sweepAboveCeiling, sweepBack, sweepNativeEth, WalletStore, type AuditEvent, type CeilingBalanceReader, type CeilingSiblingsFetcher, type CeilingTransfer, type DistributeArgs, type ListingVerification, type SecretStore, type SwarmCapitalDeps, type VapiConfig, type VapiPaymentAccount, type WalletBalanceReader, type WalletEntry, type WalletName, type TransferArgs } from "@vapi-network/core";
2
2
  import { type pollDeviceLink, type startDeviceLink } from "@vapi-network/core/agent-link";
3
3
  import type { buyRouterBalance, listRouterModels, ownerStake, rotateRouterKey, routerChat, routerCredentials, routerUsage } from "@vapi-network/core/router-client";
4
4
  import { type Runtime, type RuntimeKind, type runSwarm } from "@vapi-network/mcp";
@@ -6,7 +6,7 @@ import { type AgentCommandDependencies } from "./agent.js";
6
6
  import { type TasksCommandDependencies } from "./task.js";
7
7
  import { type RuntimeRequest } from "./runtime-local.js";
8
8
  import { type RailwayExec } from "./runtime-railway.js";
9
- export declare const HELP = "vAPI Network\n\nUsage:\n vapi init [--networks <base,arc>] [--no-link] [--json]\n vapi setup [--no-cloud-backup] [--accounts <n>] [--json]\n vapi accounts [--all] [--json]\n vapi accounts add <name> [--label <text>] [--no-link] [--json]\n vapi accounts import <name> [--keystore <path> | --key-file <path>] [--label <text>] [--json]\n vapi accounts rename <old> <new> [--json]\n vapi accounts use <name> [--json]\n vapi accounts remove <name> [--force] [--json]\n vapi accounts restore <name> [--json]\n vapi accounts caps <name> [--per-call <usd>] [--per-day <usd>] [--ceiling <usd|off>] [--json]\n vapi accounts distribute <amount> --from <account> [--to <a,b,c>] [--network base|arc] [--json]\n vapi accounts distribute --resume <id> [--replace-expired-restored] [--bind-legacy-addresses] [--json]\n vapi accounts distribute --cancel <id> [--replace-expired-restored] [--json]\n vapi swarm create <name> [--agents <n>|--roles <a,b,c>] [--fund <usd> --from <account>] [--strategy <targets|even|weights>] [--targets <role=usd,...>] [--caps <perCall>/<perDay>] [--treasury-caps <perCall>/<perDay>] [--network <base|arc>] [--model <id>] [--no-wait] [--json]\n vapi swarm add <name> <role> [--json]\n vapi swarm remove <name> <member> [--json]\n vapi swarm fund <name> <usd> [--from <account>] [--json]\n vapi swarm rebalance <name> [--targets <role=usd,...>] [--json]\n vapi swarm status <name> [--json]\n vapi swarm dissolve <name> [--json]\n vapi swarm run <name> \"<task>\" [--mode lead|each] [--lead <member>] [--budget <usd>] [--draw <usd>] [--detach] [--runtime local|railway] [--result-file <path>] [--json]\n vapi swarm run <name> \"<task>\" --mode each --runtime railway --checkpoint <name> --allow-remote-key [--budget <usd>] [--keep-sandbox] [--json]\n vapi swarm runs <name> [--json]\n vapi swarm stop <name> [<runId>|--all] [--confirm-worker-stopped] [--json]\n vapi send <amount> --from <account> --to <account|owner|0x\u2026> [--network base|arc] [--resume <nonce>] [--json]\n vapi fund [--amount <usd>] [--account <name>] [--json]\n vapi docs \"<question>\" [--json]\n vapi docs search \"<query>\" [--json]\n vapi docs read <url-or-path> [--json]\n vapi search [query] [--kind <kind>] [--network <caip2>] [--limit <n>] [--cursor <cursor>] [--include-unverified] [--include-outage] [--json]\n vapi inspect <id> [--endpoint <name>] [--json]\n vapi pay <id-or-url> [--method <method>] [--endpoint <name>] [--body <json>] [--content-type <type>] [--network <caip2>] [--expected-pay-to <address>] [--max <amount>] [--timeout <seconds>] [--account <name>] [--json]\n vapi pay --resume <receipt-id> [--json]\n vapi check <url> [--method <method>] [--json]\n vapi balance [--account <name>] [--json]\n vapi receipts [--limit <n>] [--account <name>] [--all-wallets] [--json]\n vapi receipts export --format <json|csv> [--range <24h|7d|30d>] [--account <name>] [--all-wallets]\n vapi stats [--range <24h|7d|30d>] [--account <name>] [--all-wallets] [--json]\n vapi sweep [<address>] [--network <caip2>] [--account <name>] [--json]\n vapi agent create <name> --model <id> --instructions <file> [--call-budget <usd>] [--max-per-call <usd>] [--router-budget <usd>] [--approve-above <usd>] [--max-per-task <usd>] [--auto-release-below <usd>] [--include-unverified] [--max-steps <n>] [--yes] [--json]\n vapi agent run <name> \"<task>\" [--budget <usd>] [--detach] [--runtime local] [--result-file <path>] [--json]\n vapi agent run --bundle-env <VAR> (\"<task>\" | --task-base64url <text>) [--budget <usd>] [--result-file <path>] [--json]\n vapi agent list [--json]\n vapi agent show <name> [--json]\n vapi agent pause <name> [--json]\n vapi agent resume <name> [--json]\n vapi agent revoke <name> [--json]\n vapi dashboard [--account <name>] [--no-browser] [--json]\n vapi login [--account <name>] [--label <name>] [--publish] [--no-browser] [--json]\n vapi logout [--account <name>] [--json]\n vapi whoami [--account <name>] [--json]\n vapi claude [--vapi|--own] [--model <m>] [--use-balance] [--account <name>] [<claude args>...]\n vapi codex [--vapi|--own] [--model <id>] [--use-balance] [--account <name>] [<codex args>...]\n vapi code install [--yes] [--no-alias] [--account <name>] [--json]\n vapi code uninstall [--json]\n vapi router models [--account <name>] [--json]\n vapi router usage [--account <name>] [--json]\n vapi router chat --model <id> [--system <text>] [--max-tokens <n>] \"<prompt>\" [--account <name>] [--json]\n vapi router buy <1|5|20|50> [--account <name>] [--json]\n vapi router buy --auto <1|5|20|50> --below <usd> [--account <name>] [--json]\n vapi router buy --auto off [--account <name>] [--json]\n vapi router key [--rotate] [--account <name>] [--json]\n vapi stake status [--account <name>] [--json]\n vapi stake open [--account <name>] [--no-browser] [--json]\n vapi task search [--open] [--min <usd>] [--tab trending|new|closing|paid] [--limit <n>] [--json]\n vapi task show <id> [--account <name>] [--json]\n vapi task post --title <text> --brief <file|-> --amount <usd> --deadline <duration|ISO> [--intake proposals|submissions] [--max-awards <k>] [--webhook <https-url>] [--account <name>] [--json]\n vapi task propose <id> --price <usd> --duration <duration> --note <text> [--account <name>] [--json]\n vapi task submit <id> --proof <https-url> [--proof <https-url>...] [--file <path>...] [--account <name>] [--json]\n vapi task award <id> <proposalId> [--account <name>] [--json]\n vapi task sign <id> [--account <name>] [--json]\n vapi task fund <id> [--yes] [--account <name>] [--json]\n vapi task deliver <id> --files <path...> --note <text> [--account <name>] [--json]\n vapi task release <id> [--account <name>] [--json]\n vapi task refund <id> [--account <name>] [--json]\n vapi task dispute <id> --evidence-hash <0x + 64 hex> [--account <name>] [--json]\n vapi task message <id> <text> [--account <name>] [--json]\n vapi task thread <id> [--after <cursor>] [--account <name>] [--json]\n vapi task watch <id> [--until <state>] [--auto-release] [--timeout 7d] [--interval 5s] [--account <name>] [--json]\n vapi task status <id> [--account <name>] [--json]\n vapi export-key [--network <caip2>] [--account <name>] [--json]\n vapi backup [--account <name>] [--cloud [off]] [--json]\n vapi restore [--accounts <n> | --from-owner [--owner <0x\u2026>]] [--json]\n vapi import (--phrase | --key) [--account <name>] [--networks <base,arc>] [--replace] [--force] [--json]\n vapi passphrase [--account <name>] [--json]\n vapi vault protect [--json]\n vapi vault unprotect [--json]\n vapi vault lock [--json]\n vapi vault unlock [--json]\n vapi vault status [--json]\n vapi unlock [--account <name>] [--json]\n vapi lock [--account <name> | --all] [--json]\n vapi report \"<what happened>\" [--include-addresses] [--send] [--json]\n vapi auth set-key [--json]\n vapi auth status [--json]\n vapi auth clear [--json]\n vapi publish <url> [--method <method>] [--mode <origin|endpoint|openapi>] [--name <text>] [--description <text>] [--category <ai|data|crypto|compute|search>] [--select <names>] [--account <name>] [--yes] [--resume] [--json]\n vapi publish activate <slug> [--json]\n vapi publish verify-request <slug> [--json]\n vapi publish list [--json]\n vapi claim <origin> [--account <name>] [--json]\n vapi mcp [--account <name>] [--json]\n vapi mcp install <claude-code|claude-desktop|cursor|codex> [--home <dir>] [--registry <url>] [--no-link] [--json]\n vapi serve [--json]\n vapi version [--json]\n vapi help [--json]\n\n`vapi init`, `vapi wallet create` and `vapi mcp install` offer to link the wallet to your vAPI dashboard. Use `--no-link` to skip the prompt.\n\nEvery command that touches a wallet takes `--account <name>`, falls back to `VAPI_WALLET`, then to the default account set by `vapi accounts use`, and names the wallet it used on its first line.\n\n`vapi search` answers with vAPI-verified listings plus the mirrored external catalogs. `--include-unverified` also returns self-listed APIs that passed vAPI's automated x402 probe but were never reviewed; every result is tagged `[verified]`, `[requested]`, `[unverified]` or `[external]`.\n\nSolana listings remain searchable; inspect and pay return `unsupported_network`. Solana keys are not part of the device vault yet.\n\n`vapi docs` asks the public vAPI documentation assistant; `vapi docs search` searches documentation excerpts and `vapi docs read` reads one Markdown page. They need no account, wallet or payment.\n\n`vapi task --help` lists task options and availability. Task exit codes: 0 ok, 1 error, 2 policy refusal (JSON ok:false with a policy. reason) or invalid usage (JSON error), 3 approval needed in non-interactive mode. Posting moves no money; the current create-order contract does not store amount, deadline, intake, max awards or webhook yet.\n\n`vapi check <url>` grades an x402 API's 402 without paying: status, transport, declared version and its required fields, the exact scheme, canonical USDC, payTo, maxTimeoutSeconds, advertised extensions, and the origin's /.well-known/x402. It looks for OpenAPI beside the checked path, at /openapi.json, then through same-origin service-desc links in /.well-known/api-catalog. No wallet, no payment, no registry call. It exits 1 when a rule fails. A 402 that answers with Stripe/Tempo's MPP challenge (WWW-Authenticate: Payment) is recognised and reported as transport mpp; vapi pay cannot pay it.\n\n`vapi pay --resume <receipt-id>` answers the one question a lost response leaves: did that payment settle? It reads the signed authorization's state on-chain \u2014 settled, expired, or still pending \u2014 and never pays.\n\n`vapi fund` opens the funding page: card via Coinbase (needs a Coinbase account; US guest checkout), send from MetaMask/Coinbase Wallet/WalletConnect, or bridge from another chain.\n\n`vapi vault protect` adds a password to the device vault. `vapi vault unlock` opens it on this device for 8 hours; for unattended use, set `VAPI_VAULT_PASSWORD`. `vapi unlock` and `vapi lock` remain aliases for one release.\n\n`vapi backup` and `vapi export-key` print a secret, so they run only on a real terminal, never for an agent, and ask you to type the wallet name first. `vapi backup --cloud` keeps an encrypted vault copy that only the owner can approve for recovery. `vapi restore` rebuilds the vault from the phrase and re-derives accounts until five consecutive addresses have no Base USDC, and reports the number scanned. Use `--accounts <n>` with restore or setup to recover a fixed count without querying balances. Set `VAPI_NO_SECRETS=1` to switch exports off entirely. Every export and every wallet change is logged to ~/.vapi/audit.log.\n\n`vapi publish <url>` lists an API you own. vAPI probes the URL \u2014 an origin, one endpoint, or an OpenAPI document \u2014 you choose which endpoints to list, and your wallet signs one line naming where the payouts go. Listing is permissionless: a listing that passed the probe goes live with `vapi publish activate <slug>`, and `vapi publish verify-request <slug>` asks for the review that puts it in the default search. Set each endpoint's x402 payTo to the payout wallet you signed with before activation. vAPI Call takes no fee. Providers are paid directly. A catalog of more than 20 endpoints is listed as several listings of up to 20, with one result line per endpoint; `--resume` skips every endpoint this key already lists.\n\n`vapi claim <origin>` takes ownership of the listings vAPI indexed from your API. The wallet their payments go to signs one line, `Claim the vAPI Call listings served from <origin>`; the listings stay paid directly to that wallet, and `vapi publish list` shows them.\n\n`vapi auth set-key` types the registry API key once, on a terminal, into the same OS secret store as the passphrase. A key is a secret: it is never an argument, `VAPI_API_KEY` is the route for CI, and no agent or MCP tool can reach it.\n\nWith no command, vapi shows the status screen; vapi help prints this text. The MCP server starts only with `vapi mcp`; `vapi mcp install claude-code` runs Claude Code's installer, while the other install targets write the client's MCP config.";
9
+ export declare const HELP = "vAPI Network\n\nUsage:\n vapi init [--networks <base,arc>] [--no-link] [--json]\n vapi setup [--no-cloud-backup] [--accounts <n>] [--json]\n vapi accounts [--all] [--json]\n vapi accounts add <name> [--label <text>] [--no-link] [--json]\n vapi accounts import <name> [--keystore <path> | --key-file <path>] [--label <text>] [--json]\n vapi accounts rename <old> <new> [--json]\n vapi accounts use <name> [--json]\n vapi accounts remove <name> [--force] [--json]\n vapi accounts restore <name> [--json]\n vapi accounts caps <name> [--per-call <usd>] [--per-day <usd>] [--ceiling <usd|off>] [--json]\n vapi accounts distribute <amount> --from <account> [--to <a,b,c>] [--network base|arc] [--json]\n vapi accounts distribute --resume <id> [--replace-expired-restored] [--bind-legacy-addresses] [--json]\n vapi accounts distribute --cancel <id> [--replace-expired-restored] [--json]\n vapi swarm create <name> [--agents <n>|--roles <a,b,c>] [--fund <usd> --from <account>] [--strategy <targets|even|weights>] [--targets <role=usd,...>] [--caps <perCall>/<perDay>] [--treasury-caps <perCall>/<perDay>] [--network <base|arc>] [--model <id>] [--no-wait] [--json]\n vapi swarm add <name> <role> [--json]\n vapi swarm remove <name> <member> [--json]\n vapi swarm fund <name> <usd> [--from <account>] [--json]\n vapi swarm rebalance <name> [--targets <role=usd,...>] [--json]\n vapi swarm status <name> [--json]\n vapi swarm dissolve <name> [--json]\n vapi swarm run <name> \"<task>\" [--mode lead|each] [--lead <member>] [--budget <usd>] [--draw <usd>] [--detach] [--runtime local|railway] [--result-file <path>] [--json]\n vapi swarm run <name> \"<task>\" --mode each --runtime railway --checkpoint <name> --allow-remote-key [--budget <usd>] [--keep-sandbox] [--json]\n vapi swarm runs <name> [--json]\n vapi swarm stop <name> [<runId>|--all] [--confirm-worker-stopped] [--json]\n vapi send <amount> --from <account> --to <account|owner|0x\u2026> [--network base|arc] [--resume <nonce>] [--json]\n vapi fund [--amount <usd>] [--account <name>] [--json]\n vapi docs \"<question>\" [--json]\n vapi docs search \"<query>\" [--json]\n vapi docs read <url-or-path> [--json]\n vapi search [query] [--kind <kind>] [--network <caip2>] [--limit <n>] [--cursor <cursor>] [--include-unverified] [--include-outage] [--json]\n vapi inspect <id> [--endpoint <name>] [--json]\n vapi pay <id-or-url> [--method <method>] [--endpoint <name>] [--body <json>] [--content-type <type>] [--network <caip2>] [--expected-pay-to <address>] [--max <amount>] [--timeout <seconds>] [--account <name>] [--json]\n vapi pay --resume <receipt-id> [--json]\n vapi check <url> [--method <method>] [--json]\n vapi balance [--account <name>] [--json]\n vapi receipts [--limit <n>] [--account <name>] [--all-wallets] [--json]\n vapi receipts export --format <json|csv> [--range <24h|7d|30d>] [--account <name>] [--all-wallets]\n vapi stats [--range <24h|7d|30d>] [--account <name>] [--all-wallets] [--json]\n vapi sweep [<address>] [--asset usdc|eth] [--network <caip2>] [--account <name>] [--json]\n --asset eth moves the wallet's ETH on Base minus the network fee.\n vapi agent create <name> --model <id> --instructions <file> [--call-budget <usd>] [--max-per-call <usd>] [--router-budget <usd>] [--approve-above <usd>] [--max-per-task <usd>] [--auto-release-below <usd>] [--include-unverified] [--max-steps <n>] [--yes] [--json]\n vapi agent run <name> \"<task>\" [--budget <usd>] [--detach] [--runtime local] [--result-file <path>] [--json]\n vapi agent run --bundle-env <VAR> (\"<task>\" | --task-base64url <text>) [--budget <usd>] [--result-file <path>] [--json]\n vapi agent list [--json]\n vapi agent show <name> [--json]\n vapi agent pause <name> [--json]\n vapi agent resume <name> [--json]\n vapi agent revoke <name> [--json]\n vapi dashboard [--account <name>] [--no-browser] [--json]\n vapi login [--account <name>] [--label <name>] [--publish] [--no-browser] [--json]\n vapi logout [--account <name>] [--json]\n vapi whoami [--account <name>] [--json]\n vapi claude [--vapi|--own] [--model <m>] [--use-balance] [--account <name>] [<claude args>...]\n vapi codex [--vapi|--own] [--model <id>] [--use-balance] [--account <name>] [<codex args>...]\n vapi code install [--yes] [--no-alias] [--account <name>] [--json]\n vapi code uninstall [--json]\n vapi router models [--account <name>] [--json]\n vapi router usage [--account <name>] [--json]\n vapi router chat --model <id> [--system <text>] [--max-tokens <n>] \"<prompt>\" [--account <name>] [--json]\n vapi router buy <1|5|20|50> [--account <name>] [--json]\n vapi router buy --auto <1|5|20|50> --below <usd> [--account <name>] [--json]\n vapi router buy --auto off [--account <name>] [--json]\n vapi router key [--rotate] [--account <name>] [--json]\n vapi stake status [--account <name>] [--json]\n vapi stake open [--account <name>] [--no-browser] [--json]\n vapi task search [--open] [--min <usd>] [--tab trending|new|closing|paid] [--limit <n>] [--json]\n vapi task show <id> [--account <name>] [--json]\n vapi task post --title <text> --brief <file|-> --amount <usd> --deadline <duration|ISO> [--intake proposals|submissions] [--max-awards <k>] [--webhook <https-url>] [--account <name>] [--json]\n vapi task propose <id> --price <usd> --duration <duration> --note <text> [--account <name>] [--json]\n vapi task submit <id> --proof <https-url> [--proof <https-url>...] [--file <path>...] [--account <name>] [--json]\n vapi task award <id> <proposalId> [--account <name>] [--json]\n vapi task sign <id> [--account <name>] [--json]\n vapi task fund <id> [--yes] [--account <name>] [--json]\n vapi task deliver <id> --files <path...> --note <text> [--account <name>] [--json]\n vapi task release <id> [--account <name>] [--json]\n vapi task refund <id> [--account <name>] [--json]\n vapi task dispute <id> --evidence-hash <0x + 64 hex> [--account <name>] [--json]\n vapi task message <id> <text> [--account <name>] [--json]\n vapi task thread <id> [--after <cursor>] [--account <name>] [--json]\n vapi task watch <id> [--until <state>] [--auto-release] [--timeout 7d] [--interval 5s] [--account <name>] [--json]\n vapi task status <id> [--account <name>] [--json]\n vapi export-key [--network <caip2>] [--account <name>] [--json]\n vapi backup [--account <name>] [--cloud [off]] [--json]\n vapi restore [--accounts <n> | --from-owner [--owner <0x\u2026>]] [--json]\n vapi import (--phrase | --key) [--account <name>] [--networks <base,arc>] [--replace] [--force] [--json]\n vapi passphrase [--account <name>] [--json]\n vapi vault protect [--json]\n vapi vault unprotect [--json]\n vapi vault lock [--json]\n vapi vault unlock [--json]\n vapi vault status [--json]\n vapi unlock [--account <name>] [--json]\n vapi lock [--account <name> | --all] [--json]\n vapi report \"<what happened>\" [--include-addresses] [--send] [--json]\n vapi auth set-key [--json]\n vapi auth status [--json]\n vapi auth clear [--json]\n vapi publish <url> [--method <method>] [--mode <origin|endpoint|openapi>] [--name <text>] [--description <text>] [--category <ai|data|crypto|compute|search>] [--select <names>] [--account <name>] [--yes] [--resume] [--json]\n vapi publish activate <slug> [--json]\n vapi publish verify-request <slug> [--json]\n vapi publish list [--json]\n vapi claim <origin> [--account <name>] [--json]\n vapi mcp [--account <name>] [--json]\n vapi mcp install <claude-code|claude-desktop|cursor|codex> [--home <dir>] [--registry <url>] [--no-link] [--json]\n vapi serve [--json]\n vapi version [--json]\n vapi help [--json]\n\n`vapi init`, `vapi wallet create` and `vapi mcp install` offer to link the wallet to your vAPI dashboard. Use `--no-link` to skip the prompt.\n\nEvery command that touches a wallet takes `--account <name>`, falls back to `VAPI_WALLET`, then to the default account set by `vapi accounts use`, and names the wallet it used on its first line.\n\n`vapi search` answers with vAPI-verified listings plus the mirrored external catalogs. `--include-unverified` also returns self-listed APIs that passed vAPI's automated x402 probe but were never reviewed; every result is tagged `[verified]`, `[requested]`, `[unverified]` or `[external]`.\n\nSolana listings remain searchable; inspect and pay return `unsupported_network`. Solana keys are not part of the device vault yet.\n\n`vapi docs` asks the public vAPI documentation assistant; `vapi docs search` searches documentation excerpts and `vapi docs read` reads one Markdown page. They need no account, wallet or payment.\n\n`vapi task --help` lists task options and availability. Task exit codes: 0 ok, 1 error, 2 policy refusal (JSON ok:false with a policy. reason) or invalid usage (JSON error), 3 approval needed in non-interactive mode. Posting moves no money; the current create-order contract does not store amount, deadline, intake, max awards or webhook yet.\n\n`vapi check <url>` grades an x402 API's 402 without paying: status, transport, declared version and its required fields, the exact scheme, canonical USDC, payTo, maxTimeoutSeconds, advertised extensions, and the origin's /.well-known/x402. It looks for OpenAPI beside the checked path, at /openapi.json, then through same-origin service-desc links in /.well-known/api-catalog. No wallet, no payment, no registry call. It exits 1 when a rule fails. A 402 that answers with Stripe/Tempo's MPP challenge (WWW-Authenticate: Payment) is recognised and reported as transport mpp; vapi pay cannot pay it.\n\n`vapi pay --resume <receipt-id>` answers the one question a lost response leaves: did that payment settle? It reads the signed authorization's state on-chain \u2014 settled, expired, or still pending \u2014 and never pays.\n\n`vapi fund` opens the funding page: card via Coinbase (needs a Coinbase account; US guest checkout), send from MetaMask/Coinbase Wallet/WalletConnect, or bridge from another chain.\n\n`vapi vault protect` adds a password to the device vault. `vapi vault unlock` opens it on this device for 8 hours; for unattended use, set `VAPI_VAULT_PASSWORD`. `vapi unlock` and `vapi lock` remain aliases for one release.\n\n`vapi backup` and `vapi export-key` print a secret, so they run only on a real terminal, never for an agent, and ask you to type the wallet name first. `vapi backup --cloud` keeps an encrypted vault copy that only the owner can approve for recovery. `vapi restore` rebuilds the vault from the phrase and re-derives accounts until five consecutive addresses have no Base USDC, and reports the number scanned. Use `--accounts <n>` with restore or setup to recover a fixed count without querying balances. Set `VAPI_NO_SECRETS=1` to switch exports off entirely. Every export and every wallet change is logged to ~/.vapi/audit.log.\n\n`vapi publish <url>` lists an API you own. vAPI probes the URL \u2014 an origin, one endpoint, or an OpenAPI document \u2014 you choose which endpoints to list, and your wallet signs one line naming where the payouts go. Listing is permissionless: a listing that passed the probe goes live with `vapi publish activate <slug>`, and `vapi publish verify-request <slug>` asks for the review that puts it in the default search. Set each endpoint's x402 payTo to the payout wallet you signed with before activation. vAPI Call takes no fee. Providers are paid directly. A catalog of more than 20 endpoints is listed as several listings of up to 20, with one result line per endpoint; `--resume` skips every endpoint this key already lists.\n\n`vapi claim <origin>` takes ownership of the listings vAPI indexed from your API. The wallet their payments go to signs one line, `Claim the vAPI Call listings served from <origin>`; the listings stay paid directly to that wallet, and `vapi publish list` shows them.\n\n`vapi auth set-key` types the registry API key once, on a terminal, into the same OS secret store as the passphrase. A key is a secret: it is never an argument, `VAPI_API_KEY` is the route for CI, and no agent or MCP tool can reach it.\n\nWith no command, vapi shows the status screen; vapi help prints this text. The MCP server starts only with `vapi mcp`; `vapi mcp install claude-code` runs Claude Code's installer, while the other install targets write the client's MCP config.";
10
10
  export type CliIo = {
11
11
  stdout(message: string): void;
12
12
  stderr(message: string): void;
@@ -105,6 +105,7 @@ export type CliDependencies = {
105
105
  openUrl?: (url: string) => boolean;
106
106
  /** Moves a wallet balance, injected for deterministic sweep command tests. */
107
107
  sweepBack?: typeof sweepBack;
108
+ sweepNativeEth?: typeof sweepNativeEth;
108
109
  /** Transfer authorization inputs, injected so send tests are deterministic. */
109
110
  transfer?: {
110
111
  nonce?: TransferArgs["nonce"];
package/dist/cli.js CHANGED
@@ -3534,6 +3534,9 @@ function carry(digits) {
3534
3534
  }
3535
3535
  return `1${out.join("")}`;
3536
3536
  }
3537
+ function fromGwei(gwei, unit = "wei") {
3538
+ return from(gwei, exponents.gwei - exponents[unit]);
3539
+ }
3537
3540
  var exponents, InvalidDecimalNumberError, InvalidDecimalsError;
3538
3541
  var init_Value = __esm({
3539
3542
  "../../node_modules/.pnpm/viem@2.56.1_typescript@6.0.3_zod@4.5.4/node_modules/viem/_esm/utils/unit/Value.js"() {
@@ -35994,6 +35997,12 @@ function formatUnits(value, decimals) {
35994
35997
  return format(value, decimals);
35995
35998
  }
35996
35999
 
36000
+ // ../../node_modules/.pnpm/viem@2.56.1_typescript@6.0.3_zod@4.5.4/node_modules/viem/_esm/utils/unit/parseGwei.js
36001
+ init_Value();
36002
+ function parseGwei(ether, unit = "wei") {
36003
+ return fromGwei(ether, unit);
36004
+ }
36005
+
35997
36006
  // ../../node_modules/.pnpm/viem@2.56.1_typescript@6.0.3_zod@4.5.4/node_modules/viem/_esm/utils/unit/parseUnits.js
35998
36007
  init_Value();
35999
36008
  function parseUnits(value, decimals) {
@@ -36137,7 +36146,7 @@ init_createBatchScheduler();
36137
36146
  init_stringify();
36138
36147
  async function multicall(client, parameters) {
36139
36148
  const { account, authorizationList, allowFailure = true, blockHash, blockNumber, blockOverrides, blockTag, requireCanonical, stateOverride } = parameters;
36140
- const contracts = parameters.contracts;
36149
+ const contracts2 = parameters.contracts;
36141
36150
  const batch = typeof client.batch?.multicall === "object" ? client.batch.multicall : {};
36142
36151
  const batchSize = parameters.batchSize ?? batch.batchSize ?? 1024;
36143
36152
  const deployless = parameters.deployless ?? batch.deployless ?? false;
@@ -36158,8 +36167,8 @@ async function multicall(client, parameters) {
36158
36167
  const chunkedCalls = [[]];
36159
36168
  let currentChunk = 0;
36160
36169
  let currentChunkSize = 0;
36161
- for (let i = 0; i < contracts.length; i++) {
36162
- const { abi: abi2, address: address4, args, functionName } = contracts[i];
36170
+ for (let i = 0; i < contracts2.length; i++) {
36171
+ const { abi: abi2, address: address4, args, functionName } = contracts2[i];
36163
36172
  try {
36164
36173
  const callData = encodeFunctionData({ abi: abi2, args, functionName });
36165
36174
  currentChunkSize += (callData.length - 2) / 2;
@@ -36253,7 +36262,7 @@ async function multicall(client, parameters) {
36253
36262
  for (let j = 0; j < aggregate3Result.length; j++) {
36254
36263
  const { returnData, success: success2 } = aggregate3Result[j];
36255
36264
  const { callData } = batches[i][j];
36256
- const { abi: abi2, address: address4, functionName, args } = contracts[results.length];
36265
+ const { abi: abi2, address: address4, functionName, args } = contracts2[results.length];
36257
36266
  try {
36258
36267
  if (callData === "0x")
36259
36268
  throw new AbiDecodingZeroDataError();
@@ -36280,7 +36289,7 @@ async function multicall(client, parameters) {
36280
36289
  }
36281
36290
  }
36282
36291
  }
36283
- if (results.length !== contracts.length)
36292
+ if (results.length !== contracts2.length)
36284
36293
  throw new BaseError2("multicall results mismatch");
36285
36294
  return results;
36286
36295
  }
@@ -39256,6 +39265,9 @@ async function recoverTransactionAddress(parameters) {
39256
39265
  });
39257
39266
  }
39258
39267
 
39268
+ // ../../node_modules/.pnpm/viem@2.56.1_typescript@6.0.3_zod@4.5.4/node_modules/viem/_esm/index.js
39269
+ init_formatEther();
39270
+
39259
39271
  // ../core/src/x402-networks.ts
39260
39272
  var BASE_MAINNET_CAIP2 = "eip155:8453";
39261
39273
  var ARC_MAINNET_CAIP2 = "eip155:5042";
@@ -46293,6 +46305,143 @@ function rawServiceId(raw, serviceIndex) {
46293
46305
  return typeof id2 === "string" ? id2 : void 0;
46294
46306
  }
46295
46307
 
46308
+ // ../../node_modules/.pnpm/viem@2.56.1_typescript@6.0.3_zod@4.5.4/node_modules/viem/_esm/op-stack/contracts.js
46309
+ var contracts = {
46310
+ gasPriceOracle: { address: "0x420000000000000000000000000000000000000F" },
46311
+ l1Block: { address: "0x4200000000000000000000000000000000000015" },
46312
+ l2CrossDomainMessenger: {
46313
+ address: "0x4200000000000000000000000000000000000007"
46314
+ },
46315
+ l2Erc721Bridge: { address: "0x4200000000000000000000000000000000000014" },
46316
+ l2StandardBridge: { address: "0x4200000000000000000000000000000000000010" },
46317
+ l2ToL1MessagePasser: {
46318
+ address: "0x4200000000000000000000000000000000000016"
46319
+ }
46320
+ };
46321
+
46322
+ // ../../node_modules/.pnpm/viem@2.56.1_typescript@6.0.3_zod@4.5.4/node_modules/viem/_esm/op-stack/abis.js
46323
+ var gasPriceOracleAbi = [
46324
+ { inputs: [], stateMutability: "nonpayable", type: "constructor" },
46325
+ {
46326
+ inputs: [],
46327
+ name: "DECIMALS",
46328
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
46329
+ stateMutability: "view",
46330
+ type: "function"
46331
+ },
46332
+ {
46333
+ inputs: [],
46334
+ name: "baseFee",
46335
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
46336
+ stateMutability: "view",
46337
+ type: "function"
46338
+ },
46339
+ {
46340
+ inputs: [],
46341
+ name: "decimals",
46342
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
46343
+ stateMutability: "pure",
46344
+ type: "function"
46345
+ },
46346
+ {
46347
+ inputs: [],
46348
+ name: "gasPrice",
46349
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
46350
+ stateMutability: "view",
46351
+ type: "function"
46352
+ },
46353
+ {
46354
+ inputs: [{ internalType: "bytes", name: "_data", type: "bytes" }],
46355
+ name: "getL1Fee",
46356
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
46357
+ stateMutability: "view",
46358
+ type: "function"
46359
+ },
46360
+ {
46361
+ inputs: [{ internalType: "bytes", name: "_data", type: "bytes" }],
46362
+ name: "getL1GasUsed",
46363
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
46364
+ stateMutability: "view",
46365
+ type: "function"
46366
+ },
46367
+ {
46368
+ inputs: [{ internalType: "uint256", name: "_gasUsed", type: "uint256" }],
46369
+ name: "getOperatorFee",
46370
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
46371
+ stateMutability: "view",
46372
+ type: "function"
46373
+ },
46374
+ {
46375
+ inputs: [],
46376
+ name: "isJovian",
46377
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
46378
+ stateMutability: "view",
46379
+ type: "function"
46380
+ },
46381
+ {
46382
+ inputs: [],
46383
+ name: "l1BaseFee",
46384
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
46385
+ stateMutability: "view",
46386
+ type: "function"
46387
+ },
46388
+ {
46389
+ inputs: [],
46390
+ name: "overhead",
46391
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
46392
+ stateMutability: "view",
46393
+ type: "function"
46394
+ },
46395
+ {
46396
+ inputs: [],
46397
+ name: "scalar",
46398
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
46399
+ stateMutability: "view",
46400
+ type: "function"
46401
+ },
46402
+ {
46403
+ inputs: [],
46404
+ name: "version",
46405
+ outputs: [{ internalType: "string", name: "", type: "string" }],
46406
+ stateMutability: "view",
46407
+ type: "function"
46408
+ }
46409
+ ];
46410
+
46411
+ // ../../node_modules/.pnpm/viem@2.56.1_typescript@6.0.3_zod@4.5.4/node_modules/viem/_esm/op-stack/actions/estimateL1Fee.js
46412
+ init_getChainContractAddress();
46413
+ async function estimateL1Fee(client, args) {
46414
+ const { chain: chain2 = client.chain, gasPriceOracleAddress: gasPriceOracleAddress_ } = args;
46415
+ const gasPriceOracleAddress = (() => {
46416
+ if (gasPriceOracleAddress_)
46417
+ return gasPriceOracleAddress_;
46418
+ if (chain2)
46419
+ return getChainContractAddress({
46420
+ chain: chain2,
46421
+ contract: "gasPriceOracle"
46422
+ });
46423
+ return contracts.gasPriceOracle.address;
46424
+ })();
46425
+ const transaction2 = serializeTransaction({
46426
+ ...args,
46427
+ chainId: chain2?.id ?? 1,
46428
+ type: "eip1559",
46429
+ // Set upper-limit-ish stub values. Shouldn't affect the estimate too much as we are
46430
+ // tweaking dust bytes here (as opposed to long `data` bytes).
46431
+ // See: https://github.com/ethereum-optimism/optimism/blob/54d02df55523c9e1b4b38ed082c12a42087323a0/packages/contracts-bedrock/src/L2/GasPriceOracle.sol#L242-L248.
46432
+ gas: args.data ? 300000n : 21000n,
46433
+ maxFeePerGas: parseGwei("5"),
46434
+ maxPriorityFeePerGas: parseGwei("1"),
46435
+ nonce: 1
46436
+ });
46437
+ return readContract(client, {
46438
+ abi: gasPriceOracleAbi,
46439
+ address: gasPriceOracleAddress,
46440
+ functionName: "getL1Fee",
46441
+ args: [transaction2]
46442
+ });
46443
+ }
46444
+
46296
46445
  // ../core/src/sweep.ts
46297
46446
  var ERC20_ABI = [
46298
46447
  {
@@ -46451,6 +46600,100 @@ async function sweepBack(args) {
46451
46600
  transaction: transaction2
46452
46601
  };
46453
46602
  }
46603
+ var NATIVE_ETH_L1_FEE_FALLBACK_WEI = 10000000000000n;
46604
+ var NATIVE_ETH_FEE_MARGIN_PERCENT = 20n;
46605
+ function supportsNativeEthSweep(network) {
46606
+ return network === BASE_MAINNET_CAIP2 || network === "eip155:84532";
46607
+ }
46608
+ async function sweepNativeEth(args) {
46609
+ const configured = configuredNetworkFor(args.config.networks, args.network);
46610
+ if (!configured) throw new Error(`Network ${args.network} is not configured.`);
46611
+ if (isSolanaNetwork(args.network)) {
46612
+ throw new Error("Solana has no native ETH; use vapi sweep --asset usdc.");
46613
+ }
46614
+ if (usesUsdcGas(args.network)) {
46615
+ throw new Error("Arc has no native ETH; use vapi sweep --asset usdc.");
46616
+ }
46617
+ if (!supportsNativeEthSweep(args.network)) {
46618
+ throw new Error("Native ETH sweeps are supported only on Base mainnet and Base Sepolia.");
46619
+ }
46620
+ const rpcUrl = requireRpcUrl(args.network, configured);
46621
+ const chain2 = createChain(args.network, rpcUrl);
46622
+ const options = {
46623
+ allowPrivateNetwork: args.config.allowPrivateNetwork,
46624
+ ...args.fetchImpl ? { fetch: args.fetchImpl } : {},
46625
+ ...args.lookup ? { lookup: args.lookup } : {}
46626
+ };
46627
+ const publicClient = createNetworkPublicClient(args.network, configured, options);
46628
+ const to = getAddress(args.destination);
46629
+ const balance = await publicClient.getBalance({ address: args.account.address });
46630
+ const estimateTransferGas = async (value) => {
46631
+ try {
46632
+ return await publicClient.estimateGas({ account: args.account.address, to, value });
46633
+ } catch (error61) {
46634
+ const code = await publicClient.getCode({ address: to });
46635
+ if (code && code !== "0x") throw error61;
46636
+ return 21000n;
46637
+ }
46638
+ };
46639
+ let gas = await estimateTransferGas(1n);
46640
+ const { maxFeePerGas, maxPriorityFeePerGas } = await publicClient.estimateFeesPerGas();
46641
+ let l1Fee;
46642
+ try {
46643
+ l1Fee = await estimateL1Fee(publicClient, {
46644
+ chain: chain2,
46645
+ account: args.account.address,
46646
+ to,
46647
+ value: balance,
46648
+ gas,
46649
+ maxFeePerGas,
46650
+ maxPriorityFeePerGas,
46651
+ gasPriceOracleAddress: "0x420000000000000000000000000000000000000F"
46652
+ });
46653
+ } catch {
46654
+ l1Fee = NATIVE_ETH_L1_FEE_FALLBACK_WEI;
46655
+ }
46656
+ let amount2 = 0n;
46657
+ let validated = false;
46658
+ for (let attempt = 0; attempt < 5; attempt += 1) {
46659
+ const fee = (maxFeePerGas * gas + l1Fee) * (100n + NATIVE_ETH_FEE_MARGIN_PERCENT) / 100n;
46660
+ amount2 = balance - fee;
46661
+ if (amount2 <= 0n) {
46662
+ const name = getNetworkDefinition(args.network).name;
46663
+ throw new Error(
46664
+ `The ETH balance on ${name} (${formatEther2(balance)} ETH) is too small to cover the ${name} network fee.`
46665
+ );
46666
+ }
46667
+ const requiredGas = await estimateTransferGas(amount2);
46668
+ if (requiredGas <= gas) {
46669
+ validated = true;
46670
+ break;
46671
+ }
46672
+ gas = requiredGas;
46673
+ }
46674
+ if (!validated) {
46675
+ throw new Error(
46676
+ "Could not safely estimate gas for the ETH withdrawal; no transaction was sent."
46677
+ );
46678
+ }
46679
+ const walletClient = createWalletClient({
46680
+ account: args.account,
46681
+ chain: chain2,
46682
+ transport: createNetworkHttpTransport(rpcUrl, options)
46683
+ });
46684
+ const transaction2 = await walletClient.sendTransaction({
46685
+ to,
46686
+ value: amount2,
46687
+ gas,
46688
+ maxFeePerGas,
46689
+ maxPriorityFeePerGas
46690
+ });
46691
+ const receipt = await publicClient.waitForTransactionReceipt({ hash: transaction2 });
46692
+ if (receipt.status !== "success") {
46693
+ throw new Error(`Sweep transaction ${transaction2} reverted on ${args.network}.`);
46694
+ }
46695
+ return { network: args.network, amountAtomic: amount2.toString(), transaction: transaction2 };
46696
+ }
46454
46697
  function isInsufficientGasError(error61) {
46455
46698
  const seen = /* @__PURE__ */ new Set();
46456
46699
  let current = error61;
@@ -78002,7 +78245,7 @@ function createRunBudget(args) {
78002
78245
  import { mkdir as mkdir15, writeFile as writeFile8 } from "node:fs/promises";
78003
78246
  import { arch, platform, release } from "node:os";
78004
78247
  import { join as join14 } from "node:path";
78005
- var VAPI_CLIENT_VERSION = "0.13.0";
78248
+ var VAPI_CLIENT_VERSION = "0.14.0";
78006
78249
  async function createSupportReport(options) {
78007
78250
  const message = options.message.trim();
78008
78251
  if (!message) throw new Error("Support report message must not be empty.");
@@ -99378,7 +99621,7 @@ async function readProcessStdin() {
99378
99621
  }
99379
99622
 
99380
99623
  // src/version.ts
99381
- var CLI_VERSION = "0.13.0";
99624
+ var CLI_VERSION = "0.14.0";
99382
99625
 
99383
99626
  // src/status.ts
99384
99627
  async function statusCommand(argv, json2, io, dependencies) {
@@ -107383,7 +107626,8 @@ Usage:
107383
107626
  vapi receipts [--limit <n>] [--account <name>] [--all-wallets] [--json]
107384
107627
  vapi receipts export --format <json|csv> [--range <24h|7d|30d>] [--account <name>] [--all-wallets]
107385
107628
  vapi stats [--range <24h|7d|30d>] [--account <name>] [--all-wallets] [--json]
107386
- vapi sweep [<address>] [--network <caip2>] [--account <name>] [--json]
107629
+ vapi sweep [<address>] [--asset usdc|eth] [--network <caip2>] [--account <name>] [--json]
107630
+ --asset eth moves the wallet's ETH on Base minus the network fee.
107387
107631
  vapi agent create <name> --model <id> --instructions <file> [--call-budget <usd>] [--max-per-call <usd>] [--router-budget <usd>] [--approve-above <usd>] [--max-per-task <usd>] [--auto-release-below <usd>] [--include-unverified] [--max-steps <n>] [--yes] [--json]
107388
107632
  vapi agent run <name> "<task>" [--budget <usd>] [--detach] [--runtime local] [--result-file <path>] [--json]
107389
107633
  vapi agent run --bundle-env <VAR> ("<task>" | --task-base64url <text>) [--budget <usd>] [--result-file <path>] [--json]
@@ -108626,9 +108870,15 @@ async function fetchNetworkStats(dependencies) {
108626
108870
  }
108627
108871
  async function sweepCommand(argv, json2, io, dependencies) {
108628
108872
  const parsed = parseArguments(argv, {
108629
- valueOptions: /* @__PURE__ */ new Set(["--network", WALLET_OPTION5]),
108873
+ valueOptions: /* @__PURE__ */ new Set(["--asset", "--network", WALLET_OPTION5]),
108630
108874
  maximumPositionals: 1
108631
108875
  });
108876
+ const asset = parsed.one("--asset") ?? "usdc";
108877
+ if (asset !== "usdc" && asset !== "eth") {
108878
+ throw new UsageError(
108879
+ "Usage: vapi sweep [<address>] [--asset usdc|eth] [--network <caip2>]\n--asset must be usdc or eth."
108880
+ );
108881
+ }
108632
108882
  const requestedNetwork = parsed.one("--network");
108633
108883
  const target = await targetWallet(parsed, dependencies);
108634
108884
  const explicitDestination = parsed.positionals[0];
@@ -108663,10 +108913,15 @@ No address was provided and wallet ${target.name} is not linked. Run vapi login
108663
108913
  }
108664
108914
  const { account } = await unlockTarget(target, dependencies);
108665
108915
  const results = [];
108916
+ const errors = [];
108666
108917
  const gasErrors = [];
108667
- for (const network of requestedNetwork ? [requestedNetwork] : Object.keys(config2.networks)) {
108918
+ const networks = requestedNetwork ? [requestedNetwork] : Object.keys(config2.networks).filter(
108919
+ (network) => asset === "usdc" || supportsNativeEthSweep(network)
108920
+ );
108921
+ for (const network of networks) {
108668
108922
  try {
108669
- const result = await (dependencies.sweepBack ?? sweepBack)({
108923
+ const sweep = asset === "eth" ? dependencies.sweepNativeEth ?? sweepNativeEth : dependencies.sweepBack ?? sweepBack;
108924
+ const result = await sweep({
108670
108925
  account,
108671
108926
  config: config2,
108672
108927
  network,
@@ -108676,6 +108931,7 @@ No address was provided and wallet ${target.name} is not linked. Run vapi login
108676
108931
  results.push({ ...result, status: "swept" });
108677
108932
  } catch (error61) {
108678
108933
  if (requestedNetwork) throw error61;
108934
+ errors.push(error61);
108679
108935
  if (error61 instanceof SweepGasError) gasErrors.push(error61);
108680
108936
  results.push({
108681
108937
  network,
@@ -108685,10 +108941,22 @@ No address was provided and wallet ${target.name} is not linked. Run vapi login
108685
108941
  }
108686
108942
  }
108687
108943
  if (!results.some((result) => result.status === "swept")) {
108944
+ if (asset === "eth") {
108945
+ if (errors.length) throw errors[0];
108946
+ throw new Error("No configured network had a sweepable ETH balance.");
108947
+ }
108688
108948
  if (gasErrors[0]) throw gasErrors[0];
108689
108949
  throw new Error("No configured network had a sweepable USDC balance.");
108690
108950
  }
108691
- outputForWallet2(io, json2, target, { results }, formatSweepResults(results, ownerDestination));
108951
+ outputForWallet2(
108952
+ io,
108953
+ json2,
108954
+ target,
108955
+ {
108956
+ results: asset === "eth" ? results.map((result) => ({ ...result, asset: "eth" })) : results
108957
+ },
108958
+ asset === "eth" ? formatEthSweepResults(results, destination) : formatSweepResults(results, ownerDestination)
108959
+ );
108692
108960
  });
108693
108961
  }
108694
108962
  async function reportCommand(argv, json2, io, dependencies) {
@@ -110113,6 +110381,17 @@ function formatRate(value) {
110113
110381
  function formatLatency(value) {
110114
110382
  return value === null ? "\u2014" : String(value);
110115
110383
  }
110384
+ function formatEthSweepResults(results, destination) {
110385
+ return results.map((result) => {
110386
+ const name = getNetworkDefinition(result.network).name;
110387
+ if (result.status === "error") return `${name}: ${result.error}`;
110388
+ const [whole, fraction] = formatEther2(BigInt(result.amountAtomic)).split(".");
110389
+ const decimals = fraction?.slice(0, 8).replace(/0+$/, "");
110390
+ const amount2 = decimals ? `${whole}.${decimals}` : whole;
110391
+ const url2 = explorerTransactionUrl(result.network, result.transaction);
110392
+ return `${name}: sent ${amount2} ETH to ${destination} in ${result.transaction}${url2 ? ` (${url2})` : ""}`;
110393
+ }).join("\n");
110394
+ }
110116
110395
  function formatSweepResults(results, ownerDestination) {
110117
110396
  return results.map((result) => {
110118
110397
  const name = getNetworkDefinition(result.network).name;