@dvmkit/sdk 0.8.0 → 0.9.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-5K5E6ME6.js → chunk-4VV7WACY.js} +1 -1
  2. package/dist/{chunk-GSPV3UIM.js → chunk-73C4JN2E.js} +632 -262
  3. package/dist/{chunk-2I3OHMTY.js → chunk-BAQRUYRL.js} +3 -3
  4. package/dist/{chunk-ATXDKX6F.js → chunk-GAZBBMAA.js} +1 -1
  5. package/dist/{chunk-QPXI7YPH.js → chunk-GODOH2AF.js} +3 -3
  6. package/dist/{chunk-5CQKSLAU.js → chunk-HC4I7LAV.js} +1 -1
  7. package/dist/{chunk-6FEHRZO7.js → chunk-IBX2ORBV.js} +1 -1
  8. package/dist/{chunk-TFYY5APM.js → chunk-IYQQXEHV.js} +3 -3
  9. package/dist/{chunk-X3JEME6P.js → chunk-K2MSIKMM.js} +3 -3
  10. package/dist/{chunk-55NKZQOC.js → chunk-KGL3YMZA.js} +1 -1
  11. package/dist/{chunk-YPSJU3OH.js → chunk-LCCG5HQM.js} +2 -2
  12. package/dist/{chunk-GB5XPAA5.js → chunk-LFVIZH2G.js} +361 -44
  13. package/dist/{chunk-RTFBVXCN.js → chunk-LW7KZQHG.js} +4 -4
  14. package/dist/{chunk-DZQYQN2X.js → chunk-OIP44KBB.js} +12 -0
  15. package/dist/{chunk-P5WEZXJ2.js → chunk-Q3VYRU5R.js} +60 -3
  16. package/dist/{chunk-BL6LRWXD.js → chunk-QSZW2I5Y.js} +1 -1
  17. package/dist/{chunk-I6PHA54S.js → chunk-TFDR2YP2.js} +3 -3
  18. package/dist/{chunk-IFWUWHTW.js → chunk-TRY7BJA4.js} +1 -1
  19. package/dist/{chunk-PRSKC7AD.js → chunk-WB3E7KE7.js} +3 -3
  20. package/dist/{chunk-XXLUIXPO.js → chunk-WLPLHXNP.js} +1 -1
  21. package/dist/{chunk-VYP6ADCS.js → chunk-YYRY32NR.js} +24 -8
  22. package/dist/{chunk-EBCLWOKF.js → chunk-ZBQKXAYK.js} +17 -4
  23. package/dist/{content-retention-D2K4MKNO.d.ts → content-retention-CVBYehRS.d.ts} +1 -1
  24. package/dist/{credit-ledger-AOU6S34N.js → credit-ledger-CZQ56DYI.js} +4 -4
  25. package/dist/{credit-menu-C-8g2cHT.d.ts → credit-menu-QntEhZJS.d.ts} +4 -4
  26. package/dist/{fx-Ql4nvdbh.d.ts → fx-CMyNFenZ.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 +6 -6
  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-DCvJQUX0.d.ts → job-store-qOD-FrQF.d.ts} +1 -1
  34. package/dist/{lightning-backend-CY5ML3km.d.ts → lightning-backend-DtdG6UT5.d.ts} +1 -1
  35. package/dist/{memory-credit-ledger-4HWYINKJ.js → memory-credit-ledger-EMN7G3MO.js} +5 -5
  36. package/dist/{mpp-setup-2BKTPEK6.js → mpp-setup-VW53KFPO.js} +5 -3
  37. package/dist/{payout-reporter-HQSIIBFL.js → payout-reporter-TZX2S7KG.js} +2 -2
  38. package/dist/{postgres-consumed-credential-store-R7DNU6CM.js → postgres-consumed-credential-store-V464OAJB.js} +3 -3
  39. package/dist/{postgres-job-store-6VGFL6XE.js → postgres-job-store-27VOCSPO.js} +2 -2
  40. package/dist/{postgres-replay-store-SY26NUCI.js → postgres-replay-store-7GJFAQXY.js} +2 -2
  41. package/dist/{pricing-H2RA4X2R.js → pricing-NNMBNP7N.js} +3 -3
  42. package/dist/{revenue-reporter-X52GPZ5U.js → revenue-reporter-4EAVPWXS.js} +2 -2
  43. package/dist/server/index.d.ts +14 -10
  44. package/dist/server/index.js +49 -45
  45. package/dist/{step-cache-BOWAn_BH.d.ts → step-cache-B7svmPz3.d.ts} +157 -8
  46. package/dist/{tempo-charge-store-NKXJ2AXE.js → tempo-charge-store-2RPOJBM2.js} +2 -2
  47. package/dist/{tempo-session-store-ZSDQIWSU.js → tempo-session-store-LI3Q3A3U.js} +3 -3
  48. package/dist/testing/index.d.ts +3 -3
  49. package/dist/testing/index.js +7 -7
  50. package/dist/{usd-MAtMp3DB.d.ts → usd-D3izFz71.d.ts} +1 -1
  51. package/dist/{x402-Q4S36NHQ.js → x402-SL36LSOD.js} +4 -4
  52. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  PostgresTempoSessionStore
3
- } from "../chunk-P5WEZXJ2.js";
3
+ } from "../chunk-Q3VYRU5R.js";
4
4
  import {
5
5
  verifyX402Payment
6
- } from "../chunk-YPSJU3OH.js";
6
+ } from "../chunk-LCCG5HQM.js";
7
7
  import {
8
8
  RevenueReporter
9
- } from "../chunk-PRSKC7AD.js";
9
+ } from "../chunk-WB3E7KE7.js";
10
10
  import {
11
11
  PostgresTempoChargeStore
12
- } from "../chunk-TFYY5APM.js";
12
+ } from "../chunk-IYQQXEHV.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-GSPV3UIM.js";
65
- import {
66
- _testing,
67
- wrapMppx
68
- } from "../chunk-GB5XPAA5.js";
64
+ } from "../chunk-73C4JN2E.js";
65
+ import "../chunk-XRLKGCAW.js";
69
66
  import {
70
67
  PayoutReporter
71
- } from "../chunk-X3JEME6P.js";
68
+ } from "../chunk-K2MSIKMM.js";
72
69
  import {
73
70
  settleWithFacilitator,
74
71
  verifyWithFacilitator
75
- } from "../chunk-ATXDKX6F.js";
76
- import "../chunk-EBCLWOKF.js";
77
- import "../chunk-QPXI7YPH.js";
72
+ } from "../chunk-GAZBBMAA.js";
73
+ import "../chunk-ZBQKXAYK.js";
74
+ import "../chunk-GODOH2AF.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-5K5E6ME6.js";
81
+ } from "../chunk-4VV7WACY.js";
85
82
  import {
86
83
  createInstrumentedFetch,
87
84
  isStaleJobReapable
88
- } from "../chunk-I6PHA54S.js";
85
+ } from "../chunk-TFDR2YP2.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-RTFBVXCN.js";
97
+ } from "../chunk-LW7KZQHG.js";
101
98
  import "../chunk-62FI3NJF.js";
102
99
  import "../chunk-UKD3R2KU.js";
103
- import "../chunk-IFWUWHTW.js";
104
- import "../chunk-BL6LRWXD.js";
100
+ import "../chunk-TRY7BJA4.js";
105
101
  import "../chunk-FUJ36YDV.js";
106
- import "../chunk-66HGCPBU.js";
107
102
  import "../chunk-BQJIFRAZ.js";
108
- import "../chunk-XXLUIXPO.js";
109
- import "../chunk-5CQKSLAU.js";
103
+ import "../chunk-WLPLHXNP.js";
104
+ import "../chunk-HC4I7LAV.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-VYP6ADCS.js";
120
- import "../chunk-6FEHRZO7.js";
121
- import "../chunk-BPYMEMQX.js";
122
- import "../chunk-DZQYQN2X.js";
123
- import "../chunk-XRLKGCAW.js";
114
+ } from "../chunk-YYRY32NR.js";
124
115
  import "../chunk-COYKJRMM.js";
116
+ import "../chunk-IBX2ORBV.js";
117
+ import "../chunk-BPYMEMQX.js";
118
+ import {
119
+ _testing,
120
+ wrapMppx
121
+ } from "../chunk-LFVIZH2G.js";
122
+ import "../chunk-QSZW2I5Y.js";
123
+ import "../chunk-66HGCPBU.js";
124
+ import "../chunk-OIP44KBB.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-BOWAn_BH.js';
2
+ import { a5 as Message, aj as FundingMethod, $ as FundingReceipt, bQ as CreditSnapshot, a0 as JobReceipt, ay as StepRecord, a1 as MessageType } from './step-cache-B7svmPz3.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-BOWAn_BH.js';
1
+ import { X as JsonValue } from './step-cache-B7svmPz3.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-EBCLWOKF.js";
4
- import "./chunk-VYP6ADCS.js";
5
- import "./chunk-6FEHRZO7.js";
6
- import "./chunk-BPYMEMQX.js";
7
- import "./chunk-DZQYQN2X.js";
3
+ } from "./chunk-ZBQKXAYK.js";
4
+ import "./chunk-YYRY32NR.js";
8
5
  import "./chunk-COYKJRMM.js";
6
+ import "./chunk-IBX2ORBV.js";
7
+ import "./chunk-BPYMEMQX.js";
8
+ import "./chunk-OIP44KBB.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-GB5XPAA5.js";
23
- import "./chunk-BL6LRWXD.js";
23
+ } from "./chunk-LFVIZH2G.js";
24
+ import "./chunk-QSZW2I5Y.js";
24
25
  import "./chunk-66HGCPBU.js";
25
- import "./chunk-DZQYQN2X.js";
26
+ import "./chunk-OIP44KBB.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-X3JEME6P.js";
8
- import "./chunk-DZQYQN2X.js";
7
+ } from "./chunk-K2MSIKMM.js";
9
8
  import "./chunk-COYKJRMM.js";
9
+ import "./chunk-OIP44KBB.js";
10
10
  export {
11
11
  MemoryX402BatchStore,
12
12
  PAYOUT_SNAPSHOT_INTERVAL_MS,
@@ -1,9 +1,9 @@
1
- import {
2
- diagnosticConsole
3
- } from "./chunk-DZQYQN2X.js";
4
1
  import {
5
2
  withSdkInitLock
6
3
  } from "./chunk-COYKJRMM.js";
4
+ import {
5
+ diagnosticConsole
6
+ } from "./chunk-OIP44KBB.js";
7
7
 
8
8
  // src/sdk/server/postgres-consumed-credential-store.ts
9
9
  var DEFAULT_TABLE_NAME = "consumed_credentials";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  PostgresJobStore
3
- } from "./chunk-QPXI7YPH.js";
3
+ } from "./chunk-GODOH2AF.js";
4
4
  import "./chunk-AFV77S4C.js";
5
5
  import "./chunk-BQJIFRAZ.js";
6
- import "./chunk-DZQYQN2X.js";
7
6
  import "./chunk-COYKJRMM.js";
7
+ import "./chunk-OIP44KBB.js";
8
8
  export {
9
9
  PostgresJobStore
10
10
  };
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  PostgresReplayStore
3
- } from "./chunk-2I3OHMTY.js";
4
- import "./chunk-DZQYQN2X.js";
3
+ } from "./chunk-BAQRUYRL.js";
5
4
  import "./chunk-COYKJRMM.js";
5
+ import "./chunk-OIP44KBB.js";
6
6
  export {
7
7
  PostgresReplayStore
8
8
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  buildUpfront
3
- } from "./chunk-XXLUIXPO.js";
3
+ } from "./chunk-WLPLHXNP.js";
4
4
  import {
5
5
  DEFAULT_FX_CURRENCIES,
6
6
  DEFAULT_FX_RATE_SOURCE,
@@ -22,8 +22,8 @@ import {
22
22
  satsToFiat,
23
23
  validateCurrency,
24
24
  warmFxSnapshot
25
- } from "./chunk-5CQKSLAU.js";
26
- import "./chunk-DZQYQN2X.js";
25
+ } from "./chunk-HC4I7LAV.js";
26
+ import "./chunk-OIP44KBB.js";
27
27
  export {
28
28
  DEFAULT_FX_CURRENCIES,
29
29
  DEFAULT_FX_RATE_SOURCE,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  RevenueReporter
3
- } from "./chunk-PRSKC7AD.js";
4
- import "./chunk-DZQYQN2X.js";
3
+ } from "./chunk-WB3E7KE7.js";
5
4
  import "./chunk-COYKJRMM.js";
5
+ import "./chunk-OIP44KBB.js";
6
6
  export {
7
7
  RevenueReporter
8
8
  };
