@toon-protocol/rig 4.7.0 → 5.0.1

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.
Files changed (29) hide show
  1. package/README.md +31 -25
  2. package/dist/{chunk-J6Y3U645.js → chunk-2TG4YHEC.js} +59 -41
  3. package/dist/chunk-2TG4YHEC.js.map +1 -0
  4. package/dist/{chunk-3IVO2MSZ.js → chunk-4WVH2ITA.js} +3 -3
  5. package/dist/{chunk-U5A7MHBP.js → chunk-7VIVQHRG.js} +1 -1
  6. package/dist/chunk-7VIVQHRG.js.map +1 -0
  7. package/dist/{chunk-XQ2AWNHQ.js → chunk-CHVOXCDV.js} +0 -0
  8. package/dist/{chunk-XCLUB2CY.js → chunk-LMZSAFAB.js} +44 -15
  9. package/dist/chunk-LMZSAFAB.js.map +1 -0
  10. package/dist/{chunk-S3KKQ4IC.js → chunk-QKL53YZS.js} +2 -2
  11. package/dist/{chunk-UE5TAFEU.js → chunk-ZQGXFFBP.js} +4 -4
  12. package/dist/chunk-ZQGXFFBP.js.map +1 -0
  13. package/dist/{ci-serve-T33FCQVT.js → ci-serve-BU7NDT7O.js} +7 -7
  14. package/dist/cli/rig.js +6 -6
  15. package/dist/index.js +3 -3
  16. package/dist/standalone/index.d.ts +109 -74
  17. package/dist/standalone/index.js +13 -3
  18. package/dist/{standalone-mode-FY3XVQQK.js → standalone-mode-AT4S5EZG.js} +135 -49
  19. package/dist/standalone-mode-AT4S5EZG.js.map +1 -0
  20. package/package.json +2 -2
  21. package/dist/chunk-J6Y3U645.js.map +0 -1
  22. package/dist/chunk-U5A7MHBP.js.map +0 -1
  23. package/dist/chunk-UE5TAFEU.js.map +0 -1
  24. package/dist/chunk-XCLUB2CY.js.map +0 -1
  25. package/dist/standalone-mode-FY3XVQQK.js.map +0 -1
  26. /package/dist/{chunk-3IVO2MSZ.js.map → chunk-4WVH2ITA.js.map} +0 -0
  27. /package/dist/{chunk-XQ2AWNHQ.js.map → chunk-CHVOXCDV.js.map} +0 -0
  28. /package/dist/{chunk-S3KKQ4IC.js.map → chunk-QKL53YZS.js.map} +0 -0
  29. /package/dist/{ci-serve-T33FCQVT.js.map → ci-serve-BU7NDT7O.js.map} +0 -0
package/README.md CHANGED
@@ -9,7 +9,7 @@ lives in NIP-34 Nostr events and the objects live on Arweave.
9
9
  - **Writes are paid** — pushing objects and publishing events spends from a
10
10
  payment channel funded by your wallet. Writes are permanent and non-refundable.
11
11
  - **One node URL is the whole network configuration** — `rig` embeds its own
12
- payment client (`@toon-protocol/client` 3.x) built from your seed phrase and
12
+ payment client (`@toon-protocol/client` 4.x) built from your seed phrase and
13
13
  pays the TOON connector you name with `rig entry <url>`. The node describes
