@dvmkit/dvm-cli 0.4.1 → 0.4.2

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.
@@ -117,12 +117,12 @@ import {
117
117
  maxAdvertisedMicro,
118
118
  normalizeCreditEndpoint,
119
119
  withinAdvertisedTolerance
120
- } from "./chunk-VY277ROG.js";
120
+ } from "./chunk-DRO3JP42.js";
121
121
  import {
122
122
  connectedTempoAccount,
123
123
  tempoBalanceCheckHint,
124
124
  tempoTokenReference
125
- } from "./chunk-24VB7FR7.js";
125
+ } from "./chunk-JVQFBKDX.js";
126
126
  import {
127
127
  DvmError,
128
128
  IDENTITIES_FILE,
@@ -134,7 +134,7 @@ import {
134
134
  resolveRpcHttpTransportOptions,
135
135
  resolveRpcOverride,
136
136
  schnorr
137
- } from "./chunk-SKKZ4OAA.js";
137
+ } from "./chunk-2TKOJBBB.js";
138
138
  import {
139
139
  privateKeyToAccount
140
140
  } from "./chunk-EVQERRCP.js";
@@ -169,7 +169,7 @@ import {
169
169
  __toESM
170
170
  } from "./chunk-IYHTITNZ.js";
171
171
 
172
- // node_modules/@dvmkit/sdk/dist/chunk-TQWGQCNV.js
172
+ // node_modules/@dvmkit/sdk/dist/chunk-Z3EHBW2G.js
173
173
  var import_proper_lockfile = __toESM(require_proper_lockfile(), 1);
