@candledottv/cli 0.13.11 → 0.13.12
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/README.md +10 -7
- package/dist/index.js +79 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,6 +7,7 @@ one self-contained `dist/index.js` that runs under plain Node.
|
|
|
7
7
|
|
|
8
8
|
The full custody guide is [CLI custody](https://docs.candle.tv/developers/cli-custody), and every
|
|
9
9
|
command and flag is in the [Candle CLI reference](https://docs.candle.tv/developers/cli).
|
|
10
|
+
Not sure this is the right tool? [How to choose: SDK, MCP or CLI](https://docs.candle.tv/developers/choose-a-surface).
|
|
10
11
|
|
|
11
12
|
`candle vault rename --pairs-from <file> [--dry-run]` renames 1–256 vault or external keys under
|
|
12
13
|
one unlock and one commit. Use `<label|address|id> <new-label>` lines or CSV columns `from,to`
|
|
@@ -84,7 +85,7 @@ emergency procedure, rebinding, trusted wallets and API key access levels are al
|
|
|
84
85
|
| Command | What it does |
|
|
85
86
|
| --- | --- |
|
|
86
87
|
| `candle setup [--no-browser]` | The onboarding wizard: authorizes this device (skipped when already authorized), prints the agent wallets as funding destinations plus the paste-into-your-agent brief, shows the skill/MCP install lines, runs the full doctor check (setup's exit code is doctor's), and links the web console. Safe to re-run. |
|
|
87
|
-
| `candle auth login [--api-url <url>] [--profile <name>] [--scopes <a,b,c>] [--label <name>] [--embedded-wallet deny\|allow] [--no-browser]` | Authorizes this device: prints the API host and
|
|
88
|
+
| `candle auth login [--api-url <url>] [--profile <name>] [--scopes <a,b,c>] [--label <name>] [--embedded-wallet deny\|allow] [--no-browser]` | Authorizes this device: prints the API host, a code and its expiry, opens (or prints) an approval URL, polls until approved, then stores the resulting device token and API key. A new profile needs `--api-url` or a prompt. `--label` names both the device and the key. `--embedded-wallet` defaults to deny. `transfer:bound` is refused here and granted afterwards with `keys access <prefix> --access withdraw`. |
|
|
88
89
|
| `candle auth status` | Shows which storage backend is in use, both credential prefixes, the config file path, and a live validity check for each credential. |
|
|
89
90
|
| `candle auth logout [--keep-key]` | Revokes the stored API key (skipped with `--keep-key`), clears local credentials and config, and prints the portal URL for revoking the device itself. |
|
|
90
91
|
| `candle keys list [--scopes]` | Lists this account's API keys: prefix, name, Read, Write or Withdraw access, environment, timestamps, and which device minted each one. `--scopes` adds the raw scopes, sorted. |
|
|
@@ -92,6 +93,8 @@ emergency procedure, rebinding, trusted wallets and API key access levels are al
|
|
|
92
93
|
| `candle keys access <prefix\|label\|self> (--access read\|write\|withdraw [--yes] \| --history)` | Changes an existing key's level in place (same key, wallets and caps). Widening needs the device token and the prefix typed back at a terminal; `--yes` skips the prompt when narrowing; `self` narrows the profile's own key and can never widen it. `--history` lists the key's changes and who made them. |
|
|
93
94
|
| `candle keys update <prefix\|label> --embedded-wallet allow\|deny [--yes]`, `candle keys self embedded-wallet deny` | Allow or deny a key the account's embedded wallet, with the device token (allowing needs the prefix typed back at a terminal). `self embedded-wallet deny` lets the profile's own key give it up with no prompt; a key can never allow itself. |
|
|
94
95
|
| `candle keys signer approve <code> --key <prefix\|label> [--reject]`, `candle keys signer move <prefix\|label> [--to-key <prefix\|label>]` | Key signers for bots on a different machine from the vault. `approve` accepts (or rejects) a key's signer request with the device token, after you type the full fingerprint the trading machine printed. `move`, on the machine holding a wallet's current signer, moves every wallet on the key onto its active signer; `--to-key` moves a revoked key's wallets to a live key. |
|
|
96
|
+
| `candle keys stop <prefix>` | Pause one key using the device token. Its requests are refused with `PROFILE_PAUSED` until resumed; the key and its local credential are kept. Repeating the command succeeds. |
|
|
97
|
+
| `candle keys resume <prefix>` | Resume a stopped key using the device token. Repeating the command succeeds. An API key cannot stop or resume itself; a revoked key cannot be resumed. |
|
|
95
98
|
| `candle keys revoke <prefix>` | Revokes an API key by prefix. Revoking the CLI's own stored key also clears it locally. |
|
|
96
99
|
| `candle keys wallets <prefix>`, `keys wallets set <prefix> --wallets <id,id>`, `keys wallets scope <prefix> --scope all\|selected` | Each key is an agent profile with its own wallet set: list it, replace it, or limit the profile to its assigned wallets. |
|
|
97
100
|
| `candle wallets` (alias `candle wallet`) | Shows the account's embedded (launch) wallets and any linked wallets, using the API key, with a `Signer` column saying whether this machine holds each linked wallet's signing key and a `Trusted` column saying whether it is yours (linked while signed in, or marked with `trust`). It links and revokes; it never generates or prints a key, which the vault now derives. |
|
|
@@ -101,7 +104,7 @@ emergency procedure, rebinding, trusted wallets and API key access levels are al
|
|
|
101
104
|
| `candle wallets close-empty [--wallet embedded\|<tee address\|label>] [--keep <mint>]... [--yes]` | Closes a wallet's empty token accounts and returns their rent to it, after a preview: the embedded wallet (`transfer:write`), or a Solana TEE wallet bound to the key (`swap:write`), whose close transactions Candle builds, this machine checks and the key signer approves. |
|
|
102
105
|
| `candle vault init\|status\|list\|new-key\|rename\|phrase show\|restore\|reconcile-exposure` | The encrypted local vault, `vault.enc` (Tier 1). `init` creates it with a passphrase factor and a 24-word recovery phrase (and no key), `new-key` derives a key inside it (`--count`, `--labels-from <file>` for many under one unlock), `list [filter] [--balances]` shows one line per key, `rename` changes a label only, `phrase show` displays the phrase on a terminal (never in `--json`, a log or a pipe), and `restore --phrase` rebuilds the derived keys on another machine with a new passphrase (`--count`, `--tee-count`, `--external-count`, `--evm-count` and `--evm-tee-count` for EVM keys and Hood TEE wallets, or a Solana gap scan with `--rpc-url`); a restored vault never allocates new keys. `reconcile-exposure` re-reads the account and adds exposure records, clearing nothing. No key ever leaves the vault to reach Candle. See [CLI custody](https://docs.candle.tv/developers/cli-custody). |
|
|
103
106
|
| `candle vault factor list\|add passphrase\|add security-key\|add touch-id\|add passkey\|remove` (or `vault enroll <kind>`), `vault backup --to <path>\|icloud`, `vault verify-backup <path>` | What can open the vault, and proving a copy of it works: `backup` verifies the copy in full before reporting (a copy is sealed, keeping only the passphrase and security-key envelopes, unless it goes to a recognised local disk or removable drive, so a cloud folder and any path the CLI cannot place are both sealed unless `--accept-shared-domain` is passed), and `verify-backup` re-checks an existing one against this vault's key and address set. `add security-key` enrolls a FIDO2 security key (CTAP2 `hmac-secret`, user-verified with the key's PIN or biometric) through the bundled `candle-fido2` helper (`--install-helper` fetches and verifies this release's helper first); one key is not a recoverable factor, two keys are a pair, an enrolled key can authorize adding another, and the passphrase stays the recovery floor. `add touch-id` and `add passkey` are refused with `VAULT_FACTOR_UNSUPPORTED_ON_PLATFORM` until the Apple-signed helper ships. Every vault command then takes `--factor <id\|passphrase\|security-key>` to say which envelope opens it and `--device <id>` to name the key when several are attached. |
|
|
104
|
-
| `candle vault transfer\|promote\|promote-batch\|fund\|demote\|export-key` | Moving value and authority. `transfer` and `fund` sign locally after showing the decoded transaction (`transfer` from a vault key or a promoted TEE wallet, which warns when an agent may be trading it and reports the finalized transfer to Candle's history; `fund` reaches a TEE wallet from its pinned vault key, or an external wallet, with no `--yes`; both verify once, at the unlock, which names the send, then show the destination grouped in fours and take a typed `confirm`); `promote --from <cold label>` derives a fresh TEE wallet pinned to that key (an EVM vault key becomes a Hood TEE wallet), `promote --in-place <label> --sweep-to <cold label>` promotes a key at its own address after a typed warning, `promote-batch --pairs-from <file>` does many in place under one unlock, `--to-key` binds the result to another of your keys, and `demote` (disable then sweep; `--emergency` sweeps even when the stop request fails) sends it back to its pinned vault; `export-key` is the one ceremony that writes a single private key to a file you name. |
|
|
107
|
+
| `candle vault transfer\|promote\|promote-batch\|fund\|demote\|export-key` | Moving value and authority. `transfer` and `fund` sign locally after showing the decoded transaction (`transfer` from a vault key or a promoted TEE wallet, which warns when an agent may be trading it and reports the finalized transfer to Candle's history; `fund` reaches a TEE wallet from its pinned vault key, or an external wallet, with no `--yes`; both verify once, at the unlock, which names the send, then show the destination grouped in fours and take a typed `confirm`); `promote --from <cold label>` derives a fresh TEE wallet pinned to that key (an EVM vault key becomes a Hood TEE wallet), `promote --in-place <label> --sweep-to <cold label>` promotes a key at its own address after a typed warning, `promote-batch --pairs-from <file>` does many in place under one unlock, `--to-key` binds the result to another of your keys, and `demote` (disable then sweep; `--emergency` sweeps even when the stop request fails) sends it back to its pinned vault; `export-key` is the one ceremony that writes a single private key to a file you name. `demote` takes several addresses, or `--all --empty` for every Solana TEE wallet with nothing left to sweep, under one unlock and one typed `confirm` (`--yes` skips it), with a result line per wallet and one `--json` document. |
|
|
105
108
|
| `candle external new\|list\|sweep` | External wallets for outside tools: keys on the vault's third branch (`m/44'/501'/n'/2'`), never delegated to Privy and never registered with Candle. `new` allocates one (and moves the vault to format version 3; refused in a restored vault), `list` shows them, and `sweep <external> --to <vault>` sends everything back to a named vault key, signed locally, confirmed by a typed `confirm` after the vault key's address is shown. See [Bring your own services](https://docs.candle.tv/developers/cli#bring-your-own-services). |
|
|
106
109
|
| `candle sign [--file <path>] --wallet <external>... [--broadcast] [--yes]`, `candle sign message --wallet <external> [--file <path>] [--yes]` | The generic signer: a base64 transaction any tool built, legacy or v0, decoded (lookup tables resolved) and simulated over your own RPC before it is displayed and signed with an external wallet only. A vault key, a TEE wallet or an unnamed signer is refused; a failing simulation is refused with no override; `--yes` skips the confirmation prompt and nothing else. `sign message` signs the exact bytes of a file or of stdin. |
|
|
107
110
|
| `candle secrets set\|list\|remove <name>` | Your own third-party API keys, in a keychain namespace separate from Candle's credentials (`tv.candle.cli.secrets`, or `secrets.enc` on the encrypted-file fallback). Typed on a hidden prompt, never sent to Candle, never printed after `set`; `list` shows names only. A plug-in receives one as `CANDLE_SECRET_<NAME>` only when named with `--secret`. |
|
|
@@ -116,8 +119,8 @@ emergency procedure, rebinding, trusted wallets and API key access levels are al
|
|
|
116
119
|
| `candle tee new\|enable` | `new` adds a key to an existing `tee-wallets.enc` and refuses when that store is absent (`vault new-key --chain solana`, then `vault promote --from <label> --to-key <prefix>`). `--factor` does not apply. `enable <address> --vault <address>` delegates an existing key with a pinned sweep vault. `vault import-legacy --tee` migrates an existing store. |
|
|
117
120
|
| `candle swap <from> <to> --amount <n>\|--percent <n> --wallet <tee> [--to <tee>] [--wait]` | Quote, confirm and swap through the TEE wallet's bound key; the first buy after a launch is this command, unless `candle launch --buy` made it. The assets decide the chain (ETH, USDG or a 0x token is Hood; SOL, USDC, CNDL or a mint is Solana). SOL or USDC to ETH or USDG, or back, is a bridge through Relay into this key's own TEE wallet on the other chain (`--to` names it when there are several); `--wait` follows it for up to ten minutes. With `--json`, stdout is exactly one JSON value for swaps, token trades, replays and `swap status`: `kind`, `status`, `clientTradeId`, `signature` (the primary transaction, or `null`), `signatures` (a list) and `raw` (the original response). Every human line is on stderr. The keys older versions printed stay beside them. |
|
|
118
121
|
| `candle swap status <id> [--kind trade\|swap\|launch] [--wait]` | Read an operation without resending it; `--wait` follows a bridge until it ends. |
|
|
119
|
-
| `candle transfer --to <address\|wallet name\|vault> --asset <SOL\|USDC\|CNDL\|ETH\|USDG>\|--mint <mint>\|--token <0x...> --amount <decimal\|max> [--wallet <tee>] [--rpc-url <url>] [--yes]` | Move funds out of a TEE wallet through its bound Withdraw key, to the wallet's own pinned vault (`--to vault`, any token, `max` allowed, one SOL transfer at most the server's backstop ceiling, 50 SOL by default) or to another of the account's wallets you linked while signed in or marked trusted (a base asset, counted against the key's caps, which must include a per-asset cap and a USD `--tx-limit`). The asset decides the chain: ETH, USDG or `--token` moves from a Hood TEE wallet. The destination and its kind are shown before you confirm; Candle builds, the relay signs, Candle broadcasts. |
|
|
120
|
-
| `candle launch --name <name> --symbol <symbol> --image <path>\|--image-url <url> --wallet <tee>\|embedded [--banner <file\|URL>] [--description <text>] [--website <url>] [--x <url>] [--telegram <url>] [--discord <url>] [--buy <amount>] [--quote-asset <asset>] [--dex-version v3\|v4] [--mode <mode>] [--curve-v <V> --curve-g <G>] [--creator-fee-bps 0\|100\|200] [--staker-allocation-bps <bps>] [--visibility production\|test\|local\|hidden] [--pool-fee 25\|50\|100] [--pool-fee-from <bps> --pool-fee-minutes <min>] [--pool-open legacy\|curve_price] [--exp-pool-shape floor\|full_range] [--dry-run] [--check] [--client-trade-id <id>] [--yes]` | Create a token from the named wallet, with an optional first buy. `--wallet embedded` (or `main`) uses `/launch/headless` on Solana or Hood, with or without `--buy`; every plan can use it with `launch:write` and the key's embedded-wallet allowance, without `swap:write`. It previews through `/launch/headless/dry-run`, shows the quote for confirmation, then sends one headless request. A Solana buy is a creator bundle signed by Candle, preserving `bundleId` in the result; a Hood buy is best effort after creation. The server's slippage floor applies; there is no separate CLI build-floor comparison. TEE wallets use `/launch/self` and need Pro or Max, `allowLaunch`, the bound key and verified signing authority. A TEE first buy needs `TEE_LAUNCH_BUYS_ENABLED` (off by default); Solana creator buys also need `AGENT_TRADING_ENABLED` and a configured Jito engine. No gate or plan default changes. `--buy` is a decimal in whole quote units (SOL/USDC/CNDL on Solana, ETH on Hood; USDG has no first buy); zero or empty means no buy. A Hood launch needs `--dex-version v3\|v4`. `--description` and the four absolute http(s) socials flags travel with every preview/build: `--x` maps to `socials.twitter`. `--staker-allocation-bps` accepts 50–1000; `--visibility` is production, test, local or hidden (test keys need test or hidden). `--mode exp-custom` needs `--curve-v` and `--curve-g` in whole quote units; ranges and common help come from the shared launch definition and appear in `candle launch --help`. `--pool-fee` sets the Solana graduated pool fee (default 50 bps); `--pool-fee-from` and `--pool-fee-minutes` add a fall to that rate. Preset `--pool-open curve_price` opens at the curve's last price and burns the rest; omitted it applies when allocations fit `graduation.maxStakerCarveBps`, otherwise falls back to legacy. Exp `--exp-pool-shape` is floor or full_range. `--image-url` is https; `--image` uploads a local PNG/JPEG/GIF/WebP up to 10MB. `--banner` takes a wide local file or https URL. Uploads are public and permanent before confirmation, even on a dry run or decline. `--dry-run` stops at the preview without claiming the launch id. Reuse `--client-trade-id` for recovery, and always pass `--json` in scripts. `--check` answers which launch path works before any of it, in one call (`GET /api/v1/launch/preflight`): the key's tier and embedded-wallet allowance, each bound TEE wallet's allowLaunch and verified-active state, and the server's `TEE_LAUNCH_BUYS_ENABLED` and `AGENT_TRADING_ENABLED` switches. No name, symbol or image is needed, nothing is uploaded or sent, `--wallet <name>` narrows the answer to one wallet, and it exits 1 when no launch path works. |
|
|
122
|
+
| `candle transfer --to <address\|wallet name\|allowlist label\|vault> --asset <SOL\|USDC\|CNDL\|ETH\|USDG>\|--mint <mint>\|--token <0x...> --amount <decimal\|max> [--wallet <tee>] [--rpc-url <url>] [--yes]` | Move funds out of a TEE wallet through its bound Withdraw key, to the wallet's own pinned vault (`--to vault`, any token, `max` allowed, one SOL transfer at most the server's backstop ceiling, 50 SOL by default) or to another of the account's wallets you linked while signed in or marked trusted (a base asset, counted against the key's caps, which must include a per-asset cap and a USD `--tx-limit`). Where the server has `TEE_WITHDRAWALS_ENABLED` on (it ships off), also to an address on the account's withdrawal allowlist, named by its label, id or address, with the same base-asset rule. The asset decides the chain: ETH, USDG or `--token` moves from a Hood TEE wallet. The destination and its kind are shown before you confirm; Candle builds, the relay signs, Candle broadcasts. |
|
|
123
|
+
| `candle launch --name <name> --symbol <symbol> --image <path>\|--image-url <url> --wallet <tee>\|embedded [--banner <file\|URL>] [--description <text>] [--website <url>] [--x <url>] [--telegram <url>] [--discord <url>] [--buy <amount>] [--quote-asset <asset>] [--dex-version v3\|v4] [--mode <mode>] [--curve-v <V> --curve-g <G>] [--creator-fee-bps 0\|100\|200] [--staker-allocation-bps <bps>] [--visibility production\|test\|local\|hidden] [--pool-fee 25\|50\|100] [--pool-fee-from <bps> --pool-fee-minutes <min>] [--pool-open legacy\|curve_price] [--exp-pool-shape floor\|full_range] [--fee-wallet <address>\|--fee-wallet-multisig <address> [--fee-wallet-multisig-vault-index <n>]] [--require-fee-wallet] [--dry-run] [--check] [--client-trade-id <id>] [--yes]` | Create a token from the named wallet, with an optional first buy. `--wallet embedded` (or `main`) uses `/launch/headless` on Solana or Hood, with or without `--buy`; every plan can use it with `launch:write` and the key's embedded-wallet allowance, without `swap:write`. It previews through `/launch/headless/dry-run`, shows the quote for confirmation, then sends one headless request. A Solana buy is a creator bundle signed by Candle, preserving `bundleId` in the result; a Hood buy is best effort after creation. The server's slippage floor applies; there is no separate CLI build-floor comparison. TEE wallets use `/launch/self` and need Pro or Max, `allowLaunch`, the bound key and verified signing authority. A TEE first buy needs `TEE_LAUNCH_BUYS_ENABLED` (off by default); Solana creator buys also need `AGENT_TRADING_ENABLED` and a configured Jito engine. No gate or plan default changes. `--buy` is a decimal in whole quote units (SOL/USDC/CNDL on Solana, ETH on Hood; USDG has no first buy); zero or empty means no buy. A Hood launch needs `--dex-version v3\|v4`. `--description` and the four absolute http(s) socials flags travel with every preview/build: `--x` maps to `socials.twitter`. `--staker-allocation-bps` accepts 50–1000; `--visibility` is production, test, local or hidden (test keys need test or hidden). `--mode exp-custom` needs `--curve-v` and `--curve-g` in whole quote units; ranges and common help come from the shared launch definition and appear in `candle launch --help`. `--pool-fee` sets the Solana graduated pool fee (default 50 bps); `--pool-fee-from` and `--pool-fee-minutes` add a fall to that rate. Preset `--pool-open curve_price` opens at the curve's last price and burns the rest; omitted it applies when allocations fit `graduation.maxStakerCarveBps`, otherwise falls back to legacy. Exp `--exp-pool-shape` is floor or full_range. `--image-url` is https; `--image` uploads a local PNG/JPEG/GIF/WebP up to 10MB. `--banner` takes a wide local file or https URL. Uploads are public and permanent before confirmation, even on a dry run or decline. `--dry-run` stops at the preview without claiming the launch id. Reuse `--client-trade-id` for recovery, and always pass `--json` in scripts. `--check` answers which launch path works before any of it, in one call (`GET /api/v1/launch/preflight`): the key's tier and embedded-wallet allowance, each bound TEE wallet's allowLaunch and verified-active state, and the server's `TEE_LAUNCH_BUYS_ENABLED` and `AGENT_TRADING_ENABLED` switches. No name, symbol or image is needed, nothing is uploaded or sent, `--wallet <name>` narrows the answer to one wallet, and it exits 1 when no launch path works. |
|
|
121
124
|
| `candle launch status <mint-or-client-launch-id> [--wait]` | One launch state, `build`, `signed`, `confirmed`, `trading`, `bonded` or `migrated`, for a mint or a `clientLaunchId`. Reads `GET /api/v1/launch/status/{id}` (`launch:read`) and reports the market's own `lifecycle` and `migration` fields. `--wait` follows it until the token is trading, the launch has failed, or ten minutes pass. Nothing is sent. |
|
|
122
125
|
| `candle image upload <path>` | Uploads a PNG, JPEG, GIF or WebP file, at most 10MB, and prints the `https://` URL Candle hosts it at, ready to be a launch's `imageUrl`. The type is read from the file's first bytes. The file becomes public and permanent. Needs `launch:write`; spends nothing and does not count against the launch cap. `--json` adds the content type and the size. |
|
|
123
126
|
| `candle pnl [--profile <name>]` | P&L: realized net, fees, unrealized and total, then open positions, the same figures the console shows. Without `--profile`, the account's books (every profile, the web app and the CLI, one ledger; needs the Read scope), with a By agent table (each key, then Manual, then the account total). With `--profile <name>`, that profile's key's share of the same P&L: realized on its sales and the open positions that belong to it, with a row per wallet that sums to the total. Each wallet is its own average-cost pool, and a recorded move between the account's wallets carries its cost. Both show a Solana block, a Hood block, then the combined figure, the closed positions as money made, minus money lost, plus partial sells, and a `CHAIN` column (and `WALLET`, where the API names it) on positions. Unpriced positions are never valued at zero; dust (worth under one cent) is marked and still counted. A bridge between Solana and Hood is not a trade, and bridge and Relay costs are not netted. DAMM v2 LP positions are included: realized (withdrawals against the cost basis at the add, plus claimed fees), unrealized (open positions at their share of the pool plus unclaimed fees, against that basis) and vs holding (what the deposited tokens would be worth held); `Total` stays the console's token figure and `Total with LP` covers tokens and LP. |
|
|
@@ -159,7 +162,7 @@ Every command accepts these global options:
|
|
|
159
162
|
| `--device <id>` | Vault commands: the security key to use, by id. |
|
|
160
163
|
| `--no-verify-account` | Skips the check that the stored key belongs to the profile's account. |
|
|
161
164
|
| `--full` | Prints ids in full where a table would shorten them (`9EAq…9Hd7`). |
|
|
162
|
-
| `--json` | Machine-readable output instead of a formatted table or summary, generally the underlying API response.
|
|
165
|
+
| `--json` | Machine-readable output instead of a formatted table or summary, generally the underlying API response. Two exceptions: `auth login`'s JSON result still omits the plaintext device token and API key, matching its human-readable summary, since login never displays either value in any mode; and its device-code progress (code, approval URL, expiry) is printed to stderr as one JSON object with `"stage":"device_code"`, keeping stdout a single parseable JSON value. |
|
|
163
166
|
| `--help`, `-h` | Prints usage. |
|
|
164
167
|
| `--version`, `-v` | Prints the CLI version. |
|
|
165
168
|
|
|
@@ -552,7 +555,7 @@ MIT, see [LICENSE](LICENSE). Third-party material, including the EFF long wordli
|
|
|
552
555
|
generated vault passphrases (CC BY 3.0 US), is listed in
|
|
553
556
|
[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
|
|
554
557
|
|
|
555
|
-
### Immutable token updates
|
|
558
|
+
### Immutable token updates
|
|
556
559
|
|
|
557
560
|
`candle token update <address> --file ./update.txt --chain solana --idempotency-key <saved-key>`
|
|
558
561
|
posts 1–1000 characters with the account's `token-pages:write` key and fresh 0.5% eligibility.
|
|
@@ -563,7 +566,7 @@ soft-deletes a post owned by that key's account, including posts from its agents
|
|
|
563
566
|
Both commands support `--json` and default-off server refusals. Package release remains a separate
|
|
564
567
|
human-owned step.
|
|
565
568
|
|
|
566
|
-
### Token comments
|
|
569
|
+
### Token comments
|
|
567
570
|
|
|
568
571
|
`candle token comment <address> --file ./comment.txt --chain solana --idempotency-key <saved-key>`
|
|
569
572
|
posts 1–500 characters under the same `token-pages:write` key and fresh 0.5% eligibility as a
|
package/dist/index.js
CHANGED
|
@@ -3476,7 +3476,7 @@ var init_terminal_theme = __esm(() => {
|
|
|
3476
3476
|
});
|
|
3477
3477
|
|
|
3478
3478
|
// src/version.ts
|
|
3479
|
-
var CLI_VERSION = "0.13.
|
|
3479
|
+
var CLI_VERSION = "0.13.12";
|
|
3480
3480
|
|
|
3481
3481
|
// src/presentation.ts
|
|
3482
3482
|
function terminalStyle(deps, stream, machine = false) {
|
|
@@ -74890,6 +74890,9 @@ init_keys_embedded_wallet();
|
|
|
74890
74890
|
var DEVICE_CODE_PATH = "/api/v1/agent/device/code";
|
|
74891
74891
|
var DEVICE_TOKEN_PATH = "/api/v1/agent/device/token";
|
|
74892
74892
|
var MAX_CLIENT_NAME_LENGTH = 64;
|
|
74893
|
+
function expiresInWords(seconds) {
|
|
74894
|
+
return seconds % 60 === 0 ? `${seconds / 60}m` : `${seconds}s`;
|
|
74895
|
+
}
|
|
74893
74896
|
function loginApiUrlFault(value, env) {
|
|
74894
74897
|
let url;
|
|
74895
74898
|
try {
|
|
@@ -75012,11 +75015,14 @@ async function authLogin(args, ctx) {
|
|
|
75012
75015
|
const code = codeResult.body;
|
|
75013
75016
|
const progress = json ? deps.stderr : deps.stdout;
|
|
75014
75017
|
if (json) {
|
|
75015
|
-
progress.write(
|
|
75016
|
-
|
|
75017
|
-
|
|
75018
|
-
|
|
75019
|
-
|
|
75018
|
+
progress.write(`${JSON.stringify({
|
|
75019
|
+
stage: "device_code",
|
|
75020
|
+
apiUrl,
|
|
75021
|
+
userCode: code.userCode,
|
|
75022
|
+
verificationUri: code.verificationUri,
|
|
75023
|
+
verificationUriComplete: code.verificationUriComplete,
|
|
75024
|
+
expiresIn: code.expiresIn
|
|
75025
|
+
})}
|
|
75020
75026
|
`);
|
|
75021
75027
|
} else {
|
|
75022
75028
|
const style = terminalStyle(deps, "stdout");
|
|
@@ -75025,7 +75031,8 @@ async function authLogin(args, ctx) {
|
|
|
75025
75031
|
${fields([
|
|
75026
75032
|
["API", apiUrl],
|
|
75027
75033
|
["Device code", code.userCode],
|
|
75028
|
-
["Approve at", code.verificationUriComplete]
|
|
75034
|
+
["Approve at", code.verificationUriComplete],
|
|
75035
|
+
["Code expires in", expiresInWords(code.expiresIn)]
|
|
75029
75036
|
], style).join(`
|
|
75030
75037
|
`)}
|
|
75031
75038
|
|
|
@@ -77298,7 +77305,9 @@ var HELP = {
|
|
|
77298
77305
|
invocation: "self embedded-wallet deny",
|
|
77299
77306
|
description: "The profile's own key gives up the embedded wallet, with no prompt. A key can never allow itself: the owner does that with keys update"
|
|
77300
77307
|
},
|
|
77301
|
-
{ invocation: "
|
|
77308
|
+
{ invocation: "stop <prefix>", description: "Pause one key with the device token; reversible with keys resume" },
|
|
77309
|
+
{ invocation: "resume <prefix>", description: "Resume a stopped key with the device token" },
|
|
77310
|
+
{ invocation: "revoke <prefix>", description: "Revoke an API key permanently" },
|
|
77302
77311
|
{
|
|
77303
77312
|
invocation: "signer approve <code> --key <prefix|label> [--reject]",
|
|
77304
77313
|
description: "Approve (or reject) a key's signer request with the device token; type the full fingerprint the trading machine printed"
|
|
@@ -77333,7 +77342,9 @@ var HELP = {
|
|
|
77333
77342
|
"candle tee rebind --label-prefix dest- --to-key Ab3dEf9h",
|
|
77334
77343
|
"candle keys signer approve ABCD-EFGH --key tr-2",
|
|
77335
77344
|
"candle keys signer move tr-2",
|
|
77336
|
-
"candle keys revoke ck_live_ab12"
|
|
77345
|
+
"candle keys revoke ck_live_ab12",
|
|
77346
|
+
"candle keys stop ck_live_ab12",
|
|
77347
|
+
"candle keys resume ck_live_ab12"
|
|
77337
77348
|
],
|
|
77338
77349
|
env: ENV_API
|
|
77339
77350
|
},
|
|
@@ -90428,6 +90439,63 @@ ${fields(rows, style).join(`
|
|
|
90428
90439
|
return 0;
|
|
90429
90440
|
}
|
|
90430
90441
|
|
|
90442
|
+
// src/commands/keys-stop.ts
|
|
90443
|
+
init_args();
|
|
90444
|
+
init_client();
|
|
90445
|
+
init_deps();
|
|
90446
|
+
init_presentation();
|
|
90447
|
+
init_profiles();
|
|
90448
|
+
init_key_output();
|
|
90449
|
+
init_keys();
|
|
90450
|
+
function keysStop(args, ctx) {
|
|
90451
|
+
return setKeyPaused(args, ctx, true);
|
|
90452
|
+
}
|
|
90453
|
+
function keysResume(args, ctx) {
|
|
90454
|
+
return setKeyPaused(args, ctx, false);
|
|
90455
|
+
}
|
|
90456
|
+
async function setKeyPaused(args, ctx, paused) {
|
|
90457
|
+
const { deps, apiUrl, json } = ctx;
|
|
90458
|
+
const parsed = parseArgs(args, {});
|
|
90459
|
+
if ("error" in parsed) {
|
|
90460
|
+
writeScreenUsageFailure(deps, parsed.error, json);
|
|
90461
|
+
return 2;
|
|
90462
|
+
}
|
|
90463
|
+
const prefix = parsed.positionals[0];
|
|
90464
|
+
if (!prefix?.trim() || parsed.positionals.length !== 1) {
|
|
90465
|
+
writeScreenUsageFailure(deps, `Usage: candle keys ${paused ? "stop" : "resume"} <prefix>`, json);
|
|
90466
|
+
return 2;
|
|
90467
|
+
}
|
|
90468
|
+
await printIdentity(ctx);
|
|
90469
|
+
const deviceToken = await resolveDeviceToken(deps, ctx.profile);
|
|
90470
|
+
if (!deviceToken) {
|
|
90471
|
+
writeScreenLocalFailure(deps, NO_DEVICE_TOKEN, json);
|
|
90472
|
+
return 1;
|
|
90473
|
+
}
|
|
90474
|
+
const result = await apiRequest(`/api/v1/agent/keys/${encodeURIComponent(prefix)}/stop`, {
|
|
90475
|
+
method: "POST",
|
|
90476
|
+
auth: "device",
|
|
90477
|
+
credentials: { deviceToken },
|
|
90478
|
+
apiUrl,
|
|
90479
|
+
fetch: deps.fetch,
|
|
90480
|
+
env: deps.env,
|
|
90481
|
+
body: { paused }
|
|
90482
|
+
});
|
|
90483
|
+
if (!result.ok) {
|
|
90484
|
+
writeScreenFailure(deps, result, { apiUrl, authType: "device" }, json);
|
|
90485
|
+
return 1;
|
|
90486
|
+
}
|
|
90487
|
+
if (json) {
|
|
90488
|
+
deps.stdout.write(`${JSON.stringify(result.body)}
|
|
90489
|
+
`);
|
|
90490
|
+
return 0;
|
|
90491
|
+
}
|
|
90492
|
+
const body = result.body;
|
|
90493
|
+
const state = body.paused ? "stopped" : "resumed";
|
|
90494
|
+
deps.stdout.write(`${success(`Key ${prefix} ${body.changed ? "" : "already "}${state}.`, terminalStyle(deps, "stdout"))}
|
|
90495
|
+
`);
|
|
90496
|
+
return 0;
|
|
90497
|
+
}
|
|
90498
|
+
|
|
90431
90499
|
// src/commands/keys-wallets.ts
|
|
90432
90500
|
init_args();
|
|
90433
90501
|
init_client();
|
|
@@ -115111,6 +115179,8 @@ var COMMANDS = {
|
|
|
115111
115179
|
limit: keysLimit,
|
|
115112
115180
|
self: keysSelf,
|
|
115113
115181
|
revoke: keysRevoke,
|
|
115182
|
+
stop: keysStop,
|
|
115183
|
+
resume: keysResume,
|
|
115114
115184
|
wallets: keysWallets,
|
|
115115
115185
|
signer: keysSigner
|
|
115116
115186
|
}
|
package/package.json
CHANGED