@dvmkit/sdk 0.1.5-rc.7 → 0.1.5-rc.9

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.
@@ -141,7 +141,7 @@ import {
141
141
  advertisedMethods,
142
142
  challengeMeta,
143
143
  isTempoInsufficientFundsError
144
- } from "./chunk-NPIW5VR5.js";
144
+ } from "./chunk-M7LHFJ5K.js";
145
145
 
146
146
  // src/sdk/server/lock-pubkey-store.ts
147
147
  async function initLockPubkeyTable(db) {
@@ -3049,6 +3049,26 @@ function msatsToMethodAmount(msats, methodName, btcUsd) {
3049
3049
  const usd = msatsToUsd(msats, btcUsd);
3050
3050
  return usd.toFixed(decimalsFor(methodName));
3051
3051
  }
3052
+ function fiatMicroToMethodAmount(amountMicro, methodName) {
3053
+ if (!Number.isSafeInteger(amountMicro) || amountMicro < 0) {
3054
+ throw new Error("mpp-units: fiat amount must be a non-negative safe integer");
3055
+ }
3056
+ const decimals = decimalsFor(methodName);
3057
+ const microDecimals = 6;
3058
+ let atomic = BigInt(amountMicro);
3059
+ if (decimals < microDecimals) {
3060
+ const divisor = 10n ** BigInt(microDecimals - decimals);
3061
+ if (atomic % divisor !== 0n) {
3062
+ throw new Error(
3063
+ `mpp-units: fiat microunits cannot be represented exactly with ${decimals} decimals`
3064
+ );
3065
+ }
3066
+ atomic /= divisor;
3067
+ } else if (decimals > microDecimals) {
3068
+ atomic *= 10n ** BigInt(decimals - microDecimals);
3069
+ }
3070
+ return methodNativeAmountToDecimal(atomic, methodName);
3071
+ }
3052
3072
  function methodNativeAsset(methodName) {
3053
3073
  switch (methodName) {
3054
3074
  case "tempo":
@@ -3287,7 +3307,7 @@ var PAYMENT_PROOF_KEYS = ["cashu_token", "x402_payment", "tempo_credential"];
3287
3307
  function hasPaymentProof(content) {
3288
3308
  return PAYMENT_PROOF_KEYS.some((key) => Boolean(content[key]));
3289
3309
  }
3290
- async function issueUpfrontChallenges(mpp, requiredMsats, resourcePath, btcUsdRate, sessionIssuable = true, allowOneShotStablecoin = false) {
3310
+ async function issueUpfrontChallenges(mpp, requiredMsats, resourcePath, btcUsdRate, sessionIssuable = true, allowOneShotStablecoin = false, priceFiat) {
3291
3311
  return loggers.tempo.span(
3292
3312
  "tempo.issue_challenges",
3293
3313
  {
@@ -3305,7 +3325,7 @@ async function issueUpfrontChallenges(mpp, requiredMsats, resourcePath, btcUsdRa
3305
3325
  if (creditSurface && meta.intent === "charge" && !stablecoinCreditInstrumentAllowed(allowOneShotStablecoin, "tempo_charge")) {
3306
3326
  continue;
3307
3327
  }
3308
- const amount = msatsToMethodAmount(requiredMsats, meta.name, btcUsdRate);
3328
+ const amount = priceFiat?.currency === "usd" ? fiatMicroToMethodAmount(priceFiat.amountMicro, meta.name) : msatsToMethodAmount(requiredMsats, meta.name, btcUsdRate);
3309
3329
  const ch = await mpp.issueChallenge(meta.name, meta.intent, {
3310
3330
  amount,
3311
3331
  ...meta.intent === "session" && { suggestedDeposit: amount, unitType: "request" },
@@ -3783,13 +3803,14 @@ async function verifyUpfrontPayment(opts) {
3783
3803
  resourcePath ?? "/v1/job",
3784
3804
  rate,
3785
3805
  sessionIssuable,
3786
- opts.fundOnly?.allowOneShotStablecoin
3806
+ opts.fundOnly?.allowOneShotStablecoin,
3807
+ opts.priceFiat
3787
3808
  )
3788
3809
  }
3789
3810
  };
3790
3811
  }
3791
3812
  }
3792
- const expectedAmount = msatsToMethodAmount(requiredMsats, cred.challenge.method, rate);
3813
+ const expectedAmount = opts.priceFiat?.currency === "usd" ? fiatMicroToMethodAmount(opts.priceFiat.amountMicro, cred.challenge.method) : msatsToMethodAmount(requiredMsats, cred.challenge.method, rate);
3793
3814
  const sessionBasis = mppSessionBasis(cred);
3794
3815
  let tempoReceipt;
3795
3816
  const broadcast = async () => {
@@ -3862,7 +3883,8 @@ async function verifyUpfrontPayment(opts) {
3862
3883
  resourcePath ?? "/v1/job",
3863
3884
  rate,
3864
3885
  sessionIssuable,
3865
- opts.fundOnly?.allowOneShotStablecoin
3886
+ opts.fundOnly?.allowOneShotStablecoin,
3887
+ opts.priceFiat
3866
3888
  );
3867
3889
  return {
3868
3890
  paidMsats: 0,
@@ -3886,7 +3908,8 @@ async function verifyUpfrontPayment(opts) {
3886
3908
  resourcePath ?? "/v1/job",
3887
3909
  rate,
3888
3910
  sessionIssuable,
3889
- opts.fundOnly?.allowOneShotStablecoin
3911
+ opts.fundOnly?.allowOneShotStablecoin,
3912
+ opts.priceFiat
3890
3913
  );
3891
3914
  return {
3892
3915
  paidMsats: 0,
@@ -3952,7 +3975,8 @@ async function verifyUpfrontPayment(opts) {
3952
3975
  resourcePath ?? "/v1/job",
3953
3976
  rate,
3954
3977
  sessionIssuable,
3955
- opts.fundOnly?.allowOneShotStablecoin
3978
+ opts.fundOnly?.allowOneShotStablecoin,
3979
+ opts.priceFiat
3956
3980
  );
3957
3981
  return {
3958
3982
  paidMsats: 0,
@@ -4015,7 +4039,8 @@ async function verifyUpfrontPayment(opts) {
4015
4039
  resourcePath ?? "/v1/job",
4016
4040
  rate,
4017
4041
  sessionIssuable,
4018
- opts.fundOnly?.allowOneShotStablecoin
4042
+ opts.fundOnly?.allowOneShotStablecoin,
4043
+ opts.priceFiat
4019
4044
  ) : void 0;
4020
4045
  return {
4021
4046
  paidMsats: 0,
@@ -4696,7 +4721,10 @@ async function verifyIncomingPayment(body, opts, snapshot) {
4696
4721
  }
4697
4722
  };
4698
4723
  }
4699
- const expectedAmount = msatsToMethodAmount(expectedMsats, credential.challenge.method, rate);
4724
+ const expectedAmount = snapshot.pendingPaymentFiatCurrency === "usd" && snapshot.pendingPaymentFiatMicro !== void 0 ? fiatMicroToMethodAmount(
4725
+ snapshot.pendingPaymentFiatMicro,
4726
+ credential.challenge.method
4727
+ ) : msatsToMethodAmount(expectedMsats, credential.challenge.method, rate);
4700
4728
  const expectedMeta = challengeMeta(credential.challenge);
4701
4729
  const creditNative = methodNativeAmountFromDecimal(
4702
4730
  expectedAmount,
@@ -5041,7 +5069,7 @@ async function processIncomingPayment(job, body, opts) {
5041
5069
  status: 402
5042
5070
  };
5043
5071
  }
5044
- const expectedAmount = msatsToMethodAmount(expectedMsats, credential.challenge.method, rate);
5072
+ const expectedAmount = job.pendingPaymentFiatCurrency === "usd" && job.pendingPaymentFiatMicro !== void 0 ? fiatMicroToMethodAmount(job.pendingPaymentFiatMicro, credential.challenge.method) : msatsToMethodAmount(expectedMsats, credential.challenge.method, rate);
5045
5073
  const expectedMeta = challengeMeta(credential.challenge);
5046
5074
  await loggers.tempo.span(
5047
5075
  "tempo.verify_credential",
@@ -9494,7 +9522,7 @@ function buildContext(job, opts) {
9494
9522
  for (const m of opts.mpp.methods) {
9495
9523
  const meta = m;
9496
9524
  if (meta.intent === "session") continue;
9497
- const amount2 = msatsToMethodAmount(amountMsats, meta.name, rate);
9525
+ const amount2 = pendingFiat?.currency === "usd" ? fiatMicroToMethodAmount(pendingFiat.amountMicro, meta.name) : msatsToMethodAmount(amountMsats, meta.name, rate);
9498
9526
  const ch = await opts.mpp.issueChallenge(meta.name, meta.intent, {
9499
9527
  amount: amount2,
9500
9528
  description: reason
@@ -445,7 +445,11 @@ function buildMppMethods(opts, env) {
445
445
  tempo.charge({
446
446
  recipient: opts.tempoRecipient,
447
447
  currency: tempoCurrency,
448
- chainId,
448
+ // mppx resolves the route's verification requirement from `testnet`.
449
+ // Passing `chainId` only adds a challenge default, so a Moderato
450
+ // challenge can otherwise be re-derived as mainnet when the credential
451
+ // returns and fail before payment verification.
452
+ testnet: chainId === TEMPO_MODERATO_CHAIN_ID,
449
453
  decimals: 6,
450
454
  // Without this mppx installs `Store.memory()`, so the consumed-hash
451
455
  // guard is per-process and a credential replayed onto a sibling machine
@@ -494,6 +498,11 @@ function resolveTempoNetwork(env) {
494
498
  `DVMKIT_TEMPO_CHAIN_ID must be a positive safe integer; got '${env.DVMKIT_TEMPO_CHAIN_ID}'.`
495
499
  );
496
500
  }
501
+ if (chainId !== TEMPO_MAINNET_CHAIN_ID && chainId !== TEMPO_MODERATO_CHAIN_ID) {
502
+ throw new Error(
503
+ `DVMKIT_TEMPO_CHAIN_ID must be ${TEMPO_MAINNET_CHAIN_ID} (mainnet) or ${TEMPO_MODERATO_CHAIN_ID} (Moderato); got '${chainId}'.`
504
+ );
505
+ }
497
506
  const currency = env.DVMKIT_TEMPO_CURRENCY ?? (chainId === TEMPO_MODERATO_CHAIN_ID ? TEMPO_PATH_USD_MODERATO : TEMPO_USDC_MAINNET);
498
507
  const normalizedCurrency = currency.toLowerCase();
499
508
  if (chainId === TEMPO_MODERATO_CHAIN_ID && normalizedCurrency === TEMPO_USDC_MAINNET.toLowerCase()) {
@@ -1,10 +1,10 @@
1
- import { ah as FundingMethod, o as PaymentMethod, bM as CreditLedgerLike, a1 as Message, X as FundingReceipt, bO as CreditSnapshot, Y as JobReceipt, S as SDKJobContext, aw as StepCache, u as ResponseContent, P as PaymentContent, a2 as MessageType, bj as X402Receipt, aE as X402Config, bi as X402ExactVersionSupport, cS as X402SettlementIntent, aq as PaymentRequirementsV2, c1 as CreditLedgerQuerier, cT as X402SettlementCursor, bQ as X402SettlementStatus, cU as X402SettlementWriteOff, bN as X402RefundSettlementGate, cV as X402FacilitatorAuth, cW as X402BatchSettlementConfig, cy as PostgresX402ChannelStorage, cX as X402PayoutObserver, br as MppxServer, ab as CashuMode, cY as CreditDepositEnqueue, cZ as X402SettlementReconciliationReason, ao as PaymentRequirements, a0 as MppxCredential, bm as CreditDepositPayload, bP as DrawResult, cn as CreditLedgerError, a6 as ReceiptCredit, ae as DrainReceiptEvent, ad as DrainReceipt, K as KVStore, y as SignedRequestAudience, c_ as CreditDrawReleaseEnqueue, cx as JobCostReportPayload, cA as RevenueSkippedNoRailPayload, Z as ZodLike, a as DVMDescriptor, bV as CreditInvoiceRecord, bW as InvoiceSettlement, ch as ClientCompatibilityGate, cf as ClientCompatibility, bu as PayoutReporter, R as ResolvedCreditConfig, g as CreditView } from './step-cache-CwM_Q8rK.js';
1
+ import { ah as FundingMethod, o as PaymentMethod, bM as CreditLedgerLike, a1 as Message, X as FundingReceipt, bO as CreditSnapshot, Y as JobReceipt, S as SDKJobContext, aw as StepCache, u as ResponseContent, P as PaymentContent, a2 as MessageType, bj as X402Receipt, aE as X402Config, bi as X402ExactVersionSupport, cS as X402SettlementIntent, aq as PaymentRequirementsV2, c1 as CreditLedgerQuerier, cT as X402SettlementCursor, bQ as X402SettlementStatus, cU as X402SettlementWriteOff, bN as X402RefundSettlementGate, cV as X402FacilitatorAuth, cW as X402BatchSettlementConfig, cy as PostgresX402ChannelStorage, cX as X402PayoutObserver, br as MppxServer, ab as CashuMode, cY as CreditDepositEnqueue, cZ as X402SettlementReconciliationReason, ao as PaymentRequirements, a0 as MppxCredential, bm as CreditDepositPayload, bP as DrawResult, cn as CreditLedgerError, a6 as ReceiptCredit, ae as DrainReceiptEvent, ad as DrainReceipt, K as KVStore, y as SignedRequestAudience, c_ as CreditDrawReleaseEnqueue, cx as JobCostReportPayload, cA as RevenueSkippedNoRailPayload, Z as ZodLike, a as DVMDescriptor, bV as CreditInvoiceRecord, bW as InvoiceSettlement, ch as ClientCompatibilityGate, cf as ClientCompatibility, bu as PayoutReporter, R as ResolvedCreditConfig, g as CreditView } from './step-cache-5dljDqrQ.js';
2
2
  import { ProofLike, SerializedDLEQ, Proof } from '@cashu/cashu-ts';
3
3
  import { Hono, Context } from 'hono';
4
4
  import { Pool } from 'pg';
5
- import { b as FxRateSnapshot, F as FxFetcher } from './fx-CGRJE8rm.js';
6
- import { g as LockPubkey, f as CheckMintHealthOptions, b as LightningBackend, A as AttestationPayload } from './lightning-backend-KvQM0YHi.js';
7
- import { T as TopUpCapUnenforcedReason, A as AppendOutgoingOptions, J as JobRecord, b as JobStore } from './job-store-Cnlv9pOx.js';
5
+ import { b as FxRateSnapshot, F as FxFetcher } from './fx-D860pZvP.js';
6
+ import { g as LockPubkey, f as CheckMintHealthOptions, b as LightningBackend, A as AttestationPayload } from './lightning-backend-BozcevPZ.js';
7
+ import { T as TopUpCapUnenforcedReason, A as AppendOutgoingOptions, J as JobRecord, b as JobStore } from './job-store-BUGqvCfL.js';
8
8
  import { Challenge } from 'mppx';
9
9
  import { SettleResponse, SupportedResponse } from '@x402/core/types';
10
10
  import { Channel, AutoSettlementConfig } from '@x402/evm/batch-settlement/server';
@@ -2174,7 +2174,7 @@ declare function hasPaymentProof(content: Record<string, unknown>): boolean;
2174
2174
  * suppresses it unless the builder accepts the manual-refund obligation; job
2175
2175
  * surfaces always keep charge.
2176
2176
  */
2177
- declare function issueUpfrontChallenges(mpp: MppxServer, requiredMsats: number, resourcePath: string, btcUsdRate: number, sessionIssuable?: boolean, allowOneShotStablecoin?: unknown): Promise<Challenge.Challenge[]>;
2177
+ declare function issueUpfrontChallenges(mpp: MppxServer, requiredMsats: number, resourcePath: string, btcUsdRate: number, sessionIssuable?: boolean, allowOneShotStablecoin?: unknown, priceFiat?: PriceFiat): Promise<Challenge.Challenge[]>;
2178
2178
  /** Verify an upfront payment on job submission (Cashu, x402, or MPP). */
2179
2179
  declare function verifyUpfrontPayment(opts: UpfrontPaymentOpts): Promise<PaymentResult>;
2180
2180
  /**
@@ -1,4 +1,4 @@
1
- import { C as Currency } from './step-cache-CwM_Q8rK.js';
1
+ import { C as Currency } from './step-cache-5dljDqrQ.js';
2
2
 
3
3
  /**
4
4
  * Quote-time fx snapshot. Embedded in scribe's `lockedQuote` for within-job
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-CwM_Q8rK.js';
2
- export { A as ApprovalContent, b as ArtifactContent, c as CancelContent, d as CanonicalEnvelope, e as CreateSignedRequestVerifierOpts, f as CreditConfig, g as CreditView, h as DEFAULT_CREDIT_MAX, i as DEFAULT_CREDIT_MIN, j as DEFAULT_CREDIT_TTL_SECONDS, k as DEFAULT_JOB_RETENTION_DAYS, l as DVMRouteContext, I as IncomingMessage, m as InputType, n as InvalidCurrencyError, J as JobCost, K as KVStore, L as Logger, P as PaymentContent, o as PaymentMethod, p as PriceValue, q as ProgressContent, r as PromptOpts, Q as QuoteConfig, s as QuoteContext, t as QuoteResult, R as ResolvedCreditConfig, u as ResponseContent, S as SDKJobContext, v as SDKPaymentRequestOpts, w as SIGNED_REQUEST_AUTH_ID, x as SIGNED_REQUEST_STATEMENT_VERSION, y as SignedRequestAudience, z as SignedRequestDomain, B as SignedRequestError, E as SignedRequestFailure, F as SignedRequestReplayStore, G as SignedRequestSignOpts, H as SignedRequestStatementHeader, M as SignedRequestVerifier, U as UnsupportedCurrencyError, N as createSignedRequestVerifier, O as isZodSchema, T as signedRequestStatementHeader, V as validateCurrency } from './step-cache-CwM_Q8rK.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, P as PlatformFxSource, d as createFxFetcher, f as fxRateFor, r as resolveFxSourceFromEnv } from './fx-CGRJE8rm.js';
4
- export { I as InvalidFxRateError, f as fiatToSatsCeil, a as formatFiat, b as formatUsd, r as roundUsd, s as satsToFiat } from './usd-nYZSb7KQ.js';
5
- export { J as JobRecord, a as JobStatus, b as JobStore } from './job-store-Cnlv9pOx.js';
1
+ import { C as Currency, Z as ZodLike, D as DVMConfig, a as DVMDescriptor } from './step-cache-5dljDqrQ.js';
2
+ export { A as ApprovalContent, b as ArtifactContent, c as CancelContent, d as CanonicalEnvelope, e as CreateSignedRequestVerifierOpts, f as CreditConfig, g as CreditView, h as DEFAULT_CREDIT_MAX, i as DEFAULT_CREDIT_MIN, j as DEFAULT_CREDIT_TTL_SECONDS, k as DEFAULT_JOB_RETENTION_DAYS, l as DVMRouteContext, I as IncomingMessage, m as InputType, n as InvalidCurrencyError, J as JobCost, K as KVStore, L as Logger, P as PaymentContent, o as PaymentMethod, p as PriceValue, q as ProgressContent, r as PromptOpts, Q as QuoteConfig, s as QuoteContext, t as QuoteResult, R as ResolvedCreditConfig, u as ResponseContent, S as SDKJobContext, v as SDKPaymentRequestOpts, w as SIGNED_REQUEST_AUTH_ID, x as SIGNED_REQUEST_STATEMENT_VERSION, y as SignedRequestAudience, z as SignedRequestDomain, B as SignedRequestError, E as SignedRequestFailure, F as SignedRequestReplayStore, G as SignedRequestSignOpts, H as SignedRequestStatementHeader, M as SignedRequestVerifier, U as UnsupportedCurrencyError, N as createSignedRequestVerifier, O as isZodSchema, T as signedRequestStatementHeader, V as validateCurrency } from './step-cache-5dljDqrQ.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, P as PlatformFxSource, d as createFxFetcher, f as fxRateFor, r as resolveFxSourceFromEnv } from './fx-D860pZvP.js';
4
+ export { I as InvalidFxRateError, f as fiatToSatsCeil, a as formatFiat, b as formatUsd, r as roundUsd, s as satsToFiat } from './usd-DoRuAckA.js';
5
+ export { J as JobRecord, a as JobStatus, b as JobStore } from './job-store-BUGqvCfL.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-DbFkpDv0.js';
7
7
  export { z } from 'zod';
8
8
  import 'hono';
@@ -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, M as MintAmountBounds, e as MintHealthCheckResult } from '../lightning-backend-KvQM0YHi.js';
2
- export { A as AttestationPayload, B as BuilderIdentityKeypair, f as CheckMintHealthOptions, g as LockPubkey, h as amountBoundsVerdict, i as assertNutSupport, j as buildAttestation, k as canSwap, l as checkMintHealth, m as generateIdentity, n as hashCapabilities, o as loadIdentitySecret, s as signAttestation, t as toLockPubkey, v as verifyAttestation, w as writeIdentity } from '../lightning-backend-KvQM0YHi.js';
1
+ import { L as LightningTransactionListOptions, a as LightningTransactionSnapshot, b as LightningBackend, c as LightningPayment, d as LightningWalletInfo, C as CreatedInvoice, I as InvoiceStatus, M as MintAmountBounds, e as MintHealthCheckResult } from '../lightning-backend-BozcevPZ.js';
2
+ export { A as AttestationPayload, B as BuilderIdentityKeypair, f as CheckMintHealthOptions, g as LockPubkey, h as amountBoundsVerdict, i as assertNutSupport, j as buildAttestation, k as canSwap, l as checkMintHealth, m as generateIdentity, n as hashCapabilities, o as loadIdentitySecret, s as signAttestation, t as toLockPubkey, v as verifyAttestation, w as writeIdentity } from '../lightning-backend-BozcevPZ.js';
3
3
  import { ProofLike, MeltQuoteBolt11Response, Proof, Wallet, SerializedDLEQ, MintQuoteBolt11Response, MintQuoteState, MintPreview, OutputDataLike, CounterSource, CounterRange } from '@cashu/cashu-ts';
4
4
  export { g as getWallet } from '../wallet-CJC8lwxx.js';
5
- import { W as JsonValue, z as SignedRequestDomain, H as SignedRequestStatementHeader, X as FundingReceipt, Y as JobReceipt$1, y as SignedRequestAudience, _ as PaymentRequired, $ as X402Version, a0 as MppxCredential, a1 as Message, a2 as MessageType, a3 as MppxChallenge, a4 as X402_BATCH_SETTLEMENT_SCHEME, a5 as X402_EXACT_SCHEME, a6 as ReceiptCredit, C as Currency, a7 as X402Wallet, L as Logger$1, K as KVStore, a8 as ResourceInfo } from '../step-cache-CwM_Q8rK.js';
6
- export { a9 as BuildPaymentRequirementsOpts, aa as CapabilityDescriptor, ab as CashuMode, ac as CompleteContent, ad as DrainReceipt, ae as DrainReceiptEvent, af as ExactEvmPayload, ag as ExactEvmPayloadAuthorization, ah as FundingMethod, ai as MessageFrom, aj as PaymentPayload, ak as PaymentPayloadV1, al as PaymentPayloadV2, am as PaymentRequestContent, an as PaymentRequiredV2, ao as PaymentRequirements, ap as PaymentRequirementsV1, aq as PaymentRequirementsV2, ar as PromptContent, as as RAIL_REFUNDABLE, at as ReceiptOutcome, au as ReceiptPayment, av as SettleResponse, aw as StepCache, ax as StepRecord, ay as TextContent, az as UnsignedDrainReceipt, aA as UnsignedFundingReceipt, aB as UnsignedJobReceipt, aC as VerifyResponse, aD as WorkingContent, aE as X402Config, aF as X402ResponseBody, aG as X402SelfRelayRpcFailureReason, aH as X402_DEFAULT_NETWORK, aI as X402_V1_VERSION, aJ as X402_VERSION, aK as buildPaymentRequiredV2, aL as buildPaymentRequirements, aM as caip2ToX402Network, aN as canonicalRequestPath, aO as canonicaliseForSigning, aP as canonicalize, aQ as chainIdFromCaip2, aR as computeResultHash, aS as decodePayment, aT as decodePaymentRequiredHeader, aU as encodePayment, aV as encodePaymentRequiredHeader, aW as encodeSettleResponseHeader, aX as exactEvmAuthorization, aY as isArtifactMessage, aZ as isCancelMessage, a_ as isCompleteMessage, a$ as isDrainReceipt, b0 as isFundingReceipt, b1 as isPaymentRequestMessage, b2 as isPromptMessage, b3 as isSignedJobReceipt, b4 as isTextMessage, b5 as isWorkingMessage, b6 as paymentRequiredV2FromV1, b7 as signDrainReceipt, b8 as signFundingReceipt, b9 as signReceipt, ba as usdcContractByCaip2, bb as usdcContractFor, bc as usdcDomainNameFor, bd as usdcDomainVersionFor, be as verifyDrainReceipt, bf as verifyFundingReceipt, bg as verifyReceipt, bh as x402NetworkToCaip2 } from '../step-cache-CwM_Q8rK.js';
5
+ import { W as JsonValue, z as SignedRequestDomain, H as SignedRequestStatementHeader, X as FundingReceipt, Y as JobReceipt$1, y as SignedRequestAudience, _ as PaymentRequired, $ as X402Version, a0 as MppxCredential, a1 as Message, a2 as MessageType, a3 as MppxChallenge, a4 as X402_BATCH_SETTLEMENT_SCHEME, a5 as X402_EXACT_SCHEME, a6 as ReceiptCredit, C as Currency, a7 as X402Wallet, L as Logger$1, K as KVStore, a8 as ResourceInfo } from '../step-cache-5dljDqrQ.js';
6
+ export { a9 as BuildPaymentRequirementsOpts, aa as CapabilityDescriptor, ab as CashuMode, ac as CompleteContent, ad as DrainReceipt, ae as DrainReceiptEvent, af as ExactEvmPayload, ag as ExactEvmPayloadAuthorization, ah as FundingMethod, ai as MessageFrom, aj as PaymentPayload, ak as PaymentPayloadV1, al as PaymentPayloadV2, am as PaymentRequestContent, an as PaymentRequiredV2, ao as PaymentRequirements, ap as PaymentRequirementsV1, aq as PaymentRequirementsV2, ar as PromptContent, as as RAIL_REFUNDABLE, at as ReceiptOutcome, au as ReceiptPayment, av as SettleResponse, aw as StepCache, ax as StepRecord, ay as TextContent, az as UnsignedDrainReceipt, aA as UnsignedFundingReceipt, aB as UnsignedJobReceipt, aC as VerifyResponse, aD as WorkingContent, aE as X402Config, aF as X402ResponseBody, aG as X402SelfRelayRpcFailureReason, aH as X402_DEFAULT_NETWORK, aI as X402_V1_VERSION, aJ as X402_VERSION, aK as buildPaymentRequiredV2, aL as buildPaymentRequirements, aM as caip2ToX402Network, aN as canonicalRequestPath, aO as canonicaliseForSigning, aP as canonicalize, aQ as chainIdFromCaip2, aR as computeResultHash, aS as decodePayment, aT as decodePaymentRequiredHeader, aU as encodePayment, aV as encodePaymentRequiredHeader, aW as encodeSettleResponseHeader, aX as exactEvmAuthorization, aY as isArtifactMessage, aZ as isCancelMessage, a_ as isCompleteMessage, a$ as isDrainReceipt, b0 as isFundingReceipt, b1 as isPaymentRequestMessage, b2 as isPromptMessage, b3 as isSignedJobReceipt, b4 as isTextMessage, b5 as isWorkingMessage, b6 as paymentRequiredV2FromV1, b7 as signDrainReceipt, b8 as signFundingReceipt, b9 as signReceipt, ba as usdcContractByCaip2, bb as usdcContractFor, bc as usdcDomainNameFor, bd as usdcDomainVersionFor, be as verifyDrainReceipt, bf as verifyFundingReceipt, bg as verifyReceipt, bh as x402NetworkToCaip2 } from '../step-cache-5dljDqrQ.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 { e as FX_CACHE_TTL_MS, g as FX_RETRY_COUNT, w as warmFxSnapshot } from '../fx-CGRJE8rm.js';
13
- export { c as InvalidUsdPriceError, p as parseUsdPrice } from '../usd-nYZSb7KQ.js';
12
+ export { e as FX_CACHE_TTL_MS, g as FX_RETRY_COUNT, w as warmFxSnapshot } from '../fx-D860pZvP.js';
13
+ export { c as InvalidUsdPriceError, p as parseUsdPrice } from '../usd-DoRuAckA.js';
14
14
  import 'hono';
15
15
  import 'mppx';
16
16
  import '@x402/core/server';
@@ -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-CwM_Q8rK.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-CwM_Q8rK.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-5dljDqrQ.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-5dljDqrQ.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-CJC8lwxx.js';
9
- import { A as AccumulatorPool, a as AccumulatorQuerier, C as ConsumedCredentialStore } from '../credit-menu-B-e3vZGo.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-B-e3vZGo.js';
11
- import { g as LockPubkey } from '../lightning-backend-KvQM0YHi.js';
12
- export { t as lockPubkeyStoreToLockPubkey } from '../lightning-backend-KvQM0YHi.js';
13
- export { O as OutgoingMessage, S as StaleJobReapable, i as isStaleJobReapable } from '../job-store-Cnlv9pOx.js';
9
+ import { A as AccumulatorPool, a as AccumulatorQuerier, C as ConsumedCredentialStore } from '../credit-menu-enwMbn55.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-enwMbn55.js';
11
+ import { g as LockPubkey } from '../lightning-backend-BozcevPZ.js';
12
+ export { t as lockPubkeyStoreToLockPubkey } from '../lightning-backend-BozcevPZ.js';
13
+ export { O as OutgoingMessage, S as StaleJobReapable, i as isStaleJobReapable } from '../job-store-BUGqvCfL.js';
14
14
  import { Store } from 'mppx';
15
15
  import { z } from 'zod';
16
16
  import '@x402/evm/batch-settlement/server';
17
17
  import 'viem';
18
18
  import '@x402/core/types';
19
19
  import '@cashu/cashu-ts';
20
- import '../fx-CGRJE8rm.js';
20
+ import '../fx-D860pZvP.js';
21
21
 
22
22
  /** POST a verify request to the configured facilitator. */
23
23
  declare function verifyWithFacilitator(payload: PaymentPayload, requirements: PaymentRequirementsV1 | PaymentRequirementsV2, config?: Pick<X402Config, "facilitator" | "facilitatorAuth">, createAuthHeaders?: FacilitatorConfig["createAuthHeaders"] | undefined): Promise<VerifyResponse>;
@@ -65,7 +65,7 @@ import {
65
65
  verifyUpfrontPayment,
66
66
  x402RequiredUsdcMicro,
67
67
  x402SettledShare
68
- } from "../chunk-NJFOV36R.js";
68
+ } from "../chunk-5PBOA25N.js";
69
69
  import "../chunk-DMNLFNTW.js";
70
70
  import {
71
71
  settleWithFacilitator,
@@ -116,7 +116,7 @@ import "../chunk-C3MTFLC6.js";
116
116
  import {
117
117
  _testing,
118
118
  wrapMppx
119
- } from "../chunk-NPIW5VR5.js";
119
+ } from "../chunk-M7LHFJ5K.js";
120
120
  export {
121
121
  DEFAULT_LOCK_PUBKEY_GRACE_SECONDS,
122
122
  JobCancelledError,
@@ -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-CwM_Q8rK.js';
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-5dljDqrQ.js';
3
3
 
4
4
  /** Job status values that can be persisted. */
5
5
  type JobStatus = "processing" | "completed" | "failed" | "awaiting-input" | "cancelled" | "working";
@@ -1,4 +1,4 @@
1
- import { W as JsonValue } from './step-cache-CwM_Q8rK.js';
1
+ import { W as JsonValue } from './step-cache-5dljDqrQ.js';
2
2
 
3
3
  declare const lockPubkeyBrand: unique symbol;
4
4
  /**
@@ -17,7 +17,7 @@ import {
17
17
  parseMppMethodsAllowlist,
18
18
  resolveTempoNetwork,
19
19
  wrapMppx
20
- } from "./chunk-NPIW5VR5.js";
20
+ } from "./chunk-M7LHFJ5K.js";
21
21
  export {
22
22
  MPPX_HMAC_MISMATCH_REASON,
23
23
  TEMPO_MAINNET_CHAIN_ID,
@@ -1,13 +1,13 @@
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-CwM_Q8rK.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 PostgresX402ChannelStorage, cz as ReplayStoreBackend, cA as RevenueSkippedNoRailPayload, cB as RevenueSkippedNoRailReason, w as SIGNED_REQUEST_AUTH_ID, x as SIGNED_REQUEST_STATEMENT_VERSION, cC as Secp256k1AuthOpts, y as SignedRequestAudience, B as SignedRequestError, E as SignedRequestFailure, G as SignedRequestSignOpts, H as SignedRequestStatementHeader, M as SignedRequestVerifier, cD as X402ChannelStorageOpts, cE as X402RelayLockHolder, cF as X402RelaySubmissionLock, cG as X402RelaySubmissionLockError, cH as allocateDrawValue, cI as clientCompatibilityAttributes, cJ as clientCompatibilityMiddleware, cK as clientUpgradeRequired, N as createSignedRequestVerifier, cL as parseClientCapabilities, cM as parseClientCompatibility, cN as parseDvmClient, cO as parseProtocolVersion, cP as requireClientCompatibility, cQ as secp256k1Auth, cR as signedRequestInput, T as signedRequestStatementHeader } from '../step-cache-CwM_Q8rK.js';
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-5dljDqrQ.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 PostgresX402ChannelStorage, cz as ReplayStoreBackend, cA as RevenueSkippedNoRailPayload, cB as RevenueSkippedNoRailReason, w as SIGNED_REQUEST_AUTH_ID, x as SIGNED_REQUEST_STATEMENT_VERSION, cC as Secp256k1AuthOpts, y as SignedRequestAudience, B as SignedRequestError, E as SignedRequestFailure, G as SignedRequestSignOpts, H as SignedRequestStatementHeader, M as SignedRequestVerifier, cD as X402ChannelStorageOpts, cE as X402RelayLockHolder, cF as X402RelaySubmissionLock, cG as X402RelaySubmissionLockError, cH as allocateDrawValue, cI as clientCompatibilityAttributes, cJ as clientCompatibilityMiddleware, cK as clientUpgradeRequired, N as createSignedRequestVerifier, cL as parseClientCapabilities, cM as parseClientCompatibility, cN as parseDvmClient, cO as parseProtocolVersion, cP as requireClientCompatibility, cQ as secp256k1Auth, cR as signedRequestInput, T as signedRequestStatementHeader } from '../step-cache-5dljDqrQ.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-B-e3vZGo.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 JobManager, aB as JobManagerOpts, aC as LightningReceiveConfig, aD as MIN_INVOICE_TTL_SECONDS, aE as MemoryConsumedCredentialStore, aF as MemoryConsumedCredentialStoreOpts, aG as MemoryProcessedPaymentStore, aH as MemoryX402ExactSettlementStore, aI as MountOpts, aJ as OwnerDisplay, aK as PaidJobCompletion, aL as PaymentMode, aM as PlatformReporterOpts, aN as PostgresProcessedPaymentStore, aO as PostgresX402ExactSettlementStore, aP as PriceFiat, aQ as ProcessedPaymentQuerier, aR as ProcessedPaymentRail, aS as ProcessedPaymentRecord, aT as ProcessedPaymentReplayError, aU as ProcessedPaymentStore, aV as X402BatchAcceptance, aW as X402BatchFunding, aX as X402BatchRefusal, aY as X402BatchSettlementServer, aZ as X402ExactAcceptance, a_ as X402ExactIntentConflictError, a$ as X402ExactSettlementAttempt, b0 as X402ExactSettlementChainEvidence, b1 as X402ExactSettlementEffect, b2 as X402ExactSettlementEvidenceMissingError, b3 as X402ExactSettlementEvidenceReader, b4 as X402ExactSettlementIntent, b5 as X402ExactSettlementNotReadyError, b6 as X402ExactSettlementServer, b7 as X402ExactSettlementServerOpts, b8 as X402ExactSettlementStatus, b9 as X402ExactSettlementStore, ba as X402SettlementChainEvidence, bb as X402SettlementEvidenceReader, bc as X402SettlementSubmissionError, bd as X402_BATCH_AUTO_SETTLEMENT, be as X402_BATCH_MIN_WITHDRAW_DELAY_SECONDS, bf as X402_BATCH_SETTLEMENT_NETWORK, bg as attachCreditMenu, bh as buildCreditMenu, bi as createDVMHost, bj as createX402BatchSettlementServer, bk as creditEnvelopeIgnoreFields, bl as drawSettlementRef, bm as extractCreditEnvelope, bn as fundingCommitment, bo as selectPrimaryCredit, bp as stripCreditEnvelope, bq as toCreditView } from '../credit-menu-B-e3vZGo.js';
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-enwMbn55.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 JobManager, aB as JobManagerOpts, aC as LightningReceiveConfig, aD as MIN_INVOICE_TTL_SECONDS, aE as MemoryConsumedCredentialStore, aF as MemoryConsumedCredentialStoreOpts, aG as MemoryProcessedPaymentStore, aH as MemoryX402ExactSettlementStore, aI as MountOpts, aJ as OwnerDisplay, aK as PaidJobCompletion, aL as PaymentMode, aM as PlatformReporterOpts, aN as PostgresProcessedPaymentStore, aO as PostgresX402ExactSettlementStore, aP as PriceFiat, aQ as ProcessedPaymentQuerier, aR as ProcessedPaymentRail, aS as ProcessedPaymentRecord, aT as ProcessedPaymentReplayError, aU as ProcessedPaymentStore, aV as X402BatchAcceptance, aW as X402BatchFunding, aX as X402BatchRefusal, aY as X402BatchSettlementServer, aZ as X402ExactAcceptance, a_ as X402ExactIntentConflictError, a$ as X402ExactSettlementAttempt, b0 as X402ExactSettlementChainEvidence, b1 as X402ExactSettlementEffect, b2 as X402ExactSettlementEvidenceMissingError, b3 as X402ExactSettlementEvidenceReader, b4 as X402ExactSettlementIntent, b5 as X402ExactSettlementNotReadyError, b6 as X402ExactSettlementServer, b7 as X402ExactSettlementServerOpts, b8 as X402ExactSettlementStatus, b9 as X402ExactSettlementStore, ba as X402SettlementChainEvidence, bb as X402SettlementEvidenceReader, bc as X402SettlementSubmissionError, bd as X402_BATCH_AUTO_SETTLEMENT, be as X402_BATCH_MIN_WITHDRAW_DELAY_SECONDS, bf as X402_BATCH_SETTLEMENT_NETWORK, bg as attachCreditMenu, bh as buildCreditMenu, bi as createDVMHost, bj as createX402BatchSettlementServer, bk as creditEnvelopeIgnoreFields, bl as drawSettlementRef, bm as extractCreditEnvelope, bn as fundingCommitment, bo as selectPrimaryCredit, bp as stripCreditEnvelope, bq as toCreditView } from '../credit-menu-enwMbn55.js';
6
6
  import { Context } from 'hono';
7
7
  import { z } from 'zod';
8
- import { F as FxFetcher } from '../fx-CGRJE8rm.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-Cnlv9pOx.js';
10
- export { a as JobStatus, b as JobStore, h as isStreamableJobStore } from '../job-store-Cnlv9pOx.js';
8
+ import { F as FxFetcher } from '../fx-D860pZvP.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-BUGqvCfL.js';
10
+ export { a as JobStatus, b as JobStore, h as isStreamableJobStore } from '../job-store-BUGqvCfL.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-DbFkpDv0.js';
12
12
  import 'mppx';
13
13
  import '@x402/core/server';
@@ -15,7 +15,7 @@ import '@x402/evm/batch-settlement/server';
15
15
  import 'viem';
16
16
  import '@x402/core/types';
17
17
  import '@cashu/cashu-ts';
18
- import '../lightning-backend-KvQM0YHi.js';
18
+ import '../lightning-backend-BozcevPZ.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;
@@ -78,7 +78,7 @@ import {
78
78
  stripProtocolEnvelope,
79
79
  toCreditView,
80
80
  unknownRouteNotFound
81
- } from "../chunk-NJFOV36R.js";
81
+ } from "../chunk-5PBOA25N.js";
82
82
  import {
83
83
  MemoryProcessedPaymentStore,
84
84
  PostgresProcessedPaymentStore,
@@ -147,7 +147,7 @@ import {
147
147
  TEMPO_SETTLEMENT_DEFAULT_LOW_BALANCE_MICRO,
148
148
  TempoSettlementReadiness,
149
149
  resolveTempoNetwork
150
- } from "../chunk-NPIW5VR5.js";
150
+ } from "../chunk-M7LHFJ5K.js";
151
151
 
152
152
  // src/sdk/server/cashu-env.ts
153
153
  async function resolveCashuOptsFromEnv(env, pool, cashuModeHint) {
@@ -1291,7 +1291,7 @@ ${config.facilitatorAuth?.keyId ?? ""}`;
1291
1291
  let tempoChargeBackend = "user-supplied";
1292
1292
  const mppTempoRecipient = envMaybe.DVMKIT_TEMPO_RECIPIENT;
1293
1293
  if (!mpp && mppTempoRecipient) {
1294
- const { createMppFromOpts, createDualKeyMppxFromOpts, parseMppMethodsAllowlist } = await import("../mpp-setup-SPBOF5AM.js");
1294
+ const { createMppFromOpts, createDualKeyMppxFromOpts, parseMppMethodsAllowlist } = await import("../mpp-setup-4FJD6ZHV.js");
1295
1295
  tempoChargeBackend = pgPool ? "postgres" : "memory";
1296
1296
  let tempoCharge;
1297
1297
  if (pgPool) {
@@ -4919,8 +4919,9 @@ declare class PostgresTempoSessionStore implements Store.AtomicStore {
4919
4919
  interface MppOpts {
4920
4920
  /**
4921
4921
  * Tempo recipient (0x-prefixed 40-char hex address). When set, registers
4922
- * `tempo/charge`. Currency defaults to USDC on Tempo mainnet; override via
4923
- * the `DVMKIT_TEMPO_CURRENCY` env var for testnet/devnet deployments.
4922
+ * `tempo/charge`. Supported chains are Tempo mainnet (4217) and Moderato
4923
+ * (42431). Currency defaults per chain; override it with
4924
+ * `DVMKIT_TEMPO_CURRENCY`.
4924
4925
  */
4925
4926
  tempoRecipient?: string;
4926
4927
  /**
@@ -1,5 +1,5 @@
1
- import { Y as JobReceipt, a1 as Message, a2 as MessageType, K as KVStore, L as Logger, u as ResponseContent, P as PaymentContent, S as SDKJobContext } from '../step-cache-CwM_Q8rK.js';
2
- 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-Cnlv9pOx.js';
1
+ import { Y as JobReceipt, a1 as Message, a2 as MessageType, K as KVStore, L as Logger, u as ResponseContent, P as PaymentContent, S as SDKJobContext } from '../step-cache-5dljDqrQ.js';
2
+ 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-BUGqvCfL.js';
3
3
  import 'hono';
4
4
  import 'mppx';
5
5
  import '@x402/core/server';
@@ -1,4 +1,4 @@
1
- import { C as Currency } from './step-cache-CwM_Q8rK.js';
1
+ import { C as Currency } from './step-cache-5dljDqrQ.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.1.5-rc.7",
3
+ "version": "0.1.5-rc.9",
4
4
  "description": "SDK for building accountless, pay-per-use Digital Vending Machines",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {