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

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.
@@ -8,7 +8,7 @@ import {
8
8
  maxAdvertisedMicro,
9
9
  updateConfig,
10
10
  withinAdvertisedTolerance
11
- } from "./chunk-2K6UXDAN.js";
11
+ } from "./chunk-4KB3LTOS.js";
12
12
  import {
13
13
  X402_DEFAULT_NETWORK,
14
14
  X402_V1_VERSION,
@@ -4365,7 +4365,7 @@ async function verifyUpfrontPayment(opts) {
4365
4365
  x402Requirements
4366
4366
  });
4367
4367
  }
4368
- const { verifyX402Payment } = await import("./x402-XXFQQAAD.js");
4368
+ const { verifyX402Payment } = await import("./x402-3VQ64MCS.js");
4369
4369
  const receipt = await verifyX402Payment(
4370
4370
  x402Payment,
4371
4371
  x402Config,
@@ -5285,7 +5285,7 @@ async function verifyIncomingPayment(body, opts, snapshot) {
5285
5285
  snapshot
5286
5286
  });
5287
5287
  }
5288
- const { verifyX402Payment } = await import("./x402-XXFQQAAD.js");
5288
+ const { verifyX402Payment } = await import("./x402-3VQ64MCS.js");
5289
5289
  const receipt = await verifyX402Payment(
5290
5290
  body.content.x402_payment,
5291
5291
  opts.x402Config,
@@ -5695,7 +5695,7 @@ async function processIncomingPayment(job, body, opts) {
5695
5695
  try {
5696
5696
  const requiredMsats = job.pendingPaymentMsats ?? 0;
5697
5697
  const requiredUsdcMicro = job.pendingX402AmountUsdcMicro !== void 0 ? BigInt(job.pendingX402AmountUsdcMicro) : BigInt(msatsToUsdc(requiredMsats, rate));
5698
- const { verifyX402Payment } = await import("./x402-XXFQQAAD.js");
5698
+ const { verifyX402Payment } = await import("./x402-3VQ64MCS.js");
5699
5699
  const receipt = await verifyX402Payment(
5700
5700
  body.content.x402_payment,
5701
5701
  opts.x402Config,
@@ -6,7 +6,7 @@ import {
6
6
  maxAdvertisedMicro,
7
7
  normalizeCreditEndpoint,
8
8
  withinAdvertisedTolerance
9
- } from "./chunk-2K6UXDAN.js";
9
+ } from "./chunk-4KB3LTOS.js";
10
10
  import {
11
11
  DvmError,
12
12
  IDENTITIES_FILE,
@@ -2814,6 +2814,84 @@ interface DvmLocated {
2814
2814
  */
2815
2815
  attestedBuilderPubkey?: string;
2816
2816
  }
2817
+ /**
2818
+ * The unretired drain requested against one specific credit, if any.
2819
+ *
2820
+ * Strict on the stamp: an entry belonging to another credit — or to no credit
2821
+ * we can name (written before the stamp existed) — is not this credit's drain,
2822
+ * and re-posting its id here would open a fresh drain server-side rather than
2823
+ * poll the one that is owed (internal-review).
2824
+ */
2825
+ declare function pendingDrainFor(record: StoredCredit | undefined, creditId: string): PendingDrain | undefined;
2826
+ /**
2827
+ * Load the record for one credit, or undefined when none is tracked.
2828
+ *
2829
+ * Locked despite reading like a lookup: learning a new `dvmId` or hostname
2830
+ * alias rewrites the file (internal-review), and so does the legacy-duplicate
2831
+ * collapse inside {@link loadStore}.
2832
+ */
2833
+ declare function loadCredit(endpoint: string, callerPubkey: string, identity?: AttestedDvmIdentity): StoredCredit | undefined;
2834
+ /**
2835
+ * Ensure a record exists for a credit whose fund leg was just accepted on
2836
+ * `/v1/job` (fund-and-draw, internal-review). The exact credited amount is the
2837
+ * server's call (pro-rata at its fx), so the record is marked
2838
+ * {@link StoredCredit.provisional} until the countersigned receipt or a
2839
+ * fund/balance response adopts the real figures.
2840
+ */
2841
+ declare function ensureProvisionalCredit(args: {
2842
+ endpoint: string;
2843
+ identity?: AttestedDvmIdentity;
2844
+ callerPubkey: string;
2845
+ creditId: string;
2846
+ currency: string;
2847
+ targetMicro: number;
2848
+ menu?: CreditMenu;
2849
+ now?: number;
2850
+ }): void;
2851
+ /**
2852
+ * Adopt the x402 binding a refusal named onto the tracked credit.
2853
+ *
2854
+ * The heal half of the pin: the local record is a copy of a server-side fact,
2855
+ * so the server's own word replaces it rather than the other way round, and one
2856
+ * refusal is enough — the next refill routes over the named instrument instead
2857
+ * of signing into the same answer again.
2858
+ *
2859
+ * A heal that actually moves the instrument drops the recorded chain with it
2860
+ * (internal-review), unless the caller also supplies the chain resolved from the
2861
+ * refusal's channel id. Supplying that verified chain also fills or corrects a
2862
+ * channel instrument that was already recorded — the instrument being equal
2863
+ * must not make the newly learned half of its binding a no-op (internal-review).
2864
+ */
2865
+ declare function recordCreditX402Instrument(endpoint: string, callerPubkey: string, creditId: string, instrument: X402CreditInstrument, identity?: AttestedDvmIdentity,
2866
+ /** Channel chain learned from the channel store, when the refusal names one. */
2867
+ channelNetwork?: string): void;
2868
+ /**
2869
+ * Persist a drain request so a re-invoked drain polls the same id.
2870
+ *
2871
+ * Keyed on the drain's whole `(drainId, creditId)` identity: re-recording the
2872
+ * same drain refreshes it, and anything else is appended. Deliberately not
2873
+ * keyed on the credit alone — an entry may be the only local pointer to a
2874
+ * parked payout, and replacing drain A with drain B because they share a
2875
+ * credit would drop exactly the evidence this store exists to keep.
2876
+ *
2877
+ * Callers own the shape readers lean on. {@link pendingDrainFor} takes the
2878
+ * first entry stamped for a credit, so `dvm credit drain` refuses a
2879
+ * `--drain-id` that would leave a credit holding two; a second entry can then
2880
+ * only arrive by hand-editing, and the older one is what polls.
2881
+ */
2882
+ declare function recordPendingDrain(endpoint: string, callerPubkey: string, drain: PendingDrain, identity?: AttestedDvmIdentity): void;
2883
+ /**
2884
+ * Retire one drain, once it is fulfilled (or once the server has said it never
2885
+ * existed).
2886
+ *
2887
+ * Matched on the drain's own `(drainId, creditId)` identity rather than on the
2888
+ * record's current credit: reclaiming a drain stranded on a previous credit
2889
+ * must retire exactly that entry and leave the tracked credit's own drain — and
2890
+ * its projection — untouched. Matching the id alone would also work for every
2891
+ * entry this CLI writes, but an unstamped legacy entry can only be named this
2892
+ * way, and it needs a retirement path too.
2893
+ */
2894
+ declare function clearPendingDrain(endpoint: string, callerPubkey: string, drain: Pick<PendingDrain, "drainId" | "creditId">, identity?: AttestedDvmIdentity): void;
2817
2895
 
2818
2896
  /**
2819
2897
  * Durable, append-only store for the DVM-signed receipts this caller has
@@ -5893,4 +5971,4 @@ declare function shellQuoteArg(value: string): string;
5893
5971
  */
5894
5972
  declare function verifyChallenge(pubkeyHex: string, challenge: Uint8Array, sigHex: string): boolean;
5895
5973
 
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 };
5974
+ 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 StoredCredit, 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, clearPendingDrain, clearPendingX402ExactFunding, clearPendingX402Funding, computeSmartDenominations, connectedX402Payer, costAnchor, createAdminCashuNonceStore, createInstrumentedFetch, createMonotonicClock, createNoopLogger, createStdoutLogger, createX402BatchPayment, currentContext, deriveBuilderLockKeypair, deriveBuilderLockPubkey, deriveReceiptKeypair, deriveReceiptSecret, drainReceiptsDisplay, drainReceiptsHint, enforceGlobalBudget, ensureAddress, ensureProvisionalCredit, 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, loadCredit, 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, pendingDrainFor, pickCreditFundRail, pinDimension, planCreditForQuote, pollPendingCreditFundings, preferLightningFirst, prepareP2PKMint, processX402BatchCorrection, processX402BatchResponse, processX402BatchResponseForWallet, providerProseSources, providerTextToString, pruneRetired, randomTraceId, rateUnavailablePaymentError, receiptDisplay, receiptFailureDetail, receiptHint, receiptIssuedAtIso, receiptPubkeyFromSecret, reconcileRefusedX402Deposits, recordCreditX402Instrument, recordPendingDrain, 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 };
@@ -30,7 +30,7 @@ import {
30
30
  tempoSessionPriorCumulativeMicro,
31
31
  withTempoChannelLock,
32
32
  withholdsTempoCreditSession
33
- } from "../chunk-EDU6COY2.js";
33
+ } from "../chunk-ZMZTZFRC.js";
34
34
  import {
35
35
  DvmX402ChannelStorage,
36
36
  X402_EXACT_AUTHORIZATION_TTL_SECONDS,
@@ -73,28 +73,33 @@ import {
73
73
  x402PendingRetired,
74
74
  x402PendingStale,
75
75
  x402PendingUnsettled
76
- } from "../chunk-GJD7PVWY.js";
76
+ } from "../chunk-AB3L6B52.js";
77
77
  import {
78
78
  SUPPORTED_PROTOCOL_VERSION,
79
+ clearPendingDrain,
79
80
  clearPendingFunding,
81
+ ensureProvisionalCredit,
80
82
  info,
81
83
  isCreditPosture,
82
84
  isValidEvmPrivateKey,
83
85
  listPendingFundings,
84
86
  loadConfig,
87
+ loadCredit,
85
88
  loadCreditX402Binding,
86
89
  loadPendingFunding,
87
90
  maxAdvertisedMicro,
88
91
  normalizeCreditEndpoint,
89
92
  parseCreditMenu,
90
93
  parseCreditTerms,
94
+ pendingDrainFor,
91
95
  progress,
92
96
  recordCreditX402Instrument,
93
97
  recordFundResponse,
98
+ recordPendingDrain,
94
99
  recordPendingFunding,
95
100
  updateConfig,
96
101
  withinAdvertisedTolerance
97
- } from "../chunk-2K6UXDAN.js";
102
+ } from "../chunk-4KB3LTOS.js";
98
103
  import {
99
104
  RevenueReporter
100
105
  } from "../chunk-2ABMGUDS.js";
