@dvmkit/sdk 0.8.1 → 0.10.0

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 (52) hide show
  1. package/dist/{chunk-ILBSZMJL.js → chunk-2XQLL6N6.js} +1 -1
  2. package/dist/{chunk-UVS7MRJX.js → chunk-3Q6FTZDB.js} +2 -2
  3. package/dist/{chunk-OP7VCGQR.js → chunk-3R7NQA3Z.js} +1 -1
  4. package/dist/{chunk-RSNC5T6C.js → chunk-AJ6UHXUA.js} +1 -1
  5. package/dist/{chunk-ALWVJ2RB.js → chunk-EWZFANHJ.js} +3 -3
  6. package/dist/{chunk-J5J63WDC.js → chunk-FFXXGCVG.js} +3 -3
  7. package/dist/{chunk-UDJNZ3UG.js → chunk-JNECYURT.js} +1 -1
  8. package/dist/{chunk-IHQUBATH.js → chunk-KFCEXCZM.js} +3 -3
  9. package/dist/{chunk-NA2KOR6G.js → chunk-LDIPVPKI.js} +3 -3
  10. package/dist/{chunk-IOQIXRGM.js → chunk-M3T5JYDJ.js} +15 -8
  11. package/dist/{chunk-UWGBI5WK.js → chunk-MB6R4XPZ.js} +3 -3
  12. package/dist/{chunk-7PM4R4GD.js → chunk-MMGSYMIC.js} +1 -1
  13. package/dist/{chunk-QKE5NDPF.js → chunk-MU3IE434.js} +348 -80
  14. package/dist/{chunk-BFGQG4WY.js → chunk-QGNXYVBO.js} +52 -12
  15. package/dist/{chunk-JIZ4ZIXX.js → chunk-QNKK7SPY.js} +652 -245
  16. package/dist/{chunk-FM6QAGJC.js → chunk-STJBBVNL.js} +24 -8
  17. package/dist/{chunk-NU5RWJ5B.js → chunk-VMHYGKWT.js} +3 -3
  18. package/dist/{chunk-AVV5SYGO.js → chunk-VTHYQCDB.js} +1 -1
  19. package/dist/{chunk-ZEPJF4JC.js → chunk-VUGEEMLT.js} +4 -4
  20. package/dist/{chunk-2U6LAASN.js → chunk-W3VGCNG6.js} +1 -1
  21. package/dist/{chunk-G3MPHW5I.js → chunk-Y6DO5WSO.js} +3 -3
  22. package/dist/{chunk-AGE5XZKE.js → chunk-YOSZIWC3.js} +17 -4
  23. package/dist/{content-retention-B7ddtJ2y.d.ts → content-retention-CrILCNxk.d.ts} +1 -1
  24. package/dist/{credit-ledger-KIQIE6I6.js → credit-ledger-4PZNAMDT.js} +4 -4
  25. package/dist/{credit-menu-BH3g9GQa.d.ts → credit-menu-VwX_6KM7.d.ts} +4 -4
  26. package/dist/{fx-DN26_J7o.d.ts → fx-BM5h4o5S.d.ts} +1 -1
  27. package/dist/index.d.ts +5 -5
  28. package/dist/index.js +4 -4
  29. package/dist/internal/caller.d.ts +7 -7
  30. package/dist/internal/caller.js +16 -16
  31. package/dist/internal/server.d.ts +7 -7
  32. package/dist/internal/server.js +26 -26
  33. package/dist/{job-store-Cq21JT37.d.ts → job-store-92v8e1LQ.d.ts} +1 -1
  34. package/dist/{lightning-backend-S8F8nf8q.d.ts → lightning-backend-9oky_wJi.d.ts} +1 -1
  35. package/dist/{memory-credit-ledger-ATYFAYBG.js → memory-credit-ledger-RP7DT5IY.js} +5 -5
  36. package/dist/{mpp-setup-ZTORW3VF.js → mpp-setup-FURD45LI.js} +5 -3
  37. package/dist/{payout-reporter-NN6K2IVQ.js → payout-reporter-HVJ6WUF3.js} +2 -2
  38. package/dist/{postgres-consumed-credential-store-XJTE5PCA.js → postgres-consumed-credential-store-WO6OCFXZ.js} +3 -3
  39. package/dist/{postgres-job-store-AR6ZJUQV.js → postgres-job-store-FSRUPYH2.js} +2 -2
  40. package/dist/{postgres-replay-store-33K33QV7.js → postgres-replay-store-XXJSA457.js} +2 -2
  41. package/dist/{pricing-G5IN5YJE.js → pricing-X4XU5HXY.js} +3 -3
  42. package/dist/{revenue-reporter-KDUZLD5F.js → revenue-reporter-EV3K5L6B.js} +2 -2
  43. package/dist/server/index.d.ts +78 -11
  44. package/dist/server/index.js +87 -45
  45. package/dist/{step-cache-CR12EZ1Q.d.ts → step-cache--7yA5Ihr.d.ts} +99 -12
  46. package/dist/{tempo-charge-store-XEGJYM3G.js → tempo-charge-store-5JOIYUIH.js} +2 -2
  47. package/dist/{tempo-session-store-3WTDOO7H.js → tempo-session-store-S6QMLQUA.js} +3 -3
  48. package/dist/testing/index.d.ts +3 -3
  49. package/dist/testing/index.js +7 -7
  50. package/dist/{usd-s_VZ_eS7.d.ts → usd-C7lvLvLk.d.ts} +1 -1
  51. package/dist/{x402-HQ5GRQZU.js → x402-EN5LSOVM.js} +4 -4
  52. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
+ import {
2
+ withSdkInitLock
3
+ } from "./chunk-COYKJRMM.js";
1
4
  import {
2
5
  applyRetryToPool
3
- } from "./chunk-7PM4R4GD.js";
6
+ } from "./chunk-MMGSYMIC.js";
4
7
  import {
5
8
  x402NetworkByCaip2
6
9
  } from "./chunk-BPYMEMQX.js";
7
10
  import {
8
11
  diagnosticConsole
9
- } from "./chunk-BFGQG4WY.js";
10
- import {
11
- withSdkInitLock
12
- } from "./chunk-COYKJRMM.js";
12
+ } from "./chunk-QGNXYVBO.js";
13
13
 
14
14
  // src/sdk/server/credit-ledger.ts
15
15
  import { randomUUID } from "crypto";
@@ -3153,7 +3153,7 @@ var CreditLedger = class {
3153
3153
  const { rows } = await this.pool.query(
3154
3154
  `SELECT d.*, ${DRAIN_CREDIT_COLUMNS} FROM credit_drains d
3155
3155
  JOIN credits c ON c.credit_id = d.credit_id
3156
- WHERE d.status = 'pending' ORDER BY d.created_at, d.credit_id, d.drain_id`
3156
+ WHERE d.status IN ('pending','exit_required') ORDER BY d.created_at, d.credit_id, d.drain_id`
3157
3157
  );
3158
3158
  return rows.map(drainRecordFromJoinRow);
3159
3159
  }
@@ -3173,7 +3173,7 @@ var CreditLedger = class {
3173
3173
  const { rows } = await this.pool.query(
3174
3174
  `SELECT d.*, ${DRAIN_CREDIT_COLUMNS} FROM credit_drains d
3175
3175
  JOIN credits c ON c.credit_id = d.credit_id
3176
- WHERE d.status = 'pending'
3176
+ WHERE d.status IN ('pending','exit_required')
3177
3177
  AND d.method = 'tempo'
3178
3178
  AND c.tempo_channel_id IS NOT NULL
3179
3179
  AND d.created_at <= $1
@@ -3225,6 +3225,22 @@ var CreditLedger = class {
3225
3225
  [args.creditId, args.drainId]
3226
3226
  );
3227
3227
  }
3228
+ /** Keep the debit and close intent while the caller uses its timed channel exit. */
3229
+ async requireTempoDrainExit(args) {
3230
+ const q = args.tx ?? this.pool;
3231
+ const { rows } = await q.query(
3232
+ `UPDATE credit_drains d SET status='exit_required'
3233
+ FROM credits c WHERE d.credit_id=c.credit_id AND d.credit_id=$1 AND d.drain_id=$2
3234
+ AND d.status='pending' AND d.method='tempo' AND c.tempo_channel_id IS NOT NULL
3235
+ RETURNING d.*`,
3236
+ [args.creditId, args.drainId]
3237
+ );
3238
+ if (rows.length) return { drain: await this.rejoin(q, rows[0]), replayed: false };
3239
+ return this.refuseTransition(q, args.creditId, args.drainId, {
3240
+ idempotentWhen: (row) => row.status === "exit_required" || row.status === "sent",
3241
+ verb: "require timed exit"
3242
+ });
3243
+ }
3228
3244
  /**
3229
3245
  * Cancel an unfulfilled Tempo cooperative drain and restore the exact
3230
3246
  * balance plus rail basis it removed (`pending -> released`). This is only
@@ -3366,7 +3382,7 @@ var CreditLedger = class {
3366
3382
  const nowMs = args.nowMs ?? Date.now();
3367
3383
  const { rows } = await q.query(
3368
3384
  `UPDATE credit_drains SET status = 'sent', sent_ref = $3, sent_at = $4
3369
- WHERE credit_id = $1 AND drain_id = $2 AND status = 'pending' AND method <> 'cashu'
3385
+ WHERE credit_id = $1 AND drain_id = $2 AND status IN ('pending','exit_required') AND method <> 'cashu'
3370
3386
  RETURNING *`,
3371
3387
  [args.creditId, args.drainId, JSON.stringify(args.sentRef), nowMs]
3372
3388
  );
@@ -1,9 +1,9 @@
1
- import {
2
- diagnosticConsole
3
- } from "./chunk-BFGQG4WY.js";
4
1
  import {
5
2
  withSdkInitLock
6
3
  } from "./chunk-COYKJRMM.js";
4
+ import {
5
+ diagnosticConsole
6
+ } from "./chunk-QGNXYVBO.js";
7
7
 
8
8
  // src/sdk/server/revenue-reporter.ts
9
9
  import { randomUUID } from "crypto";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-66HGCPBU.js";
7
7
  import {
8
8
  diagnosticConsole
9
- } from "./chunk-BFGQG4WY.js";
9
+ } from "./chunk-QGNXYVBO.js";
10
10
 
11
11
  // src/observability/payment-diagnostics.ts
12
12
  import { AsyncLocalStorage } from "async_hooks";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  canonicaliseForSigning
3
3
  } from "./chunk-UKD3R2KU.js";
4
- import {
5
- callerLoggers
6
- } from "./chunk-66HGCPBU.js";
7
4
  import {
8
5
  DvmError
9
6
  } from "./chunk-BPYMEMQX.js";
7
+ import {
8
+ callerLoggers
9
+ } from "./chunk-66HGCPBU.js";
10
10
  import {
11
11
  diagnosticConsole
12
- } from "./chunk-BFGQG4WY.js";
12
+ } from "./chunk-QGNXYVBO.js";
13
13
 
14
14
  // src/lib/cashu/lock-pubkey.ts
15
15
  function toLockPubkey(raw) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  diagnosticConsole
3
- } from "./chunk-BFGQG4WY.js";
3
+ } from "./chunk-QGNXYVBO.js";
4
4
 
5
5
  // src/sdk/pricing/currency.ts
6
6
  var InvalidCurrencyError = class extends Error {
@@ -2,12 +2,12 @@ import {
2
2
  ContentHoldError,
3
3
  applyContentHoldMutation
4
4
  } from "./chunk-AFV77S4C.js";
5
- import {
6
- diagnosticConsole
7
- } from "./chunk-BFGQG4WY.js";
8
5
  import {
9
6
  withSdkInitLock
10
7
  } from "./chunk-COYKJRMM.js";
8
+ import {
9
+ diagnosticConsole
10
+ } from "./chunk-QGNXYVBO.js";
11
11
 
12
12
  // src/sdk/server/postgres-job-store.ts
13
13
  import { createHash } from "crypto";
@@ -15,7 +15,7 @@ import {
15
15
  lotOwedSats,
16
16
  netOwedSats,
17
17
  x402SettlementPending
18
- } from "./chunk-FM6QAGJC.js";
18
+ } from "./chunk-STJBBVNL.js";
19
19
 
20
20
  // src/sdk/server/memory-credit-ledger.ts
21
21
  import { randomUUID } from "crypto";
@@ -934,7 +934,7 @@ var MemoryCreditLedger = class _MemoryCreditLedger {
934
934
  const out = [];
935
935
  for (const credit of this.credits.values()) {
936
936
  for (const drain of credit.drains.values()) {
937
- if (drain.status === "pending") out.push(drainRecord(drain, credit));
937
+ if (drain.status === "pending" || drain.status === "exit_required") out.push(drainRecord(drain, credit));
938
938
  }
939
939
  }
940
940
  out.sort((a, b) => a.createdAt - b.createdAt || a.creditId.localeCompare(b.creditId));
@@ -945,7 +945,7 @@ var MemoryCreditLedger = class _MemoryCreditLedger {
945
945
  for (const credit of this.credits.values()) {
946
946
  if (credit.tempoChannelId === null) continue;
947
947
  for (const drain of credit.drains.values()) {
948
- if (drain.status !== "pending" || drain.method !== "tempo") continue;
948
+ if (drain.status !== "pending" && drain.status !== "exit_required" || drain.method !== "tempo") continue;
949
949
  if (drain.createdAt > args.createdBeforeMs) continue;
950
950
  if (!args.includeResolved && drain.writtenOffAt !== null) continue;
951
951
  out.push(drainRecord(drain, credit));
@@ -979,6 +979,19 @@ var MemoryCreditLedger = class _MemoryCreditLedger {
979
979
  }
980
980
  return Promise.resolve();
981
981
  }
982
+ requireTempoDrainExit(args) {
983
+ return run(() => {
984
+ const { credit, drain } = this.requireDrain(args.creditId, args.drainId);
985
+ if (drain.status === "exit_required" || drain.status === "sent") {
986
+ return { drain: drainRecord(drain, credit), replayed: true };
987
+ }
988
+ if (drain.status !== "pending" || drain.method !== "tempo" || !credit.tempoChannelId) {
989
+ throw this.transitionRefusal(drain, "require timed exit");
990
+ }
991
+ drain.status = "exit_required";
992
+ return { drain: drainRecord(drain, credit), replayed: false };
993
+ });
994
+ }
982
995
  releaseDrain(args) {
983
996
  return run(() => {
984
997
  const { credit, drain } = this.requireDrain(args.creditId, args.drainId);
@@ -1042,7 +1055,7 @@ var MemoryCreditLedger = class _MemoryCreditLedger {
1042
1055
  markDrainSent(args) {
1043
1056
  return run(() => {
1044
1057
  const { credit, drain } = this.requireDrain(args.creditId, args.drainId);
1045
- if (drain.status === "pending" && drain.method !== "cashu") {
1058
+ if ((drain.status === "pending" || drain.status === "exit_required") && drain.method !== "cashu") {
1046
1059
  drain.status = "sent";
1047
1060
  drain.sentRef = { ...args.sentRef };
1048
1061
  drain.sentAt = args.nowMs ?? Date.now();
@@ -1,4 +1,4 @@
1
- import { b as JobStore, J as JobRecord } from './job-store-Cq21JT37.js';
1
+ import { b as JobStore, J as JobRecord } from './job-store-92v8e1LQ.js';
2
2
 
3
3
  /** Authenticated caller metadata; omitted fields on older services mean unknown. */
4
4
  interface JobContentMetadata {
@@ -10,11 +10,11 @@ import {
10
10
  isDrainMethod,
11
11
  isFundingRail,
12
12
  x402SettlementPending
13
- } from "./chunk-FM6QAGJC.js";
14
- import "./chunk-7PM4R4GD.js";
15
- import "./chunk-BPYMEMQX.js";
16
- import "./chunk-BFGQG4WY.js";
13
+ } from "./chunk-STJBBVNL.js";
17
14
  import "./chunk-COYKJRMM.js";
15
+ import "./chunk-MMGSYMIC.js";
16
+ import "./chunk-BPYMEMQX.js";
17
+ import "./chunk-QGNXYVBO.js";
18
18
  export {
19
19
  CreditLedger,
20
20
  CreditLedgerError,
@@ -1,11 +1,11 @@
1
- import { f as LockPubkey, e as CheckMintHealthOptions, b as LightningBackend, A as AttestationPayload } from './lightning-backend-S8F8nf8q.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-CR12EZ1Q.js';
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';
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-DN26_J7o.js';
6
+ import { d as FxSourceFailure, b as FxRateSnapshot, F as FxFetcher } from './fx-BM5h4o5S.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-Cq21JT37.js';
8
+ import { T as TopUpCapUnenforcedReason, A as AppendOutgoingOptions, J as JobRecord, b as JobStore } from './job-store-92v8e1LQ.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';
@@ -1,4 +1,4 @@
1
- import { C as Currency } from './step-cache-CR12EZ1Q.js';
1
+ import { C as Currency } from './step-cache--7yA5Ihr.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-CR12EZ1Q.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-CR12EZ1Q.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-DN26_J7o.js';
4
- export { I as InvalidFxRateError, f as fiatToSatsCeil, a as formatFiat, b as formatUsd, r as roundUsd, s as satsToFiat } from './usd-s_VZ_eS7.js';
5
- export { J as JobRecord, a as JobStatus, b as JobStore } from './job-store-Cq21JT37.js';
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';
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-ILBSZMJL.js";
13
+ } from "./chunk-2XQLL6N6.js";
14
14
  import {
15
15
  DEFAULT_CREDIT_MAX,
16
16
  DEFAULT_CREDIT_MIN,
@@ -23,7 +23,7 @@ import {
23
23
  } from "./chunk-UKD3R2KU.js";
24
24
  import {
25
25
  buildUpfront
26
- } from "./chunk-UDJNZ3UG.js";
26
+ } from "./chunk-JNECYURT.js";
27
27
  import {
28
28
  DEFAULT_FX_CURRENCIES,
29
29
  DEFAULT_FX_RATE_SOURCE,
@@ -41,8 +41,8 @@ import {
41
41
  roundUsd,
42
42
  satsToFiat,
43
43
  validateCurrency
44
- } from "./chunk-2U6LAASN.js";
45
- import "./chunk-BFGQG4WY.js";
44
+ } from "./chunk-W3VGCNG6.js";
45
+ import "./chunk-QGNXYVBO.js";
46
46
 
47
47
  // src/sdk/configure.ts
48
48
  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-S8F8nf8q.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-S8F8nf8q.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-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';
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-CR12EZ1Q.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-CR12EZ1Q.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';
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-DN26_J7o.js';
13
- export { c as InvalidUsdPriceError, p as parseUsdPrice } from '../usd-s_VZ_eS7.js';
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';
14
14
  import 'hono';
15
15
  import 'mppx';
16
16
  import '@x402/core/server';
@@ -6173,7 +6173,7 @@ type SpanProjectionResult = {
6173
6173
  /** Project an untrusted row into the versioned diagnostic catalogue. */
6174
6174
  declare function projectSpanRow(input: unknown): SpanProjectionResult;
6175
6175
  /** Project arbitrary diagnostic fields without invoking getters or coercion hooks. */
6176
- declare function projectDiagnosticFields(input: unknown, dataset?: string, authority?: DiagnosticCapabilityAuthority, identityAuthority?: DiagnosticIdentityAuthority): Record<string, unknown>;
6176
+ declare function projectDiagnosticFields(input: unknown, dataset?: string, authority?: DiagnosticCapabilityAuthority, identityAuthority?: DiagnosticIdentityAuthority, eventName?: string): Record<string, unknown>;
6177
6177
  /** Select a known event name without reflecting untrusted input. */
6178
6178
  declare function projectEventName(input: unknown, fallback?: string): string;
6179
6179
 
@@ -32,7 +32,7 @@ import {
32
32
  sha256hex,
33
33
  validateX402Env,
34
34
  withNwcPool
35
- } from "../chunk-RSNC5T6C.js";
35
+ } from "../chunk-AJ6UHXUA.js";
36
36
  import {
37
37
  MemoryKVStore
38
38
  } from "../chunk-SDK6KDJN.js";
@@ -143,7 +143,7 @@ import {
143
143
  withWalletLock,
144
144
  writeAgentMnemonic,
145
145
  writeIdentity
146
- } from "../chunk-ZEPJF4JC.js";
146
+ } from "../chunk-VUGEEMLT.js";
147
147
  import {
148
148
  X402_BATCH_SETTLEMENT_SCHEME,
149
149
  X402_DEFAULT_FACILITATOR,
@@ -190,21 +190,11 @@ import {
190
190
  import {
191
191
  createNoopLogger,
192
192
  createStdoutLogger
193
- } from "../chunk-OP7VCGQR.js";
194
- import {
195
- currentContext,
196
- initLoggers,
197
- loggers,
198
- pinDimension,
199
- randomTraceId,
200
- setEmitter,
201
- withTraceContext
202
- } from "../chunk-IOQIXRGM.js";
193
+ } from "../chunk-3R7NQA3Z.js";
203
194
  import {
204
195
  redactUrl,
205
196
  redactUrlsInText
206
197
  } from "../chunk-FUJ36YDV.js";
207
- import "../chunk-66HGCPBU.js";
208
198
  import {
209
199
  StepCache
210
200
  } from "../chunk-BQJIFRAZ.js";
@@ -214,11 +204,11 @@ import {
214
204
  InvalidUsdPriceError,
215
205
  parseUsdPrice,
216
206
  warmFxSnapshot
217
- } from "../chunk-2U6LAASN.js";
207
+ } from "../chunk-W3VGCNG6.js";
218
208
  import {
219
209
  applyRetryToPool,
220
210
  withInitRetry
221
- } from "../chunk-7PM4R4GD.js";
211
+ } from "../chunk-MMGSYMIC.js";
222
212
  import {
223
213
  DvmError,
224
214
  X402_NETWORKS,
@@ -232,6 +222,16 @@ import {
232
222
  x402NetworkListForCopy,
233
223
  x402SupportedNetworksHint
234
224
  } from "../chunk-BPYMEMQX.js";
225
+ import {
226
+ currentContext,
227
+ initLoggers,
228
+ loggers,
229
+ pinDimension,
230
+ randomTraceId,
231
+ setEmitter,
232
+ withTraceContext
233
+ } from "../chunk-M3T5JYDJ.js";
234
+ import "../chunk-66HGCPBU.js";
235
235
  import {
236
236
  DIAGNOSTIC_CATALOGUE_VERSION,
237
237
  bindDiagnosticCapabilityAuthority,
@@ -241,7 +241,7 @@ import {
241
241
  projectDiagnosticFields,
242
242
  projectEventName,
243
243
  projectSpanRow
244
- } from "../chunk-BFGQG4WY.js";
244
+ } from "../chunk-QGNXYVBO.js";
245
245
 
246
246
  // src/lib/budget-core.ts
247
247
  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-CR12EZ1Q.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-CR12EZ1Q.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--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';
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-BH3g9GQa.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-BH3g9GQa.js';
11
- export { O as OutgoingMessage, S as StaleJobReapable, i as isStaleJobReapable } from '../job-store-Cq21JT37.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';
12
12
  import { z } from 'zod';
13
- export { f as LockPubkeyStoreLockPubkey, t as lockPubkeyStoreToLockPubkey } from '../lightning-backend-S8F8nf8q.js';
13
+ export { f as LockPubkeyStoreLockPubkey, t as lockPubkeyStoreToLockPubkey } from '../lightning-backend-9oky_wJi.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-DN26_J7o.js';
19
+ import '../fx-BM5h4o5S.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>;
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  PostgresTempoSessionStore
3
- } from "../chunk-UWGBI5WK.js";
3
+ } from "../chunk-MB6R4XPZ.js";
4
4
  import {
5
5
  verifyX402Payment
6
- } from "../chunk-UVS7MRJX.js";
6
+ } from "../chunk-3Q6FTZDB.js";
7
7
  import {
8
8
  RevenueReporter
9
- } from "../chunk-NU5RWJ5B.js";
9
+ } from "../chunk-VMHYGKWT.js";
10
10
  import {
11
11
  PostgresTempoChargeStore
12
- } from "../chunk-NA2KOR6G.js";
12
+ } from "../chunk-LDIPVPKI.js";
13
13
  import {
14
14
  DEFAULT_LOCK_PUBKEY_GRACE_SECONDS,
15
15
  MintHealthTracker,
@@ -61,31 +61,28 @@ import {
61
61
  verifyUpfrontPayment,
62
62
  x402RequiredUsdcMicro,
63
63
  x402SettledShare
64
- } from "../chunk-JIZ4ZIXX.js";
65
- import {
66
- _testing,
67
- wrapMppx
68
- } from "../chunk-QKE5NDPF.js";
64
+ } from "../chunk-QNKK7SPY.js";
65
+ import "../chunk-XRLKGCAW.js";
69
66
  import {
70
67
  PayoutReporter
71
- } from "../chunk-J5J63WDC.js";
68
+ } from "../chunk-FFXXGCVG.js";
72
69
  import {
73
70
  settleWithFacilitator,
74
71
  verifyWithFacilitator
75
- } from "../chunk-AVV5SYGO.js";
76
- import "../chunk-AGE5XZKE.js";
77
- import "../chunk-G3MPHW5I.js";
72
+ } from "../chunk-VTHYQCDB.js";
73
+ import "../chunk-YOSZIWC3.js";
74
+ import "../chunk-Y6DO5WSO.js";
78
75
  import "../chunk-YG7G4DPZ.js";
79
76
  import {
80
77
  SIGNED_ENVELOPE_FIELDS,
81
78
  SIGNED_ENVELOPE_TYPES,
82
79
  createDefaultReplayStore,
83
80
  humanizeZodError
84
- } from "../chunk-ILBSZMJL.js";
81
+ } from "../chunk-2XQLL6N6.js";
85
82
  import {
86
83
  createInstrumentedFetch,
87
84
  isStaleJobReapable
88
- } from "../chunk-IHQUBATH.js";
85
+ } from "../chunk-KFCEXCZM.js";
89
86
  import {
90
87
  JobCancelledError,
91
88
  abortJob,
@@ -97,16 +94,14 @@ import {
97
94
  } from "../chunk-AFV77S4C.js";
98
95
  import {
99
96
  toLockPubkey
100
- } from "../chunk-ZEPJF4JC.js";
97
+ } from "../chunk-VUGEEMLT.js";
101
98
  import "../chunk-62FI3NJF.js";
102
99
  import "../chunk-UKD3R2KU.js";
103
- import "../chunk-OP7VCGQR.js";
104
- import "../chunk-IOQIXRGM.js";
100
+ import "../chunk-3R7NQA3Z.js";
105
101
  import "../chunk-FUJ36YDV.js";
106
- import "../chunk-66HGCPBU.js";
107
102
  import "../chunk-BQJIFRAZ.js";
108
- import "../chunk-UDJNZ3UG.js";
109
- import "../chunk-2U6LAASN.js";
103
+ import "../chunk-JNECYURT.js";
104
+ import "../chunk-W3VGCNG6.js";
110
105
  import {
111
106
  NON_CHANNEL_BITCOIN_RAILS,
112
107
  depleteLots,
@@ -116,12 +111,17 @@ import {
116
111
  isNonChannelBitcoinRail,
117
112
  lotOwedSats,
118
113
  netOwedSats
119
- } from "../chunk-FM6QAGJC.js";
120
- import "../chunk-7PM4R4GD.js";
121
- import "../chunk-BPYMEMQX.js";
122
- import "../chunk-BFGQG4WY.js";
123
- import "../chunk-XRLKGCAW.js";
114
+ } from "../chunk-STJBBVNL.js";
124
115
  import "../chunk-COYKJRMM.js";
116
+ import "../chunk-MMGSYMIC.js";
117
+ import "../chunk-BPYMEMQX.js";
118
+ import {
119
+ _testing,
120
+ wrapMppx
121
+ } from "../chunk-MU3IE434.js";
122
+ import "../chunk-M3T5JYDJ.js";
123
+ import "../chunk-66HGCPBU.js";
124
+ import "../chunk-QGNXYVBO.js";
125
125
  export {
126
126
  DEFAULT_LOCK_PUBKEY_GRACE_SECONDS,
127
127
  JobCancelledError,
@@ -1,5 +1,5 @@
1
1
  import { ProofLike } from '@cashu/cashu-ts';
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-CR12EZ1Q.js';
2
+ import { a5 as Message, aj as FundingMethod, $ as FundingReceipt, bR as CreditSnapshot, a0 as JobReceipt, ay as StepRecord, a1 as MessageType } from './step-cache--7yA5Ihr.js';
3
3
 
4
4
  type JobStatus = "processing" | "completed" | "failed" | "awaiting-input" | "cancelled" | "working";
5
5
  interface JobRecord {
@@ -1,4 +1,4 @@
1
- import { X as JsonValue } from './step-cache-CR12EZ1Q.js';
1
+ import { X as JsonValue } from './step-cache--7yA5Ihr.js';
2
2
 
3
3
  declare const lockPubkeyBrand: unique symbol;
4
4
  /**
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  MemoryCreditLedger
3
- } from "./chunk-AGE5XZKE.js";
4
- import "./chunk-FM6QAGJC.js";
5
- import "./chunk-7PM4R4GD.js";
6
- import "./chunk-BPYMEMQX.js";
7
- import "./chunk-BFGQG4WY.js";
3
+ } from "./chunk-YOSZIWC3.js";
4
+ import "./chunk-STJBBVNL.js";
8
5
  import "./chunk-COYKJRMM.js";
6
+ import "./chunk-MMGSYMIC.js";
7
+ import "./chunk-BPYMEMQX.js";
8
+ import "./chunk-QGNXYVBO.js";
9
9
  export {
10
10
  MemoryCreditLedger
11
11
  };
@@ -9,6 +9,7 @@ import {
9
9
  TEMPO_SETTLEMENT_LEASE_MS,
10
10
  TEMPO_SETTLEMENT_LEASE_OWNER_FIELD,
11
11
  TEMPO_USDC_MAINNET,
12
+ TempoCloseDescriptorError,
12
13
  _testing,
13
14
  advertisedMethods,
14
15
  challengeMeta,
@@ -19,10 +20,10 @@ import {
19
20
  parseMppMethodsAllowlist,
20
21
  resolveTempoNetwork,
21
22
  wrapMppx
22
- } from "./chunk-QKE5NDPF.js";
23
- import "./chunk-IOQIXRGM.js";
23
+ } from "./chunk-MU3IE434.js";
24
+ import "./chunk-M3T5JYDJ.js";
24
25
  import "./chunk-66HGCPBU.js";
25
- import "./chunk-BFGQG4WY.js";
26
+ import "./chunk-QGNXYVBO.js";
26
27
  export {
27
28
  MPPX_HMAC_MISMATCH_REASON,
28
29
  TEMPO_MAINNET_CHAIN_ID,
@@ -34,6 +35,7 @@ export {
34
35
  TEMPO_SETTLEMENT_LEASE_MS,
35
36
  TEMPO_SETTLEMENT_LEASE_OWNER_FIELD,
36
37
  TEMPO_USDC_MAINNET,
38
+ TempoCloseDescriptorError,
37
39
  _testing,
38
40
  advertisedMethods,
39
41
  challengeMeta,
@@ -4,9 +4,9 @@ import {
4
4
  PayoutReporter,
5
5
  PostgresX402BatchStore,
6
6
  x402EarnedCeiling
7
- } from "./chunk-J5J63WDC.js";
8
- import "./chunk-BFGQG4WY.js";
7
+ } from "./chunk-FFXXGCVG.js";
9
8
  import "./chunk-COYKJRMM.js";
9
+ import "./chunk-QGNXYVBO.js";
10
10
  export {
11
11
  MemoryX402BatchStore,
12
12
  PAYOUT_SNAPSHOT_INTERVAL_MS,