@@ -1,15 +1,15 @@
1
- import { ae as CashuMode, bL as CreditDrainEnqueue, bM as HostedSettlementReportObligations, R as ResolvedCreditConfig, bN as DVMAuthScheme, B as SignedRequestDomain, bO as CreditLedgerLike, bP as X402RefundSettlementGate, bQ as CreditSnapshot, bR as DrawResult, bS as X402SettlementStatus, bT as X402UnresolvedRefund, bU as GrownDrawResult, bV as DrawResolution, bW as FundingRecord, $ as FundingReceipt, bX as CreditInvoiceRecord, bY as InvoiceSettlement, bZ as BlockedInvoiceCursor, b_ as InvoiceReconciliation, b$ as InvoiceWriteOff, c0 as DrawRecord, c1 as StalePendingDrawCursor, c2 as TempoCreditLossEvidence, c3 as CreditLedgerQuerier, c4 as TempoCreditLoss, c5 as X402CreditLossEvidence, c6 as X402CreditLoss, c7 as DrainMethod, c8 as DrainRequestResult, c9 as BitcoinDepositLiability, bp as FundingLot, ca as CreditDrainRecord, cb as ChannelDrainCursor, cc as DrainWriteOff, cd as DrainReleaseResult, ce as DrainFulfilment, cf as DrainTransitionResult, cg as HostingCleanupFence, a0 as JobReceipt, a5 as Message, K as KVStore, G as SignedRequestReplayStore, Z as ZodLike, a as DVMDescriptor } from '../step-cache-BOWAn_BH.js';
2
- export { ch as CLIENT_COMPATIBILITY_HEADERS, d as CanonicalEnvelope, ci as ClientCompatibility, cj as ClientCompatibilityEnv, ck as ClientCompatibilityGate, cl as ClientCompatibilityRequirement, cm as ClientSemVer, f as CreateSignedRequestVerifierOpts, cn as CreditFundingBasis, co as CreditInvoiceStatus, cp as CreditLedger, cq as CreditLedgerError, cr as CreditLedgerErrorCode, cs as CreditLedgerErrorDetails, ct as CreditLedgerPool, cu as CreditStatus, cv as DRAIN_DELIVERY_RESERVE_SATS, cw as DVM_PROTOCOL_VERSION, cx as DrainConflictReason, cy as DrawRailValue, cz as DrawStatus, cA as JobCostReportPayload, cB as JobTerminalReportPayload, cC as PostgresX402ChannelStorage, cD as ReplayStoreBackend, cE as RevenueSkippedNoRailPayload, cF as RevenueSkippedNoRailReason, x as SIGNED_REQUEST_AUTH_ID, y as SIGNED_REQUEST_STATEMENT_VERSION, cG as Secp256k1AuthOpts, z as SignedRequestAudience, E as SignedRequestError, F as SignedRequestFailure, H as SignedRequestSignOpts, M as SignedRequestStatementHeader, N as SignedRequestVerifier, cH as X402ChannelStorageOpts, cI as X402RelayLockHolder, cJ as X402RelaySubmissionLock, cK as X402RelaySubmissionLockError, cL as allocateDrawValue, cM as clientCompatibilityAttributes, cN as clientCompatibilityMiddleware, cO as clientUpgradeRequired, O as createSignedRequestVerifier, cP as parseClientCapabilities, cQ as parseClientCompatibility, cR as parseDvmClient, cS as parseProtocolVersion, cT as requireClientCompatibility, cU as secp256k1Auth, cV as signedRequestInput, V as signedRequestStatementHeader } from '../step-cache-BOWAn_BH.js';
1
+ import { ae as CashuMode, bL as CreditDrainEnqueue, bM as HostedSettlementReportObligations, R as ResolvedCreditConfig, bN as DVMAuthScheme, B as SignedRequestDomain, bO as CreditLedgerLike, bP as X402RefundSettlementGate, bQ as CreditSnapshot, bR as DrawResult, bS as X402SettlementStatus, bT as X402UnresolvedRefund, bU as GrownDrawResult, bV as DrawResolution, bW as FundingRecord, $ as FundingReceipt, bX as CreditInvoiceRecord, bY as InvoiceSettlement, bZ as BlockedInvoiceCursor, b_ as InvoiceReconciliation, b$ as InvoiceWriteOff, c0 as DrawRecord, c1 as StalePendingDrawCursor, c2 as TempoCreditLossEvidence, c3 as CreditLedgerQuerier, c4 as TempoCreditLoss, c5 as X402CreditLossEvidence, c6 as X402CreditLoss, c7 as DrainMethod, c8 as DrainRequestResult, c9 as BitcoinDepositLiability, bp as FundingLot, ca as CreditDrainRecord, cb as ChannelDrainCursor, cc as DrainWriteOff, cd as DrainTransitionResult, ce as DrainReleaseResult, cf as DrainFulfilment, cg as HostingCleanupFence, a0 as JobReceipt, a5 as Message, K as KVStore, G as SignedRequestReplayStore, Z as ZodLike, a as DVMDescriptor } from '../step-cache-B7svmPz3.js';
2
+ export { ch as CLIENT_COMPATIBILITY_HEADERS, d as CanonicalEnvelope, ci as ClientCompatibility, cj as ClientCompatibilityEnv, ck as ClientCompatibilityGate, cl as ClientCompatibilityRequirement, cm as ClientSemVer, f as CreateSignedRequestVerifierOpts, cn as CreditFundingBasis, co as CreditInvoiceStatus, cp as CreditLedger, cq as CreditLedgerError, cr as CreditLedgerErrorCode, cs as CreditLedgerErrorDetails, ct as CreditLedgerPool, cu as CreditStatus, cv as DRAIN_DELIVERY_RESERVE_SATS, cw as DVM_PROTOCOL_VERSION, cx as DrainConflictReason, cy as DrawRailValue, cz as DrawStatus, cA as JobCostReportPayload, cB as JobTerminalReportPayload, cC as PostgresX402ChannelStorage, cD as ReplayStoreBackend, cE as RevenueSkippedNoRailPayload, cF as RevenueSkippedNoRailReason, x as SIGNED_REQUEST_AUTH_ID, y as SIGNED_REQUEST_STATEMENT_VERSION, cG as Secp256k1AuthOpts, z as SignedRequestAudience, E as SignedRequestError, F as SignedRequestFailure, H as SignedRequestSignOpts, M as SignedRequestStatementHeader, N as SignedRequestVerifier, cH as X402ChannelStorageOpts, cI as X402RelayLockHolder, cJ as X402RelaySubmissionLock, cK as X402RelaySubmissionLockError, cL as allocateDrawValue, cM as clientCompatibilityAttributes, cN as clientCompatibilityMiddleware, cO as clientUpgradeRequired, O as createSignedRequestVerifier, cP as parseClientCapabilities, cQ as parseClientCompatibility, cR as parseDvmClient, cS as parseProtocolVersion, cT as requireClientCompatibility, cU as retryHostedTempoCloseReport, cV as secp256k1Auth, cW as signedRequestInput, V as signedRequestStatementHeader, cX as writeOffHostedTempoCloseReport } from '../step-cache-B7svmPz3.js';
3
3
  import { Pool } from 'pg';