@@ -236,7 +241,7 @@ import {
236
241
  writeIdentity,
237
242
  x402RequiredUsdcMicro,
238
243
  x402SettledShare
239
- } from "../chunk-4UVRXDNY.js";
244
+ } from "../chunk-ATQIII6K.js";
240
245
  import {
241
246
  X402_BATCH_SETTLEMENT_SCHEME,
242
247
  X402_DEFAULT_FACILITATOR,
@@ -6154,6 +6159,7 @@ export {
6154
6159
  checkMintHealth,
6155
6160
  checkReceiptAttestation,
6156
6161
  clearAccumulatorForDvm,
6162
+ clearPendingDrain,
6157
6163
  clearPendingX402ExactFunding,
6158
6164
  clearPendingX402Funding,
6159
6165
  computeResultHash,
@@ -6186,6 +6192,7 @@ export {
6186
6192
  encodeSettleResponseHeader,
6187
6193
  enforceGlobalBudget,
6188
6194
  ensureAddress,
6195
+ ensureProvisionalCredit,
6189
6196
  epochMsToIso,
6190
6197
  exactEvmAuthorization,
6191
6198
  fetchBtcUsdRate,
@@ -6257,6 +6264,7 @@ export {
6257
6264
  listX402Channels,
6258
6265
  loadAgentWallet,
6259
6266
  loadConfiguredMints,
6267
+ loadCredit,
6260
6268
  loadIdentitySecret,
6261
6269
  loadLedger,
6262
6270
  loadLockPubkeyState,
@@ -6290,6 +6298,7 @@ export {
6290
6298
  payInvoiceReconciling,
6291
6299
  paymentErrorBody,
6292
6300
  paymentRequiredV2FromV1,
6301
+ pendingDrainFor,
6293
6302
  pickCreditFundRail,
6294
6303
  pinAskFiat,
6295
6304
  pinDimension,
@@ -6314,6 +6323,8 @@ export {
6314
6323
  receiptIssuedAtIso,
6315
6324
  receiptPubkeyFromSecret,
6316
6325
  reconcileRefusedX402Deposits,
6326
+ recordCreditX402Instrument,
6327
+ recordPendingDrain,
6317
6328
  recordPendingX402ExactFunding,
6318
6329
  recordPendingX402Funding,
6319
6330
  recordSpend,
@@ -73,7 +73,7 @@ import {
73
73
  unknownRouteNotFound,
74
74
  validateX402Env,
75
75
  withNwcPool
76
- } from "../chunk-4UVRXDNY.js";
76
+ } from "../chunk-ATQIII6K.js";
77
77
  import {
78
78
  X402_DEFAULT_FACILITATOR,
79
79
  X402_DEFAULT_NETWORK,
@@ -11,8 +11,8 @@ import {
11
11
  tryX402Payment,
12
12
  verifyX402Payment,
13
13
  x402WrongAssetHint
14
- } from "./chunk-GJD7PVWY.js";
15
- import "./chunk-2K6UXDAN.js";
14
+ } from "./chunk-AB3L6B52.js";
15
+ import "./chunk-4KB3LTOS.js";
16
16
  import {
17
17
  X402_DEFAULT_FACILITATOR,
18
18
  X402_DEFAULT_NETWORK,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dvmkit/sdk",
3
- "version": "0.1.0-rc.4",
3
+ "version": "0.1.0-rc.5",
4
4
  "description": "SDK for building accountless, pay-per-use Digital Vending Machines",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {