@dvmkit/sdk 0.16.2 → 0.17.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.
- package/dist/{chunk-XSF5YTEY.js → chunk-2PN4DKZW.js} +1 -1
- package/dist/{chunk-F2LNWZCV.js → chunk-3KRFFLAT.js} +1 -1
- package/dist/{chunk-V73WRF46.js → chunk-5CCQEAQV.js} +1 -1
- package/dist/{chunk-4IFZHJQK.js → chunk-5RLNRLLB.js} +1 -1
- package/dist/{chunk-7QGS27UT.js → chunk-72A4PHLD.js} +1 -1
- package/dist/{chunk-XBQTFOIT.js → chunk-7RWE6ELV.js} +1 -1
- package/dist/{chunk-N4SBDUVD.js → chunk-A6EY4K46.js} +1 -1
- package/dist/{chunk-5U2RG3ZW.js → chunk-ALTE7I6C.js} +5 -0
- package/dist/{chunk-K4ZQE7IB.js → chunk-B5MPLDRC.js} +2 -2
- package/dist/{chunk-PP5WHB6T.js → chunk-C5XNZLZ7.js} +1 -1
- package/dist/{chunk-2UZOJRRS.js → chunk-CVN2YNMG.js} +1 -1
- package/dist/{chunk-MD34LE6M.js → chunk-CXRI4N4Y.js} +1 -1
- package/dist/{chunk-ELNWQS24.js → chunk-EIDRCGTY.js} +1 -1
- package/dist/{chunk-ICHC4VDZ.js → chunk-KRX7VNBG.js} +1 -1
- package/dist/{chunk-TN6MWTZI.js → chunk-LY2JYSJS.js} +1 -1
- package/dist/{chunk-7N5VDCG3.js → chunk-MWDUGMN2.js} +2 -2
- package/dist/{chunk-FRGKANTZ.js → chunk-ORBWKYDE.js} +1 -1
- package/dist/{chunk-VQHBJXBL.js → chunk-QTKGFG3I.js} +1 -1
- package/dist/{chunk-PBT3H2LZ.js → chunk-RX6FT7XA.js} +1 -1
- package/dist/{chunk-OYBSDJR6.js → chunk-VKFR5PCW.js} +2 -2
- package/dist/{chunk-V4CBI5HB.js → chunk-Y6JJDOGO.js} +1 -1
- package/dist/{chunk-KERFCBT7.js → chunk-YRQMDRI4.js} +502 -129
- package/dist/{content-retention-BASsjgKw.d.ts → content-retention-B_hOQS36.d.ts} +1 -1
- package/dist/{credit-ledger-VWZ5NP7V.js → credit-ledger-5HMJ6VUX.js} +3 -3
- package/dist/{credit-menu-BfXaeHgR.d.ts → credit-menu-D-h0zJCZ.d.ts} +42 -10
- package/dist/{fx-BmvWGISH.d.ts → fx-CpqQaIfg.d.ts} +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +4 -4
- package/dist/internal/caller.d.ts +14 -8
- package/dist/internal/caller.js +7 -7
- package/dist/internal/server.d.ts +7 -7
- package/dist/internal/server.js +20 -20
- package/dist/{job-store-CA7u1nHV.d.ts → job-store-CgXT79tS.d.ts} +1 -1
- package/dist/{lightning-backend-BOcopzXk.d.ts → lightning-backend-B1hRUIOb.d.ts} +1 -1
- package/dist/{memory-credit-ledger-DZWRQGSF.js → memory-credit-ledger-ME6FH462.js} +4 -4
- package/dist/{mpp-setup-3NJY354I.js → mpp-setup-BLIYBORK.js} +3 -3
- package/dist/{payout-reporter-P3652TLG.js → payout-reporter-5QAHCYIO.js} +2 -2
- package/dist/{postgres-consumed-credential-store-S2CBQ4NO.js → postgres-consumed-credential-store-4PCJEZBD.js} +1 -1
- package/dist/{postgres-job-store-JRSG54VJ.js → postgres-job-store-E5GXLRB4.js} +2 -2
- package/dist/{postgres-replay-store-ZPILIJIW.js → postgres-replay-store-GH5AINQR.js} +2 -2
- package/dist/{pricing-3P7KAONY.js → pricing-JJYLTTWK.js} +3 -3
- package/dist/{revenue-reporter-2P3PWJJM.js → revenue-reporter-6XARUEG6.js} +2 -2
- package/dist/server/index.d.ts +10 -10
- package/dist/server/index.js +32 -31
- package/dist/{step-cache-BCRHimiY.d.ts → step-cache-Bezn-_ZL.d.ts} +41 -3
- package/dist/{tempo-charge-store-2LK6IDLS.js → tempo-charge-store-A3CDF7D5.js} +2 -2
- package/dist/{tempo-session-store-5MHCH3YW.js → tempo-session-store-EWBE5HJM.js} +3 -3
- package/dist/testing/index.d.ts +3 -3
- package/dist/testing/index.js +6 -6
- package/dist/{usd-B8_WMfHT.d.ts → usd-CJwU3-A4.d.ts} +1 -1
- package/dist/{x402-6T73AZQ6.js → x402-HVCUEWWU.js} +3 -3
- package/package.json +1 -1
|
@@ -10,14 +10,14 @@ import {
|
|
|
10
10
|
isDrainMethod,
|
|
11
11
|
isFundingRail,
|
|
12
12
|
x402SettlementPending
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-B5MPLDRC.js";
|
|
14
14
|
import "./chunk-YG7G4DPZ.js";
|
|
15
15
|
import "./chunk-COYKJRMM.js";
|
|
16
16
|
import "./chunk-5UC7TOQC.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-EIDRCGTY.js";
|
|
18
18
|
import "./chunk-BPYMEMQX.js";
|
|
19
19
|
import "./chunk-H3GGFEE5.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-ALTE7I6C.js";
|
|
21
21
|
export {
|
|
22
22
|
CreditLedger,
|
|
23
23
|
CreditLedgerError,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { f as LockPubkey, e as CheckMintHealthOptions, b as LightningBackend, A as AttestationPayload } from './lightning-backend-
|
|
2
|
-
import { cp as HostingCleanupFence, da as HostedIntent, al as FundingMethod, p as PaymentMethod, bV as CreditLedgerLike, a7 as Message, O as UpfrontPayment, a1 as FundingReceipt, bX as CreditSnapshot, a2 as JobReceipt, S as SDKJobContext, az as StepCache, v as ResponseContent, P as PaymentContent, a3 as MessageType, bq as X402Receipt, aI as X402Config, bp as X402ExactVersionSupport, db as X402SettlementIntent, ad as PaymentRequirementsV2, dc as HostedFundingReservation, bR as CreditLedgerQuerier, dd as X402SettlementCursor, b$ as X402SettlementStatus, de as X402SettlementWriteOff, bW as X402RefundSettlementGate, df as X402FacilitatorAuth, dg as X402BatchSettlementConfig, cM as PostgresX402ChannelStorage, dh as X402PayoutObserver, bT as HostedSettlementReportObligations, bt as CreditDepositPayload, by as MppxServer, ag as CashuMode, di as CreditDepositEnqueue, dj as X402SettlementReconciliationReason, as as PaymentRequirements, c3 as FundingRecord, a5 as MppxCredential, b_ as DrawResult, cz as CreditLedgerError, a9 as ReceiptCredit, ai as DrainReceiptEvent, aa as DrainReceipt, a0 as DrawFundingReceipt, K as KVStore, z as SignedRequestAudience, dk as CreditDrawReleaseEnqueue, cK as JobCostReportPayload, cL as JobTerminalReportPayload, cO as RevenueSkippedNoRailPayload, Z as ZodLike, a as DVMDescriptor, c5 as CreditInvoiceRecord, c6 as InvoiceSettlement, ct as ClientCompatibilityGate, cr as ClientCompatibility, bC as PostgresTempoSessionStore, bB as PayoutReporter, R as ResolvedCreditConfig, h as CreditView } from './step-cache-
|
|
1
|
+
import { f as LockPubkey, e as CheckMintHealthOptions, b as LightningBackend, A as AttestationPayload } from './lightning-backend-B1hRUIOb.js';
|
|
2
|
+
import { cp as HostingCleanupFence, da as HostedIntent, al as FundingMethod, p as PaymentMethod, bV as CreditLedgerLike, a7 as Message, O as UpfrontPayment, a1 as FundingReceipt, bX as CreditSnapshot, a2 as JobReceipt, S as SDKJobContext, az as StepCache, v as ResponseContent, P as PaymentContent, a3 as MessageType, bq as X402Receipt, aI as X402Config, bp as X402ExactVersionSupport, db as X402SettlementIntent, ad as PaymentRequirementsV2, dc as HostedFundingReservation, bR as CreditLedgerQuerier, dd as X402SettlementCursor, b$ as X402SettlementStatus, de as X402SettlementWriteOff, bW as X402RefundSettlementGate, df as X402FacilitatorAuth, dg as X402BatchSettlementConfig, cM as PostgresX402ChannelStorage, dh as X402PayoutObserver, bT as HostedSettlementReportObligations, bt as CreditDepositPayload, by as MppxServer, ag as CashuMode, di as CreditDepositEnqueue, dj as X402SettlementReconciliationReason, as as PaymentRequirements, c3 as FundingRecord, a5 as MppxCredential, b_ as DrawResult, cz as CreditLedgerError, a9 as ReceiptCredit, ai as DrainReceiptEvent, aa as DrainReceipt, a0 as DrawFundingReceipt, K as KVStore, z as SignedRequestAudience, dk as CreditDrawReleaseEnqueue, cK as JobCostReportPayload, cL as JobTerminalReportPayload, cO as RevenueSkippedNoRailPayload, Z as ZodLike, a as DVMDescriptor, c5 as CreditInvoiceRecord, c6 as InvoiceSettlement, ct as ClientCompatibilityGate, cr as ClientCompatibility, bC as PostgresTempoSessionStore, bB as PayoutReporter, R as ResolvedCreditConfig, h as CreditView } from './step-cache-Bezn-_ZL.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-
|
|
6
|
+
import { d as FxSourceFailure, b as FxRateSnapshot, F as FxFetcher } from './fx-CpqQaIfg.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-
|
|
8
|
+
import { T as TopUpCapUnenforcedReason, A as AppendOutgoingOptions, J as JobRecord, b as JobStore } from './job-store-CgXT79tS.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';
|
|
@@ -339,8 +339,8 @@ interface PaidJobCompletion {
|
|
|
339
339
|
/** Typed transaction boundary; proof ownership and accounting commit together. */
|
|
340
340
|
interface DisposableCashuCommit {
|
|
341
341
|
commit(requestId: string, proofs: Proof[], account: (ledger: CreditLedgerLike) => Promise<void>): Promise<void>;
|
|
342
|
-
/**
|
|
343
|
-
|
|
342
|
+
/** The request id each secret was committed under, index-aligned; `undefined` where not committed. */
|
|
343
|
+
acceptedRequestIds(secrets: string[]): Promise<(string | undefined)[]>;
|
|
344
344
|
}
|
|
345
345
|
|
|
346
346
|
interface CreditExpirySweepOpts {
|
|
@@ -1161,7 +1161,7 @@ declare class MemoryProcessedPaymentStore implements ProcessedPaymentStore {
|
|
|
1161
1161
|
* so the payment-error builder in `payment.ts` folds them into `PaymentErrorCode`
|
|
1162
1162
|
* and keeps display/hint/retryable copy in lockstep with this union.
|
|
1163
1163
|
*/
|
|
1164
|
-
type AccumulatorRejectionCode = "missing_request_id" | "missing_lock_pubkey" | "not_p2pk_locked" | "wrong_lock_pubkey" | "lock_not_exclusive" | "proof_not_unspent" | "proof_pending" | "replay_rejected" | "mint_unreachable" | "invalid_token";
|
|
1164
|
+
type AccumulatorRejectionCode = "missing_request_id" | "reserved_request_id" | "missing_lock_pubkey" | "not_p2pk_locked" | "wrong_lock_pubkey" | "lock_not_exclusive" | "proof_not_unspent" | "proof_pending" | "replay_rejected" | "request_id_reused" | "mint_unreachable" | "invalid_token";
|
|
1165
1165
|
|
|
1166
1166
|
type X402ExactSettlementStatus = "prepared" | "submitting" | "settled" | "local_committed" | "ambiguous" | "rejected" | "complete";
|
|
1167
1167
|
/** Serializable local economic effect that follows an exact settlement. */
|
|
@@ -1966,6 +1966,19 @@ interface UpfrontPaymentOpts {
|
|
|
1966
1966
|
lockPubkeys?: LockPubkey[];
|
|
1967
1967
|
/** UUIDv4 from `X-Cashu-Request-Id` header. */
|
|
1968
1968
|
requestId?: string;
|
|
1969
|
+
/**
|
|
1970
|
+
* Per-call Cashu the NUT-24 way, for a `POST /v1/job` the payer could pay
|
|
1971
|
+
* without signing. The unpaid 402 then carries the `X-Cashu` payment request
|
|
1972
|
+
* for `mints` (the health-filtered list `/v1/info` advertises), and a token
|
|
1973
|
+
* sent without {@link requestId} is accepted under the id derived from its
|
|
1974
|
+
* proofs. Such a payment's payer-fixable refusals answer 400, and it may
|
|
1975
|
+
* cover `previousRequiredMsats`, the same price at the rate snapshot before
|
|
1976
|
+
* the current one, so a 402 priced just before a rate refresh stays payable.
|
|
1977
|
+
*/
|
|
1978
|
+
nut24?: {
|
|
1979
|
+
mints: string[];
|
|
1980
|
+
previousRequiredMsats?: number;
|
|
1981
|
+
};
|
|
1969
1982
|
/**
|
|
1970
1983
|
* Runtime mint-health tracker. Receive path short-circuits with
|
|
1971
1984
|
* `cashu_mint_sick` when the token's mint is currently flagged sick, so
|
|
@@ -2086,6 +2099,12 @@ interface PaymentErrorDetail {
|
|
|
2086
2099
|
* decide whether a 402 is correctable.
|
|
2087
2100
|
*/
|
|
2088
2101
|
x402ErrorCode?: string;
|
|
2102
|
+
/**
|
|
2103
|
+
* NUT-18 payment request for the `X-Cashu` response header. Set only on the
|
|
2104
|
+
* unpaid `payment_required` 402 of a NUT-24 request, never on a refusal, so
|
|
2105
|
+
* a wallet that pays every `X-Cashu` 402 automatically never pays twice.
|
|
2106
|
+
*/
|
|
2107
|
+
cashuPaymentRequest?: string;
|
|
2089
2108
|
/**
|
|
2090
2109
|
* On a `replay_rejected` from the x402/mpp processed-payment marker
|
|
2091
2110
|
* the payment id the original funding committed under. The
|
|
@@ -2260,7 +2279,7 @@ declare function verifyTempoSessionManagementCredential(args: {
|
|
|
2260
2279
|
* here: the former is already complete, the latter is a challenge envelope, not
|
|
2261
2280
|
* an error report.
|
|
2262
2281
|
*/
|
|
2263
|
-
type PaymentErrorCode = "payment_invalid" | "x402_not_offered" | "x402_settlement_ambiguous" | "cashu_unavailable" | "cashu_not_p2pk_locked" | "mint_health_pending" | "cashu_mint_sick" | "payment_insufficient" | "payment_unapplied" | "insufficient_credit" | "credit_expired" | "credit_unbacked" | "credit_not_found" | "tempo_channel_closing" | "settlement_pending" | "draw_conflict" | "funding_commitment_mismatch" | "credit_not_supported" | "one_shot_credit_not_supported" | "credit_below_min" | "below_rail_minimum" | "credit_over_max" | "credit_id_unavailable" | "nothing_to_drain" | "drain_below_dust" | "drain_not_found" | "drain_conflict" | "drain_method_unsupported" | "tempo_channel_exit_required" | "x402_settlement_submission_failed" | X402SettlementReconciliationReason | "lightning_settlement_pending" | "lightning_invoice_expired" | "lightning_unavailable" | AccumulatorRejectionCode;
|
|
2282
|
+
type PaymentErrorCode = "payment_invalid" | "x402_not_offered" | "payment_method_requires_signature" | "x402_settlement_ambiguous" | "cashu_unavailable" | "cashu_not_p2pk_locked" | "mint_health_pending" | "cashu_mint_sick" | "payment_insufficient" | "payment_unapplied" | "insufficient_credit" | "credit_expired" | "credit_unbacked" | "credit_not_found" | "tempo_channel_closing" | "settlement_pending" | "draw_conflict" | "funding_commitment_mismatch" | "credit_not_supported" | "one_shot_credit_not_supported" | "credit_below_min" | "below_rail_minimum" | "credit_over_max" | "credit_id_unavailable" | "nothing_to_drain" | "drain_below_dust" | "drain_not_found" | "drain_conflict" | "drain_method_unsupported" | "tempo_channel_exit_required" | "x402_settlement_submission_failed" | X402SettlementReconciliationReason | "lightning_settlement_pending" | "lightning_invoice_expired" | "lightning_unavailable" | AccumulatorRejectionCode;
|
|
2264
2283
|
/**
|
|
2265
2284
|
* Per-code display, hint and retryability may be overridden for a particular
|
|
2266
2285
|
* refusal. Keep the hint and retry decision consistent. Extra fields merge
|
|
@@ -3049,8 +3068,9 @@ declare class JobManager<State, InputSchema extends ZodLike | undefined> {
|
|
|
3049
3068
|
* `"$X.XX"` is parsed as USD and converted via the SDK's shared fx fetcher.
|
|
3050
3069
|
* Returns `undefined` for dynamic-priced capabilities (those that declare
|
|
3051
3070
|
* `onQuote`) — the caller falls back to `computeDynamicPrice` in that path.
|
|
3071
|
+
* A caller that already holds the snapshot it prices at passes it as `fx`.
|
|
3052
3072
|
*/
|
|
3053
|
-
currentPriceMsats(capability: string): Promise<number | undefined>;
|
|
3073
|
+
currentPriceMsats(capability: string, fx?: FxRateSnapshot): Promise<number | undefined>;
|
|
3054
3074
|
/**
|
|
3055
3075
|
* Translate a capability's static `price` into the fiat envelope used by
|
|
3056
3076
|
* the per-capability `pricing.max` advertised on `/v1/info`.
|
|
@@ -3081,11 +3101,23 @@ declare class JobManager<State, InputSchema extends ZodLike | undefined> {
|
|
|
3081
3101
|
* explicit draw as an unknown key, before the envelope was even extracted.
|
|
3082
3102
|
* The persisted `record.input` the reactivation path re-reads is the
|
|
3083
3103
|
* pre-Zod wire form, so it comes through the second branch carrying them too.
|
|
3104
|
+
*
|
|
3105
|
+
* `unsigned` validates against the schema without its envelope fields; pass
|
|
3106
|
+
* it only when {@link unsignedPaidInput} accepted the same body.
|
|
3084
3107
|
*/
|
|
3085
3108
|
parseInput(body: {
|
|
3086
3109
|
input?: string;
|
|
3087
3110
|
data?: unknown;
|
|
3088
|
-
}, capability: string): unknown;
|
|
3111
|
+
}, capability: string, unsigned?: boolean): unknown;
|
|
3112
|
+
/**
|
|
3113
|
+
* Whether this body takes the unsigned paid path: the auth scheme allows it,
|
|
3114
|
+
* the raw input carries no envelope field, and the capability schema can be
|
|
3115
|
+
* narrowed to exclude the envelope. Otherwise the signed path applies.
|
|
3116
|
+
*/
|
|
3117
|
+
unsignedPaidInput(body: {
|
|
3118
|
+
input?: string;
|
|
3119
|
+
data?: unknown;
|
|
3120
|
+
}, capability: string): boolean;
|
|
3089
3121
|
/**
|
|
3090
3122
|
* Look up the per-capability descriptor by name. Throws when the
|
|
3091
3123
|
* name doesn't exist — the route layer validates body.capability first, so
|
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-
|
|
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 UpfrontPayment, T as createSignedRequestVerifier, V as isZodSchema, W as signedRequestStatementHeader, X as validateCurrency } from './step-cache-
|
|
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-
|
|
4
|
-
export { I as InvalidFxRateError, f as fiatToSatsCeil, a as formatFiat, b as formatUsd, r as roundUsd, s as satsToFiat } from './usd-
|
|
5
|
-
export { J as JobRecord, a as JobStatus, b as JobStore } from './job-store-
|
|
1
|
+
import { C as Currency, Z as ZodLike, D as DVMConfig, a as DVMDescriptor } from './step-cache-Bezn-_ZL.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 UpfrontPayment, T as createSignedRequestVerifier, V as isZodSchema, W as signedRequestStatementHeader, X as validateCurrency } from './step-cache-Bezn-_ZL.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-CpqQaIfg.js';
|
|
4
|
+
export { I as InvalidFxRateError, f as fiatToSatsCeil, a as formatFiat, b as formatUsd, r as roundUsd, s as satsToFiat } from './usd-CJwU3-A4.js';
|
|
5
|
+
export { J as JobRecord, a as JobStatus, b as JobStore } from './job-store-CgXT79tS.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-
|
|
13
|
+
} from "./chunk-5CCQEAQV.js";
|
|
14
14
|
import {
|
|
15
15
|
DEFAULT_CREDIT_MAX,
|
|
16
16
|
DEFAULT_CREDIT_MIN,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-SXL44PL5.js";
|
|
24
24
|
import {
|
|
25
25
|
buildUpfront
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-RX6FT7XA.js";
|
|
27
27
|
import {
|
|
28
28
|
DEFAULT_FX_CURRENCIES,
|
|
29
29
|
DEFAULT_FX_RATE_SOURCE,
|
|
@@ -41,9 +41,9 @@ import {
|
|
|
41
41
|
roundUsd,
|
|
42
42
|
satsToFiat,
|
|
43
43
|
validateCurrency
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-72A4PHLD.js";
|
|
45
45
|
import "./chunk-H3GGFEE5.js";
|
|
46
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-ALTE7I6C.js";
|
|
47
47
|
|
|
48
48
|
// src/sdk/configure.ts
|
|
49
49
|
function configureDVM(config) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Y as JsonValue, B as SignedRequestDomain, M as SignedRequestStatementHeader, _ as X402_BATCH_SETTLEMENT_SCHEME, $ as X402_EXACT_SCHEME, a0 as DrawFundingReceipt, a1 as FundingReceipt, a2 as JobReceipt$1, O as UpfrontPayment, a3 as MessageType, a4 as X402Version, a5 as MppxCredential, z as SignedRequestAudience, a6 as PaymentRequired, a7 as Message, a8 as MppxChallenge, a9 as ReceiptCredit, aa as DrainReceipt, C as Currency, ab as X402Wallet, ac as PaymentRequirementsV1, ad as PaymentRequirementsV2, L as Logger$1, K as KVStore } from '../step-cache-
|
|
2
|
-
export { ae as BuildPaymentRequirementsOpts, af as CapabilityDescriptor, ag as CashuMode, ah as CompleteContent, ai as DrainReceiptEvent, aj as ExactEvmPayload, ak as ExactEvmPayloadAuthorization, al as FundingMethod, am as MessageFrom, an as PaymentPayload, ao as PaymentPayloadV1, ap as PaymentPayloadV2, aq as PaymentRequestContent, ar as PaymentRequiredV2, as as PaymentRequirements, at as PromptContent, au as RAIL_REFUNDABLE, av as ReceiptOutcome, aw as ReceiptPayment, ax as ResourceInfo, ay as SettleResponse, az as StepCache, aA as StepRecord, aB as TextContent, aC as UnsignedDrainReceipt, aD as UnsignedDrawFundingReceipt, aE as UnsignedFundingReceipt, aF as UnsignedJobReceipt, aG as VerifyResponse, aH as WorkingContent, aI as X402Config, aJ as X402ResponseBody, aK as X402SelfRelayRpcFailureReason, aL as X402_DEFAULT_NETWORK, aM as X402_V1_VERSION, aN as X402_VERSION, aO as buildPaymentRequiredV2, aP as buildPaymentRequirements, aQ as caip2ToX402Network, aR as canonicalRequestPath, aS as canonicaliseForSigning, aT as canonicalize, aU as chainIdFromCaip2, aV as computeResultHash, aW as decodePayment, aX as decodePaymentRequiredHeader, aY as encodePayment, aZ as encodePaymentRequiredHeader, a_ as encodeSettleResponseHeader, a$ as exactEvmAuthorization, b0 as isArtifactMessage, b1 as isCancelMessage, b2 as isCompleteMessage, b3 as isDrainReceipt, b4 as isDrawFundingReceipt, b5 as isFundingReceipt, b6 as isPaymentRequestMessage, b7 as isPromptMessage, b8 as isSignedJobReceipt, b9 as isTextMessage, ba as isWorkingMessage, bb as paymentRequiredV2FromV1, bc as signDrainReceipt, bd as signDrawFundingReceipt, be as signFundingReceipt, bf as signReceipt, bg as usdcContractByCaip2, bh as usdcContractFor, bi as usdcDomainNameFor, bj as usdcDomainVersionFor, bk as verifyDrainReceipt, bl as verifyDrawFundingReceipt, bm as verifyFundingReceipt, bn as verifyReceipt, bo as x402NetworkToCaip2 } from '../step-cache-
|
|
3
|
-
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-
|
|
4
|
-
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-
|
|
1
|
+
import { Y as JsonValue, B as SignedRequestDomain, M as SignedRequestStatementHeader, _ as X402_BATCH_SETTLEMENT_SCHEME, $ as X402_EXACT_SCHEME, a0 as DrawFundingReceipt, a1 as FundingReceipt, a2 as JobReceipt$1, O as UpfrontPayment, a3 as MessageType, a4 as X402Version, a5 as MppxCredential, z as SignedRequestAudience, a6 as PaymentRequired, a7 as Message, a8 as MppxChallenge, a9 as ReceiptCredit, aa as DrainReceipt, C as Currency, ab as X402Wallet, ac as PaymentRequirementsV1, ad as PaymentRequirementsV2, L as Logger$1, K as KVStore } from '../step-cache-Bezn-_ZL.js';
|
|
2
|
+
export { ae as BuildPaymentRequirementsOpts, af as CapabilityDescriptor, ag as CashuMode, ah as CompleteContent, ai as DrainReceiptEvent, aj as ExactEvmPayload, ak as ExactEvmPayloadAuthorization, al as FundingMethod, am as MessageFrom, an as PaymentPayload, ao as PaymentPayloadV1, ap as PaymentPayloadV2, aq as PaymentRequestContent, ar as PaymentRequiredV2, as as PaymentRequirements, at as PromptContent, au as RAIL_REFUNDABLE, av as ReceiptOutcome, aw as ReceiptPayment, ax as ResourceInfo, ay as SettleResponse, az as StepCache, aA as StepRecord, aB as TextContent, aC as UnsignedDrainReceipt, aD as UnsignedDrawFundingReceipt, aE as UnsignedFundingReceipt, aF as UnsignedJobReceipt, aG as VerifyResponse, aH as WorkingContent, aI as X402Config, aJ as X402ResponseBody, aK as X402SelfRelayRpcFailureReason, aL as X402_DEFAULT_NETWORK, aM as X402_V1_VERSION, aN as X402_VERSION, aO as buildPaymentRequiredV2, aP as buildPaymentRequirements, aQ as caip2ToX402Network, aR as canonicalRequestPath, aS as canonicaliseForSigning, aT as canonicalize, aU as chainIdFromCaip2, aV as computeResultHash, aW as decodePayment, aX as decodePaymentRequiredHeader, aY as encodePayment, aZ as encodePaymentRequiredHeader, a_ as encodeSettleResponseHeader, a$ as exactEvmAuthorization, b0 as isArtifactMessage, b1 as isCancelMessage, b2 as isCompleteMessage, b3 as isDrainReceipt, b4 as isDrawFundingReceipt, b5 as isFundingReceipt, b6 as isPaymentRequestMessage, b7 as isPromptMessage, b8 as isSignedJobReceipt, b9 as isTextMessage, ba as isWorkingMessage, bb as paymentRequiredV2FromV1, bc as signDrainReceipt, bd as signDrawFundingReceipt, be as signFundingReceipt, bf as signReceipt, bg as usdcContractByCaip2, bh as usdcContractFor, bi as usdcDomainNameFor, bj as usdcDomainVersionFor, bk as verifyDrainReceipt, bl as verifyDrawFundingReceipt, bm as verifyFundingReceipt, bn as verifyReceipt, bo as x402NetworkToCaip2 } from '../step-cache-Bezn-_ZL.js';
|
|
3
|
+
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-B1hRUIOb.js';
|
|
4
|
+
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-B1hRUIOb.js';
|
|
5
5
|
import { ProofLike, MeltQuoteBolt11Response, Proof, Wallet, MintQuoteBolt11Response, MintPreview, CounterSource, CounterRange, SerializedDLEQ, OutputData, OutputDataLike } from '@cashu/cashu-ts';
|
|
6
6
|
export { g as getWallet } from '../wallet-Dwjs5n_M.js';
|
|
7
7
|
import { SimplePool } from 'nostr-tools/pool';
|
|
@@ -9,8 +9,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-
|
|
13
|
-
export { c as InvalidUsdPriceError, p as parseUsdPrice } from '../usd-
|
|
12
|
+
export { h as FX_CACHE_TTL_MS, i as FX_RETRY_COUNT, w as warmFxSnapshot } from '../fx-CpqQaIfg.js';
|
|
13
|
+
export { c as InvalidUsdPriceError, p as parseUsdPrice } from '../usd-CJwU3-A4.js';
|
|
14
14
|
import 'hono';
|
|
15
15
|
import 'mppx';
|
|
16
16
|
import '@x402/core/server';
|
|
@@ -1543,7 +1543,10 @@ interface V1InfoResponse {
|
|
|
1543
1543
|
/** Provider description (omitted when empty). */
|
|
1544
1544
|
description?: string;
|
|
1545
1545
|
tags: string[];
|
|
1546
|
-
/**
|
|
1546
|
+
/**
|
|
1547
|
+
* Auth schemes supported (e.g. `["none"]`, `["secp256k1-schnorr-v2"]`), or
|
|
1548
|
+
* `["secp256k1-schnorr-v2", "none"]` when unsigned paid calls are also served.
|
|
1549
|
+
*/
|
|
1547
1550
|
auth: string[];
|
|
1548
1551
|
/** Audience bound into v2 signed caller statements. */
|
|
1549
1552
|
auth_audience?: SignedRequestAudience;
|
|
@@ -1650,7 +1653,10 @@ interface ProviderInfo {
|
|
|
1650
1653
|
/** Provider description (wire `description`; kept as `about` for the `dvm describe` output contract) */
|
|
1651
1654
|
about?: string;
|
|
1652
1655
|
tags?: string[];
|
|
1653
|
-
/**
|
|
1656
|
+
/**
|
|
1657
|
+
* Auth schemes supported (e.g. ["none"], ["secp256k1-schnorr-v2"]), or
|
|
1658
|
+
* ["secp256k1-schnorr-v2", "none"] when unsigned paid calls are also served.
|
|
1659
|
+
*/
|
|
1654
1660
|
auth?: string[];
|
|
1655
1661
|
/** Audience advertised for v2 signed caller statements. */
|
|
1656
1662
|
authAudience?: SignedRequestAudience;
|
package/dist/internal/caller.js
CHANGED
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
sha256hex,
|
|
33
33
|
validateX402Env,
|
|
34
34
|
withNwcPool
|
|
35
|
-
} from "../chunk-
|
|
35
|
+
} from "../chunk-2PN4DKZW.js";
|
|
36
36
|
import {
|
|
37
37
|
MemoryKVStore
|
|
38
38
|
} from "../chunk-SDK6KDJN.js";
|
|
@@ -134,7 +134,7 @@ import {
|
|
|
134
134
|
withWalletLock,
|
|
135
135
|
writeAgentMnemonic,
|
|
136
136
|
writeIdentity
|
|
137
|
-
} from "../chunk-
|
|
137
|
+
} from "../chunk-7RWE6ELV.js";
|
|
138
138
|
import {
|
|
139
139
|
X402_BATCH_SETTLEMENT_SCHEME,
|
|
140
140
|
X402_DEFAULT_FACILITATOR,
|
|
@@ -178,7 +178,7 @@ import {
|
|
|
178
178
|
import {
|
|
179
179
|
createNoopLogger,
|
|
180
180
|
createStdoutLogger
|
|
181
|
-
} from "../chunk-
|
|
181
|
+
} from "../chunk-QTKGFG3I.js";
|
|
182
182
|
import {
|
|
183
183
|
redactUrl,
|
|
184
184
|
redactUrlsInText
|
|
@@ -192,7 +192,7 @@ import {
|
|
|
192
192
|
InvalidUsdPriceError,
|
|
193
193
|
parseUsdPrice,
|
|
194
194
|
warmFxSnapshot
|
|
195
|
-
} from "../chunk-
|
|
195
|
+
} from "../chunk-72A4PHLD.js";
|
|
196
196
|
import {
|
|
197
197
|
computeResultHash,
|
|
198
198
|
isDrainReceipt,
|
|
@@ -211,7 +211,7 @@ import {
|
|
|
211
211
|
import {
|
|
212
212
|
applyRetryToPool,
|
|
213
213
|
withInitRetry
|
|
214
|
-
} from "../chunk-
|
|
214
|
+
} from "../chunk-EIDRCGTY.js";
|
|
215
215
|
import {
|
|
216
216
|
DvmError,
|
|
217
217
|
X402_NETWORKS,
|
|
@@ -238,7 +238,7 @@ import {
|
|
|
238
238
|
randomTraceId,
|
|
239
239
|
setEmitter,
|
|
240
240
|
withTraceContext
|
|
241
|
-
} from "../chunk-
|
|
241
|
+
} from "../chunk-LY2JYSJS.js";
|
|
242
242
|
import "../chunk-66HGCPBU.js";
|
|
243
243
|
import {
|
|
244
244
|
DIAGNOSTIC_CATALOGUE_VERSION,
|
|
@@ -249,7 +249,7 @@ import {
|
|
|
249
249
|
projectDiagnosticFields,
|
|
250
250
|
projectEventName,
|
|
251
251
|
projectSpanRow
|
|
252
|
-
} from "../chunk-
|
|
252
|
+
} from "../chunk-ALTE7I6C.js";
|
|
253
253
|
|
|
254
254
|
// src/lib/budget-core.ts
|
|
255
255
|
function checkBudgetForLedger(ledger, opts) {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { FacilitatorConfig } from '@x402/core/server';
|
|
2
|
-
import { an as PaymentPayload, ac as PaymentRequirementsV1, ad as PaymentRequirementsV2, aI as X402Config, ay as SettleResponse, aG as VerifyResponse, bp as X402ExactVersionSupport, bq as X402Receipt, br as TransactionalPayoutHook, bs as CashuMeltCompleted } from '../step-cache-
|
|
3
|
-
export { bt as CreditDepositPayload, bu as CreditDrainPayload, bv as FundingLot, bw as LotDebit, bx as LotDepletion, by as MppxServer, bz as NON_CHANNEL_BITCOIN_RAILS, bA as NonChannelBitcoinRail, bB as PayoutReporter, bC as PostgresTempoSessionStore, bD as RevenueReporter, bE as SIGNED_ENVELOPE_FIELDS, bF as SIGNED_ENVELOPE_TYPES, bG as X402TrackedChannel, bH as _testing, bI as createDefaultReplayStore, bJ as depleteLots, bK as fifoOrder, bL as inKindDrawMsats, bM as isInKindDepletion, bN as isNonChannelBitcoinRail, bO as lotOwedSats, bP as netOwedSats, bQ as wrapMppx } from '../step-cache-
|
|
2
|
+
import { an as PaymentPayload, ac as PaymentRequirementsV1, ad as PaymentRequirementsV2, aI as X402Config, ay as SettleResponse, aG as VerifyResponse, bp as X402ExactVersionSupport, bq as X402Receipt, br as TransactionalPayoutHook, bs as CashuMeltCompleted } from '../step-cache-Bezn-_ZL.js';
|
|
3
|
+
export { bt as CreditDepositPayload, bu as CreditDrainPayload, bv as FundingLot, bw as LotDebit, bx as LotDepletion, by as MppxServer, bz as NON_CHANNEL_BITCOIN_RAILS, bA as NonChannelBitcoinRail, bB as PayoutReporter, bC as PostgresTempoSessionStore, bD as RevenueReporter, bE as SIGNED_ENVELOPE_FIELDS, bF as SIGNED_ENVELOPE_TYPES, bG as X402TrackedChannel, bH as _testing, bI as createDefaultReplayStore, bJ as depleteLots, bK as fifoOrder, bL as inKindDrawMsats, bM as isInKindDepletion, bN as isNonChannelBitcoinRail, bO as lotOwedSats, bP as netOwedSats, bQ as wrapMppx } from '../step-cache-Bezn-_ZL.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-
|
|
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-
|
|
11
|
-
export { O as OutgoingMessage, S as StaleJobReapable, i as isStaleJobReapable } from '../job-store-
|
|
9
|
+
import { C as ConsumedCredentialStore, L as LockPubkeyStateLoader } from '../credit-menu-D-h0zJCZ.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-D-h0zJCZ.js';
|
|
11
|
+
export { O as OutgoingMessage, S as StaleJobReapable, i as isStaleJobReapable } from '../job-store-CgXT79tS.js';
|
|
12
12
|
import { z } from 'zod';
|
|
13
|
-
export { f as LockPubkeyStoreLockPubkey, t as lockPubkeyStoreToLockPubkey } from '../lightning-backend-
|
|
13
|
+
export { f as LockPubkeyStoreLockPubkey, t as lockPubkeyStoreToLockPubkey } from '../lightning-backend-B1hRUIOb.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-
|
|
19
|
+
import '../fx-CpqQaIfg.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>;
|
package/dist/internal/server.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PostgresTempoSessionStore
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-ORBWKYDE.js";
|
|
4
4
|
import {
|
|
5
5
|
verifyX402Payment
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-VKFR5PCW.js";
|
|
7
7
|
import {
|
|
8
8
|
RevenueReporter
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-CVN2YNMG.js";
|
|
10
10
|
import {
|
|
11
11
|
PostgresTempoChargeStore
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-CXRI4N4Y.js";
|
|
13
13
|
import {
|
|
14
14
|
DEFAULT_LOCK_PUBKEY_GRACE_SECONDS,
|
|
15
15
|
MintHealthTracker,
|
|
@@ -61,27 +61,27 @@ import {
|
|
|
61
61
|
verifyUpfrontPayment,
|
|
62
62
|
x402RequiredUsdcMicro,
|
|
63
63
|
x402SettledShare
|
|
64
|
-
} from "../chunk-
|
|
64
|
+
} from "../chunk-YRQMDRI4.js";
|
|
65
65
|
import "../chunk-XRLKGCAW.js";
|
|
66
66
|
import {
|
|
67
67
|
PayoutReporter
|
|
68
|
-
} from "../chunk-
|
|
68
|
+
} from "../chunk-KRX7VNBG.js";
|
|
69
69
|
import {
|
|
70
70
|
settleWithFacilitator,
|
|
71
71
|
verifyWithFacilitator
|
|
72
|
-
} from "../chunk-
|
|
73
|
-
import "../chunk-
|
|
74
|
-
import "../chunk-
|
|
72
|
+
} from "../chunk-3KRFFLAT.js";
|
|
73
|
+
import "../chunk-C5XNZLZ7.js";
|
|
74
|
+
import "../chunk-A6EY4K46.js";
|
|
75
75
|
import {
|
|
76
76
|
SIGNED_ENVELOPE_FIELDS,
|
|
77
77
|
SIGNED_ENVELOPE_TYPES,
|
|
78
78
|
createDefaultReplayStore,
|
|
79
79
|
humanizeZodError
|
|
80
|
-
} from "../chunk-
|
|
80
|
+
} from "../chunk-5CCQEAQV.js";
|
|
81
81
|
import {
|
|
82
82
|
createInstrumentedFetch,
|
|
83
83
|
isStaleJobReapable
|
|
84
|
-
} from "../chunk-
|
|
84
|
+
} from "../chunk-Y6JJDOGO.js";
|
|
85
85
|
import {
|
|
86
86
|
JobCancelledError,
|
|
87
87
|
abortJob,
|
|
@@ -93,14 +93,14 @@ import {
|
|
|
93
93
|
} from "../chunk-KVKJ7R5V.js";
|
|
94
94
|
import {
|
|
95
95
|
toLockPubkey
|
|
96
|
-
} from "../chunk-
|
|
96
|
+
} from "../chunk-7RWE6ELV.js";
|
|
97
97
|
import "../chunk-62FI3NJF.js";
|
|
98
98
|
import "../chunk-SXL44PL5.js";
|
|
99
|
-
import "../chunk-
|
|
99
|
+
import "../chunk-QTKGFG3I.js";
|
|
100
100
|
import "../chunk-FUJ36YDV.js";
|
|
101
101
|
import "../chunk-BQJIFRAZ.js";
|
|
102
|
-
import "../chunk-
|
|
103
|
-
import "../chunk-
|
|
102
|
+
import "../chunk-RX6FT7XA.js";
|
|
103
|
+
import "../chunk-72A4PHLD.js";
|
|
104
104
|
import {
|
|
105
105
|
NON_CHANNEL_BITCOIN_RAILS,
|
|
106
106
|
depleteLots,
|
|
@@ -110,20 +110,20 @@ import {
|
|
|
110
110
|
isNonChannelBitcoinRail,
|
|
111
111
|
lotOwedSats,
|
|
112
112
|
netOwedSats
|
|
113
|
-
} from "../chunk-
|
|
113
|
+
} from "../chunk-B5MPLDRC.js";
|
|
114
114
|
import "../chunk-YG7G4DPZ.js";
|
|
115
115
|
import "../chunk-COYKJRMM.js";
|
|
116
116
|
import "../chunk-5UC7TOQC.js";
|
|
117
|
-
import "../chunk-
|
|
117
|
+
import "../chunk-EIDRCGTY.js";
|
|
118
118
|
import "../chunk-BPYMEMQX.js";
|
|
119
119
|
import "../chunk-H3GGFEE5.js";
|
|
120
120
|
import {
|
|
121
121
|
_testing,
|
|
122
122
|
wrapMppx
|
|
123
|
-
} from "../chunk-
|
|
124
|
-
import "../chunk-
|
|
123
|
+
} from "../chunk-MWDUGMN2.js";
|
|
124
|
+
import "../chunk-LY2JYSJS.js";
|
|
125
125
|
import "../chunk-66HGCPBU.js";
|
|
126
|
-
import "../chunk-
|
|
126
|
+
import "../chunk-ALTE7I6C.js";
|
|
127
127
|
export {
|
|
128
128
|
DEFAULT_LOCK_PUBKEY_GRACE_SECONDS,
|
|
129
129
|
JobCancelledError,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a7 as Message, O as UpfrontPayment, al as FundingMethod, a1 as FundingReceipt, bX as CreditSnapshot, a2 as JobReceipt, aA as StepRecord, a3 as MessageType } from './step-cache-
|
|
1
|
+
import { a7 as Message, O as UpfrontPayment, al as FundingMethod, a1 as FundingReceipt, bX as CreditSnapshot, a2 as JobReceipt, aA as StepRecord, a3 as MessageType } from './step-cache-Bezn-_ZL.js';
|
|
2
2
|
import { ProofLike } from '@cashu/cashu-ts';
|
|
3
3
|
|
|
4
4
|
type JobStatus = "processing" | "completed" | "failed" | "awaiting-input" | "cancelled" | "working";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MemoryCreditLedger
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-C5XNZLZ7.js";
|
|
4
|
+
import "./chunk-B5MPLDRC.js";
|
|
5
5
|
import "./chunk-YG7G4DPZ.js";
|
|
6
6
|
import "./chunk-COYKJRMM.js";
|
|
7
7
|
import "./chunk-5UC7TOQC.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-EIDRCGTY.js";
|
|
9
9
|
import "./chunk-BPYMEMQX.js";
|
|
10
10
|
import "./chunk-H3GGFEE5.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-ALTE7I6C.js";
|
|
12
12
|
export {
|
|
13
13
|
MemoryCreditLedger
|
|
14
14
|
};
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
parseMppMethodsAllowlist,
|
|
21
21
|
resolveTempoNetwork,
|
|
22
22
|
wrapMppx
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-MWDUGMN2.js";
|
|
24
|
+
import "./chunk-LY2JYSJS.js";
|
|
25
25
|
import "./chunk-66HGCPBU.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-ALTE7I6C.js";
|
|
27
27
|
export {
|
|
28
28
|
MPPX_HMAC_MISMATCH_REASON,
|
|
29
29
|
TEMPO_MAINNET_CHAIN_ID,
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
PayoutReporter,
|
|
5
5
|
PostgresX402BatchStore,
|
|
6
6
|
x402EarnedCeiling
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KRX7VNBG.js";
|
|
8
8
|
import "./chunk-COYKJRMM.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-ALTE7I6C.js";
|
|
10
10
|
export {
|
|
11
11
|
MemoryX402BatchStore,
|
|
12
12
|
PAYOUT_SNAPSHOT_INTERVAL_MS,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PostgresJobStore
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-A6EY4K46.js";
|
|
4
4
|
import "./chunk-KVKJ7R5V.js";
|
|
5
5
|
import "./chunk-BQJIFRAZ.js";
|
|
6
6
|
import "./chunk-COYKJRMM.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-ALTE7I6C.js";
|
|
8
8
|
export {
|
|
9
9
|
PostgresJobStore
|
|
10
10
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildUpfront
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RX6FT7XA.js";
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_FX_CURRENCIES,
|
|
6
6
|
DEFAULT_FX_RATE_SOURCE,
|
|
@@ -22,8 +22,8 @@ import {
|
|
|
22
22
|
satsToFiat,
|
|
23
23
|
validateCurrency,
|
|
24
24
|
warmFxSnapshot
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-72A4PHLD.js";
|
|
26
|
+
import "./chunk-ALTE7I6C.js";
|
|
27
27
|
export {
|
|
28
28
|
DEFAULT_FX_CURRENCIES,
|
|
29
29
|
DEFAULT_FX_RATE_SOURCE,
|