@dvmkit/sdk 0.1.0-rc.3 → 0.1.0-rc.4

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.
@@ -1,16 +1,16 @@
1
- import { L as LightningBackend, a as LightningPayment, b as LightningWalletInfo, C as CreatedInvoice, I as InvoiceStatus, A as AccumulatorPool, c as LockPubkey, d as AccumulatorQuerier, e as ConsumedCredentialStore } from '../credit-menu-DONAtGVf.js';
2
- export { f as AppEnv, g as AttestationPayload, B as BuilderIdentityKeypair, h as CheckMintHealthOptions, i as CreditFundingReport, F as FiatDenomination, j as FiatDenominationFailure, k as FundOnlyRequest, l as IncomingPaymentOpts, J as JobCancelledError, M as MintHealthCheckResult, m as MintHealthTracker, P as PAYMENT_PROOF_KEYS, n as PaymentErrorCode, o as PaymentErrorDetail, p as PaymentInfo, R as ReporterBannerOpts, q as ResolvedFx, r as RevenueBootCheckOpts, S as SDKServerOpts, s as ServerJob, t as ShortPayForfeit, T as TempoChannelReport, u as TempoObserverHealth, v as TempoSessionChannelMismatchError, U as UpfrontPaymentOpts, V as VerifiedIncomingPayment, w as VerifyIncomingSnapshot, X as X402BatchChannelObservation, x as X402FacilitatorHealth, y as X402SettlementEvidenceOutcome, z as X402SettlementRepair, D as X402SettlementRepairRefusal, E as X402SettlementRepaired, G as X402WedgedSettlement, H as X402WedgedSettlementPage, K as X402_BATCH_SETTLEMENT_MAINNET_NETWORK, N as abortJob, O as applyPaymentInfoToJob, Q as assertRevenueReporterReady, W as buildAttestation, Y as buildPaymentErrorResponse, Z as canSwap, _ as checkMintHealth, $ as clearAccumulatorForDvm, a0 as createDVMServer, a1 as creditDepositPayload, a2 as derivedFundCreditId, a3 as devModeSkipsPaymentVerification, a4 as fromJobRecord, a5 as fundedMicroFor, a6 as generateIdentity, a7 as hasPaymentProof, a8 as hashCapabilities, a9 as hashLockKey, aa as implicitCreditId, ab as initWalletAccumulatorTable, ac as insertAccumulatorRows, ad as isDerivedCreditId, ae as isTerminal, af as isYieldMessage, ag as issueUpfrontChallenges, ah as loadIdentitySecret, ai as lockPubkeyStoreToLockPubkey, aj as msatsToFiatMicro, ak as paymentErrorBody, al as pinAskFiat, am as priceFiatMicro, an as processIncomingPayment, ao as providerMessage, ap as repairX402ExactSettlementEffect, aq as resolveFxSnapshot, ar as resolvePriceFiat, as as revenueReporterBannerState, at as signAttestation, au as toCreditTerms, av as toJobRecord, ai as toLockPubkey, aw as unknownRouteNotFound, ax as verifyAttestation, ay as verifyIncomingPayment, az as verifyTempoSessionManagementCredential, aA as verifyUpfrontPayment, aB as writeIdentity, aC as x402RequiredUsdcMicro, aD as x402SettledShare } from '../credit-menu-DONAtGVf.js';
1
+ import { L as LightningBackend, a as LightningPayment, b as LightningWalletInfo, C as CreatedInvoice, I as InvoiceStatus, A as AccumulatorPool, c as LockPubkey, d as AccumulatorQuerier, e as ConsumedCredentialStore } from '../credit-menu-ClA1JyYW.js';
2
+ export { f as AppEnv, g as AttestationPayload, B as BuilderIdentityKeypair, h as CheckMintHealthOptions, i as CreditFundingReport, F as FiatDenomination, j as FiatDenominationFailure, k as FundOnlyRequest, l as IncomingPaymentOpts, J as JobCancelledError, M as MintHealthCheckResult, m as MintHealthTracker, P as PAYMENT_PROOF_KEYS, n as PaymentErrorCode, o as PaymentErrorDetail, p as PaymentInfo, R as ReporterBannerOpts, q as ResolvedFx, r as RevenueBootCheckOpts, S as SDKServerOpts, s as ServerJob, t as ShortPayForfeit, T as TempoChannelReport, u as TempoObserverHealth, v as TempoSessionChannelMismatchError, U as UpfrontPaymentOpts, V as VerifiedIncomingPayment, w as VerifyIncomingSnapshot, X as X402BatchChannelObservation, x as X402FacilitatorHealth, y as X402SettlementEvidenceOutcome, z as X402SettlementRepair, D as X402SettlementRepairRefusal, E as X402SettlementRepaired, G as X402WedgedSettlement, H as X402WedgedSettlementPage, K as X402_BATCH_SETTLEMENT_MAINNET_NETWORK, N as abortJob, O as applyPaymentInfoToJob, Q as assertRevenueReporterReady, W as buildAttestation, Y as buildPaymentErrorResponse, Z as canSwap, _ as checkMintHealth, $ as clearAccumulatorForDvm, a0 as createDVMServer, a1 as creditDepositPayload, a2 as derivedFundCreditId, a3 as devModeSkipsPaymentVerification, a4 as fromJobRecord, a5 as fundedMicroFor, a6 as generateIdentity, a7 as hasPaymentProof, a8 as hashCapabilities, a9 as hashLockKey, aa as implicitCreditId, ab as initWalletAccumulatorTable, ac as insertAccumulatorRows, ad as isDerivedCreditId, ae as isTerminal, af as isYieldMessage, ag as issueUpfrontChallenges, ah as loadIdentitySecret, ai as lockPubkeyStoreToLockPubkey, aj as msatsToFiatMicro, ak as paymentErrorBody, al as pinAskFiat, am as priceFiatMicro, an as processIncomingPayment, ao as providerMessage, ap as repairX402ExactSettlementEffect, aq as resolveFxSnapshot, ar as resolvePriceFiat, as as revenueReporterBannerState, at as signAttestation, au as toCreditTerms, av as toJobRecord, ai as toLockPubkey, aw as unknownRouteNotFound, ax as verifyAttestation, ay as verifyIncomingPayment, az as verifyTempoSessionManagementCredential, aA as verifyUpfrontPayment, aB as writeIdentity, aC as x402RequiredUsdcMicro, aD as x402SettledShare } from '../credit-menu-ClA1JyYW.js';
3
3
  import { ProofLike, MeltQuoteBolt11Response, Proof, Wallet, SerializedDLEQ, MintQuoteBolt11Response, MintPreview, OutputDataLike } from '@cashu/cashu-ts';
4
- import { X as JsonValue, B as SignedRequestDomain, M as SignedRequestStatementHeader, Y as FundingReceipt, _ as JobReceipt$1, z as SignedRequestAudience, $ as PaymentRequired, a0 as X402Version, a1 as MppxCredential, a2 as Message, a3 as MessageType, a4 as MppxChallenge, a5 as X402_BATCH_SETTLEMENT_SCHEME, a6 as X402_EXACT_SCHEME, C as Currency, a7 as X402Wallet, a8 as X402Config, a9 as X402ExactVersionSupport, aa as X402Receipt, L as Logger$1, ab as TransactionalPayoutHook, ac as CashuMeltCompleted, K as KVStore } from '../job-store-m2pYmvbr.js';
5
- export { ad as BuildPaymentRequirementsOpts, ae as CapabilityDescriptor, af as CashuMode, ag as CreditDepositPayload, ah as DrainReceipt, ai as DrainReceiptEvent, aj as ExactEvmPayload, ak as ExactEvmPayloadAuthorization, al as FundingLot, am as FundingMethod, an as LotDebit, ao as LotDepletion, ap as MppxServer, aq as NON_CHANNEL_BITCOIN_RAILS, ar as NonChannelBitcoinRail, as as OutgoingMessage, at as PaymentPayload, au as PaymentPayloadV1, av as PaymentPayloadV2, aw as PaymentRequiredV2, ax as PaymentRequirements, ay as PaymentRequirementsV1, az as PaymentRequirementsV2, aA as PayoutReporter, aB as PostgresTempoSessionStore, aC as RAIL_REFUNDABLE, aD as ReceiptCredit, aE as ReceiptOutcome, aF as ReceiptPayment, aG as ResourceInfo, aH as RevenueReporter, aI as SIGNED_ENVELOPE_FIELDS, aJ as SIGNED_ENVELOPE_TYPES, aK as SettleResponse, aL as StaleJobReapable, aM as StepCache, aN as StepRecord, aO as UnsignedDrainReceipt, aP as UnsignedFundingReceipt, aQ as UnsignedJobReceipt, aR as VerifyResponse, aS as X402ResponseBody, aT as X402SelfRelayRpcFailureReason, aU as X402TrackedChannel, aV as X402_DEFAULT_NETWORK, aW as X402_V1_VERSION, aX as X402_VERSION, aY as _testing, aZ as buildPaymentRequiredV2, a_ as buildPaymentRequirements, a$ as caip2ToX402Network, b0 as canonicaliseForSigning, b1 as canonicalize, b2 as chainIdFromCaip2, b3 as computeResultHash, b4 as createDefaultReplayStore, b5 as decodePayment, b6 as decodePaymentRequiredHeader, b7 as depleteLots, b8 as encodePayment, b9 as encodePaymentRequiredHeader, ba as encodeSettleResponseHeader, bb as exactEvmAuthorization, bc as fifoOrder, bd as inKindDrawMsats, be as isArtifactMessage, bf as isDrainReceipt, bg as isFundingReceipt, bh as isInKindDepletion, bi as isNonChannelBitcoinRail, bj as isPaymentRequestMessage, bk as isSignedJobReceipt, bl as isStaleJobReapable, bm as lotOwedSats, bn as netOwedSats, bo as paymentRequiredV2FromV1, bp as settleWithFacilitator, bq as signDrainReceipt, br as signFundingReceipt, bs as signReceipt, bt as usdcContractByCaip2, bu as usdcContractFor, bv as usdcDomainNameFor, bw as usdcDomainVersionFor, bx as verifyDrainReceipt, by as verifyFundingReceipt, bz as verifyReceipt, bA as verifyWithFacilitator, bB as wrapMppx, bC as x402NetworkToCaip2 } from '../job-store-m2pYmvbr.js';
4
+ import { X as JsonValue, B as SignedRequestDomain, M as SignedRequestStatementHeader, Y as FundingReceipt, _ as JobReceipt$1, z as SignedRequestAudience, $ as PaymentRequired, a0 as X402Version, a1 as MppxCredential, a2 as Message, a3 as MessageType, a4 as MppxChallenge, a5 as X402_BATCH_SETTLEMENT_SCHEME, a6 as X402_EXACT_SCHEME, C as Currency, a7 as X402Wallet, a8 as X402Config, a9 as X402ExactVersionSupport, aa as X402Receipt, L as Logger$1, ab as TransactionalPayoutHook, ac as CashuMeltCompleted, K as KVStore } from '../job-store-DxFqDPYq.js';
5
+ export { ad as BuildPaymentRequirementsOpts, ae as CapabilityDescriptor, af as CashuMode, ag as CreditDepositPayload, ah as DrainReceipt, ai as DrainReceiptEvent, aj as ExactEvmPayload, ak as ExactEvmPayloadAuthorization, al as FundingLot, am as FundingMethod, an as LotDebit, ao as LotDepletion, ap as MppxServer, aq as NON_CHANNEL_BITCOIN_RAILS, ar as NonChannelBitcoinRail, as as OutgoingMessage, at as PaymentPayload, au as PaymentPayloadV1, av as PaymentPayloadV2, aw as PaymentRequiredV2, ax as PaymentRequirements, ay as PaymentRequirementsV1, az as PaymentRequirementsV2, aA as PayoutReporter, aB as PostgresTempoSessionStore, aC as RAIL_REFUNDABLE, aD as ReceiptCredit, aE as ReceiptOutcome, aF as ReceiptPayment, aG as ResourceInfo, aH as RevenueReporter, aI as SIGNED_ENVELOPE_FIELDS, aJ as SIGNED_ENVELOPE_TYPES, aK as SettleResponse, aL as StaleJobReapable, aM as StepCache, aN as StepRecord, aO as UnsignedDrainReceipt, aP as UnsignedFundingReceipt, aQ as UnsignedJobReceipt, aR as VerifyResponse, aS as X402ResponseBody, aT as X402SelfRelayRpcFailureReason, aU as X402TrackedChannel, aV as X402_DEFAULT_NETWORK, aW as X402_V1_VERSION, aX as X402_VERSION, aY as _testing, aZ as buildPaymentRequiredV2, a_ as buildPaymentRequirements, a$ as caip2ToX402Network, b0 as canonicaliseForSigning, b1 as canonicalize, b2 as chainIdFromCaip2, b3 as computeResultHash, b4 as createDefaultReplayStore, b5 as decodePayment, b6 as decodePaymentRequiredHeader, b7 as depleteLots, b8 as encodePayment, b9 as encodePaymentRequiredHeader, ba as encodeSettleResponseHeader, bb as exactEvmAuthorization, bc as fifoOrder, bd as inKindDrawMsats, be as isArtifactMessage, bf as isDrainReceipt, bg as isFundingReceipt, bh as isInKindDepletion, bi as isNonChannelBitcoinRail, bj as isPaymentRequestMessage, bk as isPromptMessage, bl as isSignedJobReceipt, bm as isStaleJobReapable, bn as lotOwedSats, bo as netOwedSats, bp as paymentRequiredV2FromV1, bq as settleWithFacilitator, br as signDrainReceipt, bs as signFundingReceipt, bt as signReceipt, bu as usdcContractByCaip2, bv as usdcContractFor, bw as usdcDomainNameFor, bx as usdcDomainVersionFor, by as verifyDrainReceipt, bz as verifyFundingReceipt, bA as verifyReceipt, bB as verifyWithFacilitator, bC as wrapMppx, bD as x402NetworkToCaip2 } from '../job-store-DxFqDPYq.js';
6
6
  import { SimplePool } from 'nostr-tools/pool';
