@dvmkit/sdk 0.13.0 → 0.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1592,6 +1592,56 @@ interface FundingReceipt {
1592
1592
  signature: string;
1593
1593
  }
1594
1594
  type UnsignedFundingReceipt = Omit<FundingReceipt, "signature">;
1595
+ /**
1596
+ * A DVM-signed proof that one rail payment accepted **during a running job**
1597
+ * funded the job's credit while its draw was still pending. Distinct from
1598
+ * {@link FundingReceipt}: that artifact describes an opening or top-up funding
1599
+ * at a committed ledger position, whereas this one binds the funding to the
1600
+ * job, the draw it grew and the payment that carried it, so a caller can prove
1601
+ * which accepted mid-job money belongs to a completed draw and reconcile the
1602
+ * terminal `balance_after` without guessing.
1603
+ *
1604
+ * `funded_micro` is the provider's native credited amount after its own FX
1605
+ * and fee logic — never the caller's request figure. `ledger_seq` is the
1606
+ * **draw's** sequence (growth allocates none), which is what the terminal
1607
+ * `ReceiptCredit.ledger_seq` names, so a consumer can line the two up exactly.
1608
+ * The tuple is fixed inside the rail's commit transaction; retries and later
1609
+ * job reads return the same artifact.
1610
+ */
1611
+ interface DrawFundingReceipt {
1612
+ v: 1;
1613
+ /** Discriminator separating mid-job draw funding from opening funding evidence. */
1614
+ kind: "credit_draw_funding";
1615
+ credit_id: string;
1616
+ /** The job whose pending draw this funding belongs to. */
1617
+ job_id: string;
1618
+ /** The draw the funding was accepted against. */
1619
+ draw_id: string;
1620
+ /** The rail payment id the funding committed under (tx hash, challenge id, request id). */
1621
+ fund_id: string;
1622
+ /** Sequence of the accepted `payment` message, when the job store numbers inbound messages. */
1623
+ payment_seq?: number;
1624
+ /** Currency the credit is denominated in; `funded_micro` is 1e-6 of it. */
1625
+ currency: string;
1626
+ /** Amount credited to the credit by this payment, in micro-units of `currency`. */
1627
+ funded_micro: number;
1628
+ /** Available balance immediately after this funding and any draw growth committed. */
1629
+ balance_after_micro: number;
1630
+ /** The draw's per-credit ledger sequence; growth keeps the placement value. */
1631
+ ledger_seq: number;
1632
+ /** Unix seconds at which the artifact was first issued. */
1633
+ issued_at: number;
1634
+ /** The credit owner's x-only request-signing pubkey. */
1635
+ caller_pubkey: string;
1636
+ /** Immutable DVM identity bound into the builder attestation. */
1637
+ dvm_id: string;
1638
+ /** DVM slug, as bound in the builder attestation. */
1639
+ dvm: string;
1640
+ receipt_pubkey: string;
1641
+ /** BIP-340 Schnorr signature over the canonical receipt minus `signature`. */
1642
+ signature: string;
1643
+ }
1644
+ type UnsignedDrawFundingReceipt = Omit<DrawFundingReceipt, "signature">;
1595
1645
  /**
1596
1646
  * Hash the delivered result so a receipt binds to *what* was returned, not
1597
1647
  * just that something was.
@@ -1650,6 +1700,16 @@ declare function signDrainReceipt(unsigned: UnsignedDrainReceipt, secretHex: str
1650
1700
  declare function signFundingReceipt(unsigned: UnsignedFundingReceipt, secretHex: string): FundingReceipt;
1651
1701
  declare function isFundingReceipt(value: unknown): value is FundingReceipt;
1652
1702
  declare function verifyFundingReceipt(receipt: FundingReceipt): boolean;
1703
+ /** Sign an unsigned draw funding receipt using the common receipt canonicalisation. */
1704
+ declare function signDrawFundingReceipt(unsigned: UnsignedDrawFundingReceipt, secretHex: string): DrawFundingReceipt;
1705
+ /**
1706
+ * Structural guard on a draw funding receipt from outside this process — off a
1707
+ * mid-job payment response, a job read, or back out of `~/.dvm/credits.json`.
1708
+ * Same contract as {@link isFundingReceipt}: the signature covers the whole
1709
+ * canonical body, so refusing a body missing a load-bearing field costs no proof.
1710
+ */
1711
+ declare function isDrawFundingReceipt(value: unknown): value is DrawFundingReceipt;
1712
+ declare function verifyDrawFundingReceipt(receipt: DrawFundingReceipt): boolean;
1653
1713
  /**
1654
1714
  * Structural guard on a drain receipt from outside this process — off a
1655
1715
  * `/v1/credit` drain response, or back out of `~/.dvm/credits.json`.
@@ -3099,6 +3159,10 @@ declare class CreditLedger {
3099
3159
  hostingPaymentSeq?: number;
3100
3160
  hostingInvoicePaymentHash?: string;
3101
3161
  hostingInvoiceRepairPaymentHash?: string;
3162
+ /** Mid-job draw funding bindings, fixed with the row so a replay or read can reissue its evidence. */
3163
+ jobId?: string;
3164
+ drawId?: string;
3165
+ paymentSeq?: number;
3102
3166
  /** External transaction handle — caller owns BEGIN/COMMIT (spec condition 3). */
3103
3167
  tx?: CreditLedgerQuerier;
3104
3168
  nowMs?: number;
@@ -3113,6 +3177,14 @@ declare class CreditLedger {
3113
3177
  creditId: string;
3114
3178
  fundId: string;
3115
3179
  }): Promise<FundingRecord | undefined>;
3180
+ /**
3181
+ * Every funding accepted against one job's draw, oldest first. The order is
3182
+ * stable across reads so a job read lists the same evidence each time.
3183
+ */
3184
+ listDrawFundings(args: {
3185
+ creditId: string;
3186
+ drawId: string;
3187
+ }): Promise<FundingRecord[]>;
3116
3188
  /** Fix the funding-time receipt tuple inside the rail's open transaction. */
3117
3189
  completeFunding(args: {
3118
3190
  creditId: string;
@@ -3126,8 +3198,8 @@ declare class CreditLedger {
3126
3198
  saveFundingReceipt(args: {
3127
3199
  creditId: string;
3128
3200
  fundId: string;
3129
- receipt: FundingReceipt;
3130
- }): Promise<FundingReceipt>;
3201
+ receipt: CreditFundingEvidence;
3202
+ }): Promise<CreditFundingEvidence>;
3131
3203
  /**
3132
3204
  * Record the bolt11 issued for a `(creditId, fundId)` top-up, or
3133
3205
  * return the one already issued for it.
@@ -3686,6 +3758,9 @@ interface CreditLedgerLike {
3686
3758
  hostingPaymentSeq?: number;
3687
3759
  hostingInvoicePaymentHash?: string;
3688
3760
  hostingInvoiceRepairPaymentHash?: string;
3761
+ jobId?: string;
3762
+ drawId?: string;
3763
+ paymentSeq?: number;
3689
3764
  tx?: CreditLedgerQuerier;
3690
3765
  nowMs?: number;
3691
3766
  }): Promise<FundingRecord>;
@@ -3693,6 +3768,15 @@ interface CreditLedgerLike {
3693
3768
  creditId: string;
3694
3769
  fundId: string;
3695
3770
  }): Promise<FundingRecord | undefined>;
3771
+ /**
3772
+ * Fundings accepted mid-job against one draw, oldest first. Optional so existing
3773
+ * custom ledgers keep compiling; without it a DVM cannot recover mid-job funding
3774
+ * evidence on job reads or replayed payments, only on the original acknowledgement.
3775
+ */
3776
+ listDrawFundings?(args: {
3777
+ creditId: string;
3778
+ drawId: string;
3779
+ }): Promise<FundingRecord[]>;
3696
3780
  completeFunding(args: {
3697
3781
  creditId: string;
3698
3782
  fundId: string;
@@ -3704,8 +3788,8 @@ interface CreditLedgerLike {
3704
3788
  saveFundingReceipt(args: {
3705
3789
  creditId: string;
3706
3790
  fundId: string;
3707
- receipt: FundingReceipt;
3708
- }): Promise<FundingReceipt>;
3791
+ receipt: CreditFundingEvidence;
3792
+ }): Promise<CreditFundingEvidence>;
3709
3793
  recordInvoice(args: {
3710
3794
  creditId: string;
3711
3795
  fundId: string;
@@ -4421,6 +4505,11 @@ declare function allocateDrawValue(args: {
4421
4505
  drawMsats: number;
4422
4506
  drawNative: number | null;
4423
4507
  };
4508
+ /**
4509
+ * The signed artifact a funding row holds: an opening or `/v1/credit` funding
4510
+ * receipt, or a mid-job draw funding receipt. Discriminated by `kind`.
4511
+ */
4512
+ type CreditFundingEvidence = FundingReceipt | DrawFundingReceipt;
4424
4513
  interface FundingRecord {
4425
4514
  creditId: string;
4426
4515
  fundId: string;
@@ -4431,9 +4520,17 @@ interface FundingRecord {
4431
4520
  /** Original funding-time tuple, fixed atomically with the ledger credit. */
4432
4521
  callerPubkey: string | null;
4433
4522
  balanceAfterMicro: number | null;
4523
+ /**
4524
+ * The committed ledger position: the credit high-water mark for an opening or
4525
+ * `/v1/credit` funding, the draw's own sequence for a mid-job draw funding.
4526
+ */
4434
4527
  ledgerSeq: number | null;
4435
4528
  /** First signed artifact; write-once so retries are byte-stable. */
4436
- receipt: FundingReceipt | null;
4529
+ receipt: CreditFundingEvidence | null;
4530
+ /** Job, draw and accepted payment message this funding grew; absent on fundings that grew no draw. */
4531
+ jobId?: string | null;
4532
+ drawId?: string | null;
4533
+ paymentSeq?: number | null;
4437
4534
  }
4438
4535
  /**
4439
4536
  * Lifecycle of a Lightning funding invoice.
@@ -6188,4 +6285,4 @@ declare class StepCache {
6188
6285
  static deserialize(records: StepRecord[]): StepCache;
6189
6286
  }
6190
6287
 
6191
- export { type FundingReceipt as $, type ApprovalContent as A, type SignedRequestDomain as B, type Currency as C, type DVMConfig as D, SignedRequestError as E, type SignedRequestFailure as F, type SignedRequestReplayStore as G, type SignedRequestSignOpts as H, type IncomingMessage as I, type JobCost as J, type KVStore as K, type Logger as L, type SignedRequestStatementHeader as M, type SignedRequestVerifier as N, createSignedRequestVerifier as O, type PaymentContent as P, type QuoteConfig as Q, type ResolvedCreditConfig as R, type SDKJobContext as S, isZodSchema as T, UnsupportedCurrencyError as U, signedRequestStatementHeader as V, validateCurrency as W, type JsonValue as X, X402_BATCH_SETTLEMENT_SCHEME as Y, type ZodLike as Z, X402_EXACT_SCHEME as _, type DVMDescriptor as a, isCompleteMessage as a$, type JobReceipt as a0, type MessageType as a1, type X402Version as a2, type MppxCredential as a3, type PaymentRequired as a4, type Message as a5, type MppxChallenge as a6, type ReceiptCredit as a7, type DrainReceipt as a8, type X402Wallet as a9, type UnsignedDrainReceipt as aA, type UnsignedFundingReceipt as aB, type UnsignedJobReceipt as aC, type VerifyResponse as aD, type WorkingContent as aE, type X402Config$1 as aF, type X402ResponseBody as aG, type X402SelfRelayRpcFailureReason as aH, X402_DEFAULT_NETWORK as aI, X402_V1_VERSION as aJ, X402_VERSION as aK, buildPaymentRequiredV2 as aL, buildPaymentRequirements as aM, caip2ToX402Network as aN, canonicalRequestPath as aO, canonicaliseForSigning as aP, canonicalize as aQ, chainIdFromCaip2 as aR, computeResultHash as aS, decodePayment as aT, decodePaymentRequiredHeader as aU, encodePayment as aV, encodePaymentRequiredHeader as aW, encodeSettleResponseHeader as aX, exactEvmAuthorization as aY, isArtifactMessage as aZ, isCancelMessage as a_, type PaymentRequirementsV1 as aa, type PaymentRequirementsV2 as ab, type BuildPaymentRequirementsOpts as ac, type CapabilityDescriptor as ad, type CashuMode as ae, type CompleteContent as af, type DrainReceiptEvent as ag, type ExactEvmPayload as ah, type ExactEvmPayloadAuthorization as ai, type FundingMethod as aj, type MessageFrom as ak, type PaymentPayload as al, type PaymentPayloadV1 as am, type PaymentPayloadV2 as an, type PaymentRequestContent as ao, type PaymentRequiredV2 as ap, type PaymentRequirements as aq, type PromptContent as ar, RAIL_REFUNDABLE as as, type ReceiptOutcome as at, type ReceiptPayment as au, type ResourceInfo as av, type SettleResponse as aw, StepCache as ax, type StepRecord as ay, type TextContent as az, type ArtifactContent as b, type InvoiceSettlement as b$, isDrainReceipt as b0, isFundingReceipt as b1, isPaymentRequestMessage as b2, isPromptMessage as b3, isSignedJobReceipt as b4, isTextMessage as b5, isWorkingMessage as b6, paymentRequiredV2FromV1 as b7, signDrainReceipt as b8, signFundingReceipt as b9, type X402TrackedChannel as bA, _testing as bB, createDefaultReplayStore as bC, depleteLots as bD, fifoOrder as bE, inKindDrawMsats as bF, isInKindDepletion as bG, isNonChannelBitcoinRail as bH, lotOwedSats as bI, netOwedSats as bJ, wrapMppx as bK, type CreditLedgerQuerier as bL, type CreditDrainEnqueue as bM, HostedSettlementReportObligations as bN, type DVMAuthScheme as bO, type CreditLedgerLike as bP, type X402RefundSettlementGate as bQ, type CreditSnapshot as bR, type CreditDrawRefundArgs as bS, type CreditDrawRefundResult as bT, type DrawResult as bU, type X402SettlementStatus as bV, type X402UnresolvedRefund as bW, type GrownDrawResult as bX, type DrawResolution as bY, type FundingRecord as bZ, type CreditInvoiceRecord as b_, signReceipt as ba, usdcContractByCaip2 as bb, usdcContractFor as bc, usdcDomainNameFor as bd, usdcDomainVersionFor as be, verifyDrainReceipt as bf, verifyFundingReceipt as bg, verifyReceipt as bh, x402NetworkToCaip2 as bi, type X402ExactVersionSupport as bj, type X402Receipt as bk, type TransactionalPayoutHook as bl, type CashuMeltCompleted as bm, type CreditDepositPayload as bn, type CreditDrainPayload as bo, type FundingLot as bp, type LotDebit as bq, type LotDepletion as br, type MppxServer as bs, NON_CHANNEL_BITCOIN_RAILS as bt, type NonChannelBitcoinRail as bu, PayoutReporter as bv, PostgresTempoSessionStore as bw, RevenueReporter as bx, SIGNED_ENVELOPE_FIELDS as by, SIGNED_ENVELOPE_TYPES as bz, type CancelContent as c, retryHostedTempoCloseReport as c$, type BlockedInvoiceCursor as c0, type InvoiceReconciliation as c1, type InvoiceWriteOff as c2, type DrawRecord as c3, type StalePendingDrawCursor as c4, type TempoCreditLossEvidence as c5, type TempoCreditLoss as c6, type X402CreditLossEvidence as c7, type X402CreditLoss as c8, type DrainMethod as c9, type DrawRailValue as cA, type DrawStatus as cB, type HostedTempoCloseReportWriteOff as cC, type JobCostReportPayload as cD, type JobTerminalReportPayload as cE, PostgresX402ChannelStorage as cF, type ReplayStoreBackend as cG, type RevenueSkippedNoRailPayload as cH, type RevenueSkippedNoRailReason as cI, type Secp256k1AuthOpts as cJ, type TempoDrainDecision as cK, type TempoDrainDecisionArgs as cL, type TempoDrainDecisionResult as cM, type TempoDrainHoldReason as cN, type X402ChannelStorageOpts as cO, type X402RelayLockHolder as cP, type X402RelaySubmissionLock as cQ, X402RelaySubmissionLockError as cR, allocateDrawValue as cS, clientCompatibilityAttributes as cT, clientCompatibilityMiddleware as cU, clientUpgradeRequired as cV, parseClientCapabilities as cW, parseClientCompatibility as cX, parseDvmClient as cY, parseProtocolVersion as cZ, requireClientCompatibility as c_, type DrainRequestResult as ca, type BitcoinDepositLiability as cb, type CreditDrainRecord as cc, type ChannelDrainCursor as cd, type DrainWriteOff as ce, type DrainTransitionResult as cf, type DrainReleaseResult as cg, type DrainFulfilment as ch, HostingCleanupFence as ci, CLIENT_COMPATIBILITY_HEADERS as cj, type ClientCompatibility as ck, type ClientCompatibilityEnv as cl, type ClientCompatibilityGate as cm, type ClientCompatibilityRequirement as cn, type ClientSemVer as co, type CreditFundingBasis as cp, type CreditInvoiceStatus as cq, CreditLedger as cr, CreditLedgerError as cs, type CreditLedgerErrorCode as ct, type CreditLedgerErrorDetails as cu, type CreditLedgerPool as cv, type CreditStatus as cw, DRAIN_DELIVERY_RESERVE_SATS as cx, DVM_PROTOCOL_VERSION as cy, type DrainConflictReason as cz, type CanonicalEnvelope as d, secp256k1Auth as d0, signedRequestInput as d1, writeOffHostedTempoCloseReport as d2, type HostedIntent as d3, type X402SettlementIntent as d4, type HostedFundingReservation as d5, type X402SettlementCursor as d6, type X402SettlementWriteOff as d7, type X402FacilitatorAuth as d8, type X402BatchSettlementConfig as d9, type X402PayoutObserver as da, type CreditDepositEnqueue as db, type X402SettlementReconciliationReason as dc, type CreditDrawReleaseEnqueue as dd, type CapabilityRate as e, type CreateSignedRequestVerifierOpts as f, type CreditConfig as g, type CreditView as h, DEFAULT_CREDIT_MAX as i, DEFAULT_CREDIT_MIN as j, DEFAULT_CREDIT_TTL_SECONDS as k, DEFAULT_JOB_RETENTION_DAYS as l, type DVMRouteContext as m, type InputType as n, InvalidCurrencyError as o, type PaymentMethod as p, type PriceValue as q, type ProgressContent as r, type PromptOpts as s, type QuoteContext as t, type QuoteResult as u, type ResponseContent as v, type SDKPaymentRequestOpts as w, SIGNED_REQUEST_AUTH_ID as x, SIGNED_REQUEST_STATEMENT_VERSION as y, type SignedRequestAudience as z };
6288
+ export { type DrawFundingReceipt as $, type ApprovalContent as A, type SignedRequestDomain as B, type Currency as C, type DVMConfig as D, SignedRequestError as E, type SignedRequestFailure as F, type SignedRequestReplayStore as G, type SignedRequestSignOpts as H, type IncomingMessage as I, type JobCost as J, type KVStore as K, type Logger as L, type SignedRequestStatementHeader as M, type SignedRequestVerifier as N, createSignedRequestVerifier as O, type PaymentContent as P, type QuoteConfig as Q, type ResolvedCreditConfig as R, type SDKJobContext as S, isZodSchema as T, UnsupportedCurrencyError as U, signedRequestStatementHeader as V, validateCurrency as W, type JsonValue as X, X402_BATCH_SETTLEMENT_SCHEME as Y, type ZodLike as Z, X402_EXACT_SCHEME as _, type DVMDescriptor as a, isArtifactMessage as a$, type FundingReceipt as a0, type JobReceipt as a1, type MessageType as a2, type X402Version as a3, type MppxCredential as a4, type PaymentRequired as a5, type Message as a6, type MppxChallenge as a7, type ReceiptCredit as a8, type DrainReceipt as a9, type TextContent as aA, type UnsignedDrainReceipt as aB, type UnsignedDrawFundingReceipt as aC, type UnsignedFundingReceipt as aD, type UnsignedJobReceipt as aE, type VerifyResponse as aF, type WorkingContent as aG, type X402Config$1 as aH, type X402ResponseBody as aI, type X402SelfRelayRpcFailureReason as aJ, X402_DEFAULT_NETWORK as aK, X402_V1_VERSION as aL, X402_VERSION as aM, buildPaymentRequiredV2 as aN, buildPaymentRequirements as aO, caip2ToX402Network as aP, canonicalRequestPath as aQ, canonicaliseForSigning as aR, canonicalize as aS, chainIdFromCaip2 as aT, computeResultHash as aU, decodePayment as aV, decodePaymentRequiredHeader as aW, encodePayment as aX, encodePaymentRequiredHeader as aY, encodeSettleResponseHeader as aZ, exactEvmAuthorization as a_, type X402Wallet as aa, type PaymentRequirementsV1 as ab, type PaymentRequirementsV2 as ac, type BuildPaymentRequirementsOpts as ad, type CapabilityDescriptor as ae, type CashuMode as af, type CompleteContent as ag, type DrainReceiptEvent as ah, type ExactEvmPayload as ai, type ExactEvmPayloadAuthorization as aj, type FundingMethod as ak, type MessageFrom as al, type PaymentPayload as am, type PaymentPayloadV1 as an, type PaymentPayloadV2 as ao, type PaymentRequestContent as ap, type PaymentRequiredV2 as aq, type PaymentRequirements as ar, type PromptContent as as, RAIL_REFUNDABLE as at, type ReceiptOutcome as au, type ReceiptPayment as av, type ResourceInfo as aw, type SettleResponse as ax, StepCache as ay, type StepRecord as az, type ArtifactContent as b, type X402UnresolvedRefund as b$, isCancelMessage as b0, isCompleteMessage as b1, isDrainReceipt as b2, isDrawFundingReceipt as b3, isFundingReceipt as b4, isPaymentRequestMessage as b5, isPromptMessage as b6, isSignedJobReceipt as b7, isTextMessage as b8, isWorkingMessage as b9, PayoutReporter as bA, PostgresTempoSessionStore as bB, RevenueReporter as bC, SIGNED_ENVELOPE_FIELDS as bD, SIGNED_ENVELOPE_TYPES as bE, type X402TrackedChannel as bF, _testing as bG, createDefaultReplayStore as bH, depleteLots as bI, fifoOrder as bJ, inKindDrawMsats as bK, isInKindDepletion as bL, isNonChannelBitcoinRail as bM, lotOwedSats as bN, netOwedSats as bO, wrapMppx as bP, type CreditLedgerQuerier as bQ, type CreditDrainEnqueue as bR, HostedSettlementReportObligations as bS, type DVMAuthScheme as bT, type CreditLedgerLike as bU, type X402RefundSettlementGate as bV, type CreditSnapshot as bW, type CreditDrawRefundArgs as bX, type CreditDrawRefundResult as bY, type DrawResult as bZ, type X402SettlementStatus as b_, paymentRequiredV2FromV1 as ba, signDrainReceipt as bb, signDrawFundingReceipt as bc, signFundingReceipt as bd, signReceipt as be, usdcContractByCaip2 as bf, usdcContractFor as bg, usdcDomainNameFor as bh, usdcDomainVersionFor as bi, verifyDrainReceipt as bj, verifyDrawFundingReceipt as bk, verifyFundingReceipt as bl, verifyReceipt as bm, x402NetworkToCaip2 as bn, type X402ExactVersionSupport as bo, type X402Receipt as bp, type TransactionalPayoutHook as bq, type CashuMeltCompleted as br, type CreditDepositPayload as bs, type CreditDrainPayload as bt, type FundingLot as bu, type LotDebit as bv, type LotDepletion as bw, type MppxServer as bx, NON_CHANNEL_BITCOIN_RAILS as by, type NonChannelBitcoinRail as bz, type CancelContent as c, clientUpgradeRequired as c$, type GrownDrawResult as c0, type DrawResolution as c1, type FundingRecord as c2, type CreditFundingEvidence as c3, type CreditInvoiceRecord as c4, type InvoiceSettlement as c5, type BlockedInvoiceCursor as c6, type InvoiceReconciliation as c7, type InvoiceWriteOff as c8, type DrawRecord as c9, type CreditLedgerErrorDetails as cA, type CreditLedgerPool as cB, type CreditStatus as cC, DRAIN_DELIVERY_RESERVE_SATS as cD, DVM_PROTOCOL_VERSION as cE, type DrainConflictReason as cF, type DrawRailValue as cG, type DrawStatus as cH, type HostedTempoCloseReportWriteOff as cI, type JobCostReportPayload as cJ, type JobTerminalReportPayload as cK, PostgresX402ChannelStorage as cL, type ReplayStoreBackend as cM, type RevenueSkippedNoRailPayload as cN, type RevenueSkippedNoRailReason as cO, type Secp256k1AuthOpts as cP, type TempoDrainDecision as cQ, type TempoDrainDecisionArgs as cR, type TempoDrainDecisionResult as cS, type TempoDrainHoldReason as cT, type X402ChannelStorageOpts as cU, type X402RelayLockHolder as cV, type X402RelaySubmissionLock as cW, X402RelaySubmissionLockError as cX, allocateDrawValue as cY, clientCompatibilityAttributes as cZ, clientCompatibilityMiddleware as c_, type StalePendingDrawCursor as ca, type TempoCreditLossEvidence as cb, type TempoCreditLoss as cc, type X402CreditLossEvidence as cd, type X402CreditLoss as ce, type DrainMethod as cf, type DrainRequestResult as cg, type BitcoinDepositLiability as ch, type CreditDrainRecord as ci, type ChannelDrainCursor as cj, type DrainWriteOff as ck, type DrainTransitionResult as cl, type DrainReleaseResult as cm, type DrainFulfilment as cn, HostingCleanupFence as co, CLIENT_COMPATIBILITY_HEADERS as cp, type ClientCompatibility as cq, type ClientCompatibilityEnv as cr, type ClientCompatibilityGate as cs, type ClientCompatibilityRequirement as ct, type ClientSemVer as cu, type CreditFundingBasis as cv, type CreditInvoiceStatus as cw, CreditLedger as cx, CreditLedgerError as cy, type CreditLedgerErrorCode as cz, type CanonicalEnvelope as d, parseClientCapabilities as d0, parseClientCompatibility as d1, parseDvmClient as d2, parseProtocolVersion as d3, requireClientCompatibility as d4, retryHostedTempoCloseReport as d5, secp256k1Auth as d6, signedRequestInput as d7, writeOffHostedTempoCloseReport as d8, type HostedIntent as d9, type X402SettlementIntent as da, type HostedFundingReservation as db, type X402SettlementCursor as dc, type X402SettlementWriteOff as dd, type X402FacilitatorAuth as de, type X402BatchSettlementConfig as df, type X402PayoutObserver as dg, type CreditDepositEnqueue as dh, type X402SettlementReconciliationReason as di, type CreditDrawReleaseEnqueue as dj, type CapabilityRate as e, type CreateSignedRequestVerifierOpts as f, type CreditConfig as g, type CreditView as h, DEFAULT_CREDIT_MAX as i, DEFAULT_CREDIT_MIN as j, DEFAULT_CREDIT_TTL_SECONDS as k, DEFAULT_JOB_RETENTION_DAYS as l, type DVMRouteContext as m, type InputType as n, InvalidCurrencyError as o, type PaymentMethod as p, type PriceValue as q, type ProgressContent as r, type PromptOpts as s, type QuoteContext as t, type QuoteResult as u, type ResponseContent as v, type SDKPaymentRequestOpts as w, SIGNED_REQUEST_AUTH_ID as x, SIGNED_REQUEST_STATEMENT_VERSION as y, type SignedRequestAudience as z };
@@ -1,6 +1,6 @@
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';
1
+ import { C as ContentHoldHistory, a as ContentHoldMutation } from '../content-retention-BcHNpP2F.js';
2
+ import { a1 as JobReceipt, a6 as Message, a2 as MessageType, K as KVStore, L as Logger, v as ResponseContent, P as PaymentContent, S as SDKJobContext } from '../step-cache-CoORQQ_Y.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-DVCATwhU.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-WUig1cx-.js';
1
+ import { C as Currency } from './step-cache-CoORQQ_Y.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.13.0",
3
+ "version": "0.14.1",
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": [