@dvmkit/sdk 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-4VV7WACY.js → chunk-2XQLL6N6.js} +1 -1
- package/dist/{chunk-LCCG5HQM.js → chunk-3Q6FTZDB.js} +2 -2
- package/dist/{chunk-TRY7BJA4.js → chunk-3R7NQA3Z.js} +1 -1
- package/dist/{chunk-KGL3YMZA.js → chunk-AJ6UHXUA.js} +1 -1
- package/dist/{chunk-BAQRUYRL.js → chunk-EWZFANHJ.js} +1 -1
- package/dist/{chunk-K2MSIKMM.js → chunk-FFXXGCVG.js} +1 -1
- package/dist/{chunk-WLPLHXNP.js → chunk-JNECYURT.js} +1 -1
- package/dist/{chunk-TFDR2YP2.js → chunk-KFCEXCZM.js} +1 -1
- package/dist/{chunk-IYQQXEHV.js → chunk-LDIPVPKI.js} +1 -1
- package/dist/{chunk-QSZW2I5Y.js → chunk-M3T5JYDJ.js} +15 -8
- package/dist/{chunk-Q3VYRU5R.js → chunk-MB6R4XPZ.js} +1 -1
- package/dist/{chunk-IBX2ORBV.js → chunk-MMGSYMIC.js} +1 -1
- package/dist/{chunk-LFVIZH2G.js → chunk-MU3IE434.js} +278 -152
- package/dist/{chunk-OIP44KBB.js → chunk-QGNXYVBO.js} +47 -12
- package/dist/{chunk-73C4JN2E.js → chunk-QNKK7SPY.js} +273 -54
- package/dist/{chunk-YYRY32NR.js → chunk-STJBBVNL.js} +2 -2
- package/dist/{chunk-WB3E7KE7.js → chunk-VMHYGKWT.js} +1 -1
- package/dist/{chunk-GAZBBMAA.js → chunk-VTHYQCDB.js} +1 -1
- package/dist/{chunk-LW7KZQHG.js → chunk-VUGEEMLT.js} +1 -1
- package/dist/{chunk-HC4I7LAV.js → chunk-W3VGCNG6.js} +1 -1
- package/dist/{chunk-GODOH2AF.js → chunk-Y6DO5WSO.js} +1 -1
- package/dist/{chunk-ZBQKXAYK.js → chunk-YOSZIWC3.js} +1 -1
- package/dist/{content-retention-CVBYehRS.d.ts → content-retention-CrILCNxk.d.ts} +1 -1
- package/dist/{credit-ledger-CZQ56DYI.js → credit-ledger-4PZNAMDT.js} +3 -3
- package/dist/{credit-menu-QntEhZJS.d.ts → credit-menu-VwX_6KM7.d.ts} +4 -4
- package/dist/{fx-CMyNFenZ.d.ts → fx-BM5h4o5S.d.ts} +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +4 -4
- package/dist/internal/caller.d.ts +7 -7
- 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-qOD-FrQF.d.ts → job-store-92v8e1LQ.d.ts} +1 -1
- package/dist/{lightning-backend-DtdG6UT5.d.ts → lightning-backend-9oky_wJi.d.ts} +1 -1
- package/dist/{memory-credit-ledger-EMN7G3MO.js → memory-credit-ledger-RP7DT5IY.js} +4 -4
- package/dist/{mpp-setup-VW53KFPO.js → mpp-setup-FURD45LI.js} +3 -3
- package/dist/{payout-reporter-TZX2S7KG.js → payout-reporter-HVJ6WUF3.js} +2 -2
- package/dist/{postgres-consumed-credential-store-V464OAJB.js → postgres-consumed-credential-store-WO6OCFXZ.js} +1 -1
- package/dist/{postgres-job-store-27VOCSPO.js → postgres-job-store-FSRUPYH2.js} +2 -2
- package/dist/{postgres-replay-store-7GJFAQXY.js → postgres-replay-store-XXJSA457.js} +2 -2
- package/dist/{pricing-NNMBNP7N.js → pricing-X4XU5HXY.js} +3 -3
- package/dist/{revenue-reporter-4EAVPWXS.js → revenue-reporter-EV3K5L6B.js} +2 -2
- package/dist/server/index.d.ts +74 -11
- package/dist/server/index.js +65 -27
- package/dist/{step-cache-B7svmPz3.d.ts → step-cache--7yA5Ihr.d.ts} +48 -6
- package/dist/{tempo-charge-store-2RPOJBM2.js → tempo-charge-store-5JOIYUIH.js} +2 -2
- package/dist/{tempo-session-store-LI3Q3A3U.js → tempo-session-store-S6QMLQUA.js} +3 -3
- package/dist/testing/index.d.ts +3 -3
- package/dist/testing/index.js +6 -6
- package/dist/{usd-D3izFz71.d.ts → usd-C7lvLvLk.d.ts} +1 -1
- package/dist/{x402-SL36LSOD.js → x402-EN5LSOVM.js} +3 -3
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { f as LockPubkey, e as CheckMintHealthOptions, b as LightningBackend, A as AttestationPayload } from './lightning-backend-
|
|
2
|
-
import { cg as HostingCleanupFence,
|
|
1
|
+
import { f as LockPubkey, e as CheckMintHealthOptions, b as LightningBackend, A as AttestationPayload } from './lightning-backend-9oky_wJi.js';
|
|
2
|
+
import { cg as HostingCleanupFence, cZ as HostedIntent, aj as FundingMethod, p as PaymentMethod, bP as CreditLedgerLike, a5 as Message, $ as FundingReceipt, bR as CreditSnapshot, a0 as JobReceipt, S as SDKJobContext, ax as StepCache, v as ResponseContent, P as PaymentContent, a1 as MessageType, bk as X402Receipt, aF as X402Config, bj as X402ExactVersionSupport, c_ as X402SettlementIntent, ab as PaymentRequirementsV2, c$ as HostedFundingReservation, bL as CreditLedgerQuerier, d0 as X402SettlementCursor, bT as X402SettlementStatus, d1 as X402SettlementWriteOff, bQ as X402RefundSettlementGate, d2 as X402FacilitatorAuth, d3 as X402BatchSettlementConfig, cD as PostgresX402ChannelStorage, d4 as X402PayoutObserver, bN as HostedSettlementReportObligations, bn as CreditDepositPayload, bs as MppxServer, ae as CashuMode, d5 as CreditDepositEnqueue, d6 as X402SettlementReconciliationReason, aq as PaymentRequirements, a3 as MppxCredential, bS as DrawResult, cq as CreditLedgerError, a7 as ReceiptCredit, ag as DrainReceiptEvent, a8 as DrainReceipt, K as KVStore, z as SignedRequestAudience, d7 as CreditDrawReleaseEnqueue, cB as JobCostReportPayload, cC as JobTerminalReportPayload, cF as RevenueSkippedNoRailPayload, Z as ZodLike, a as DVMDescriptor, bY as CreditInvoiceRecord, bZ as InvoiceSettlement, ck as ClientCompatibilityGate, ci as ClientCompatibility, bw as PostgresTempoSessionStore, bv as PayoutReporter, R as ResolvedCreditConfig, h as CreditView } from './step-cache--7yA5Ihr.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-BM5h4o5S.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-92v8e1LQ.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';
|
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 createSignedRequestVerifier, T as isZodSchema, V as signedRequestStatementHeader, W 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--7yA5Ihr.js';
|
|
2
|
+
export { A as ApprovalContent, b as ArtifactContent, c as CancelContent, d as CanonicalEnvelope, e as CapabilityRate, f as CreateSignedRequestVerifierOpts, g as CreditConfig, h as CreditView, i as DEFAULT_CREDIT_MAX, j as DEFAULT_CREDIT_MIN, k as DEFAULT_CREDIT_TTL_SECONDS, l as DEFAULT_JOB_RETENTION_DAYS, m as DVMRouteContext, I as IncomingMessage, n as InputType, o as InvalidCurrencyError, J as JobCost, K as KVStore, L as Logger, P as PaymentContent, p as PaymentMethod, q as PriceValue, r as ProgressContent, s as PromptOpts, Q as QuoteConfig, t as QuoteContext, u as QuoteResult, R as ResolvedCreditConfig, v as ResponseContent, S as SDKJobContext, w as SDKPaymentRequestOpts, x as SIGNED_REQUEST_AUTH_ID, y as SIGNED_REQUEST_STATEMENT_VERSION, z as SignedRequestAudience, B as SignedRequestDomain, E as SignedRequestError, F as SignedRequestFailure, G as SignedRequestReplayStore, H as SignedRequestSignOpts, M as SignedRequestStatementHeader, N as SignedRequestVerifier, U as UnsupportedCurrencyError, O as createSignedRequestVerifier, T as isZodSchema, V as signedRequestStatementHeader, W as validateCurrency } from './step-cache--7yA5Ihr.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-BM5h4o5S.js';
|
|
4
|
+
export { I as InvalidFxRateError, f as fiatToSatsCeil, a as formatFiat, b as formatUsd, r as roundUsd, s as satsToFiat } from './usd-C7lvLvLk.js';
|
|
5
|
+
export { J as JobRecord, a as JobStatus, b as JobStore } from './job-store-92v8e1LQ.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-2XQLL6N6.js";
|
|
14
14
|
import {
|
|
15
15
|
DEFAULT_CREDIT_MAX,
|
|
16
16
|
DEFAULT_CREDIT_MIN,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-UKD3R2KU.js";
|
|
24
24
|
import {
|
|
25
25
|
buildUpfront
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-JNECYURT.js";
|
|
27
27
|
import {
|
|
28
28
|
DEFAULT_FX_CURRENCIES,
|
|
29
29
|
DEFAULT_FX_RATE_SOURCE,
|
|
@@ -41,8 +41,8 @@ import {
|
|
|
41
41
|
roundUsd,
|
|
42
42
|
satsToFiat,
|
|
43
43
|
validateCurrency
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import "./chunk-
|
|
44
|
+
} from "./chunk-W3VGCNG6.js";
|
|
45
|
+
import "./chunk-QGNXYVBO.js";
|
|
46
46
|
|
|
47
47
|
// src/sdk/configure.ts
|
|
48
48
|
function configureDVM(config) {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { L as LightningTransactionListOptions, a as LightningTransactionSnapshot, b as LightningBackend, c as LightningPayment, d as LightningWalletInfo, C as CreatedInvoice, I as InvoiceStatus } from '../lightning-backend-
|
|
2
|
-
export { A as AttestationPayload, B as BuilderIdentityKeypair, e as CheckMintHealthOptions, f as LockPubkey, M as MintAmountBounds, g as MintHealthCheckResult, h as amountBoundsVerdict, i as assertNutSupport, j as buildAttestation, k as canSwap, l as checkMintHealth, m as generateIdentity, n as hashCapabilities, o as loadIdentitySecret, p as meltAmountBounds, s as signAttestation, t as toLockPubkey, v as verifyAttestation, w as writeIdentity } from '../lightning-backend-
|
|
1
|
+
import { L as LightningTransactionListOptions, a as LightningTransactionSnapshot, b as LightningBackend, c as LightningPayment, d as LightningWalletInfo, C as CreatedInvoice, I as InvoiceStatus } from '../lightning-backend-9oky_wJi.js';
|
|
2
|
+
export { A as AttestationPayload, B as BuilderIdentityKeypair, e as CheckMintHealthOptions, f as LockPubkey, M as MintAmountBounds, g as MintHealthCheckResult, h as amountBoundsVerdict, i as assertNutSupport, j as buildAttestation, k as canSwap, l as checkMintHealth, m as generateIdentity, n as hashCapabilities, o as loadIdentitySecret, p as meltAmountBounds, s as signAttestation, t as toLockPubkey, v as verifyAttestation, w as writeIdentity } from '../lightning-backend-9oky_wJi.js';
|
|
3
3
|
import { ProofLike, MeltQuoteBolt11Response, Proof, Wallet, MintQuoteBolt11Response, MintPreview, CounterSource, CounterRange, SerializedDLEQ, OutputData, OutputDataLike } from '@cashu/cashu-ts';
|
|
4
4
|
export { g as getWallet } from '../wallet-Dwjs5n_M.js';
|
|
5
|
-
import { X as JsonValue, B as SignedRequestDomain, M as SignedRequestStatementHeader, Y as X402_BATCH_SETTLEMENT_SCHEME, _ as X402_EXACT_SCHEME, $ as FundingReceipt, a0 as JobReceipt$1, a1 as MessageType, a2 as X402Version, a3 as MppxCredential, z as SignedRequestAudience, a4 as PaymentRequired, a5 as Message, a6 as MppxChallenge, a7 as ReceiptCredit, a8 as DrainReceipt, C as Currency, a9 as X402Wallet, aa as PaymentRequirementsV1, ab as PaymentRequirementsV2, L as Logger$1, K as KVStore } from '../step-cache
|
|
6
|
-
export { ac as BuildPaymentRequirementsOpts, ad as CapabilityDescriptor, ae as CashuMode, af as CompleteContent, ag as DrainReceiptEvent, ah as ExactEvmPayload, ai as ExactEvmPayloadAuthorization, aj as FundingMethod, ak as MessageFrom, al as PaymentPayload, am as PaymentPayloadV1, an as PaymentPayloadV2, ao as PaymentRequestContent, ap as PaymentRequiredV2, aq as PaymentRequirements, ar as PromptContent, as as RAIL_REFUNDABLE, at as ReceiptOutcome, au as ReceiptPayment, av as ResourceInfo, aw as SettleResponse, ax as StepCache, ay as StepRecord, az as TextContent, aA as UnsignedDrainReceipt, aB as UnsignedFundingReceipt, aC as UnsignedJobReceipt, aD as VerifyResponse, aE as WorkingContent, aF as X402Config, aG as X402ResponseBody, aH as X402SelfRelayRpcFailureReason, aI as X402_DEFAULT_NETWORK, aJ as X402_V1_VERSION, aK as X402_VERSION, aL as buildPaymentRequiredV2, aM as buildPaymentRequirements, aN as caip2ToX402Network, aO as canonicalRequestPath, aP as canonicaliseForSigning, aQ as canonicalize, aR as chainIdFromCaip2, aS as computeResultHash, aT as decodePayment, aU as decodePaymentRequiredHeader, aV as encodePayment, aW as encodePaymentRequiredHeader, aX as encodeSettleResponseHeader, aY as exactEvmAuthorization, aZ as isArtifactMessage, a_ as isCancelMessage, a$ as isCompleteMessage, b0 as isDrainReceipt, b1 as isFundingReceipt, b2 as isPaymentRequestMessage, b3 as isPromptMessage, b4 as isSignedJobReceipt, b5 as isTextMessage, b6 as isWorkingMessage, b7 as paymentRequiredV2FromV1, b8 as signDrainReceipt, b9 as signFundingReceipt, ba as signReceipt, bb as usdcContractByCaip2, bc as usdcContractFor, bd as usdcDomainNameFor, be as usdcDomainVersionFor, bf as verifyDrainReceipt, bg as verifyFundingReceipt, bh as verifyReceipt, bi as x402NetworkToCaip2 } from '../step-cache
|
|
5
|
+
import { X as JsonValue, B as SignedRequestDomain, M as SignedRequestStatementHeader, Y as X402_BATCH_SETTLEMENT_SCHEME, _ as X402_EXACT_SCHEME, $ as FundingReceipt, a0 as JobReceipt$1, a1 as MessageType, a2 as X402Version, a3 as MppxCredential, z as SignedRequestAudience, a4 as PaymentRequired, a5 as Message, a6 as MppxChallenge, a7 as ReceiptCredit, a8 as DrainReceipt, C as Currency, a9 as X402Wallet, aa as PaymentRequirementsV1, ab as PaymentRequirementsV2, L as Logger$1, K as KVStore } from '../step-cache--7yA5Ihr.js';
|
|
6
|
+
export { ac as BuildPaymentRequirementsOpts, ad as CapabilityDescriptor, ae as CashuMode, af as CompleteContent, ag as DrainReceiptEvent, ah as ExactEvmPayload, ai as ExactEvmPayloadAuthorization, aj as FundingMethod, ak as MessageFrom, al as PaymentPayload, am as PaymentPayloadV1, an as PaymentPayloadV2, ao as PaymentRequestContent, ap as PaymentRequiredV2, aq as PaymentRequirements, ar as PromptContent, as as RAIL_REFUNDABLE, at as ReceiptOutcome, au as ReceiptPayment, av as ResourceInfo, aw as SettleResponse, ax as StepCache, ay as StepRecord, az as TextContent, aA as UnsignedDrainReceipt, aB as UnsignedFundingReceipt, aC as UnsignedJobReceipt, aD as VerifyResponse, aE as WorkingContent, aF as X402Config, aG as X402ResponseBody, aH as X402SelfRelayRpcFailureReason, aI as X402_DEFAULT_NETWORK, aJ as X402_V1_VERSION, aK as X402_VERSION, aL as buildPaymentRequiredV2, aM as buildPaymentRequirements, aN as caip2ToX402Network, aO as canonicalRequestPath, aP as canonicaliseForSigning, aQ as canonicalize, aR as chainIdFromCaip2, aS as computeResultHash, aT as decodePayment, aU as decodePaymentRequiredHeader, aV as encodePayment, aW as encodePaymentRequiredHeader, aX as encodeSettleResponseHeader, aY as exactEvmAuthorization, aZ as isArtifactMessage, a_ as isCancelMessage, a$ as isCompleteMessage, b0 as isDrainReceipt, b1 as isFundingReceipt, b2 as isPaymentRequestMessage, b3 as isPromptMessage, b4 as isSignedJobReceipt, b5 as isTextMessage, b6 as isWorkingMessage, b7 as paymentRequiredV2FromV1, b8 as signDrainReceipt, b9 as signFundingReceipt, ba as signReceipt, bb as usdcContractByCaip2, bc as usdcContractFor, bd as usdcDomainNameFor, be as usdcDomainVersionFor, bf as verifyDrainReceipt, bg as verifyFundingReceipt, bh as verifyReceipt, bi as x402NetworkToCaip2 } from '../step-cache--7yA5Ihr.js';
|
|
7
7
|
import { SimplePool } from 'nostr-tools/pool';
|
|
8
8
|
import { Session } from 'mppx/tempo';
|
|
9
9
|
import { Pool } from 'pg';
|
|
10
10
|
import { PaymentRequired as PaymentRequired$1 } from '@x402/core/types';
|
|
11
11
|
import { ClientChannelStorage, BatchSettlementClientContext, BatchSettlementEvmScheme } from '@x402/evm/batch-settlement/client';
|
|
12
|
-
export { h as FX_CACHE_TTL_MS, i as FX_RETRY_COUNT, w as warmFxSnapshot } from '../fx-
|
|
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-BM5h4o5S.js';
|
|
13
|
+
export { c as InvalidUsdPriceError, p as parseUsdPrice } from '../usd-C7lvLvLk.js';
|
|
14
14
|
import 'hono';
|
|
15
15
|
import 'mppx';
|
|
16
16
|
import '@x402/core/server';
|
|
@@ -6173,7 +6173,7 @@ type SpanProjectionResult = {
|
|
|
6173
6173
|
/** Project an untrusted row into the versioned diagnostic catalogue. */
|
|
6174
6174
|
declare function projectSpanRow(input: unknown): SpanProjectionResult;
|
|
6175
6175
|
/** Project arbitrary diagnostic fields without invoking getters or coercion hooks. */
|
|
6176
|
-
declare function projectDiagnosticFields(input: unknown, dataset?: string, authority?: DiagnosticCapabilityAuthority, identityAuthority?: DiagnosticIdentityAuthority): Record<string, unknown>;
|
|
6176
|
+
declare function projectDiagnosticFields(input: unknown, dataset?: string, authority?: DiagnosticCapabilityAuthority, identityAuthority?: DiagnosticIdentityAuthority, eventName?: string): Record<string, unknown>;
|
|
6177
6177
|
/** Select a known event name without reflecting untrusted input. */
|
|
6178
6178
|
declare function projectEventName(input: unknown, fallback?: string): string;
|
|
6179
6179
|
|
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-AJ6UHXUA.js";
|
|
36
36
|
import {
|
|
37
37
|
MemoryKVStore
|
|
38
38
|
} from "../chunk-SDK6KDJN.js";
|
|
@@ -143,7 +143,7 @@ import {
|
|
|
143
143
|
withWalletLock,
|
|
144
144
|
writeAgentMnemonic,
|
|
145
145
|
writeIdentity
|
|
146
|
-
} from "../chunk-
|
|
146
|
+
} from "../chunk-VUGEEMLT.js";
|
|
147
147
|
import {
|
|
148
148
|
X402_BATCH_SETTLEMENT_SCHEME,
|
|
149
149
|
X402_DEFAULT_FACILITATOR,
|
|
@@ -190,7 +190,7 @@ import {
|
|
|
190
190
|
import {
|
|
191
191
|
createNoopLogger,
|
|
192
192
|
createStdoutLogger
|
|
193
|
-
} from "../chunk-
|
|
193
|
+
} from "../chunk-3R7NQA3Z.js";
|
|
194
194
|
import {
|
|
195
195
|
redactUrl,
|
|
196
196
|
redactUrlsInText
|
|
@@ -204,11 +204,11 @@ import {
|
|
|
204
204
|
InvalidUsdPriceError,
|
|
205
205
|
parseUsdPrice,
|
|
206
206
|
warmFxSnapshot
|
|
207
|
-
} from "../chunk-
|
|
207
|
+
} from "../chunk-W3VGCNG6.js";
|
|
208
208
|
import {
|
|
209
209
|
applyRetryToPool,
|
|
210
210
|
withInitRetry
|
|
211
|
-
} from "../chunk-
|
|
211
|
+
} from "../chunk-MMGSYMIC.js";
|
|
212
212
|
import {
|
|
213
213
|
DvmError,
|
|
214
214
|
X402_NETWORKS,
|
|
@@ -230,7 +230,7 @@ import {
|
|
|
230
230
|
randomTraceId,
|
|
231
231
|
setEmitter,
|
|
232
232
|
withTraceContext
|
|
233
|
-
} from "../chunk-
|
|
233
|
+
} from "../chunk-M3T5JYDJ.js";
|
|
234
234
|
import "../chunk-66HGCPBU.js";
|
|
235
235
|
import {
|
|
236
236
|
DIAGNOSTIC_CATALOGUE_VERSION,
|
|
@@ -241,7 +241,7 @@ import {
|
|
|
241
241
|
projectDiagnosticFields,
|
|
242
242
|
projectEventName,
|
|
243
243
|
projectSpanRow
|
|
244
|
-
} from "../chunk-
|
|
244
|
+
} from "../chunk-QGNXYVBO.js";
|
|
245
245
|
|
|
246
246
|
// src/lib/budget-core.ts
|
|
247
247
|
function checkBudgetForLedger(ledger, opts) {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { FacilitatorConfig } from '@x402/core/server';
|
|
2
|
-
import { al as PaymentPayload, aa as PaymentRequirementsV1, ab as PaymentRequirementsV2, aF as X402Config, aw as SettleResponse, aD as VerifyResponse, bj as X402ExactVersionSupport, bk as X402Receipt, bl as TransactionalPayoutHook, bm as CashuMeltCompleted } from '../step-cache
|
|
3
|
-
export { bn as CreditDepositPayload, bo as CreditDrainPayload, bp as FundingLot, bq as LotDebit, br as LotDepletion, bs as MppxServer, bt as NON_CHANNEL_BITCOIN_RAILS, bu as NonChannelBitcoinRail, bv as PayoutReporter, bw as PostgresTempoSessionStore, bx as RevenueReporter, by as SIGNED_ENVELOPE_FIELDS, bz as SIGNED_ENVELOPE_TYPES, bA as X402TrackedChannel, bB as _testing, bC as createDefaultReplayStore, bD as depleteLots, bE as fifoOrder, bF as inKindDrawMsats, bG as isInKindDepletion, bH as isNonChannelBitcoinRail, bI as lotOwedSats, bJ as netOwedSats, bK as wrapMppx } from '../step-cache
|
|
2
|
+
import { al as PaymentPayload, aa as PaymentRequirementsV1, ab as PaymentRequirementsV2, aF as X402Config, aw as SettleResponse, aD as VerifyResponse, bj as X402ExactVersionSupport, bk as X402Receipt, bl as TransactionalPayoutHook, bm as CashuMeltCompleted } from '../step-cache--7yA5Ihr.js';
|
|
3
|
+
export { bn as CreditDepositPayload, bo as CreditDrainPayload, bp as FundingLot, bq as LotDebit, br as LotDepletion, bs as MppxServer, bt as NON_CHANNEL_BITCOIN_RAILS, bu as NonChannelBitcoinRail, bv as PayoutReporter, bw as PostgresTempoSessionStore, bx as RevenueReporter, by as SIGNED_ENVELOPE_FIELDS, bz as SIGNED_ENVELOPE_TYPES, bA as X402TrackedChannel, bB as _testing, bC as createDefaultReplayStore, bD as depleteLots, bE as fifoOrder, bF as inKindDrawMsats, bG as isInKindDepletion, bH as isNonChannelBitcoinRail, bI as lotOwedSats, bJ as netOwedSats, bK as wrapMppx } from '../step-cache--7yA5Ihr.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-VwX_6KM7.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-VwX_6KM7.js';
|
|
11
|
+
export { O as OutgoingMessage, S as StaleJobReapable, i as isStaleJobReapable } from '../job-store-92v8e1LQ.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-9oky_wJi.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-BM5h4o5S.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-MB6R4XPZ.js";
|
|
4
4
|
import {
|
|
5
5
|
verifyX402Payment
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-3Q6FTZDB.js";
|
|
7
7
|
import {
|
|
8
8
|
RevenueReporter
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-VMHYGKWT.js";
|
|
10
10
|
import {
|
|
11
11
|
PostgresTempoChargeStore
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-LDIPVPKI.js";
|
|
13
13
|
import {
|
|
14
14
|
DEFAULT_LOCK_PUBKEY_GRACE_SECONDS,
|
|
15
15
|
MintHealthTracker,
|
|
@@ -61,28 +61,28 @@ import {
|
|
|
61
61
|
verifyUpfrontPayment,
|
|
62
62
|
x402RequiredUsdcMicro,
|
|
63
63
|
x402SettledShare
|
|
64
|
-
} from "../chunk-
|
|
64
|
+
} from "../chunk-QNKK7SPY.js";
|
|
65
65
|
import "../chunk-XRLKGCAW.js";
|
|
66
66
|
import {
|
|
67
67
|
PayoutReporter
|
|
68
|
-
} from "../chunk-
|
|
68
|
+
} from "../chunk-FFXXGCVG.js";
|
|
69
69
|
import {
|
|
70
70
|
settleWithFacilitator,
|
|
71
71
|
verifyWithFacilitator
|
|
72
|
-
} from "../chunk-
|
|
73
|
-
import "../chunk-
|
|
74
|
-
import "../chunk-
|
|
72
|
+
} from "../chunk-VTHYQCDB.js";
|
|
73
|
+
import "../chunk-YOSZIWC3.js";
|
|
74
|
+
import "../chunk-Y6DO5WSO.js";
|
|
75
75
|
import "../chunk-YG7G4DPZ.js";
|
|
76
76
|
import {
|
|
77
77
|
SIGNED_ENVELOPE_FIELDS,
|
|
78
78
|
SIGNED_ENVELOPE_TYPES,
|
|
79
79
|
createDefaultReplayStore,
|
|
80
80
|
humanizeZodError
|
|
81
|
-
} from "../chunk-
|
|
81
|
+
} from "../chunk-2XQLL6N6.js";
|
|
82
82
|
import {
|
|
83
83
|
createInstrumentedFetch,
|
|
84
84
|
isStaleJobReapable
|
|
85
|
-
} from "../chunk-
|
|
85
|
+
} from "../chunk-KFCEXCZM.js";
|
|
86
86
|
import {
|
|
87
87
|
JobCancelledError,
|
|
88
88
|
abortJob,
|
|
@@ -94,14 +94,14 @@ import {
|
|
|
94
94
|
} from "../chunk-AFV77S4C.js";
|
|
95
95
|
import {
|
|
96
96
|
toLockPubkey
|
|
97
|
-
} from "../chunk-
|
|
97
|
+
} from "../chunk-VUGEEMLT.js";
|
|
98
98
|
import "../chunk-62FI3NJF.js";
|
|
99
99
|
import "../chunk-UKD3R2KU.js";
|
|
100
|
-
import "../chunk-
|
|
100
|
+
import "../chunk-3R7NQA3Z.js";
|
|
101
101
|
import "../chunk-FUJ36YDV.js";
|
|
102
102
|
import "../chunk-BQJIFRAZ.js";
|
|
103
|
-
import "../chunk-
|
|
104
|
-
import "../chunk-
|
|
103
|
+
import "../chunk-JNECYURT.js";
|
|
104
|
+
import "../chunk-W3VGCNG6.js";
|
|
105
105
|
import {
|
|
106
106
|
NON_CHANNEL_BITCOIN_RAILS,
|
|
107
107
|
depleteLots,
|
|
@@ -111,17 +111,17 @@ import {
|
|
|
111
111
|
isNonChannelBitcoinRail,
|
|
112
112
|
lotOwedSats,
|
|
113
113
|
netOwedSats
|
|
114
|
-
} from "../chunk-
|
|
114
|
+
} from "../chunk-STJBBVNL.js";
|
|
115
115
|
import "../chunk-COYKJRMM.js";
|
|
116
|
-
import "../chunk-
|
|
116
|
+
import "../chunk-MMGSYMIC.js";
|
|
117
117
|
import "../chunk-BPYMEMQX.js";
|
|
118
118
|
import {
|
|
119
119
|
_testing,
|
|
120
120
|
wrapMppx
|
|
121
|
-
} from "../chunk-
|
|
122
|
-
import "../chunk-
|
|
121
|
+
} from "../chunk-MU3IE434.js";
|
|
122
|
+
import "../chunk-M3T5JYDJ.js";
|
|
123
123
|
import "../chunk-66HGCPBU.js";
|
|
124
|
-
import "../chunk-
|
|
124
|
+
import "../chunk-QGNXYVBO.js";
|
|
125
125
|
export {
|
|
126
126
|
DEFAULT_LOCK_PUBKEY_GRACE_SECONDS,
|
|
127
127
|
JobCancelledError,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProofLike } from '@cashu/cashu-ts';
|
|
2
|
-
import { a5 as Message, aj as FundingMethod, $ as FundingReceipt,
|
|
2
|
+
import { a5 as Message, aj as FundingMethod, $ as FundingReceipt, bR as CreditSnapshot, a0 as JobReceipt, ay as StepRecord, a1 as MessageType } from './step-cache--7yA5Ihr.js';
|
|
3
3
|
|
|
4
4
|
type JobStatus = "processing" | "completed" | "failed" | "awaiting-input" | "cancelled" | "working";
|
|
5
5
|
interface JobRecord {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MemoryCreditLedger
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-YOSZIWC3.js";
|
|
4
|
+
import "./chunk-STJBBVNL.js";
|
|
5
5
|
import "./chunk-COYKJRMM.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-MMGSYMIC.js";
|
|
7
7
|
import "./chunk-BPYMEMQX.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-QGNXYVBO.js";
|
|
9
9
|
export {
|
|
10
10
|
MemoryCreditLedger
|
|
11
11
|
};
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
parseMppMethodsAllowlist,
|
|
21
21
|
resolveTempoNetwork,
|
|
22
22
|
wrapMppx
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-MU3IE434.js";
|
|
24
|
+
import "./chunk-M3T5JYDJ.js";
|
|
25
25
|
import "./chunk-66HGCPBU.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-QGNXYVBO.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-FFXXGCVG.js";
|
|
8
8
|
import "./chunk-COYKJRMM.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-QGNXYVBO.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-Y6DO5WSO.js";
|
|
4
4
|
import "./chunk-AFV77S4C.js";
|
|
5
5
|
import "./chunk-BQJIFRAZ.js";
|
|
6
6
|
import "./chunk-COYKJRMM.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-QGNXYVBO.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-JNECYURT.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-W3VGCNG6.js";
|
|
26
|
+
import "./chunk-QGNXYVBO.js";
|
|
27
27
|
export {
|
|
28
28
|
DEFAULT_FX_CURRENCIES,
|
|
29
29
|
DEFAULT_FX_RATE_SOURCE,
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ae as CashuMode, bL as
|
|
2
|
-
export { ch as CLIENT_COMPATIBILITY_HEADERS, d as CanonicalEnvelope, ci as ClientCompatibility, cj as ClientCompatibilityEnv, ck as ClientCompatibilityGate, cl as ClientCompatibilityRequirement, cm as ClientSemVer, f as CreateSignedRequestVerifierOpts, cn as CreditFundingBasis, co as CreditInvoiceStatus, cp as CreditLedger, cq as CreditLedgerError, cr as CreditLedgerErrorCode, cs as CreditLedgerErrorDetails, ct as CreditLedgerPool, cu as CreditStatus, cv as DRAIN_DELIVERY_RESERVE_SATS, cw as DVM_PROTOCOL_VERSION, cx as DrainConflictReason, cy as DrawRailValue, cz as DrawStatus, cA as
|
|
1
|
+
import { ae as CashuMode, bL as CreditLedgerQuerier, bM as CreditDrainEnqueue, bN as HostedSettlementReportObligations, R as ResolvedCreditConfig, bO as DVMAuthScheme, B as SignedRequestDomain, bP as CreditLedgerLike, bQ as X402RefundSettlementGate, bR as CreditSnapshot, bS as DrawResult, bT as X402SettlementStatus, bU as X402UnresolvedRefund, bV as GrownDrawResult, bW as DrawResolution, bX as FundingRecord, $ as FundingReceipt, bY as CreditInvoiceRecord, bZ as InvoiceSettlement, b_ as BlockedInvoiceCursor, b$ as InvoiceReconciliation, c0 as InvoiceWriteOff, c1 as DrawRecord, c2 as StalePendingDrawCursor, c3 as TempoCreditLossEvidence, c4 as TempoCreditLoss, c5 as X402CreditLossEvidence, c6 as X402CreditLoss, c7 as DrainMethod, c8 as DrainRequestResult, c9 as BitcoinDepositLiability, bp as FundingLot, ca as CreditDrainRecord, cb as ChannelDrainCursor, cc as DrainWriteOff, cd as DrainTransitionResult, ce as DrainReleaseResult, cf as DrainFulfilment, cg as HostingCleanupFence, a0 as JobReceipt, a5 as Message, K as KVStore, G as SignedRequestReplayStore, Z as ZodLike, a as DVMDescriptor } from '../step-cache--7yA5Ihr.js';
|
|
2
|
+
export { ch as CLIENT_COMPATIBILITY_HEADERS, d as CanonicalEnvelope, ci as ClientCompatibility, cj as ClientCompatibilityEnv, ck as ClientCompatibilityGate, cl as ClientCompatibilityRequirement, cm as ClientSemVer, f as CreateSignedRequestVerifierOpts, cn as CreditFundingBasis, co as CreditInvoiceStatus, cp as CreditLedger, cq as CreditLedgerError, cr as CreditLedgerErrorCode, cs as CreditLedgerErrorDetails, ct as CreditLedgerPool, cu as CreditStatus, cv as DRAIN_DELIVERY_RESERVE_SATS, cw as DVM_PROTOCOL_VERSION, cx as DrainConflictReason, cy as DrawRailValue, cz as DrawStatus, cA as HostedTempoCloseReportWriteOff, cB as JobCostReportPayload, cC as JobTerminalReportPayload, cD as PostgresX402ChannelStorage, cE as ReplayStoreBackend, cF as RevenueSkippedNoRailPayload, cG as RevenueSkippedNoRailReason, x as SIGNED_REQUEST_AUTH_ID, y as SIGNED_REQUEST_STATEMENT_VERSION, cH as Secp256k1AuthOpts, z as SignedRequestAudience, E as SignedRequestError, F as SignedRequestFailure, H as SignedRequestSignOpts, M as SignedRequestStatementHeader, N as SignedRequestVerifier, cI as X402ChannelStorageOpts, cJ as X402RelayLockHolder, cK as X402RelaySubmissionLock, cL as X402RelaySubmissionLockError, cM as allocateDrawValue, cN as clientCompatibilityAttributes, cO as clientCompatibilityMiddleware, cP as clientUpgradeRequired, O as createSignedRequestVerifier, cQ as parseClientCapabilities, cR as parseClientCompatibility, cS as parseDvmClient, cT as parseProtocolVersion, cU as requireClientCompatibility, cV as retryHostedTempoCloseReport, cW as secp256k1Auth, cX as signedRequestInput, V as signedRequestStatementHeader, cY as writeOffHostedTempoCloseReport } from '../step-cache--7yA5Ihr.js';
|
|
3
3
|
import { Pool } from 'pg';
|
|
4
|
-
import { au as CreditMenu, a as AppEnv, U as UpfrontPaymentOpts, i as PaymentInfo, av as ReceiptIssuer, aw as LightningReceive, ax as TempoSettlementReadiness, ay as DVMHostOpts, az as DVMServeResult, L as LockPubkeyStateLoader, C as ConsumedCredentialStore } from '../credit-menu-
|
|
5
|
-
export { aA as BuildCreditMenuArgs, aB as BuilderIdentity, aC as CREDIT_ENVELOPE_KEYS, aD as CreateX402BatchSettlementServerOpts, aE as CreditEnvelope, aF as CreditEnvelopeError, aG as CreditFundCommitment, aH as CreditTerms, aI as DEFAULT_INVOICE_TTL_SECONDS, aJ as DVMHost, aK as HostingClosureCommand, aL as HostingClosureEvidence, aM as HostingControlCommand, aN as HostingControlConfig, aO as HostingControlStatus, aP as JobManager, aQ as JobManagerOpts, aR as LightningReceiveConfig, aS as MIN_INVOICE_TTL_SECONDS, aT as MemoryConsumedCredentialStore, aU as MemoryConsumedCredentialStoreOpts, aV as MemoryProcessedPaymentStore, aW as MemoryX402ExactSettlementStore, aX as MountOpts, aY as OwnerDisplay, aZ as PaidJobCompletion, a_ as PaymentMode, a$ as PlatformReporterOpts, b0 as PostgresProcessedPaymentStore, b1 as PostgresX402ExactSettlementStore, b2 as PriceFiat, b3 as ProcessedPaymentQuerier, b4 as ProcessedPaymentRail, b5 as ProcessedPaymentRecord, b6 as ProcessedPaymentReplayError, b7 as ProcessedPaymentStore, b8 as X402BatchAcceptance, b9 as X402BatchFunding, ba as X402BatchRefusal, bb as X402BatchSettlementServer, bc as X402ExactAcceptance, bd as X402ExactIntentConflictError, be as X402ExactSettlementAttempt, bf as X402ExactSettlementChainEvidence, bg as X402ExactSettlementEffect, bh as X402ExactSettlementEvidenceMissingError, bi as X402ExactSettlementEvidenceReader, bj as X402ExactSettlementIntent, bk as X402ExactSettlementNotReadyError, bl as X402ExactSettlementServer, bm as X402ExactSettlementServerOpts, bn as X402ExactSettlementStatus, bo as X402ExactSettlementStore, bp as X402SettlementChainEvidence, bq as X402SettlementEvidenceReader, br as X402SettlementSubmissionError, bs as X402_BATCH_AUTO_SETTLEMENT, bt as X402_BATCH_MIN_WITHDRAW_DELAY_SECONDS, bu as X402_BATCH_SETTLEMENT_NETWORK, bv as attachCreditMenu, bw as buildCreditMenu, bx as createDVMHost, by as createX402BatchSettlementServer, bz as creditEnvelopeIgnoreFields, bA as drawSettlementRef, bB as extractCreditEnvelope, bC as fundingCommitment, bD as selectPrimaryCredit, bE as signHostingClosure, bF as signHostingControl, bG as stripCreditEnvelope, bH as toCreditView } from '../credit-menu-
|
|
4
|
+
import { au as CreditMenu, a as AppEnv, U as UpfrontPaymentOpts, i as PaymentInfo, av as ReceiptIssuer, aw as LightningReceive, ax as TempoSettlementReadiness, ay as DVMHostOpts, az as DVMServeResult, L as LockPubkeyStateLoader, C as ConsumedCredentialStore } from '../credit-menu-VwX_6KM7.js';
|
|
5
|
+
export { aA as BuildCreditMenuArgs, aB as BuilderIdentity, aC as CREDIT_ENVELOPE_KEYS, aD as CreateX402BatchSettlementServerOpts, aE as CreditEnvelope, aF as CreditEnvelopeError, aG as CreditFundCommitment, aH as CreditTerms, aI as DEFAULT_INVOICE_TTL_SECONDS, aJ as DVMHost, aK as HostingClosureCommand, aL as HostingClosureEvidence, aM as HostingControlCommand, aN as HostingControlConfig, aO as HostingControlStatus, aP as JobManager, aQ as JobManagerOpts, aR as LightningReceiveConfig, aS as MIN_INVOICE_TTL_SECONDS, aT as MemoryConsumedCredentialStore, aU as MemoryConsumedCredentialStoreOpts, aV as MemoryProcessedPaymentStore, aW as MemoryX402ExactSettlementStore, aX as MountOpts, aY as OwnerDisplay, aZ as PaidJobCompletion, a_ as PaymentMode, a$ as PlatformReporterOpts, b0 as PostgresProcessedPaymentStore, b1 as PostgresX402ExactSettlementStore, b2 as PriceFiat, b3 as ProcessedPaymentQuerier, b4 as ProcessedPaymentRail, b5 as ProcessedPaymentRecord, b6 as ProcessedPaymentReplayError, b7 as ProcessedPaymentStore, b8 as X402BatchAcceptance, b9 as X402BatchFunding, ba as X402BatchRefusal, bb as X402BatchSettlementServer, bc as X402ExactAcceptance, bd as X402ExactIntentConflictError, be as X402ExactSettlementAttempt, bf as X402ExactSettlementChainEvidence, bg as X402ExactSettlementEffect, bh as X402ExactSettlementEvidenceMissingError, bi as X402ExactSettlementEvidenceReader, bj as X402ExactSettlementIntent, bk as X402ExactSettlementNotReadyError, bl as X402ExactSettlementServer, bm as X402ExactSettlementServerOpts, bn as X402ExactSettlementStatus, bo as X402ExactSettlementStore, bp as X402SettlementChainEvidence, bq as X402SettlementEvidenceReader, br as X402SettlementSubmissionError, bs as X402_BATCH_AUTO_SETTLEMENT, bt as X402_BATCH_MIN_WITHDRAW_DELAY_SECONDS, bu as X402_BATCH_SETTLEMENT_NETWORK, bv as attachCreditMenu, bw as buildCreditMenu, bx as createDVMHost, by as createX402BatchSettlementServer, bz as creditEnvelopeIgnoreFields, bA as drawSettlementRef, bB as extractCreditEnvelope, bC as fundingCommitment, bD as selectPrimaryCredit, bE as signHostingClosure, bF as signHostingControl, bG as stripCreditEnvelope, bH as toCreditView } from '../credit-menu-VwX_6KM7.js';
|
|
6
6
|
import { Context, Hono } from 'hono';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { F as FxFetcher } from '../fx-
|
|
9
|
-
import { c as StreamableJobStore, R as ReceiptIssuingStore, J as JobRecord, d as RequestIdClaim, e as RequestIdClaimResult, f as JobRetentionCursor, O as OutgoingMessage, A as AppendOutgoingOptions, P as PaymentCreditDelta, V as VerifyAndCreditResult, g as JobCounters, b as JobStore } from '../job-store-
|
|
10
|
-
export { a as JobStatus, h as isStreamableJobStore } from '../job-store-
|
|
11
|
-
import { C as ContentHoldHistory, a as ContentHoldMutation } from '../content-retention-
|
|
12
|
-
export { b as ContentHold, c as ContentHoldError, d as ContentHoldEvent, e as ContentHoldStore, f as ContentHoldsResponse, J as JobContentMetadata, g as baselineContentExpiry, h as contentMetadata, i as isContentHoldStore } from '../content-retention-
|
|
8
|
+
import { F as FxFetcher } from '../fx-BM5h4o5S.js';
|
|
9
|
+
import { c as StreamableJobStore, R as ReceiptIssuingStore, J as JobRecord, d as RequestIdClaim, e as RequestIdClaimResult, f as JobRetentionCursor, O as OutgoingMessage, A as AppendOutgoingOptions, P as PaymentCreditDelta, V as VerifyAndCreditResult, g as JobCounters, b as JobStore } from '../job-store-92v8e1LQ.js';
|
|
10
|
+
export { a as JobStatus, h as isStreamableJobStore } from '../job-store-92v8e1LQ.js';
|
|
11
|
+
import { C as ContentHoldHistory, a as ContentHoldMutation } from '../content-retention-CrILCNxk.js';
|
|
12
|
+
export { b as ContentHold, c as ContentHoldError, d as ContentHoldEvent, e as ContentHoldStore, f as ContentHoldsResponse, J as JobContentMetadata, g as baselineContentExpiry, h as contentMetadata, i as isContentHoldStore } from '../content-retention-CrILCNxk.js';
|
|
13
13
|
export { P as PinnedFetch, S as SSRFError, a as SSRFGuardOpts, b as SSRFReason, c as SSRFResolver, d as assertSafeUrl, e as createPinnedFetch } from '../ssrf-dMooihtY.js';
|
|
14
14
|
import { Env, BlankSchema } from 'hono/types';
|
|
15
15
|
import 'mppx';
|
|
@@ -17,7 +17,7 @@ import '@x402/core/server';
|
|
|
17
17
|
import '@x402/evm/batch-settlement/server';
|
|
18
18
|
import '@x402/core/types';
|
|
19
19
|
import 'viem';
|
|
20
|
-
import '../lightning-backend-
|
|
20
|
+
import '../lightning-backend-9oky_wJi.js';
|
|
21
21
|
import '@cashu/cashu-ts';
|
|
22
22
|
|
|
23
23
|
/** Lifetime of a per-call implicit credit before the ledger refuses new draws. */
|
|
@@ -43,6 +43,35 @@ interface ResolvedCashuOpts {
|
|
|
43
43
|
*/
|
|
44
44
|
declare function resolveCashuOptsFromEnv(env: Record<string, string>, pool?: Pool, cashuModeHint?: CashuMode): Promise<ResolvedCashuOpts>;
|
|
45
45
|
|
|
46
|
+
interface PendingImplicitDrawGroup {
|
|
47
|
+
/** Null when historical funding has no recorded rail. */
|
|
48
|
+
rail: string | null;
|
|
49
|
+
currency: string;
|
|
50
|
+
drawCount: number;
|
|
51
|
+
/** Held amount in integer millionths of this group's currency. */
|
|
52
|
+
amountMicro: number;
|
|
53
|
+
/** Oldest pending draw's creation time, in epoch milliseconds. */
|
|
54
|
+
oldestDrawAt: number;
|
|
55
|
+
}
|
|
56
|
+
interface PendingImplicitDrawSummary {
|
|
57
|
+
drawCount: number;
|
|
58
|
+
/** Null when no implicit draws remain pending. */
|
|
59
|
+
oldestDrawAt: number | null;
|
|
60
|
+
byRailCurrency: PendingImplicitDrawGroup[];
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Read database-wide pending holds on implicit credits using a single SELECT. The supplied
|
|
64
|
+
* database must already have the SDK credit schema; this function never initializes it or
|
|
65
|
+
* starts a server. Database access supplies administrative authorization.
|
|
66
|
+
*
|
|
67
|
+
* Includes unfinished jobs and holds without a job record, regardless of stop reason. These
|
|
68
|
+
* funds remain held until settlement or release; this is not a total of payable refunds or
|
|
69
|
+
* all caller balances. No caller identifiers are returned. Unsafe integer totals throw.
|
|
70
|
+
*/
|
|
71
|
+
declare function readPendingImplicitDraws({ db, }: {
|
|
72
|
+
db: CreditLedgerQuerier;
|
|
73
|
+
}): Promise<PendingImplicitDrawSummary>;
|
|
74
|
+
|
|
46
75
|
/**
|
|
47
76
|
* Reporting is optional; an unwired host still runs the money transition.
|
|
48
77
|
*/
|
|
@@ -536,4 +565,38 @@ interface InstallAdminContentRoutesOpts {
|
|
|
536
565
|
}
|
|
537
566
|
declare function installAdminContentRoutes<E extends Env = Env, S extends BlankSchema = BlankSchema>(app: Hono<E, S>, opts: InstallAdminContentRoutesOpts): void;
|
|
538
567
|
|
|
539
|
-
|
|
568
|
+
interface TempoCloseReportSummary {
|
|
569
|
+
obligation_id: string;
|
|
570
|
+
channel_id: string;
|
|
571
|
+
/** Potential builder payout, as a decimal string in native token units. */
|
|
572
|
+
amount_native: string;
|
|
573
|
+
status: "unmatched" | "no_report";
|
|
574
|
+
created_at_ms: number;
|
|
575
|
+
updated_at_ms: number;
|
|
576
|
+
delivered_at_ms: number | null;
|
|
577
|
+
/** Snapshot of the store's retry predicate; a later state change can still cause a conflict. */
|
|
578
|
+
retryable: boolean;
|
|
579
|
+
write_off_allowed: boolean;
|
|
580
|
+
/** True when a retained write-off decision exists, including after an explicit retry. */
|
|
581
|
+
written_off: boolean;
|
|
582
|
+
write_off_note: string | null;
|
|
583
|
+
written_off_at_ms: number | null;
|
|
584
|
+
}
|
|
585
|
+
interface TempoCloseReportsResponse {
|
|
586
|
+
reports: TempoCloseReportSummary[];
|
|
587
|
+
next_after?: string;
|
|
588
|
+
}
|
|
589
|
+
interface RetryTempoCloseReportResponse {
|
|
590
|
+
status: "reserved";
|
|
591
|
+
obligation_id: string;
|
|
592
|
+
}
|
|
593
|
+
interface WriteOffTempoCloseReportResponse {
|
|
594
|
+
status: "written_off";
|
|
595
|
+
obligation_id: string;
|
|
596
|
+
channel_id: string;
|
|
597
|
+
/** Builder payout abandoned, as a decimal string in native token units. */
|
|
598
|
+
amount_forgone_native: string;
|
|
599
|
+
note: string;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
export { BitcoinDepositLiability, BlockedInvoiceCursor, CREDIT_REQUEST_SCHEMA, ConsumedCredentialStore, ContentHoldHistory, ContentHoldMutation, CreditInvoiceRecord, CreditLedgerLike, CreditLedgerQuerier, CreditMenu, type CreditRequest, type CreditRouteDeps, CreditSnapshot, DVMAuthScheme, DVMHostOpts, DVMServeResult, DrawRecord, DrawResolution, DrawResult, FundingRecord, GrownDrawResult, IMPLICIT_CREDIT_TTL_MS, type InitLockPool, type InstallAdminContentRoutesOpts, InvoiceReconciliation, InvoiceSettlement, InvoiceWriteOff, JobRecord, JobStore, LightningReceive, MemoryCreditLedger, type PendingImplicitDrawGroup, type PendingImplicitDrawSummary, PostgresJobStore, PostgresKVStore, PostgresReplayStore, type PostgresReplayStoreOpts, REQUEST_ID_FIELD, type ResolvedCashuOpts, type RetryTempoCloseReportResponse, SDK_INIT_ADVISORY_LOCK, SignedRequestDomain, SignedRequestReplayStore, StalePendingDrawCursor, StreamableJobStore, type TempoCloseReportSummary, type TempoCloseReportsResponse, type WriteOffTempoCloseReportResponse, handleCreditRequest, hasInvalidRequestId, installAdminContentRoutes, protocolEnvelopeIgnoreFields, readPendingImplicitDraws, requestIdFromEnvelope, resolveCashuOptsFromEnv, serve, stripProtocolEnvelope, withSdkInitLock };
|