7
7
  import { Session } from 'mppx/tempo';
8
8
  import { Pool } from 'pg';
9
9
  export { Pool } from 'pg';
10
10
  import { PaymentRequired as PaymentRequired$1 } from '@x402/core/types';
11
11
  import { ClientChannelStorage, BatchSettlementClientContext, BatchSettlementEvmScheme } from '@x402/evm/batch-settlement/client';
12
- export { e as FX_CACHE_TTL_MS, g as FX_RETRY_COUNT, w as warmFxSnapshot } from '../fx-Bq4cvn16.js';
13
- export { c as InvalidUsdPriceError, p as parseUsdPrice } from '../usd-DjVAPMlf.js';
12
+ export { e as FX_CACHE_TTL_MS, g as FX_RETRY_COUNT, w as warmFxSnapshot } from '../fx-ptKVFOwq.js';
13
+ export { c as InvalidUsdPriceError, p as parseUsdPrice } from '../usd-Cha_j80I.js';
14
14
  import { Hono } from 'hono';
15
15
  import { Env, BlankSchema } from 'hono/types';
16
16
  import { Store } from 'mppx';
@@ -103,7 +103,46 @@ interface BudgetLedger {
103
103
  }
104
104
  /** Load the persisted ledger. Returns an empty ledger if the file is missing or corrupt. */
105
105
  declare function loadLedger(): BudgetLedger;
106
+ interface RecordSpendOptions {
107
+ msats: number;
108
+ principalMsats?: number;
109
+ routingFeeMsats?: number | null;
110
+ walletDebitMsats?: number | null;
111
+ btcRate: number;
112
+ /** Outflow kind. Defaults to `job`. */
113
+ kind?: BudgetSpendKind;
114
+ jobId: string;
115
+ providerEndpoint: string;
116
+ /** Optional short context label — see {@link BudgetLedgerEntry.label}. */
117
+ label?: string;
118
+ /** Set to `"provider"` when {@link label} is provider-supplied free text. */
119
+ labelSource?: "provider";
120
+ now?: Date;
121
+ }
122
+ /** Append a confirmed spend to the ledger. */
123
+ declare function recordSpend(opts: RecordSpendOptions): void;
124
+ /**
125
+ * Enforce the global budget caps before a planned spend.
126
+ * - If any cap is set, resolves the BTC/USD rate, runs the check, and throws `DvmError("budget_exceeded")` on overflow.
127
+ * - If no cap is set, attempts a best-effort rate resolution for ledger recording (tolerates failure).
128
+ *
129
+ * A rate-provider outage degrades to the last-known cached rate on both branches
130
+ * (internal-review) — a stale rate still enforces caps roughly right, where a hard failure
131
+ * blocked every spend on the branch every default install takes. With caps set and
132
+ * *no* rate at all, `resolveBtcUsdRate` throws `DvmError("rate_unavailable")` and the
133
+ * spend is blocked: an unpriceable spend can't be cap-checked, and recording it as $0
134
+ * would corrupt future cap enforcement.
135
+ *
136
+ * Returns the resolved BTC/USD rate to thread into the post-payment `recordSpend` call so the
137
+ * pre-check and the debit use a single rate.
138
+ */
139
+ declare function enforceGlobalBudget(opts: {
140
+ plannedMsats: number;
141
+ btcRate?: number;
142
+ }): Promise<number>;
106
143
 
144
+ /** Stable response code for unavailable database-backed admin signer state. */
145
+ declare const ADMIN_STATE_UNAVAILABLE = "admin_state_unavailable";
107
146
  /**
108
147
  * Build the canonical 32-byte challenge that an `Authorization: P2PK …`
109
148
  * admin header is signed over. Bind `method || path || dvm_id` so a `GET`
@@ -118,6 +157,35 @@ declare function buildAdminChallenge(args: {
118
157
  nonceHex: string;
119
158
  unixSeconds: number | string;
120
159
  }): Uint8Array;
160
+ /** Parsed components of an `Authorization: P2PK <nonce>.<unix>.<sig>` header. */
161
+ interface AdminAuthHeader {
162
+ /** Full header value, ready to drop into `Authorization`. */
163
+ header: string;
164
+ /** 16-byte hex nonce — exposed so callers/tests can introspect it. */
165
+ nonceHex: string;
166
+ /** Request timestamp in unix seconds — exposed for the same reason. */
167
+ unixSeconds: number;
168
+ }
169
+ /**
170
+ * Build a signed `Authorization: P2PK <nonce>.<unix>.<sig>` header for a
171
+ * dvmkit admin request. The CLI calls this once per request; the
172
+ * `nonceHex` + `unixSeconds` are returned so tests can replay them through
173
+ * `buildAdminChallenge` to verify the signed payload.
174
+ *
175
+ * The privkey must be the per-DVM lock privkey derived via
176
+ * `deriveBuilderLockKeypair` — the same key the DVM advertises on
177
+ * `/v1/info.cashu.lock_pubkeys[0]`.
178
+ */
179
+ declare function buildAdminAuthHeader(args: {
180
+ method: string;
181
+ path: string;
182
+ dvmId: string;
183
+ privkeyHex: string;
184
+ /** Test seam — defaults to `Date.now`. */
185
+ now?: () => number;
186
+ /** Test seam — defaults to `crypto.randomBytes(16)`. */
187
+ randomNonce?: () => Uint8Array;
188
+ }): AdminAuthHeader;
121
189
 
122
190
  /**
123
191
  * Derived per-DVM builder lock keypair. Both halves are hex; the privkey is 32
@@ -380,6 +448,8 @@ declare class DvmError extends Error {
380
448
  }
381
449
  /** Identify provider-authored prose present on one or more remote error objects. */
382
450
  declare function providerProseSources(...sources: (Partial<Record<DvmErrorProseField, unknown>> | undefined)[]): DvmErrorProseSources | undefined;
451
+ /** Detect fetch AbortError / TimeoutError — the two names browsers and Node use for signal-aborted requests. */
452
+ declare function isAbortError(err: unknown): boolean;
383
453
  /** Return the first safe Node/undici transport code found on an error or its causes. */
384
454
  declare function transportErrorCode(err: unknown): string | undefined;
385
455
 
@@ -3151,6 +3221,11 @@ interface CoinGeckoSpot {
3151
3221
  usdc_usd: number;
3152
3222
  as_of: string;
3153
3223
  }
3224
+ /** Bitcoin-only spot snapshot. Counterpart to {@link CoinGeckoSpot}. */
3225
+ interface CoinGeckoBtcSpot {
3226
+ btc_usd: number;
3227
+ as_of: string;
3228
+ }
3154
3229
  /**
3155
3230
  * One raw call to CoinGecko's `simple/price` endpoint for **both** BTC and
3156
3231
  * USDC. No cache, no retry — callers wrap with their own. Use
@@ -3158,6 +3233,12 @@ interface CoinGeckoSpot {
3158
3233
  * variant throws if upstream returns a degraded `usd-coin.usd`.
3159
3234
  */
3160
3235
  declare function fetchCoinGeckoSpot(opts?: CoinGeckoFetchOptions): Promise<CoinGeckoSpot>;
3236
+ /**
3237
+ * One raw call to CoinGecko's `simple/price` endpoint for **BTC only**. No
3238
+ * cache, no retry. Hits the bitcoin-only URL by default — narrower upstream
3239
+ * surface, and a malformed `usd-coin.usd` cannot break this caller.
3240
+ */
3241
+ declare function fetchCoinGeckoBtcUsd(opts?: CoinGeckoFetchOptions): Promise<CoinGeckoBtcSpot>;
3161
3242
 
3162
3243
  /** Parsed components of a Lightning address (user@domain). */