4
- import { au as CreditMenu, a as AppEnv, U as UpfrontPaymentOpts, i as PaymentInfo, av as ReceiptIssuer, aw as LightningReceive, ax as TempoSettlementReadiness, ay as DVMHostOpts, az as DVMServeResult, L as LockPubkeyStateLoader, C as ConsumedCredentialStore } from '../credit-menu-C-8g2cHT.js';
5
- export { aA as BuildCreditMenuArgs, aB as BuilderIdentity, aC as CREDIT_ENVELOPE_KEYS, aD as CreateX402BatchSettlementServerOpts, aE as CreditEnvelope, aF as CreditEnvelopeError, aG as CreditFundCommitment, aH as CreditTerms, aI as DEFAULT_INVOICE_TTL_SECONDS, aJ as DVMHost, aK as HostingClosureCommand, aL as HostingClosureEvidence, aM as HostingControlCommand, aN as HostingControlConfig, aO as HostingControlStatus, aP as JobManager, aQ as JobManagerOpts, aR as LightningReceiveConfig, aS as MIN_INVOICE_TTL_SECONDS, aT as MemoryConsumedCredentialStore, aU as MemoryConsumedCredentialStoreOpts, aV as MemoryProcessedPaymentStore, aW as MemoryX402ExactSettlementStore, aX as MountOpts, aY as OwnerDisplay, aZ as PaidJobCompletion, a_ as PaymentMode, a$ as PlatformReporterOpts, b0 as PostgresProcessedPaymentStore, b1 as PostgresX402ExactSettlementStore, b2 as PriceFiat, b3 as ProcessedPaymentQuerier, b4 as ProcessedPaymentRail, b5 as ProcessedPaymentRecord, b6 as ProcessedPaymentReplayError, b7 as ProcessedPaymentStore, b8 as X402BatchAcceptance, b9 as X402BatchFunding, ba as X402BatchRefusal, bb as X402BatchSettlementServer, bc as X402ExactAcceptance, bd as X402ExactIntentConflictError, be as X402ExactSettlementAttempt, bf as X402ExactSettlementChainEvidence, bg as X402ExactSettlementEffect, bh as X402ExactSettlementEvidenceMissingError, bi as X402ExactSettlementEvidenceReader, bj as X402ExactSettlementIntent, bk as X402ExactSettlementNotReadyError, bl as X402ExactSettlementServer, bm as X402ExactSettlementServerOpts, bn as X402ExactSettlementStatus, bo as X402ExactSettlementStore, bp as X402SettlementChainEvidence, bq as X402SettlementEvidenceReader, br as X402SettlementSubmissionError, bs as X402_BATCH_AUTO_SETTLEMENT, bt as X402_BATCH_MIN_WITHDRAW_DELAY_SECONDS, bu as X402_BATCH_SETTLEMENT_NETWORK, bv as attachCreditMenu, bw as buildCreditMenu, bx as createDVMHost, by as createX402BatchSettlementServer, bz as creditEnvelopeIgnoreFields, bA as drawSettlementRef, bB as extractCreditEnvelope, bC as fundingCommitment, bD as selectPrimaryCredit, bE as signHostingClosure, bF as signHostingControl, bG as stripCreditEnvelope, bH as toCreditView } from '../credit-menu-C-8g2cHT.js';
4
+ import { au as CreditMenu, a as AppEnv, U as UpfrontPaymentOpts, i as PaymentInfo, av as ReceiptIssuer, aw as LightningReceive, ax as TempoSettlementReadiness, ay as DVMHostOpts, az as DVMServeResult, L as LockPubkeyStateLoader, C as ConsumedCredentialStore } from '../credit-menu-QntEhZJS.js';
5
+ export { aA as BuildCreditMenuArgs, aB as BuilderIdentity, aC as CREDIT_ENVELOPE_KEYS, aD as CreateX402BatchSettlementServerOpts, aE as CreditEnvelope, aF as CreditEnvelopeError, aG as CreditFundCommitment, aH as CreditTerms, aI as DEFAULT_INVOICE_TTL_SECONDS, aJ as DVMHost, aK as HostingClosureCommand, aL as HostingClosureEvidence, aM as HostingControlCommand, aN as HostingControlConfig, aO as HostingControlStatus, aP as JobManager, aQ as JobManagerOpts, aR as LightningReceiveConfig, aS as MIN_INVOICE_TTL_SECONDS, aT as MemoryConsumedCredentialStore, aU as MemoryConsumedCredentialStoreOpts, aV as MemoryProcessedPaymentStore, aW as MemoryX402ExactSettlementStore, aX as MountOpts, aY as OwnerDisplay, aZ as PaidJobCompletion, a_ as PaymentMode, a$ as PlatformReporterOpts, b0 as PostgresProcessedPaymentStore, b1 as PostgresX402ExactSettlementStore, b2 as PriceFiat, b3 as ProcessedPaymentQuerier, b4 as ProcessedPaymentRail, b5 as ProcessedPaymentRecord, b6 as ProcessedPaymentReplayError, b7 as ProcessedPaymentStore, b8 as X402BatchAcceptance, b9 as X402BatchFunding, ba as X402BatchRefusal, bb as X402BatchSettlementServer, bc as X402ExactAcceptance, bd as X402ExactIntentConflictError, be as X402ExactSettlementAttempt, bf as X402ExactSettlementChainEvidence, bg as X402ExactSettlementEffect, bh as X402ExactSettlementEvidenceMissingError, bi as X402ExactSettlementEvidenceReader, bj as X402ExactSettlementIntent, bk as X402ExactSettlementNotReadyError, bl as X402ExactSettlementServer, bm as X402ExactSettlementServerOpts, bn as X402ExactSettlementStatus, bo as X402ExactSettlementStore, bp as X402SettlementChainEvidence, bq as X402SettlementEvidenceReader, br as X402SettlementSubmissionError, bs as X402_BATCH_AUTO_SETTLEMENT, bt as X402_BATCH_MIN_WITHDRAW_DELAY_SECONDS, bu as X402_BATCH_SETTLEMENT_NETWORK, bv as attachCreditMenu, bw as buildCreditMenu, bx as createDVMHost, by as createX402BatchSettlementServer, bz as creditEnvelopeIgnoreFields, bA as drawSettlementRef, bB as extractCreditEnvelope, bC as fundingCommitment, bD as selectPrimaryCredit, bE as signHostingClosure, bF as signHostingControl, bG as stripCreditEnvelope, bH as toCreditView } from '../credit-menu-QntEhZJS.js';
6
6
  import { Context, Hono } from 'hono';
7
7
  import { z } from 'zod';
