@dvmkit/sdk 0.7.0-rc.6 → 0.7.0-rc.8

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 CHANGED
@@ -110,7 +110,7 @@ This metadata describes the retention schedule. The SDK does not automatically d
110
110
 
111
111
  Use the Node.js release in `.nvmrc` (Node 22). Install with `npm ci`, then run the same gate CI runs with `npm run verify`. The gate checks repository metadata in the checkout, copies only tracked and unignored source into an isolated directory, installs its locked dependencies, and runs lint, build, typecheck (including the release scripts under `checkJs`), unit and database tests, API, package, consumer, packed-artifact safety, and release checks there. The clean source tree owns the complete build and test pass, so verification never depends on the checkout's `node_modules` or pre-existing `dist` and does not repeat the full suite; after every check passes, its verified `dist` replaces the checkout's build output for release packaging.
112
112
 
113
- `DATABASE_URL` is optional locally. Without it the database suite is skipped rather than passed, and `verify` says so in its summary, because a skipped suite verified nothing and must not be reported as green. Point `DATABASE_URL` at a scratch Postgres to run it, and pass `npm run verify -- --require-database` to make a missing one a failure, which is what CI does.
113
+ `DATABASE_URL` is optional locally. Without it the database suite is skipped rather than passed, and `verify` says so in its summary, because a skipped suite verified nothing and must not be reported as green. Point `DATABASE_URL` at a scratch Postgres to run it, and pass `npm run verify -- --require-database` to make a missing one a failure, which is what CI does. That mode also requires the local test mint started by `node scripts/start-cashu-mint.mjs`.
114
114
 
115
115
  The public surface is exactly `@dvmkit/sdk`, `@dvmkit/sdk/server`, and `@dvmkit/sdk/testing`.
116
116
 
@@ -150,6 +150,10 @@ The same values are accepted as `--endpoint <url>` and `--job-token <hex>`. Thes
150
150
 
