@dvmkit/sdk 0.3.4-rc.10 → 0.4.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 (50) hide show
  1. package/dist/{chunk-C2AGARLM.js → chunk-2VGWYG4P.js} +5 -3
  2. package/dist/{chunk-A4CM2BD3.js → chunk-3MHE725Z.js} +1 -1
  3. package/dist/{chunk-VAMSJRJT.js → chunk-5LR6P7WN.js} +5 -3
  4. package/dist/{chunk-YYQG4R7T.js → chunk-74PUEZJ4.js} +6 -4
  5. package/dist/{chunk-MKI6OVW4.js → chunk-CZULM42S.js} +0 -51
  6. package/dist/{chunk-M4QDXD2A.js → chunk-FYRR2UEZ.js} +1 -1
  7. package/dist/{chunk-4UZN2GP5.js → chunk-GAOAYHZA.js} +209 -33
  8. package/dist/{chunk-Z4BNLUZF.js → chunk-IWQHUSMO.js} +3 -105
  9. package/dist/{chunk-4J32DTLT.js → chunk-IXR5RFK7.js} +82 -4
  10. package/dist/{chunk-2SD2W2BG.js → chunk-JH3SX3LY.js} +252 -26
  11. package/dist/{chunk-UZC4A4DM.js → chunk-K2YX2VRA.js} +2480 -206
  12. package/dist/chunk-KA6VN5FK.js +245 -0
  13. package/dist/chunk-LIRAHP7B.js +53 -0
  14. package/dist/{chunk-MG67KXU7.js → chunk-MZRJR2CW.js} +4 -2
  15. package/dist/{chunk-JDFLRNAZ.js → chunk-PB4FYZET.js} +67 -7
  16. package/dist/{chunk-BQ2NMWKE.js → chunk-PLG4XER6.js} +1 -1
  17. package/dist/{chunk-Z3EHBW2G.js → chunk-R4DQZFAL.js} +7 -5
  18. package/dist/chunk-RLTSCKRI.js +109 -0
  19. package/dist/{chunk-2KGG5ORW.js → chunk-TXX4GOUB.js} +3 -3
  20. package/dist/{chunk-YRDA7EWN.js → chunk-W2EQGDF5.js} +14 -10
  21. package/dist/{chunk-EAMZZ2B4.js → chunk-X7EZ5CLI.js} +59 -0
  22. package/dist/{chunk-7X6UDVCQ.js → chunk-Z4ZT5LNT.js} +66 -2
  23. package/dist/{credit-ledger-A35WH2TI.js → credit-ledger-MI2H7NEC.js} +3 -1
  24. package/dist/{credit-menu-0-UtJ3hh.d.ts → credit-menu-B8_p_vUz.d.ts} +133 -7
  25. package/dist/{fx-DhyT1Cjh.d.ts → fx-DuaYHvVn.d.ts} +1 -1
  26. package/dist/index.d.ts +6 -6
  27. package/dist/internal/caller.d.ts +6 -6
  28. package/dist/internal/caller.js +28 -24
  29. package/dist/internal/server.d.ts +11 -85
  30. package/dist/internal/server.js +18 -16
  31. package/dist/{job-store-D3CcZp_g.d.ts → job-store-D6Rjj5Oi.d.ts} +1 -1
  32. package/dist/{lightning-backend-BhsyrBLa.d.ts → lightning-backend-BaeCPmx7.d.ts} +1 -1
  33. package/dist/{memory-credit-ledger-2LBZVMKJ.js → memory-credit-ledger-W2BAUYJP.js} +4 -2
  34. package/dist/{mpp-setup-7CGBKNUP.js → mpp-setup-RF5FXGGV.js} +5 -1
  35. package/dist/{payout-reporter-ZMOA37GN.js → payout-reporter-3Y2U55ZX.js} +1 -1
  36. package/dist/{postgres-job-store-MSD2HZOI.js → postgres-job-store-VLXLWXUQ.js} +1 -1
  37. package/dist/{revenue-reporter-EKJOGQYR.js → revenue-reporter-MAERPYGK.js} +1 -1
  38. package/dist/server/index.d.ts +14 -10
  39. package/dist/server/index.js +54 -17
  40. package/dist/{step-cache-v2yhyhSZ.d.ts → step-cache-Bi43A0JN.d.ts} +1769 -1549
  41. package/dist/{tempo-charge-store-4WX7FPOV.js → tempo-charge-store-Q3D7KYMH.js} +1 -1
  42. package/dist/tempo-lifecycle-OTHV757Y.js +14 -0
  43. package/dist/{tempo-session-store-LCSDHB7G.js → tempo-session-store-ZRNCOX7P.js} +1 -1
  44. package/dist/{tempo-wallet-RCGBBAJH.js → tempo-wallet-32JWQZKQ.js} +4 -3
  45. package/dist/testing/index.d.ts +3 -3
  46. package/dist/{usd-Cu9G6xv2.d.ts → usd-AZPVq4eU.d.ts} +1 -1
  47. package/dist/{x402-S47Q77UE.js → x402-CEDHGZDI.js} +17 -14
  48. package/package.json +1 -1
  49. package/dist/chunk-YHN3WMMF.js +0 -122
  50. package/dist/tempo-lifecycle-TJ62A7UX.js +0 -13
@@ -55,7 +55,7 @@ import {
55
55
  withIdentitiesLock,
56
56
  withTempoChannelLock,
57
57
  withholdsTempoCreditSession
58
- } from "../chunk-Z3EHBW2G.js";
58
+ } from "../chunk-R4DQZFAL.js";
59
59
  import {
60
60
  TEMPO_CHAIN_ID,
61
61
  TEMPO_MODERATO_CHAIN_ID,
@@ -71,7 +71,7 @@ import {
71
71
  tempoTokenReference,
72
72
  tempoWrongAssetHint,
73
73
  tryResolveTempoAsset
74
- } from "../chunk-YYQG4R7T.js";
74
+ } from "../chunk-74PUEZJ4.js";
75
75
  import {
76
76
  DvmX402ChannelStorage,
77
77
  X402_EXACT_AUTHORIZATION_TTL_SECONDS,
@@ -116,7 +116,7 @@ import {
116
116
  x402PendingStale,
117
117
  x402PendingUnsettled,
118
118
  x402WrongAssetHint
119
- } from "../chunk-YRDA7EWN.js";
119
+ } from "../chunk-W2EQGDF5.js";
120
120
  import {
121
121
  RAIL_FLAGS,
122
122
  SUPPORTED_PROTOCOL_VERSION,
@@ -163,7 +163,7 @@ import {
163
163
  setOutputTraceId,
164
164
  settleDrainEvidence,
165
165
  withinAdvertisedTolerance
166
- } from "../chunk-C2AGARLM.js";
166
+ } from "../chunk-2VGWYG4P.js";
167
167
  import {
168
168
  CREDIT_POSTURES,
169
169
  FEEDBACK_POSTURES,
@@ -181,7 +181,7 @@ import {
181
181
  retireConfigBackup,
182
182
  rollbackConfig,
183
183
  updateConfig
184
- } from "../chunk-MG67KXU7.js";
184
+ } from "../chunk-MZRJR2CW.js";
185
185
  import {
186
186
  CAPABILITY_NAME_RE
187
187
  } from "../chunk-O3QDFPKM.js";