8
- import { F as FxFetcher } from '../fx-Ql4nvdbh.js';
9
- import { c as StreamableJobStore, R as ReceiptIssuingStore, J as JobRecord, d as RequestIdClaim, e as RequestIdClaimResult, f as JobRetentionCursor, O as OutgoingMessage, A as AppendOutgoingOptions, P as PaymentCreditDelta, V as VerifyAndCreditResult, g as JobCounters, b as JobStore } from '../job-store-DCvJQUX0.js';
10
- export { a as JobStatus, h as isStreamableJobStore } from '../job-store-DCvJQUX0.js';
11
- import { C as ContentHoldHistory, a as ContentHoldMutation } from '../content-retention-D2K4MKNO.js';
12
- export { b as ContentHold, c as ContentHoldError, d as ContentHoldEvent, e as ContentHoldStore, f as ContentHoldsResponse, J as JobContentMetadata, g as baselineContentExpiry, h as contentMetadata, i as isContentHoldStore } from '../content-retention-D2K4MKNO.js';
8
+ import { F as FxFetcher } from '../fx-CMyNFenZ.js';
9
+ import { c as StreamableJobStore, R as ReceiptIssuingStore, J as JobRecord, d as RequestIdClaim, e as RequestIdClaimResult, f as JobRetentionCursor, O as OutgoingMessage, A as AppendOutgoingOptions, P as PaymentCreditDelta, V as VerifyAndCreditResult, g as JobCounters, b as JobStore } from '../job-store-qOD-FrQF.js';
10
+ export { a as JobStatus, h as isStreamableJobStore } from '../job-store-qOD-FrQF.js';
11
+ import { C as ContentHoldHistory, a as ContentHoldMutation } from '../content-retention-CVBYehRS.js';
12
+ export { b as ContentHold, c as ContentHoldError, d as ContentHoldEvent, e as ContentHoldStore, f as ContentHoldsResponse, J as JobContentMetadata, g as baselineContentExpiry, h as contentMetadata, i as isContentHoldStore } from '../content-retention-CVBYehRS.js';
13
13
  export { P as PinnedFetch, S as SSRFError, a as SSRFGuardOpts, b as SSRFReason, c as SSRFResolver, d as assertSafeUrl, e as createPinnedFetch } from '../ssrf-dMooihtY.js';
14
14
  import { Env, BlankSchema } from 'hono/types';
15
15
  import 'mppx';
@@ -17,7 +17,7 @@ import '@x402/core/server';
17
17
  import '@x402/evm/batch-settlement/server';
18
18
  import '@x402/core/types';
19
19
  import 'viem';
20
- import '../lightning-backend-CY5ML3km.js';
20
+ import '../lightning-backend-DtdG6UT5.js';
21
21
  import '@cashu/cashu-ts';
22
22
 
23
23
  /** Lifetime of a per-call implicit credit before the ledger refuses new draws. */
@@ -300,6 +300,10 @@ declare class MemoryCreditLedger implements CreditLedgerLike {
300
300
  creditId: string;
301
301
  drainId: string;
302
302
  }): Promise<void>;
303
+ requireTempoDrainExit(args: {
304
+ creditId: string;
305
+ drainId: string;
306
+ }): Promise<DrainTransitionResult>;
303
307
  releaseDrain(args: {
304
308
  creditId: string;
305
309
  drainId: string;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PostgresReplayStore
3
- } from "../chunk-2I3OHMTY.js";
3
+ } from "../chunk-BAQRUYRL.js";
4
4
  import {
5
5
  PostgresKVStore
6
6
  } from "../chunk-V5ZRATJH.js";
@@ -18,7 +18,7 @@ import {
18
18
  parseNwcUri,
19
19
  validateX402Env,
20
20
  withNwcPool
21
- } from "../chunk-55NKZQOC.js";
21
+ } from "../chunk-KGL3YMZA.js";
22
22
  import {
23
23
  MemoryKVStore
24
24
  } from "../chunk-SDK6KDJN.js";
@@ -71,6 +71,7 @@ import {
71
71
  protocolEnvelopeIgnoreFields,
72
72
  requestIdFromEnvelope,
73
73
  requireClientCompatibility,
74
+ retryHostedTempoCloseReport,
74
75
  revenueReporterBannerState,
75
76
  seedLockPubkeyState,
76
77
  selectPrimaryCredit,
@@ -79,33 +80,32 @@ import {
79
80
  stripCreditEnvelope,
80
81
  stripProtocolEnvelope,
81
82
  toCreditView,
82
- unknownRouteNotFound
83
- } from "../chunk-GSPV3UIM.js";
83
+ unknownRouteNotFound,
84
+ writeOffHostedTempoCloseReport
85
+ } from "../chunk-73C4JN2E.js";
84
86
  import {
85
- TEMPO_MODERATO_CHAIN_ID,
86
- TEMPO_MODERATO_RPC,
87
- TEMPO_SETTLEMENT_DEFAULT_LOW_BALANCE_MICRO,
88
- TempoSettlementReadiness,
89
- resolveTempoNetwork
90
- } from "../chunk-GB5XPAA5.js";
91
- import "../chunk-X3JEME6P.js";
92
- import "../chunk-ATXDKX6F.js";
87
+ MemoryProcessedPaymentStore,
88
+ PostgresProcessedPaymentStore,
89
+ ProcessedPaymentReplayError
90
+ } from "../chunk-XRLKGCAW.js";
91
+ import "../chunk-K2MSIKMM.js";
92
+ import "../chunk-GAZBBMAA.js";
93
93
  import {
94
94
  MemoryCreditLedger
95
- } from "../chunk-EBCLWOKF.js";
95
+ } from "../chunk-ZBQKXAYK.js";
96
96
  import {
97
97
  PostgresJobStore
98
- } from "../chunk-QPXI7YPH.js";
98
+ } from "../chunk-GODOH2AF.js";
99
99
  import "../chunk-YG7G4DPZ.js";
100
100
  import {
101
101
  SignedRequestError,
102
102
  createDefaultReplayStore,
103
103
  createSignedRequestVerifier,
104
104
  signedRequestInput
105
- } from "../chunk-5K5E6ME6.js";
105
+ } from "../chunk-4VV7WACY.js";
106
106
  import {
107
107
  isStreamableJobStore
108
- } from "../chunk-I6PHA54S.js";
108
+ } from "../chunk-TFDR2YP2.js";
109
109
  import {
110
110
  ContentHoldError,
111
111
  baselineContentExpiry,
@@ -116,7 +116,7 @@ import {
116
116
  IMPLICIT_CREDIT_TTL_MS,
117
117
  generateEphemeralReceiptKey,
118
118
  receiptPubkeyFromSecret
119
- } from "../chunk-RTFBVXCN.js";
119
+ } from "../chunk-LW7KZQHG.js";
120
120
  import {
121
121
  X402_DEFAULT_FACILITATOR,
122
122
  X402_DEFAULT_NETWORK,
@@ -128,15 +128,11 @@ import {
128
128
  SIGNED_REQUEST_STATEMENT_VERSION,
129
129
  signedRequestStatementHeader
130
130
  } from "../chunk-UKD3R2KU.js";
131
- import "../chunk-IFWUWHTW.js";
132
- import {
133
- initLoggers
134
- } from "../chunk-BL6LRWXD.js";
131
+ import "../chunk-TRY7BJA4.js";
135
132
  import "../chunk-FUJ36YDV.js";
136
- import "../chunk-66HGCPBU.js";
137
133
  import "../chunk-BQJIFRAZ.js";
138
- import "../chunk-XXLUIXPO.js";
139
- import "../chunk-5CQKSLAU.js";
134
+ import "../chunk-WLPLHXNP.js";
135
+ import "../chunk-HC4I7LAV.js";
140
136
  import {
141
137
  CreditLedger,
142
138
  CreditLedgerError,
@@ -144,25 +140,31 @@ import {
144
140
  PostgresX402ChannelStorage,
145
141
  X402RelaySubmissionLockError,
146
142
  allocateDrawValue
147
- } from "../chunk-VYP6ADCS.js";
143
+ } from "../chunk-YYRY32NR.js";
144
+ import {
145
+ SDK_INIT_ADVISORY_LOCK,
146
+ withSdkInitLock
147
+ } from "../chunk-COYKJRMM.js";
148
148
  import {
149
149
  applyRetryToPool
150
- } from "../chunk-6FEHRZO7.js";
150
+ } from "../chunk-IBX2ORBV.js";
151
151
  import {
152
152
  assertSupportedX402Network
153
153
  } from "../chunk-BPYMEMQX.js";
154
154
  import {
155
- diagnosticConsole
156
- } from "../chunk-DZQYQN2X.js";
155
+ TEMPO_MODERATO_CHAIN_ID,
156
+ TEMPO_MODERATO_RPC,
157
+ TEMPO_SETTLEMENT_DEFAULT_LOW_BALANCE_MICRO,
158
+ TempoSettlementReadiness,
159
+ resolveTempoNetwork
160
+ } from "../chunk-LFVIZH2G.js";
157
161
  import {
158
- MemoryProcessedPaymentStore,
159
- PostgresProcessedPaymentStore,
160
- ProcessedPaymentReplayError
161
- } from "../chunk-XRLKGCAW.js";
162
+ initLoggers
163
+ } from "../chunk-QSZW2I5Y.js";
164
+ import "../chunk-66HGCPBU.js";
162
165
  import {
163
- SDK_INIT_ADVISORY_LOCK,
164
- withSdkInitLock
165
- } from "../chunk-COYKJRMM.js";
166
+ diagnosticConsole
167
+ } from "../chunk-OIP44KBB.js";
166
168
 
167
169
  // src/sdk/server/cashu-env.ts
168
170
  async function resolveCashuOptsFromEnv(env, pool, cashuModeHint) {
@@ -1149,7 +1151,7 @@ function createDVMHost(opts = {}) {
1149
1151
  });
1150
1152
  applyRetryToPool(pool, "dvm-host");
1151
1153
  pgPool = pool;
1152
- const { PostgresJobStore: PostgresJobStore2 } = await import("../postgres-job-store-6VGFL6XE.js");
1154
+ const { PostgresJobStore: PostgresJobStore2 } = await import("../postgres-job-store-27VOCSPO.js");
1153
1155
  const pgJobStore = new PostgresJobStore2(pool);
1154
1156
  pendingInits.push(pgJobStore.init(), pgJobStore.initStreaming());
1155
1157
  jobStore = pgJobStore;
@@ -1242,11 +1244,11 @@ ${config.facilitatorAuth?.keyId ?? ""}`;
1242
1244
  let tempoChargeBackend = "user-supplied";
1243
1245
  const mppTempoRecipient = envMaybe.DVMKIT_TEMPO_RECIPIENT;
1244
1246
  if (!mpp && mppTempoRecipient) {
1245
- const { createMppFromOpts, createDualKeyMppxFromOpts, parseMppMethodsAllowlist } = await import("../mpp-setup-2BKTPEK6.js");
1247
+ const { createMppFromOpts, createDualKeyMppxFromOpts, parseMppMethodsAllowlist } = await import("../mpp-setup-VW53KFPO.js");
1246
1248
  tempoChargeBackend = pgPool ? "postgres" : "memory";
1247
1249
  let tempoCharge;
1248
1250
  if (pgPool) {
1249
- const { PostgresTempoChargeStore } = await import("../tempo-charge-store-NKXJ2AXE.js");
1251
+ const { PostgresTempoChargeStore } = await import("../tempo-charge-store-2RPOJBM2.js");
1250
1252
  const chargeStore = new PostgresTempoChargeStore(pgPool);
1251
1253
  tempoChargeStore = chargeStore;
1252
1254
  pendingInits.push(chargeStore.init());
@@ -1266,7 +1268,7 @@ ${config.facilitatorAuth?.keyId ?? ""}`;
1266
1268
  { createPublicClient, createWalletClient, erc20Abi, http },
1267
1269
  { tempo: tempoMainnet, tempoModerato }
1268
1270
  ] = await Promise.all([
1269
- import("../tempo-session-store-ZSDQIWSU.js"),
1271
+ import("../tempo-session-store-LI3Q3A3U.js"),
1270
1272
  import("viem/accounts"),
1271
1273
  import("viem"),
1272
1274
  import("viem/chains")
@@ -1419,7 +1421,7 @@ ${config.facilitatorAuth?.keyId ?? ""}`;
1419
1421
  }
1420
1422
  }
1421
1423
  const fxSource = envMaybe.DVMKIT_FX_SOURCE;
1422
- const { createFxFetcher, resolveFxSourceFromEnv, warmFxSnapshot } = await import("../pricing-H2RA4X2R.js");
1424
+ const { createFxFetcher, resolveFxSourceFromEnv, warmFxSnapshot } = await import("../pricing-NNMBNP7N.js");
1423
1425
  const fxFetcher = opts.fx ?? createFxFetcher({ source: resolveFxSourceFromEnv(envMaybe) });
1424
1426
  const hostRailConfigured = (opts.paymentMethods?.length ?? 0) > 0 || (effectiveMints?.length ?? 0) > 0 || !!x402WithDualServe || !!mpp;
1425
1427
  if (mounts.some((entry) => mountNeedsFx(entry, hostRailConfigured))) warmFxSnapshot(fxFetcher);
@@ -1429,7 +1431,7 @@ ${config.facilitatorAuth?.keyId ?? ""}`;
1429
1431
  assertReceiptIdentity(envMaybe, opts.builder, receiptKey, cashuOpts.dvmId, opts.devMode);
1430
1432
  let sharedPgReplayStore;
1431
1433
  if (pgPool) {
1432
- const { PostgresReplayStore: PostgresReplayStore2 } = await import("../postgres-replay-store-SY26NUCI.js");
1434
+ const { PostgresReplayStore: PostgresReplayStore2 } = await import("../postgres-replay-store-7GJFAQXY.js");
1433
1435
  const store2 = new PostgresReplayStore2(pgPool);
1434
1436
  pendingInits.push(store2.init());
1435
1437
  sharedPgReplayStore = store2;
@@ -1457,13 +1459,13 @@ ${config.facilitatorAuth?.keyId ?? ""}`;
1457
1459
  }
1458
1460
  let sharedPgConsumedStore;
1459
1461
  if (pgPool) {
1460
- const { PostgresConsumedCredentialStore } = await import("../postgres-consumed-credential-store-R7DNU6CM.js");
1462
+ const { PostgresConsumedCredentialStore } = await import("../postgres-consumed-credential-store-V464OAJB.js");
1461
1463
  const consumedStore = new PostgresConsumedCredentialStore(pgPool);
1462
1464
  pendingInits.push(consumedStore.init());
1463
1465
  sharedPgConsumedStore = consumedStore;
1464
1466
  }
1465
1467
  if (pgPool) {
1466
- const { CreditLedger: CreditLedger2 } = await import("../credit-ledger-AOU6S34N.js");
1468
+ const { CreditLedger: CreditLedger2 } = await import("../credit-ledger-CZQ56DYI.js");
1467
1469
  const pgLedger = new CreditLedger2(pgPool, tempoSessionStore);
1468
1470
  pendingInits.push(pgLedger.init());
1469
1471
  creditLedger = pgLedger;
@@ -1472,7 +1474,7 @@ ${config.facilitatorAuth?.keyId ?? ""}`;
1472
1474
  pendingInits.push(pgProcessed.init());
1473
1475
  processedPayments = pgProcessed;
1474
1476
  } else {
1475
- const { MemoryCreditLedger: MemoryCreditLedger2 } = await import("../memory-credit-ledger-4HWYINKJ.js");
1477
+ const { MemoryCreditLedger: MemoryCreditLedger2 } = await import("../memory-credit-ledger-EMN7G3MO.js");
1476
1478
  creditLedger = disposableCashu?.ledger ?? new MemoryCreditLedger2();
1477
1479
  const { MemoryProcessedPaymentStore: MemoryProcessedPaymentStore2 } = await import("../processed-payment-store-GKMAWOM3.js");
1478
1480
  processedPayments = new MemoryProcessedPaymentStore2();
@@ -2167,6 +2169,7 @@ export {
2167
2169
  requestIdFromEnvelope,
2168
2170
  requireClientCompatibility,
2169
2171
  resolveCashuOptsFromEnv,
2172
+ retryHostedTempoCloseReport,
2170
2173
  secp256k1Auth,
2171
2174
  selectPrimaryCredit,
2172
2175
  serve,
@@ -2177,5 +2180,6 @@ export {
2177
2180
  stripCreditEnvelope,
2178
2181
  stripProtocolEnvelope,
2179
2182
  toCreditView,
2180
- withSdkInitLock
2183
+ withSdkInitLock,
2184
+ writeOffHostedTempoCloseReport
2181
2185
  };