@dvmkit/sdk 0.12.0 → 0.13.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.
@@ -18,7 +18,7 @@ import {
18
18
  refundAssetDelta,
19
19
  refundRequest,
20
20
  x402SettlementPending
21
- } from "./chunk-2VGMZ7VF.js";
21
+ } from "./chunk-Q2X4QYOB.js";
22
22
 
23
23
  // src/sdk/server/memory-credit-ledger.ts
24
24
  import { randomUUID } from "crypto";
@@ -519,7 +519,7 @@ var MemoryCreditLedger = class _MemoryCreditLedger {
519
519
  }
520
520
  existing.lastFundingLedgerSeq = existing.lastLedgerSeq;
521
521
  existing.balanceMicro += args.amountMicro;
522
- existing.expiryMs = args.expiryMs;
522
+ existing.expiryMs = Math.max(existing.expiryMs, args.expiryMs);
523
523
  applyBasis(existing, b);
524
524
  recordLot(existing, args.amountMicro, b, nowMs);
525
525
  return this.snapshot(existing, nowMs);
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-E7ZBCT5U.js";
18
18
  import {
19
19
  MemoryCreditLedger
20
- } from "./chunk-POYUX2NN.js";
20
+ } from "./chunk-EQYHHYW4.js";
21
21
  import {
22
22
  PostgresJobStore
23
23
  } from "./chunk-TWKQFIOW.js";
@@ -28,7 +28,7 @@ import {
28
28
  humanizeZodIssues,
29
29
  signedRequestInput,
30
30
  zodIssuesOf
31
- } from "./chunk-WFCVS6QB.js";
31
+ } from "./chunk-HULU2UVM.js";
32
32
  import {
33
33
  MemoryJobStore,
34
34
  UNCAPPABLE_ASK_TOTAL,
@@ -73,7 +73,7 @@ import {
73
73
  receiptPubkeyFromSecret,
74
74
  toLockPubkey,
75
75
  verifyChallenge
76
- } from "./chunk-RPUFWIT4.js";
76
+ } from "./chunk-V3WFX65W.js";
77
77
  import {
78
78
  X402_BATCH_SETTLEMENT_SCHEME,
79
79
  X402_DEFAULT_FACILITATOR,
@@ -97,7 +97,7 @@ import {
97
97
  RAIL_REFUNDABLE,
98
98
  canonicalRequestPath,
99
99
  isZodSchema
100
- } from "./chunk-HW2UCOOC.js";
100
+ } from "./chunk-SXL44PL5.js";
101
101
  import {
102
102
  createConsoleLogger
103
103
  } from "./chunk-7KQLPVV7.js";
@@ -133,7 +133,7 @@ import {
133
133
  isNonChannelBitcoinRail,
134
134
  netOwedSats,
135
135
  x402SettlementPending
136
- } from "./chunk-2VGMZ7VF.js";
136
+ } from "./chunk-Q2X4QYOB.js";
137
137
  import {
138
138
  parseStoreValue
139
139
  } from "./chunk-YG7G4DPZ.js";
@@ -5994,6 +5994,7 @@ async function fundAndDrawInScope(ctx, funding, tx) {
5994
5994
  const instrument = credit.rail ? storedCreditBinding(credit).instrument : void 0;
5995
5995
  const report = {
5996
5996
  ...deposit,
5997
+ expiryMs: credit.expiryMs,
5997
5998
  callerPubkey: credit.callerPubkey,
5998
5999
  ...instrument && { instrument }
5999
6000
  };
@@ -4,7 +4,7 @@ import {
4
4
  signedRequestHeaderMatchesDomain,
5
5
  signedRequestStatementHeader,
6
6
  testOnlySignedRequestDomain
7
- } from "./chunk-HW2UCOOC.js";
7
+ } from "./chunk-SXL44PL5.js";
8
8
  import {
9
9
  diagnosticConsole
10
10
  } from "./chunk-Z4FOPROB.js";
@@ -1546,8 +1546,8 @@ var CreditLedger = class {
1546
1546
  );
1547
1547
  }
1548
1548
  /**
1549
- * Funding adds balance and overwrites expiry, reviving an expired credit. It is additive,
1550
- * not idempotent: the caller’s rail marker or funding record must prevent replay. Owner and
1549
+ * Funding adds balance and extends expiry without shortening it, reviving an expired credit.
1550
+ * It is additive, not idempotent: the caller’s rail marker or funding record must prevent replay. Owner and
1551
1551
  * currency must match; rail and reusable-channel bindings cannot be mixed with other
1552
1552
  * instruments. A legacy NULL rail adopts its first typed top-up.
1553
1553
  *
@@ -1616,7 +1616,7 @@ var CreditLedger = class {
1616
1616
  ON CONFLICT (credit_id) DO UPDATE
1617
1617
  SET balance_micro = credits.balance_micro + EXCLUDED.balance_micro,
1618
1618
  last_funding_ledger_seq = credits.last_ledger_seq,
1619
- expiry_ms = EXCLUDED.expiry_ms,
1619
+ expiry_ms = GREATEST(credits.expiry_ms, EXCLUDED.expiry_ms),
1620
1620
  rail = COALESCE(credits.rail, EXCLUDED.rail),
1621
1621
  native_asset = COALESCE(EXCLUDED.native_asset, credits.native_asset),
1622
1622
  mint = COALESCE(EXCLUDED.mint, credits.mint),
@@ -2693,7 +2693,10 @@ var CreditLedger = class {
2693
2693
  [args.creditId, args.fundId, settledAt]
2694
2694
  );
2695
2695
  if (args.depositOutbox) {
2696
- await args.depositOutbox.enqueue(client, args.depositOutbox.payload);
2696
+ await args.depositOutbox.enqueue(client, {
2697
+ ...args.depositOutbox.payload,
2698
+ expiryMs: credit.expiryMs
2699
+ });
2697
2700
  }
2698
2701
  await client.query("COMMIT");
2699
2702
  return {
@@ -2864,7 +2867,10 @@ var CreditLedger = class {
2864
2867
  ]
2865
2868
  );
2866
2869
  if (args.depositOutbox) {
2867
- await args.depositOutbox.enqueue(client, args.depositOutbox.payload);
2870
+ await args.depositOutbox.enqueue(client, {
2871
+ ...args.depositOutbox.payload,
2872
+ expiryMs: credit.expiryMs
2873
+ });
2868
2874
  }
2869
2875
  await client.query("COMMIT");
2870
2876
  return {
@@ -13,7 +13,7 @@ var RAIL_REFUNDABLE = {
13
13
  };
14
14
  var DEFAULT_CREDIT_MIN = "$0.10";
15
15
  var DEFAULT_CREDIT_MAX = "$5.00";
16
- var DEFAULT_CREDIT_TTL_SECONDS = 30 * 24 * 60 * 60;
16
+ var DEFAULT_CREDIT_TTL_SECONDS = 90 * 24 * 60 * 60;
17
17
  var DEFAULT_JOB_RETENTION_DAYS = 730;
18
18
 
19
19
  // src/lib/signed-request-statement.ts
@@ -30,7 +30,7 @@ function isX402SettlementReconciliationReason(value) {
30
30
  }
31
31
 
32
32
  // src/lib/credit-implicit.ts
33
- var IMPLICIT_CREDIT_TTL_MS = 30 * 24 * 60 * 60 * 1e3;
33
+ var IMPLICIT_CREDIT_TTL_MS = 90 * 24 * 60 * 60 * 1e3;
34
34
 
35
35
  // src/lib/payment-rails/tempo-wire.ts
36
36
  var TEMPO_SESSION_UPDATED_REASON = "Tempo session updated; attach the next voucher to fund this credit.";
@@ -1,4 +1,4 @@
1
- import { b as JobStore, J as JobRecord } from './job-store-B8Ijr5V6.js';
1
+ import { b as JobStore, J as JobRecord } from './job-store-BVGvAaBG.js';
2
2
 
3
3
  /** Authenticated caller metadata; omitted fields on older services mean unknown. */
4
4
  interface JobContentMetadata {
@@ -10,7 +10,7 @@ import {
10
10
  isDrainMethod,
11
11
  isFundingRail,
12
12
  x402SettlementPending
13
- } from "./chunk-2VGMZ7VF.js";
13
+ } from "./chunk-Q2X4QYOB.js";
14
14
  import "./chunk-YG7G4DPZ.js";
15
15
  import "./chunk-COYKJRMM.js";
16
16
  import "./chunk-5H7P3ORL.js";
@@ -1,11 +1,11 @@
1
- import { f as LockPubkey, e as CheckMintHealthOptions, b as LightningBackend, A as AttestationPayload } from './lightning-backend-DmwMSgaM.js';
2
- import { ci as HostingCleanupFence, d3 as HostedIntent, aj as FundingMethod, p as PaymentMethod, bP as CreditLedgerLike, a5 as Message, $ as FundingReceipt, bR as CreditSnapshot, a0 as JobReceipt, S as SDKJobContext, ax as StepCache, v as ResponseContent, P as PaymentContent, a1 as MessageType, bk as X402Receipt, aF as X402Config, bj as X402ExactVersionSupport, d4 as X402SettlementIntent, ab as PaymentRequirementsV2, d5 as HostedFundingReservation, bL as CreditLedgerQuerier, d6 as X402SettlementCursor, bV as X402SettlementStatus, d7 as X402SettlementWriteOff, bQ as X402RefundSettlementGate, d8 as X402FacilitatorAuth, d9 as X402BatchSettlementConfig, cF as PostgresX402ChannelStorage, da as X402PayoutObserver, bN as HostedSettlementReportObligations, bn as CreditDepositPayload, bs as MppxServer, ae as CashuMode, db as CreditDepositEnqueue, dc as X402SettlementReconciliationReason, aq as PaymentRequirements, a3 as MppxCredential, bU as DrawResult, cs as CreditLedgerError, a7 as ReceiptCredit, ag as DrainReceiptEvent, a8 as DrainReceipt, K as KVStore, z as SignedRequestAudience, dd as CreditDrawReleaseEnqueue, cD as JobCostReportPayload, cE as JobTerminalReportPayload, cH as RevenueSkippedNoRailPayload, Z as ZodLike, a as DVMDescriptor, b_ as CreditInvoiceRecord, b$ as InvoiceSettlement, cm as ClientCompatibilityGate, ck as ClientCompatibility, bw as PostgresTempoSessionStore, bv as PayoutReporter, R as ResolvedCreditConfig, h as CreditView } from './step-cache-DQqpwXa8.js';
1
+ import { f as LockPubkey, e as CheckMintHealthOptions, b as LightningBackend, A as AttestationPayload } from './lightning-backend-CsW_b6C7.js';
2
+ import { ci as HostingCleanupFence, d3 as HostedIntent, aj as FundingMethod, p as PaymentMethod, bP as CreditLedgerLike, a5 as Message, $ as FundingReceipt, bR as CreditSnapshot, a0 as JobReceipt, S as SDKJobContext, ax as StepCache, v as ResponseContent, P as PaymentContent, a1 as MessageType, bk as X402Receipt, aF as X402Config, bj as X402ExactVersionSupport, d4 as X402SettlementIntent, ab as PaymentRequirementsV2, d5 as HostedFundingReservation, bL as CreditLedgerQuerier, d6 as X402SettlementCursor, bV as X402SettlementStatus, d7 as X402SettlementWriteOff, bQ as X402RefundSettlementGate, d8 as X402FacilitatorAuth, d9 as X402BatchSettlementConfig, cF as PostgresX402ChannelStorage, da as X402PayoutObserver, bN as HostedSettlementReportObligations, bn as CreditDepositPayload, bs as MppxServer, ae as CashuMode, db as CreditDepositEnqueue, dc as X402SettlementReconciliationReason, aq as PaymentRequirements, a3 as MppxCredential, bU as DrawResult, cs as CreditLedgerError, a7 as ReceiptCredit, ag as DrainReceiptEvent, a8 as DrainReceipt, K as KVStore, z as SignedRequestAudience, dd as CreditDrawReleaseEnqueue, cD as JobCostReportPayload, cE as JobTerminalReportPayload, cH as RevenueSkippedNoRailPayload, Z as ZodLike, a as DVMDescriptor, b_ as CreditInvoiceRecord, b$ as InvoiceSettlement, cm as ClientCompatibilityGate, ck as ClientCompatibility, bw as PostgresTempoSessionStore, bv as PayoutReporter, R as ResolvedCreditConfig, h as CreditView } from './step-cache-WUig1cx-.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-DLhscRUh.js';
6
+ import { d as FxSourceFailure, b as FxRateSnapshot, F as FxFetcher } from './fx-DM7UCzg1.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-B8Ijr5V6.js';
8
+ import { T as TopUpCapUnenforcedReason, A as AppendOutgoingOptions, J as JobRecord, b as JobStore } from './job-store-BVGvAaBG.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';
@@ -2021,7 +2021,7 @@ interface UpfrontPaymentOpts {
2021
2021
  /**
2022
2022
  * Credit lifetime to mint, in ms — the DVM's advertised `credit.ttl`.
2023
2023
  * Defaults to {@link IMPLICIT_CREDIT_TTL_MS}. Threading it keeps the
2024
- * funding menu honest: a DVM advertising a 7-day TTL must not mint 30-day
2024
+ * funding menu honest: a DVM advertising a 7-day TTL must not mint 90-day
2025
2025
  * credits.
2026
2026
  */
2027
2027
  creditTtlMs?: number;
@@ -1,4 +1,4 @@
1
- import { C as Currency } from './step-cache-DQqpwXa8.js';
1
+ import { C as Currency } from './step-cache-WUig1cx-.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-DQqpwXa8.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-DQqpwXa8.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-DLhscRUh.js';
4
- export { I as InvalidFxRateError, f as fiatToSatsCeil, a as formatFiat, b as formatUsd, r as roundUsd, s as satsToFiat } from './usd-D5kk2nIT.js';
5
- export { J as JobRecord, a as JobStatus, b as JobStore } from './job-store-B8Ijr5V6.js';
1
+ import { C as Currency, Z as ZodLike, D as DVMConfig, a as DVMDescriptor } from './step-cache-WUig1cx-.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-WUig1cx-.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-DM7UCzg1.js';
4
+ export { I as InvalidFxRateError, f as fiatToSatsCeil, a as formatFiat, b as formatUsd, r as roundUsd, s as satsToFiat } from './usd-CzR4qcVU.js';
5
+ export { J as JobRecord, a as JobStatus, b as JobStore } from './job-store-BVGvAaBG.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-WFCVS6QB.js";
13
+ } from "./chunk-HULU2UVM.js";
14
14
  import {
15
15
  DEFAULT_CREDIT_MAX,
16
16
  DEFAULT_CREDIT_MIN,
@@ -20,7 +20,7 @@ import {
20
20
  SIGNED_REQUEST_STATEMENT_VERSION,
21
21
  isZodSchema,
22
22
  signedRequestStatementHeader
23
- } from "./chunk-HW2UCOOC.js";
23
+ } from "./chunk-SXL44PL5.js";
24
24
  import {
25
25
  buildUpfront
26
26
  } from "./chunk-D4FFS3IS.js";
@@ -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-DmwMSgaM.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-DmwMSgaM.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-CsW_b6C7.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-CsW_b6C7.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-DQqpwXa8.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-DQqpwXa8.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-WUig1cx-.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-WUig1cx-.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-DLhscRUh.js';
13
- export { c as InvalidUsdPriceError, p as parseUsdPrice } from '../usd-D5kk2nIT.js';
12
+ export { h as FX_CACHE_TTL_MS, i as FX_RETRY_COUNT, w as warmFxSnapshot } from '../fx-DM7UCzg1.js';
13
+ export { c as InvalidUsdPriceError, p as parseUsdPrice } from '../usd-CzR4qcVU.js';
14
14
  import 'hono';
15
15
  import 'mppx';
16
16
  import '@x402/core/server';
@@ -133,7 +133,7 @@ import {
133
133
  withWalletLock,
134
134
  writeAgentMnemonic,
135
135
  writeIdentity
136
- } from "../chunk-RPUFWIT4.js";
136
+ } from "../chunk-V3WFX65W.js";
137
137
  import {
138
138
  X402_BATCH_SETTLEMENT_SCHEME,
139
139
  X402_DEFAULT_FACILITATOR,
@@ -173,7 +173,7 @@ import {
173
173
  canonicalRequestPath,
174
174
  canonicalSignedRequestStatement,
175
175
  signedRequestStatementHeader
176
- } from "../chunk-HW2UCOOC.js";
176
+ } from "../chunk-SXL44PL5.js";
177
177
  import {
178
178
  createNoopLogger,
179
179
  createStdoutLogger
@@ -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-DQqpwXa8.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-DQqpwXa8.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-WUig1cx-.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-WUig1cx-.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-B2T-O9oY.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-B2T-O9oY.js';
11
- export { O as OutgoingMessage, S as StaleJobReapable, i as isStaleJobReapable } from '../job-store-B8Ijr5V6.js';
9
+ import { C as ConsumedCredentialStore, L as LockPubkeyStateLoader } from '../credit-menu-KqobCjkW.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-KqobCjkW.js';
11
+ export { O as OutgoingMessage, S as StaleJobReapable, i as isStaleJobReapable } from '../job-store-BVGvAaBG.js';
12
12
  import { z } from 'zod';
13
- export { f as LockPubkeyStoreLockPubkey, t as lockPubkeyStoreToLockPubkey } from '../lightning-backend-DmwMSgaM.js';
13
+ export { f as LockPubkeyStoreLockPubkey, t as lockPubkeyStoreToLockPubkey } from '../lightning-backend-CsW_b6C7.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-DLhscRUh.js';
19
+ import '../fx-DM7UCzg1.js';
20
20
 
21
21
  declare function verifyWithFacilitator(payload: PaymentPayload, requirements: PaymentRequirementsV1 | PaymentRequirementsV2, config?: Pick<X402Config, "facilitator" | "facilitatorAuth">, createAuthHeaders?: FacilitatorConfig["createAuthHeaders"] | undefined): Promise<VerifyResponse>;
22
22
  declare function settleWithFacilitator(payload: PaymentPayload, requirements: PaymentRequirementsV1 | PaymentRequirementsV2, config?: Pick<X402Config, "facilitator" | "facilitatorAuth">, createAuthHeaders?: FacilitatorConfig["createAuthHeaders"] | undefined): Promise<SettleResponse>;
@@ -61,7 +61,7 @@ import {
61
61
  verifyUpfrontPayment,
62
62
  x402RequiredUsdcMicro,
63
63
  x402SettledShare
64
- } from "../chunk-S7PIFHE4.js";
64
+ } from "../chunk-HIQ3CEZ3.js";
65
65
  import "../chunk-XRLKGCAW.js";
66
66
  import {
67
67
  PayoutReporter
@@ -70,14 +70,14 @@ import {
70
70
  settleWithFacilitator,
71
71
  verifyWithFacilitator
72
72
  } from "../chunk-E7ZBCT5U.js";
73
- import "../chunk-POYUX2NN.js";
73
+ import "../chunk-EQYHHYW4.js";
74
74
  import "../chunk-TWKQFIOW.js";
75
75
  import {
76
76
  SIGNED_ENVELOPE_FIELDS,
77
77
  SIGNED_ENVELOPE_TYPES,
78
78
  createDefaultReplayStore,
79
79
  humanizeZodError
80
- } from "../chunk-WFCVS6QB.js";
80
+ } from "../chunk-HULU2UVM.js";
81
81
  import {
82
82
  createInstrumentedFetch,
83
83
  isStaleJobReapable
@@ -93,9 +93,9 @@ import {
93
93
  } from "../chunk-AFV77S4C.js";
94
94
  import {
95
95
  toLockPubkey
96
- } from "../chunk-RPUFWIT4.js";
96
+ } from "../chunk-V3WFX65W.js";
97
97
  import "../chunk-62FI3NJF.js";