@@ -289,16 +289,14 @@ import {
289
289
  withWalletLock,
290
290
  writeAgentMnemonic,
291
291
  writeIdentity
292
- } from "../chunk-VAMSJRJT.js";
292
+ } from "../chunk-5LR6P7WN.js";
293
293
  import {
294
294
  X402_BATCH_SETTLEMENT_SCHEME,
295
295
  X402_DEFAULT_FACILITATOR,
296
296
  X402_DEFAULT_NETWORK,
297
297
  X402_EXACT_SCHEME,
298
- X402_NETWORKS,
299
298
  X402_V1_VERSION,
300
299
  X402_VERSION,
301
- assertSupportedX402Network,
302
300
  buildPaymentRequiredV2,
303
301
  buildPaymentRequirements,
304
302
  caip2ToX402Network,
@@ -314,13 +312,8 @@ import {
314
312
  usdcContractFor,
315
313
  usdcDomainNameFor,
316
314
  usdcDomainVersionFor,
317
- x402NetworkByCaip2,
318
- x402NetworkBySlug,
319
- x402NetworkLabel,
320
- x402NetworkListForCopy,
321
- x402NetworkToCaip2,
322
- x402SupportedNetworksHint
323
- } from "../chunk-Z4BNLUZF.js";
315
+ x402NetworkToCaip2
316
+ } from "../chunk-IWQHUSMO.js";
324
317
  import {
325
318
  COINGECKO_SIMPLE_PRICE_URL,
326
319
  assertValidBudget,
@@ -343,7 +336,7 @@ import {
343
336
  parseBudget,
344
337
  usdToMsats,
345
338
  usdcToMsats
346
- } from "../chunk-A4CM2BD3.js";
339
+ } from "../chunk-3MHE725Z.js";
347
340
  import {
348
341
  AGENT_MNEMONIC_FILE,
349
342
  BTC_RATE_FILE,
@@ -354,7 +347,6 @@ import {
354
347
  CONFIG_FILE,
355
348
  CONFIG_PINNED_FILE,
356
349
  CREDITS_FILE,
357
- DvmError,
358
350
  FAVORITES_FILE,
359
351
  FEEDBACK_NUDGES_FILE,
360
352
  IDENTITIES_FILE,
@@ -369,13 +361,10 @@ import {
369
361
  X402_CHANNELS_FILE,
370
362
  ensureConfigDir,
371
363
  ensureConfigSubdir,
372
- isAbortError,
373
- providerProseSources,
374
364
  repairConfigDirMode,
375
365
  resolveRpcHttpTransportOptions,
376
- resolveRpcOverride,
377
- transportErrorCode
378
- } from "../chunk-MKI6OVW4.js";
366
+ resolveRpcOverride
367
+ } from "../chunk-CZULM42S.js";
379
368
  import {
380
369
  RAIL_REFUNDABLE,
381
370
  SIGNED_REQUEST_AUTH_ID,
@@ -417,6 +406,21 @@ import {
417
406
  applyRetryToPool,
418
407
  withInitRetry
419
408
  } from "../chunk-P6QON7ER.js";
409
+ import {
410
+ X402_NETWORKS,
411
+ assertSupportedX402Network,
412
+ x402NetworkByCaip2,
413
+ x402NetworkBySlug,
414
+ x402NetworkLabel,
415
+ x402NetworkListForCopy,
416
+ x402SupportedNetworksHint
417
+ } from "../chunk-RLTSCKRI.js";
418
+ import {
419
+ DvmError,
420
+ isAbortError,
421
+ providerProseSources,
422
+ transportErrorCode
423
+ } from "../chunk-LIRAHP7B.js";
420
424
  import {
421
425
  DIAGNOSTIC_CATALOGUE_VERSION,
422
426
  bindDiagnosticCapabilityAuthority,
@@ -9435,7 +9439,7 @@ async function probeX402(x402, timeoutMs) {
9435
9439
  let network;
9436
9440
  let address;
9437
9441
  try {
9438
- const { loadX402Wallet: loadX402Wallet2, getX402Balance: getX402Balance2, ensureAddress: ensureAddress2, usdcContractByCaip2: usdcContractByCaip22 } = await import("../x402-S47Q77UE.js");
9442
+ const { loadX402Wallet: loadX402Wallet2, getX402Balance: getX402Balance2, ensureAddress: ensureAddress2, usdcContractByCaip2: usdcContractByCaip22 } = await import("../x402-CEDHGZDI.js");
9439
9443
  const wallet = loadX402Wallet2();
9440
9444
  if (!wallet) {
9441
9445
  const storedKey = x402.privateKey;
@@ -9487,7 +9491,7 @@ async function probeMpp(mpp, timeoutMs) {
9487
9491
  if (!mpp) return null;
9488
9492
  if (mpp.method === "tempo") {
9489
9493
  try {
9490
- const { connectedTempoAccount: connectedTempoAccount2, getTempoUsdcBalance: getTempoUsdcBalance2, resolveTempoNetwork: resolveTempoNetwork2 } = await import("../tempo-wallet-RCGBBAJH.js");
9494
+ const { connectedTempoAccount: connectedTempoAccount2, getTempoUsdcBalance: getTempoUsdcBalance2, resolveTempoNetwork: resolveTempoNetwork2 } = await import("../tempo-wallet-32JWQZKQ.js");
9491
9495
  const account = await connectedTempoAccount2();
9492
9496
  if (!account) {
9493
9497
  return {
@@ -1,23 +1,23 @@
1
1
  import { FacilitatorConfig } from '@x402/core/server';
2
- import { aj as PaymentPayload, ap as PaymentRequirementsV1, aq as PaymentRequirementsV2, aE as X402Config, av as SettleResponse, aC as VerifyResponse, bi as X402ExactVersionSupport, bj as X402Receipt, bk as TransactionalPayoutHook, bl as CashuMeltCompleted } from '../step-cache-v2yhyhSZ.js';
3
- export { bm as CreditDepositPayload, bn as CreditDrainPayload, bo as FundingLot, bp as LotDebit, bq as LotDepletion, br as MppxServer, bs as NON_CHANNEL_BITCOIN_RAILS, bt as NonChannelBitcoinRail, bu as PayoutReporter, bv as PostgresTempoSessionStore, bw as RevenueReporter, bx as SIGNED_ENVELOPE_FIELDS, by as SIGNED_ENVELOPE_TYPES, bz as X402TrackedChannel, bA as _testing, bB as createDefaultReplayStore, bC as depleteLots, bD as fifoOrder, bE as inKindDrawMsats, bF as isInKindDepletion, bG as isNonChannelBitcoinRail, bH as lotOwedSats, bI as netOwedSats, bJ as wrapMppx } from '../step-cache-v2yhyhSZ.js';
2
+ import { aj as PaymentPayload, ap as PaymentRequirementsV1, aq as PaymentRequirementsV2, aE as X402Config, av as SettleResponse, aC as VerifyResponse, bi as X402ExactVersionSupport, bj as X402Receipt, bk as TransactionalPayoutHook, bl as CashuMeltCompleted } from '../step-cache-Bi43A0JN.js';
3
+ export { bm as CreditDepositPayload, bn as CreditDrainPayload, bo as FundingLot, bp as LotDebit, bq as LotDepletion, br as MppxServer, bs as NON_CHANNEL_BITCOIN_RAILS, bt as NonChannelBitcoinRail, bu as PayoutReporter, bv as PostgresTempoSessionStore, bw as RevenueReporter, bx as SIGNED_ENVELOPE_FIELDS, by as SIGNED_ENVELOPE_TYPES, bz as X402TrackedChannel, bA as _testing, bB as createDefaultReplayStore, bC as depleteLots, bD as fifoOrder, bE as inKindDrawMsats, bF as isInKindDepletion, bG as isNonChannelBitcoinRail, bH as lotOwedSats, bI as netOwedSats, bJ as wrapMppx } from '../step-cache-Bi43A0JN.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 { A as AccumulatorPool, a as AccumulatorQuerier, C as ConsumedCredentialStore } from '../credit-menu-0-UtJ3hh.js';
10
- export { b as AppEnv, c as CreditFundingReport, F as FiatDenomination, d as FiatDenominationFailure, e as FundOnlyRequest, I as IncomingPaymentOpts, J as JobCancelledError, M as MintHealthTracker, P as PAYMENT_PROOF_KEYS, f as PaymentErrorCode, g as PaymentErrorDetail, h as PaymentInfo, R as ReporterBannerOpts, i as ResolvedFx, j as RevenueBootCheckOpts, S as SDKServerOpts, k as ServerJob, l as ShortPayForfeit, T as TempoChannelReport, m as TempoObserverHealth, n as TempoSessionChannelMismatchError, U as UpfrontPaymentOpts, V as VerifiedIncomingPayment, o as VerifyIncomingSnapshot, X as X402BatchChannelObservation, p as X402FacilitatorHealth, q as X402SettlementEvidenceOutcome, r as X402SettlementRepair, s as X402SettlementRepairRefusal, t as X402SettlementRepaired, u as X402WedgedSettlement, v as X402WedgedSettlementPage, w as X402_BATCH_SETTLEMENT_MAINNET_NETWORK, x as abortJob, y as applyPaymentInfoToJob, z as assertRevenueReporterReady, B as buildPaymentErrorResponse, D as clearAccumulatorForDvm, E as createDVMServer, G as creditDepositPayload, H as derivedFundCreditId, K as devModeSkipsPaymentVerification, L as fromJobRecord, N as fundedMicroFor, O as hasPaymentProof, Q as hashLockKey, W as implicitCreditId, Y as initWalletAccumulatorTable, Z as insertAccumulatorRows, _ as isDerivedCreditId, $ as isTerminal, a0 as isYieldMessage, a1 as issueUpfrontChallenges, a2 as msatsToFiatMicro, a3 as paymentErrorBody, a4 as pinAskFiat, a5 as priceFiatMicro, a6 as processIncomingPayment, a7 as providerMessage, a8 as repairX402ExactSettlementEffect, a9 as resolveFxSnapshot, aa as resolvePriceFiat, ab as revenueReporterBannerState, ac as toCreditTerms, ad as toJobRecord, ae as unknownRouteNotFound, af as verifyIncomingPayment, ag as verifyTempoSessionManagementCredential, ah as verifyUpfrontPayment, ai as x402RequiredUsdcMicro, aj as x402SettledShare } from '../credit-menu-0-UtJ3hh.js';
11
- import { g as LockPubkey } from '../lightning-backend-BhsyrBLa.js';
12
- export { t as lockPubkeyStoreToLockPubkey } from '../lightning-backend-BhsyrBLa.js';
13
- export { O as OutgoingMessage, S as StaleJobReapable, i as isStaleJobReapable } from '../job-store-D3CcZp_g.js';
14
- import { Store } from 'mppx';
9
+ import { A as AccumulatorPool, a as AccumulatorQuerier, C as ConsumedCredentialStore } from '../credit-menu-B8_p_vUz.js';
10
+ export { b as AppEnv, c as CreditFundingReport, F as FiatDenomination, d as FiatDenominationFailure, e as FundOnlyRequest, I as IncomingPaymentOpts, J as JobCancelledError, M as MintHealthTracker, P as PAYMENT_PROOF_KEYS, f as PaymentErrorCode, g as PaymentErrorDetail, h as PaymentInfo, i as PostgresTempoChargeStore, R as ReporterBannerOpts, j as ResolvedFx, k as RevenueBootCheckOpts, S as SDKServerOpts, l as ServerJob, m as ShortPayForfeit, T as TempoChannelReport, n as TempoObserverHealth, o as TempoSessionChannelMismatchError, U as UpfrontPaymentOpts, V as VerifiedIncomingPayment, p as VerifyIncomingSnapshot, X as X402BatchChannelObservation, q as X402FacilitatorHealth, r as X402SettlementEvidenceOutcome, s as X402SettlementRepair, t as X402SettlementRepairRefusal, u as X402SettlementRepaired, v as X402WedgedSettlement, w as X402WedgedSettlementPage, x as X402_BATCH_SETTLEMENT_MAINNET_NETWORK, y as abortJob, z as applyPaymentInfoToJob, B as assertRevenueReporterReady, D as buildPaymentErrorResponse, E as clearAccumulatorForDvm, G as createDVMServer, H as creditDepositPayload, K as derivedFundCreditId, L as devModeSkipsPaymentVerification, N as fromJobRecord, O as fundedMicroFor, Q as hasPaymentProof, W as hashLockKey, Y as implicitCreditId, Z as initWalletAccumulatorTable, _ as insertAccumulatorRows, $ as isDerivedCreditId, a0 as isTerminal, a1 as isYieldMessage, a2 as issueUpfrontChallenges, a3 as msatsToFiatMicro, a4 as paymentErrorBody, a5 as pinAskFiat, a6 as priceFiatMicro, a7 as processIncomingPayment, a8 as providerMessage, a9 as repairX402ExactSettlementEffect, aa as resolveFxSnapshot, ab as resolvePriceFiat, ac as revenueReporterBannerState, ad as toCreditTerms, ae as toJobRecord, af as unknownRouteNotFound, ag as verifyIncomingPayment, ah as verifyTempoSessionManagementCredential, ai as verifyUpfrontPayment, aj as x402RequiredUsdcMicro, ak as x402SettledShare } from '../credit-menu-B8_p_vUz.js';
11
+ import { g as LockPubkey } from '../lightning-backend-BaeCPmx7.js';
12
+ export { t as lockPubkeyStoreToLockPubkey } from '../lightning-backend-BaeCPmx7.js';
13
+ export { O as OutgoingMessage, S as StaleJobReapable, i as isStaleJobReapable } from '../job-store-D6Rjj5Oi.js';
15
14
  import { z } from 'zod';
15
+ import 'mppx';
16
16
  import '@x402/evm/batch-settlement/server';
17
- import 'viem';
18
17
  import '@x402/core/types';
18
+ import 'viem';
19
19
  import '@cashu/cashu-ts';
20
- import '../fx-DhyT1Cjh.js';
20
+ import '../fx-DuaYHvVn.js';
21
21
 
22
22
  declare function verifyWithFacilitator(payload: PaymentPayload, requirements: PaymentRequirementsV1 | PaymentRequirementsV2, config?: Pick<X402Config, "facilitator" | "facilitatorAuth">, createAuthHeaders?: FacilitatorConfig["createAuthHeaders"] | undefined): Promise<VerifyResponse>;
23
23
  declare function settleWithFacilitator(payload: PaymentPayload, requirements: PaymentRequirementsV1 | PaymentRequirementsV2, config?: Pick<X402Config, "facilitator" | "facilitatorAuth">, createAuthHeaders?: FacilitatorConfig["createAuthHeaders"] | undefined): Promise<SettleResponse>;
@@ -237,80 +237,6 @@ declare function jobCredentialGate(opts: {
237
237
  acceptsBearer: boolean;
238
238
  }): JobCredentialGate;
239
239
 
240
- interface PostgresTempoChargeStoreOpts {
241
- /** Table name. Defaults to `"mpp_tempo_charge_replays"`. Must match `/^[a-zA-Z_][a-zA-Z0-9_]*$/`. */
242
- tableName?: string;
243
- /**
244
- * How long a row survives its last write, in milliseconds. Defaults to one
245
- * hour — see the class doc for why that is both generous and safe.
246
- */
247
- retentionMs?: number;
248
- /**
249
- * Probability (per write) of firing a fire-and-forget GC sweep that deletes
250
- * expired rows. Defaults to 0.01 — every ~100 writes runs one DELETE. Set to
251
- * 0 to disable GC entirely (rely on an external sweeper).
252
- */
253
- gcSampleRate?: number;
254
- /** Clock source (ms). Defaults to `Date.now`. Test seam for deterministic TTL. */
255
- now?: () => number;
256
- }
257
- /**
258
- * Postgres implementation of the atomic store mppx's `tempo.charge` uses for
259
- * replay protection.
260
- *
261
- * mppx refuses a charge credential whose transaction hash it has already taken
262
- * (`markHashUsed`), and refuses a zero-dollar proof credential whose challenge
263
- * id it has already taken — but only against the store it is handed. Omitting
264
- * one leaves it on `Store.memory()`: per-process, lost on restart, invisible to
265
- * sibling machines. A replayed credential then reaches a broadcast the chain
266
- * rejects instead of the cheap `Transaction hash has already been used`.
267
- *
268
- * {@link PostgresTempoSessionStore} cannot serve this keyspace — its `update`
269
- * asserts a monotonic *channel-state object*, and a replay marker is the number
270
- * `Date.now()`. Values here are deliberately opaque JSON: mppx writes a number
271
- * for a replay marker and a `SponsorBudget.State` object for the fee-sponsor
272
- * budget, which shares this store unprefixed so aggregate in-flight fee
273
- * exposure is sponsor-wide rather than per-process.
274
- *
275
- * **Retention is ours — mppx has no TTL at any layer of `Store`.** Every row
276
- * carries an `expires_at` refreshed on each write, swept by a sampled in-line
277
- * DELETE. The window is uniform rather than per-keyspace because it is safe for
278
- * both kinds of row: a replay marker guards a credential whose transaction is
279
- * settleable for about twenty-five seconds and whose challenge expires in
280
- * minutes, and a sponsor-budget reservation is bounded by that same expiring
281
- * nonce (plus a thirty-second lease while it is `prepared`), so an hour-idle
282
- * budget row holds only reservations `SponsorBudget.reconcile` would release on
283
- * sight. Sweeping such a row is equivalent to reconciling it, and the next
284
- * reservation recreates it. Keeping the rule uniform is what lets this store
285
- * stay ignorant of mppx's key naming across version bumps.
286
- *
287
- * `expires_at` is a GC marker only: reads do not filter on it, so protection
288
- * lapses when a row is swept and never before.
289
- */
290
- declare class PostgresTempoChargeStore implements Store.AtomicStore {
291
- private readonly pool;
292
- private readonly tableName;
293
- private readonly retentionMs;
294
- private readonly gcSampleRate;
295
- private readonly now;
296
- constructor(pool: Pool, opts?: PostgresTempoChargeStoreOpts);
297
- /** Run the CREATE TABLE migration. Idempotent — safe to call repeatedly. */
298
- init(): Promise<void>;
299
- /** Read one stored value, or `null` when absent — mppx's miss sentinel. */
300
- get(key: string): Promise<unknown>;
301
- put(key: string, value: unknown): Promise<void>;
302
- /** Delete one stored value — mppx's compensating release on a failed broadcast. */
303
- delete(key: string): Promise<void>;
304
- /**
305
- * Advisory locking covers the absent-row first write before the row lock.
306
- * Both competing presentations of one credential and the shared sponsor
307
- * budget need this serialization. The transaction contains no chain call.
308
- */
309
- update<result>(key: string, fn: (current: unknown) => Store.Change<unknown, result>): Promise<result>;
310
- private createTables;
311
- private maybeSweep;
312
- }
313
-
314
240
  /**
315
241
  * `topics[0]` of a `CloseRequested` log.
316
242
  *
@@ -351,4 +277,4 @@ declare function humanizeZodError(err: z.ZodError, opts: {
351
277
  schemaUrl: string;
352
278
  }): HumanizedZodError;
353
279
 
354
- export { AccumulatorPool, DEFAULT_LOCK_PUBKEY_GRACE_SECONDS, type LockPubkeyPool, type LockPubkeyState, type LockPubkeyStateLoader, LockPubkey as LockPubkeyStoreLockPubkey, PostgresTempoChargeStore, TEMPO_CLOSE_DB_RECOVERY_BUDGET_MS, TEMPO_CLOSE_REQUESTED_TOPIC, activePubkeySet, createAdminCashuNonceStore, createInstrumentedFetch, humanizeZodError, initLockPubkeyTable, installAdminCashuRoutes, jobCredentialGate, loadLockPubkeyState, pruneRetired, rateUnavailablePaymentError, rotateLockPubkey, seedLockPubkeyState, settleWithFacilitator, verifyWithFacilitator, verifyX402Payment };
280
+ export { AccumulatorPool, DEFAULT_LOCK_PUBKEY_GRACE_SECONDS, type LockPubkeyPool, type LockPubkeyState, type LockPubkeyStateLoader, LockPubkey as LockPubkeyStoreLockPubkey, TEMPO_CLOSE_DB_RECOVERY_BUDGET_MS, TEMPO_CLOSE_REQUESTED_TOPIC, activePubkeySet, createAdminCashuNonceStore, createInstrumentedFetch, humanizeZodError, initLockPubkeyTable, installAdminCashuRoutes, jobCredentialGate, loadLockPubkeyState, pruneRetired, rateUnavailablePaymentError, rotateLockPubkey, seedLockPubkeyState, settleWithFacilitator, verifyWithFacilitator, verifyX402Payment };
@@ -1,19 +1,18 @@
1
1
  import {
2
2
  PostgresTempoSessionStore
3
- } from "../chunk-EAMZZ2B4.js";
3
+ } from "../chunk-X7EZ5CLI.js";
4
4
  import {
5
5
  verifyX402Payment
6
- } from "../chunk-2KGG5ORW.js";
6
+ } from "../chunk-TXX4GOUB.js";
7
7
  import {
8
8
  RevenueReporter
9
- } from "../chunk-7X6UDVCQ.js";
9
+ } from "../chunk-Z4ZT5LNT.js";
10
10
  import {
11
11
  PayoutReporter
12
- } from "../chunk-4UZN2GP5.js";
12
+ } from "../chunk-GAOAYHZA.js";
13
13
  import {
14
14
  PostgresTempoChargeStore
15
- } from "../chunk-YHN3WMMF.js";
16
- import "../chunk-YG7G4DPZ.js";
15
+ } from "../chunk-KA6VN5FK.js";
17
16
  import {
18
17
  DEFAULT_LOCK_PUBKEY_GRACE_SECONDS,
19
18
  MintHealthTracker,
@@ -65,14 +64,15 @@ import {
65
64
  verifyUpfrontPayment,
66
65
  x402RequiredUsdcMicro,
67
66
  x402SettledShare
68
- } from "../chunk-UZC4A4DM.js";
67
+ } from "../chunk-K2YX2VRA.js";
69
68
  import "../chunk-XRLKGCAW.js";
70
69
  import {
71
70
  settleWithFacilitator,
72
71
  verifyWithFacilitator
73
- } from "../chunk-BQ2NMWKE.js";
74
- import "../chunk-M4QDXD2A.js";
75
- import "../chunk-JDFLRNAZ.js";
72
+ } from "../chunk-PLG4XER6.js";
73
+ import "../chunk-FYRR2UEZ.js";
74
+ import "../chunk-PB4FYZET.js";
75
+ import "../chunk-YG7G4DPZ.js";
76
76
  import {
77
77
  SIGNED_ENVELOPE_FIELDS,
78
78
  SIGNED_ENVELOPE_TYPES,
@@ -92,10 +92,10 @@ import {
92
92
  } from "../chunk-O5AT6S5T.js";
93
93
  import {
94
94
  toLockPubkey
95
- } from "../chunk-VAMSJRJT.js";
96
- import "../chunk-Z4BNLUZF.js";
97
- import "../chunk-A4CM2BD3.js";
98
- import "../chunk-MKI6OVW4.js";
95
+ } from "../chunk-5LR6P7WN.js";
96
+ import "../chunk-IWQHUSMO.js";
97
+ import "../chunk-3MHE725Z.js";
98
+ import "../chunk-CZULM42S.js";
99
99
  import "../chunk-KXZUCCEY.js";
100
100
  import "../chunk-6DOGTAHA.js";
101
101
  import "../chunk-66HGCPBU.js";
@@ -111,13 +111,15 @@ import {
111
111
  isNonChannelBitcoinRail,
112
112
  lotOwedSats,
113
113
  netOwedSats
114
- } from "../chunk-2SD2W2BG.js";
114
+ } from "../chunk-JH3SX3LY.js";
115
115
  import "../chunk-COYKJRMM.js";
116
116
  import "../chunk-P6QON7ER.js";
117
+ import "../chunk-RLTSCKRI.js";
118
+ import "../chunk-LIRAHP7B.js";
117
119
  import {
118
120
  _testing,
119
121
  wrapMppx
120
- } from "../chunk-4J32DTLT.js";
122
+ } from "../chunk-IXR5RFK7.js";
121
123
  import "../chunk-ETXDTUJO.js";
122
124
  export {
123
125
  DEFAULT_LOCK_PUBKEY_GRACE_SECONDS,
@@ -1,5 +1,5 @@
1
1
  import { ProofLike } from '@cashu/cashu-ts';
2
- import { a1 as Message, ah as FundingMethod, X as FundingReceipt, bO as CreditSnapshot, Y as JobReceipt, ax as StepRecord, a2 as MessageType } from './step-cache-v2yhyhSZ.js';
2
+ import { a1 as Message, ah as FundingMethod, X as FundingReceipt, bP as CreditSnapshot, Y as JobReceipt, ax as StepRecord, a2 as MessageType } from './step-cache-Bi43A0JN.js';
3
3
 
4
4
  type JobStatus = "processing" | "completed" | "failed" | "awaiting-input" | "cancelled" | "working";
5
5
  interface JobRecord {
@@ -1,4 +1,4 @@
1
- import { W as JsonValue } from './step-cache-v2yhyhSZ.js';
1
+ import { W as JsonValue } from './step-cache-Bi43A0JN.js';
2
2
 
3
3
  declare const lockPubkeyBrand: unique symbol;
4
4
  /**
@@ -1,9 +1,11 @@
1
1
  import {
2
2
  MemoryCreditLedger
3
- } from "./chunk-M4QDXD2A.js";
4
- import "./chunk-2SD2W2BG.js";
3
+ } from "./chunk-FYRR2UEZ.js";
4
+ import "./chunk-JH3SX3LY.js";
5
5
  import "./chunk-COYKJRMM.js";
6
6
  import "./chunk-P6QON7ER.js";
7
+ import "./chunk-RLTSCKRI.js";
8
+ import "./chunk-LIRAHP7B.js";
7
9
  import "./chunk-ETXDTUJO.js";
8
10
  export {
9
11
  MemoryCreditLedger
@@ -14,10 +14,12 @@ import {
14
14
  challengeMeta,
15
15
  createDualKeyMppxFromOpts,
16
16
  createMppFromOpts,
17
+ installHostedTempoChargeGuard,
18
+ installHostedTempoCloseGuard,
17
19
  parseMppMethodsAllowlist,
18
20
  resolveTempoNetwork,
19
21
  wrapMppx
20
- } from "./chunk-4J32DTLT.js";
22
+ } from "./chunk-IXR5RFK7.js";
21
23
  import "./chunk-ETXDTUJO.js";
22
24
  export {
23
25
  MPPX_HMAC_MISMATCH_REASON,
@@ -35,6 +37,8 @@ export {
35
37
  challengeMeta,
36
38
  createDualKeyMppxFromOpts,
37
39
  createMppFromOpts,
40
+ installHostedTempoChargeGuard,
41
+ installHostedTempoCloseGuard,
38
42
  parseMppMethodsAllowlist,
39
43
  resolveTempoNetwork,
40
44
  wrapMppx
@@ -3,7 +3,7 @@ import {
3
3
  PAYOUT_SNAPSHOT_INTERVAL_MS,
4
4
  PayoutReporter,
5
5
  PostgresX402BatchStore
6
- } from "./chunk-4UZN2GP5.js";
6
+ } from "./chunk-GAOAYHZA.js";
7
7
  import "./chunk-COYKJRMM.js";
8
8
  import "./chunk-ETXDTUJO.js";
9
9
  export {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PostgresJobStore
3
- } from "./chunk-JDFLRNAZ.js";
3
+ } from "./chunk-PB4FYZET.js";
4
4
  import "./chunk-COYKJRMM.js";
5
5
  import "./chunk-ETXDTUJO.js";
6
6
  export {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  RevenueReporter
3
- } from "./chunk-7X6UDVCQ.js";
3
+ } from "./chunk-Z4ZT5LNT.js";
4
4
  import "./chunk-COYKJRMM.js";
5
5
  import "./chunk-ETXDTUJO.js";
6
6
  export {
@@ -1,21 +1,21 @@
1
- import { ab as CashuMode, bK as CreditDrainEnqueue, R as ResolvedCreditConfig, bL as DVMAuthScheme, z as SignedRequestDomain, bM as CreditLedgerLike, bN as X402RefundSettlementGate, bO as CreditSnapshot, bP as DrawResult, bQ as X402SettlementStatus, bR as X402UnresolvedRefund, bS as GrownDrawResult, bT as DrawResolution, bU as FundingRecord, X as FundingReceipt, bV as CreditInvoiceRecord, bW as InvoiceSettlement, bX as BlockedInvoiceCursor, bY as InvoiceReconciliation, bZ as InvoiceWriteOff, b_ as DrawRecord, b$ as StalePendingDrawCursor, c0 as TempoCreditLossEvidence, c1 as CreditLedgerQuerier, c2 as TempoCreditLoss, c3 as X402CreditLossEvidence, c4 as X402CreditLoss, c5 as DrainMethod, c6 as DrainRequestResult, c7 as BitcoinDepositLiability, bo as FundingLot, c8 as CreditDrainRecord, c9 as ChannelDrainCursor, ca as DrainWriteOff, cb as DrainReleaseResult, cc as DrainFulfilment, cd as DrainTransitionResult, Y as JobReceipt, a1 as Message, K as KVStore, F as SignedRequestReplayStore, Z as ZodLike, a as DVMDescriptor } from '../step-cache-v2yhyhSZ.js';
2
- export { ce as CLIENT_COMPATIBILITY_HEADERS, d as CanonicalEnvelope, cf as ClientCompatibility, cg as ClientCompatibilityEnv, ch as ClientCompatibilityGate, ci as ClientCompatibilityRequirement, cj as ClientSemVer, e as CreateSignedRequestVerifierOpts, ck as CreditFundingBasis, cl as CreditInvoiceStatus, cm as CreditLedger, cn as CreditLedgerError, co as CreditLedgerErrorCode, cp as CreditLedgerErrorDetails, cq as CreditLedgerPool, cr as CreditStatus, cs as DRAIN_DELIVERY_RESERVE_SATS, ct as DVM_PROTOCOL_VERSION, cu as DrainConflictReason, cv as DrawRailValue, cw as DrawStatus, cx as JobCostReportPayload, cy as JobTerminalReportPayload, cz as PostgresX402ChannelStorage, cA as ReplayStoreBackend, cB as RevenueSkippedNoRailPayload, cC as RevenueSkippedNoRailReason, w as SIGNED_REQUEST_AUTH_ID, x as SIGNED_REQUEST_STATEMENT_VERSION, cD as Secp256k1AuthOpts, y as SignedRequestAudience, B as SignedRequestError, E as SignedRequestFailure, G as SignedRequestSignOpts, H as SignedRequestStatementHeader, M as SignedRequestVerifier, cE as X402ChannelStorageOpts, cF as X402RelayLockHolder, cG as X402RelaySubmissionLock, cH as X402RelaySubmissionLockError, cI as allocateDrawValue, cJ as clientCompatibilityAttributes, cK as clientCompatibilityMiddleware, cL as clientUpgradeRequired, N as createSignedRequestVerifier, cM as parseClientCapabilities, cN as parseClientCompatibility, cO as parseDvmClient, cP as parseProtocolVersion, cQ as requireClientCompatibility, cR as secp256k1Auth, cS as signedRequestInput, T as signedRequestStatementHeader } from '../step-cache-v2yhyhSZ.js';
1
+ import { ab as CashuMode, bK as CreditDrainEnqueue, bL as HostedSettlementReportObligations, R as ResolvedCreditConfig, bM as DVMAuthScheme, z as SignedRequestDomain, bN as CreditLedgerLike, bO as X402RefundSettlementGate, bP as CreditSnapshot, bQ as DrawResult, bR as X402SettlementStatus, bS as X402UnresolvedRefund, bT as GrownDrawResult, bU as DrawResolution, bV as FundingRecord, X as FundingReceipt, bW as CreditInvoiceRecord, bX as InvoiceSettlement, bY as BlockedInvoiceCursor, bZ as InvoiceReconciliation, b_ as InvoiceWriteOff, b$ as DrawRecord, c0 as StalePendingDrawCursor, c1 as TempoCreditLossEvidence, c2 as CreditLedgerQuerier, c3 as TempoCreditLoss, c4 as X402CreditLossEvidence, c5 as X402CreditLoss, c6 as DrainMethod, c7 as DrainRequestResult, c8 as BitcoinDepositLiability, bo as FundingLot, c9 as CreditDrainRecord, ca as ChannelDrainCursor, cb as DrainWriteOff, cc as DrainReleaseResult, cd as DrainFulfilment, ce as DrainTransitionResult, cf as HostingCleanupFence, Y as JobReceipt, a1 as Message, K as KVStore, F as SignedRequestReplayStore, Z as ZodLike, a as DVMDescriptor } from '../step-cache-Bi43A0JN.js';
2
+ export { cg as CLIENT_COMPATIBILITY_HEADERS, d as CanonicalEnvelope, ch as ClientCompatibility, ci as ClientCompatibilityEnv, cj as ClientCompatibilityGate, ck as ClientCompatibilityRequirement, cl as ClientSemVer, e as CreateSignedRequestVerifierOpts, cm as CreditFundingBasis, cn as CreditInvoiceStatus, co as CreditLedger, cp as CreditLedgerError, cq as CreditLedgerErrorCode, cr as CreditLedgerErrorDetails, cs as CreditLedgerPool, ct as CreditStatus, cu as DRAIN_DELIVERY_RESERVE_SATS, cv as DVM_PROTOCOL_VERSION, cw as DrainConflictReason, cx as DrawRailValue, cy as DrawStatus, cz as JobCostReportPayload, cA as JobTerminalReportPayload, cB as PostgresX402ChannelStorage, cC as ReplayStoreBackend, cD as RevenueSkippedNoRailPayload, cE as RevenueSkippedNoRailReason, w as SIGNED_REQUEST_AUTH_ID, x as SIGNED_REQUEST_STATEMENT_VERSION, cF as Secp256k1AuthOpts, y as SignedRequestAudience, B as SignedRequestError, E as SignedRequestFailure, G as SignedRequestSignOpts, H as SignedRequestStatementHeader, M as SignedRequestVerifier, cG as X402ChannelStorageOpts, cH as X402RelayLockHolder, cI as X402RelaySubmissionLock, cJ as X402RelaySubmissionLockError, cK as allocateDrawValue, cL as clientCompatibilityAttributes, cM as clientCompatibilityMiddleware, cN as clientUpgradeRequired, N as createSignedRequestVerifier, cO as parseClientCapabilities, cP as parseClientCompatibility, cQ as parseDvmClient, cR as parseProtocolVersion, cS as requireClientCompatibility, cT as secp256k1Auth, cU as signedRequestInput, T as signedRequestStatementHeader } from '../step-cache-Bi43A0JN.js';
3
3
  import { Pool } from 'pg';
4
- import { ak as CreditMenu, b as AppEnv, U as UpfrontPaymentOpts, h as PaymentInfo, al as ReceiptIssuer, am as LightningReceive, an as TempoSettlementReadiness, ao as DVMHostOpts, ap as DVMServeResult } from '../credit-menu-0-UtJ3hh.js';
5
- export { aq as BuildCreditMenuArgs, ar as BuilderIdentity, as as CREDIT_ENVELOPE_KEYS, C as ConsumedCredentialStore, at as CreateX402BatchSettlementServerOpts, au as CreditEnvelope, av as CreditEnvelopeError, aw as CreditFundCommitment, ax as CreditTerms, ay as DEFAULT_INVOICE_TTL_SECONDS, az as DVMHost, aA as HostingControlCommand, aB as HostingControlConfig, aC as HostingControlStatus, aD as JobManager, aE as JobManagerOpts, aF as LightningReceiveConfig, aG as MIN_INVOICE_TTL_SECONDS, aH as MemoryConsumedCredentialStore, aI as MemoryConsumedCredentialStoreOpts, aJ as MemoryProcessedPaymentStore, aK as MemoryX402ExactSettlementStore, aL as MountOpts, aM as OwnerDisplay, aN as PaidJobCompletion, aO as PaymentMode, aP as PlatformReporterOpts, aQ as PostgresProcessedPaymentStore, aR as PostgresX402ExactSettlementStore, aS as PriceFiat, aT as ProcessedPaymentQuerier, aU as ProcessedPaymentRail, aV as ProcessedPaymentRecord, aW as ProcessedPaymentReplayError, aX as ProcessedPaymentStore, aY as X402BatchAcceptance, aZ as X402BatchFunding, a_ as X402BatchRefusal, a$ as X402BatchSettlementServer, b0 as X402ExactAcceptance, b1 as X402ExactIntentConflictError, b2 as X402ExactSettlementAttempt, b3 as X402ExactSettlementChainEvidence, b4 as X402ExactSettlementEffect, b5 as X402ExactSettlementEvidenceMissingError, b6 as X402ExactSettlementEvidenceReader, b7 as X402ExactSettlementIntent, b8 as X402ExactSettlementNotReadyError, b9 as X402ExactSettlementServer, ba as X402ExactSettlementServerOpts, bb as X402ExactSettlementStatus, bc as X402ExactSettlementStore, bd as X402SettlementChainEvidence, be as X402SettlementEvidenceReader, bf as X402SettlementSubmissionError, bg as X402_BATCH_AUTO_SETTLEMENT, bh as X402_BATCH_MIN_WITHDRAW_DELAY_SECONDS, bi as X402_BATCH_SETTLEMENT_NETWORK, bj as attachCreditMenu, bk as buildCreditMenu, bl as createDVMHost, bm as createX402BatchSettlementServer, bn as creditEnvelopeIgnoreFields, bo as drawSettlementRef, bp as extractCreditEnvelope, bq as fundingCommitment, br as selectPrimaryCredit, bs as signHostingControl, bt as stripCreditEnvelope, bu as toCreditView } from '../credit-menu-0-UtJ3hh.js';
4
+ import { al as CreditMenu, b as AppEnv, U as UpfrontPaymentOpts, h as PaymentInfo, am as ReceiptIssuer, an as LightningReceive, ao as TempoSettlementReadiness, ap as DVMHostOpts, aq as DVMServeResult } from '../credit-menu-B8_p_vUz.js';
5
+ export { ar as BuildCreditMenuArgs, as as BuilderIdentity, at as CREDIT_ENVELOPE_KEYS, C as ConsumedCredentialStore, au as CreateX402BatchSettlementServerOpts, av as CreditEnvelope, aw as CreditEnvelopeError, ax as CreditFundCommitment, ay as CreditTerms, az as DEFAULT_INVOICE_TTL_SECONDS, aA as DVMHost, aB as HostingClosureCommand, aC as HostingClosureEvidence, aD as HostingControlCommand, aE as HostingControlConfig, aF as HostingControlStatus, aG as JobManager, aH as JobManagerOpts, aI as LightningReceiveConfig, aJ as MIN_INVOICE_TTL_SECONDS, aK as MemoryConsumedCredentialStore, aL as MemoryConsumedCredentialStoreOpts, aM as MemoryProcessedPaymentStore, aN as MemoryX402ExactSettlementStore, aO as MountOpts, aP as OwnerDisplay, aQ as PaidJobCompletion, aR as PaymentMode, aS as PlatformReporterOpts, aT as PostgresProcessedPaymentStore, aU as PostgresX402ExactSettlementStore, aV as PriceFiat, aW as ProcessedPaymentQuerier, aX as ProcessedPaymentRail, aY as ProcessedPaymentRecord, aZ as ProcessedPaymentReplayError, a_ as ProcessedPaymentStore, a$ as X402BatchAcceptance, b0 as X402BatchFunding, b1 as X402BatchRefusal, b2 as X402BatchSettlementServer, b3 as X402ExactAcceptance, b4 as X402ExactIntentConflictError, b5 as X402ExactSettlementAttempt, b6 as X402ExactSettlementChainEvidence, b7 as X402ExactSettlementEffect, b8 as X402ExactSettlementEvidenceMissingError, b9 as X402ExactSettlementEvidenceReader, ba as X402ExactSettlementIntent, bb as X402ExactSettlementNotReadyError, bc as X402ExactSettlementServer, bd as X402ExactSettlementServerOpts, be as X402ExactSettlementStatus, bf as X402ExactSettlementStore, bg as X402SettlementChainEvidence, bh as X402SettlementEvidenceReader, bi as X402SettlementSubmissionError, bj as X402_BATCH_AUTO_SETTLEMENT, bk as X402_BATCH_MIN_WITHDRAW_DELAY_SECONDS, bl as X402_BATCH_SETTLEMENT_NETWORK, bm as attachCreditMenu, bn as buildCreditMenu, bo as createDVMHost, bp as createX402BatchSettlementServer, bq as creditEnvelopeIgnoreFields, br as drawSettlementRef, bs as extractCreditEnvelope, bt as fundingCommitment, bu as selectPrimaryCredit, bv as signHostingClosure, bw as signHostingControl, bx as stripCreditEnvelope, by as toCreditView } from '../credit-menu-B8_p_vUz.js';
6
6
  import { Context } from 'hono';
7
7
  import { z } from 'zod';
8
- import { F as FxFetcher } from '../fx-DhyT1Cjh.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 } from '../job-store-D3CcZp_g.js';
10
- export { a as JobStatus, b as JobStore, h as isStreamableJobStore } from '../job-store-D3CcZp_g.js';
8
+ import { F as FxFetcher } from '../fx-DuaYHvVn.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 } from '../job-store-D6Rjj5Oi.js';
10
+ export { a as JobStatus, b as JobStore, h as isStreamableJobStore } from '../job-store-D6Rjj5Oi.js';
11
11
  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';
12
12
  import 'mppx';
13
13
  import '@x402/core/server';
14
14
  import '@x402/evm/batch-settlement/server';
15
- import 'viem';
16
15
  import '@x402/core/types';
16
+ import 'viem';
17
17
  import '@cashu/cashu-ts';
18
- import '../lightning-backend-BhsyrBLa.js';
18
+ import '../lightning-backend-BaeCPmx7.js';
19
19
 
20
20
  /** Lifetime of a per-call implicit credit before the ledger refuses new draws. */
21
21
  declare const IMPLICIT_CREDIT_TTL_MS: number;
@@ -58,9 +58,9 @@ interface DrainReportWiring {
58
58
  */
59
59
  declare const CREDIT_REQUEST_SCHEMA: z.ZodObject<{
60
60
  op: z.ZodEnum<{
61
- drain: "drain";
62
61
  balance: "balance";
63
62
  fund: "fund";
63
+ drain: "drain";
64
64
  }>;
65
65
  credit_id: z.ZodOptional<z.ZodString>;
66
66
  fund: z.ZodOptional<z.ZodObject<{
@@ -91,6 +91,7 @@ declare const CREDIT_REQUEST_SCHEMA: z.ZodObject<{
91
91
  }, z.core.$strip>;
92
92
  type CreditRequest = z.infer<typeof CREDIT_REQUEST_SCHEMA>;
93
93
  interface CreditRouteDeps {
94
+ hostedSettlementReports?: HostedSettlementReportObligations;
94
95
  menu: () => Promise<CreditMenu | undefined>;
95
96
  creditConfig: ResolvedCreditConfig | undefined;
96
97
  auth: DVMAuthScheme | undefined;
@@ -339,11 +340,13 @@ declare class MemoryCreditLedger implements CreditLedgerLike {
339
340
  /** Postgres-backed JobStore with cross-machine message streaming via LISTEN/NOTIFY. */
340
341
  declare class PostgresJobStore implements StreamableJobStore, ReceiptIssuingStore {
341
342
  private pool;
343
+ private hostingCleanupFence?;
342
344
  private listenChannel;
343
345
  private messageSubscribers;
344
346
  private notifySubscribers;
345
347
  private requestIdClaimLocks;
346
348
  constructor(pool: Pool);
349
+ useHostingCleanupFence(fence: HostingCleanupFence): void;
347
350
  /** Run the CREATE TABLE migration. Call once at startup. */
348
351
  init(): Promise<void>;
349
352
  private createTables;
@@ -433,6 +436,7 @@ declare class PostgresJobStore implements StreamableJobStore, ReceiptIssuingStor
433
436
  * visible.
434
437
  */
435
438
  private terminateJob;
439
+ private deleteResolvedMessages;
436
440
  private fetchCountersTx;
437
441
  /**
438
442
  * The credit binding on the job row, read inside Tx C. Used on the