3163
3244
  interface LnAddressParts {
@@ -5286,6 +5367,8 @@ declare function currentContext(service?: string): TraceContext;
5286
5367
  */
5287
5368
  declare function pinDimension(key: string, value: unknown): void;
5288
5369
 
5370
+ /** Postgres NOTIFY channel fired after each successful span batch INSERT. */
5371
+ declare const SPANS_INSERTED_CHANNEL = "spans_inserted";
5289
5372
  /**
5290
5373
  * Buffered span writer. Collects SpanRow objects in memory and flushes them
5291
5374
  * to a transport (direct DB or HTTP POST) on a timer or threshold.
@@ -5328,6 +5411,18 @@ declare class SpanWriter {
5328
5411
  */
5329
5412
  private truncateForSize;
5330
5413
  }
5414
+ /**
5415
+ * Build and execute a multi-row INSERT into observability.spans.
5416
+ * Accepts either typed SpanRow[] or loosely-typed Record<string, unknown>[]
5417
+ * (the HTTP ingestion endpoint validates fields before calling this).
5418
+ */
5419
+ declare function insertSpanBatch(pool: Pool, rows: readonly Record<string, unknown>[] | readonly SpanRow[]): Promise<void>;
5420
+ /** Direct Postgres INSERT transport for platform-api and router. */
5421
+ declare class DbTransport implements SpanTransport {
5422
+ private pool;
5423
+ constructor(pool: Pool);
5424
+ send(rows: SpanRow[]): Promise<void>;
5425
+ }
5331
5426
 
5332
5427
  /** Process-wide singleton loggers object, set by initLoggers(). */
5333
5428
  declare let loggers: Record<DatasetName, Logger>;
@@ -5742,4 +5837,60 @@ declare class MemoryKVStore implements KVStore {
5742
5837
  */
5743
5838
  declare function backupSecretFile(file: string, nextContent?: string): string | null;
5744
5839
 
5745
- export { AccumulatorPool, type AgentProof, type AgentWallet, type AmountLabelOptions, type AttestedDvmIdentity, type BuilderLockKeypair, CAPABILITY_NAME_RE, COINGECKO_SIMPLE_PRICE_URL, CREDIT_DRAIN_RAILS, CREDIT_FUNDING_MODES, CREDIT_FUND_RAILS, type CachedBtcRate, type CancelOptions, type CoinGeckoSpot, CreatedInvoice, type CreditDrainRail, type CreditFundOutcome, type CreditFundRail, type CreditFundStatus, type CreditFundingMode, type CreditMenu, type CreditOpResult, type CreditRailPick, type CreditRailReason, type CreditRailSource, type CreditTerms, type CreditWire, DEFAULT_LOCK_PUBKEY_GRACE_SECONDS, type DeliveredResult, type DescribeOptions, type DrainReceiptChecks, type DrainReceiptVerifyResult, type DrainWire, DvmError, DvmX402ChannelStorage, type FundCreditArgs, FundingReceipt, type FundingReceiptChecks, type FundingReceiptVerifyResult, InvoiceStatus, type JobEnvelope, type JobPolicy, JobReceipt$1 as JobReceipt, type JobStatus, JsonValue, LightningBackend, type LightningFundingOffer, LightningPayment, type LnAddressParts, LockPubkey, type LockPubkeyPool, type LockPubkeyState, type LockPubkeyStateLoader, LockPubkey as LockPubkeyStoreLockPubkey, type MeltQuoteInfo, MemoryKVStore, Message, type MessagePollOptions, MessageType, MppxCredential, NwcBackend, type NwcConnection, NwcError, type NwcRequestOptions, type NwcTransaction, type OutboundMessage, type PayInvoiceOutcome, type PayInvoiceReconcilingOptions, type PayInvoiceResult, type PayOutcome, type Payment, PaymentRequired, type PendingX402ExactFunding, type PendingX402Funding, PostgresTempoChargeStore, type ProviderInfo, type ProviderRef, type ProviderText, type Quote, RECENT_SPENDS_CAP, ROUTER_FEEDBACK_CLAIM_HEADER, ROUTER_FEEDBACK_CLAIM_TTL_MS, type RailFlag, type ReceiptChecks, type ReceiptInvalidReason, type ReceiptKeypair, type ReceiptParseError, type ReceiptTrustAnchor, type ReceiptVerification, type ReceiptVerifyResult, STABLECOIN_FUND_RAILS, SUPPORTED_PROTOCOL_VERSION, type SelectError, type SendMessageOptions, type SpanRow, type SpanTransport, type StatusOptions, type StoredX402ChannelConfig, type StoredX402ChannelMetadata, type StreamOptions, type StreamResult, type SubmitOptions, TEMPO_CHAIN_ID, TEMPO_CLOSE_DB_RECOVERY_BUDGET_MS, TEMPO_CLOSE_REQUESTED_TOPIC, type Transport, type JobReceipt as TransportJobReceipt, type V1InfoCapability, type V1InfoResponse, type VerifyJobReceiptArgs, type WalletInfo, type X402Balance, type X402BatchPayment, type X402ChannelReconciliation, X402Config, type X402ConnectedWallet, X402EnvValidationError, type X402Network, type X402RefundArgs, type X402RefundOutcome, type X402RepinnedWallet, type X402UnobservedBalanceProvenance, X402Version, X402_BATCH_CHANNEL_ABI, X402_BATCH_SETTLEMENT_KEY, X402_BATCH_SETTLEMENT_SCHEME, X402_DEFAULT_FACILITATOR, X402_EXACT_AUTHORIZATION_TTL_SECONDS, X402_EXACT_SCHEME, X402_NETWORKS, X402_PENDING_STALE_MS, X402_RECEIVER_AUTHORIZER_KEY, X402_REFUSAL_TRANSACTION_DISCOVERY_WINDOW_MS, X402_RPC_URL_KEY, X402_SELF_RELAY_KEY, acknowledgeReplayedX402Payment, acknowledgeX402ChannelOwner, activePubkeySet, applyRetryToPool, asProviderText, assertSupportedX402Network, assertValidBudget, assertX402RequirementDescribesChannel, attestedDvmIdentity, authenticatedBuilderPubkey, availableRails, backupSecretFile, buildAdminChallenge, buildTempoCredential, builderLockPath, canReplaceExpiredX402Deposit, cashuSubmissionBindingFingerprint, checkMeltQuoteState, checkReceiptAttestation, clearPendingX402ExactFunding, clearPendingX402Funding, computeSmartDenominations, connectedX402Payer, costAnchor, createAdminCashuNonceStore, createInstrumentedFetch, createMonotonicClock, createNoopLogger, createStdoutLogger, createX402BatchPayment, currentContext, deriveBuilderLockKeypair, deriveBuilderLockPubkey, deriveReceiptKeypair, deriveReceiptSecret, drainReceiptsDisplay, drainReceiptsHint, ensureAddress, epochMsToIso, fetchBtcUsdRate, fetchCoinGeckoSpot, fetchLnurlPayInvoice, fetchMeltQuote, findX402Channel, formatAmount, formatAmountBestEffort, formatPaymentAmount, formatSats, formatStaleness, formatUsd, formatUsdcMicrounits, fundCredit, fundingModeForTempoIntent, fundingModeForX402Flavour, generateEphemeralReceiptKey, generateX402PrivateKey, getBalance, getInfo, getInputFeesForProofs, getLastKnownBtcRate, getWallet, getX402Balance, hashedCanonicalDvmId, humanizeZodError, initLockPubkeyTable, initLoggers, installAdminCashuRoutes, isCreditFundRail, isCreditFundingMode, isStablecoinFundRail, issueRouterFeedbackClaim, jobCredentialGate, listPendingX402Fundings, listPendingX402FundingsForChannel, listResumableX402ExactFundings, listResumableX402Fundings, listTempoChannelAssociations, listX402Channels, loadAgentWallet, loadConfiguredMints, loadLedger, loadLockPubkeyState, loadResumableX402ExactFunding, loadResumableX402Funding, loadTempoChannelEntry, loadX402Wallet, loggers, lookupInvoice, makeInvoice, maxKeysetDenomination, missingDleqRecoveryDiagnostic, monetaryJson, msatsToUsd, msatsToUsdCents, msatsToUsdc, normalizeFeedbackEndpointHost, nwcDedupWindowMs, nwcTimeoutMs, offersX402CreditFunding, parseBudget, parseCreditMenu, parseCreditTerms, parseLnAddress, parseNwcUri, payInvoiceReconciling, pickCreditFundRail, pinDimension, planCreditForQuote, pollPendingCreditFundings, preferLightningFirst, prepareP2PKMint, processX402BatchCorrection, processX402BatchResponse, processX402BatchResponseForWallet, providerProseSources, providerTextToString, pruneRetired, randomTraceId, rateUnavailablePaymentError, receiptDisplay, receiptFailureDetail, receiptHint, receiptIssuedAtIso, receiptPubkeyFromSecret, reconcileRefusedX402Deposits, recordPendingX402ExactFunding, recordPendingX402Funding, recordX402ChannelMetadata, refundX402BatchChannel, removeX402Wallet, repinX402WalletNetwork, resolveLnurlPayMetadataUrl, resolveRpcHttpTransportOptions, resolveRpcOverride, restoreProofsFromOutputs, retirePendingX402Funding, rotateLockPubkey, saveAgentWallet, saveX402Wallet, seedLockPubkeyState, selectProofsForSpend, serializeOutputData, setEmitter, signDvmRequestData, signRequestData, signedRequestDomain, swapFeeForProofs, swapSendReserve, tempoCredentialAmountMicro, transportErrorCode, usdToMsats, usdcToMsats, validateLnAddress, validateX402Env, verifyCanonicalSignedRequest, verifyDrainReceiptChain, verifyFundingReceiptChain, verifyJobReceipt, verifyRouterFeedbackClaim, verifyX402Payment, weakestReceiptVerdict, withInitRetry, withNwcPool, withTraceContext, withWalletLock, withX402ChannelLock, x402ChannelBalanceUnreconciledAt, x402ExactFundingDead, x402NetworkByCaip2, x402NetworkBySlug, x402NetworkLabel, x402NetworkListForCopy, x402PendingBlockExpiresAt, x402PendingDepositExpiresAt, x402PendingFundingJson, x402PendingRetired, x402PendingStale, x402PendingUnsettled, x402RequiredFromError, x402SupportedNetworksHint, x402VoucherPendingRefusal };
5840
+ /**
5841
+ * The caller-facing rail vocabulary: one noun per rail, in three registers.
5842
+ *
5843
+ * `fundingRailLabel` is the table. `paymentRailLabel` and `probeRailLabel` are
5844
+ * registers of it rather than parallel copies, so a caller crossing between
5845
+ * `dvm wallet`, `dvm doctor`, `dvm quote`, `dvm pay` and `dvm credit` is told
5846
+ * about one thing per rail rather than three (internal-review).
5847
+ *
5848
+ * **Rail-choice menus are the one caller-facing surface that deliberately does
5849
+ * not read from here.** `dvm wallet setup`'s onramp titles and the NWC float
5850
+ * row beside them — both in the caller CLI, which lives in its own repository —
5851
+ * lead with the protocol name — `Cashu — Bitcoin / Lightning`, not
5852
+ * `ecash — Bitcoin / Lightning` — because at the moment of choosing, the
5853
+ * protocol name *is* the information: it's what identifies the row to someone
5854
+ * who already holds that money, and it's the literal `--rail` value they type
5855
+ * next. internal-review wrote that
5856
+ * carve-out into the payment-language rule — a caller meets protocol terms
5857
+ * "only when choosing a rail, troubleshooting, or managing custody and exits"
5858
+ * — and internal-review settled that the onramp titles fall under it.
5859
+ *
5860
+ * Those titles carry the plain language in their second half, after the dash:
5861
+ * `<protocol name> — <what the money is>`. Everything downstream of the choice
5862
+ * — a balance, a quote, a credit row, a diagnosis — glosses from this file.
5863
+ * `__tests__/rail-naming-contract.ts` holds both registers as literals, so
5864
+ * neither can drift into the other silently.
5865
+ */
5866
+
5867
+ /**
5868
+ * Human wording for every funding rail, exhaustive over the rail registry, so
5869
+ * adding a rail to `CREDIT_FUND_RAILS` is a compile error here by design.
5870
+ *
5871
+ * Rail keys are wire and config identifiers: `cashu`, `cashu_p2pk` and `tempo`
5872
+ * are protocol and locking-scheme names rather than things a human recognizes
5873
+ * owning. Prose that a human reads gets the gloss; the raw key stays in the
5874
+ * machine fields beside it.
5875
+ *
5876
+ * This is the single table every caller-facing surface reads (internal-review). The
5877
+ * twins below are registers of it, not parallel copies — `dvm wallet`,
5878
+ * `dvm doctor`, `dvm quote`, `dvm pay` and `dvm credit` all land on one noun
5879
+ * per rail, so a caller crossing between commands isn't told about three
5880
+ * different things.
5881
+ */
5882
+ declare function fundingRailLabel(rail: CreditFundRail): string;
5883
+
5884
+ /** Quote one argument for safe copy/paste into a POSIX shell command. */
5885
+ declare function shellQuoteArg(value: string): string;
5886
+
5887
+ /**
5888
+ * Verify a BIP-340 Schnorr signature against a 32-byte challenge and a
5889
+ * compressed (33-byte, `02`/`03` prefix) or x-only (32-byte) public key.
5890
+ * Compressed inputs have their parity byte dropped — BIP-340 keys are
5891
+ * x-only — and the y-coordinate is recomputed inside cashu-ts when
5892
+ * needed.
5893
+ */
5894
+ declare function verifyChallenge(pubkeyHex: string, challenge: Uint8Array, sigHex: string): boolean;
5895
+
5896
+ export { ADMIN_STATE_UNAVAILABLE, AccumulatorPool, type AgentProof, type AgentWallet, type AmountLabelOptions, type AttestedDvmIdentity, type BuilderLockKeypair, CAPABILITY_NAME_RE, COINGECKO_SIMPLE_PRICE_URL, CREDIT_DRAIN_RAILS, CREDIT_FUNDING_MODES, CREDIT_FUND_RAILS, type CachedBtcRate, type CancelOptions, type CoinGeckoBtcSpot, type CoinGeckoSpot, CreatedInvoice, type CreditDrainRail, type CreditFundOutcome, type CreditFundRail, type CreditFundStatus, type CreditFundingMode, type CreditMenu, type CreditOpResult, type CreditRailPick, type CreditRailReason, type CreditRailSource, type CreditTerms, type CreditWire, DEFAULT_LOCK_PUBKEY_GRACE_SECONDS, DbTransport, type DeliveredResult, type DescribeOptions, type DrainReceiptChecks, type DrainReceiptVerifyResult, type DrainWire, type DrawCeilingSource, type DrawSkip, DvmError, DvmX402ChannelStorage, type FundCreditArgs, FundingReceipt, type FundingReceiptChecks, type FundingReceiptVerifyResult, InvoiceStatus, type JobEnvelope, type JobPolicy, JobReceipt$1 as JobReceipt, type JobStatus, JsonValue, LightningBackend, type LightningFundingOffer, LightningPayment, LightningWalletInfo, type LnAddressParts, LockPubkey, type LockPubkeyPool, type LockPubkeyState, type LockPubkeyStateLoader, LockPubkey as LockPubkeyStoreLockPubkey, type MeltQuoteInfo, MemoryKVStore, Message, type MessagePollOptions, MessageType, MppxChallenge, MppxCredential, NwcBackend, type NwcConnection, NwcError, type NwcRequestOptions, type NwcTransaction, type OutboundMessage, type PayInvoiceOutcome, type PayInvoiceReconcilingOptions, type PayInvoiceResult, type PayOutcome, type Payment, PaymentRequired, type PendingX402ExactFunding, type PendingX402Funding, type PersistedOutputData, PostgresTempoChargeStore, type ProviderInfo, type ProviderRef, type ProviderText, type Quote, RECENT_SPENDS_CAP, ROUTER_FEEDBACK_CLAIM_HEADER, ROUTER_FEEDBACK_CLAIM_TTL_MS, type RailFlag, type ReceiptChecks, type ReceiptInvalidReason, type ReceiptKeypair, type ReceiptParseError, type ReceiptTrustAnchor, type ReceiptVerification, type ReceiptVerifyResult, SPANS_INSERTED_CHANNEL, STABLECOIN_FUND_RAILS, SUPPORTED_PROTOCOL_VERSION, type SelectError, type SendMessageOptions, type SpanRow, type SpanTransport, SpanWriter, type StatusOptions, type StoredX402ChannelConfig, type StoredX402ChannelMetadata, type StreamOptions, type StreamResult, type SubmitOptions, type SuppressedPurchase, TEMPO_CHAIN_ID, TEMPO_CLOSE_DB_RECOVERY_BUDGET_MS, TEMPO_CLOSE_REQUESTED_TOPIC, type Transport, type JobReceipt as TransportJobReceipt, type V1InfoCapability, type V1InfoResponse, type VerifyJobReceiptArgs, type WalletInfo, type X402Balance, type X402BatchPayment, type X402ChannelReconciliation, X402Config, type X402ConnectedWallet, type X402CreditFlavour, type X402CreditInstrument, X402EnvValidationError, type X402Network, type X402RefundArgs, type X402RefundOutcome, type X402RepinnedWallet, type X402UnobservedBalanceProvenance, X402Version, X402_BATCH_CHANNEL_ABI, X402_BATCH_SETTLEMENT_KEY, X402_BATCH_SETTLEMENT_SCHEME, X402_DEFAULT_FACILITATOR, X402_EXACT_AUTHORIZATION_TTL_SECONDS, X402_EXACT_SCHEME, X402_NETWORKS, X402_PENDING_STALE_MS, X402_RECEIVER_AUTHORIZER_KEY, X402_REFUSAL_TRANSACTION_DISCOVERY_WINDOW_MS, X402_RPC_URL_KEY, X402_SELF_RELAY_KEY, acknowledgeReplayedX402Payment, acknowledgeX402ChannelOwner, activePubkeySet, applyRetryToPool, asProviderText, assertSupportedX402Network, assertValidBudget, assertX402RequirementDescribesChannel, attestedDvmIdentity, authenticatedBuilderPubkey, availableRails, backupSecretFile, buildAdminAuthHeader, buildAdminChallenge, buildTempoCredential, builderLockPath, canReplaceExpiredX402Deposit, cashuSubmissionBindingFingerprint, checkMeltQuoteState, checkReceiptAttestation, clearPendingX402ExactFunding, clearPendingX402Funding, computeSmartDenominations, connectedX402Payer, costAnchor, createAdminCashuNonceStore, createInstrumentedFetch, createMonotonicClock, createNoopLogger, createStdoutLogger, createX402BatchPayment, currentContext, deriveBuilderLockKeypair, deriveBuilderLockPubkey, deriveReceiptKeypair, deriveReceiptSecret, drainReceiptsDisplay, drainReceiptsHint, enforceGlobalBudget, ensureAddress, epochMsToIso, fetchBtcUsdRate, fetchCoinGeckoBtcUsd, fetchCoinGeckoSpot, fetchLnurlPayInvoice, fetchMeltQuote, findX402Channel, formatAmount, formatAmountBestEffort, formatPaymentAmount, formatSats, formatStaleness, formatUsd, formatUsdcMicrounits, fundCredit, fundingModeForTempoIntent, fundingModeForX402Flavour, fundingRailLabel, generateEphemeralReceiptKey, generateX402PrivateKey, getBalance, getInfo, getInputFeesForProofs, getLastKnownBtcRate, getWallet, getX402Balance, hashedCanonicalDvmId, humanizeZodError, initLockPubkeyTable, initLoggers, insertSpanBatch, installAdminCashuRoutes, isAbortError, isCreditFundRail, isCreditFundingMode, isStablecoinFundRail, issueRouterFeedbackClaim, jobCredentialGate, listPendingX402Fundings, listPendingX402FundingsForChannel, listResumableX402ExactFundings, listResumableX402Fundings, listTempoChannelAssociations, listX402Channels, loadAgentWallet, loadConfiguredMints, loadLedger, loadLockPubkeyState, loadResumableX402ExactFunding, loadResumableX402Funding, loadTempoChannelEntry, loadX402Wallet, loggers, lookupInvoice, makeInvoice, maxKeysetDenomination, missingDleqRecoveryDiagnostic, monetaryJson, msatsToUsd, msatsToUsdCents, msatsToUsdc, normalizeFeedbackEndpointHost, nwcDedupWindowMs, nwcTimeoutMs, offersX402CreditFunding, parseBudget, parseCreditMenu, parseCreditTerms, parseLnAddress, parseNwcUri, payInvoiceReconciling, pickCreditFundRail, pinDimension, planCreditForQuote, pollPendingCreditFundings, preferLightningFirst, prepareP2PKMint, processX402BatchCorrection, processX402BatchResponse, processX402BatchResponseForWallet, providerProseSources, providerTextToString, pruneRetired, randomTraceId, rateUnavailablePaymentError, receiptDisplay, receiptFailureDetail, receiptHint, receiptIssuedAtIso, receiptPubkeyFromSecret, reconcileRefusedX402Deposits, recordPendingX402ExactFunding, recordPendingX402Funding, recordSpend, recordX402ChannelMetadata, refundX402BatchChannel, removeX402Wallet, repinX402WalletNetwork, resolveLnurlPayMetadataUrl, resolveRpcHttpTransportOptions, resolveRpcOverride, restoreProofsFromOutputs, retirePendingX402Funding, rotateLockPubkey, saveAgentWallet, saveX402Wallet, seedLockPubkeyState, selectProofsForSpend, serializeOutputData, setEmitter, shellQuoteArg, signDvmRequestData, signRequestData, signedRequestDomain, swapFeeForProofs, swapSendReserve, tempoCredentialAmountMicro, transportErrorCode, usdToMsats, usdcToMsats, validateLnAddress, validateX402Env, verifyCanonicalSignedRequest, verifyChallenge, verifyDrainReceiptChain, verifyFundingReceiptChain, verifyJobReceipt, verifyRouterFeedbackClaim, verifyX402Payment, weakestReceiptVerdict, withInitRetry, withNwcPool, withTraceContext, withWalletLock, withX402ChannelLock, x402ChannelBalanceUnreconciledAt, x402ExactFundingDead, x402NetworkByCaip2, x402NetworkBySlug, x402NetworkLabel, x402NetworkListForCopy, x402PendingBlockExpiresAt, x402PendingDepositExpiresAt, x402PendingFundingJson, x402PendingRetired, x402PendingStale, x402PendingUnsettled, x402RequiredFromError, x402SupportedNetworksHint, x402VoucherPendingRefusal };
@@ -8,6 +8,7 @@ import {
8
8
  connectedTempoAccount,
9
9
  createTempoCreditSession,
10
10
  createTempoSessionPaymentFetch,
11
+ fundingRailLabel,
11
12
  listResumableTempoChargeFundings,
12
13
  listTempoChannelAssociations,
13
14
  loadResumableTempoChargeFunding,
@@ -18,6 +19,7 @@ import {
18
19
  offersTempoCreditSession,
19
20
  persistTempoOpenCredential,
20
21
  recordPendingTempoChargeFunding,
22
+ shellQuoteArg,
21
23
  tempoChargeCredentialSettleable,
22
24
  tempoSessionAssociationByKey,
23
25
  tempoSessionChallenge,
@@ -28,7 +30,7 @@ import {
28
30
  tempoSessionPriorCumulativeMicro,
29
31
  withTempoChannelLock,
30
32
  withholdsTempoCreditSession
31
- } from "../chunk-YD3TZNXV.js";
33
+ } from "../chunk-EDU6COY2.js";
32
34
  import {
33
35
  DvmX402ChannelStorage,
34
36
  X402_EXACT_AUTHORIZATION_TTL_SECONDS,
@@ -71,7 +73,7 @@ import {
71
73
  x402PendingRetired,
72
74
  x402PendingStale,
73
75
  x402PendingUnsettled
74
- } from "../chunk-RHP3BRTH.js";
76
+ } from "../chunk-GJD7PVWY.js";
75
77
  import {
76
78
  SUPPORTED_PROTOCOL_VERSION,
77
79
  clearPendingFunding,
@@ -92,7 +94,7 @@ import {
92
94
  recordPendingFunding,
93
95
  updateConfig,
94
96
  withinAdvertisedTolerance
95
- } from "../chunk-FT7IM66W.js";
97
+ } from "../chunk-2K6UXDAN.js";
96
98
  import {
97
99
  RevenueReporter
98
100
  } from "../chunk-2ABMGUDS.js";
@@ -110,12 +112,16 @@ import {
110
112
  CAPABILITY_NAME_RE
111
113
  } from "../chunk-XYTSDAPH.js";
112
114
  import {
115
+ ADMIN_STATE_UNAVAILABLE,
113
116
  DEFAULT_LOCK_PUBKEY_GRACE_SECONDS,
117
+ DbTransport,
114
118
  MintHealthTracker,
115
119
  NwcBackend,
116
120
  NwcError,
117
121
  PAYMENT_PROOF_KEYS,
118
122
  RECENT_SPENDS_CAP,
123
+ SPANS_INSERTED_CHANNEL,
124
+ SpanWriter,
119
125
  TEMPO_CLOSE_DB_RECOVERY_BUDGET_MS,
120
126
  TEMPO_CLOSE_REQUESTED_TOPIC,
121
127
  TEMPO_SESSION_UPDATED_REASON,
@@ -134,6 +140,7 @@ import {
134
140
  attestedDvmIdentity,
135
141
  authenticatedBuilderPubkey,
136
142
  backupSecretFile,
143
+ buildAdminAuthHeader,
137
144
  buildAdminChallenge,
138
145
  buildAttestation,
139
146
  buildPaymentErrorResponse,
@@ -166,6 +173,7 @@ import {
166
173
  initLockPubkeyTable,
167
174
  initWalletAccumulatorTable,
168
175
  insertAccumulatorRows,
176
+ insertSpanBatch,
169
177
  installAdminCashuRoutes,
170
178
  isDerivedCreditId,
171
179
  isDrainReceipt,
@@ -212,6 +220,7 @@ import {
212
220
  unknownRouteNotFound,
213
221
  validateX402Env,
214
222
  verifyAttestation,
223
+ verifyChallenge,
215
224
  verifyDrainReceipt,
216
225
  verifyDrainReceiptChain,
217
226
  verifyFundingReceipt,
@@ -227,7 +236,7 @@ import {
227
236
  writeIdentity,
228
237
  x402RequiredUsdcMicro,
229
238
  x402SettledShare
230
- } from "../chunk-C2DC4FKR.js";
239
+ } from "../chunk-4UVRXDNY.js";
231
240
  import {
232
241
  X402_BATCH_SETTLEMENT_SCHEME,
233
242
  X402_DEFAULT_FACILITATOR,
@@ -260,7 +269,7 @@ import {
260
269
  x402NetworkListForCopy,
261
270
  x402NetworkToCaip2,
262
271
  x402SupportedNetworksHint
263
- } from "../chunk-XY5Y5REG.js";
272
+ } from "../chunk-AAJNGQMC.js";
264
273
  import {
265
274
  BUDGET_FILE,
266
275
  COINGECKO_SIMPLE_PRICE_URL,
@@ -270,6 +279,7 @@ import {
270
279
  costAnchor,
271
280
  ensureConfigDir,
272
281
  fetchBtcUsdRate,
282
+ fetchCoinGeckoBtcUsd,
273
283
  fetchCoinGeckoSpot,
274
284
  formatAmount,
275
285
  formatAmountBestEffort,
@@ -279,6 +289,7 @@ import {
279
289
  formatUsd,
280
290
  formatUsdcMicrounits,
281
291
  getLastKnownBtcRate,
292
+ isAbortError,
282
293
  monetaryJson,
283
294
  msatsToUsd,
284
295
  msatsToUsdCents,
@@ -290,7 +301,7 @@ import {
290
301
  transportErrorCode,
291
302
  usdToMsats,
292
303
  usdcToMsats
293
- } from "../chunk-5SO7ZVOH.js";
304
+ } from "../chunk-F2L6KIMD.js";
294
305
  import "../chunk-EXHBXA4U.js";
295
306
  import {
296
307
  RAIL_REFUNDABLE,
@@ -6033,6 +6044,9 @@ function sleep(ms) {
6033
6044
  }
6034
6045
 
6035
6046
  // src/lib/messages/types.ts
6047
+ function isPromptMessage(msg) {
6048
+ return msg.type === "prompt";
6049
+ }
6036
6050
  function isArtifactMessage(msg) {
6037
6051
  return msg.type === "artifact";
6038
6052
  }
@@ -6048,12 +6062,14 @@ function providerTextToString(value) {
6048
6062
  return typeof value === "string" ? value : value.text;
6049
6063
  }
6050
6064
  export {
6065
+ ADMIN_STATE_UNAVAILABLE,
6051
6066
  CAPABILITY_NAME_RE,
6052
6067
  COINGECKO_SIMPLE_PRICE_URL,
6053
6068
  CREDIT_DRAIN_RAILS,
6054
6069
  CREDIT_FUNDING_MODES,
6055
6070
  CREDIT_FUND_RAILS,
6056
6071
  DEFAULT_LOCK_PUBKEY_GRACE_SECONDS,
6072
+ DbTransport,
6057
6073
  DvmError,
6058
6074
  DvmX402ChannelStorage,
6059
6075
  FX_CACHE_TTL_MS,
@@ -6076,8 +6092,10 @@ export {
6076
6092
  RevenueReporter,
6077
6093
  SIGNED_ENVELOPE_FIELDS,
6078
6094
  SIGNED_ENVELOPE_TYPES,
6095
+ SPANS_INSERTED_CHANNEL,
6079
6096
  STABLECOIN_FUND_RAILS,
6080
6097
  SUPPORTED_PROTOCOL_VERSION,
6098
+ SpanWriter,
6081
6099
  StepCache,
6082
6100
  TEMPO_CHAIN_ID,
6083
6101
  TEMPO_CLOSE_DB_RECOVERY_BUDGET_MS,
@@ -6117,6 +6135,7 @@ export {
6117
6135
  authenticatedBuilderPubkey,
6118
6136
  availableRails,
6119
6137
  backupSecretFile,
6138
+ buildAdminAuthHeader,
6120
6139
  buildAdminChallenge,
6121
6140
  buildAttestation,
6122
6141
  buildPaymentErrorResponse,
@@ -6165,10 +6184,12 @@ export {
6165
6184
  encodePayment,
6166
6185
  encodePaymentRequiredHeader,
6167
6186
  encodeSettleResponseHeader,
6187
+ enforceGlobalBudget,
6168
6188
  ensureAddress,
6169
6189
  epochMsToIso,
6170
6190
  exactEvmAuthorization,
6171
6191
  fetchBtcUsdRate,
6192
+ fetchCoinGeckoBtcUsd,
6172
6193
  fetchCoinGeckoSpot,
6173
6194
  fetchLnurlPayInvoice,
6174
6195
  fetchMeltQuote,
@@ -6186,6 +6207,7 @@ export {
6186
6207
  fundedMicroFor,
6187
6208
  fundingModeForTempoIntent,
6188
6209
  fundingModeForX402Flavour,
6210
+ fundingRailLabel,
6189
6211
  generateEphemeralReceiptKey,
6190
6212
  generateIdentity,
6191
6213
  generateX402PrivateKey,
@@ -6206,7 +6228,9 @@ export {
6206
6228
  initLoggers,
6207
6229
  initWalletAccumulatorTable,
6208
6230
  insertAccumulatorRows,
6231
+ insertSpanBatch,
6209
6232
  installAdminCashuRoutes,
6233
+ isAbortError,
6210
6234
  isArtifactMessage,
6211
6235
  isCreditFundRail,
6212
6236
  isCreditFundingMode,
@@ -6216,6 +6240,7 @@ export {
6216
6240
  isInKindDepletion,
6217
6241
  isNonChannelBitcoinRail,
6218
6242
  isPaymentRequestMessage,
6243
+ isPromptMessage,
6219
6244
  isSignedJobReceipt,
6220
6245
  isStablecoinFundRail,
6221
6246
  isStaleJobReapable,
@@ -6291,6 +6316,7 @@ export {
6291
6316
  reconcileRefusedX402Deposits,
6292
6317
  recordPendingX402ExactFunding,
6293
6318
  recordPendingX402Funding,
6319
+ recordSpend,
6294
6320
  recordX402ChannelMetadata,
6295
6321
  refundX402BatchChannel,
6296
6322
  removeX402Wallet,
@@ -6312,6 +6338,7 @@ export {
6312
6338
  serializeOutputData,
6313
6339
  setEmitter,
6314
6340
  settleWithFacilitator,
6341
+ shellQuoteArg,
6315
6342
  signAttestation,
6316
6343
  signDrainReceipt,
6317
6344
  signDvmRequestData,
@@ -6337,6 +6364,7 @@ export {
6337
6364
  validateX402Env,
6338
6365
  verifyAttestation,
6339
6366
  verifyCanonicalSignedRequest,
6367
+ verifyChallenge,
6340
6368
  verifyDrainReceipt,
6341
6369
  verifyDrainReceiptChain,
6342
6370
  verifyFundingReceipt,
@@ -635,6 +635,11 @@ type Message = (MessageBase & {
635
635
  type: "progress";
636
636
  content: ProgressContent;
637
637
  });
638
+ /** Type guard: message is a prompt from the provider. */
639
+ declare function isPromptMessage(msg: Message): msg is MessageBase & {
640
+ type: "prompt";
641
+ content: PromptContent;
642
+ };
638
643
  /** Type guard: message contains an artifact. */
639
644
  declare function isArtifactMessage(msg: Message): msg is MessageBase & {
640
645
  type: "artifact";
@@ -6828,4 +6833,4 @@ interface StaleJobReapable {
6828
6833
  /** Runtime type guard for StaleJobReapable. */
6829
6834
  declare function isStaleJobReapable(store: JobStore): store is JobStore & StaleJobReapable;
6830
6835
 
6831
- export { type PaymentRequired as $, type ApprovalContent as A, type SignedRequestDomain as B, type Currency as C, type DVMConfig as D, SignedRequestError as E, type SignedRequestFailure as F, type SignedRequestReplayStore as G, type SignedRequestSignOpts as H, type IncomingMessage as I, type JobRecord as J, type KVStore as K, type Logger as L, type SignedRequestStatementHeader as M, type SignedRequestVerifier as N, createSignedRequestVerifier as O, type PaymentContent as P, type QuoteConfig as Q, type ResolvedCreditConfig as R, type SDKJobContext as S, isZodSchema as T, UnsupportedCurrencyError as U, signedRequestStatementHeader as V, validateCurrency as W, type JsonValue as X, type FundingReceipt as Y, type ZodLike as Z, type JobReceipt as _, type DVMDescriptor as a, caip2ToX402Network as a$, type X402Version as a0, type MppxCredential as a1, type Message as a2, type MessageType as a3, type MppxChallenge as a4, X402_BATCH_SETTLEMENT_SCHEME as a5, X402_EXACT_SCHEME as a6, type X402Wallet as a7, type X402Config as a8, type X402ExactVersionSupport as a9, PayoutReporter as aA, PostgresTempoSessionStore as aB, RAIL_REFUNDABLE as aC, type ReceiptCredit as aD, type ReceiptOutcome as aE, type ReceiptPayment as aF, type ResourceInfo as aG, RevenueReporter as aH, SIGNED_ENVELOPE_FIELDS as aI, SIGNED_ENVELOPE_TYPES as aJ, type SettleResponse as aK, type StaleJobReapable as aL, StepCache as aM, type StepRecord as aN, type UnsignedDrainReceipt as aO, type UnsignedFundingReceipt as aP, type UnsignedJobReceipt as aQ, type VerifyResponse as aR, type X402ResponseBody as aS, type X402SelfRelayRpcFailureReason as aT, type X402TrackedChannel as aU, X402_DEFAULT_NETWORK as aV, X402_V1_VERSION as aW, X402_VERSION as aX, _testing as aY, buildPaymentRequiredV2 as aZ, buildPaymentRequirements as a_, type X402Receipt as aa, type TransactionalPayoutHook as ab, type CashuMeltCompleted as ac, type BuildPaymentRequirementsOpts as ad, type CapabilityDescriptor as ae, type CashuMode as af, type CreditDepositPayload as ag, type DrainReceipt as ah, type DrainReceiptEvent as ai, type ExactEvmPayload as aj, type ExactEvmPayloadAuthorization as ak, type FundingLot as al, type FundingMethod as am, type LotDebit as an, type LotDepletion as ao, type MppxServer as ap, NON_CHANNEL_BITCOIN_RAILS as aq, type NonChannelBitcoinRail as ar, type OutgoingMessage as as, type PaymentPayload as at, type PaymentPayloadV1 as au, type PaymentPayloadV2 as av, type PaymentRequiredV2 as aw, type PaymentRequirements as ax, type PaymentRequirementsV1 as ay, type PaymentRequirementsV2 as az, type ArtifactContent as b, type DrainRequestResult as b$, canonicaliseForSigning as b0, canonicalize as b1, chainIdFromCaip2 as b2, computeResultHash as b3, createDefaultReplayStore as b4, decodePayment as b5, decodePaymentRequiredHeader as b6, depleteLots as b7, encodePayment as b8, encodePaymentRequiredHeader as b9, verifyWithFacilitator as bA, wrapMppx as bB, x402NetworkToCaip2 as bC, type CreditDrainEnqueue as bD, type DVMAuthScheme as bE, type CreditLedgerLike as bF, type X402RefundSettlementGate as bG, type CreditSnapshot as bH, type DrawResult as bI, type X402SettlementStatus as bJ, type X402UnresolvedRefund as bK, type GrownDrawResult as bL, type DrawResolution as bM, type FundingRecord as bN, type CreditInvoiceRecord as bO, type InvoiceSettlement as bP, type BlockedInvoiceCursor as bQ, type InvoiceReconciliation as bR, type InvoiceWriteOff as bS, type DrawRecord as bT, type StalePendingDrawCursor as bU, type TempoCreditLossEvidence as bV, type CreditLedgerQuerier as bW, type TempoCreditLoss as bX, type X402CreditLossEvidence as bY, type X402CreditLoss as bZ, type DrainMethod as b_, encodeSettleResponseHeader as ba, exactEvmAuthorization as bb, fifoOrder as bc, inKindDrawMsats as bd, isArtifactMessage as be, isDrainReceipt as bf, isFundingReceipt as bg, isInKindDepletion as bh, isNonChannelBitcoinRail as bi, isPaymentRequestMessage as bj, isSignedJobReceipt as bk, isStaleJobReapable as bl, lotOwedSats as bm, netOwedSats as bn, paymentRequiredV2FromV1 as bo, settleWithFacilitator as bp, signDrainReceipt as bq, signFundingReceipt as br, signReceipt as bs, usdcContractByCaip2 as bt, usdcContractFor as bu, usdcDomainNameFor as bv, usdcDomainVersionFor as bw, verifyDrainReceipt as bx, verifyFundingReceipt as by, verifyReceipt as bz, type CancelContent as c, type X402SettlementReconciliationReason as c$, type BitcoinDepositLiability as c0, type CreditDrainRecord as c1, type ChannelDrainCursor as c2, type DrainWriteOff as c3, type DrainReleaseResult as c4, type DrainFulfilment as c5, type DrainTransitionResult as c6, type StreamableJobStore as c7, type ReceiptIssuingStore as c8, type RequestIdClaim as c9, type RevenueSkippedNoRailPayload as cA, type RevenueSkippedNoRailReason as cB, type Secp256k1AuthOpts as cC, type X402ChannelStorageOpts as cD, type X402RelayLockHolder as cE, type X402RelaySubmissionLock as cF, X402RelaySubmissionLockError as cG, allocateDrawValue as cH, clientCompatibilityAttributes as cI, clientCompatibilityMiddleware as cJ, clientUpgradeRequired as cK, isStreamableJobStore as cL, parseClientCapabilities as cM, parseClientCompatibility as cN, parseDvmClient as cO, parseProtocolVersion as cP, requireClientCompatibility as cQ, secp256k1Auth as cR, signedRequestInput as cS, type CreditDepositEnqueue as cT, type TopUpCapUnenforcedReason as cU, type X402SettlementIntent as cV, type X402SettlementCursor as cW, type X402SettlementWriteOff as cX, type X402FacilitatorAuth as cY, type X402BatchSettlementConfig as cZ, type X402PayoutObserver as c_, type RequestIdClaimResult as ca, type AppendOutgoingOptions as cb, type PaymentCreditDelta as cc, type VerifyAndCreditResult as cd, type JobCounters as ce, CLIENT_COMPATIBILITY_HEADERS as cf, type ClientCompatibility as cg, type ClientCompatibilityEnv as ch, type ClientCompatibilityGate as ci, type ClientCompatibilityRequirement as cj, type ClientSemVer as ck, type CreditFundingBasis as cl, type CreditInvoiceStatus as cm, CreditLedger as cn, CreditLedgerError as co, type CreditLedgerErrorCode as cp, type CreditLedgerErrorDetails as cq, type CreditLedgerPool as cr, type CreditStatus as cs, DRAIN_DELIVERY_RESERVE_SATS as ct, DVM_PROTOCOL_VERSION as cu, type DrainConflictReason as cv, type DrawRailValue as cw, type DrawStatus as cx, PostgresX402ChannelStorage as cy, type ReplayStoreBackend as cz, type CanonicalEnvelope as d, type CreditDrawReleaseEnqueue as d0, type CreateSignedRequestVerifierOpts as e, type CreditConfig as f, type CreditView as g, DEFAULT_CREDIT_MAX as h, DEFAULT_CREDIT_MIN as i, DEFAULT_CREDIT_TTL_SECONDS as j, type DVMRouteContext as k, type InputType as l, InvalidCurrencyError as m, type JobStatus as n, type JobStore as o, type PaymentMethod as p, type PriceValue as q, type ProgressContent as r, type PromptOpts as s, type QuoteContext as t, type QuoteResult as u, type ResponseContent as v, type SDKPaymentRequestOpts as w, SIGNED_REQUEST_AUTH_ID as x, SIGNED_REQUEST_STATEMENT_VERSION as y, type SignedRequestAudience as z };
6836
+ export { type PaymentRequired as $, type ApprovalContent as A, type SignedRequestDomain as B, type Currency as C, type DVMConfig as D, SignedRequestError as E, type SignedRequestFailure as F, type SignedRequestReplayStore as G, type SignedRequestSignOpts as H, type IncomingMessage as I, type JobRecord as J, type KVStore as K, type Logger as L, type SignedRequestStatementHeader as M, type SignedRequestVerifier as N, createSignedRequestVerifier as O, type PaymentContent as P, type QuoteConfig as Q, type ResolvedCreditConfig as R, type SDKJobContext as S, isZodSchema as T, UnsupportedCurrencyError as U, signedRequestStatementHeader as V, validateCurrency as W, type JsonValue as X, type FundingReceipt as Y, type ZodLike as Z, type JobReceipt as _, type DVMDescriptor as a, caip2ToX402Network as a$, type X402Version as a0, type MppxCredential as a1, type Message as a2, type MessageType as a3, type MppxChallenge as a4, X402_BATCH_SETTLEMENT_SCHEME as a5, X402_EXACT_SCHEME as a6, type X402Wallet as a7, type X402Config as a8, type X402ExactVersionSupport as a9, PayoutReporter as aA, PostgresTempoSessionStore as aB, RAIL_REFUNDABLE as aC, type ReceiptCredit as aD, type ReceiptOutcome as aE, type ReceiptPayment as aF, type ResourceInfo as aG, RevenueReporter as aH, SIGNED_ENVELOPE_FIELDS as aI, SIGNED_ENVELOPE_TYPES as aJ, type SettleResponse as aK, type StaleJobReapable as aL, StepCache as aM, type StepRecord as aN, type UnsignedDrainReceipt as aO, type UnsignedFundingReceipt as aP, type UnsignedJobReceipt as aQ, type VerifyResponse as aR, type X402ResponseBody as aS, type X402SelfRelayRpcFailureReason as aT, type X402TrackedChannel as aU, X402_DEFAULT_NETWORK as aV, X402_V1_VERSION as aW, X402_VERSION as aX, _testing as aY, buildPaymentRequiredV2 as aZ, buildPaymentRequirements as a_, type X402Receipt as aa, type TransactionalPayoutHook as ab, type CashuMeltCompleted as ac, type BuildPaymentRequirementsOpts as ad, type CapabilityDescriptor as ae, type CashuMode as af, type CreditDepositPayload as ag, type DrainReceipt as ah, type DrainReceiptEvent as ai, type ExactEvmPayload as aj, type ExactEvmPayloadAuthorization as ak, type FundingLot as al, type FundingMethod as am, type LotDebit as an, type LotDepletion as ao, type MppxServer as ap, NON_CHANNEL_BITCOIN_RAILS as aq, type NonChannelBitcoinRail as ar, type OutgoingMessage as as, type PaymentPayload as at, type PaymentPayloadV1 as au, type PaymentPayloadV2 as av, type PaymentRequiredV2 as aw, type PaymentRequirements as ax, type PaymentRequirementsV1 as ay, type PaymentRequirementsV2 as az, type ArtifactContent as b, type DrainMethod as b$, canonicaliseForSigning as b0, canonicalize as b1, chainIdFromCaip2 as b2, computeResultHash as b3, createDefaultReplayStore as b4, decodePayment as b5, decodePaymentRequiredHeader as b6, depleteLots as b7, encodePayment as b8, encodePaymentRequiredHeader as b9, verifyReceipt as bA, verifyWithFacilitator as bB, wrapMppx as bC, x402NetworkToCaip2 as bD, type CreditDrainEnqueue as bE, type DVMAuthScheme as bF, type CreditLedgerLike as bG, type X402RefundSettlementGate as bH, type CreditSnapshot as bI, type DrawResult as bJ, type X402SettlementStatus as bK, type X402UnresolvedRefund as bL, type GrownDrawResult as bM, type DrawResolution as bN, type FundingRecord as bO, type CreditInvoiceRecord as bP, type InvoiceSettlement as bQ, type BlockedInvoiceCursor as bR, type InvoiceReconciliation as bS, type InvoiceWriteOff as bT, type DrawRecord as bU, type StalePendingDrawCursor as bV, type TempoCreditLossEvidence as bW, type CreditLedgerQuerier as bX, type TempoCreditLoss as bY, type X402CreditLossEvidence as bZ, type X402CreditLoss as b_, encodeSettleResponseHeader as ba, exactEvmAuthorization as bb, fifoOrder as bc, inKindDrawMsats as bd, isArtifactMessage as be, isDrainReceipt as bf, isFundingReceipt as bg, isInKindDepletion as bh, isNonChannelBitcoinRail as bi, isPaymentRequestMessage as bj, isPromptMessage as bk, isSignedJobReceipt as bl, isStaleJobReapable as bm, lotOwedSats as bn, netOwedSats as bo, paymentRequiredV2FromV1 as bp, settleWithFacilitator as bq, signDrainReceipt as br, signFundingReceipt as bs, signReceipt as bt, usdcContractByCaip2 as bu, usdcContractFor as bv, usdcDomainNameFor as bw, usdcDomainVersionFor as bx, verifyDrainReceipt as by, verifyFundingReceipt as bz, type CancelContent as c, type X402PayoutObserver as c$, type DrainRequestResult as c0, type BitcoinDepositLiability as c1, type CreditDrainRecord as c2, type ChannelDrainCursor as c3, type DrainWriteOff as c4, type DrainReleaseResult as c5, type DrainFulfilment as c6, type DrainTransitionResult as c7, type StreamableJobStore as c8, type ReceiptIssuingStore as c9, type ReplayStoreBackend as cA, type RevenueSkippedNoRailPayload as cB, type RevenueSkippedNoRailReason as cC, type Secp256k1AuthOpts as cD, type X402ChannelStorageOpts as cE, type X402RelayLockHolder as cF, type X402RelaySubmissionLock as cG, X402RelaySubmissionLockError as cH, allocateDrawValue as cI, clientCompatibilityAttributes as cJ, clientCompatibilityMiddleware as cK, clientUpgradeRequired as cL, isStreamableJobStore as cM, parseClientCapabilities as cN, parseClientCompatibility as cO, parseDvmClient as cP, parseProtocolVersion as cQ, requireClientCompatibility as cR, secp256k1Auth as cS, signedRequestInput as cT, type CreditDepositEnqueue as cU, type TopUpCapUnenforcedReason as cV, type X402SettlementIntent as cW, type X402SettlementCursor as cX, type X402SettlementWriteOff as cY, type X402FacilitatorAuth as cZ, type X402BatchSettlementConfig as c_, type RequestIdClaim as ca, type RequestIdClaimResult as cb, type AppendOutgoingOptions as cc, type PaymentCreditDelta as cd, type VerifyAndCreditResult as ce, type JobCounters as cf, CLIENT_COMPATIBILITY_HEADERS as cg, type ClientCompatibility as ch, type ClientCompatibilityEnv as ci, type ClientCompatibilityGate as cj, type ClientCompatibilityRequirement as ck, type ClientSemVer as cl, type CreditFundingBasis as cm, type CreditInvoiceStatus as cn, CreditLedger as co, CreditLedgerError as cp, type CreditLedgerErrorCode as cq, type CreditLedgerErrorDetails as cr, type CreditLedgerPool as cs, type CreditStatus as ct, DRAIN_DELIVERY_RESERVE_SATS as cu, DVM_PROTOCOL_VERSION as cv, type DrainConflictReason as cw, type DrawRailValue as cx, type DrawStatus as cy, PostgresX402ChannelStorage as cz, type CanonicalEnvelope as d, type X402SettlementReconciliationReason as d0, type CreditDrawReleaseEnqueue as d1, type CreateSignedRequestVerifierOpts as e, type CreditConfig as f, type CreditView as g, DEFAULT_CREDIT_MAX as h, DEFAULT_CREDIT_MIN as i, DEFAULT_CREDIT_TTL_SECONDS as j, type DVMRouteContext as k, type InputType as l, InvalidCurrencyError as m, type JobStatus as n, type JobStore as o, type PaymentMethod as p, type PriceValue as q, type ProgressContent as r, type PromptOpts as s, type QuoteContext as t, type QuoteResult as u, type ResponseContent as v, type SDKPaymentRequestOpts as w, SIGNED_REQUEST_AUTH_ID as x, SIGNED_REQUEST_STATEMENT_VERSION as y, type SignedRequestAudience as z };
@@ -1,11 +1,11 @@
1
- import { af as CashuMode, bD as CreditDrainEnqueue, R as ResolvedCreditConfig, bE as DVMAuthScheme, B as SignedRequestDomain, bF as CreditLedgerLike, bG as X402RefundSettlementGate, bH as CreditSnapshot, bI as DrawResult, bJ as X402SettlementStatus, bK as X402UnresolvedRefund, bL as GrownDrawResult, bM as DrawResolution, bN as FundingRecord, Y as FundingReceipt, bO as CreditInvoiceRecord, bP as InvoiceSettlement, bQ as BlockedInvoiceCursor, bR as InvoiceReconciliation, bS as InvoiceWriteOff, bT as DrawRecord, bU as StalePendingDrawCursor, bV as TempoCreditLossEvidence, bW as CreditLedgerQuerier, bX as TempoCreditLoss, bY as X402CreditLossEvidence, bZ as X402CreditLoss, b_ as DrainMethod, b$ as DrainRequestResult, c0 as BitcoinDepositLiability, al as FundingLot, c1 as CreditDrainRecord, c2 as ChannelDrainCursor, c3 as DrainWriteOff, c4 as DrainReleaseResult, c5 as DrainFulfilment, c6 as DrainTransitionResult, c7 as StreamableJobStore, c8 as ReceiptIssuingStore, J as JobRecord, c9 as RequestIdClaim, ca as RequestIdClaimResult, _ as JobReceipt, as as OutgoingMessage, cb as AppendOutgoingOptions, cc as PaymentCreditDelta, cd as VerifyAndCreditResult, ce as JobCounters, a2 as Message, K as KVStore, G as SignedRequestReplayStore, Z as ZodLike, a as DVMDescriptor } from '../job-store-m2pYmvbr.js';
2
- export { cf as CLIENT_COMPATIBILITY_HEADERS, d as CanonicalEnvelope, cg as ClientCompatibility, ch as ClientCompatibilityEnv, ci as ClientCompatibilityGate, cj as ClientCompatibilityRequirement, ck as ClientSemVer, e as CreateSignedRequestVerifierOpts, cl as CreditFundingBasis, cm as CreditInvoiceStatus, cn as CreditLedger, co as CreditLedgerError, cp as CreditLedgerErrorCode, cq as CreditLedgerErrorDetails, cr as CreditLedgerPool, cs as CreditStatus, ct as DRAIN_DELIVERY_RESERVE_SATS, cu as DVM_PROTOCOL_VERSION, cv as DrainConflictReason, cw as DrawRailValue, cx as DrawStatus, n as JobStatus, o as JobStore, cy as PostgresX402ChannelStorage, cz as ReplayStoreBackend, cA as RevenueSkippedNoRailPayload, cB as RevenueSkippedNoRailReason, x as SIGNED_REQUEST_AUTH_ID, y as SIGNED_REQUEST_STATEMENT_VERSION, cC as Secp256k1AuthOpts, z as SignedRequestAudience, E as SignedRequestError, F as SignedRequestFailure, H as SignedRequestSignOpts, M as SignedRequestStatementHeader, N as SignedRequestVerifier, cD as X402ChannelStorageOpts, cE as X402RelayLockHolder, cF as X402RelaySubmissionLock, cG as X402RelaySubmissionLockError, cH as allocateDrawValue, cI as clientCompatibilityAttributes, cJ as clientCompatibilityMiddleware, cK as clientUpgradeRequired, O as createSignedRequestVerifier, cL as isStreamableJobStore, cM as parseClientCapabilities, cN as parseClientCompatibility, cO as parseDvmClient, cP as parseProtocolVersion, cQ as requireClientCompatibility, cR as secp256k1Auth, cS as signedRequestInput, V as signedRequestStatementHeader } from '../job-store-m2pYmvbr.js';
1
+ import { af as CashuMode, bE as CreditDrainEnqueue, R as ResolvedCreditConfig, bF as DVMAuthScheme, B as SignedRequestDomain, bG as CreditLedgerLike, bH as X402RefundSettlementGate, bI as CreditSnapshot, bJ as DrawResult, bK as X402SettlementStatus, bL as X402UnresolvedRefund, bM as GrownDrawResult, bN as DrawResolution, bO as FundingRecord, Y as FundingReceipt, bP as CreditInvoiceRecord, bQ as InvoiceSettlement, bR as BlockedInvoiceCursor, bS as InvoiceReconciliation, bT as InvoiceWriteOff, bU as DrawRecord, bV as StalePendingDrawCursor, bW as TempoCreditLossEvidence, bX as CreditLedgerQuerier, bY as TempoCreditLoss, bZ as X402CreditLossEvidence, b_ as X402CreditLoss, b$ as DrainMethod, c0 as DrainRequestResult, c1 as BitcoinDepositLiability, al as FundingLot, c2 as CreditDrainRecord, c3 as ChannelDrainCursor, c4 as DrainWriteOff, c5 as DrainReleaseResult, c6 as DrainFulfilment, c7 as DrainTransitionResult, c8 as StreamableJobStore, c9 as ReceiptIssuingStore, J as JobRecord, ca as RequestIdClaim, cb as RequestIdClaimResult, _ as JobReceipt, as as OutgoingMessage, cc as AppendOutgoingOptions, cd as PaymentCreditDelta, ce as VerifyAndCreditResult, cf as JobCounters, a2 as Message, K as KVStore, G as SignedRequestReplayStore, Z as ZodLike, a as DVMDescriptor } from '../job-store-DxFqDPYq.js';
2
+ export { cg as CLIENT_COMPATIBILITY_HEADERS, d as CanonicalEnvelope, ch as ClientCompatibility, ci as ClientCompatibilityEnv, cj as ClientCompatibilityGate, ck as ClientCompatibilityRequirement, cl as ClientSemVer, e as CreateSignedRequestVerifierOpts, cm as CreditFundingBasis, cn as CreditInvoiceStatus, co as CreditLedger, cp as CreditLedgerError, cq as CreditLedgerErrorCode, cr as CreditLedgerErrorDetails, cs as CreditLedgerPool, ct as CreditStatus, cu as DRAIN_DELIVERY_RESERVE_SATS, cv as DVM_PROTOCOL_VERSION, cw as DrainConflictReason, cx as DrawRailValue, cy as DrawStatus, n as JobStatus, o as JobStore, cz as PostgresX402ChannelStorage, cA as ReplayStoreBackend, cB as RevenueSkippedNoRailPayload, cC as RevenueSkippedNoRailReason, x as SIGNED_REQUEST_AUTH_ID, y as SIGNED_REQUEST_STATEMENT_VERSION, cD as Secp256k1AuthOpts, z as SignedRequestAudience, E as SignedRequestError, F as SignedRequestFailure, H as SignedRequestSignOpts, M as SignedRequestStatementHeader, N as SignedRequestVerifier, cE as X402ChannelStorageOpts, cF as X402RelayLockHolder, cG as X402RelaySubmissionLock, cH as X402RelaySubmissionLockError, cI as allocateDrawValue, cJ as clientCompatibilityAttributes, cK as clientCompatibilityMiddleware, cL as clientUpgradeRequired, O as createSignedRequestVerifier, cM as isStreamableJobStore, cN as parseClientCapabilities, cO as parseClientCompatibility, cP as parseDvmClient, cQ as parseProtocolVersion, cR as requireClientCompatibility, cS as secp256k1Auth, cT as signedRequestInput, V as signedRequestStatementHeader } from '../job-store-DxFqDPYq.js';
3
3
  import { Pool } from 'pg';
4
- import { aE as CreditMenu, f as AppEnv, U as UpfrontPaymentOpts, p as PaymentInfo, aF as ReceiptIssuer, aG as LightningReceive, aH as TempoSettlementReadiness, aI as DVMHostOpts } from '../credit-menu-DONAtGVf.js';
5
- export { aJ as BuildCreditMenuArgs, aK as BuilderIdentity, aL as CREDIT_ENVELOPE_KEYS, e as ConsumedCredentialStore, aM as CreateX402BatchSettlementServerOpts, aN as CreditEnvelope, aO as CreditEnvelopeError, aP as CreditFundCommitment, aQ as CreditTerms, aR as DEFAULT_INVOICE_TTL_SECONDS, aS as DVMHost, aT as JobManager, aU as JobManagerOpts, aV as LightningReceiveConfig, aW as MIN_INVOICE_TTL_SECONDS, aX as MemoryConsumedCredentialStore, aY as MemoryConsumedCredentialStoreOpts, aZ as MemoryProcessedPaymentStore, a_ as MemoryX402ExactSettlementStore, a$ as MountOpts, b0 as OwnerDisplay, b1 as PlatformReporterOpts, b2 as PostgresProcessedPaymentStore, b3 as PostgresX402ExactSettlementStore, b4 as PriceFiat, b5 as ProcessedPaymentQuerier, b6 as ProcessedPaymentRail, b7 as ProcessedPaymentRecord, b8 as ProcessedPaymentReplayError, b9 as ProcessedPaymentStore, ba as X402BatchAcceptance, bb as X402BatchFunding, bc as X402BatchRefusal, bd as X402BatchSettlementServer, be as X402ExactAcceptance, bf as X402ExactIntentConflictError, bg as X402ExactSettlementAttempt, bh as X402ExactSettlementChainEvidence, bi as X402ExactSettlementEffect, bj as X402ExactSettlementEvidenceMissingError, bk as X402ExactSettlementEvidenceReader, bl as X402ExactSettlementIntent, bm as X402ExactSettlementNotReadyError, bn as X402ExactSettlementServer, bo as X402ExactSettlementServerOpts, bp as X402ExactSettlementStatus, bq as X402ExactSettlementStore, br as X402SettlementChainEvidence, bs as X402SettlementEvidenceReader, bt as X402SettlementSubmissionError, bu as X402_BATCH_AUTO_SETTLEMENT, bv as X402_BATCH_MIN_WITHDRAW_DELAY_SECONDS, bw as X402_BATCH_SETTLEMENT_NETWORK, bx as attachCreditMenu, by as buildCreditMenu, bz as createDVMHost, bA as createX402BatchSettlementServer, bB as creditEnvelopeIgnoreFields, bC as drawSettlementRef, bD as extractCreditEnvelope, bE as fundingCommitment, bF as selectPrimaryCredit, bG as stripCreditEnvelope, bH as toCreditView } from '../credit-menu-DONAtGVf.js';
4
+ import { aE as CreditMenu, f as AppEnv, U as UpfrontPaymentOpts, p as PaymentInfo, aF as ReceiptIssuer, aG as LightningReceive, aH as TempoSettlementReadiness, aI as DVMHostOpts } from '../credit-menu-ClA1JyYW.js';
5
+ export { aJ as BuildCreditMenuArgs, aK as BuilderIdentity, aL as CREDIT_ENVELOPE_KEYS, e as ConsumedCredentialStore, aM as CreateX402BatchSettlementServerOpts, aN as CreditEnvelope, aO as CreditEnvelopeError, aP as CreditFundCommitment, aQ as CreditTerms, aR as DEFAULT_INVOICE_TTL_SECONDS, aS as DVMHost, aT as JobManager, aU as JobManagerOpts, aV as LightningReceiveConfig, aW as MIN_INVOICE_TTL_SECONDS, aX as MemoryConsumedCredentialStore, aY as MemoryConsumedCredentialStoreOpts, aZ as MemoryProcessedPaymentStore, a_ as MemoryX402ExactSettlementStore, a$ as MountOpts, b0 as OwnerDisplay, b1 as PlatformReporterOpts, b2 as PostgresProcessedPaymentStore, b3 as PostgresX402ExactSettlementStore, b4 as PriceFiat, b5 as ProcessedPaymentQuerier, b6 as ProcessedPaymentRail, b7 as ProcessedPaymentRecord, b8 as ProcessedPaymentReplayError, b9 as ProcessedPaymentStore, ba as X402BatchAcceptance, bb as X402BatchFunding, bc as X402BatchRefusal, bd as X402BatchSettlementServer, be as X402ExactAcceptance, bf as X402ExactIntentConflictError, bg as X402ExactSettlementAttempt, bh as X402ExactSettlementChainEvidence, bi as X402ExactSettlementEffect, bj as X402ExactSettlementEvidenceMissingError, bk as X402ExactSettlementEvidenceReader, bl as X402ExactSettlementIntent, bm as X402ExactSettlementNotReadyError, bn as X402ExactSettlementServer, bo as X402ExactSettlementServerOpts, bp as X402ExactSettlementStatus, bq as X402ExactSettlementStore, br as X402SettlementChainEvidence, bs as X402SettlementEvidenceReader, bt as X402SettlementSubmissionError, bu as X402_BATCH_AUTO_SETTLEMENT, bv as X402_BATCH_MIN_WITHDRAW_DELAY_SECONDS, bw as X402_BATCH_SETTLEMENT_NETWORK, bx as attachCreditMenu, by as buildCreditMenu, bz as createDVMHost, bA as createX402BatchSettlementServer, bB as creditEnvelopeIgnoreFields, bC as drawSettlementRef, bD as extractCreditEnvelope, bE as fundingCommitment, bF as selectPrimaryCredit, bG as stripCreditEnvelope, bH as toCreditView } from '../credit-menu-ClA1JyYW.js';
6
6
  import { Context } from 'hono';
7
7
  import { z } from 'zod';
8
- import { F as FxFetcher } from '../fx-Bq4cvn16.js';
8
+ import { F as FxFetcher } from '../fx-ptKVFOwq.js';
9
9
  export { P as PinnedFetch, S as SSRFError, a as SSRFGuardOpts, b as SSRFReason, c as SSRFResolver, d as assertSafeUrl, e as createPinnedFetch } from '../ssrf-DbFkpDv0.js';
10
10
  import '@cashu/cashu-ts';
11
11
  import 'mppx';