14
14
  itself on `GET /ilp`; there is nothing to discover (see
15
15
  [Pointing at a node](#pointing-at-a-node)).
@@ -238,20 +238,27 @@ estimate — nothing is executed or paid).
238
238
 
239
239
  ## Money: fund, balance, channels
240
240
 
241
- Paid commands spend from a **payment channel** — an on-chain-collateralized channel
242
- between your wallet and a payment peer, from which each write draws an off-chain
243
- claim. You rarely touch this directly:
241
+ Paid commands spend from a **payment channel**: an x402 `batch-settlement`
242
+ channel between your wallet and the node, collateralized on chain, on which each
243
+ write signs an off-chain voucher naming the running total (connector ADR 0075;
244
+ there is no nonce). You rarely touch this directly:
244
245
 
245
246
  - **`rig fund`** tops up your wallet (devnet faucet, or prints addresses to fund
246
247
  externally). Both the native coin (gas) and USDC (collateral) are needed.
247
248
  - **`rig balance`** shows what your wallet holds across chains.
248
249
  - **Channels open lazily.** The first paid write opens a channel from your funded
249
- wallet and records it under `~/.toon-client` (`rig-channels.json`); later writes
250
- resume the same channel instead of opening a new one.
251
- - **`rig channel list`** (free) shows current holdings and nonce watermarks.
252
- **`rig channel open`** pre-opens one (or `--deposit`s more collateral) using the
253
- exact lazy-open path; **`rig channel close`** starts the settlement challenge
254
- window; **`rig channel settle`** releases collateral once the window elapses.
250
+ wallet (on Solana the node sponsors the open: USDC for the deposit, no SOL) and
251
+ records it under `~/.toon-client` (`rig-channels-x402.json`); later writes
252
+ resume the same channel, and a write it can no longer cover opens a fresh one.
253
+ - **`rig channel list`** (free) shows current holdings and the running totals
254
+ signed. **`rig channel open`** pre-opens one (or `--deposit`s more collateral,
255
+ Base only) using the exact lazy-open path; **`rig channel close`** starts the
256
+ exit window; **`rig channel settle`** releases collateral once the window
257
+ elapses.
258
+ - **Upgrading from a client 3.x rig** (4.7.x and earlier): its toon-channel
259
+ files (`rig-channels.json`, `channels.json`) are never read or written, only
260
+ named. A current connector refuses those claims; take their deposits back
261
+ with the rig that opened them.
255
262
 
256
263
  The `open`/`close`/`settle` lifecycle commands are on-chain wallet operations (gas +
257
264
  collateral movement), so they follow the same confirm idiom as `push`: they print
@@ -637,7 +644,7 @@ network — there is no announce to discover (kind:10032 was removed by connecto
637
644
  ADR 0046) and no topology to negotiate.
638
645
 
639
646
  ```sh
640
- curl -s https://proxy.relay.devnet.toonprotocol.dev/ilp | jq '{ilpAddresses, routes, settlements: [.settlements[].chain]}'
647
+ curl -s https://proxy.relay.devnet.toonprotocol.dev/ilp | jq '{ilpAddresses, routes, batchSettlements: [.batchSettlements[].network]}'
641
648
  ```
642
649
 
643
650
  What rig derives from it, and the knob that overrides each:
@@ -648,16 +655,17 @@ What rig derives from it, and the knob that overrides each:
648
655
  | where events go | the node's first own address it also prices | `TOON_CLIENT_PUBLISH_DESTINATION` / `publishDestination` |
649
656
  | where git objects go | the node's first priced `*.store` route, else `*.ario` | `TOON_CLIENT_STORE_DESTINATION` / `storeDestination`; `rig name --via` per invocation |
650
657
  | a store on another node | — | `storeConnectorUrl` (that node holds its own channel: uploads ride a second client and watermark) or `storeSealTo` (same channel, sealed to that node) |
651
- | settlement chain | the first chain in `settlements[]` your identity holds a key for | `TOON_CLIENT_CHAIN` / `chain` — `evm` or `solana` (`evm:8453` is read by its family) |
658
+ | settlement chain | the first chain in `batchSettlements[]` your identity holds a key for (a phrase holds both: name one) | `TOON_CLIENT_CHAIN` / `chain`: `evm` or `solana` (`evm:8453` is read by its family) |
652
659
  | chain RPC | the client's devnet preset | `TOON_CLIENT_RPC_URL` / `rpcUrl` / `chainRpcUrls[<chain>]` — **set this for a mainnet node** |
653
660
  | who pays | the phrase's key on that chain | `RIG_SOLANA_KEY_FILE` / `solanaKeyFile` (a `solana-keygen` JSON), `RIG_EVM_PRIVATE_KEY` / `evmPrivateKey` |
654
- | claim watermark file | `<TOON_CLIENT_HOME>/channels.json` | `TOON_CLIENT_CHANNEL_STORE` / `channelStorePath` — one file per channel writer, or two processes replay each other's nonces |
655
- | first-open collateral | the client default | `TOON_CLIENT_DEPOSIT` / `deposit` (base units) |
661
+ | x402 channel store | `<TOON_CLIENT_HOME>/channels-x402.json` (+ `.peers.json`, each channel's config: keep both) | `TOON_CLIENT_CHANNEL_STORE` / `channelStorePath`: one file per channel writer, or two processes race each other's running totals. A client 3.x store is refused |
662
+ | channel collateral | the client default (Solana: at least the node's `minDeposit`) | `TOON_CLIENT_DEPOSIT` / `deposit` (base units) |
663
+ | Base deposit facilitator | none on Solana; the client's own on EVM | `TOON_CLIENT_FACILITATOR_URL` / `facilitatorUrl` |
656
664
  | carriage | `auto` (HTTP unless the node requires BTP) | `TOON_CLIENT_TRANSPORT` / `transport` |
657
665
 
658
666
  **Prices are schedules.** A route publishes a base price and, when it meters by
659
667
  size, a `pricePerKib` (connector ADR 0065). `rig push`'s fee table prices every
660
- object by its sealed size with the same rule the client puts on the claim, so
668
+ object by its sealed size with the same rule the client puts on the voucher, so
661
669
  the estimate equals what is paid.
662
670
 
663
671
  **Who pays and who signs are independent.** The repo owner is the phrase's
@@ -666,13 +674,11 @@ Its EVM wallet is that same key (the client's `keyDerivation: 'legacy'`, rig's
666
674
  default, so channels an existing identity funded are still its own); set
667
675
  `TOON_CLIENT_KEY_DERIVATION=standard` for a fresh identity you want to import
668
676
  into MetaMask. The payer key may be a different key entirely: the connector
669
- attributes payment from the claim, never from the event.
677
+ attributes payment from the voucher, never from the event.
670
678
 
671
679
  ### Devnet
672
680
 
673
- The shared devnet's nodes and the faucet (authoritative:
674
- [toon-meta `docs/deployment.md`](https://github.com/toon-protocol/toon-meta/blob/main/docs/deployment.md);
675
- the node URLs are also `@toon-protocol/client`'s `DEVNET` preset):
681
+ The shared devnet's nodes and the faucet (the node URLs are also `@toon-protocol/client`'s `DEVNET` preset):
676
682
 
677
683
  | What | URL |
678
684
  |---|---|
@@ -746,13 +752,13 @@ phrase itself is never printed and never written to git config or any repo file.
746
752
  ## What a paid command does first
747
753
 
748
754
  Every standalone paid command bootstraps the same way: resolve the identity,
749
- read the connector's `GET /ilp`, open or adopt the payment channel with that
750
- node, then sign one claim per packet. Adoption is free — a channel's id derives
751
- from its participants, so a node you have paid before is found again without a
752
- transaction. Money state (the claim watermark, the channel map) lives under
753
- `TOON_CLIENT_HOME` and is never cached away.
755
+ read the connector's `GET /ilp`, open or resume the x402 channel with that
756
+ node, then sign one voucher per packet. Resuming is free: the client keeps each
757
+ channel's config in its store, so a node you have paid before is found again
758
+ without a transaction. Money state (the voucher watermark, the channel configs,
759
+ the channel map) lives under `TOON_CLIENT_HOME` and is never cached away.
754
760
 
755
- Two rig processes on one identity race the claim nonce, so a per-identity lock
761
+ Two rig processes on one identity race the running total, so a per-identity lock
756
762
  refuses the second (`RIG_STANDALONE=1` skips only the check for a same-identity
757
763
  `toon-clientd`; the lock stays). The `rig` bin exits as soon as a command
758
764
  finishes and stdio is flushed.
@@ -52,13 +52,13 @@ import {
52
52
  updateRef,
53
53
  writeGitObjects,
54
54
  writeToonConfig
55
- } from "./chunk-3IVO2MSZ.js";
55
+ } from "./chunk-4WVH2ITA.js";
56
56
  import {
57
57
  PREFERRED_GATEWAY,
58
58
  mirrorGatewaysFor,
59
59
  readGateways,
60
60
  shaResolverFor
61
- } from "./chunk-XQ2AWNHQ.js";
61
+ } from "./chunk-CHVOXCDV.js";
62
62
  import {
63
63
  COMMENT_KIND,
64
64
  DEFAULT_KEYSTORE_PASSWORD,
@@ -82,18 +82,19 @@ import {
82
82
  readClientConfigFile,
83
83
  resolveAccountIndex,
84
84
  resolveIdentity
85
- } from "./chunk-S3KKQ4IC.js";
85
+ } from "./chunk-QKL53YZS.js";
86
86
  import {
87
87
  ChannelMapStore,
88
88
  channelStatus,
89
+ legacyChannelFiles,
89
90
  resolveChannelPaths,
90
91
  resolveConflictingPath
91
- } from "./chunk-XCLUB2CY.js";
92
+ } from "./chunk-LMZSAFAB.js";
92
93
  import {
93
94
  RIG_STANDALONE_ENV,
94
95
  deriveNostrKeyFromMnemonic,
95
96
  uploadChargeFor
96
- } from "./chunk-U5A7MHBP.js";
97
+ } from "./chunk-7VIVQHRG.js";
97
98
 
98
99
  // src/cli/render.ts
99
100
  function describeAnnouncementDiff(diff) {
@@ -310,7 +311,7 @@ function loadPaidSession(deps, relayUrl) {
310
311
  });
311
312
  }
312
313
  var defaultLoadStandalone = async (options) => {
313
- const mod = await import("./standalone-mode-FY3XVQQK.js");
314
+ const mod = await import("./standalone-mode-AT4S5EZG.js");
314
315
  return mod.createStandaloneContext(options);
315
316
  };
316
317
  function identityReport(ctx) {
@@ -1027,7 +1028,10 @@ async function readWalletBounded(read, timeoutMs) {
1027
1028
  if (timeoutMs <= 0) return settled;
1028
1029
  let timer;
1029
1030
  const guard = new Promise((_resolve, reject) => {
1030
- timer = setTimeout(() => reject(new WalletReadTimeoutError(timeoutMs)), timeoutMs);
1031
+ timer = setTimeout(
1032
+ () => reject(new WalletReadTimeoutError(timeoutMs)),
1033
+ timeoutMs
1034
+ );
1031
1035
  });
1032
1036
  settled.catch(() => void 0);
1033
1037
  try {
@@ -1087,7 +1091,6 @@ async function runBalance(args, deps) {
1087
1091
  status: channelStatus(watermark),
1088
1092
  depositTotal: deposited ?? null,
1089
1093
  cumulativeClaimed: claimed ?? null,
1090
- nonce: watermark?.nonce ?? null,
1091
1094
  available,
1092
1095
  overdrawn
1093
1096
  };
@@ -1423,39 +1426,44 @@ async function runChain(args, deps) {
1423
1426
 
1424
1427
  // src/cli/channel.ts
1425
1428
  import { parseArgs as parseArgs4 } from "util";
1429
+ import { dirname as dirname2 } from "path";
1426
1430
  var CHANNEL_USAGE = `Usage: rig channel <subcommand>
1427
1431
 
1428
- Manage the payment channels paid rig commands hold with relay/store peers.
1429
- Paid commands open a channel lazily on first use and record it under
1430
- TOON_CLIENT_HOME (default ~/.toon-client, rig-channels.json), so later
1431
- invocations resume the same channel instead of opening a new one per run.
1432
+ Manage the x402 payment channels paid rig commands pay a node from. Every
1433
+ paid packet carries a voucher naming the channel's running total (client 4.x).
1434
+ Paid commands open a channel on first use and resume it from the client's
1435
+ store (TOON_CLIENT_HOME, default ~/.toon-client, channels-x402.json);
1436
+ \`rig channel open\` also records it in rig-channels-x402.json there.
1432
1437
 
1433
1438
  Subcommands:
1434
1439
  list [--json] show recorded channels \u2014 peer, chain, channel id, deposit,
1435
- cumulative claimed, status. Free: reads local state only.
1440
+ cumulative signed, status. Free: reads local state only.
1436
1441
 
1437
1442
  open [--peer <ilp-destination>] [--deposit <base-units>]
1438
- explicitly open the payment channel for a peer \u2014 the SAME
1439
- path paid commands use lazily: resumes the recorded live
1440
- channel if one exists (no on-chain spend), else opens and
1441
- records a fresh one (locks the peer-negotiated initial
1442
- deposit on-chain). --peer is the ILP destination to anchor
1443
- to (default: the configured destination, e.g. the devnet
1444
- apex); --deposit adds that much extra collateral after the
1445
- open/resume. On-chain: asks for confirmation (--yes skips).
1443
+ explicitly open the channel paid commands draw on: resumes
1444
+ the client's open channel if there is one (no on-chain
1445
+ spend), else opens and records a fresh one, locking the
1446
+ configured deposit (TOON_CLIENT_DEPOSIT) from your wallet.
1447
+ On Solana the node sponsors the open (USDC, no SOL).
1448
+ --peer is the ILP destination to record it under (default:
1449
+ the configured publish destination); --deposit adds that
1450
+ much extra collateral after the open/resume (Base only: a
1451
+ Solana channel is replaced when it runs out, never topped
1452
+ up). Asks for confirmation (--yes skips).
1446
1453
 
1447
1454
  close <channelId>
1448
- close a recorded channel \u2014 an on-chain tx that starts the
1449
- settlement challenge window (the peer's settlementTimeout).
1450
- The channel stops paying immediately; the remaining
1455
+ close a recorded channel: an on-chain tx (Solana
1456
+ request_close, Base timed withdrawal) that starts its exit
1457
+ window, and that of every other channel still open with the
1458
+ node. The channel stops paying immediately; the remaining
1451
1459
  collateral stays locked until \`rig channel settle\` after
1452
1460
  the window elapses. Asks for confirmation (--yes skips).
1453
1461
 
1454
1462
  settle <channelId>
1455
- settle a closed channel once its challenge window elapsed \u2014
1456
- an on-chain tx that releases the remaining collateral back
1457
- to your wallet. Refused (without spending gas) while the
1458
- window is still open. Asks for confirmation (--yes skips).
1463
+ settle a closed channel once its exit window elapsed: an
1464
+ on-chain tx that releases the remaining collateral back to
1465
+ your wallet. Nothing is sent while the window is still
1466
+ open. Asks for confirmation (--yes skips).
1459
1467
 
1460
1468
  Common options: --json (machine-readable envelopes; without --yes lifecycle
1461
1469
  commands emit a pure plan and execute nothing), --yes, -h/--help.`;
@@ -1511,10 +1519,17 @@ function runChannelList(args, deps) {
1511
1519
  const store = new ChannelMapStore(paths);
1512
1520
  const records = store.list();
1513
1521
  const rows = records.map((record) => describeChannel(record, store));
1522
+ const legacy = legacyChannelFiles(dirname2(paths.mapPath));
1523
+ const legacyNote = `client 3.x toon-channel state not shown: ${legacy.join(", ")} (its deposits are left to the rig that opened them: \`npm i -g @toon-protocol/rig@4.7.0\`, then \`rig channel close\`)`;
1514
1524
  if (json) {
1515
- io.emitJson({ command: "channel list", channels: rows });
1525
+ io.emitJson({
1526
+ command: "channel list",
1527
+ channels: rows,
1528
+ ...legacy.length > 0 ? { legacyStateFiles: legacy } : {}
1529
+ });
1516
1530
  return 0;
1517
1531
  }
1532
+ if (legacy.length > 0) io.err(`rig: ${legacyNote}`);
1518
1533
  if (rows.length === 0) {
1519
1534
  io.out(
1520
1535
  "No payment channels recorded \u2014 paid rig commands (push, issue, comment, pr) record the channel they open on first use, and `rig channel open` records an explicit one."
@@ -1546,14 +1561,13 @@ function describeChannel(record, store) {
1546
1561
  tokenNetwork: record.tokenNetwork,
1547
1562
  depositTotal: record.depositTotal ?? null,
1548
1563
  cumulativeClaimed: watermark?.cumulativeAmount ?? null,
1549
- nonce: watermark?.nonce ?? null,
1550
1564
  status: channelStatus(watermark),
1551
1565
  openedAt: record.openedAt,
1552
1566
  lastUsedAt: record.lastUsedAt
1553
1567
  };
1554
1568
  }
1555
1569
  function renderChannel(row) {
1556
- const claimed = row.cumulativeClaimed === null ? "unknown (no local claim state)" : `${row.cumulativeClaimed} base units (nonce ${row.nonce})`;
1570
+ const claimed = row.cumulativeClaimed === null ? "unknown (no local voucher state)" : `${row.cumulativeClaimed} base units signed`;
1557
1571
  return [
1558
1572
  `channel ${row.channelId} [${row.status}]`,
1559
1573
  ` peer ${row.destination} (${row.peerId})`,
@@ -1701,7 +1715,9 @@ async function runChannelOpen(args, deps) {
1701
1715
  io.out(
1702
1716
  outcome.resumed ? `Resumed recorded channel ${outcome.channelId} \u2014 no on-chain open was needed.` : `Opened channel ${outcome.channelId}${outcome.chain ? ` on ${outcome.chain}` : ""} and recorded it for reuse.`
1703
1717
  );
1704
- io.out(` peer ${outcome.destination}${outcome.peerId ? ` (${outcome.peerId})` : ""}`);
1718
+ io.out(
1719
+ ` peer ${outcome.destination}${outcome.peerId ? ` (${outcome.peerId})` : ""}`
1720
+ );
1705
1721
  if (outcome.depositAdded) {
1706
1722
  io.out(
1707
1723
  ` deposited +${outcome.depositAdded} base units` + (outcome.depositTxHash ? ` (tx ${outcome.depositTxHash})` : "")
@@ -1795,7 +1811,9 @@ async function runChannelWithdrawStep(args, deps, step) {
1795
1811
  if (!json) {
1796
1812
  const claimed = watermark?.cumulativeAmount;
1797
1813
  io.out(`Channel ${step} plan:`);
1798
- io.out(` channel ${channelId} [${channelStatus(watermark, nowSec)}]`);
1814
+ io.out(
1815
+ ` channel ${channelId} [${channelStatus(watermark, nowSec)}]`
1816
+ );
1799
1817
  io.out(` peer ${record.destination} (${record.peerId})`);
1800
1818
  io.out(` chain ${record.chain}`);
1801
1819
  io.out(
@@ -2475,7 +2493,7 @@ async function runCi(args, deps) {
2475
2493
  case "status":
2476
2494
  return runCiStatus(rest, deps);
2477
2495
  case "serve":
2478
- return (await import("./ci-serve-T33FCQVT.js")).runCiServe(rest, deps);
2496
+ return (await import("./ci-serve-BU7NDT7O.js")).runCiServe(rest, deps);
2479
2497
  case "--help":
2480
2498
  case "-h":
2481
2499
  case "help":
@@ -2494,7 +2512,7 @@ async function runCi(args, deps) {
2494
2512
 
2495
2513
  // src/cli/clone.ts
2496
2514
  import { mkdtemp, mkdir, readdir, rename, rm, rmdir } from "fs/promises";
2497
- import { basename, dirname as dirname2, join as join3, resolve } from "path";
2515
+ import { basename, dirname as dirname3, join as join3, resolve } from "path";
2498
2516
  import { parseArgs as parseArgs6 } from "util";
2499
2517
  var CLONE_USAGE = `Usage: rig clone <relay-url> <owner>/<repo-id> [dir] [options]
2500
2518
 
@@ -2674,7 +2692,7 @@ async function runClone(args, deps) {
2674
2692
  `warning: unreachable object ${sha} (tx ${txId}) could not be downloaded \u2014 not needed by any ref, continuing`
2675
2693
  );
2676
2694
  }
2677
- const parent = dirname2(dest);
2695
+ const parent = dirname3(dest);
2678
2696
  await mkdir(parent, { recursive: true });
2679
2697
  tempDir = await mkdtemp(join3(parent, `.${basename(dest)}.rig-clone-`));
2680
2698
  await runGit(tempDir, [
@@ -4021,7 +4039,7 @@ async function warnIfNotMaintainer(deps, args) {
4021
4039
  // src/cli/entry.ts
4022
4040
  import { mkdirSync as mkdirSync3, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "fs";
4023
4041
  import { homedir as homedir3 } from "os";
4024
- import { dirname as dirname3, join as join4 } from "path";
4042
+ import { dirname as dirname4, join as join4 } from "path";
4025
4043
  import { parseArgs as parseArgs9 } from "util";
4026
4044
  var ENTRY_USAGE = `Usage: rig entry [<connector-url> | clear] [options]
4027
4045
 
@@ -4060,7 +4078,7 @@ function readEntryConfig(configPath) {
4060
4078
  }
4061
4079
  }
4062
4080
  function writeEntryConfig(configPath, file) {
4063
- mkdirSync3(dirname3(configPath), { recursive: true });
4081
+ mkdirSync3(dirname4(configPath), { recursive: true });
4064
4082
  writeFileSync3(configPath, `${JSON.stringify(file, null, 2)}
4065
4083
  `, "utf8");
4066
4084
  }
@@ -4850,7 +4868,7 @@ var runGitPassthrough = (argv, options = {}) => {
4850
4868
 
4851
4869
  // src/cli/identity-cmd.ts
4852
4870
  import { existsSync, mkdirSync as mkdirSync4 } from "fs";
4853
- import { dirname as dirname4 } from "path";
4871
+ import { dirname as dirname5 } from "path";
4854
4872
  import { createInterface } from "readline/promises";
4855
4873
  import { parseArgs as parseArgs12 } from "util";
4856
4874
  async function loadKeyOps() {
@@ -4902,7 +4920,7 @@ async function prepareKeystoreTarget(input) {
4902
4920
  const envPassword = input.env["TOON_CLIENT_KEYSTORE_PASSWORD"]?.trim() || void 0;
4903
4921
  const autoPassword = envPassword === void 0;
4904
4922
  const password = envPassword ?? DEFAULT_KEYSTORE_PASSWORD;
4905
- mkdirSync4(dirname4(keystorePath), { recursive: true });
4923
+ mkdirSync4(dirname5(keystorePath), { recursive: true });
4906
4924
  return { keystorePath, password, autoPassword, existing, keyOps };
4907
4925
  }
4908
4926
  function readAccountIndex(env) {
@@ -7988,4 +8006,4 @@ export {
7988
8006
  rigVersion,
7989
8007
  dispatch
7990
8008
  };
7991
- //# sourceMappingURL=chunk-J6Y3U645.js.map
8009
+ //# sourceMappingURL=chunk-2TG4YHEC.js.map