174
174
  import { existsSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "fs";
175
175
  import { AsyncLocalStorage } from "async_hooks";
@@ -4010,7 +4010,7 @@ async function charge3(store, channelId, amount) {
4010
4010
  return chargeSessionChannel({ store, channelId, amount });
4011
4011
  }
4012
4012
 
4013
- // node_modules/@dvmkit/sdk/dist/chunk-TQWGQCNV.js
4013
+ // node_modules/@dvmkit/sdk/dist/chunk-Z3EHBW2G.js
4014
4014
  var import_proper_lockfile2 = __toESM(require_proper_lockfile(), 1);
4015
4015
  var DEFAULT_LOCK_STALE_MS = 3e4;
4016
4016
  var DEFAULT_LOCK_RETRIES = 30;
@@ -4533,7 +4533,7 @@ function loadFile() {
4533
4533
  values: parsed.values,
4534
4534
  associations: parsed.associations,
4535
4535
  // Tolerated rather than required, unlike its two siblings: every file
4536
- // written before internal-review lacks the key, and failing closed on it would
4536
+ // written before lacks the key, and failing closed on it would
4537
4537
  // read as a corrupt journal on a store that is perfectly intact.
4538
4538
  charges: Array.isArray(parsed.charges) ? parsed.charges.filter(isPendingTempoCharge) : []
4539
4539
  };
@@ -5179,7 +5179,7 @@ function foreignChannelExitError(association, controller, account) {
5179
5179
  `The connected Tempo key ${account.address} is not the wallet recorded for the channel with ${association.endpoint} \u2014 that channel was opened by ${controller.payer}.`,
5180
5180
  // `--force` is live here and only here among the exit refusals: reaching
5181
5181
  // this error took a connected `account`, so the reconnect is a replacement
5182
- // the import refuses without it (internal-review).
5182
+ // the import refuses without it.
5183
5183
  `Nothing was signed or broadcast, and the channel's collateral is untouched \u2014 only ${controller.payer} can move it. Reconnect that exact key (${tempoKeyImportRoutes({ replacingConnectedKey: true })}) and retry, or run '${abandon}' to retire the local record. Retiring it discards this machine's only descriptor for that channel, so restoring the key afterwards would no longer recover the collateral; the record blocks nothing while it stands.`,
5184
5184
  {
5185
5185
  anchor: "tempo_channel_payer_mismatch",
@@ -14,7 +14,7 @@ import {
14
14
  msatsToUsdc,
15
15
  usdcToMsats,
16
16
  withinAdvertisedTolerance
17
- } from "./chunk-VY277ROG.js";
17
+ } from "./chunk-DRO3JP42.js";
18
18
  import {
19
19
  DvmError,
20
20
  X402_CHANNELS_FILE,
@@ -28,7 +28,7 @@ import {
28
28
  resolveRpcHttpTransportOptions,
29
29
  resolveRpcOverride,
30
30
  updateConfig
31
- } from "./chunk-SKKZ4OAA.js";
31
+ } from "./chunk-2TKOJBBB.js";
32
32
  import {
33
33
  __export,
34
34
  __toESM
@@ -327,7 +327,7 @@ function isOptionalRecord(value) {
327
327
  return value === void 0 || value === null || isRecord(value);
328
328
  }
329
329
 
330
- // node_modules/@dvmkit/sdk/dist/chunk-BIP6G74V.js
330
+ // node_modules/@dvmkit/sdk/dist/chunk-YRDA7EWN.js
331
331
  var import_proper_lockfile = __toESM(require_proper_lockfile(), 1);
332
332
  import { AsyncLocalStorage } from "async_hooks";
333
333
  import { existsSync, readFileSync, renameSync, writeFileSync } from "fs";
@@ -465,7 +465,7 @@ function x402PendingFundingJson(entry) {
465
465
  amount_micro: entry.amountMicro,
466
466
  // What the ERC-3009 authorization can still pull, which is the figure a
467
467
  // `--force` retirement is really deciding about: a deposit's authorized
468
- // value can exceed the amount funded (internal-review), so `amount_micro` alone
468
+ // value can exceed the amount funded, so `amount_micro` alone
469
469
  // understates it. Null on a voucher-only payload, which authorizes no
470
470
  // deposit at all.
471
471
  deposit_micro: entry.depositMicro ?? null,
@@ -518,7 +518,7 @@ var DvmX402ChannelStorage = class {
518
518
  /**
519
519
  * Upstream's ordinary write. Its chain-recovery paths are authoritative and
520
520
  * clear the unreconciled stamp. DVM-response paths scope this same write to
521
- * persist their weaker provenance atomically with the balance (internal-review).
521
+ * persist their weaker provenance atomically with the balance.
522
522
  */
523
523
  set(key, context) {
524
524
  return fromSynchronousStore(() => {
@@ -541,7 +541,7 @@ var DvmX402ChannelStorage = class {
541
541
  }
542
542
  /**
543
543
  * Write a context whose `balance` carries a deposit this machine added on its
544
- * own authority, and stamp the record as unreconciled (internal-review).
544
+ * own authority, and stamp the record as unreconciled.
545
545
  *
546
546
  * Separate from {@link set} because the two differ in exactly one thing that
547
547
  * matters later: where the figure came from. Nothing else about the write
@@ -554,7 +554,7 @@ var DvmX402ChannelStorage = class {
554
554
  }
555
555
  /**
556
556
  * Write a context whose `balance` is byte-for-byte the one already stored,
557
- * leaving the unreconciled stamp exactly as it found it (internal-review).
557
+ * leaving the unreconciled stamp exactly as it found it.
558
558
  *
559
559
  * The replay acknowledgement's idempotent second pass is what needs this: it
560
560
  * restates a cumulative base without adding to the balance, so it observes
@@ -569,7 +569,7 @@ var DvmX402ChannelStorage = class {
569
569
  }
570
570
  /**
571
571
  * Seed upstream's cooperative-refund probe without changing the acknowledged
572
- * base. Records written before internal-review have only the upstream context, so
572
+ * base. Records written before have only the upstream context, so
573
573
  * `hold` adopts its acknowledged value rather than losing that base to the
574
574
  * chain floor this seeds. The seed itself is a `channels()` read, so it is
575
575
  * `observed` and settles the unreconciled question like any other.
@@ -880,7 +880,7 @@ function loadFile() {
880
880
  channels: raw.channels,
881
881
  pending: raw.pending,
882
882
  // Tolerated rather than required, unlike its two siblings: every file
883
- // written before internal-review lacks the key, and failing closed on it would
883
+ // written before lacks the key, and failing closed on it would
884
884
  // read as a corrupt journal on a store that is perfectly intact.
885
885
  exact: Array.isArray(raw.exact) ? raw.exact : []
886
886
  };
@@ -1026,7 +1026,7 @@ async function getX402Balance(wallet) {
1026
1026
  usdc: Number(balance) / 1e6,
1027
1027
  network: w.network,
1028
1028
  tokenAddress: spec.usdc,
1029
- // internal-review: redacted here rather than at a display surface, so the clear
1029
+ // redacted here rather than at a display surface, so the clear
1030
1030
  // endpoint never leaves this function on the success path either.
1031
1031
  rpcUrlRedacted: rpcUrl ? redactUrl(rpcUrl) : void 0,
1032
1032
  rpcSource
@@ -8903,7 +8903,7 @@ function isRecord2(value) {
8903
8903
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
8904
8904
  }
8905
8905
 
8906
- // node_modules/@dvmkit/sdk/dist/chunk-BIFLRKMO.js
8906
+ // node_modules/@dvmkit/sdk/dist/chunk-2KGG5ORW.js
8907
8907
  async function verifyX402Payment(paymentHeader, config, requiredUsdcMicro, resource, btcUsdRate, exactVersions = { v1: true, v2: true }) {
8908
8908
  return callerLoggers.x402.span(
8909
8909
  "x402.verify_payment",