98
- import "../chunk-HW2UCOOC.js";
98
+ import "../chunk-SXL44PL5.js";
99
99
  import "../chunk-7KQLPVV7.js";
100
100
  import "../chunk-FUJ36YDV.js";
101
101
  import "../chunk-BQJIFRAZ.js";
@@ -110,7 +110,7 @@ import {
110
110
  isNonChannelBitcoinRail,
111
111
  lotOwedSats,
112
112
  netOwedSats
113
- } from "../chunk-2VGMZ7VF.js";
113
+ } from "../chunk-Q2X4QYOB.js";
114
114
  import "../chunk-YG7G4DPZ.js";
115
115
  import "../chunk-COYKJRMM.js";
116
116
  import "../chunk-5H7P3ORL.js";
@@ -1,5 +1,5 @@
1
1
  import { ProofLike } from '@cashu/cashu-ts';
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-DQqpwXa8.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-WUig1cx-.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-DQqpwXa8.js';
1
+ import { X as JsonValue } from './step-cache-WUig1cx-.js';
2
2
 
3
3
  declare const lockPubkeyBrand: unique symbol;
4
4
  /**
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MemoryCreditLedger
3
- } from "./chunk-POYUX2NN.js";
4
- import "./chunk-2VGMZ7VF.js";
3
+ } from "./chunk-EQYHHYW4.js";
4
+ import "./chunk-Q2X4QYOB.js";
5
5
  import "./chunk-YG7G4DPZ.js";
6
6
  import "./chunk-COYKJRMM.js";
7
7
  import "./chunk-5H7P3ORL.js";
@@ -1,15 +1,15 @@
1
- import { ae as CashuMode, bL as CreditLedgerQuerier, bM as CreditDrainEnqueue, bN as HostedSettlementReportObligations, R as ResolvedCreditConfig, bO as DVMAuthScheme, B as SignedRequestDomain, bP as CreditLedgerLike, bQ as X402RefundSettlementGate, bR as CreditSnapshot, bS as CreditDrawRefundArgs, bT as CreditDrawRefundResult, bU as DrawResult, bV as X402SettlementStatus, bW as X402UnresolvedRefund, bX as GrownDrawResult, bY as DrawResolution, bZ as FundingRecord, $ as FundingReceipt, b_ as CreditInvoiceRecord, b$ as InvoiceSettlement, c0 as BlockedInvoiceCursor, c1 as InvoiceReconciliation, c2 as InvoiceWriteOff, c3 as DrawRecord, c4 as StalePendingDrawCursor, c5 as TempoCreditLossEvidence, c6 as TempoCreditLoss, c7 as X402CreditLossEvidence, c8 as X402CreditLoss, c9 as DrainMethod, ca as DrainRequestResult, cb as BitcoinDepositLiability, bp as FundingLot, cc as CreditDrainRecord, cd as ChannelDrainCursor, ce as DrainWriteOff, cf as DrainTransitionResult, cg as DrainReleaseResult, ch as DrainFulfilment, ci as HostingCleanupFence, a0 as JobReceipt, a5 as Message, K as KVStore, G as SignedRequestReplayStore, Z as ZodLike, a as DVMDescriptor } from '../step-cache-DQqpwXa8.js';
2
- export { cj as CLIENT_COMPATIBILITY_HEADERS, d as CanonicalEnvelope, ck as ClientCompatibility, cl as ClientCompatibilityEnv, cm as ClientCompatibilityGate, cn as ClientCompatibilityRequirement, co as ClientSemVer, f as CreateSignedRequestVerifierOpts, cp as CreditFundingBasis, cq as CreditInvoiceStatus, cr as CreditLedger, cs as CreditLedgerError, ct as CreditLedgerErrorCode, cu as CreditLedgerErrorDetails, cv as CreditLedgerPool, cw as CreditStatus, cx as DRAIN_DELIVERY_RESERVE_SATS, cy as DVM_PROTOCOL_VERSION, cz as DrainConflictReason, cA as DrawRailValue, cB as DrawStatus, cC as HostedTempoCloseReportWriteOff, cD as JobCostReportPayload, cE as JobTerminalReportPayload, cF as PostgresX402ChannelStorage, cG as ReplayStoreBackend, cH as RevenueSkippedNoRailPayload, cI as RevenueSkippedNoRailReason, x as SIGNED_REQUEST_AUTH_ID, y as SIGNED_REQUEST_STATEMENT_VERSION, cJ as Secp256k1AuthOpts, z as SignedRequestAudience, E as SignedRequestError, F as SignedRequestFailure, H as SignedRequestSignOpts, M as SignedRequestStatementHeader, N as SignedRequestVerifier, cK as TempoDrainDecision, cL as TempoDrainDecisionArgs, cM as TempoDrainDecisionResult, cN as TempoDrainHoldReason, cO as X402ChannelStorageOpts, cP as X402RelayLockHolder, cQ as X402RelaySubmissionLock, cR as X402RelaySubmissionLockError, cS as allocateDrawValue, cT as clientCompatibilityAttributes, cU as clientCompatibilityMiddleware, cV as clientUpgradeRequired, O as createSignedRequestVerifier, cW as parseClientCapabilities, cX as parseClientCompatibility, cY as parseDvmClient, cZ as parseProtocolVersion, c_ as requireClientCompatibility, c$ as retryHostedTempoCloseReport, d0 as secp256k1Auth, d1 as signedRequestInput, V as signedRequestStatementHeader, d2 as writeOffHostedTempoCloseReport } from '../step-cache-DQqpwXa8.js';
1
+ import { ae as CashuMode, bL as CreditLedgerQuerier, bM as CreditDrainEnqueue, bN as HostedSettlementReportObligations, R as ResolvedCreditConfig, bO as DVMAuthScheme, B as SignedRequestDomain, bP as CreditLedgerLike, bQ as X402RefundSettlementGate, bR as CreditSnapshot, bS as CreditDrawRefundArgs, bT as CreditDrawRefundResult, bU as DrawResult, bV as X402SettlementStatus, bW as X402UnresolvedRefund, bX as GrownDrawResult, bY as DrawResolution, bZ as FundingRecord, $ as FundingReceipt, b_ as CreditInvoiceRecord, b$ as InvoiceSettlement, c0 as BlockedInvoiceCursor, c1 as InvoiceReconciliation, c2 as InvoiceWriteOff, c3 as DrawRecord, c4 as StalePendingDrawCursor, c5 as TempoCreditLossEvidence, c6 as TempoCreditLoss, c7 as X402CreditLossEvidence, c8 as X402CreditLoss, c9 as DrainMethod, ca as DrainRequestResult, cb as BitcoinDepositLiability, bp as FundingLot, cc as CreditDrainRecord, cd as ChannelDrainCursor, ce as DrainWriteOff, cf as DrainTransitionResult, cg as DrainReleaseResult, ch as DrainFulfilment, ci as HostingCleanupFence, a0 as JobReceipt, a5 as Message, K as KVStore, G as SignedRequestReplayStore, Z as ZodLike, a as DVMDescriptor } from '../step-cache-WUig1cx-.js';
2
+ export { cj as CLIENT_COMPATIBILITY_HEADERS, d as CanonicalEnvelope, ck as ClientCompatibility, cl as ClientCompatibilityEnv, cm as ClientCompatibilityGate, cn as ClientCompatibilityRequirement, co as ClientSemVer, f as CreateSignedRequestVerifierOpts, cp as CreditFundingBasis, cq as CreditInvoiceStatus, cr as CreditLedger, cs as CreditLedgerError, ct as CreditLedgerErrorCode, cu as CreditLedgerErrorDetails, cv as CreditLedgerPool, cw as CreditStatus, cx as DRAIN_DELIVERY_RESERVE_SATS, cy as DVM_PROTOCOL_VERSION, cz as DrainConflictReason, cA as DrawRailValue, cB as DrawStatus, cC as HostedTempoCloseReportWriteOff, cD as JobCostReportPayload, cE as JobTerminalReportPayload, cF as PostgresX402ChannelStorage, cG as ReplayStoreBackend, cH as RevenueSkippedNoRailPayload, cI as RevenueSkippedNoRailReason, x as SIGNED_REQUEST_AUTH_ID, y as SIGNED_REQUEST_STATEMENT_VERSION, cJ as Secp256k1AuthOpts, z as SignedRequestAudience, E as SignedRequestError, F as SignedRequestFailure, H as SignedRequestSignOpts, M as SignedRequestStatementHeader, N as SignedRequestVerifier, cK as TempoDrainDecision, cL as TempoDrainDecisionArgs, cM as TempoDrainDecisionResult, cN as TempoDrainHoldReason, cO as X402ChannelStorageOpts, cP as X402RelayLockHolder, cQ as X402RelaySubmissionLock, cR as X402RelaySubmissionLockError, cS as allocateDrawValue, cT as clientCompatibilityAttributes, cU as clientCompatibilityMiddleware, cV as clientUpgradeRequired, O as createSignedRequestVerifier, cW as parseClientCapabilities, cX as parseClientCompatibility, cY as parseDvmClient, cZ as parseProtocolVersion, c_ as requireClientCompatibility, c$ as retryHostedTempoCloseReport, d0 as secp256k1Auth, d1 as signedRequestInput, V as signedRequestStatementHeader, d2 as writeOffHostedTempoCloseReport } from '../step-cache-WUig1cx-.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-B2T-O9oY.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-B2T-O9oY.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-KqobCjkW.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-KqobCjkW.js';
6
6
  import { Context, Hono } from 'hono';
7
7
  import { z } from 'zod';
8
- import { F as FxFetcher } from '../fx-DLhscRUh.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-B8Ijr5V6.js';
10
- export { a as JobStatus, h as isStreamableJobStore } from '../job-store-B8Ijr5V6.js';
11
- import { C as ContentHoldHistory, a as ContentHoldMutation } from '../content-retention-a1yRdmhI.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-a1yRdmhI.js';
8
+ import { F as FxFetcher } from '../fx-DM7UCzg1.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-BVGvAaBG.js';
10
+ export { a as JobStatus, h as isStreamableJobStore } from '../job-store-BVGvAaBG.js';
11
+ import { C as ContentHoldHistory, a as ContentHoldMutation } from '../content-retention-_Yy3YK4t.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-_Yy3YK4t.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,10 +17,10 @@ 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-DmwMSgaM.js';
20
+ import '../lightning-backend-CsW_b6C7.js';
21
21
  import '@cashu/cashu-ts';
22
22
 
23
- /** Lifetime of a per-call implicit credit before the ledger refuses new draws. */
23
+ /** Default lifetime of a per-call implicit credit: 90 days before the ledger refuses new draws. */
24
24
  declare const IMPLICIT_CREDIT_TTL_MS: number;
25
25
 
26
26
  interface ResolvedCashuOpts {
@@ -82,7 +82,7 @@ import {
82
82
  toCreditView,
83
83
  unknownRouteNotFound,
84
84
  writeOffHostedTempoCloseReport
85
- } from "../chunk-S7PIFHE4.js";
85
+ } from "../chunk-HIQ3CEZ3.js";
86
86
  import {
87
87
  MemoryProcessedPaymentStore,
88
88
  PostgresProcessedPaymentStore,
@@ -92,7 +92,7 @@ import "../chunk-ITRSITFP.js";
92
92
  import "../chunk-E7ZBCT5U.js";
93
93
  import {
94
94
  MemoryCreditLedger
95
- } from "../chunk-POYUX2NN.js";
95
+ } from "../chunk-EQYHHYW4.js";
96
96
  import {
97
97
  PostgresJobStore
98
98
  } from "../chunk-TWKQFIOW.js";
@@ -101,7 +101,7 @@ import {
101
101
  createDefaultReplayStore,
102
102
  createSignedRequestVerifier,
103
103
  signedRequestInput
104
- } from "../chunk-WFCVS6QB.js";
104
+ } from "../chunk-HULU2UVM.js";
105
105
  import {
106
106
  isStreamableJobStore
107
107
  } from "../chunk-KJZVTWMX.js";
@@ -115,7 +115,7 @@ import {
115
115
  IMPLICIT_CREDIT_TTL_MS,
116
116
  generateEphemeralReceiptKey,
117
117
  receiptPubkeyFromSecret
118
- } from "../chunk-RPUFWIT4.js";
118
+ } from "../chunk-V3WFX65W.js";
119
119
  import {
120
120
  X402_DEFAULT_FACILITATOR,
121
121
  X402_DEFAULT_NETWORK,
@@ -126,7 +126,7 @@ import {
126
126
  SIGNED_REQUEST_AUTH_ID,
127
127
  SIGNED_REQUEST_STATEMENT_VERSION,
128
128
  signedRequestStatementHeader
129
- } from "../chunk-HW2UCOOC.js";
129
+ } from "../chunk-SXL44PL5.js";
130
130
  import "../chunk-7KQLPVV7.js";
131
131
  import "../chunk-FUJ36YDV.js";
132
132
  import "../chunk-BQJIFRAZ.js";
@@ -139,7 +139,7 @@ import {
139
139
  PostgresX402ChannelStorage,
140
140
  X402RelaySubmissionLockError,
141
141
  allocateDrawValue
142
- } from "../chunk-2VGMZ7VF.js";
142
+ } from "../chunk-Q2X4QYOB.js";
143
143
  import "../chunk-YG7G4DPZ.js";