151
151
  If an upgrade broke something for you, an [API compatibility report](https://github.com/dvmkit/sdk/issues/new/choose) is the most useful thing you can send us. It tells us which parts of the published surface people actually build on, which no test of ours can.
152
152
 
153
+ ## Job identity field
154
+
155
+ Every 200 or 202 response to `POST /v1/job`, `POST /v1/request-resume/:id` and `POST /v1/request-result/:id` carries a `DVM-Job-Identity-V1` response-head field whose value is the body's `job_id`, byte for byte, so a router or caller can learn which job a response names without reading a body of any size. No other status carries it. The value grammar is `^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$`; a server whose job ID falls outside it sends no field. A reader takes the value from `Headers.get`, trims nothing and never folds case: a repeated field (joined with `", "`), an empty value or any other character is invalid, and a trailer of the same name is never identity. The portable contract and its classification vectors are in `protocol-fixtures/job-identity-v1.json`. Hosting control's status reports `jobIdentityHeader: "v1"` when the deployment emits the field.
156
+
153
157
  ## Per-job costs
154
158
 
155
159
  A handler can declare what a job cost **you**, the builder, to serve — a vendor API call, a GPU minute, a per-request licence fee — and the SDK reports it to the platform alongside what the caller paid, so your dashboard can state a margin instead of guessing at one.
@@ -171,7 +175,36 @@ Three things worth knowing:
171
175
  - **Declare the cost where you incur it, including inside `ctx.step`.** The step cache carries those declarations with the result and applies them once when a replay skips the body.
172
176
  - **Every terminal job reports its declared cost.** A paid completion carries the cost on its revenue report. A free completion, failure, or cancellation sends a separate cost-only report and does not create revenue.
173
177
 
174
- The cost is yours, never the caller's: it is recorded separately from what the caller paid and is never netted against it. Both report shapes use the same durable outbox. Cost-only reports are keyed on the job id and revisioned, so retries and cross-machine updates converge on the latest cumulative value. With the Postgres job store, boot-time and periodic reconciliation enqueue any terminal cost revision that a process exited before reporting.
178
+ The cost is yours, never the caller's: it is recorded separately from what the caller paid and is never netted against it. Both report shapes use the same durable outbox. Cost-only reports are keyed on the job id and revisioned, so retries and cross-machine updates converge on the latest cumulative value. With the Postgres job store, boot-time and periodic reconciliation enqueue any terminal cost revision that a process exited before reporting. Other job stores get no reconciliation: their cost-only report is durable only once the outbox insert commits, so an exit between the terminal save and that insert loses it.
179
+
180
+ ## Rate cards
181
+
182
+ A priced capability can tell callers what it charges per unit, so an agent can explain the price before it asks for a quote. Declare `rates` next to `price` or `onQuote`, in the flat shape or on an entry in `capabilities`:
183
+
184
+ ```ts
185
+ capabilities: {
186
+ synthesise: {
187
+ onQuote: { schema, handler: quoteBySize },
188
+ rates: [
189
+ { label: "balanced", amount: "0.00015", currency: "USD", per: "character" },
190
+ { label: "expressive", amount: "0.00030", currency: "USD", per: "character" },
191
+ ],
192
+ onJob,
193
+ },
194
+ },
195
+ ```
196
+
197
+ `/v1/info` publishes the list as `capabilities.<name>.pricing.rates`, exactly as you wrote it: same order, same strings. A capability without `rates` publishes nothing extra. For a quoted capability the rates describe how your quote is computed; the SDK does not compute or check quotes against them, so keep the two in step yourself.
198
+
199
+ The server refuses to start, naming the capability and the entry, when a rate card breaks one of these limits:
200
+
201
+ - 1 to 5 entries, on a capability with `price` or `onQuote`. A free capability cannot declare rates.
202
+ - `amount` is decimal dollars as a string, above zero and at most 12 characters: `"0.00015"`, not `0.00015` or `"$0.00015"`.
203
+ - `currency` is `"USD"`.
204
+ - `per` names the unit (`"character"`, `"episode"`, `"GB per day stored"`) and `label`, which is optional, names a tier. Each is 1 to 24 characters with no leading or trailing spaces.
205
+ - No other keys.
206
+
207
+ The [portable fixture](./protocol-fixtures/capability-rates.json) carries the same limits and the accepted and refused examples, for clients that parse the field.
175
208
 
176
209
  ## Contributing
177
210
 
@@ -286,10 +286,20 @@ var PostgresJobStore = class {
286
286
  CREATE INDEX IF NOT EXISTS idx_jobs_retention
287
287
  ON jobs (last_activity_at, id)
288
288
  WHERE redacted_at IS NULL AND status IN ('completed', 'failed', 'cancelled');
289
- CREATE INDEX IF NOT EXISTS idx_jobs_pending_cost_report
289
+ -- Terminal cost recovery runs at boot and every 30s on each machine.
290
+ -- Indexing only rows whose latest revision is not yet enqueued keeps each
291
+ -- pass proportional to that backlog; marking a row drops it from the
292
+ -- index. listUnreportedTerminalCosts' WHERE clause must imply this
293
+ -- predicate or the planner falls back to scanning terminal history.
294
+ DROP INDEX IF EXISTS idx_jobs_pending_cost_report;
295
+ CREATE INDEX IF NOT EXISTS idx_jobs_unreported_terminal_cost
290
296
  ON jobs (dvm_id, id)
291
297
  WHERE cost_revision IS NOT NULL
292
- AND status IN ('completed', 'failed', 'cancelled');
298
+ AND (cost_reported_revision IS NULL OR cost_reported_revision < cost_revision)
299
+ AND (
300
+ status IN ('failed', 'cancelled')
301
+ OR (status = 'completed' AND paid_msats = 0)
302
+ );
293
303
  -- the idempotent-replay lookup. payment_tx_hash carries the
294
304
  -- caller's X-Cashu-Request-Id on the accumulator path, so a retried paid
295
305
  -- submit finds the job its payment already created.
@@ -689,7 +699,8 @@ var PostgresJobStore = class {
689
699
  }
690
700
  /**
691
701
  * Read terminal zero-revenue jobs whose latest declared-cost revision has
692
- * not yet reached the durable reporter outbox.
702
+ * not yet reached the durable reporter outbox. Keep the filter in step with
703
+ * `idx_jobs_unreported_terminal_cost`, which bounds each pass to the backlog.
693
704
  */
694
705
  async listUnreportedTerminalCosts(args) {
695
706
  const { rows } = await this.pool.query(
@@ -397,10 +397,20 @@ var DEFAULT_LOCK_RETRY_INTERVAL_MS = 1e3;
397
397
  var WALLET_VERSION = 9;
398
398
  var RECENT_SPENDS_CAP = 10;
399
399
  var DEFAULT_AGENT_MINT_URL = "https://mint.coinos.io";
400
+ var MAX_STORABLE_JOB_ID_LENGTH = 512;
401
+ function isStorableJobId(value) {
402
+ return typeof value === "string" && value.length > 0 && value.length <= MAX_STORABLE_JOB_ID_LENGTH && // eslint-disable-next-line no-control-regex -- control characters are what this rejects
403
+ !/[\u0000-\u001f\u007f-\u009f]/u.test(value);
404
+ }
400
405
  function loadWalletConfiguredMints() {
401
406
  return loadAgentWallet()?.mints ?? [];
402
407
  }
403
408
  function loadAgentWallet() {
409
+ const wallet = parseAgentWallet();
410
+ if (wallet) normalizeAcceptedUnresolved(wallet);
411
+ return wallet;
412
+ }
413
+ function parseAgentWallet() {
404
414
  if (!existsSync4(WALLET_FILE)) return null;
405
415
  const raw = readFileSync4(WALLET_FILE, "utf-8");
406
416
  let parsed;
@@ -481,6 +491,7 @@ function loadAgentWallet() {
481
491
  return parsed;
482
492
  }
483
493
  function saveAgentWallet(wallet) {
494
+ assertAcceptedUnresolvedStorable(wallet);
484
495
  ensureConfigDir();
485
496
  const tmp = `${WALLET_FILE}.tmp`;
486
497
  const data = JSON.stringify(wallet, null, 2) + "\n";
@@ -649,6 +660,62 @@ function migrateV8ToV9(parsed) {
649
660
  created_at: typeof parsed.created_at === "string" ? parsed.created_at : (/* @__PURE__ */ new Date()).toISOString()
650
661
  };
651
662
  }
663
+ var ACCEPTED_UNRESOLVED_KINDS = /* @__PURE__ */ new Set([
664
+ "identity_mismatch",
665
+ "body_unreadable",
666
+ "router_identity_conflict"
667
+ ]);
668
+ var OBSERVED_JOB_ID_FIELDS = ["header_job_id", "body_job_id", "accepted_job_id"];
669
+ var PLACEHOLDER_KIND = "body_unreadable";
670
+ var PLACEHOLDER_OBSERVED_AT = (/* @__PURE__ */ new Date(0)).toISOString();
671
+ function assertAcceptedUnresolvedStorable(wallet) {
672
+ const entries = wallet.pending_submissions;
673
+ if (!Array.isArray(entries)) return;
674
+ for (const entry of entries) {
675
+ const record = entry?.accepted_unresolved;
676
+ if (record === void 0 || isStorableAcceptedUnresolved(record)) continue;
677
+ throw new DvmError(
678
+ "accepted_unresolved_invalid",
679
+ `Refusing to save pending submission ${String(entry?.request_id)}: its accepted_unresolved record is outside the stored contract.`,
680
+ "Use one of the three kinds, an ISO-8601 observed_at, and job IDs and ambiguity_id that pass isStorableJobId; omit an observed ID that does not. The wallet file was not changed."
681
+ );
682
+ }
683
+ }
684
+ function isStorableAcceptedUnresolved(value) {
685
+ if (!isPlainRecord(value)) return false;
686
+ return ACCEPTED_UNRESOLVED_KINDS.has(value.kind) && isIsoTimestamp(value.observed_at) && isStorableJobId(value.ambiguity_id) && OBSERVED_JOB_ID_FIELDS.every((field) => value[field] === void 0 || isStorableJobId(value[field]));
687
+ }
688
+ function normalizeAcceptedUnresolved(wallet) {
689
+ const entries = wallet.pending_submissions;
690
+ if (!Array.isArray(entries)) return;
691
+ for (const entry of entries) {
692
+ if (!entry || entry.accepted_unresolved === void 0) continue;
693
+ const stored = entry.accepted_unresolved;
694
+ if (isStorableAcceptedUnresolved(stored)) continue;
695
+ const record = isPlainRecord(stored) ? { ...stored } : {};
696
+ if (!ACCEPTED_UNRESOLVED_KINDS.has(record.kind)) record.kind = PLACEHOLDER_KIND;
697
+ if (!isIsoTimestamp(record.observed_at)) record.observed_at = PLACEHOLDER_OBSERVED_AT;
698
+ if (!isStorableJobId(record.ambiguity_id)) {
699
+ record.ambiguity_id = isStorableJobId(entry.request_id) ? entry.request_id : "missing-ambiguity";
700
+ }
701
+ for (const field of OBSERVED_JOB_ID_FIELDS) {
702
+ if (record[field] !== void 0 && !isStorableJobId(record[field])) delete record[field];
703
+ }
704
+ entry.accepted_unresolved = record;
705
+ }
706
+ }
707
+ function isPlainRecord(value) {
708
+ return typeof value === "object" && value !== null && !Array.isArray(value);
709
+ }
710
+ var ISO_TIMESTAMP = /^(\d{4})-(\d{2})-(\d{2})T([01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d{1,9})?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;
711
+ function isIsoTimestamp(value) {
712
+ if (typeof value !== "string") return false;
713
+ const match = ISO_TIMESTAMP.exec(value);
714
+ if (!match) return false;
715
+ const [year, month, day] = [Number(match[1]), Number(match[2]), Number(match[3])];
716
+ const date = new Date(Date.UTC(year, month - 1, day));
717
+ return date.getUTCFullYear() === year && date.getUTCMonth() === month - 1 && date.getUTCDate() === day;
718
+ }
652
719
  function isCounterMap(value) {
653
720
  if (typeof value !== "object" || value === null) return false;
654
721
  for (const inner of Object.values(value)) {
@@ -1255,6 +1322,17 @@ function buildAdminAuthHeader(args) {
1255
1322
  };
1256
1323
  }
1257
1324
 
1325
+ // src/lib/job-identity-header.ts
1326
+ var JOB_IDENTITY_HEADER = "dvm-job-identity-v1";
1327
+ var JOB_IDENTITY_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/;
1328
+ function isJobIdentityValue(value) {
1329
+ return typeof value === "string" && JOB_IDENTITY_PATTERN.test(value);
1330
+ }
1331
+ function parseJobIdentityHeader(value) {
1332
+ if (value === null) return { kind: "absent" };
1333
+ return isJobIdentityValue(value) ? { kind: "valid", jobId: value } : { kind: "invalid" };
1334
+ }
1335
+
1258
1336
  // src/lib/builder-identity.ts
1259
1337
  import {
1260
1338
  chmodSync as chmodSync4,
@@ -1808,6 +1886,7 @@ export {
1808
1886
  WALLET_VERSION,
1809
1887
  RECENT_SPENDS_CAP,
1810
1888
  DEFAULT_AGENT_MINT_URL,
1889
+ isStorableJobId,
1811
1890
  loadWalletConfiguredMints,
1812
1891
  loadAgentWallet,
1813
1892
  saveAgentWallet,
@@ -1835,6 +1914,9 @@ export {
1835
1914
  ADMIN_STATE_UNAVAILABLE,
1836
1915
  buildAdminChallenge,
1837
1916
  buildAdminAuthHeader,
1917
+ JOB_IDENTITY_HEADER,
1918
+ isJobIdentityValue,
1919
+ parseJobIdentityHeader,
1838
1920
  generateIdentity,
1839
1921
  loadIdentitySecret,
1840
1922
  writeIdentity,
@@ -25,7 +25,7 @@ import {
25
25
  } from "./chunk-FOJKZ4E7.js";
26
26
  import {
27
27
  PostgresJobStore
28
- } from "./chunk-JUEEUV5X.js";
28
+ } from "./chunk-KB7MEWBE.js";
29
29
  import {
30
30
  parseStoreValue
31
31
  } from "./chunk-YG7G4DPZ.js";
@@ -65,6 +65,7 @@ import {
65
65
  ADMIN_AUTH_NONCE_TTL_SECONDS,
66
66
  ADMIN_STATE_UNAVAILABLE,
67
67
  IMPLICIT_CREDIT_TTL_MS,
68
+ JOB_IDENTITY_HEADER,
68
69
  TEMPO_SESSION_UPDATED_REASON,
69
70
  X402_BATCH_CHANNEL_ABI,
70
71
  attestedDvmIdentity,
@@ -74,6 +75,7 @@ import {
74
75
  createMonotonicClock,
75
76
  formatStaleness,
76
77
  getWallet,
78
+ isJobIdentityValue,
77
79
  isPublicRequestId,
78
80
  isX402SettlementReconciliationReason,
79
81
  parseTraceparent,
@@ -83,7 +85,7 @@ import {
83
85
  signReceipt,
84
86
  toLockPubkey,
85
87
  verifyChallenge
86
- } from "./chunk-QTH7CIA3.js";
88
+ } from "./chunk-XO5EUHCW.js";
87
89
  import {
88
90
  X402_BATCH_SETTLEMENT_SCHEME,
89
91
  X402_DEFAULT_FACILITATOR,
@@ -11769,7 +11771,8 @@ var HostingControl = class {
11769
11771
  pendingAdmissionCount: Number(pending.rows[0].pending),
11770
11772
  pendingAdmissions: inFlight.rows.map((row) => ({ admissionId: row.id, workId: row.job_id })),
11771
11773
  unresolvedAdmissionCount: Number(pending.rows[0].unresolved),
11772
- unresolvedAdmissions: unresolved.rows.map((row) => ({ admissionId: row.id, jobId: row.job_id }))
11774
+ unresolvedAdmissions: unresolved.rows.map((row) => ({ admissionId: row.id, jobId: row.job_id })),
11775
+ jobIdentityHeader: "v1"
11773
11776
  };
11774
11777
  }
11775
11778
  };
@@ -19829,6 +19832,7 @@ var DVMServer = class {
19829
19832
  `createDVMServer: this DVM prices in ${JSON.stringify(this.pricingCurrency)} (DVMConfig.currency) but its fx fetcher only quotes [${fxCurrencies.join(", ")}]. Wire a fetcher that carries it \u2014 createFxFetcher({ currencies: [..., ${JSON.stringify(this.pricingCurrency)}] }) \u2014 or price in one of the above.`
19830
19833
  );
19831
19834
  }
19835
+ assertCapabilityRates(descriptor.capabilities);
19832
19836
  if (opts.mintHealthTracker) {
19833
19837
  this.mintHealthTracker = opts.mintHealthTracker;
19834
19838
  this.ownsMintHealthTracker = false;
@@ -20941,17 +20945,20 @@ var DVMServer = class {
20941
20945
  entry.input_schema = toJSONSchema(cap.input, { io: "input" });
20942
20946
  }
20943
20947
  if (cap.example !== void 0) entry.example = cap.example;
20948
+ let pricing;
20944
20949
  if (cap.onQuote?.schema) {
20945
20950
  const qs = cap.onQuote.schema;
20946
- entry.pricing = {
20951
+ pricing = {
20947
20952
  quote: {
20948
20953
  schema: isZodSchema(qs) ? toJSONSchema(qs, { io: "input" }) : qs
20949
20954
  }
20950
20955
  };
20951
20956
  } else {
20952
20957
  const max = this.jobManager.currentPricingMax(name);
20953
- if (max) entry.pricing = { max };
20958
+ if (max) pricing = { max };
20954
20959
  }
20960
+ if (cap.rates) pricing = { ...pricing, rates: cap.rates };
20961
+ if (pricing) entry.pricing = pricing;
20955
20962
  out[name] = entry;
20956
20963
  }
20957
20964
  return out;
@@ -22491,7 +22498,7 @@ function buildSubmitResponse(c, job, jobToken, contentFields) {
22491
22498
  else if (job.status === "completed") res.status = "completed";
22492
22499
  Object.assign(res, terminalResponseFields(job), contentFields);
22493
22500
  removeUnavailableContent(res);
22494
- return c.json(res, job.status === "completed" ? 200 : 202);
22501
+ return c.json(res, job.status === "completed" ? 200 : 202, jobIdentityHeaders(job.id));
22495
22502
  }
22496
22503
  function requestRecoveryStore(store) {
22497
22504
  return store.findJobByRequestId && store.claimRequestId && store.resumeRequestId && store.releaseRequestIdClaim ? store : void 0;
@@ -22557,7 +22564,10 @@ function buildRequestResultResponse(c, requestId, job, contentFields) {
22557
22564
  if (job.paymentTransactionHash) res.transaction_hash = job.paymentTransactionHash;
22558
22565
  Object.assign(res, terminalResponseFields(job), contentFields);
22559
22566
  removeUnavailableContent(res);
22560
- return c.json(res, isTerminal(job.status) ? 200 : 202);
22567
+ return c.json(res, isTerminal(job.status) ? 200 : 202, jobIdentityHeaders(job.id));
22568
+ }
22569
+ function jobIdentityHeaders(jobId) {
22570
+ return isJobIdentityValue(jobId) ? { [JOB_IDENTITY_HEADER]: jobId } : {};
22561
22571
  }
22562
22572
  function requestResultNotFound(c, requestId) {
22563
22573
  return c.json(
@@ -22748,6 +22758,55 @@ function validateMessageContent(type, content, devMode) {
22748
22758
  }
22749
22759
  return null;
22750
22760
  }
22761
+ var MAX_RATES = 5;
22762
+ var MAX_RATE_AMOUNT_LENGTH = 12;
22763
+ var MAX_RATE_TEXT_LENGTH = 24;
22764
+ var RATE_AMOUNT_RE = /^\d+(\.\d+)?$/;
22765
+ var RATE_KEYS = /* @__PURE__ */ new Set(["label", "amount", "currency", "per"]);
22766
+ function assertCapabilityRates(capabilities) {
22767
+ for (const [name, cap] of Object.entries(capabilities)) {
22768
+ if (cap.rates === void 0) continue;
22769
+ const refuse = (detail) => {
22770
+ throw new Error(`createDVMServer: capability ${JSON.stringify(name)}: ${detail}`);
22771
+ };
22772
+ const rates = cap.rates;
22773
+ if (!Array.isArray(rates) || rates.length === 0 || rates.length > MAX_RATES) {
22774
+ refuse(`rates must be an array of 1 to ${MAX_RATES} entries`);
22775
+ }
22776
+ if (cap.price === void 0 && cap.onQuote === void 0) {
22777
+ refuse("rates is declared on a free capability; set `price` or `onQuote`, or remove `rates`");
22778
+ }
22779
+ rates.forEach((rate, i) => {
22780
+ const at = `rates[${i}]`;
22781
+ if (typeof rate !== "object" || rate === null || Array.isArray(rate)) {
22782
+ refuse(`${at} must be an object with amount, currency and per`);
22783
+ }
22784
+ const entry = rate;
22785
+ for (const key of Object.keys(entry)) {
22786
+ if (!RATE_KEYS.has(key)) refuse(`${at}.${key} is not a rate field (label, amount, currency, per)`);
22787
+ }
22788
+ const amount = entry.amount;
22789
+ if (typeof amount !== "string" || amount.length > MAX_RATE_AMOUNT_LENGTH || !RATE_AMOUNT_RE.test(amount) || // Above zero without parsing to a float: some digit is non-zero.
22790
+ !/[1-9]/.test(amount)) {
22791
+ refuse(
22792
+ `${at}.amount must be a decimal dollar string above zero of at most ${MAX_RATE_AMOUNT_LENGTH} characters, like "0.00015" (got ${JSON.stringify(amount)})`
22793
+ );
22794
+ }
22795
+ if (entry.currency !== "USD") {
22796
+ refuse(`${at}.currency must be "USD" (got ${JSON.stringify(entry.currency)})`);
22797
+ }
22798
+ assertRateText(entry.per, `${at}.per`, refuse);
22799
+ if (entry.label !== void 0) assertRateText(entry.label, `${at}.label`, refuse);
22800
+ });
22801
+ }
22802
+ }
22803
+ function assertRateText(value, field, refuse) {
22804
+ if (typeof value !== "string" || value.length === 0 || value.length > MAX_RATE_TEXT_LENGTH || value.trim() !== value) {
22805
+ refuse(
22806
+ `${field} must be a string of 1 to ${MAX_RATE_TEXT_LENGTH} characters with no leading or trailing whitespace (got ${JSON.stringify(value)})`
22807
+ );
22808
+ }
22809
+ }
22751
22810
 
22752
22811
  // src/sdk/server/tempo-observer-health.ts
22753
22812
  var TEMPO_OBSERVER_HEALTH_REFRESH_TTL_MS = 60 * 1e3;
@@ -1,4 +1,4 @@
1
- import { b as JobStore, J as JobRecord } from './job-store-CopBPkne.js';
1
+ import { b as JobStore, J as JobRecord } from './job-store-DjgN2AOk.js';
2
2
 
3
3
  /** Authenticated caller metadata; omitted fields on older services mean unknown. */
4
4
  interface JobContentMetadata {
@@ -1,11 +1,11 @@
1
- import { f as LockPubkey, e as CheckMintHealthOptions, b as LightningBackend, A as AttestationPayload } from './lightning-backend-IYYVkad1.js';
2
- import { cf as HostingCleanupFence, cV as HostedIntent, ai as FundingMethod, o as PaymentMethod, bN as CreditLedgerLike, a4 as Message, _ as FundingReceipt, bP as CreditSnapshot, $ as JobReceipt, S as SDKJobContext, aw as StepCache, u as ResponseContent, P as PaymentContent, a0 as MessageType, bj as X402Receipt, aE as X402Config, bi as X402ExactVersionSupport, cW as X402SettlementIntent, aa as PaymentRequirementsV2, cX as HostedFundingReservation, c2 as CreditLedgerQuerier, cY as X402SettlementCursor, bR as X402SettlementStatus, cZ as X402SettlementWriteOff, bO as X402RefundSettlementGate, c_ as X402FacilitatorAuth, c$ as X402BatchSettlementConfig, cB as PostgresX402ChannelStorage, d0 as X402PayoutObserver, bL as HostedSettlementReportObligations, bm as CreditDepositPayload, br as MppxServer, ad as CashuMode, d1 as CreditDepositEnqueue, d2 as X402SettlementReconciliationReason, ap as PaymentRequirements, a2 as MppxCredential, bQ as DrawResult, cp as CreditLedgerError, a6 as ReceiptCredit, af as DrainReceiptEvent, a7 as DrainReceipt, K as KVStore, y as SignedRequestAudience, d3 as CreditDrawReleaseEnqueue, cz as JobCostReportPayload, cA as JobTerminalReportPayload, cD as RevenueSkippedNoRailPayload, Z as ZodLike, a as DVMDescriptor, bW as CreditInvoiceRecord, bX as InvoiceSettlement, cj as ClientCompatibilityGate, ch as ClientCompatibility, bv as PostgresTempoSessionStore, bu as PayoutReporter, R as ResolvedCreditConfig, g as CreditView } from './step-cache-MUyQVNFX.js';
1
+ import { f as LockPubkey, e as CheckMintHealthOptions, b as LightningBackend, A as AttestationPayload } from './lightning-backend-DeasHNOP.js';
2
+ import { cg as HostingCleanupFence, cW as HostedIntent, aj as FundingMethod, p as PaymentMethod, bO as CreditLedgerLike, a5 as Message, $ as FundingReceipt, bQ as CreditSnapshot, a0 as JobReceipt, S as SDKJobContext, ax as StepCache, v as ResponseContent, P as PaymentContent, a1 as MessageType, bk as X402Receipt, aF as X402Config, bj as X402ExactVersionSupport, cX as X402SettlementIntent, ab as PaymentRequirementsV2, cY as HostedFundingReservation, c3 as CreditLedgerQuerier, cZ as X402SettlementCursor, bS as X402SettlementStatus, c_ as X402SettlementWriteOff, bP as X402RefundSettlementGate, c$ as X402FacilitatorAuth, d0 as X402BatchSettlementConfig, cC as PostgresX402ChannelStorage, d1 as X402PayoutObserver, bM as HostedSettlementReportObligations, bn as CreditDepositPayload, bs as MppxServer, ae as CashuMode, d2 as CreditDepositEnqueue, d3 as X402SettlementReconciliationReason, aq as PaymentRequirements, a3 as MppxCredential, bR as DrawResult, cq as CreditLedgerError, a7 as ReceiptCredit, ag as DrainReceiptEvent, a8 as DrainReceipt, K as KVStore, z as SignedRequestAudience, d4 as CreditDrawReleaseEnqueue, cA as JobCostReportPayload, cB as JobTerminalReportPayload, cE as RevenueSkippedNoRailPayload, Z as ZodLike, a as DVMDescriptor, bX as CreditInvoiceRecord, bY as InvoiceSettlement, ck as ClientCompatibilityGate, ci as ClientCompatibility, bw as PostgresTempoSessionStore, bv as PayoutReporter, R as ResolvedCreditConfig, h as CreditView } from './step-cache-C9JRSFhM.js';
3
3
  import { ProofLike, SerializedDLEQ, Proof } from '@cashu/cashu-ts';
4
4
  import { Hono, Context } from 'hono';
5
5
  import { Pool } from 'pg';
6
- import { d as FxSourceFailure, b as FxRateSnapshot, F as FxFetcher } from './fx-DmuqWgL-.js';
6
+ import { d as FxSourceFailure, b as FxRateSnapshot, F as FxFetcher } from './fx-BvG2Wnjk.js';
7
7
  import { Store, Challenge } from 'mppx';
8
- import { T as TopUpCapUnenforcedReason, A as AppendOutgoingOptions, J as JobRecord, b as JobStore } from './job-store-CopBPkne.js';
8
+ import { T as TopUpCapUnenforcedReason, A as AppendOutgoingOptions, J as JobRecord, b as JobStore } from './job-store-DjgN2AOk.js';
9
9
  import { SettleResponse, SupportedResponse } from '@x402/core/types';
10
10
  import { Channel, AutoSettlementConfig } from '@x402/evm/batch-settlement/server';
11
11
  import { FacilitatorClient } from '@x402/core/server';
@@ -417,6 +417,8 @@ interface HostingControlStatus {
417
417
  admissionId: string;
418
418
  jobId: string;
419
419
  }[];
420
+ /** Version of the job-identity response-head field this deployment emits. */
421
+ jobIdentityHeader: "v1";
420
422
  }
421
423
 
422
424
  interface PromptResolver {
@@ -1,4 +1,4 @@
1
- import { C as Currency } from './step-cache-MUyQVNFX.js';
1
+ import { C as Currency } from './step-cache-C9JRSFhM.js';
2
2
 
3
3
  /**
4
4
  * Quote-time FX snapshot. `rates` maps configured lowercase currency codes to
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { C as Currency, Z as ZodLike, D as DVMConfig, a as DVMDescriptor } from './step-cache-MUyQVNFX.js';
2
- export { A as ApprovalContent, b as ArtifactContent, c as CancelContent, d as CanonicalEnvelope, e as CreateSignedRequestVerifierOpts, f as CreditConfig, g as CreditView, h as DEFAULT_CREDIT_MAX, i as DEFAULT_CREDIT_MIN, j as DEFAULT_CREDIT_TTL_SECONDS, k as DEFAULT_JOB_RETENTION_DAYS, l as DVMRouteContext, I as IncomingMessage, m as InputType, n as InvalidCurrencyError, J as JobCost, K as KVStore, L as Logger, P as PaymentContent, o as PaymentMethod, p as PriceValue, q as ProgressContent, r as PromptOpts, Q as QuoteConfig, s as QuoteContext, t as QuoteResult, R as ResolvedCreditConfig, u as ResponseContent, S as SDKJobContext, v as SDKPaymentRequestOpts, w as SIGNED_REQUEST_AUTH_ID, x as SIGNED_REQUEST_STATEMENT_VERSION, y as SignedRequestAudience, z as SignedRequestDomain, B as SignedRequestError, E as SignedRequestFailure, F as SignedRequestReplayStore, G as SignedRequestSignOpts, H as SignedRequestStatementHeader, M as SignedRequestVerifier, U as UnsupportedCurrencyError, N as createSignedRequestVerifier, O as isZodSchema, T as signedRequestStatementHeader, V as validateCurrency } from './step-cache-MUyQVNFX.js';
3
- export { C as CreateFxFetcherOpts, D as DEFAULT_FX_CURRENCIES, a as DEFAULT_FX_RATE_SOURCE, F as FxFetcher, b as FxRateSnapshot, c as FxRateUnavailableError, d as FxSourceFailure, e as FxSourceFailureCategory, P as PlatformFxSource, f as createFxFetcher, g as fxRateFor, r as resolveFxSourceFromEnv } from './fx-DmuqWgL-.js';
4
- export { I as InvalidFxRateError, f as fiatToSatsCeil, a as formatFiat, b as formatUsd, r as roundUsd, s as satsToFiat } from './usd-Bpt6Pmr3.js';
5
- export { J as JobRecord, a as JobStatus, b as JobStore } from './job-store-CopBPkne.js';
1
+ import { C as Currency, Z as ZodLike, D as DVMConfig, a as DVMDescriptor } from './step-cache-C9JRSFhM.js';
2
+ export { A as ApprovalContent, b as ArtifactContent, c as CancelContent, d as CanonicalEnvelope, e as CapabilityRate, f as CreateSignedRequestVerifierOpts, g as CreditConfig, h as CreditView, i as DEFAULT_CREDIT_MAX, j as DEFAULT_CREDIT_MIN, k as DEFAULT_CREDIT_TTL_SECONDS, l as DEFAULT_JOB_RETENTION_DAYS, m as DVMRouteContext, I as IncomingMessage, n as InputType, o as InvalidCurrencyError, J as JobCost, K as KVStore, L as Logger, P as PaymentContent, p as PaymentMethod, q as PriceValue, r as ProgressContent, s as PromptOpts, Q as QuoteConfig, t as QuoteContext, u as QuoteResult, R as ResolvedCreditConfig, v as ResponseContent, S as SDKJobContext, w as SDKPaymentRequestOpts, x as SIGNED_REQUEST_AUTH_ID, y as SIGNED_REQUEST_STATEMENT_VERSION, z as SignedRequestAudience, B as SignedRequestDomain, E as SignedRequestError, F as SignedRequestFailure, G as SignedRequestReplayStore, H as SignedRequestSignOpts, M as SignedRequestStatementHeader, N as SignedRequestVerifier, U as UnsupportedCurrencyError, O as createSignedRequestVerifier, T as isZodSchema, V as signedRequestStatementHeader, W as validateCurrency } from './step-cache-C9JRSFhM.js';
3
+ export { C as CreateFxFetcherOpts, D as DEFAULT_FX_CURRENCIES, a as DEFAULT_FX_RATE_SOURCE, F as FxFetcher, b as FxRateSnapshot, c as FxRateUnavailableError, d as FxSourceFailure, e as FxSourceFailureCategory, P as PlatformFxSource, f as createFxFetcher, g as fxRateFor, r as resolveFxSourceFromEnv } from './fx-BvG2Wnjk.js';
4
+ export { I as InvalidFxRateError, f as fiatToSatsCeil, a as formatFiat, b as formatUsd, r as roundUsd, s as satsToFiat } from './usd-DXDkHn_8.js';
5
+ export { J as JobRecord, a as JobStatus, b as JobStore } from './job-store-DjgN2AOk.js';
6
6
  export { P as PinnedFetch, S as SSRFError, a as SSRFGuardOpts, b as SSRFReason, c as SSRFResolver, d as assertSafeUrl, e as createPinnedFetch } from './ssrf-dMooihtY.js';
7
7
  export { z } from 'zod';
8
8
  import 'hono';
package/dist/index.js CHANGED
@@ -173,6 +173,7 @@ function buildCapabilityMap(config, currency) {
173
173
  state: config.state ?? {},
174
174
  price: config.price,
175
175
  onQuote: config.onQuote,
176
+ rates: snapshotRates(config.rates),
176
177
  onJob: config.onJob,
177
178
  onResponse: config.onResponse,
178
179
  onPayment: config.onPayment,
@@ -208,6 +209,7 @@ function buildExplicitCapabilities(capabilities, currency) {
208
209
  state: cap.state !== void 0 ? structuredClone(cap.state) : {},
209
210
  price: cap.price,
210
211
  onQuote: cap.onQuote,
212
+ rates: snapshotRates(cap.rates),
211
213
  onJob: cap.onJob,
212
214
  onResponse: cap.onResponse,
213
215
  onPayment: cap.onPayment,
@@ -220,7 +222,7 @@ function buildExplicitCapabilities(capabilities, currency) {
220
222
  return out;
221
223
  }
222
224
  function flatPerCapFieldsSet(config) {
223
- return config.input !== void 0 || config.example !== void 0 || config.state !== void 0 || config.price !== void 0 || config.onQuote !== void 0 || typeof config.onResponse === "function" || typeof config.onPayment === "function" || typeof config.onApproval === "function" || typeof config.onCancel === "function" || typeof config.onMessage === "function";
225
+ return config.input !== void 0 || config.example !== void 0 || config.state !== void 0 || config.price !== void 0 || config.onQuote !== void 0 || config.rates !== void 0 || typeof config.onResponse === "function" || typeof config.onPayment === "function" || typeof config.onApproval === "function" || typeof config.onCancel === "function" || typeof config.onMessage === "function";
224
226
  }
225
227
  function validateExampleAgainstInput(capName, input, example) {
226
228
  if (example === void 0) return;
@@ -264,6 +266,16 @@ function singleCapabilityEntry(capabilities) {
264
266
  if (keys.length !== 1) return void 0;
265
267
  return capabilities[keys[0]];
266
268
  }
269
+ function snapshotRates(rates) {
270
+ if (rates === void 0) return void 0;
271
+ const copy = structuredClone(rates);
272
+ if (Array.isArray(copy)) {
273
+ for (const entry of copy) {
274
+ if (typeof entry === "object" && entry !== null) Object.freeze(entry);
275
+ }
276
+ }
277
+ return Object.freeze(copy);
278
+ }
267
279
 
268
280
  // src/sdk/heartbeat.ts
269
281
  async function withProgressHeartbeat(opts, fn) {
@@ -1,16 +1,16 @@
1
- import { L as LightningTransactionListOptions, a as LightningTransactionSnapshot, b as LightningBackend, c as LightningPayment, d as LightningWalletInfo, C as CreatedInvoice, I as InvoiceStatus } from '../lightning-backend-IYYVkad1.js';
2
- export { A as AttestationPayload, B as BuilderIdentityKeypair, e as CheckMintHealthOptions, f as LockPubkey, M as MintAmountBounds, g as MintHealthCheckResult, h as amountBoundsVerdict, i as assertNutSupport, j as buildAttestation, k as canSwap, l as checkMintHealth, m as generateIdentity, n as hashCapabilities, o as loadIdentitySecret, p as meltAmountBounds, s as signAttestation, t as toLockPubkey, v as verifyAttestation, w as writeIdentity } from '../lightning-backend-IYYVkad1.js';
1
+ import { L as LightningTransactionListOptions, a as LightningTransactionSnapshot, b as LightningBackend, c as LightningPayment, d as LightningWalletInfo, C as CreatedInvoice, I as InvoiceStatus } from '../lightning-backend-DeasHNOP.js';
2
+ export { A as AttestationPayload, B as BuilderIdentityKeypair, e as CheckMintHealthOptions, f as LockPubkey, M as MintAmountBounds, g as MintHealthCheckResult, h as amountBoundsVerdict, i as assertNutSupport, j as buildAttestation, k as canSwap, l as checkMintHealth, m as generateIdentity, n as hashCapabilities, o as loadIdentitySecret, p as meltAmountBounds, s as signAttestation, t as toLockPubkey, v as verifyAttestation, w as writeIdentity } from '../lightning-backend-DeasHNOP.js';
3
3
  import { ProofLike, MeltQuoteBolt11Response, Proof, Wallet, MintQuoteBolt11Response, MintPreview, CounterSource, CounterRange, SerializedDLEQ, OutputData, OutputDataLike } from '@cashu/cashu-ts';
4
4
  export { g as getWallet } from '../wallet-Dwjs5n_M.js';
5
- import { W as JsonValue, z as SignedRequestDomain, H as SignedRequestStatementHeader, X as X402_BATCH_SETTLEMENT_SCHEME, Y as X402_EXACT_SCHEME, _ as FundingReceipt, $ as JobReceipt$1, a0 as MessageType, a1 as X402Version, a2 as MppxCredential, y as SignedRequestAudience, a3 as PaymentRequired, a4 as Message, a5 as MppxChallenge, a6 as ReceiptCredit, a7 as DrainReceipt, C as Currency, a8 as X402Wallet, a9 as PaymentRequirementsV1, aa as PaymentRequirementsV2, L as Logger$1, K as KVStore } from '../step-cache-MUyQVNFX.js';
6
- export { ab as BuildPaymentRequirementsOpts, ac as CapabilityDescriptor, ad as CashuMode, ae as CompleteContent, af as DrainReceiptEvent, ag as ExactEvmPayload, ah as ExactEvmPayloadAuthorization, ai as FundingMethod, aj as MessageFrom, ak as PaymentPayload, al as PaymentPayloadV1, am as PaymentPayloadV2, an as PaymentRequestContent, ao as PaymentRequiredV2, ap as PaymentRequirements, aq as PromptContent, ar as RAIL_REFUNDABLE, as as ReceiptOutcome, at as ReceiptPayment, au as ResourceInfo, av as SettleResponse, aw as StepCache, ax as StepRecord, ay as TextContent, az as UnsignedDrainReceipt, aA as UnsignedFundingReceipt, aB as UnsignedJobReceipt, aC as VerifyResponse, aD as WorkingContent, aE as X402Config, aF as X402ResponseBody, aG as X402SelfRelayRpcFailureReason, aH as X402_DEFAULT_NETWORK, aI as X402_V1_VERSION, aJ as X402_VERSION, aK as buildPaymentRequiredV2, aL as buildPaymentRequirements, aM as caip2ToX402Network, aN as canonicalRequestPath, aO as canonicaliseForSigning, aP as canonicalize, aQ as chainIdFromCaip2, aR as computeResultHash, aS as decodePayment, aT as decodePaymentRequiredHeader, aU as encodePayment, aV as encodePaymentRequiredHeader, aW as encodeSettleResponseHeader, aX as exactEvmAuthorization, aY as isArtifactMessage, aZ as isCancelMessage, a_ as isCompleteMessage, a$ as isDrainReceipt, b0 as isFundingReceipt, b1 as isPaymentRequestMessage, b2 as isPromptMessage, b3 as isSignedJobReceipt, b4 as isTextMessage, b5 as isWorkingMessage, b6 as paymentRequiredV2FromV1, b7 as signDrainReceipt, b8 as signFundingReceipt, b9 as signReceipt, ba as usdcContractByCaip2, bb as usdcContractFor, bc as usdcDomainNameFor, bd as usdcDomainVersionFor, be as verifyDrainReceipt, bf as verifyFundingReceipt, bg as verifyReceipt, bh as x402NetworkToCaip2 } from '../step-cache-MUyQVNFX.js';
5
+ import { X as JsonValue, B as SignedRequestDomain, M as SignedRequestStatementHeader, Y as X402_BATCH_SETTLEMENT_SCHEME, _ as X402_EXACT_SCHEME, $ as FundingReceipt, a0 as JobReceipt$1, a1 as MessageType, a2 as X402Version, a3 as MppxCredential, z as SignedRequestAudience, a4 as PaymentRequired, a5 as Message, a6 as MppxChallenge, a7 as ReceiptCredit, a8 as DrainReceipt, C as Currency, a9 as X402Wallet, aa as PaymentRequirementsV1, ab as PaymentRequirementsV2, L as Logger$1, K as KVStore } from '../step-cache-C9JRSFhM.js';
6
+ export { ac as BuildPaymentRequirementsOpts, ad as CapabilityDescriptor, ae as CashuMode, af as CompleteContent, ag as DrainReceiptEvent, ah as ExactEvmPayload, ai as ExactEvmPayloadAuthorization, aj as FundingMethod, ak as MessageFrom, al as PaymentPayload, am as PaymentPayloadV1, an as PaymentPayloadV2, ao as PaymentRequestContent, ap as PaymentRequiredV2, aq as PaymentRequirements, ar as PromptContent, as as RAIL_REFUNDABLE, at as ReceiptOutcome, au as ReceiptPayment, av as ResourceInfo, aw as SettleResponse, ax as StepCache, ay as StepRecord, az as TextContent, aA as UnsignedDrainReceipt, aB as UnsignedFundingReceipt, aC as UnsignedJobReceipt, aD as VerifyResponse, aE as WorkingContent, aF as X402Config, aG as X402ResponseBody, aH as X402SelfRelayRpcFailureReason, aI as X402_DEFAULT_NETWORK, aJ as X402_V1_VERSION, aK as X402_VERSION, aL as buildPaymentRequiredV2, aM as buildPaymentRequirements, aN as caip2ToX402Network, aO as canonicalRequestPath, aP as canonicaliseForSigning, aQ as canonicalize, aR as chainIdFromCaip2, aS as computeResultHash, aT as decodePayment, aU as decodePaymentRequiredHeader, aV as encodePayment, aW as encodePaymentRequiredHeader, aX as encodeSettleResponseHeader, aY as exactEvmAuthorization, aZ as isArtifactMessage, a_ as isCancelMessage, a$ as isCompleteMessage, b0 as isDrainReceipt, b1 as isFundingReceipt, b2 as isPaymentRequestMessage, b3 as isPromptMessage, b4 as isSignedJobReceipt, b5 as isTextMessage, b6 as isWorkingMessage, b7 as paymentRequiredV2FromV1, b8 as signDrainReceipt, b9 as signFundingReceipt, ba as signReceipt, bb as usdcContractByCaip2, bc as usdcContractFor, bd as usdcDomainNameFor, be as usdcDomainVersionFor, bf as verifyDrainReceipt, bg as verifyFundingReceipt, bh as verifyReceipt, bi as x402NetworkToCaip2 } from '../step-cache-C9JRSFhM.js';
7
7
  import { SimplePool } from 'nostr-tools/pool';
8
8
  import { Session } from 'mppx/tempo';
9
9
  import { Pool } from 'pg';
10
10
  import { PaymentRequired as PaymentRequired$1 } from '@x402/core/types';
11
11
  import { ClientChannelStorage, BatchSettlementClientContext, BatchSettlementEvmScheme } from '@x402/evm/batch-settlement/client';
12
- export { h as FX_CACHE_TTL_MS, i as FX_RETRY_COUNT, w as warmFxSnapshot } from '../fx-DmuqWgL-.js';
13
- export { c as InvalidUsdPriceError, p as parseUsdPrice } from '../usd-Bpt6Pmr3.js';
12
+ export { h as FX_CACHE_TTL_MS, i as FX_RETRY_COUNT, w as warmFxSnapshot } from '../fx-BvG2Wnjk.js';
13
+ export { c as InvalidUsdPriceError, p as parseUsdPrice } from '../usd-DXDkHn_8.js';
14
14
  import 'hono';
15
15
  import 'mppx';
16
16
  import '@x402/core/server';
@@ -1431,7 +1431,9 @@ interface V1InfoCapability {
1431
1431
  example?: Record<string, unknown>;
1432
1432
  /**
1433
1433
  * Pricing surface — `quote.schema` for dynamic-priced capabilities, `max`
1434
- * for static-priced ones. A free capability omits the block entirely: a
1434
+ * for static-priced ones, plus `rates` on either when the builder declared a
1435
+ * rate card. A free capability omits the block entirely (it cannot declare
1436
+ * rates): a
1435
1437
  * static `price` is a USD literal run through `parseUsdPrice`, which rejects
1436
1438
  * anything below `$0.0001`, so `max: { amount: 0 }` is unreachable.
1437
1439
  */
@@ -1443,6 +1445,17 @@ interface V1InfoCapability {
1443
1445
  quote?: {
1444
1446
  schema: Record<string, unknown>;
1445
1447
  };
1448
+ /**
1449
+ * Builder-declared rate card, published exactly as declared (order and
1450
+ * strings untouched). Present on static-priced and quoted capabilities
1451
+ * alike; for a quoted capability it describes how the quote is computed.
1452
+ */
1453
+ rates?: Array<{
1454
+ label?: string;
1455
+ amount: string;
1456
+ currency: "USD";
1457
+ per: string;
1458
+ }>;
1446
1459
  };
1447
1460
  }
1448
1461
  /**
@@ -3894,6 +3907,31 @@ declare function loadReceipt(jobId: string): StoredReceipt | null;
3894
3907
  /** True when a value is a URL-safe caller-generated request identifier. */
3895
3908
  declare function isPublicRequestId(value: unknown): value is string;
3896
3909
 
3910
+ /**
3911
+ * Response-head field stating the job ID of a `POST /v1/job`,
3912
+ * `POST /v1/request-resume/:id` or `POST /v1/request-result/:id` 200/202, so a
3913
+ * router or caller can learn the job's identity without reading the body. The
3914
+ * version is part of the name: a later version is a different field.
3915
+ */
3916
+ declare const JOB_IDENTITY_HEADER = "dvm-job-identity-v1";
3917
+ type JobIdentityHeaderResult = {
3918
+ kind: "absent";
3919
+ } | {
3920
+ kind: "valid";
3921
+ jobId: string;
3922
+ } | {
3923
+ kind: "invalid";
3924
+ };
3925
+ /** True when a value satisfies the `DVM-Job-Identity-V1` value grammar. */
3926
+ declare function isJobIdentityValue(value: unknown): value is string;
3927
+ /**
3928
+ * Classify the value `Headers.get(JOB_IDENTITY_HEADER)` returned. Fetch joins a
3929
+ * repeated field with `", "`, which falls outside the grammar, so a repeated
3930
+ * field is invalid even when every copy is equal. Nothing is trimmed and case
3931
+ * is never folded: the value must equal the body's `job_id` byte for byte.
3932
+ */
3933
+ declare function parseJobIdentityHeader(value: string | null): JobIdentityHeaderResult;
3934
+
3897
3935
  /** Header carrying a router-issued, DVM/job-bound feedback attribution claim. */
3898
3936
  declare const ROUTER_FEEDBACK_CLAIM_HEADER = "x-dvmkit-router-feedback-claim";
3899
3937
  /** Lifetime of a routed job's feedback attribution claim. */
@@ -4531,6 +4569,39 @@ interface PendingSubmissionContext {
4531
4569
  */
4532
4570
  credit_body?: Record<string, unknown>;
4533
4571
  }
4572
+ /**
4573
+ * Terminal state of a submission a DVM or router accepted whose job identity the
4574
+ * caller could not settle: the response-head job ID disagreed with the body's,
4575
+ * the body could not be read, or the router reported a conflicting accepted
4576
+ * job. The payment may have landed, so the entry must never be re-paid; the
4577
+ * job-ID strings are what was observed, kept for the operator's evidence.
4578
+ */
4579
+ interface PendingSubmissionAcceptedUnresolved {
4580
+ /**
4581
+ * Adding a kind requires a {@link WALLET_VERSION} bump: an older reader
4582
+ * cannot know what a new kind means, and a version it does not understand
4583
+ * is the wallet's existing refusal path.
4584
+ */
4585
+ kind: "identity_mismatch" | "body_unreadable" | "router_identity_conflict";
4586
+ /** ISO-8601 timestamp of the observation, like `created_at`. */
4587
+ observed_at: string;
4588
+ /** Must satisfy {@link isStorableJobId}. */
4589
+ header_job_id?: string;
4590
+ /** Must satisfy {@link isStorableJobId}. */
4591
+ body_job_id?: string;
4592
+ /** Must satisfy {@link isStorableJobId}. */
4593
+ accepted_job_id?: string;
4594
+ /** Request-scoped key of the caller's evidence record; must satisfy {@link isStorableJobId}. */
4595
+ ambiguity_id: string;
4596
+ }
4597
+ /**
4598
+ * True when a string may be stored in an `accepted_unresolved` record: non-empty,
4599
+ * at most {@link MAX_STORABLE_JOB_ID_LENGTH} UTF-16 code units, and free of
4600
+ * control characters — C0 (U+0000–U+001F, including TAB), DEL (U+007F) and C1
4601
+ * (U+0080–U+009F, which `Headers.get` yields for obs-text bytes 0x80–0x9F).
4602
+ * Writers omit or clean a value that fails, since the save refuses it.
4603
+ */
4604
+ declare function isStorableJobId(value: unknown): value is string;
4534
4605
  /** Persisted preview for a per-call swap whose mint outcome is not yet durable. */
4535
4606
  interface PendingSubmissionSwappingState {
4536
4607
  /** Keyset whose amount key unblinds the restored signatures. */
@@ -4665,6 +4736,11 @@ interface PendingSubmission {
4665
4736
  * `unreclaimable` on this flag alone.
4666
4737
  */
4667
4738
  reclaim_terminal?: boolean;
4739
+ /**
4740
+ * Set when the submission was accepted but its job identity could not be
4741
+ * settled. Its presence forbids paying for this request again.
4742
+ */
4743
+ accepted_unresolved?: PendingSubmissionAcceptedUnresolved;
4668
4744
  }
4669
4745
  /**
4670
4746
  * Persistent state for the agent wallet — the lock keypair plus the Cashu
@@ -6263,4 +6339,4 @@ declare class MemoryKVStore implements KVStore {
6263
6339
  list(prefix?: string): Promise<string[]>;
6264
6340
  }
6265
6341
 
6266
- export { ADMIN_STATE_UNAVAILABLE, AGENT_MNEMONIC_FILE, type AgentProof, type AgentRecentSpend, type AgentWallet, type AttestedDvmIdentity, BTC_RATE_FILE, BUDGET_FILE, type BudgetCaps, type BudgetCheckResult, type BudgetLedger, type BudgetLedgerEntry, type BudgetSpendBreakdown, type BudgetSpendKind, type BudgetWindow, type BuilderLockKeypair, CAPABILITY_NAME_RE, COINGECKO_SIMPLE_PRICE_URL, CONFIG_AUDIT_FILE, CONFIG_BACKUP_FILE, CONFIG_DIR, CONFIG_FILE, CONFIG_PINNED_FILE, CREDITS_FILE, CREDIT_DRAIN_RAILS, CREDIT_FUNDING_MODES, CREDIT_FUND_RAILS, type CachedBtcRate, type CancelOptions, type CliIdentityEntry, type CoinGeckoBtcSpot, type CoinGeckoSpot, type CompletedCreditHistoryPage, type CompletedCreditHistoryQuery, type CompletedCreditHistoryRecord, type CompletedRefundHistoryRecord, type ConfigDirModeResult, CreatedInvoice, type CreditDrainRail, type CreditFundRail, type CreditFundingMode, type CreditMenu, type CreditOpResult, type CreditTerms, type CreditWire, DEFAULT_AGENT_MINT_URL, DIAGNOSTIC_CATALOGUE_VERSION, DbTransport, type DeliveredResult, type DescribeOptions, type DiagnosticCapabilityAuthority, type DiagnosticIdentityAuthority, DrainReceipt, type DrainReceiptChecks, type DrainReceiptVerifyResult, type DrainWire, DvmError, DvmX402ChannelStorage, type ExpiredCreditLossHistoryRecord, FAVORITES_FILE, FEEDBACK_NUDGES_FILE, type FundValuation, FundingReceipt, type FundingReceiptChecks, type FundingReceiptVerifyResult, IDENTITIES_FILE, IDENTITIES_VERSION, type IdentitiesFile, InvoiceStatus, JOBS_FILE, type JobEnvelope, type JobPolicy, JobReceipt$1 as JobReceipt, type JobStatus, JsonValue, LightningBackend, type LightningFundingOffer, LightningPayment, LightningTransactionListOptions, LightningTransactionSnapshot, LightningWalletInfo, type LnAddressParts, MESSAGES_DIR, type MeltQuoteInfo, MemoryKVStore, Message, type MessagePollOptions, MessageType, type MnemonicValidationResult, MppxChallenge, MppxCredential, NwcBackend, type NwcConnection, NwcError, type NwcRequestOptions, type NwcTransaction, type OutboundMessage, PAIRINGS_DIR, PRIVKEY_HEX_RE, type PayInvoiceOutcome, type PayInvoiceReconcilingOptions, type PayInvoiceResult, type PayOutcome, type Payment, PaymentRequired, PaymentRequirementsV1, PaymentRequirementsV2, type PendingDrain, type PendingFunding, type PendingMelt, type PendingMint, type PendingMintMintingState, type PendingSubmission, type PendingSubmissionContext, type PendingTempoChargeFunding, type PendingX402ExactFunding, type PendingX402Funding, type PersistedOutputData, PersistentCounterSource, type ProviderInfo, type ProviderRef, type ProviderText, type Quote, RAIL_FLAGS, RECEIPTS_FILE, RECENT_SPENDS_CAP, RECOVERY_MNEMONIC_FILE, REQUEST_INTENTS_DIR, ROUTER_FEEDBACK_CLAIM_HEADER, ROUTER_FEEDBACK_CLAIM_TTL_MS, type Rail, type RailAsset, type RailFlag, type ReceiptChecks, ReceiptCredit, type ReceiptInvalidReason, type ReceiptKeypair, type ReceiptParseError, type ReceiptTrustAnchor, type ReceiptVerification, type ReceiptVerifyResult, type RecordSpendOptions, type RpcSource, SPANS_INSERTED_CHANNEL, STABLECOIN_FUND_RAILS, SUPPORTED_PROTOCOL_VERSION, type SelectError, type SendMessageOptions, type SpanProjectionResult, type SpanRow, type SpanTransport, SpanWriter, type StatusOptions, type StoredCredit, type StoredCreditX402Binding, type StoredFundingMenuSnapshot, type StoredImplicitCredit, type StoredReceipt, type StoredSiblingCredit, type StoredX402ChannelConfig, type StoredX402ChannelMetadata, type StreamOptions, type StreamResult, type SubmitOptions, type SwapSendReserve, TEMPO_CHAIN_ID, TEMPO_CHANNELS_FILE, TEMPO_CHARGE_PENDING_STALE_MS, TEMPO_MODERATO_CHAIN_ID, TEMPO_MODERATO_RPC, TEMPO_PATH_USD_MODERATO, TEMPO_SESSION_UPDATED_REASON, type TempoAccount, type TempoChannelAssociation, type TempoChannelController, type TempoChannelDescriptor, type TempoChannelExitResult, type TempoChannelReconcileResult, type TempoChannelStoreContext, type TempoCredentialAccount, type TempoNetwork, type TempoSessionClientResolver, type Transport, type JobReceipt as TransportJobReceipt, type TrustAnchorRead, type V1InfoCapability, type V1InfoResponse, type VerifyJobReceiptArgs, WALLET_FILE, WALLET_VERSION, type WalletCredentialConfig, type WalletInfo, type X402Asset, type X402Balance, type X402BatchPayment, type X402ChannelChainReport, type X402ChannelClient, type X402ChannelReconciliation, type X402ConnectedWallet, type X402CreditFlavour, type X402CreditInstrument, X402EnvValidationError, type X402Network, type X402RefundArgs, type X402RefundOutcome, type X402RepinnedWallet, type X402UnobservedBalanceProvenance, X402Version, type X402VoucherPendingState, X402Wallet, X402_BATCH_CHANNEL_ABI, X402_BATCH_SETTLEMENT_KEY, X402_BATCH_SETTLEMENT_SCHEME, X402_CHANNELS_FILE, X402_DEFAULT_FACILITATOR, X402_EXACT_AUTHORIZATION_TTL_SECONDS, X402_EXACT_SCHEME, X402_NETWORKS, X402_PENDING_STALE_MS, X402_RECEIVER_AUTHORIZER_KEY, X402_REFUSAL_TRANSACTION_DISCOVERY_WINDOW_MS, X402_RPC_URL_KEY, X402_SELF_RELAY_KEY, acknowledgeReplayedX402Payment, acknowledgeX402ChannelOwner, advanceTempoChannelExit, appendBudgetSpend, appendFundingReceipt, appendReceipt, applyImplicitReceiptCredit, applyReceiptCredit, applyRetryToPool, asProviderText, asProviderTextOpt, assertAgentMnemonicReplaceable, assertNoRivalX402Voucher, assertSupportedX402Network, assertTempoSessionChallengeWithinAsk, assertTempoSessionDepositWithinCap, assertTempoSessionVoucherWithinAsk, assertX402ChannelPayer, assertX402RequirementDescribesChannel, attestedDvmIdentity, authenticatedBuilderPubkey, backupSecretFile, bindCashuTokenToSubmissionContext, bindDiagnosticCapabilityAuthority, bindDiagnosticIdentityAuthority, breakdownSince, buildAdminAuthHeader, buildAdminChallenge, builderLockPath, canReplaceExpiredX402Deposit, capFor, cashuSubmissionBindingFingerprint, cashuSubmissionBindingFromContext, checkBudgetForLedger, checkMeltQuoteState, checkReceiptAttestation, clearCreditSelection, clearPendingDrain, clearPendingFunding, clearPendingTempoChargeFunding, clearPendingX402ExactFunding, clearPendingX402Funding, clearRefillRailUnavailable, generateIdentity as cliIdentityStoreGenerateIdentity, computeSmartDenominations, costAnchor, coveringMintsForSpend, createDiagnosticCapabilityAuthority, createMintQuoteRetryState, createMonotonicClock, createNoopLogger, createStdoutLogger, createTempoChannelStore, createTempoCloseCredential, createTempoCreditSession, createTempoSessionPaymentFetch, createX402BatchPayment, currentContext, deleteAgentMnemonic, deriveAgentMasterKeypair, deriveAgentRefundSubkey, deriveAgentRefundSubkeyPubkey, deriveBuilderLockKeypair, deriveBuilderLockPubkey, deriveIdentityFromPrivkey, derivePubkeyFromPrivkey, deriveReceiptKeypair, deriveReceiptSecret, deriveTempoAddress, dvmLocationIdentity, effectiveFundingMint, effectiveMints, ensureAddress, ensureConfigDir, ensureConfigSubdir, ensureProvisionalCredit, entryKind, extendDiagnosticIdentityAuthority, fetchBtcUsdRate, fetchCoinGeckoBtcUsd, fetchCoinGeckoSpot, fetchLnurlPayInvoice, fetchMeltQuote, findX402Channel, forgetCredit, formatStaleness, formatUsd, formatUsdcMicrounits, fundWireAmountMicro, fundingModeForTempoIntent, fundingModeForX402Flavour, generateAgentMnemonic, generateEphemeralReceiptKey, generateX402PrivateKey, getBalance, getBalanceByMint, getInfo, getInputFeesForProofs, getLastKnownBtcRate, getTempoUsdcBalance, getX402Balance, hashedCanonicalDvmId, identitiesFileExists, initLoggers, insertSpanBatch, isAbortError, isCreditFundRail, isCreditFundingMode, isPublicRequestId, isSignableExactRequirement, isStablecoinFundRail, isValidEvmPrivateKey, issueRouterFeedbackClaim, listCredits, listFundingMenuSnapshots, listImplicitCredits, listPendingFundings, listPendingX402Fundings, listPendingX402FundingsForChannel, listResumableTempoChargeFundings, listResumableX402ExactFundings, listResumableX402Fundings, listTempoChannelAssociations, listTransactions, listX402Channels, loadAgentWallet, loadBudgetLedger, loadCredit, loadCreditX402Binding, loadIdentities, loadImplicitCredits, loadPendingFunding, loadReceipt, loadReceipts, loadResumableTempoChargeFunding, loadResumableX402ExactFunding, loadResumableX402Funding, loadTempoChannelAssociation, loadTempoChannelAssociationByKey, loadTempoChannelController, loadTempoChannelEntry, loadWalletConfiguredMints, loggers, looksLikeMnemonic, lookupInvoice, makeInvoice, markCredit, markImplicitCreditLost, markRefillDrainNoticed, markRefillRailUnavailable, maxAdvertisedMicro, maxKeysetDenomination, microToSats, missingDleqRecoveryDiagnostic, mnemonicFingerprint, msatsToMicro, msatsToUsd, msatsToUsdCents, msatsToUsdc, normalizeCreditEndpoint, normalizeFeedbackEndpointHost, nwcDedupWindowMs, nwcTimeoutMs, offersTempoCreditCharge, offersTempoCreditFunding, offersTempoCreditSession, offersX402CreditChannel, offersX402CreditFlavour, offersX402CreditFunding, parseCreditMenu, parseCreditTerms, parseLnAddress, parseNwcUri, parseTraceparent, payInvoiceReconciling, pendingDrainById, pendingDrainFor, persistTempoOpenCredential, pinDimension, prepareP2PKMint, processX402BatchCorrection, processX402BatchResponse, processX402BatchResponseForWallet, projectDiagnosticFields, projectEventName, projectSpanRow, providerProseSources, providerTextToString, randomTraceId, readAgentMnemonic, readCompletedCreditHistory, readFundValuation, readX402ChannelGuardFacts, readX402ChannelOnChain, receiptPubkeyFromSecret, receiveToAgentWallet, reconcileRefusedX402Deposits, reconcileTempoChannelOnChain, recordBalanceResponse, recordCreditX402Instrument, recordDrainReceipts, recordFundResponse, recordFundingMenuSnapshot, recordPendingDrain, recordPendingFunding, recordPendingTempoChargeFunding, recordPendingX402ExactFunding, recordPendingX402Funding, recordRefusedDrawBalance, recordX402ChannelMetadata, redactUrl, redactUrlsInText, refundX402BatchChannel, rehydrateOutputData, repairConfigDirMode, resolveLnurlPayMetadataUrl, resolveRpcHttpTransportOptions, resolveRpcOverride, resolveTempoAsset, resolveTempoNetwork, resolveX402Asset, resolveX402ChannelRpc, restoreProofsFromOutputs, retirePendingX402Funding, retireTempoChannel, retireTempoChannelScope, retryMintQuoteOperation, saveAgentWallet, saveBudgetLedger, saveIdentities, selectProofsForSpend, serializeOutputData, setEmitter, settleDrainEvidence, sha256hex, shellQuoteArg, signDvmRequestData, signRequestData, signedRequestDomain, spendEntry, swapFeeForProofs, swapSendReserve, tempoAccountFromConfig, tempoBalanceCheckHint, tempoChallengeAmountMicro, tempoChannelControlledBy, tempoChargeCredentialSettleable, tempoCredentialAmountMicro, tempoCredentialValidBefore, tempoDescriptorController, tempoSessionAssociationByKey, tempoSessionChallenge, tempoSessionChallengeChannelScope, tempoSessionChallengeMicro, tempoSessionCredentialChannelScope, tempoSessionCredentialCumulativeMicro, tempoSessionCumulativeCapMicro, tempoSessionPriorCumulativeMicro, tempoTokenReference, toAgentProof, toCashuProofs, transportErrorCode, tryResolveTempoAsset, unsignRequestData, usdToMsats, usdcToMsats, validateAgentMnemonic, validateLnAddress, validateX402Env, verifyCanonicalSignedRequest, verifyChallenge, verifyDrainReceiptChain, verifyFundingReceiptChain, verifyJobReceipt, verifyRouterFeedbackClaim, walletExists, weakestReceiptVerdict, windowEnd, windowStart, withIdentitiesLock, withInitRetry, withNwcPool, withTempoChannelLock, withTraceContext, withWalletLock, withX402ChannelLock, withholdsTempoCreditSession, withinAdvertisedTolerance, writeAgentMnemonic, x402ChannelBalanceUnreconciledAt, x402ChannelControlledBy, x402ChannelReservation, x402CreditChannelNetworks, x402CreditExactNetworks, x402CreditFlavour, x402CreditFundingNetworks, x402ExactFundingDead, x402FlavourForInstrument, x402InstrumentForFlavour, x402NetworkByCaip2, x402NetworkBySlug, x402NetworkLabel, x402NetworkListForCopy, x402PendingBlockExpiresAt, x402PendingDepositExpiresAt, x402PendingFundingJson, x402PendingRetired, x402PendingStale, x402PendingUnsettled, x402RequiredFromError, x402ReservationRelease, x402SupportedNetworksHint, x402VoucherPendingState, x402WalletFromConfig };
6342
+ export { ADMIN_STATE_UNAVAILABLE, AGENT_MNEMONIC_FILE, type AgentProof, type AgentRecentSpend, type AgentWallet, type AttestedDvmIdentity, BTC_RATE_FILE, BUDGET_FILE, type BudgetCaps, type BudgetCheckResult, type BudgetLedger, type BudgetLedgerEntry, type BudgetSpendBreakdown, type BudgetSpendKind, type BudgetWindow, type BuilderLockKeypair, CAPABILITY_NAME_RE, COINGECKO_SIMPLE_PRICE_URL, CONFIG_AUDIT_FILE, CONFIG_BACKUP_FILE, CONFIG_DIR, CONFIG_FILE, CONFIG_PINNED_FILE, CREDITS_FILE, CREDIT_DRAIN_RAILS, CREDIT_FUNDING_MODES, CREDIT_FUND_RAILS, type CachedBtcRate, type CancelOptions, type CliIdentityEntry, type CoinGeckoBtcSpot, type CoinGeckoSpot, type CompletedCreditHistoryPage, type CompletedCreditHistoryQuery, type CompletedCreditHistoryRecord, type CompletedRefundHistoryRecord, type ConfigDirModeResult, CreatedInvoice, type CreditDrainRail, type CreditFundRail, type CreditFundingMode, type CreditMenu, type CreditOpResult, type CreditTerms, type CreditWire, DEFAULT_AGENT_MINT_URL, DIAGNOSTIC_CATALOGUE_VERSION, DbTransport, type DeliveredResult, type DescribeOptions, type DiagnosticCapabilityAuthority, type DiagnosticIdentityAuthority, DrainReceipt, type DrainReceiptChecks, type DrainReceiptVerifyResult, type DrainWire, DvmError, DvmX402ChannelStorage, type ExpiredCreditLossHistoryRecord, FAVORITES_FILE, FEEDBACK_NUDGES_FILE, type FundValuation, FundingReceipt, type FundingReceiptChecks, type FundingReceiptVerifyResult, IDENTITIES_FILE, IDENTITIES_VERSION, type IdentitiesFile, InvoiceStatus, JOBS_FILE, JOB_IDENTITY_HEADER, type JobEnvelope, type JobIdentityHeaderResult, type JobPolicy, JobReceipt$1 as JobReceipt, type JobStatus, JsonValue, LightningBackend, type LightningFundingOffer, LightningPayment, LightningTransactionListOptions, LightningTransactionSnapshot, LightningWalletInfo, type LnAddressParts, MESSAGES_DIR, type MeltQuoteInfo, MemoryKVStore, Message, type MessagePollOptions, MessageType, type MnemonicValidationResult, MppxChallenge, MppxCredential, NwcBackend, type NwcConnection, NwcError, type NwcRequestOptions, type NwcTransaction, type OutboundMessage, PAIRINGS_DIR, PRIVKEY_HEX_RE, type PayInvoiceOutcome, type PayInvoiceReconcilingOptions, type PayInvoiceResult, type PayOutcome, type Payment, PaymentRequired, PaymentRequirementsV1, PaymentRequirementsV2, type PendingDrain, type PendingFunding, type PendingMelt, type PendingMint, type PendingMintMintingState, type PendingSubmission, type PendingSubmissionAcceptedUnresolved, type PendingSubmissionContext, type PendingTempoChargeFunding, type PendingX402ExactFunding, type PendingX402Funding, type PersistedOutputData, PersistentCounterSource, type ProviderInfo, type ProviderRef, type ProviderText, type Quote, RAIL_FLAGS, RECEIPTS_FILE, RECENT_SPENDS_CAP, RECOVERY_MNEMONIC_FILE, REQUEST_INTENTS_DIR, ROUTER_FEEDBACK_CLAIM_HEADER, ROUTER_FEEDBACK_CLAIM_TTL_MS, type Rail, type RailAsset, type RailFlag, type ReceiptChecks, ReceiptCredit, type ReceiptInvalidReason, type ReceiptKeypair, type ReceiptParseError, type ReceiptTrustAnchor, type ReceiptVerification, type ReceiptVerifyResult, type RecordSpendOptions, type RpcSource, SPANS_INSERTED_CHANNEL, STABLECOIN_FUND_RAILS, SUPPORTED_PROTOCOL_VERSION, type SelectError, type SendMessageOptions, type SpanProjectionResult, type SpanRow, type SpanTransport, SpanWriter, type StatusOptions, type StoredCredit, type StoredCreditX402Binding, type StoredFundingMenuSnapshot, type StoredImplicitCredit, type StoredReceipt, type StoredSiblingCredit, type StoredX402ChannelConfig, type StoredX402ChannelMetadata, type StreamOptions, type StreamResult, type SubmitOptions, type SwapSendReserve, TEMPO_CHAIN_ID, TEMPO_CHANNELS_FILE, TEMPO_CHARGE_PENDING_STALE_MS, TEMPO_MODERATO_CHAIN_ID, TEMPO_MODERATO_RPC, TEMPO_PATH_USD_MODERATO, TEMPO_SESSION_UPDATED_REASON, type TempoAccount, type TempoChannelAssociation, type TempoChannelController, type TempoChannelDescriptor, type TempoChannelExitResult, type TempoChannelReconcileResult, type TempoChannelStoreContext, type TempoCredentialAccount, type TempoNetwork, type TempoSessionClientResolver, type Transport, type JobReceipt as TransportJobReceipt, type TrustAnchorRead, type V1InfoCapability, type V1InfoResponse, type VerifyJobReceiptArgs, WALLET_FILE, WALLET_VERSION, type WalletCredentialConfig, type WalletInfo, type X402Asset, type X402Balance, type X402BatchPayment, type X402ChannelChainReport, type X402ChannelClient, type X402ChannelReconciliation, type X402ConnectedWallet, type X402CreditFlavour, type X402CreditInstrument, X402EnvValidationError, type X402Network, type X402RefundArgs, type X402RefundOutcome, type X402RepinnedWallet, type X402UnobservedBalanceProvenance, X402Version, type X402VoucherPendingState, X402Wallet, X402_BATCH_CHANNEL_ABI, X402_BATCH_SETTLEMENT_KEY, X402_BATCH_SETTLEMENT_SCHEME, X402_CHANNELS_FILE, X402_DEFAULT_FACILITATOR, X402_EXACT_AUTHORIZATION_TTL_SECONDS, X402_EXACT_SCHEME, X402_NETWORKS, X402_PENDING_STALE_MS, X402_RECEIVER_AUTHORIZER_KEY, X402_REFUSAL_TRANSACTION_DISCOVERY_WINDOW_MS, X402_RPC_URL_KEY, X402_SELF_RELAY_KEY, acknowledgeReplayedX402Payment, acknowledgeX402ChannelOwner, advanceTempoChannelExit, appendBudgetSpend, appendFundingReceipt, appendReceipt, applyImplicitReceiptCredit, applyReceiptCredit, applyRetryToPool, asProviderText, asProviderTextOpt, assertAgentMnemonicReplaceable, assertNoRivalX402Voucher, assertSupportedX402Network, assertTempoSessionChallengeWithinAsk, assertTempoSessionDepositWithinCap, assertTempoSessionVoucherWithinAsk, assertX402ChannelPayer, assertX402RequirementDescribesChannel, attestedDvmIdentity, authenticatedBuilderPubkey, backupSecretFile, bindCashuTokenToSubmissionContext, bindDiagnosticCapabilityAuthority, bindDiagnosticIdentityAuthority, breakdownSince, buildAdminAuthHeader, buildAdminChallenge, builderLockPath, canReplaceExpiredX402Deposit, capFor, cashuSubmissionBindingFingerprint, cashuSubmissionBindingFromContext, checkBudgetForLedger, checkMeltQuoteState, checkReceiptAttestation, clearCreditSelection, clearPendingDrain, clearPendingFunding, clearPendingTempoChargeFunding, clearPendingX402ExactFunding, clearPendingX402Funding, clearRefillRailUnavailable, generateIdentity as cliIdentityStoreGenerateIdentity, computeSmartDenominations, costAnchor, coveringMintsForSpend, createDiagnosticCapabilityAuthority, createMintQuoteRetryState, createMonotonicClock, createNoopLogger, createStdoutLogger, createTempoChannelStore, createTempoCloseCredential, createTempoCreditSession, createTempoSessionPaymentFetch, createX402BatchPayment, currentContext, deleteAgentMnemonic, deriveAgentMasterKeypair, deriveAgentRefundSubkey, deriveAgentRefundSubkeyPubkey, deriveBuilderLockKeypair, deriveBuilderLockPubkey, deriveIdentityFromPrivkey, derivePubkeyFromPrivkey, deriveReceiptKeypair, deriveReceiptSecret, deriveTempoAddress, dvmLocationIdentity, effectiveFundingMint, effectiveMints, ensureAddress, ensureConfigDir, ensureConfigSubdir, ensureProvisionalCredit, entryKind, extendDiagnosticIdentityAuthority, fetchBtcUsdRate, fetchCoinGeckoBtcUsd, fetchCoinGeckoSpot, fetchLnurlPayInvoice, fetchMeltQuote, findX402Channel, forgetCredit, formatStaleness, formatUsd, formatUsdcMicrounits, fundWireAmountMicro, fundingModeForTempoIntent, fundingModeForX402Flavour, generateAgentMnemonic, generateEphemeralReceiptKey, generateX402PrivateKey, getBalance, getBalanceByMint, getInfo, getInputFeesForProofs, getLastKnownBtcRate, getTempoUsdcBalance, getX402Balance, hashedCanonicalDvmId, identitiesFileExists, initLoggers, insertSpanBatch, isAbortError, isCreditFundRail, isCreditFundingMode, isJobIdentityValue, isPublicRequestId, isSignableExactRequirement, isStablecoinFundRail, isStorableJobId, isValidEvmPrivateKey, issueRouterFeedbackClaim, listCredits, listFundingMenuSnapshots, listImplicitCredits, listPendingFundings, listPendingX402Fundings, listPendingX402FundingsForChannel, listResumableTempoChargeFundings, listResumableX402ExactFundings, listResumableX402Fundings, listTempoChannelAssociations, listTransactions, listX402Channels, loadAgentWallet, loadBudgetLedger, loadCredit, loadCreditX402Binding, loadIdentities, loadImplicitCredits, loadPendingFunding, loadReceipt, loadReceipts, loadResumableTempoChargeFunding, loadResumableX402ExactFunding, loadResumableX402Funding, loadTempoChannelAssociation, loadTempoChannelAssociationByKey, loadTempoChannelController, loadTempoChannelEntry, loadWalletConfiguredMints, loggers, looksLikeMnemonic, lookupInvoice, makeInvoice, markCredit, markImplicitCreditLost, markRefillDrainNoticed, markRefillRailUnavailable, maxAdvertisedMicro, maxKeysetDenomination, microToSats, missingDleqRecoveryDiagnostic, mnemonicFingerprint, msatsToMicro, msatsToUsd, msatsToUsdCents, msatsToUsdc, normalizeCreditEndpoint, normalizeFeedbackEndpointHost, nwcDedupWindowMs, nwcTimeoutMs, offersTempoCreditCharge, offersTempoCreditFunding, offersTempoCreditSession, offersX402CreditChannel, offersX402CreditFlavour, offersX402CreditFunding, parseCreditMenu, parseCreditTerms, parseJobIdentityHeader, parseLnAddress, parseNwcUri, parseTraceparent, payInvoiceReconciling, pendingDrainById, pendingDrainFor, persistTempoOpenCredential, pinDimension, prepareP2PKMint, processX402BatchCorrection, processX402BatchResponse, processX402BatchResponseForWallet, projectDiagnosticFields, projectEventName, projectSpanRow, providerProseSources, providerTextToString, randomTraceId, readAgentMnemonic, readCompletedCreditHistory, readFundValuation, readX402ChannelGuardFacts, readX402ChannelOnChain, receiptPubkeyFromSecret, receiveToAgentWallet, reconcileRefusedX402Deposits, reconcileTempoChannelOnChain, recordBalanceResponse, recordCreditX402Instrument, recordDrainReceipts, recordFundResponse, recordFundingMenuSnapshot, recordPendingDrain, recordPendingFunding, recordPendingTempoChargeFunding, recordPendingX402ExactFunding, recordPendingX402Funding, recordRefusedDrawBalance, recordX402ChannelMetadata, redactUrl, redactUrlsInText, refundX402BatchChannel, rehydrateOutputData, repairConfigDirMode, resolveLnurlPayMetadataUrl, resolveRpcHttpTransportOptions, resolveRpcOverride, resolveTempoAsset, resolveTempoNetwork, resolveX402Asset, resolveX402ChannelRpc, restoreProofsFromOutputs, retirePendingX402Funding, retireTempoChannel, retireTempoChannelScope, retryMintQuoteOperation, saveAgentWallet, saveBudgetLedger, saveIdentities, selectProofsForSpend, serializeOutputData, setEmitter, settleDrainEvidence, sha256hex, shellQuoteArg, signDvmRequestData, signRequestData, signedRequestDomain, spendEntry, swapFeeForProofs, swapSendReserve, tempoAccountFromConfig, tempoBalanceCheckHint, tempoChallengeAmountMicro, tempoChannelControlledBy, tempoChargeCredentialSettleable, tempoCredentialAmountMicro, tempoCredentialValidBefore, tempoDescriptorController, tempoSessionAssociationByKey, tempoSessionChallenge, tempoSessionChallengeChannelScope, tempoSessionChallengeMicro, tempoSessionCredentialChannelScope, tempoSessionCredentialCumulativeMicro, tempoSessionCumulativeCapMicro, tempoSessionPriorCumulativeMicro, tempoTokenReference, toAgentProof, toCashuProofs, transportErrorCode, tryResolveTempoAsset, unsignRequestData, usdToMsats, usdcToMsats, validateAgentMnemonic, validateLnAddress, validateX402Env, verifyCanonicalSignedRequest, verifyChallenge, verifyDrainReceiptChain, verifyFundingReceiptChain, verifyJobReceipt, verifyRouterFeedbackClaim, walletExists, weakestReceiptVerdict, windowEnd, windowStart, withIdentitiesLock, withInitRetry, withNwcPool, withTempoChannelLock, withTraceContext, withWalletLock, withX402ChannelLock, withholdsTempoCreditSession, withinAdvertisedTolerance, writeAgentMnemonic, x402ChannelBalanceUnreconciledAt, x402ChannelControlledBy, x402ChannelReservation, x402CreditChannelNetworks, x402CreditExactNetworks, x402CreditFlavour, x402CreditFundingNetworks, x402ExactFundingDead, x402FlavourForInstrument, x402InstrumentForFlavour, x402NetworkByCaip2, x402NetworkBySlug, x402NetworkLabel, x402NetworkListForCopy, x402PendingBlockExpiresAt, x402PendingDepositExpiresAt, x402PendingFundingJson, x402PendingRetired, x402PendingStale, x402PendingUnsettled, x402RequiredFromError, x402ReservationRelease, x402SupportedNetworksHint, x402VoucherPendingState, x402WalletFromConfig };
@@ -54,6 +54,7 @@ import {
54
54
  IDENTITIES_FILE,
55
55
  IMPLICIT_CREDIT_TTL_MS,
56
56
  JOBS_FILE,
57
+ JOB_IDENTITY_HEADER,
57
58
  MESSAGES_DIR,
58
59
  PAIRINGS_DIR,
59
60
  PRIVKEY_HEX_RE,
@@ -106,8 +107,10 @@ import {
106
107
  hashCapabilities,
107
108
  isDrainReceipt,
108
109
  isFundingReceipt,
110
+ isJobIdentityValue,
109
111
  isPublicRequestId,
110
112
  isSignedJobReceipt,
113
+ isStorableJobId,
111
114
  isX402SettlementReconciliationReason,
112
115
  loadAgentWallet,
113
116
  loadIdentitySecret,
@@ -115,6 +118,7 @@ import {
115
118
  looksLikeMnemonic,
116
119
  meltAmountBounds,
117
120
  mnemonicFingerprint,
121
+ parseJobIdentityHeader,
118
122
  parseTraceparent,
119
123
  readAgentMnemonic,
120
124
  receiptPubkeyFromSecret,
@@ -139,7 +143,7 @@ import {
139
143
  withWalletLock,
140
144
  writeAgentMnemonic,
141
145
  writeIdentity
142
- } from "../chunk-QTH7CIA3.js";
146
+ } from "../chunk-XO5EUHCW.js";
143
147
  import {
144
148
  X402_BATCH_SETTLEMENT_SCHEME,
145
149
  X402_DEFAULT_FACILITATOR,
@@ -5986,6 +5990,7 @@ export {
5986
5990
  IDENTITIES_VERSION,
5987
5991
  InvalidUsdPriceError,
5988
5992
  JOBS_FILE,
5993
+ JOB_IDENTITY_HEADER,
5989
5994
  MESSAGES_DIR,
5990
5995
  MemoryKVStore,
5991
5996
  NwcBackend,
@@ -6167,12 +6172,14 @@ export {
6167
6172
  isCreditFundingMode,
6168
6173
  isDrainReceipt,
6169
6174
  isFundingReceipt,
6175
+ isJobIdentityValue,
6170
6176
  isPaymentRequestMessage,
6171
6177
  isPromptMessage,
6172
6178
  isPublicRequestId,
6173
6179
  isSignableExactRequirement,
6174
6180
  isSignedJobReceipt,
6175
6181
  isStablecoinFundRail,
6182
+ isStorableJobId,
6176
6183
  isTextMessage,
6177
6184
  isValidEvmPrivateKey,
6178
6185
  isWorkingMessage,
@@ -6237,6 +6244,7 @@ export {
6237
6244
  offersX402CreditFunding,
6238
6245
  parseCreditMenu,
6239
6246
  parseCreditTerms,
6247
+ parseJobIdentityHeader,
6240
6248
  parseLnAddress,
6241
6249
  parseNwcUri,
6242
6250
  parseTraceparent,
@@ -1,2 +1,2 @@
1
- export { ADMIN_STATE_UNAVAILABLE, AGENT_MNEMONIC_FILE, BTC_RATE_FILE, BUDGET_FILE, CAPABILITY_NAME_RE, COINGECKO_SIMPLE_PRICE_URL, CONFIG_AUDIT_FILE, CONFIG_BACKUP_FILE, CONFIG_DIR, CONFIG_FILE, CONFIG_PINNED_FILE, CREDITS_FILE, CREDIT_DRAIN_RAILS, CREDIT_FUNDING_MODES, CREDIT_FUND_RAILS, DEFAULT_AGENT_MINT_URL, DIAGNOSTIC_CATALOGUE_VERSION, DbTransport, DvmError, DvmX402ChannelStorage, FAVORITES_FILE, FEEDBACK_NUDGES_FILE, FX_CACHE_TTL_MS, FX_RETRY_COUNT, IDENTITIES_FILE, IDENTITIES_VERSION, InvalidUsdPriceError, JOBS_FILE, MESSAGES_DIR, MemoryKVStore, NwcBackend, NwcError, PAIRINGS_DIR, PRIVKEY_HEX_RE, PersistentCounterSource, RAIL_FLAGS, RAIL_REFUNDABLE, RECEIPTS_FILE, RECENT_SPENDS_CAP, RECOVERY_MNEMONIC_FILE, REQUEST_INTENTS_DIR, ROUTER_FEEDBACK_CLAIM_HEADER, ROUTER_FEEDBACK_CLAIM_TTL_MS, SPANS_INSERTED_CHANNEL, STABLECOIN_FUND_RAILS, SUPPORTED_PROTOCOL_VERSION, SpanWriter, StepCache, TEMPO_CHAIN_ID, TEMPO_CHANNELS_FILE, TEMPO_CHARGE_PENDING_STALE_MS, TEMPO_MODERATO_CHAIN_ID, TEMPO_MODERATO_RPC, TEMPO_PATH_USD_MODERATO, TEMPO_SESSION_UPDATED_REASON, WALLET_FILE, WALLET_VERSION, X402EnvValidationError, X402_BATCH_CHANNEL_ABI, X402_BATCH_SETTLEMENT_KEY, X402_BATCH_SETTLEMENT_SCHEME, X402_CHANNELS_FILE, X402_DEFAULT_FACILITATOR, X402_DEFAULT_NETWORK, X402_EXACT_AUTHORIZATION_TTL_SECONDS, X402_EXACT_SCHEME, X402_NETWORKS, X402_PENDING_STALE_MS, X402_RECEIVER_AUTHORIZER_KEY, X402_REFUSAL_TRANSACTION_DISCOVERY_WINDOW_MS, X402_RPC_URL_KEY, X402_SELF_RELAY_KEY, X402_V1_VERSION, X402_VERSION, acknowledgeReplayedX402Payment, acknowledgeX402ChannelOwner, advanceTempoChannelExit, amountBoundsVerdict, appendBudgetSpend, appendFundingReceipt, appendReceipt, applyImplicitReceiptCredit, applyReceiptCredit, applyRetryToPool, asProviderText, asProviderTextOpt, assertAgentMnemonicReplaceable, assertNoRivalX402Voucher, assertNutSupport, assertSupportedX402Network, assertTempoSessionChallengeWithinAsk, assertTempoSessionDepositWithinCap, assertTempoSessionVoucherWithinAsk, assertX402ChannelPayer, assertX402RequirementDescribesChannel, attestedDvmIdentity, authenticatedBuilderPubkey, backupSecretFile, bindCashuTokenToSubmissionContext, bindDiagnosticCapabilityAuthority, bindDiagnosticIdentityAuthority, breakdownSince, buildAdminAuthHeader, buildAdminChallenge, buildAttestation, buildPaymentRequiredV2, buildPaymentRequirements, builderLockPath, caip2ToX402Network, canReplaceExpiredX402Deposit, canSwap, canonicalRequestPath, canonicaliseForSigning, canonicalize, capFor, cashuSubmissionBindingFingerprint, cashuSubmissionBindingFromContext, chainIdFromCaip2, checkBudgetForLedger, checkMeltQuoteState, checkMintHealth, checkReceiptAttestation, clearCreditSelection, clearPendingDrain, clearPendingFunding, clearPendingTempoChargeFunding, clearPendingX402ExactFunding, clearPendingX402Funding, clearRefillRailUnavailable, cliIdentityStoreGenerateIdentity, computeResultHash, computeSmartDenominations, costAnchor, coveringMintsForSpend, createDiagnosticCapabilityAuthority, createMintQuoteRetryState, createMonotonicClock, createNoopLogger, createStdoutLogger, createTempoChannelStore, createTempoCloseCredential, createTempoCreditSession, createTempoSessionPaymentFetch, createX402BatchPayment, currentContext, decodePayment, decodePaymentRequiredHeader, deleteAgentMnemonic, deriveAgentMasterKeypair, deriveAgentRefundSubkey, deriveAgentRefundSubkeyPubkey, deriveBuilderLockKeypair, deriveBuilderLockPubkey, deriveIdentityFromPrivkey, derivePubkeyFromPrivkey, deriveReceiptKeypair, deriveReceiptSecret, deriveTempoAddress, dvmLocationIdentity, effectiveFundingMint, effectiveMints, encodePayment, encodePaymentRequiredHeader, encodeSettleResponseHeader, ensureAddress, ensureConfigDir, ensureConfigSubdir, ensureProvisionalCredit, entryKind, exactEvmAuthorization, extendDiagnosticIdentityAuthority, fetchBtcUsdRate, fetchCoinGeckoBtcUsd, fetchCoinGeckoSpot, fetchLnurlPayInvoice, fetchMeltQuote, findX402Channel, forgetCredit, formatStaleness, formatUsd, formatUsdcMicrounits, fundWireAmountMicro, fundingModeForTempoIntent, fundingModeForX402Flavour, generateAgentMnemonic, generateEphemeralReceiptKey, generateIdentity, generateX402PrivateKey, getBalance, getBalanceByMint, getInfo, getInputFeesForProofs, getLastKnownBtcRate, getTempoUsdcBalance, getWallet, getX402Balance, hashCapabilities, hashedCanonicalDvmId, identitiesFileExists, initLoggers, insertSpanBatch, isAbortError, isArtifactMessage, isCancelMessage, isCompleteMessage, isCreditFundRail, isCreditFundingMode, isDrainReceipt, isFundingReceipt, isPaymentRequestMessage, isPromptMessage, isPublicRequestId, isSignableExactRequirement, isSignedJobReceipt, isStablecoinFundRail, isTextMessage, isValidEvmPrivateKey, isWorkingMessage, issueRouterFeedbackClaim, listCredits, listFundingMenuSnapshots, listImplicitCredits, listPendingFundings, listPendingX402Fundings, listPendingX402FundingsForChannel, listResumableTempoChargeFundings, listResumableX402ExactFundings, listResumableX402Fundings, listTempoChannelAssociations, listTransactions, listX402Channels, loadAgentWallet, loadBudgetLedger, loadCredit, loadCreditX402Binding, loadIdentities, loadIdentitySecret, loadImplicitCredits, loadPendingFunding, loadReceipt, loadReceipts, loadResumableTempoChargeFunding, loadResumableX402ExactFunding, loadResumableX402Funding, loadTempoChannelAssociation, loadTempoChannelAssociationByKey, loadTempoChannelController, loadTempoChannelEntry, loadWalletConfiguredMints, loggers, looksLikeMnemonic, lookupInvoice, makeInvoice, markCredit, markImplicitCreditLost, markRefillDrainNoticed, markRefillRailUnavailable, maxAdvertisedMicro, maxKeysetDenomination, meltAmountBounds, microToSats, missingDleqRecoveryDiagnostic, mnemonicFingerprint, msatsToMicro, msatsToUsd, msatsToUsdCents, msatsToUsdc, normalizeCreditEndpoint, normalizeFeedbackEndpointHost, nwcDedupWindowMs, nwcTimeoutMs, offersTempoCreditCharge, offersTempoCreditFunding, offersTempoCreditSession, offersX402CreditChannel, offersX402CreditFlavour, offersX402CreditFunding, parseCreditMenu, parseCreditTerms, parseLnAddress, parseNwcUri, parseTraceparent, parseUsdPrice, payInvoiceReconciling, paymentRequiredV2FromV1, pendingDrainById, pendingDrainFor, persistTempoOpenCredential, pinDimension, prepareP2PKMint, processX402BatchCorrection, processX402BatchResponse, processX402BatchResponseForWallet, projectDiagnosticFields, projectEventName, projectSpanRow, providerProseSources, providerTextToString, randomTraceId, readAgentMnemonic, readCompletedCreditHistory, readFundValuation, readX402ChannelGuardFacts, readX402ChannelOnChain, receiptPubkeyFromSecret, receiveToAgentWallet, reconcileRefusedX402Deposits, reconcileTempoChannelOnChain, recordBalanceResponse, recordCreditX402Instrument, recordDrainReceipts, recordFundResponse, recordFundingMenuSnapshot, recordPendingDrain, recordPendingFunding, recordPendingTempoChargeFunding, recordPendingX402ExactFunding, recordPendingX402Funding, recordRefusedDrawBalance, recordX402ChannelMetadata, redactUrl, redactUrlsInText, refundX402BatchChannel, rehydrateOutputData, repairConfigDirMode, resolveLnurlPayMetadataUrl, resolveRpcHttpTransportOptions, resolveRpcOverride, resolveTempoAsset, resolveTempoNetwork, resolveX402Asset, resolveX402ChannelRpc, restoreProofsFromOutputs, retirePendingX402Funding, retireTempoChannel, retireTempoChannelScope, retryMintQuoteOperation, saveAgentWallet, saveBudgetLedger, saveIdentities, selectProofsForSpend, serializeOutputData, setEmitter, settleDrainEvidence, sha256hex, shellQuoteArg, signAttestation, signDrainReceipt, signDvmRequestData, signFundingReceipt, signReceipt, signRequestData, signedRequestDomain, spendEntry, swapFeeForProofs, swapSendReserve, tempoAccountFromConfig, tempoBalanceCheckHint, tempoChallengeAmountMicro, tempoChannelControlledBy, tempoChargeCredentialSettleable, tempoCredentialAmountMicro, tempoCredentialValidBefore, tempoDescriptorController, tempoSessionAssociationByKey, tempoSessionChallenge, tempoSessionChallengeChannelScope, tempoSessionChallengeMicro, tempoSessionCredentialChannelScope, tempoSessionCredentialCumulativeMicro, tempoSessionCumulativeCapMicro, tempoSessionPriorCumulativeMicro, tempoTokenReference, toAgentProof, toCashuProofs, toLockPubkey, transportErrorCode, tryResolveTempoAsset, unsignRequestData, usdToMsats, usdcContractByCaip2, usdcContractFor, usdcDomainNameFor, usdcDomainVersionFor, usdcToMsats, validateAgentMnemonic, validateLnAddress, validateX402Env, verifyAttestation, verifyCanonicalSignedRequest, verifyChallenge, verifyDrainReceipt, verifyDrainReceiptChain, verifyFundingReceipt, verifyFundingReceiptChain, verifyJobReceipt, verifyReceipt, verifyRouterFeedbackClaim, walletExists, warmFxSnapshot, weakestReceiptVerdict, windowEnd, windowStart, withIdentitiesLock, withInitRetry, withNwcPool, withTempoChannelLock, withTraceContext, withWalletLock, withX402ChannelLock, withholdsTempoCreditSession, withinAdvertisedTolerance, writeAgentMnemonic, writeIdentity, x402ChannelBalanceUnreconciledAt, x402ChannelControlledBy, x402ChannelReservation, x402CreditChannelNetworks, x402CreditExactNetworks, x402CreditFlavour, x402CreditFundingNetworks, x402ExactFundingDead, x402FlavourForInstrument, x402InstrumentForFlavour, x402NetworkByCaip2, x402NetworkBySlug, x402NetworkLabel, x402NetworkListForCopy, x402NetworkToCaip2, x402PendingBlockExpiresAt, x402PendingDepositExpiresAt, x402PendingFundingJson, x402PendingRetired, x402PendingStale, x402PendingUnsettled, x402RequiredFromError, x402ReservationRelease, x402SupportedNetworksHint, x402VoucherPendingState, x402WalletFromConfig } from "./caller.js";
1
+ export { ADMIN_STATE_UNAVAILABLE, AGENT_MNEMONIC_FILE, BTC_RATE_FILE, BUDGET_FILE, CAPABILITY_NAME_RE, COINGECKO_SIMPLE_PRICE_URL, CONFIG_AUDIT_FILE, CONFIG_BACKUP_FILE, CONFIG_DIR, CONFIG_FILE, CONFIG_PINNED_FILE, CREDITS_FILE, CREDIT_DRAIN_RAILS, CREDIT_FUNDING_MODES, CREDIT_FUND_RAILS, DEFAULT_AGENT_MINT_URL, DIAGNOSTIC_CATALOGUE_VERSION, DbTransport, DvmError, DvmX402ChannelStorage, FAVORITES_FILE, FEEDBACK_NUDGES_FILE, FX_CACHE_TTL_MS, FX_RETRY_COUNT, IDENTITIES_FILE, IDENTITIES_VERSION, InvalidUsdPriceError, JOBS_FILE, JOB_IDENTITY_HEADER, MESSAGES_DIR, MemoryKVStore, NwcBackend, NwcError, PAIRINGS_DIR, PRIVKEY_HEX_RE, PersistentCounterSource, RAIL_FLAGS, RAIL_REFUNDABLE, RECEIPTS_FILE, RECENT_SPENDS_CAP, RECOVERY_MNEMONIC_FILE, REQUEST_INTENTS_DIR, ROUTER_FEEDBACK_CLAIM_HEADER, ROUTER_FEEDBACK_CLAIM_TTL_MS, SPANS_INSERTED_CHANNEL, STABLECOIN_FUND_RAILS, SUPPORTED_PROTOCOL_VERSION, SpanWriter, StepCache, TEMPO_CHAIN_ID, TEMPO_CHANNELS_FILE, TEMPO_CHARGE_PENDING_STALE_MS, TEMPO_MODERATO_CHAIN_ID, TEMPO_MODERATO_RPC, TEMPO_PATH_USD_MODERATO, TEMPO_SESSION_UPDATED_REASON, WALLET_FILE, WALLET_VERSION, X402EnvValidationError, X402_BATCH_CHANNEL_ABI, X402_BATCH_SETTLEMENT_KEY, X402_BATCH_SETTLEMENT_SCHEME, X402_CHANNELS_FILE, X402_DEFAULT_FACILITATOR, X402_DEFAULT_NETWORK, X402_EXACT_AUTHORIZATION_TTL_SECONDS, X402_EXACT_SCHEME, X402_NETWORKS, X402_PENDING_STALE_MS, X402_RECEIVER_AUTHORIZER_KEY, X402_REFUSAL_TRANSACTION_DISCOVERY_WINDOW_MS, X402_RPC_URL_KEY, X402_SELF_RELAY_KEY, X402_V1_VERSION, X402_VERSION, acknowledgeReplayedX402Payment, acknowledgeX402ChannelOwner, advanceTempoChannelExit, amountBoundsVerdict, appendBudgetSpend, appendFundingReceipt, appendReceipt, applyImplicitReceiptCredit, applyReceiptCredit, applyRetryToPool, asProviderText, asProviderTextOpt, assertAgentMnemonicReplaceable, assertNoRivalX402Voucher, assertNutSupport, assertSupportedX402Network, assertTempoSessionChallengeWithinAsk, assertTempoSessionDepositWithinCap, assertTempoSessionVoucherWithinAsk, assertX402ChannelPayer, assertX402RequirementDescribesChannel, attestedDvmIdentity, authenticatedBuilderPubkey, backupSecretFile, bindCashuTokenToSubmissionContext, bindDiagnosticCapabilityAuthority, bindDiagnosticIdentityAuthority, breakdownSince, buildAdminAuthHeader, buildAdminChallenge, buildAttestation, buildPaymentRequiredV2, buildPaymentRequirements, builderLockPath, caip2ToX402Network, canReplaceExpiredX402Deposit, canSwap, canonicalRequestPath, canonicaliseForSigning, canonicalize, capFor, cashuSubmissionBindingFingerprint, cashuSubmissionBindingFromContext, chainIdFromCaip2, checkBudgetForLedger, checkMeltQuoteState, checkMintHealth, checkReceiptAttestation, clearCreditSelection, clearPendingDrain, clearPendingFunding, clearPendingTempoChargeFunding, clearPendingX402ExactFunding, clearPendingX402Funding, clearRefillRailUnavailable, cliIdentityStoreGenerateIdentity, computeResultHash, computeSmartDenominations, costAnchor, coveringMintsForSpend, createDiagnosticCapabilityAuthority, createMintQuoteRetryState, createMonotonicClock, createNoopLogger, createStdoutLogger, createTempoChannelStore, createTempoCloseCredential, createTempoCreditSession, createTempoSessionPaymentFetch, createX402BatchPayment, currentContext, decodePayment, decodePaymentRequiredHeader, deleteAgentMnemonic, deriveAgentMasterKeypair, deriveAgentRefundSubkey, deriveAgentRefundSubkeyPubkey, deriveBuilderLockKeypair, deriveBuilderLockPubkey, deriveIdentityFromPrivkey, derivePubkeyFromPrivkey, deriveReceiptKeypair, deriveReceiptSecret, deriveTempoAddress, dvmLocationIdentity, effectiveFundingMint, effectiveMints, encodePayment, encodePaymentRequiredHeader, encodeSettleResponseHeader, ensureAddress, ensureConfigDir, ensureConfigSubdir, ensureProvisionalCredit, entryKind, exactEvmAuthorization, extendDiagnosticIdentityAuthority, fetchBtcUsdRate, fetchCoinGeckoBtcUsd, fetchCoinGeckoSpot, fetchLnurlPayInvoice, fetchMeltQuote, findX402Channel, forgetCredit, formatStaleness, formatUsd, formatUsdcMicrounits, fundWireAmountMicro, fundingModeForTempoIntent, fundingModeForX402Flavour, generateAgentMnemonic, generateEphemeralReceiptKey, generateIdentity, generateX402PrivateKey, getBalance, getBalanceByMint, getInfo, getInputFeesForProofs, getLastKnownBtcRate, getTempoUsdcBalance, getWallet, getX402Balance, hashCapabilities, hashedCanonicalDvmId, identitiesFileExists, initLoggers, insertSpanBatch, isAbortError, isArtifactMessage, isCancelMessage, isCompleteMessage, isCreditFundRail, isCreditFundingMode, isDrainReceipt, isFundingReceipt, isJobIdentityValue, isPaymentRequestMessage, isPromptMessage, isPublicRequestId, isSignableExactRequirement, isSignedJobReceipt, isStablecoinFundRail, isStorableJobId, isTextMessage, isValidEvmPrivateKey, isWorkingMessage, issueRouterFeedbackClaim, listCredits, listFundingMenuSnapshots, listImplicitCredits, listPendingFundings, listPendingX402Fundings, listPendingX402FundingsForChannel, listResumableTempoChargeFundings, listResumableX402ExactFundings, listResumableX402Fundings, listTempoChannelAssociations, listTransactions, listX402Channels, loadAgentWallet, loadBudgetLedger, loadCredit, loadCreditX402Binding, loadIdentities, loadIdentitySecret, loadImplicitCredits, loadPendingFunding, loadReceipt, loadReceipts, loadResumableTempoChargeFunding, loadResumableX402ExactFunding, loadResumableX402Funding, loadTempoChannelAssociation, loadTempoChannelAssociationByKey, loadTempoChannelController, loadTempoChannelEntry, loadWalletConfiguredMints, loggers, looksLikeMnemonic, lookupInvoice, makeInvoice, markCredit, markImplicitCreditLost, markRefillDrainNoticed, markRefillRailUnavailable, maxAdvertisedMicro, maxKeysetDenomination, meltAmountBounds, microToSats, missingDleqRecoveryDiagnostic, mnemonicFingerprint, msatsToMicro, msatsToUsd, msatsToUsdCents, msatsToUsdc, normalizeCreditEndpoint, normalizeFeedbackEndpointHost, nwcDedupWindowMs, nwcTimeoutMs, offersTempoCreditCharge, offersTempoCreditFunding, offersTempoCreditSession, offersX402CreditChannel, offersX402CreditFlavour, offersX402CreditFunding, parseCreditMenu, parseCreditTerms, parseJobIdentityHeader, parseLnAddress, parseNwcUri, parseTraceparent, parseUsdPrice, payInvoiceReconciling, paymentRequiredV2FromV1, pendingDrainById, pendingDrainFor, persistTempoOpenCredential, pinDimension, prepareP2PKMint, processX402BatchCorrection, processX402BatchResponse, processX402BatchResponseForWallet, projectDiagnosticFields, projectEventName, projectSpanRow, providerProseSources, providerTextToString, randomTraceId, readAgentMnemonic, readCompletedCreditHistory, readFundValuation, readX402ChannelGuardFacts, readX402ChannelOnChain, receiptPubkeyFromSecret, receiveToAgentWallet, reconcileRefusedX402Deposits, reconcileTempoChannelOnChain, recordBalanceResponse, recordCreditX402Instrument, recordDrainReceipts, recordFundResponse, recordFundingMenuSnapshot, recordPendingDrain, recordPendingFunding, recordPendingTempoChargeFunding, recordPendingX402ExactFunding, recordPendingX402Funding, recordRefusedDrawBalance, recordX402ChannelMetadata, redactUrl, redactUrlsInText, refundX402BatchChannel, rehydrateOutputData, repairConfigDirMode, resolveLnurlPayMetadataUrl, resolveRpcHttpTransportOptions, resolveRpcOverride, resolveTempoAsset, resolveTempoNetwork, resolveX402Asset, resolveX402ChannelRpc, restoreProofsFromOutputs, retirePendingX402Funding, retireTempoChannel, retireTempoChannelScope, retryMintQuoteOperation, saveAgentWallet, saveBudgetLedger, saveIdentities, selectProofsForSpend, serializeOutputData, setEmitter, settleDrainEvidence, sha256hex, shellQuoteArg, signAttestation, signDrainReceipt, signDvmRequestData, signFundingReceipt, signReceipt, signRequestData, signedRequestDomain, spendEntry, swapFeeForProofs, swapSendReserve, tempoAccountFromConfig, tempoBalanceCheckHint, tempoChallengeAmountMicro, tempoChannelControlledBy, tempoChargeCredentialSettleable, tempoCredentialAmountMicro, tempoCredentialValidBefore, tempoDescriptorController, tempoSessionAssociationByKey, tempoSessionChallenge, tempoSessionChallengeChannelScope, tempoSessionChallengeMicro, tempoSessionCredentialChannelScope, tempoSessionCredentialCumulativeMicro, tempoSessionCumulativeCapMicro, tempoSessionPriorCumulativeMicro, tempoTokenReference, toAgentProof, toCashuProofs, toLockPubkey, transportErrorCode, tryResolveTempoAsset, unsignRequestData, usdToMsats, usdcContractByCaip2, usdcContractFor, usdcDomainNameFor, usdcDomainVersionFor, usdcToMsats, validateAgentMnemonic, validateLnAddress, validateX402Env, verifyAttestation, verifyCanonicalSignedRequest, verifyChallenge, verifyDrainReceipt, verifyDrainReceiptChain, verifyFundingReceipt, verifyFundingReceiptChain, verifyJobReceipt, verifyReceipt, verifyRouterFeedbackClaim, walletExists, warmFxSnapshot, weakestReceiptVerdict, windowEnd, windowStart, withIdentitiesLock, withInitRetry, withNwcPool, withTempoChannelLock, withTraceContext, withWalletLock, withX402ChannelLock, withholdsTempoCreditSession, withinAdvertisedTolerance, writeAgentMnemonic, writeIdentity, x402ChannelBalanceUnreconciledAt, x402ChannelControlledBy, x402ChannelReservation, x402CreditChannelNetworks, x402CreditExactNetworks, x402CreditFlavour, x402CreditFundingNetworks, x402ExactFundingDead, x402FlavourForInstrument, x402InstrumentForFlavour, x402NetworkByCaip2, x402NetworkBySlug, x402NetworkLabel, x402NetworkListForCopy, x402NetworkToCaip2, x402PendingBlockExpiresAt, x402PendingDepositExpiresAt, x402PendingFundingJson, x402PendingRetired, x402PendingStale, x402PendingUnsettled, x402RequiredFromError, x402ReservationRelease, x402SupportedNetworksHint, x402VoucherPendingState, x402WalletFromConfig } from "./caller.js";
2
2
  export { DEFAULT_LOCK_PUBKEY_GRACE_SECONDS, JobCancelledError, MintHealthTracker, NON_CHANNEL_BITCOIN_RAILS, PAYMENT_PROOF_KEYS, PayoutReporter, PostgresTempoChargeStore, PostgresTempoSessionStore, RevenueReporter, SIGNED_ENVELOPE_FIELDS, SIGNED_ENVELOPE_TYPES, TEMPO_CLOSE_DB_RECOVERY_BUDGET_MS, TEMPO_CLOSE_REQUESTED_TOPIC, TempoSessionChannelMismatchError, X402FacilitatorHealth, X402_BATCH_SETTLEMENT_MAINNET_NETWORK, _testing, abortJob, activePubkeySet, applyPaymentInfoToJob, assertRevenueReporterReady, buildPaymentErrorResponse, clearAccumulatorForDvm, createAdminCashuNonceStore, createDVMServer, createDefaultReplayStore, createInstrumentedFetch, creditDepositPayload, depleteLots, derivedFundCreditId, devModeSkipsPaymentVerification, fifoOrder, fromJobRecord, fundedMicroFor, hasPaymentProof, hashLockKey, humanizeZodError, implicitCreditId, inKindDrawMsats, initLockPubkeyTable, initWalletAccumulatorTable, insertAccumulatorRows, installAdminCashuRoutes, isDerivedCreditId, isInKindDepletion, isNonChannelBitcoinRail, isStaleJobReapable, isTerminal, isYieldMessage, issueUpfrontChallenges, jobCredentialGate, loadLockPubkeyState, lockPubkeyStoreToLockPubkey, lotOwedSats, msatsToFiatMicro, netOwedSats, paymentErrorBody, pinAskFiat, priceFiatMicro, processIncomingPayment, providerMessage, pruneRetired, rateUnavailablePaymentError, repairX402ExactSettlementEffect, resolveFxSnapshot, resolvePriceFiat, revenueReporterBannerState, rotateLockPubkey, seedLockPubkeyState, settleWithFacilitator, toCreditTerms, toJobRecord, unknownRouteNotFound, verifyIncomingPayment, verifyTempoSessionManagementCredential, verifyUpfrontPayment, verifyWithFacilitator, verifyX402Payment, wrapMppx, x402RequiredUsdcMicro, x402SettledShare } from "./server.js";
@@ -1,22 +1,22 @@
1
1
  import { FacilitatorConfig } from '@x402/core/server';
2
- import { ak as PaymentPayload, a9 as PaymentRequirementsV1, aa as PaymentRequirementsV2, aE as X402Config, av as SettleResponse, aC as VerifyResponse, bi as X402ExactVersionSupport, bj as X402Receipt, bk as TransactionalPayoutHook, bl as CashuMeltCompleted } from '../step-cache-MUyQVNFX.js';
3
- export { bm as CreditDepositPayload, bn as CreditDrainPayload, bo as FundingLot, bp as LotDebit, bq as LotDepletion, br as MppxServer, bs as NON_CHANNEL_BITCOIN_RAILS, bt as NonChannelBitcoinRail, bu as PayoutReporter, bv as PostgresTempoSessionStore, bw as RevenueReporter, bx as SIGNED_ENVELOPE_FIELDS, by as SIGNED_ENVELOPE_TYPES, bz as X402TrackedChannel, bA as _testing, bB as createDefaultReplayStore, bC as depleteLots, bD as fifoOrder, bE as inKindDrawMsats, bF as isInKindDepletion, bG as isNonChannelBitcoinRail, bH as lotOwedSats, bI as netOwedSats, bJ as wrapMppx } from '../step-cache-MUyQVNFX.js';
2
+ import { al as PaymentPayload, aa as PaymentRequirementsV1, ab as PaymentRequirementsV2, aF as X402Config, aw as SettleResponse, aD as VerifyResponse, bj as X402ExactVersionSupport, bk as X402Receipt, bl as TransactionalPayoutHook, bm as CashuMeltCompleted } from '../step-cache-C9JRSFhM.js';
3
+ export { bn as CreditDepositPayload, bo as CreditDrainPayload, bp as FundingLot, bq as LotDebit, br as LotDepletion, bs as MppxServer, bt as NON_CHANNEL_BITCOIN_RAILS, bu as NonChannelBitcoinRail, bv as PayoutReporter, bw as PostgresTempoSessionStore, bx as RevenueReporter, by as SIGNED_ENVELOPE_FIELDS, bz as SIGNED_ENVELOPE_TYPES, bA as X402TrackedChannel, bB as _testing, bC as createDefaultReplayStore, bD as depleteLots, bE as fifoOrder, bF as inKindDrawMsats, bG as isInKindDepletion, bH as isNonChannelBitcoinRail, bI as lotOwedSats, bJ as netOwedSats, bK as wrapMppx } from '../step-cache-C9JRSFhM.js';
4
4
  import { Hono } from 'hono';
5
5
  import { Env, BlankSchema } from 'hono/types';
6
6
  import { Pool } from 'pg';
7
7
  export { Pool } from 'pg';
8
8
  import { g as getWallet } from '../wallet-Dwjs5n_M.js';
9
- import { C as ConsumedCredentialStore, L as LockPubkeyStateLoader } from '../credit-menu-DvV-IX3P.js';
10
- export { A as AccumulatorPool, a as AppEnv, b as CreditFundingReport, D as DEFAULT_LOCK_PUBKEY_GRACE_SECONDS, F as FiatDenomination, c as FiatDenominationFailure, d as FundOnlyRequest, I as IncomingPaymentOpts, J as JobCancelledError, e as LockPubkeyPool, f as LockPubkeyState, M as MintHealthTracker, P as PAYMENT_PROOF_KEYS, g as PaymentErrorCode, h as PaymentErrorDetail, i as PaymentInfo, j as PostgresTempoChargeStore, R as ReporterBannerOpts, k as ResolvedFx, l as RevenueBootCheckOpts, S as SDKServerOpts, m as ServerJob, n as ShortPayForfeit, T as TempoChannelReport, o as TempoObserverHealth, p as TempoSessionChannelMismatchError, U as UpfrontPaymentOpts, V as VerifiedIncomingPayment, q as VerifyIncomingSnapshot, X as X402BatchChannelObservation, r as X402FacilitatorHealth, s as X402SettlementEvidenceOutcome, t as X402SettlementRepair, u as X402SettlementRepairRefusal, v as X402SettlementRepaired, w as X402WedgedSettlement, x as X402WedgedSettlementPage, y as X402_BATCH_SETTLEMENT_MAINNET_NETWORK, z as abortJob, B as activePubkeySet, E as applyPaymentInfoToJob, G as assertRevenueReporterReady, H as buildPaymentErrorResponse, K as clearAccumulatorForDvm, N as createDVMServer, O as creditDepositPayload, Q as derivedFundCreditId, W as devModeSkipsPaymentVerification, Y as fromJobRecord, Z as fundedMicroFor, _ as hasPaymentProof, $ as hashLockKey, a0 as implicitCreditId, a1 as initLockPubkeyTable, a2 as initWalletAccumulatorTable, a3 as insertAccumulatorRows, a4 as isDerivedCreditId, a5 as isTerminal, a6 as isYieldMessage, a7 as issueUpfrontChallenges, a8 as loadLockPubkeyState, a9 as msatsToFiatMicro, aa as paymentErrorBody, ab as pinAskFiat, ac as priceFiatMicro, ad as processIncomingPayment, ae as providerMessage, af as pruneRetired, ag as repairX402ExactSettlementEffect, ah as resolveFxSnapshot, ai as resolvePriceFiat, aj as revenueReporterBannerState, ak as rotateLockPubkey, al as seedLockPubkeyState, am as toCreditTerms, an as toJobRecord, ao as unknownRouteNotFound, ap as verifyIncomingPayment, aq as verifyTempoSessionManagementCredential, ar as verifyUpfrontPayment, as as x402RequiredUsdcMicro, at as x402SettledShare } from '../credit-menu-DvV-IX3P.js';
11
- export { O as OutgoingMessage, S as StaleJobReapable, i as isStaleJobReapable } from '../job-store-CopBPkne.js';
9
+ import { C as ConsumedCredentialStore, L as LockPubkeyStateLoader } from '../credit-menu-CUJdCfpt.js';
10
+ export { A as AccumulatorPool, a as AppEnv, b as CreditFundingReport, D as DEFAULT_LOCK_PUBKEY_GRACE_SECONDS, F as FiatDenomination, c as FiatDenominationFailure, d as FundOnlyRequest, I as IncomingPaymentOpts, J as JobCancelledError, e as LockPubkeyPool, f as LockPubkeyState, M as MintHealthTracker, P as PAYMENT_PROOF_KEYS, g as PaymentErrorCode, h as PaymentErrorDetail, i as PaymentInfo, j as PostgresTempoChargeStore, R as ReporterBannerOpts, k as ResolvedFx, l as RevenueBootCheckOpts, S as SDKServerOpts, m as ServerJob, n as ShortPayForfeit, T as TempoChannelReport, o as TempoObserverHealth, p as TempoSessionChannelMismatchError, U as UpfrontPaymentOpts, V as VerifiedIncomingPayment, q as VerifyIncomingSnapshot, X as X402BatchChannelObservation, r as X402FacilitatorHealth, s as X402SettlementEvidenceOutcome, t as X402SettlementRepair, u as X402SettlementRepairRefusal, v as X402SettlementRepaired, w as X402WedgedSettlement, x as X402WedgedSettlementPage, y as X402_BATCH_SETTLEMENT_MAINNET_NETWORK, z as abortJob, B as activePubkeySet, E as applyPaymentInfoToJob, G as assertRevenueReporterReady, H as buildPaymentErrorResponse, K as clearAccumulatorForDvm, N as createDVMServer, O as creditDepositPayload, Q as derivedFundCreditId, W as devModeSkipsPaymentVerification, Y as fromJobRecord, Z as fundedMicroFor, _ as hasPaymentProof, $ as hashLockKey, a0 as implicitCreditId, a1 as initLockPubkeyTable, a2 as initWalletAccumulatorTable, a3 as insertAccumulatorRows, a4 as isDerivedCreditId, a5 as isTerminal, a6 as isYieldMessage, a7 as issueUpfrontChallenges, a8 as loadLockPubkeyState, a9 as msatsToFiatMicro, aa as paymentErrorBody, ab as pinAskFiat, ac as priceFiatMicro, ad as processIncomingPayment, ae as providerMessage, af as pruneRetired, ag as repairX402ExactSettlementEffect, ah as resolveFxSnapshot, ai as resolvePriceFiat, aj as revenueReporterBannerState, ak as rotateLockPubkey, al as seedLockPubkeyState, am as toCreditTerms, an as toJobRecord, ao as unknownRouteNotFound, ap as verifyIncomingPayment, aq as verifyTempoSessionManagementCredential, ar as verifyUpfrontPayment, as as x402RequiredUsdcMicro, at as x402SettledShare } from '../credit-menu-CUJdCfpt.js';
11
+ export { O as OutgoingMessage, S as StaleJobReapable, i as isStaleJobReapable } from '../job-store-DjgN2AOk.js';
12
12
  import { z } from 'zod';
13
- export { f as LockPubkeyStoreLockPubkey, t as lockPubkeyStoreToLockPubkey } from '../lightning-backend-IYYVkad1.js';
13
+ export { f as LockPubkeyStoreLockPubkey, t as lockPubkeyStoreToLockPubkey } from '../lightning-backend-DeasHNOP.js';
14
14
  import 'mppx';
15
15
  import '@x402/evm/batch-settlement/server';
16
16
  import '@x402/core/types';
17
17
  import 'viem';
18
18
  import '@cashu/cashu-ts';
19
- import '../fx-DmuqWgL-.js';
19
+ import '../fx-BvG2Wnjk.js';
20
20
 
21
21
  declare function verifyWithFacilitator(payload: PaymentPayload, requirements: PaymentRequirementsV1 | PaymentRequirementsV2, config?: Pick<X402Config, "facilitator" | "facilitatorAuth">, createAuthHeaders?: FacilitatorConfig["createAuthHeaders"] | undefined): Promise<VerifyResponse>;
22
22
  declare function settleWithFacilitator(payload: PaymentPayload, requirements: PaymentRequirementsV1 | PaymentRequirementsV2, config?: Pick<X402Config, "facilitator" | "facilitatorAuth">, createAuthHeaders?: FacilitatorConfig["createAuthHeaders"] | undefined): Promise<SettleResponse>;
@@ -61,7 +61,7 @@ import {
61
61
  verifyUpfrontPayment,
62
62
  x402RequiredUsdcMicro,
63
63
  x402SettledShare
64
- } from "../chunk-CBKQK2KI.js";
64
+ } from "../chunk-Z6EJOVIU.js";
65
65
  import {
66
66
  _testing,
67
67
  wrapMppx
@@ -74,7 +74,7 @@ import {
74
74
  verifyWithFacilitator
75
75
  } from "../chunk-XEOTTFLH.js";
76
76
  import "../chunk-FOJKZ4E7.js";
77
- import "../chunk-JUEEUV5X.js";
77
+ import "../chunk-KB7MEWBE.js";
78
78
  import "../chunk-YG7G4DPZ.js";
79
79
  import {
80
80
  SIGNED_ENVELOPE_FIELDS,
@@ -97,7 +97,7 @@ import {
97
97
  } from "../chunk-AFV77S4C.js";
98
98
  import {
99
99
  toLockPubkey
100
- } from "../chunk-QTH7CIA3.js";
100
+ } from "../chunk-XO5EUHCW.js";
101
101
  import "../chunk-62FI3NJF.js";
102
102
  import "../chunk-UKD3R2KU.js";
103
103
  import "../chunk-SX4WCPW7.js";
@@ -1,5 +1,5 @@
1
1
  import { ProofLike } from '@cashu/cashu-ts';
2
- import { a4 as Message, ai as FundingMethod, _ as FundingReceipt, bP as CreditSnapshot, $ as JobReceipt, ax as StepRecord, a0 as MessageType } from './step-cache-MUyQVNFX.js';
2
+ import { a5 as Message, aj as FundingMethod, $ as FundingReceipt, bQ as CreditSnapshot, a0 as JobReceipt, ay as StepRecord, a1 as MessageType } from './step-cache-C9JRSFhM.js';
3
3
 
4
4
  type JobStatus = "processing" | "completed" | "failed" | "awaiting-input" | "cancelled" | "working";
5
5
  interface JobRecord {
@@ -1,4 +1,4 @@
1
- import { W as JsonValue } from './step-cache-MUyQVNFX.js';
1
+ import { X as JsonValue } from './step-cache-C9JRSFhM.js';
2
2
 
3
3
  declare const lockPubkeyBrand: unique symbol;
4
4
  /**
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PostgresJobStore
3
- } from "./chunk-JUEEUV5X.js";
3
+ } from "./chunk-KB7MEWBE.js";
4
4
  import "./chunk-AFV77S4C.js";
5
5
  import "./chunk-BQJIFRAZ.js";
6
6
  import "./chunk-FXDQMJQ2.js";
@@ -1,15 +1,15 @@
1
- import { ad as CashuMode, bK as CreditDrainEnqueue, bL as HostedSettlementReportObligations, R as ResolvedCreditConfig, bM as DVMAuthScheme, z as SignedRequestDomain, bN as CreditLedgerLike, bO as X402RefundSettlementGate, bP as CreditSnapshot, bQ as DrawResult, bR as X402SettlementStatus, bS as X402UnresolvedRefund, bT as GrownDrawResult, bU as DrawResolution, bV as FundingRecord, _ as FundingReceipt, bW as CreditInvoiceRecord, bX as InvoiceSettlement, bY as BlockedInvoiceCursor, bZ as InvoiceReconciliation, b_ as InvoiceWriteOff, b$ as DrawRecord, c0 as StalePendingDrawCursor, c1 as TempoCreditLossEvidence, c2 as CreditLedgerQuerier, c3 as TempoCreditLoss, c4 as X402CreditLossEvidence, c5 as X402CreditLoss, c6 as DrainMethod, c7 as DrainRequestResult, c8 as BitcoinDepositLiability, bo as FundingLot, c9 as CreditDrainRecord, ca as ChannelDrainCursor, cb as DrainWriteOff, cc as DrainReleaseResult, cd as DrainFulfilment, ce as DrainTransitionResult, cf as HostingCleanupFence, $ as JobReceipt, a4 as Message, K as KVStore, F as SignedRequestReplayStore, Z as ZodLike, a as DVMDescriptor } from '../step-cache-MUyQVNFX.js';
2
- export { cg as CLIENT_COMPATIBILITY_HEADERS, d as CanonicalEnvelope, ch as ClientCompatibility, ci as ClientCompatibilityEnv, cj as ClientCompatibilityGate, ck as ClientCompatibilityRequirement, cl as ClientSemVer, e as CreateSignedRequestVerifierOpts, cm as CreditFundingBasis, cn as CreditInvoiceStatus, co as CreditLedger, cp as CreditLedgerError, cq as CreditLedgerErrorCode, cr as CreditLedgerErrorDetails, cs as CreditLedgerPool, ct as CreditStatus, cu as DRAIN_DELIVERY_RESERVE_SATS, cv as DVM_PROTOCOL_VERSION, cw as DrainConflictReason, cx as DrawRailValue, cy as DrawStatus, cz as JobCostReportPayload, cA as JobTerminalReportPayload, cB as PostgresX402ChannelStorage, cC as ReplayStoreBackend, cD as RevenueSkippedNoRailPayload, cE as RevenueSkippedNoRailReason, w as SIGNED_REQUEST_AUTH_ID, x as SIGNED_REQUEST_STATEMENT_VERSION, cF as Secp256k1AuthOpts, y as SignedRequestAudience, B as SignedRequestError, E as SignedRequestFailure, G as SignedRequestSignOpts, H as SignedRequestStatementHeader, M as SignedRequestVerifier, cG as X402ChannelStorageOpts, cH as X402RelayLockHolder, cI as X402RelaySubmissionLock, cJ as X402RelaySubmissionLockError, cK as allocateDrawValue, cL as clientCompatibilityAttributes, cM as clientCompatibilityMiddleware, cN as clientUpgradeRequired, N as createSignedRequestVerifier, cO as parseClientCapabilities, cP as parseClientCompatibility, cQ as parseDvmClient, cR as parseProtocolVersion, cS as requireClientCompatibility, cT as secp256k1Auth, cU as signedRequestInput, T as signedRequestStatementHeader } from '../step-cache-MUyQVNFX.js';
1
+ import { ae as CashuMode, bL as CreditDrainEnqueue, bM as HostedSettlementReportObligations, R as ResolvedCreditConfig, bN as DVMAuthScheme, B as SignedRequestDomain, bO as CreditLedgerLike, bP as X402RefundSettlementGate, bQ as CreditSnapshot, bR as DrawResult, bS as X402SettlementStatus, bT as X402UnresolvedRefund, bU as GrownDrawResult, bV as DrawResolution, bW as FundingRecord, $ as FundingReceipt, bX as CreditInvoiceRecord, bY as InvoiceSettlement, bZ as BlockedInvoiceCursor, b_ as InvoiceReconciliation, b$ as InvoiceWriteOff, c0 as DrawRecord, c1 as StalePendingDrawCursor, c2 as TempoCreditLossEvidence, c3 as CreditLedgerQuerier, c4 as TempoCreditLoss, c5 as X402CreditLossEvidence, c6 as X402CreditLoss, c7 as DrainMethod, c8 as DrainRequestResult, c9 as BitcoinDepositLiability, bp as FundingLot, ca as CreditDrainRecord, cb as ChannelDrainCursor, cc as DrainWriteOff, cd as DrainReleaseResult, ce as DrainFulfilment, cf as DrainTransitionResult, cg as HostingCleanupFence, a0 as JobReceipt, a5 as Message, K as KVStore, G as SignedRequestReplayStore, Z as ZodLike, a as DVMDescriptor } from '../step-cache-C9JRSFhM.js';
2
+ export { ch as CLIENT_COMPATIBILITY_HEADERS, d as CanonicalEnvelope, ci as ClientCompatibility, cj as ClientCompatibilityEnv, ck as ClientCompatibilityGate, cl as ClientCompatibilityRequirement, cm as ClientSemVer, f as CreateSignedRequestVerifierOpts, cn as CreditFundingBasis, co as CreditInvoiceStatus, cp as CreditLedger, cq as CreditLedgerError, cr as CreditLedgerErrorCode, cs as CreditLedgerErrorDetails, ct as CreditLedgerPool, cu as CreditStatus, cv as DRAIN_DELIVERY_RESERVE_SATS, cw as DVM_PROTOCOL_VERSION, cx as DrainConflictReason, cy as DrawRailValue, cz as DrawStatus, cA as JobCostReportPayload, cB as JobTerminalReportPayload, cC as PostgresX402ChannelStorage, cD as ReplayStoreBackend, cE as RevenueSkippedNoRailPayload, cF as RevenueSkippedNoRailReason, x as SIGNED_REQUEST_AUTH_ID, y as SIGNED_REQUEST_STATEMENT_VERSION, cG as Secp256k1AuthOpts, z as SignedRequestAudience, E as SignedRequestError, F as SignedRequestFailure, H as SignedRequestSignOpts, M as SignedRequestStatementHeader, N as SignedRequestVerifier, cH as X402ChannelStorageOpts, cI as X402RelayLockHolder, cJ as X402RelaySubmissionLock, cK as X402RelaySubmissionLockError, cL as allocateDrawValue, cM as clientCompatibilityAttributes, cN as clientCompatibilityMiddleware, cO as clientUpgradeRequired, O as createSignedRequestVerifier, cP as parseClientCapabilities, cQ as parseClientCompatibility, cR as parseDvmClient, cS as parseProtocolVersion, cT as requireClientCompatibility, cU as secp256k1Auth, cV as signedRequestInput, V as signedRequestStatementHeader } from '../step-cache-C9JRSFhM.js';
3
3
  import { Pool } from 'pg';
4
- import { au as CreditMenu, a as AppEnv, U as UpfrontPaymentOpts, i as PaymentInfo, av as ReceiptIssuer, aw as LightningReceive, ax as TempoSettlementReadiness, ay as DVMHostOpts, az as DVMServeResult, L as LockPubkeyStateLoader, C as ConsumedCredentialStore } from '../credit-menu-DvV-IX3P.js';
5
- export { aA as BuildCreditMenuArgs, aB as BuilderIdentity, aC as CREDIT_ENVELOPE_KEYS, aD as CreateX402BatchSettlementServerOpts, aE as CreditEnvelope, aF as CreditEnvelopeError, aG as CreditFundCommitment, aH as CreditTerms, aI as DEFAULT_INVOICE_TTL_SECONDS, aJ as DVMHost, aK as HostingClosureCommand, aL as HostingClosureEvidence, aM as HostingControlCommand, aN as HostingControlConfig, aO as HostingControlStatus, aP as JobManager, aQ as JobManagerOpts, aR as LightningReceiveConfig, aS as MIN_INVOICE_TTL_SECONDS, aT as MemoryConsumedCredentialStore, aU as MemoryConsumedCredentialStoreOpts, aV as MemoryProcessedPaymentStore, aW as MemoryX402ExactSettlementStore, aX as MountOpts, aY as OwnerDisplay, aZ as PaidJobCompletion, a_ as PaymentMode, a$ as PlatformReporterOpts, b0 as PostgresProcessedPaymentStore, b1 as PostgresX402ExactSettlementStore, b2 as PriceFiat, b3 as ProcessedPaymentQuerier, b4 as ProcessedPaymentRail, b5 as ProcessedPaymentRecord, b6 as ProcessedPaymentReplayError, b7 as ProcessedPaymentStore, b8 as X402BatchAcceptance, b9 as X402BatchFunding, ba as X402BatchRefusal, bb as X402BatchSettlementServer, bc as X402ExactAcceptance, bd as X402ExactIntentConflictError, be as X402ExactSettlementAttempt, bf as X402ExactSettlementChainEvidence, bg as X402ExactSettlementEffect, bh as X402ExactSettlementEvidenceMissingError, bi as X402ExactSettlementEvidenceReader, bj as X402ExactSettlementIntent, bk as X402ExactSettlementNotReadyError, bl as X402ExactSettlementServer, bm as X402ExactSettlementServerOpts, bn as X402ExactSettlementStatus, bo as X402ExactSettlementStore, bp as X402SettlementChainEvidence, bq as X402SettlementEvidenceReader, br as X402SettlementSubmissionError, bs as X402_BATCH_AUTO_SETTLEMENT, bt as X402_BATCH_MIN_WITHDRAW_DELAY_SECONDS, bu as X402_BATCH_SETTLEMENT_NETWORK, bv as attachCreditMenu, bw as buildCreditMenu, bx as createDVMHost, by as createX402BatchSettlementServer, bz as creditEnvelopeIgnoreFields, bA as drawSettlementRef, bB as extractCreditEnvelope, bC as fundingCommitment, bD as selectPrimaryCredit, bE as signHostingClosure, bF as signHostingControl, bG as stripCreditEnvelope, bH as toCreditView } from '../credit-menu-DvV-IX3P.js';
4
+ import { au as CreditMenu, a as AppEnv, U as UpfrontPaymentOpts, i as PaymentInfo, av as ReceiptIssuer, aw as LightningReceive, ax as TempoSettlementReadiness, ay as DVMHostOpts, az as DVMServeResult, L as LockPubkeyStateLoader, C as ConsumedCredentialStore } from '../credit-menu-CUJdCfpt.js';
5
+ export { aA as BuildCreditMenuArgs, aB as BuilderIdentity, aC as CREDIT_ENVELOPE_KEYS, aD as CreateX402BatchSettlementServerOpts, aE as CreditEnvelope, aF as CreditEnvelopeError, aG as CreditFundCommitment, aH as CreditTerms, aI as DEFAULT_INVOICE_TTL_SECONDS, aJ as DVMHost, aK as HostingClosureCommand, aL as HostingClosureEvidence, aM as HostingControlCommand, aN as HostingControlConfig, aO as HostingControlStatus, aP as JobManager, aQ as JobManagerOpts, aR as LightningReceiveConfig, aS as MIN_INVOICE_TTL_SECONDS, aT as MemoryConsumedCredentialStore, aU as MemoryConsumedCredentialStoreOpts, aV as MemoryProcessedPaymentStore, aW as MemoryX402ExactSettlementStore, aX as MountOpts, aY as OwnerDisplay, aZ as PaidJobCompletion, a_ as PaymentMode, a$ as PlatformReporterOpts, b0 as PostgresProcessedPaymentStore, b1 as PostgresX402ExactSettlementStore, b2 as PriceFiat, b3 as ProcessedPaymentQuerier, b4 as ProcessedPaymentRail, b5 as ProcessedPaymentRecord, b6 as ProcessedPaymentReplayError, b7 as ProcessedPaymentStore, b8 as X402BatchAcceptance, b9 as X402BatchFunding, ba as X402BatchRefusal, bb as X402BatchSettlementServer, bc as X402ExactAcceptance, bd as X402ExactIntentConflictError, be as X402ExactSettlementAttempt, bf as X402ExactSettlementChainEvidence, bg as X402ExactSettlementEffect, bh as X402ExactSettlementEvidenceMissingError, bi as X402ExactSettlementEvidenceReader, bj as X402ExactSettlementIntent, bk as X402ExactSettlementNotReadyError, bl as X402ExactSettlementServer, bm as X402ExactSettlementServerOpts, bn as X402ExactSettlementStatus, bo as X402ExactSettlementStore, bp as X402SettlementChainEvidence, bq as X402SettlementEvidenceReader, br as X402SettlementSubmissionError, bs as X402_BATCH_AUTO_SETTLEMENT, bt as X402_BATCH_MIN_WITHDRAW_DELAY_SECONDS, bu as X402_BATCH_SETTLEMENT_NETWORK, bv as attachCreditMenu, bw as buildCreditMenu, bx as createDVMHost, by as createX402BatchSettlementServer, bz as creditEnvelopeIgnoreFields, bA as drawSettlementRef, bB as extractCreditEnvelope, bC as fundingCommitment, bD as selectPrimaryCredit, bE as signHostingClosure, bF as signHostingControl, bG as stripCreditEnvelope, bH as toCreditView } from '../credit-menu-CUJdCfpt.js';
6
6
  import { Context, Hono } from 'hono';
7
7
  import { z } from 'zod';
8
- import { F as FxFetcher } from '../fx-DmuqWgL-.js';
9
- import { c as StreamableJobStore, R as ReceiptIssuingStore, J as JobRecord, d as RequestIdClaim, e as RequestIdClaimResult, f as JobRetentionCursor, O as OutgoingMessage, A as AppendOutgoingOptions, P as PaymentCreditDelta, V as VerifyAndCreditResult, g as JobCounters, b as JobStore } from '../job-store-CopBPkne.js';
10
- export { a as JobStatus, h as isStreamableJobStore } from '../job-store-CopBPkne.js';
11
- import { C as ContentHoldHistory, a as ContentHoldMutation } from '../content-retention-BL3uao3h.js';
12
- export { b as ContentHold, c as ContentHoldError, d as ContentHoldEvent, e as ContentHoldStore, f as ContentHoldsResponse, J as JobContentMetadata, g as baselineContentExpiry, h as contentMetadata, i as isContentHoldStore } from '../content-retention-BL3uao3h.js';
8
+ import { F as FxFetcher } from '../fx-BvG2Wnjk.js';
9
+ import { c as StreamableJobStore, R as ReceiptIssuingStore, J as JobRecord, d as RequestIdClaim, e as RequestIdClaimResult, f as JobRetentionCursor, O as OutgoingMessage, A as AppendOutgoingOptions, P as PaymentCreditDelta, V as VerifyAndCreditResult, g as JobCounters, b as JobStore } from '../job-store-DjgN2AOk.js';
10
+ export { a as JobStatus, h as isStreamableJobStore } from '../job-store-DjgN2AOk.js';
11
+ import { C as ContentHoldHistory, a as ContentHoldMutation } from '../content-retention-U7dJM7Ph.js';
12
+ export { b as ContentHold, c as ContentHoldError, d as ContentHoldEvent, e as ContentHoldStore, f as ContentHoldsResponse, J as JobContentMetadata, g as baselineContentExpiry, h as contentMetadata, i as isContentHoldStore } from '../content-retention-U7dJM7Ph.js';
13
13
  export { P as PinnedFetch, S as SSRFError, a as SSRFGuardOpts, b as SSRFReason, c as SSRFResolver, d as assertSafeUrl, e as createPinnedFetch } from '../ssrf-dMooihtY.js';
14
14
  import { Env, BlankSchema } from 'hono/types';
15
15
  import 'mppx';
@@ -17,7 +17,7 @@ import '@x402/core/server';
17
17
  import '@x402/evm/batch-settlement/server';
18
18
  import '@x402/core/types';
19
19
  import 'viem';
20
- import '../lightning-backend-IYYVkad1.js';
20
+ import '../lightning-backend-DeasHNOP.js';
21
21
  import '@cashu/cashu-ts';
22
22
 
23
23
  /** Lifetime of a per-call implicit credit before the ledger refuses new draws. */
@@ -377,7 +377,8 @@ declare class PostgresJobStore implements StreamableJobStore, ReceiptIssuingStor
377
377
  listUnreportedTerminalReports(dvmId: string, capabilities: string[] | null, afterJobId?: string): Promise<JobRecord[]>;
378
378
  /**
379
379
  * Read terminal zero-revenue jobs whose latest declared-cost revision has
380
- * not yet reached the durable reporter outbox.
380
+ * not yet reached the durable reporter outbox. Keep the filter in step with
381
+ * `idx_jobs_unreported_terminal_cost`, which bounds each pass to the backlog.
381
382
  */
382
383
  listUnreportedTerminalCosts(args: {
383
384
  dvmId: string;
@@ -80,7 +80,7 @@ import {
80
80
  stripProtocolEnvelope,
81
81
  toCreditView,
82
82
  unknownRouteNotFound
83
- } from "../chunk-CBKQK2KI.js";
83
+ } from "../chunk-Z6EJOVIU.js";
84
84
  import {
85
85
  TEMPO_MODERATO_CHAIN_ID,
86
86
  TEMPO_MODERATO_RPC,
@@ -95,7 +95,7 @@ import {
95
95
  } from "../chunk-FOJKZ4E7.js";
96
96
  import {
97
97
  PostgresJobStore
98
- } from "../chunk-JUEEUV5X.js";
98
+ } from "../chunk-KB7MEWBE.js";
99
99
  import "../chunk-YG7G4DPZ.js";
100
100
  import {
101
101
  SignedRequestError,
@@ -116,7 +116,7 @@ import {
116
116
  IMPLICIT_CREDIT_TTL_MS,
117
117
  generateEphemeralReceiptKey,
118
118
  receiptPubkeyFromSecret
119
- } from "../chunk-QTH7CIA3.js";
119
+ } from "../chunk-XO5EUHCW.js";
120
120
  import {
121
121
  X402_DEFAULT_FACILITATOR,
122
122
  X402_DEFAULT_NETWORK,
@@ -1147,7 +1147,7 @@ function createDVMHost(opts = {}) {
1147
1147
  });
1148
1148
  applyRetryToPool(pool, "dvm-host");
1149
1149
  pgPool = pool;
1150
- const { PostgresJobStore: PostgresJobStore2 } = await import("../postgres-job-store-E6AUHNKB.js");
1150
+ const { PostgresJobStore: PostgresJobStore2 } = await import("../postgres-job-store-3YBSGLYU.js");
1151
1151
  const pgJobStore = new PostgresJobStore2(pool);
1152
1152
  pendingInits.push(pgJobStore.init(), pgJobStore.initStreaming());
1153
1153
  jobStore = pgJobStore;
@@ -5341,6 +5341,21 @@ interface IncomingMessage {
5341
5341
  */
5342
5342
  type PriceValue = string;
5343
5343
  type PaymentMethod = "cashu" | "x402" | "tempo";
5344
+ /**
5345
+ * One line of a capability's published rate card, declared on `CapabilityConfig.rates`.
5346
+ * Example: `{ label: "balanced", amount: "0.00015", currency: "USD", per: "character" }`.
5347
+ *
5348
+ * `amount` is decimal dollars written as a string (`/^\d+(\.\d+)?$/`, above
5349
+ * zero, at most 12 characters). `per` names the unit and `label` optionally
5350
+ * names a tier; each is 1 to 24 characters with no leading or trailing
5351
+ * whitespace. `/v1/info` publishes the entries exactly as written, in order.
5352
+ */
5353
+ interface CapabilityRate {
5354
+ label?: string;
5355
+ amount: string;
5356
+ currency: "USD";
5357
+ per: string;
5358
+ }
5344
5359
  /**
5345
5360
  * Rails that may fund a prepaid **credit**.
5346
5361
  *
@@ -5477,6 +5492,16 @@ interface CapabilityConfig<State = Record<string, unknown>, InputSchema extends
5477
5492
  /** Static price — a USD literal ("$0.05"). Free capabilities omit this and `onQuote`. */
5478
5493
  price?: PriceValue;
5479
5494
  onQuote?: QuoteConfig;
5495
+ /**
5496
+ * Rate card published on `/v1/info` as `pricing.rates`: 1 to 5
5497
+ * {@link CapabilityRate} entries, exactly as declared. Allowed only on a
5498
+ * priced capability (`price` or `onQuote`); a free capability that declares
5499
+ * rates is refused when the server starts, as is any entry outside the
5500
+ * limits on {@link CapabilityRate} or carrying another key. For a quoted
5501
+ * capability the rates describe how the quote is computed; they never
5502
+ * change the quote itself.
5503
+ */
5504
+ rates?: CapabilityRate[];
5480
5505
  /** Handle a newly submitted job for this capability (required). */
5481
5506
  onJob: (ctx: SDKJobContext<State, InputType<InputSchema>>) => void | Promise<void>;
5482
5507
  /** Handle a client response to a prompt within a job of this capability. */
@@ -5508,6 +5533,8 @@ interface CapabilityDescriptor<State = unknown, InputSchema extends ZodLike | un
5508
5533
  /** Static price — a USD literal ("$0.05"). Undefined for dynamic-priced or free. */
5509
5534
  readonly price?: PriceValue;
5510
5535
  readonly onQuote?: QuoteConfig;
5536
+ /** Rate card published on `/v1/info`. See `CapabilityConfig.rates`. */
5537
+ readonly rates?: CapabilityRate[];
5511
5538
  readonly onJob: (ctx: SDKJobContext<State, InputType<InputSchema>>) => void | Promise<void>;
5512
5539
  /** Handle a client response to a prompt. */
5513
5540
  readonly onResponse?: (ctx: SDKJobContext<State, InputType<InputSchema>>, content: ResponseContent) => void | Promise<void>;
@@ -5647,6 +5674,8 @@ interface DVMConfig<State = Record<string, unknown>, InputSchema extends ZodLike
5647
5674
  onMessage?(ctx: SDKJobContext<State, InputType<InputSchema>>, msg: IncomingMessage): void | Promise<void>;
5648
5675
  /** Quote handler for dynamic pricing. Flat shape only. */
5649
5676
  onQuote?: QuoteConfig;
5677
+ /** Rate card published on `/v1/info`. Flat shape only — see `CapabilityConfig.rates`. */
5678
+ rates?: CapabilityRate[];
5650
5679
  /** Payment methods this DVM accepts. Default: derived from configured rails — adds "cashu" when `mints` is set, "x402" when `x402` is set, "tempo" when `tempo` is set. */
5651
5680
  paymentMethods?: PaymentMethod[];
5652
5681
  /** x402 stablecoin payment configuration (provider-side). */
@@ -5781,4 +5810,4 @@ declare class StepCache {
5781
5810
  static deserialize(records: StepRecord[]): StepCache;
5782
5811
  }
5783
5812
 
5784
- export { type JobReceipt as $, type ApprovalContent as A, SignedRequestError as B, type Currency as C, type DVMConfig as D, type SignedRequestFailure as E, type SignedRequestReplayStore as F, type SignedRequestSignOpts as G, type SignedRequestStatementHeader as H, type IncomingMessage as I, type JobCost as J, type KVStore as K, type Logger as L, type SignedRequestVerifier as M, createSignedRequestVerifier as N, isZodSchema as O, type PaymentContent as P, type QuoteConfig as Q, type ResolvedCreditConfig as R, type SDKJobContext as S, signedRequestStatementHeader as T, UnsupportedCurrencyError as U, validateCurrency as V, type JsonValue as W, X402_BATCH_SETTLEMENT_SCHEME as X, X402_EXACT_SCHEME as Y, type ZodLike as Z, type FundingReceipt as _, type DVMDescriptor as a, isDrainReceipt as a$, type MessageType as a0, type X402Version as a1, type MppxCredential as a2, type PaymentRequired as a3, type Message as a4, type MppxChallenge as a5, type ReceiptCredit as a6, type DrainReceipt as a7, type X402Wallet as a8, type PaymentRequirementsV1 as a9, type UnsignedFundingReceipt as aA, type UnsignedJobReceipt as aB, type VerifyResponse as aC, type WorkingContent as aD, type X402Config$1 as aE, type X402ResponseBody as aF, type X402SelfRelayRpcFailureReason as aG, X402_DEFAULT_NETWORK as aH, X402_V1_VERSION as aI, X402_VERSION as aJ, buildPaymentRequiredV2 as aK, buildPaymentRequirements as aL, caip2ToX402Network as aM, canonicalRequestPath as aN, canonicaliseForSigning as aO, canonicalize as aP, chainIdFromCaip2 as aQ, computeResultHash as aR, decodePayment as aS, decodePaymentRequiredHeader as aT, encodePayment as aU, encodePaymentRequiredHeader as aV, encodeSettleResponseHeader as aW, exactEvmAuthorization as aX, isArtifactMessage as aY, isCancelMessage as aZ, isCompleteMessage as a_, type PaymentRequirementsV2 as aa, type BuildPaymentRequirementsOpts as ab, type CapabilityDescriptor as ac, type CashuMode as ad, type CompleteContent as ae, type DrainReceiptEvent as af, type ExactEvmPayload as ag, type ExactEvmPayloadAuthorization as ah, type FundingMethod as ai, type MessageFrom as aj, type PaymentPayload as ak, type PaymentPayloadV1 as al, type PaymentPayloadV2 as am, type PaymentRequestContent as an, type PaymentRequiredV2 as ao, type PaymentRequirements as ap, type PromptContent as aq, RAIL_REFUNDABLE as ar, type ReceiptOutcome as as, type ReceiptPayment as at, type ResourceInfo as au, type SettleResponse as av, StepCache as aw, type StepRecord as ax, type TextContent as ay, type UnsignedDrainReceipt as az, type ArtifactContent as b, type DrawRecord as b$, isFundingReceipt as b0, isPaymentRequestMessage as b1, isPromptMessage as b2, isSignedJobReceipt as b3, isTextMessage as b4, isWorkingMessage as b5, paymentRequiredV2FromV1 as b6, signDrainReceipt as b7, signFundingReceipt as b8, signReceipt as b9, _testing as bA, createDefaultReplayStore as bB, depleteLots as bC, fifoOrder as bD, inKindDrawMsats as bE, isInKindDepletion as bF, isNonChannelBitcoinRail as bG, lotOwedSats as bH, netOwedSats as bI, wrapMppx as bJ, type CreditDrainEnqueue as bK, HostedSettlementReportObligations as bL, type DVMAuthScheme as bM, type CreditLedgerLike as bN, type X402RefundSettlementGate as bO, type CreditSnapshot as bP, type DrawResult as bQ, type X402SettlementStatus as bR, type X402UnresolvedRefund as bS, type GrownDrawResult as bT, type DrawResolution as bU, type FundingRecord as bV, type CreditInvoiceRecord as bW, type InvoiceSettlement as bX, type BlockedInvoiceCursor as bY, type InvoiceReconciliation as bZ, type InvoiceWriteOff as b_, usdcContractByCaip2 as ba, usdcContractFor as bb, usdcDomainNameFor as bc, usdcDomainVersionFor as bd, verifyDrainReceipt as be, verifyFundingReceipt as bf, verifyReceipt as bg, x402NetworkToCaip2 as bh, type X402ExactVersionSupport as bi, type X402Receipt as bj, type TransactionalPayoutHook as bk, type CashuMeltCompleted as bl, type CreditDepositPayload as bm, type CreditDrainPayload as bn, type FundingLot as bo, type LotDebit as bp, type LotDepletion as bq, type MppxServer as br, NON_CHANNEL_BITCOIN_RAILS as bs, type NonChannelBitcoinRail as bt, PayoutReporter as bu, PostgresTempoSessionStore as bv, RevenueReporter as bw, SIGNED_ENVELOPE_FIELDS as bx, SIGNED_ENVELOPE_TYPES as by, type X402TrackedChannel as bz, type CancelContent as c, type X402BatchSettlementConfig as c$, type StalePendingDrawCursor as c0, type TempoCreditLossEvidence as c1, type CreditLedgerQuerier as c2, type TempoCreditLoss as c3, type X402CreditLossEvidence as c4, type X402CreditLoss as c5, type DrainMethod as c6, type DrainRequestResult as c7, type BitcoinDepositLiability as c8, type CreditDrainRecord as c9, type JobTerminalReportPayload as cA, PostgresX402ChannelStorage as cB, type ReplayStoreBackend as cC, type RevenueSkippedNoRailPayload as cD, type RevenueSkippedNoRailReason as cE, type Secp256k1AuthOpts as cF, type X402ChannelStorageOpts as cG, type X402RelayLockHolder as cH, type X402RelaySubmissionLock as cI, X402RelaySubmissionLockError as cJ, allocateDrawValue as cK, clientCompatibilityAttributes as cL, clientCompatibilityMiddleware as cM, clientUpgradeRequired as cN, parseClientCapabilities as cO, parseClientCompatibility as cP, parseDvmClient as cQ, parseProtocolVersion as cR, requireClientCompatibility as cS, secp256k1Auth as cT, signedRequestInput as cU, type HostedIntent as cV, type X402SettlementIntent as cW, type HostedFundingReservation as cX, type X402SettlementCursor as cY, type X402SettlementWriteOff as cZ, type X402FacilitatorAuth as c_, type ChannelDrainCursor as ca, type DrainWriteOff as cb, type DrainReleaseResult as cc, type DrainFulfilment as cd, type DrainTransitionResult as ce, HostingCleanupFence as cf, CLIENT_COMPATIBILITY_HEADERS as cg, type ClientCompatibility as ch, type ClientCompatibilityEnv as ci, type ClientCompatibilityGate as cj, type ClientCompatibilityRequirement as ck, type ClientSemVer as cl, type CreditFundingBasis as cm, type CreditInvoiceStatus as cn, CreditLedger as co, CreditLedgerError as cp, type CreditLedgerErrorCode as cq, type CreditLedgerErrorDetails as cr, type CreditLedgerPool as cs, type CreditStatus as ct, DRAIN_DELIVERY_RESERVE_SATS as cu, DVM_PROTOCOL_VERSION as cv, type DrainConflictReason as cw, type DrawRailValue as cx, type DrawStatus as cy, type JobCostReportPayload as cz, type CanonicalEnvelope as d, type X402PayoutObserver as d0, type CreditDepositEnqueue as d1, type X402SettlementReconciliationReason as d2, type CreditDrawReleaseEnqueue as d3, type CreateSignedRequestVerifierOpts as e, type CreditConfig as f, type CreditView as g, DEFAULT_CREDIT_MAX as h, DEFAULT_CREDIT_MIN as i, DEFAULT_CREDIT_TTL_SECONDS as j, DEFAULT_JOB_RETENTION_DAYS as k, type DVMRouteContext as l, type InputType as m, InvalidCurrencyError as n, type PaymentMethod as o, type PriceValue as p, type ProgressContent as q, type PromptOpts as r, type QuoteContext as s, type QuoteResult as t, type ResponseContent as u, type SDKPaymentRequestOpts as v, SIGNED_REQUEST_AUTH_ID as w, SIGNED_REQUEST_STATEMENT_VERSION as x, type SignedRequestAudience as y, type SignedRequestDomain as z };
5813
+ export { type FundingReceipt as $, type ApprovalContent as A, type SignedRequestDomain as B, type Currency as C, type DVMConfig as D, SignedRequestError as E, type SignedRequestFailure as F, type SignedRequestReplayStore as G, type SignedRequestSignOpts as H, type IncomingMessage as I, type JobCost as J, type KVStore as K, type Logger as L, type SignedRequestStatementHeader as M, type SignedRequestVerifier as N, createSignedRequestVerifier as O, type PaymentContent as P, type QuoteConfig as Q, type ResolvedCreditConfig as R, type SDKJobContext as S, isZodSchema as T, UnsupportedCurrencyError as U, signedRequestStatementHeader as V, validateCurrency as W, type JsonValue as X, X402_BATCH_SETTLEMENT_SCHEME as Y, type ZodLike as Z, X402_EXACT_SCHEME as _, type DVMDescriptor as a, isCompleteMessage as a$, type JobReceipt as a0, type MessageType as a1, type X402Version as a2, type MppxCredential as a3, type PaymentRequired as a4, type Message as a5, type MppxChallenge as a6, type ReceiptCredit as a7, type DrainReceipt as a8, type X402Wallet as a9, type UnsignedDrainReceipt as aA, type UnsignedFundingReceipt as aB, type UnsignedJobReceipt as aC, type VerifyResponse as aD, type WorkingContent as aE, type X402Config$1 as aF, type X402ResponseBody as aG, type X402SelfRelayRpcFailureReason as aH, X402_DEFAULT_NETWORK as aI, X402_V1_VERSION as aJ, X402_VERSION as aK, buildPaymentRequiredV2 as aL, buildPaymentRequirements as aM, caip2ToX402Network as aN, canonicalRequestPath as aO, canonicaliseForSigning as aP, canonicalize as aQ, chainIdFromCaip2 as aR, computeResultHash as aS, decodePayment as aT, decodePaymentRequiredHeader as aU, encodePayment as aV, encodePaymentRequiredHeader as aW, encodeSettleResponseHeader as aX, exactEvmAuthorization as aY, isArtifactMessage as aZ, isCancelMessage as a_, type PaymentRequirementsV1 as aa, type PaymentRequirementsV2 as ab, type BuildPaymentRequirementsOpts as ac, type CapabilityDescriptor as ad, type CashuMode as ae, type CompleteContent as af, type DrainReceiptEvent as ag, type ExactEvmPayload as ah, type ExactEvmPayloadAuthorization as ai, type FundingMethod as aj, type MessageFrom as ak, type PaymentPayload as al, type PaymentPayloadV1 as am, type PaymentPayloadV2 as an, type PaymentRequestContent as ao, type PaymentRequiredV2 as ap, type PaymentRequirements as aq, type PromptContent as ar, RAIL_REFUNDABLE as as, type ReceiptOutcome as at, type ReceiptPayment as au, type ResourceInfo as av, type SettleResponse as aw, StepCache as ax, type StepRecord as ay, type TextContent as az, type ArtifactContent as b, type InvoiceWriteOff as b$, isDrainReceipt as b0, isFundingReceipt as b1, isPaymentRequestMessage as b2, isPromptMessage as b3, isSignedJobReceipt as b4, isTextMessage as b5, isWorkingMessage as b6, paymentRequiredV2FromV1 as b7, signDrainReceipt as b8, signFundingReceipt as b9, type X402TrackedChannel as bA, _testing as bB, createDefaultReplayStore as bC, depleteLots as bD, fifoOrder as bE, inKindDrawMsats as bF, isInKindDepletion as bG, isNonChannelBitcoinRail as bH, lotOwedSats as bI, netOwedSats as bJ, wrapMppx as bK, type CreditDrainEnqueue as bL, HostedSettlementReportObligations as bM, type DVMAuthScheme as bN, type CreditLedgerLike as bO, type X402RefundSettlementGate as bP, type CreditSnapshot as bQ, type DrawResult as bR, type X402SettlementStatus as bS, type X402UnresolvedRefund as bT, type GrownDrawResult as bU, type DrawResolution as bV, type FundingRecord as bW, type CreditInvoiceRecord as bX, type InvoiceSettlement as bY, type BlockedInvoiceCursor as bZ, type InvoiceReconciliation as b_, signReceipt as ba, usdcContractByCaip2 as bb, usdcContractFor as bc, usdcDomainNameFor as bd, usdcDomainVersionFor as be, verifyDrainReceipt as bf, verifyFundingReceipt as bg, verifyReceipt as bh, x402NetworkToCaip2 as bi, type X402ExactVersionSupport as bj, type X402Receipt as bk, type TransactionalPayoutHook as bl, type CashuMeltCompleted as bm, type CreditDepositPayload as bn, type CreditDrainPayload as bo, type FundingLot as bp, type LotDebit as bq, type LotDepletion as br, type MppxServer as bs, NON_CHANNEL_BITCOIN_RAILS as bt, type NonChannelBitcoinRail as bu, PayoutReporter as bv, PostgresTempoSessionStore as bw, RevenueReporter as bx, SIGNED_ENVELOPE_FIELDS as by, SIGNED_ENVELOPE_TYPES as bz, type CancelContent as c, type X402FacilitatorAuth as c$, type DrawRecord as c0, type StalePendingDrawCursor as c1, type TempoCreditLossEvidence as c2, type CreditLedgerQuerier as c3, type TempoCreditLoss as c4, type X402CreditLossEvidence as c5, type X402CreditLoss as c6, type DrainMethod as c7, type DrainRequestResult as c8, type BitcoinDepositLiability as c9, type JobCostReportPayload as cA, type JobTerminalReportPayload as cB, PostgresX402ChannelStorage as cC, type ReplayStoreBackend as cD, type RevenueSkippedNoRailPayload as cE, type RevenueSkippedNoRailReason as cF, type Secp256k1AuthOpts as cG, type X402ChannelStorageOpts as cH, type X402RelayLockHolder as cI, type X402RelaySubmissionLock as cJ, X402RelaySubmissionLockError as cK, allocateDrawValue as cL, clientCompatibilityAttributes as cM, clientCompatibilityMiddleware as cN, clientUpgradeRequired as cO, parseClientCapabilities as cP, parseClientCompatibility as cQ, parseDvmClient as cR, parseProtocolVersion as cS, requireClientCompatibility as cT, secp256k1Auth as cU, signedRequestInput as cV, type HostedIntent as cW, type X402SettlementIntent as cX, type HostedFundingReservation as cY, type X402SettlementCursor as cZ, type X402SettlementWriteOff as c_, type CreditDrainRecord as ca, type ChannelDrainCursor as cb, type DrainWriteOff as cc, type DrainReleaseResult as cd, type DrainFulfilment as ce, type DrainTransitionResult as cf, HostingCleanupFence as cg, CLIENT_COMPATIBILITY_HEADERS as ch, type ClientCompatibility as ci, type ClientCompatibilityEnv as cj, type ClientCompatibilityGate as ck, type ClientCompatibilityRequirement as cl, type ClientSemVer as cm, type CreditFundingBasis as cn, type CreditInvoiceStatus as co, CreditLedger as cp, CreditLedgerError as cq, type CreditLedgerErrorCode as cr, type CreditLedgerErrorDetails as cs, type CreditLedgerPool as ct, type CreditStatus as cu, DRAIN_DELIVERY_RESERVE_SATS as cv, DVM_PROTOCOL_VERSION as cw, type DrainConflictReason as cx, type DrawRailValue as cy, type DrawStatus as cz, type CanonicalEnvelope as d, type X402BatchSettlementConfig as d0, type X402PayoutObserver as d1, type CreditDepositEnqueue as d2, type X402SettlementReconciliationReason as d3, type CreditDrawReleaseEnqueue as d4, type CapabilityRate as e, type CreateSignedRequestVerifierOpts as f, type CreditConfig as g, type CreditView as h, DEFAULT_CREDIT_MAX as i, DEFAULT_CREDIT_MIN as j, DEFAULT_CREDIT_TTL_SECONDS as k, DEFAULT_JOB_RETENTION_DAYS as l, type DVMRouteContext as m, type InputType as n, InvalidCurrencyError as o, type PaymentMethod as p, type PriceValue as q, type ProgressContent as r, type PromptOpts as s, type QuoteContext as t, type QuoteResult as u, type ResponseContent as v, type SDKPaymentRequestOpts as w, SIGNED_REQUEST_AUTH_ID as x, SIGNED_REQUEST_STATEMENT_VERSION as y, type SignedRequestAudience as z };
@@ -1,6 +1,6 @@
1
- import { C as ContentHoldHistory, a as ContentHoldMutation } from '../content-retention-BL3uao3h.js';
2
- import { $ as JobReceipt, a4 as Message, a0 as MessageType, K as KVStore, L as Logger, u as ResponseContent, P as PaymentContent, S as SDKJobContext } from '../step-cache-MUyQVNFX.js';
3
- import { c as StreamableJobStore, R as ReceiptIssuingStore, J as JobRecord, d as RequestIdClaim, e as RequestIdClaimResult, f as JobRetentionCursor, O as OutgoingMessage, A as AppendOutgoingOptions, P as PaymentCreditDelta, V as VerifyAndCreditResult, g as JobCounters } from '../job-store-CopBPkne.js';
1
+ import { C as ContentHoldHistory, a as ContentHoldMutation } from '../content-retention-U7dJM7Ph.js';
2
+ import { a0 as JobReceipt, a5 as Message, a1 as MessageType, K as KVStore, L as Logger, v as ResponseContent, P as PaymentContent, S as SDKJobContext } from '../step-cache-C9JRSFhM.js';
3
+ import { c as StreamableJobStore, R as ReceiptIssuingStore, J as JobRecord, d as RequestIdClaim, e as RequestIdClaimResult, f as JobRetentionCursor, O as OutgoingMessage, A as AppendOutgoingOptions, P as PaymentCreditDelta, V as VerifyAndCreditResult, g as JobCounters } from '../job-store-DjgN2AOk.js';
4
4
  import 'hono';
5
5
  import 'mppx';
6
6
  import '@x402/core/server';
@@ -1,4 +1,4 @@
1
- import { C as Currency } from './step-cache-MUyQVNFX.js';
1
+ import { C as Currency } from './step-cache-C9JRSFhM.js';
2
2
 
3
3
  /**
4
4
  * Thrown by `fiatToSatsCeil` / `satsToFiat` when the supplied `ratePerBtc` is
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dvmkit/sdk",
3
- "version": "0.7.0-rc.6",
3
+ "version": "0.7.0-rc.8",
4
4
  "description": "SDK for building accountless, pay-per-use Digital Vending Machines",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {