@dvmkit/sdk 0.10.0 → 0.11.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/{chunk-3Q6FTZDB.js → chunk-3YFFZLW7.js} +2 -2
  2. package/dist/{chunk-YOSZIWC3.js → chunk-55DVLBCD.js} +135 -8
  3. package/dist/{chunk-VMHYGKWT.js → chunk-566CFXGU.js} +9 -1
  4. package/dist/chunk-5H7P3ORL.js +92 -0
  5. package/dist/{chunk-3R7NQA3Z.js → chunk-7KQLPVV7.js} +1 -1
  6. package/dist/{chunk-QNKK7SPY.js → chunk-AIQGF52I.js} +350 -71
  7. package/dist/{chunk-JNECYURT.js → chunk-D4FFS3IS.js} +1 -1
  8. package/dist/{chunk-VTHYQCDB.js → chunk-E7ZBCT5U.js} +1 -1
  9. package/dist/{chunk-MMGSYMIC.js → chunk-EP7OVWI5.js} +1 -1
  10. package/dist/{chunk-LDIPVPKI.js → chunk-FFRTAQUW.js} +1 -1
  11. package/dist/chunk-H3GGFEE5.js +57 -0
  12. package/dist/{chunk-M3T5JYDJ.js → chunk-HNXMWHLU.js} +1 -1
  13. package/dist/{chunk-Y6DO5WSO.js → chunk-HQPQ4PFI.js} +43 -21
  14. package/dist/{chunk-UKD3R2KU.js → chunk-HW2UCOOC.js} +4 -55
  15. package/dist/{chunk-FFXXGCVG.js → chunk-ITRSITFP.js} +1 -1
  16. package/dist/{chunk-MU3IE434.js → chunk-JLT2YIBS.js} +267 -52
  17. package/dist/{chunk-STJBBVNL.js → chunk-K2ZNIQZP.js} +458 -69
  18. package/dist/{chunk-KFCEXCZM.js → chunk-KJZVTWMX.js} +1 -1
  19. package/dist/{chunk-W3VGCNG6.js → chunk-LDKV4UHI.js} +1 -1
  20. package/dist/{chunk-AJ6UHXUA.js → chunk-M4NFYEEY.js} +1 -1
  21. package/dist/{chunk-MB6R4XPZ.js → chunk-NS2OMIU7.js} +15 -3
  22. package/dist/{chunk-VUGEEMLT.js → chunk-RPUFWIT4.js} +11 -89
  23. package/dist/{chunk-EWZFANHJ.js → chunk-VWIMQ5H5.js} +1 -1
  24. package/dist/{chunk-2XQLL6N6.js → chunk-WFCVS6QB.js} +2 -2
  25. package/dist/{chunk-QGNXYVBO.js → chunk-Z4FOPROB.js} +17 -0
  26. package/dist/{content-retention-CrILCNxk.d.ts → content-retention-ySTD1wwZ.d.ts} +1 -1
  27. package/dist/{credit-ledger-4PZNAMDT.js → credit-ledger-4CBYLSLY.js} +6 -3
  28. package/dist/{credit-menu-VwX_6KM7.d.ts → credit-menu-BYySnZBk.d.ts} +6 -4
  29. package/dist/{fx-BM5h4o5S.d.ts → fx-DVTNs9q1.d.ts} +1 -1
  30. package/dist/index.d.ts +5 -5
  31. package/dist/index.js +6 -5
  32. package/dist/internal/caller.d.ts +6 -6
  33. package/dist/internal/caller.js +26 -22
  34. package/dist/internal/server.d.ts +7 -7
  35. package/dist/internal/server.js +24 -22
  36. package/dist/{job-store-92v8e1LQ.d.ts → job-store-DRwXCJDI.d.ts} +1 -1
  37. package/dist/{lightning-backend-9oky_wJi.d.ts → lightning-backend-BX5YvjnM.d.ts} +1 -1
  38. package/dist/memory-credit-ledger-DKCN7FY2.js +14 -0
  39. package/dist/{mpp-setup-FURD45LI.js → mpp-setup-JU3MT7QX.js} +3 -3
  40. package/dist/{payout-reporter-HVJ6WUF3.js → payout-reporter-NXWQVKXW.js} +2 -2
  41. package/dist/{postgres-consumed-credential-store-WO6OCFXZ.js → postgres-consumed-credential-store-WXJLM6J7.js} +1 -1
  42. package/dist/{postgres-job-store-FSRUPYH2.js → postgres-job-store-WIIVRZPD.js} +2 -2
  43. package/dist/{postgres-replay-store-XXJSA457.js → postgres-replay-store-QJ4FG6AR.js} +2 -2
  44. package/dist/{pricing-X4XU5HXY.js → pricing-KCLENT2C.js} +3 -3
  45. package/dist/{revenue-reporter-EV3K5L6B.js → revenue-reporter-HD4GMXGD.js} +2 -2
  46. package/dist/server/index.d.ts +29 -12
  47. package/dist/server/index.js +31 -29
  48. package/dist/{step-cache--7yA5Ihr.d.ts → step-cache-d-VKen4K.d.ts} +147 -13
  49. package/dist/{tempo-charge-store-5JOIYUIH.js → tempo-charge-store-7LTUAQHQ.js} +2 -2
  50. package/dist/{tempo-session-store-S6QMLQUA.js → tempo-session-store-LYAIDR2B.js} +3 -3
  51. package/dist/testing/index.d.ts +3 -3
  52. package/dist/testing/index.js +6 -6
  53. package/dist/{usd-C7lvLvLk.d.ts → usd-DSroMJ--.d.ts} +1 -1
  54. package/dist/{x402-EN5LSOVM.js → x402-RUJ4LUKF.js} +3 -3
  55. package/package.json +1 -1
  56. package/recipes/postgres/financial-export-v1.sql +19 -5
  57. package/dist/memory-credit-ledger-RP7DT5IY.js +0 -11
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-FUJ36YDV.js";
9
9
  import {
10
10
  loggers
11
- } from "./chunk-M3T5JYDJ.js";
11
+ } from "./chunk-HNXMWHLU.js";
12
12
 
13
13
  // src/sdk/server/job-store.ts
14
14
  function accumulateAskedTopUp(prior, ask) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  diagnosticConsole
3
- } from "./chunk-QGNXYVBO.js";
3
+ } from "./chunk-Z4FOPROB.js";
4
4
 
5
5
  // src/sdk/pricing/currency.ts
6
6
  var InvalidCurrencyError = class extends Error {
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  diagnosticConsole,
6
6
  projectSpanRow
7
- } from "./chunk-QGNXYVBO.js";
7
+ } from "./chunk-Z4FOPROB.js";
8
8
 
9
9
  // src/lib/x402/env.ts
10
10
  import { isAddress } from "viem";
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-COYKJRMM.js";
8
8
  import {
9
9
  withPostgresTransactionRecovery
10
- } from "./chunk-MMGSYMIC.js";
10
+ } from "./chunk-EP7OVWI5.js";
11
11
 
12
12
  // src/sdk/server/tempo-session-store.ts
13
13
  import { AsyncLocalStorage } from "async_hooks";
@@ -243,7 +243,8 @@ var PostgresTempoSessionStore = class {
243
243
  const { rows } = await this.pool.query(
244
244
  `SELECT channel_key, state_json, updated_at
245
245
  FROM mpp_tempo_channels
246
- WHERE (state_json::jsonb ->> 'finalized') IS DISTINCT FROM 'true'
246
+ WHERE ((state_json::jsonb ->> 'finalized') IS DISTINCT FROM 'true'
247
+ OR state_json::jsonb ->> 'creditLossPending' = 'true')
247
248
  AND ($2::BIGINT IS NULL OR (updated_at, channel_key) > ($2, $3))
248
249
  ORDER BY updated_at, channel_key
249
250
  LIMIT $1`,
@@ -284,10 +285,13 @@ var PostgresTempoSessionStore = class {
284
285
  );
285
286
  const state = channel.rows[0] ? parseStoreValue(channel.rows[0].state_json) : null;
286
287
  const settled = state?.settledOnChain;
288
+ if (typeof settled !== "bigint" || !/^\d{1,78}$/.test(settled.toString())) {
289
+ throw new Error("Tempo channel settlement snapshot is unavailable or invalid; refusing close broadcast");
290
+ }
287
291
  await tx.query(
288
292
  `UPDATE mpp_tempo_close_intents SET settled_before_close = $3
289
293
  WHERE channel_id = $1 AND drain_id = $2`,
290
- [channelId.toLowerCase(), drainId, typeof settled === "bigint" ? settled.toString() : null]
294
+ [channelId.toLowerCase(), drainId, settled.toString()]
291
295
  );
292
296
  return record;
293
297
  });
@@ -521,7 +525,15 @@ function closeRecord(row) {
521
525
  }
522
526
  function assertMonotonicTransition(current, next) {
523
527
  if (!isRecord(next)) throw new Error("Tempo session state must be an object");
528
+ const observation = next.tempoDrainPaymentObservation;
529
+ if (observation !== void 0 && (!isRecord(observation) || typeof observation.creditId !== "string" || !observation.creditId || typeof observation.drainId !== "string" || !observation.drainId)) {
530
+ throw new Error("Tempo drain payment observation requires a credit and drain identity");
531
+ }
524
532
  if (!isRecord(current)) return;
533
+ const retained = current.tempoDrainPaymentObservation;
534
+ if (retained !== void 0 && (!isRecord(retained) || !isRecord(observation) || retained.creditId !== observation.creditId || retained.drainId !== observation.drainId)) {
535
+ throw new Error("Tempo drain payment observation cannot be erased or rebound");
536
+ }
525
537
  for (const field of [
526
538
  "channelId",
527
539
  "chainId",
@@ -1,15 +1,23 @@
1
1
  import {
2
- canonicaliseForSigning
3
- } from "./chunk-UKD3R2KU.js";
2
+ computeResultHash,
3
+ isDrainReceipt,
4
+ isFundingReceipt,
5
+ verifyDrainReceipt,
6
+ verifyFundingReceipt,
7
+ verifyReceipt
8
+ } from "./chunk-5H7P3ORL.js";
4
9
  import {
5
10
  DvmError
6
11
  } from "./chunk-BPYMEMQX.js";
12
+ import {
13
+ canonicaliseForSigning
14
+ } from "./chunk-H3GGFEE5.js";
7
15
  import {
8
16
  callerLoggers
9
17
  } from "./chunk-66HGCPBU.js";
10
18
  import {
11
19
  diagnosticConsole
12
- } from "./chunk-QGNXYVBO.js";
20
+ } from "./chunk-Z4FOPROB.js";
13
21
 
14
22
  // src/lib/cashu/lock-pubkey.ts
15
23
  function toLockPubkey(raw) {
@@ -1553,82 +1561,6 @@ function hexToBytes4(hex) {
1553
1561
  return out;
1554
1562
  }
1555
1563
 
1556
- // src/lib/receipt.ts
1557
- import { schnorr as schnorr4 } from "@noble/curves/secp256k1.js";
1558
- import { sha256 as sha2564 } from "@noble/hashes/sha2.js";
1559
- import { bytesToHex as bytesToHex5, hexToBytes as hexToBytes5 } from "@noble/hashes/utils.js";
1560
- function computeResultHash(summary, artifactContents) {
1561
- const artifactHashes = artifactContents.map(
1562
- (content) => bytesToHex5(sha2564(canonicaliseForSigning(content)))
1563
- );
1564
- return bytesToHex5(
1565
- sha2564(
1566
- canonicaliseForSigning({
1567
- summary: summary ?? null,
1568
- artifact_hashes: artifactHashes
1569
- })
1570
- )
1571
- );
1572
- }
1573
- function signReceipt(unsigned, secretHex) {
1574
- const bytes = canonicaliseForSigning(unsigned);
1575
- const signature = bytesToHex5(schnorr4.sign(bytes, hexToBytes5(secretHex)));
1576
- return { ...unsigned, signature };
1577
- }
1578
- function verifyReceipt(receipt) {
1579
- try {
1580
- const { signature, ...unsigned } = receipt;
1581
- const bytes = canonicaliseForSigning(unsigned);
1582
- return schnorr4.verify(hexToBytes5(signature), bytes, hexToBytes5(receipt.receipt_pubkey));
1583
- } catch {
1584
- return false;
1585
- }
1586
- }
1587
- function isSignedJobReceipt(value) {
1588
- if (!value || typeof value !== "object" || Array.isArray(value)) return false;
1589
- const r = value;
1590
- const paid = r.paid;
1591
- return r.v === 1 && typeof r.job_id === "string" && typeof r.dvm_id === "string" && typeof r.dvm === "string" && typeof r.capability === "string" && (r.outcome === "completed" || r.outcome === "failed" || r.outcome === "cancelled") && typeof r.seq === "number" && typeof r.issued_at === "number" && typeof r.receipt_pubkey === "string" && typeof r.signature === "string" && !!paid && typeof paid === "object" && !Array.isArray(paid) && typeof paid.msats === "number";
1592
- }
1593
- function signDrainReceipt(unsigned, secretHex) {
1594
- const bytes = canonicaliseForSigning(unsigned);
1595
- const signature = bytesToHex5(schnorr4.sign(bytes, hexToBytes5(secretHex)));
1596
- return { ...unsigned, signature };
1597
- }
1598
- function signFundingReceipt(unsigned, secretHex) {
1599
- const bytes = canonicaliseForSigning(unsigned);
1600
- const signature = bytesToHex5(schnorr4.sign(bytes, hexToBytes5(secretHex)));
1601
- return { ...unsigned, signature };
1602
- }
1603
- function isFundingReceipt(value) {
1604
- if (!value || typeof value !== "object" || Array.isArray(value)) return false;
1605
- const r = value;
1606
- return r.v === 1 && r.kind === "credit_funding" && typeof r.credit_id === "string" && typeof r.fund_id === "string" && typeof r.funded_micro === "number" && typeof r.balance_after_micro === "number" && typeof r.ledger_seq === "number" && typeof r.issued_at === "number" && typeof r.caller_pubkey === "string" && typeof r.dvm_id === "string" && typeof r.dvm === "string" && typeof r.receipt_pubkey === "string" && typeof r.signature === "string";
1607
- }
1608
- function verifyFundingReceipt(receipt) {
1609
- try {
1610
- const { signature, ...unsigned } = receipt;
1611
- const bytes = canonicaliseForSigning(unsigned);
1612
- return schnorr4.verify(hexToBytes5(signature), bytes, hexToBytes5(receipt.receipt_pubkey));
1613
- } catch {
1614
- return false;
1615
- }
1616
- }
1617
- function isDrainReceipt(value) {
1618
- if (!value || typeof value !== "object" || Array.isArray(value)) return false;
1619
- const r = value;
1620
- return r.v === 1 && r.kind === "credit_drain" && typeof r.credit_id === "string" && typeof r.drain_id === "string" && (r.event === "requested" || r.event === "parked" || r.event === "picked_up" || r.event === "sent" || r.event === "released") && typeof r.method === "string" && typeof r.amount_micro === "number" && typeof r.issued_at === "number" && typeof r.caller_pubkey === "string" && typeof r.dvm_id === "string" && typeof r.dvm === "string" && typeof r.receipt_pubkey === "string" && typeof r.signature === "string";
1621
- }
1622
- function verifyDrainReceipt(receipt) {
1623
- try {
1624
- const { signature, ...unsigned } = receipt;
1625
- const bytes = canonicaliseForSigning(unsigned);
1626
- return schnorr4.verify(hexToBytes5(signature), bytes, hexToBytes5(receipt.receipt_pubkey));
1627
- } catch {
1628
- return false;
1629
- }
1630
- }
1631
-
1632
1564
  // src/lib/receipt-verify.ts
1633
1565
  function attestedDvmIdentity(builder) {
1634
1566
  const builderPubkey = authenticatedBuilderPubkey(builder);
@@ -1924,16 +1856,6 @@ export {
1924
1856
  buildAttestation,
1925
1857
  signAttestation,
1926
1858
  verifyAttestation,
1927
- computeResultHash,
1928
- signReceipt,
1929
- verifyReceipt,
1930
- isSignedJobReceipt,
1931
- signDrainReceipt,
1932
- signFundingReceipt,
1933
- isFundingReceipt,
1934
- verifyFundingReceipt,
1935
- isDrainReceipt,
1936
- verifyDrainReceipt,
1937
1859
  attestedDvmIdentity,
1938
1860
  authenticatedBuilderPubkey,
1939
1861
  verifyJobReceipt,
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-COYKJRMM.js";
4
4
  import {
5
5
  diagnosticConsole
6
- } from "./chunk-QGNXYVBO.js";
6
+ } from "./chunk-Z4FOPROB.js";
7
7
 
8
8
  // src/sdk/server/postgres-replay-store.ts
9
9
  var DEFAULT_TABLE_NAME = "signed_request_replays";
@@ -4,10 +4,10 @@ import {
4
4
  signedRequestHeaderMatchesDomain,
5
5
  signedRequestStatementHeader,
6
6
  testOnlySignedRequestDomain
7
- } from "./chunk-UKD3R2KU.js";
7
+ } from "./chunk-HW2UCOOC.js";
8
8
  import {
9
9
  diagnosticConsole
10
- } from "./chunk-QGNXYVBO.js";
10
+ } from "./chunk-Z4FOPROB.js";
11
11
 
12
12
  // src/sdk/server/zod-error.ts
13
13
  function humanizeZodError(err, opts) {
@@ -405,9 +405,13 @@ var diagnostic_catalogue_v1_default = {
405
405
  "tempo_close_observer_tick",
406
406
  "tempo_credential_rejected",
407
407
  "tempo_deposit_registration_alert_failed",
408
+ "tempo_drain_booked_as_refunded",
409
+ "tempo_drain_hold_reason_write_failed",
408
410
  "tempo_drain_refund_below_debit",
411
+ "tempo_drain_refund_evidence_write_failed",
409
412
  "tempo_drain_refund_forecast_below_debit",
410
413
  "tempo_drain_refund_forecast_unavailable",
414
+ "tempo_drain_released",
411
415
  "tempo_drain_written_off",
412
416
  "tempo_observer_health_unavailable",
413
417
  "tempo_observer_scan_failed",
@@ -546,6 +550,7 @@ var diagnostic_catalogue_v1_default = {
546
550
  "/admin/cashu/rotate-lock-pubkey",
547
551
  "/admin/credit/bitcoin-liability",
548
552
  "/admin/credit/blocked-invoices",
553
+ "/admin/credit/book-tempo-drain",
549
554
  "/admin/credit/mark-drain-sent",
550
555
  "/admin/credit/park-drain",
551
556
  "/admin/credit/pending-drains",
@@ -553,6 +558,7 @@ var diagnostic_catalogue_v1_default = {
553
558
  "/admin/credit/reconcile-tempo-drain",
554
559
  "/admin/credit/reconcile-x402-exact-settlement",
555
560
  "/admin/credit/reconcile-x402-settlement",
561
+ "/admin/credit/release-tempo-drain",
556
562
  "/admin/credit/retry-tempo-close-report",
557
563
  "/admin/credit/tempo-close-reports",
558
564
  "/admin/credit/tempo-drains",
@@ -1344,6 +1350,17 @@ function projectField(key, value, dataset, authority, identityAuthority, eventNa
1344
1350
  if (key === "prior_status")
1345
1351
  return typeof value === "string" && TEMPO_CLOSE_REPORT_PRIOR_STATUSES.has(value) ? value : void 0;
1346
1352
  const closeReportEvent = eventName === "tempo_session_close_report_written_off" || eventName === "tempo_session_close_report_reopened";
1353
+ const drainDecisionEvent = eventName === "tempo_drain_booked_as_refunded" || eventName === "tempo_drain_released";
1354
+ if (drainDecisionEvent) {
1355
+ if (key === "drain_reference")
1356
+ return typeof value === "string" && /^sha256:[0-9a-f]{64}$/.test(value) ? value : void 0;
1357
+ if (key === "credit_id" || key === "drain_id")
1358
+ return typeof value === "string" && /^[a-zA-Z0-9_.:-]{1,512}$/.test(value) ? value : void 0;
1359
+ if (key === "channel_id")
1360
+ return typeof value === "string" && /^0x[0-9a-fA-F]{64}$/.test(value) ? value : void 0;
1361
+ if (key === "amount_native")
1362
+ return value === null || typeof value === "string" && DECIMAL_RE.test(value) ? value : void 0;
1363
+ }
1347
1364
  const payerExitEvent = eventName === "tempo_session_close_exit_resolved";
1348
1365
  if (closeReportEvent || payerExitEvent) {
1349
1366
  if (key === "obligation_id")
@@ -1,4 +1,4 @@
1
- import { b as JobStore, J as JobRecord } from './job-store-92v8e1LQ.js';
1
+ import { b as JobStore, J as JobRecord } from './job-store-DRwXCJDI.js';
2
2
 
3
3
  /** Authenticated caller metadata; omitted fields on older services mean unknown. */
4
4
  interface JobContentMetadata {
@@ -10,11 +10,14 @@ import {
10
10
  isDrainMethod,
11
11
  isFundingRail,
12
12
  x402SettlementPending
13
- } from "./chunk-STJBBVNL.js";
13
+ } from "./chunk-K2ZNIQZP.js";
14
+ import "./chunk-YG7G4DPZ.js";
14
15
  import "./chunk-COYKJRMM.js";
15
- import "./chunk-MMGSYMIC.js";
16
+ import "./chunk-5H7P3ORL.js";
17
+ import "./chunk-EP7OVWI5.js";
16
18
  import "./chunk-BPYMEMQX.js";
17
- import "./chunk-QGNXYVBO.js";
19
+ import "./chunk-H3GGFEE5.js";
20
+ import "./chunk-Z4FOPROB.js";
18
21
  export {
19
22
  CreditLedger,
20
23
  CreditLedgerError,
@@ -1,11 +1,11 @@
1
- import { f as LockPubkey, e as CheckMintHealthOptions, b as LightningBackend, A as AttestationPayload } from './lightning-backend-9oky_wJi.js';
2
- import { cg as HostingCleanupFence, cZ as HostedIntent, aj as FundingMethod, p as PaymentMethod, bP as CreditLedgerLike, a5 as Message, $ as FundingReceipt, bR 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, c_ as X402SettlementIntent, ab as PaymentRequirementsV2, c$ as HostedFundingReservation, bL as CreditLedgerQuerier, d0 as X402SettlementCursor, bT as X402SettlementStatus, d1 as X402SettlementWriteOff, bQ as X402RefundSettlementGate, d2 as X402FacilitatorAuth, d3 as X402BatchSettlementConfig, cD as PostgresX402ChannelStorage, d4 as X402PayoutObserver, bN as HostedSettlementReportObligations, bn as CreditDepositPayload, bs as MppxServer, ae as CashuMode, d5 as CreditDepositEnqueue, d6 as X402SettlementReconciliationReason, aq as PaymentRequirements, a3 as MppxCredential, bS as DrawResult, cq as CreditLedgerError, a7 as ReceiptCredit, ag as DrainReceiptEvent, a8 as DrainReceipt, K as KVStore, z as SignedRequestAudience, d7 as CreditDrawReleaseEnqueue, cB as JobCostReportPayload, cC as JobTerminalReportPayload, cF as RevenueSkippedNoRailPayload, Z as ZodLike, a as DVMDescriptor, bY as CreditInvoiceRecord, bZ as InvoiceSettlement, ck as ClientCompatibilityGate, ci as ClientCompatibility, bw as PostgresTempoSessionStore, bv as PayoutReporter, R as ResolvedCreditConfig, h as CreditView } from './step-cache--7yA5Ihr.js';
1
+ import { f as LockPubkey, e as CheckMintHealthOptions, b as LightningBackend, A as AttestationPayload } from './lightning-backend-BX5YvjnM.js';
2
+ import { ci as HostingCleanupFence, d3 as HostedIntent, aj as FundingMethod, p as PaymentMethod, bP as CreditLedgerLike, a5 as Message, $ as FundingReceipt, bR 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, d4 as X402SettlementIntent, ab as PaymentRequirementsV2, d5 as HostedFundingReservation, bL as CreditLedgerQuerier, d6 as X402SettlementCursor, bV as X402SettlementStatus, d7 as X402SettlementWriteOff, bQ as X402RefundSettlementGate, d8 as X402FacilitatorAuth, d9 as X402BatchSettlementConfig, cF as PostgresX402ChannelStorage, da as X402PayoutObserver, bN as HostedSettlementReportObligations, bn as CreditDepositPayload, bs as MppxServer, ae as CashuMode, db as CreditDepositEnqueue, dc as X402SettlementReconciliationReason, aq as PaymentRequirements, a3 as MppxCredential, bU as DrawResult, cs as CreditLedgerError, a7 as ReceiptCredit, ag as DrainReceiptEvent, a8 as DrainReceipt, K as KVStore, z as SignedRequestAudience, dd as CreditDrawReleaseEnqueue, cD as JobCostReportPayload, cE as JobTerminalReportPayload, cH as RevenueSkippedNoRailPayload, Z as ZodLike, a as DVMDescriptor, b_ as CreditInvoiceRecord, b$ as InvoiceSettlement, cm as ClientCompatibilityGate, ck as ClientCompatibility, bw as PostgresTempoSessionStore, bv as PayoutReporter, R as ResolvedCreditConfig, h as CreditView } from './step-cache-d-VKen4K.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-BM5h4o5S.js';
6
+ import { d as FxSourceFailure, b as FxRateSnapshot, F as FxFetcher } from './fx-DVTNs9q1.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-92v8e1LQ.js';
8
+ import { T as TopUpCapUnenforcedReason, A as AppendOutgoingOptions, J as JobRecord, b as JobStore } from './job-store-DRwXCJDI.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';
@@ -2933,6 +2933,7 @@ declare class JobManager<State, InputSchema extends ZodLike | undefined> {
2933
2933
  /** Job ids that were notified mid-re-read and must be re-checked. */
2934
2934
  private readonly statusChecksQueued;
2935
2935
  private readonly inputResumeTails;
2936
+ private readonly claimedPaymentResumes;
2936
2937
  private readonly sessionId;
2937
2938
  private nextJobId;
2938
2939
  private accumulatorMonitor?;
@@ -3083,6 +3084,7 @@ declare class JobManager<State, InputSchema extends ZodLike | undefined> {
3083
3084
  dispatchMessage(job: ServerJob, type: MessageType, content: unknown): Promise<void>;
3084
3085
  private queueInputResume;
3085
3086
  private claimLocalInput;
3087
+ private resumeClaimedPayment;
3086
3088
  private dispatchMessageNow;
3087
3089
  /**
3088
3090
  * Persist a job to the backing store.
@@ -1,4 +1,4 @@
1
- import { C as Currency } from './step-cache--7yA5Ihr.js';
1
+ import { C as Currency } from './step-cache-d-VKen4K.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--7yA5Ihr.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--7yA5Ihr.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-BM5h4o5S.js';
4
- export { I as InvalidFxRateError, f as fiatToSatsCeil, a as formatFiat, b as formatUsd, r as roundUsd, s as satsToFiat } from './usd-C7lvLvLk.js';
5
- export { J as JobRecord, a as JobStatus, b as JobStore } from './job-store-92v8e1LQ.js';
1
+ import { C as Currency, Z as ZodLike, D as DVMConfig, a as DVMDescriptor } from './step-cache-d-VKen4K.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-d-VKen4K.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-DVTNs9q1.js';
4
+ export { I as InvalidFxRateError, f as fiatToSatsCeil, a as formatFiat, b as formatUsd, r as roundUsd, s as satsToFiat } from './usd-DSroMJ--.js';
5
+ export { J as JobRecord, a as JobStatus, b as JobStore } from './job-store-DRwXCJDI.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
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  SignedRequestError,
12
12
  createSignedRequestVerifier
13
- } from "./chunk-2XQLL6N6.js";
13
+ } from "./chunk-WFCVS6QB.js";
14
14
  import {
15
15
  DEFAULT_CREDIT_MAX,
16
16
  DEFAULT_CREDIT_MIN,
@@ -20,10 +20,10 @@ import {
20
20
  SIGNED_REQUEST_STATEMENT_VERSION,
21
21
  isZodSchema,
22
22
  signedRequestStatementHeader
23
- } from "./chunk-UKD3R2KU.js";
23
+ } from "./chunk-HW2UCOOC.js";
24
24
  import {
25
25
  buildUpfront
26
- } from "./chunk-JNECYURT.js";
26
+ } from "./chunk-D4FFS3IS.js";
27
27
  import {
28
28
  DEFAULT_FX_CURRENCIES,
29
29
  DEFAULT_FX_RATE_SOURCE,
@@ -41,8 +41,9 @@ import {
41
41
  roundUsd,
42
42
  satsToFiat,
43
43
  validateCurrency
44
- } from "./chunk-W3VGCNG6.js";
45
- import "./chunk-QGNXYVBO.js";
44
+ } from "./chunk-LDKV4UHI.js";
45
+ import "./chunk-H3GGFEE5.js";
46
+ import "./chunk-Z4FOPROB.js";
46
47
 
47
48
  // src/sdk/configure.ts
48
49
  function configureDVM(config) {
@@ -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-9oky_wJi.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-9oky_wJi.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-BX5YvjnM.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-BX5YvjnM.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 { 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--7yA5Ihr.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--7yA5Ihr.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-d-VKen4K.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-d-VKen4K.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-BM5h4o5S.js';
13
- export { c as InvalidUsdPriceError, p as parseUsdPrice } from '../usd-C7lvLvLk.js';
12
+ export { h as FX_CACHE_TTL_MS, i as FX_RETRY_COUNT, w as warmFxSnapshot } from '../fx-DVTNs9q1.js';
13
+ export { c as InvalidUsdPriceError, p as parseUsdPrice } from '../usd-DSroMJ--.js';
14
14
  import 'hono';
15
15
  import 'mppx';
16
16
  import '@x402/core/server';
@@ -32,7 +32,7 @@ import {
32
32
  sha256hex,
33
33
  validateX402Env,
34
34
  withNwcPool
35
- } from "../chunk-AJ6UHXUA.js";
35
+ } from "../chunk-M4NFYEEY.js";
36
36
  import {
37
37
  MemoryKVStore
38
38
  } from "../chunk-SDK6KDJN.js";
@@ -81,7 +81,6 @@ import {
81
81
  canSwap,
82
82
  checkMintHealth,
83
83
  checkReceiptAttestation,
84
- computeResultHash,
85
84
  costAnchor,
86
85
  createMonotonicClock,
87
86
  deleteAgentMnemonic,
@@ -105,11 +104,8 @@ import {
105
104
  getLastKnownBtcRate,
106
105
  getWallet,
107
106
  hashCapabilities,
108
- isDrainReceipt,
109
- isFundingReceipt,
110
107
  isJobIdentityValue,
111
108
  isPublicRequestId,
112
- isSignedJobReceipt,
113
109
  isStorableJobId,
114
110
  isX402SettlementReconciliationReason,
115
111
  loadAgentWallet,
@@ -125,25 +121,19 @@ import {
125
121
  repairConfigDirMode,
126
122
  saveAgentWallet,
127
123
  signAttestation,
128
- signDrainReceipt,
129
- signFundingReceipt,
130
- signReceipt,
131
124
  toLockPubkey,
132
125
  validateAgentMnemonic,
133
126
  verifyAttestation,
134
127
  verifyChallenge,
135
- verifyDrainReceipt,
136
128
  verifyDrainReceiptChain,
137
- verifyFundingReceipt,
138
129
  verifyFundingReceiptChain,
139
130
  verifyJobReceipt,
140
- verifyReceipt,
141
131
  walletExists,
142
132
  weakestReceiptVerdict,
143
133
  withWalletLock,
144
134
  writeAgentMnemonic,
145
135
  writeIdentity
146
- } from "../chunk-VUGEEMLT.js";
136
+ } from "../chunk-RPUFWIT4.js";
147
137
  import {
148
138
  X402_BATCH_SETTLEMENT_SCHEME,
149
139
  X402_DEFAULT_FACILITATOR,
@@ -182,15 +172,12 @@ import {
182
172
  SIGNED_REQUEST_AUTH_ID,
183
173
  canonicalRequestPath,
184
174
  canonicalSignedRequestStatement,
185
- canonicaliseForSigning,
186
- canonicalize,
187
- signedRequestStatementHeader,
188
- verifyCanonicalSignedRequest
189
- } from "../chunk-UKD3R2KU.js";
175
+ signedRequestStatementHeader
176
+ } from "../chunk-HW2UCOOC.js";
190
177
  import {
191
178
  createNoopLogger,
192
179
  createStdoutLogger
193
- } from "../chunk-3R7NQA3Z.js";
180
+ } from "../chunk-7KQLPVV7.js";
194
181
  import {
195
182
  redactUrl,
196
183
  redactUrlsInText
@@ -204,11 +191,23 @@ import {
204
191
  InvalidUsdPriceError,
205
192
  parseUsdPrice,
206
193
  warmFxSnapshot
207
- } from "../chunk-W3VGCNG6.js";
194
+ } from "../chunk-LDKV4UHI.js";
195
+ import {
196
+ computeResultHash,
197
+ isDrainReceipt,
198
+ isFundingReceipt,
199
+ isSignedJobReceipt,
200
+ signDrainReceipt,
201
+ signFundingReceipt,
202
+ signReceipt,
203
+ verifyDrainReceipt,
204
+ verifyFundingReceipt,
205
+ verifyReceipt
206
+ } from "../chunk-5H7P3ORL.js";
208
207
  import {
209
208
  applyRetryToPool,
210
209
  withInitRetry
211
- } from "../chunk-MMGSYMIC.js";
210
+ } from "../chunk-EP7OVWI5.js";
212
211
  import {
213
212
  DvmError,
214
213
  X402_NETWORKS,
@@ -222,6 +221,11 @@ import {
222
221
  x402NetworkListForCopy,
223
222
  x402SupportedNetworksHint
224
223
  } from "../chunk-BPYMEMQX.js";
224
+ import {
225
+ canonicaliseForSigning,
226
+ canonicalize,
227
+ verifyCanonicalSignedRequest
228
+ } from "../chunk-H3GGFEE5.js";
225
229
  import {
226
230
  currentContext,
227
231
  initLoggers,
@@ -230,7 +234,7 @@ import {
230
234
  randomTraceId,
231
235
  setEmitter,
232
236
  withTraceContext
233
- } from "../chunk-M3T5JYDJ.js";
237
+ } from "../chunk-HNXMWHLU.js";
234
238
  import "../chunk-66HGCPBU.js";
235
239
  import {
236
240
  DIAGNOSTIC_CATALOGUE_VERSION,
@@ -241,7 +245,7 @@ import {
241
245
  projectDiagnosticFields,
242
246
  projectEventName,
243
247
  projectSpanRow
244
- } from "../chunk-QGNXYVBO.js";
248
+ } from "../chunk-Z4FOPROB.js";
245
249
 
246
250
  // src/lib/budget-core.ts
247
251
  function checkBudgetForLedger(ledger, opts) {
@@ -1,22 +1,22 @@
1
1
  import { FacilitatorConfig } from '@x402/core/server';
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--7yA5Ihr.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--7yA5Ihr.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-d-VKen4K.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-d-VKen4K.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-VwX_6KM7.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-VwX_6KM7.js';
11
- export { O as OutgoingMessage, S as StaleJobReapable, i as isStaleJobReapable } from '../job-store-92v8e1LQ.js';
9
+ import { C as ConsumedCredentialStore, L as LockPubkeyStateLoader } from '../credit-menu-BYySnZBk.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-BYySnZBk.js';
11
+ export { O as OutgoingMessage, S as StaleJobReapable, i as isStaleJobReapable } from '../job-store-DRwXCJDI.js';
12
12
  import { z } from 'zod';
13
- export { f as LockPubkeyStoreLockPubkey, t as lockPubkeyStoreToLockPubkey } from '../lightning-backend-9oky_wJi.js';
13
+ export { f as LockPubkeyStoreLockPubkey, t as lockPubkeyStoreToLockPubkey } from '../lightning-backend-BX5YvjnM.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-BM5h4o5S.js';
19
+ import '../fx-DVTNs9q1.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>;