144
144
  import {
145
145
  SDK_INIT_ADVISORY_LOCK,
@@ -1504,7 +1504,7 @@ ${config.facilitatorAuth?.keyId ?? ""}`;
1504
1504
  sharedPgConsumedStore = consumedStore;
1505
1505
  }
1506
1506
  if (pgPool) {
1507
- const { CreditLedger: CreditLedger2 } = await import("../credit-ledger-MF23UKRJ.js");
1507
+ const { CreditLedger: CreditLedger2 } = await import("../credit-ledger-L4RAXLY7.js");
1508
1508
  const pgLedger = new CreditLedger2(pgPool, tempoSessionStore);
1509
1509
  pendingInits.push(pgLedger.init());
1510
1510
  creditLedger = pgLedger;
@@ -1513,7 +1513,7 @@ ${config.facilitatorAuth?.keyId ?? ""}`;
1513
1513
  pendingInits.push(pgProcessed.init());
1514
1514
  processedPayments = pgProcessed;
1515
1515
  } else {
1516
- const { MemoryCreditLedger: MemoryCreditLedger2 } = await import("../memory-credit-ledger-ERD764PS.js");
1516
+ const { MemoryCreditLedger: MemoryCreditLedger2 } = await import("../memory-credit-ledger-JKQ34VMH.js");
1517
1517
  creditLedger = disposableCashu?.ledger ?? new MemoryCreditLedger2();
1518
1518
  const { MemoryProcessedPaymentStore: MemoryProcessedPaymentStore2 } = await import("../processed-payment-store-GKMAWOM3.js");
1519
1519
  processedPayments = new MemoryProcessedPaymentStore2();
@@ -2489,7 +2489,7 @@ type CreditDrainEnqueue = (tx: RevenueReporterQuerier, payload: CreditDrainPaylo
2489
2489
  *
2490
2490
  * - **The release**, written by the expiry sweep with `reversedAt` absent.
2491
2491
  * - **The reversal**, written when a later funding revives the credit
2492
- * (`CreditLedger.fund` overwrites `expiry_ms`, so the recorded remainder is
2492
+ * (`CreditLedger.fund` extends `expiry_ms`, so the recorded remainder is
2493
2493
  * no longer final). It repeats the whole payload rather than sending a
2494
2494
  * reference, because the retry loop can deliver the two out of order and the
2495
2495
  * platform's upsert must be able to land either one first.
@@ -2915,8 +2915,8 @@ declare class CreditLedger {
2915
2915
  */
2916
2916
  private backfillFundingLots;
2917
2917
  /**
2918
- * Funding adds balance and overwrites expiry, reviving an expired credit. It is additive,
2919
- * not idempotent: the caller’s rail marker or funding record must prevent replay. Owner and
2918
+ * Funding adds balance and extends expiry without shortening it, reviving an expired credit.
2919
+ * It is additive, not idempotent: the caller’s rail marker or funding record must prevent replay. Owner and
2920
2920
  * currency must match; rail and reusable-channel bindings cannot be mixed with other
2921
2921
  * instruments. A legacy NULL rail adopts its first typed top-up.
2922
2922
  *
@@ -5799,7 +5799,7 @@ interface CreditConfig {
5799
5799
  /**
5800
5800
  * Credit lifetime in **seconds**, from the most recent funding. Post-TTL
5801
5801
  * the credit refuses new draws; the balance stays the caller's (the caller-ownership contract).
5802
- * Default 30 days.
5802
+ * Default 90 days. Existing expiries change only on funding, which never shortens them.
5803
5803
  */
5804
5804
  ttl?: number;
5805
5805
  /**
@@ -5837,7 +5837,7 @@ declare const DEFAULT_CREDIT_MIN: PriceValue;
5837
5837
  * cap of $2 so an established caller can actually reach the builder ceiling.
5838
5838
  */
5839
5839
  declare const DEFAULT_CREDIT_MAX: PriceValue;
5840
- /** Platform default for {@link CreditConfig.ttl}: 30 days. */
5840
+ /** Platform default for {@link CreditConfig.ttl}: 90 days. */
5841
5841
  declare const DEFAULT_CREDIT_TTL_SECONDS: number;
5842
5842
  /** Default lifetime of caller-controlled job content before it is redacted. */
5843
5843
  declare const DEFAULT_JOB_RETENTION_DAYS = 730;
@@ -1,6 +1,6 @@
1
- import { C as ContentHoldHistory, a as ContentHoldMutation } from '../content-retention-a1yRdmhI.js';
2
- import { a0 as JobReceipt, a5 as Message, a1 as MessageType, K as KVStore, L as Logger, v as ResponseContent, P as PaymentContent, S as SDKJobContext } from '../step-cache-DQqpwXa8.js';
3
- import { c as StreamableJobStore, R as ReceiptIssuingStore, J as JobRecord, d as RequestIdClaim, e as RequestIdClaimResult, f as JobRetentionCursor, O as OutgoingMessage, A as AppendOutgoingOptions, P as PaymentCreditDelta, V as VerifyAndCreditResult, g as JobCounters } from '../job-store-B8Ijr5V6.js';
1
+ import { C as ContentHoldHistory, a as ContentHoldMutation } from '../content-retention-_Yy3YK4t.js';
2
+ import { a0 as JobReceipt, a5 as Message, a1 as MessageType, K as KVStore, L as Logger, v as ResponseContent, P as PaymentContent, S as SDKJobContext } from '../step-cache-WUig1cx-.js';
3
+ import { c as StreamableJobStore, R as ReceiptIssuingStore, J as JobRecord, d as RequestIdClaim, e as RequestIdClaimResult, f as JobRetentionCursor, O as OutgoingMessage, A as AppendOutgoingOptions, P as PaymentCreditDelta, V as VerifyAndCreditResult, g as JobCounters } from '../job-store-BVGvAaBG.js';
4
4
  import 'hono';
5
5
  import 'mppx';
6
6
  import '@x402/core/server';
@@ -1,4 +1,4 @@
1
- import { C as Currency } from './step-cache-DQqpwXa8.js';
1
+ import { C as Currency } from './step-cache-WUig1cx-.js';
2
2
 
3
3
  /**
4
4
  * Thrown by `fiatToSatsCeil` / `satsToFiat` when the supplied `ratePerBtc` is
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dvmkit/sdk",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "SDK for building Digital Vending Machines: pay-per-use HTTPS services AI agents can find, pay, and call with no account or API key",
5
5
  "author": "DVM Technologies Ltd",
6
6
  "keywords": [