@dvmkit/sdk 0.5.0-rc.1 → 0.7.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +100 -0
  2. package/dist/{chunk-JH3SX3LY.js → chunk-6XF3RVVX.js} +1 -1
  3. package/dist/chunk-AFV77S4C.js +258 -0
  4. package/dist/{chunk-RLTSCKRI.js → chunk-BPYMEMQX.js} +50 -3
  5. package/dist/chunk-BQJIFRAZ.js +36 -0
  6. package/dist/{chunk-IWQHUSMO.js → chunk-CXCQLOOK.js} +143 -2
  7. package/dist/{chunk-PB4FYZET.js → chunk-EQLA4FFY.js} +54 -4
  8. package/dist/{chunk-LE74UEV7.js → chunk-EZXAJ6EI.js} +64 -53
  9. package/dist/{chunk-FI4CST2D.js → chunk-FWGWLPXF.js} +4 -6
  10. package/dist/{chunk-EYTHFFFU.js → chunk-GY66THYI.js} +179 -56
  11. package/dist/{chunk-TZ2WKCDD.js → chunk-HCLVYZUZ.js} +2 -2
  12. package/dist/{chunk-O5AT6S5T.js → chunk-IV6Q7NRW.js} +25 -195
  13. package/dist/{chunk-UOCZXO2Z.js → chunk-JEVLNAO3.js} +10 -5
  14. package/dist/{chunk-TUA7PYH7.js → chunk-KMED3H3A.js} +134 -130
  15. package/dist/{chunk-Z4KLECAC.js → chunk-N5RZ5HVB.js} +1 -1
  16. package/dist/{chunk-PAIM66YA.js → chunk-NFMOPYBA.js} +47 -37
  17. package/dist/{chunk-B2IROPQF.js → chunk-O2OTZ5GP.js} +40 -15
  18. package/dist/{chunk-FYRR2UEZ.js → chunk-OML32F6I.js} +1 -1
  19. package/dist/{chunk-6DOGTAHA.js → chunk-QR2EF2NI.js} +9 -43
  20. package/dist/{chunk-7ZUKL4IV.js → chunk-RA2WIX7G.js} +5 -5
  21. package/dist/{chunk-A4YFWZ7R.js → chunk-RCM3P2HE.js} +1 -1
  22. package/dist/{chunk-PLG4XER6.js → chunk-S3OY533W.js} +1 -1
  23. package/dist/{chunk-GFY5FRX3.js → chunk-SZVXOQ75.js} +5 -12
  24. package/dist/{chunk-MZRJR2CW.js → chunk-WBOKPC37.js} +22 -3
  25. package/dist/content-retention-DHyLdA6b.d.ts +78 -0
  26. package/dist/{credit-ledger-MI2H7NEC.js → credit-ledger-MCUXYKSJ.js} +2 -3
  27. package/dist/{credit-menu-CAfqe8IY.d.ts → credit-menu-DjnkeEUU.d.ts} +98 -5
  28. package/dist/{fx-D9nsN3n4.d.ts → fx-zMWFzfrU.d.ts} +1 -1
  29. package/dist/index.d.ts +5 -5
  30. package/dist/index.js +3 -3
  31. package/dist/internal/caller.d.ts +1369 -860
  32. package/dist/internal/caller.js +1079 -991
  33. package/dist/internal/index.js +1 -1
  34. package/dist/internal/server.d.ts +8 -99
  35. package/dist/internal/server.js +19 -18
  36. package/dist/{job-store-Bx-VFRjg.d.ts → job-store-DdLXBpol.d.ts} +1 -1
  37. package/dist/{lightning-backend-BAx2Y8pP.d.ts → lightning-backend-Bw-qtAbt.d.ts} +4 -2
  38. package/dist/{memory-credit-ledger-W2BAUYJP.js → memory-credit-ledger-SBSMGMDX.js} +3 -4
  39. package/dist/{postgres-consumed-credential-store-CUQJKRSL.js → postgres-consumed-credential-store-BUVCAPLS.js} +13 -0
  40. package/dist/{postgres-job-store-VLXLWXUQ.js → postgres-job-store-VHLQBJZC.js} +3 -1
  41. package/dist/server/index.d.ts +28 -10
  42. package/dist/server/index.js +34 -24
  43. package/dist/{step-cache-QG_h5-3G.d.ts → step-cache-2MkvenJn.d.ts} +3 -3
  44. package/dist/tempo-lifecycle-GJ77YKVY.js +15 -0
  45. package/dist/{tempo-wallet-B5XXV3YH.js → tempo-wallet-X2GGAZ6X.js} +4 -4
  46. package/dist/testing/index.d.ts +9 -2
  47. package/dist/testing/index.js +6 -3
  48. package/dist/{usd-EwRqCPF-.d.ts → usd-DI3d3gTK.d.ts} +1 -1
  49. package/dist/{x402-R6HPBY5D.js → x402-FT4S4JS4.js} +8 -10
  50. package/package.json +5 -3
  51. package/recipes/postgres/financial-export-v1.sql +137 -0
  52. package/dist/chunk-CZULM42S.js +0 -143
  53. package/dist/chunk-LIRAHP7B.js +0 -53
  54. package/dist/tempo-lifecycle-ZBBLFBMH.js +0 -15
@@ -1,2 +1,2 @@
1
- export { ADMIN_STATE_UNAVAILABLE, AGENT_MNEMONIC_FILE, BTC_RATE_FILE, BUDGET_FILE, CAPABILITY_NAME_RE, COINGECKO_SIMPLE_PRICE_URL, CONFIG_AUDIT_FILE, CONFIG_BACKUP_FILE, CONFIG_DIR, CONFIG_FILE, CONFIG_PINNED_FILE, CREDITS_FILE, CREDIT_DRAIN_RAILS, CREDIT_FUNDING_MODES, CREDIT_FUND_RAILS, CREDIT_POSTURES, DEFAULT_AGENT_MINT_URL, DEFAULT_CREDIT_POSTURE, DEFAULT_RESERVE_LOCKTIME_SECONDS, DIAGNOSTIC_CATALOGUE_VERSION, DbTransport, DvmError, DvmX402ChannelStorage, FAVORITES_FILE, FEEDBACK_NUDGES_FILE, FEEDBACK_POSTURES, FX_CACHE_TTL_MS, FX_RETRY_COUNT, IDENTITIES_FILE, IDENTITIES_VERSION, InvalidUsdPriceError, JOBS_FILE, MESSAGES_DIR, MemoryKVStore, NWC_FUNDING_FLOAT_ROLE, NwcBackend, NwcError, PAIRINGS_DIR, PRIVKEY_HEX_RE, PersistentCounterSource, RAIL_FLAGS, RAIL_REFUNDABLE, RECEIPTS_FILE, RECENT_SPENDS_CAP, RECOMMENDED_MINTS, RECOVERY_MNEMONIC_FILE, REQUEST_INTENTS_DIR, RESUME_MAX_AGE_MS, RESUME_MAX_ATTEMPTS, ROUTER_FEEDBACK_CLAIM_HEADER, ROUTER_FEEDBACK_CLAIM_TTL_MS, SPANS_INSERTED_CHANNEL, STABLECOIN_FUND_RAILS, SUPPORTED_PROTOCOL_VERSION, SpanWriter, StepCache, TEMPO_CHAIN_ID, TEMPO_CHANNELS_FILE, TEMPO_EXIT_KEY_MISSING_HINT, TEMPO_MODERATO_CHAIN_ID, TEMPO_MODERATO_RPC, TEMPO_PATH_USD_MODERATO, WALLET_FILE, WALLET_VERSION, X402EnvValidationError, X402_BATCH_CHANNEL_ABI, X402_BATCH_SETTLEMENT_KEY, X402_BATCH_SETTLEMENT_SCHEME, X402_CHANNELS_FILE, X402_DEFAULT_FACILITATOR, X402_DEFAULT_NETWORK, 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, X402_V1_VERSION, X402_VERSION, abandonPendingSubmission, acknowledgeReplayedX402Payment, acknowledgeX402ChannelOwner, addPayment, advanceTempoChannelExit, amountBoundsVerdict, applyImplicitReceiptCredit, applyReceiptCredit, applyRetryToPool, asProviderText, asProviderTextOpt, assertAgentMnemonicReplaceable, assertFloatBudget, assertNutSupport, assertSupportedX402Network, assertTempoWalletIdle, assertValidBudget, assertX402ChannelPayer, assertX402RequirementDescribesChannel, assertX402WalletIdle, attestedDvmIdentity, authenticatedBuilderPubkey, authorizeProtectedRemoval, automaticCreditBoundRail, availableRails, backfillTrustAnchor, backupSecretFile, bindDiagnosticCapabilityAuthority, bindDiagnosticIdentityAuthority, buildAdminAuthHeader, buildAdminChallenge, buildAttestation, buildCompletionHintFields, buildDisplayMintInventory, buildPaymentRequiredV2, buildPaymentRequirements, buildPolicy, buildTempoCredential, builderLockPath, caip2ToX402Network, canReplaceExpiredX402Deposit, canSwap, canonicalRequestPath, canonicaliseForSigning, canonicalize, captureFundingReceipt, captureTransportReceipt, cashOutFromMint, cashuSubmissionBindingFingerprint, chainIdFromCaip2, checkMeltQuoteState, checkMintHealth, checkReceiptAttestation, clearCreditSelection, clearPendingDrain, clearPendingX402ExactFunding, clearPendingX402Funding, clearRefillRailUnavailable, cliIdentityStoreGenerateIdentity, commitAgentSpend, completionFromMessages, completionSnapshot, computeNextAction, computeResultHash, computeSmartDenominations, configSnapshotPath, connectedTempoAccount, connectedX402Payer, correctPendingFundAmount, costAnchor, coveringMintsForSpend, createDiagnosticCapabilityAuthority, createMonotonicClock, createNoopLogger, createStdoutLogger, createTempoCloseCredential, createX402BatchPayment, currentContext, decodePayment, decodePaymentRequiredHeader, deleteAgentMnemonic, deriveAgentMasterKeypair, deriveBuilderLockKeypair, deriveBuilderLockPubkey, deriveIdentityFromPrivkey, derivePubkeyFromPrivkey, deriveReceiptKeypair, deriveReceiptSecret, deriveTempoAddress, describeConfigBackup, describeMintBounds, drainReceiptsDisplay, drainReceiptsHint, dvmLocationIdentity, effectiveCreditPosture, effectiveFundingMint, effectiveFundingRail, effectiveMints, emitFloatBudgetWarning, encodePayment, encodePaymentRequiredHeader, encodeSettleResponseHeader, enforceGlobalBudget, ensureAddress, ensureConfig, ensureConfigDir, ensureConfigSubdir, ensureProvisionalCredit, entryKind, epochMsToIso, exactEvmAuthorization, extendDiagnosticIdentityAuthority, extractBuilderHandle, fetchBtcUsdRate, fetchCoinGeckoBtcUsd, fetchCoinGeckoSpot, fetchLnurlPayInvoice, fetchMeltQuote, fetchMissingJobReceipt, fetchTrustAnchor, findSigningIdentityByPubkey, findX402Channel, floatBudgetJson, floatPaymentDisplay, floatPaymentJson, forgetCredit, formatAmount, formatAmountBestEffort, formatLocktime, formatPaymentAmount, formatSats, formatStaleness, formatUsd, formatUsdcMicrounits, fundAgentWallet, fundCredit, fundWireAmountMicro, fundingModeForTempoIntent, fundingModeForX402Flavour, fundingRailLabel, generateAgentMnemonic, generateEphemeralReceiptKey, generateIdentity, generateTempoKey, generateX402PrivateKey, getBalance, getBalanceByMint, getFundingGuidance, getInfo, getInputFeesForProofs, getLastKnownBtcRate, getOutputTraceId, getTempoUsdcBalance, getWallet, getX402Balance, hashCapabilities, hashedCanonicalDvmId, identitiesFileExists, info, initLoggers, insertSpanBatch, isAbortError, isArtifactMessage, isCancelMessage, isCompleteMessage, isCreditFundRail, isCreditFundingMode, isCreditPosture, isDrainReceipt, isFeedbackPosture, isFundingReceipt, isPaymentRailKey, isPaymentRequestMessage, isPromptMessage, isPublicRequestId, isResumable, isSignedJobReceipt, isStablecoinFundRail, isTerminalJobStatus, isTextMessage, isValidEvmPrivateKey, isWorkingMessage, issueRouterFeedbackClaim, json, listCredits, listFundingMenuSnapshots, listImplicitCredits, listPendingFundings, listPendingX402Fundings, listPendingX402FundingsForChannel, listResumableTempoChargeFundings, listResumableX402ExactFundings, listResumableX402Fundings, listTempoChannelAssociations, listTransactions, listX402Channels, loadAgentWallet, loadAllJobs, loadConfig, loadConfiguredMints, loadCredit, loadFloat, loadIdentities, loadIdentitySecret, loadImplicitCredits, loadJob, loadLedger, loadPendingFunding, loadReceipt, loadReceipts, loadResumableX402ExactFunding, loadResumableX402Funding, loadTempoChannelAssociation, loadTempoChannelController, loadTempoChannelEntry, loadX402Wallet, loggers, looksLikeMnemonic, lookupInvoice, makeInvoice, markCredit, markImplicitCreditLost, markJobTerminal, markRefillDrainNoticed, markRefillRailUnavailable, maxKeysetDenomination, microToSats, missingDleqRecoveryDiagnostic, mnemonicFingerprint, monetaryJson, msatsToMicro, msatsToUsd, msatsToUsdCents, msatsToUsdc, needsPocketRefill, needsTopup, nextStepHint, normalizeCreditEndpoint, normalizeFeedbackEndpointHost, nwcDedupWindowMs, nwcRejectionDisplay, nwcTimeoutMs, offersTempoCreditFunding, offersX402CreditFunding, parseBudget, parseCreditMenu, parseCreditTerms, parseLnAddress, parseLocktime, parseNwcUri, parseStatedBudget, parseTraceparent, parseUsdPrice, payInvoiceReconciling, payViaFloat, paymentRailLabel, paymentRequiredV2FromV1, pendingDrainById, pendingDrainFor, pickCreditFundRail, pinConfigSnapshot, pinDimension, planConfigReset, planCreditForQuote, planProbeDraw, pocketTargetMicro, pollNextAction, pollPendingCreditFundings, preferLightningFirst, prepareAgentSpend, prepareP2PKMint, previewConfigRollback, printFundingGuidance, probeFloat, probeRailLabel, probeWallets, processX402BatchCorrection, processX402BatchResponse, processX402BatchResponseForWallet, projectDiagnosticFields, projectEventName, projectSpanRow, providerProseSources, providerTextToString, railLabelAtSentenceStart, randomTraceId, raw, readCompletedCreditHistory, readFundValuation, readX402ChannelOnChain, receiptDisplay, receiptFailureDetail, receiptHint, receiptIssuedAtIso, receiptJsonFields, receiptPubkeyFromSecret, receiptTrustFields, receiveToAgentWallet, reclaimAtMs, reconcileRefusedX402Deposits, reconcileTempoChannelOnChain, recordBalanceResponse, recordCreditX402Instrument, recordDrainReceipts, recordFloatSpend, recordFundResponse, recordFundingMenuSnapshot, recordPendingDrain, recordPendingX402ExactFunding, recordPendingX402Funding, recordRefusedDrawBalance, recordSpend, recordX402ChannelMetadata, recoverPendingSubmission, redactUrl, redactUrlsInText, refFromJob, refundX402BatchChannel, releaseAgentReserve, removeX402Wallet, renderReceiptHuman, repairConfigDirMode, repinX402WalletNetwork, replayStoredReceipt, reserveAgentWallet, resolveBtcUsdRate, resolveFundMint, resolveLnurlPayMetadataUrl, resolveRpcHttpTransportOptions, resolveRpcOverride, resolveSigningIdentity, resolveTempoAsset, resolveTempoNetwork, resolveX402Asset, resolveX402ChannelRpc, restoreProofsFromOutputs, retireConfigBackup, retirePendingX402Funding, rollbackConfig, rpcEndpointLine, rpcEndpointSuffix, saveAgentWallet, saveIdentities, saveJob, saveLedger, saveX402Wallet, selectProofsForSpend, serializeOutputData, setEmitter, setOutputTraceId, settleDrainEvidence, shellQuoteArg, signAttestation, signDrainReceipt, signDvmRequestData, signFundingReceipt, signReceipt, signRequestData, signedRequestDomain, spendableAt, staleRateNotice, statusSnapshot, swapFeeForProofs, swapSendReserve, sweepPendingMelts, sweepPendingMints, sweepPendingSubmissions, sweepStaleInFlight, tempoBalanceCheckHint, tempoChannelControlledBy, tempoCredentialAmountMicro, tempoKeyImportRoutes, tempoSessionChallenge, tempoSessionChallengeMicro, tempoTokenReference, tempoWrongAssetHint, tierCapOverrides, toAgentProof, toFloatError, toLockPubkey, transportErrorCode, trustLadderFor, trustOverrideCapMicro, tryResolveBtcUsdRate, tryResolveTempoAsset, tryX402Payment, unreachableRailDisplay, unreachableRailHint, unrecordedFloatBudgetWarning, unsignRequestData, updateConfig, updateJob, usdToMsats, usdcContractByCaip2, usdcContractFor, usdcDomainNameFor, usdcDomainVersionFor, usdcToMsats, validateAgentMnemonic, validateLnAddress, validateX402Env, verifyAttestation, verifyCanonicalSignedRequest, verifyChallenge, verifyDrainReceipt, verifyDrainReceiptChain, verifyFundingReceipt, verifyFundingReceiptChain, verifyJobReceipt, verifyReceipt, verifyRouterFeedbackClaim, walletExists, warmFxSnapshot, weakestReceiptVerdict, windowStart, withIdentitiesLock, withInitRetry, withNwcPool, withTempoChannelLock, withTraceContext, withWalletLock, withX402ChannelLock, writeAgentMnemonic, writeIdentity, x402ChannelBalanceUnreconciledAt, x402ChannelControlledBy, x402ChannelReservation, x402CreditChannelNetworks, x402CreditExactNetworks, x402ExactFundingDead, x402FlavourForInstrument, x402NetworkByCaip2, x402NetworkBySlug, x402NetworkLabel, x402NetworkListForCopy, x402NetworkToCaip2, x402PendingBlockExpiresAt, x402PendingDepositExpiresAt, x402PendingFundingJson, x402PendingRetired, x402PendingStale, x402PendingUnsettled, x402RequiredFromError, x402ReservationRelease, x402SupportedNetworksHint, x402VoucherPendingRefusal, x402WrongAssetHint } from "./caller.js";
1
+ export { ADMIN_STATE_UNAVAILABLE, AGENT_MNEMONIC_FILE, BTC_RATE_FILE, BUDGET_FILE, CAPABILITY_NAME_RE, COINGECKO_SIMPLE_PRICE_URL, CONFIG_AUDIT_FILE, CONFIG_BACKUP_FILE, CONFIG_DIR, CONFIG_FILE, CONFIG_PINNED_FILE, CREDITS_FILE, CREDIT_DRAIN_RAILS, CREDIT_FUNDING_MODES, CREDIT_FUND_RAILS, CREDIT_POSTURES, DEFAULT_AGENT_MINT_URL, DEFAULT_CREDIT_POSTURE, DEFAULT_RESERVE_LOCKTIME_SECONDS, DIAGNOSTIC_CATALOGUE_VERSION, DbTransport, DvmError, DvmX402ChannelStorage, FAVORITES_FILE, FEEDBACK_NUDGES_FILE, FEEDBACK_POSTURES, FX_CACHE_TTL_MS, FX_RETRY_COUNT, IDENTITIES_FILE, IDENTITIES_VERSION, InvalidUsdPriceError, JOBS_FILE, MESSAGES_DIR, MemoryKVStore, NWC_FUNDING_FLOAT_ROLE, NwcBackend, NwcError, PAIRINGS_DIR, PRIVKEY_HEX_RE, PersistentCounterSource, RAIL_FLAGS, RAIL_REFUNDABLE, RECEIPTS_FILE, RECENT_SPENDS_CAP, RECOMMENDED_MINTS, RECOVERY_MNEMONIC_FILE, REQUEST_INTENTS_DIR, RESUME_MAX_AGE_MS, RESUME_MAX_ATTEMPTS, ROUTER_FEEDBACK_CLAIM_HEADER, ROUTER_FEEDBACK_CLAIM_TTL_MS, SPANS_INSERTED_CHANNEL, STABLECOIN_FUND_RAILS, SUPPORTED_PROTOCOL_VERSION, SpanWriter, StepCache, TEMPO_CHAIN_ID, TEMPO_CHANNELS_FILE, TEMPO_CHARGE_PENDING_STALE_MS, TEMPO_EXIT_KEY_MISSING_HINT, TEMPO_MODERATO_CHAIN_ID, TEMPO_MODERATO_RPC, TEMPO_PATH_USD_MODERATO, TEMPO_SESSION_UPDATED_REASON, WALLET_FILE, WALLET_VERSION, X402EnvValidationError, X402_BATCH_CHANNEL_ABI, X402_BATCH_SETTLEMENT_KEY, X402_BATCH_SETTLEMENT_SCHEME, X402_CHANNELS_FILE, X402_DEFAULT_FACILITATOR, X402_DEFAULT_NETWORK, 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, X402_V1_VERSION, X402_VERSION, abandonPendingSubmission, acknowledgeReplayedX402Payment, acknowledgeX402ChannelOwner, addPayment, advanceTempoChannelExit, amountBoundsVerdict, appendBudgetSpend, appendFundingReceipt, appendReceipt, applyImplicitReceiptCredit, applyReceiptCredit, applyRetryToPool, asProviderText, asProviderTextOpt, assertAgentMnemonicReplaceable, assertFloatBudget, assertNoRivalX402Voucher, assertNutSupport, assertSupportedX402Network, assertTempoSessionChallengeWithinAsk, assertTempoSessionDepositWithinCap, assertTempoSessionVoucherWithinAsk, assertTempoWalletIdle, assertValidBudget, assertX402ChannelPayer, assertX402RequirementDescribesChannel, assertX402WalletIdle, attestedDvmIdentity, authenticatedBuilderPubkey, authorizeProtectedRemoval, automaticCreditBoundRail, availableRails, backfillTrustAnchor, backupSecretFile, bindCashuTokenToSubmissionContext, bindDiagnosticCapabilityAuthority, bindDiagnosticIdentityAuthority, breakdownSince, buildAdminAuthHeader, buildAdminChallenge, buildAttestation, buildCompletionHintFields, buildDisplayMintInventory, buildPaymentRequiredV2, buildPaymentRequirements, buildPolicy, buildTempoCredential, builderLockPath, caip2ToX402Network, canReplaceExpiredX402Deposit, canSwap, canonicalRequestPath, canonicaliseForSigning, canonicalize, capFor, captureFundingReceipt, captureTransportReceipt, cashOutFromMint, cashuSubmissionBindingFingerprint, cashuSubmissionBindingFromContext, chainIdFromCaip2, checkBudgetForLedger, checkMeltQuoteState, checkMintHealth, checkReceiptAttestation, clearCreditSelection, clearPendingDrain, clearPendingFunding, clearPendingTempoChargeFunding, clearPendingX402ExactFunding, clearPendingX402Funding, clearRefillRailUnavailable, cliIdentityStoreGenerateIdentity, commitAgentSpend, completionFromMessages, completionSnapshot, computeNextAction, computeResultHash, computeSmartDenominations, configSnapshotPath, connectedTempoAccount, connectedX402Payer, correctPendingFundAmount, costAnchor, coveringMintsForSpend, createDiagnosticCapabilityAuthority, createMintQuoteRetryState, createMonotonicClock, createNoopLogger, createStdoutLogger, createTempoChannelStore, createTempoCloseCredential, createTempoCreditSession, createTempoSessionPaymentFetch, createX402BatchPayment, currentContext, decodePayment, decodePaymentRequiredHeader, deleteAgentMnemonic, deriveAgentMasterKeypair, deriveAgentRefundSubkey, deriveAgentRefundSubkeyPubkey, deriveBuilderLockKeypair, deriveBuilderLockPubkey, deriveIdentityFromPrivkey, derivePubkeyFromPrivkey, deriveReceiptKeypair, deriveReceiptSecret, deriveTempoAddress, describeConfigBackup, describeMintBounds, drainReceiptsDisplay, drainReceiptsHint, dvmLocationIdentity, effectiveCreditPosture, effectiveFundingMint, effectiveFundingRail, effectiveMints, emitFloatBudgetWarning, encodePayment, encodePaymentRequiredHeader, encodeSettleResponseHeader, enforceGlobalBudget, ensureAddress, ensureConfig, ensureConfigDir, ensureConfigSubdir, ensureProvisionalCredit, entryKind, epochMsToIso, exactEvmAuthorization, extendDiagnosticIdentityAuthority, extractBuilderHandle, fetchBtcUsdRate, fetchCoinGeckoBtcUsd, fetchCoinGeckoSpot, fetchLnurlPayInvoice, fetchMeltQuote, fetchMissingJobReceipt, fetchTrustAnchor, findSigningIdentityByPubkey, findX402Channel, floatBudgetJson, floatPaymentDisplay, floatPaymentJson, forgetCredit, formatAmount, formatAmountBestEffort, formatLocktime, formatPaymentAmount, formatSats, formatStaleness, formatUsd, formatUsdcMicrounits, fundAgentWallet, fundCredit, fundWireAmountMicro, fundingModeForTempoIntent, fundingModeForX402Flavour, fundingRailLabel, generateAgentMnemonic, generateEphemeralReceiptKey, generateIdentity, generateTempoKey, generateX402PrivateKey, getBalance, getBalanceByMint, getFundingGuidance, getInfo, getInputFeesForProofs, getLastKnownBtcRate, getOutputTraceId, getTempoUsdcBalance, getWallet, getX402Balance, hashCapabilities, hashedCanonicalDvmId, identitiesFileExists, info, initLoggers, insertSpanBatch, isAbortError, isArtifactMessage, isCancelMessage, isCompleteMessage, isCreditFundRail, isCreditFundingMode, isCreditPosture, isDrainReceipt, isFeedbackPosture, isFundingReceipt, isPaymentRailKey, isPaymentRequestMessage, isPromptMessage, isPublicRequestId, isResumable, isSignableExactRequirement, isSignedJobReceipt, isStablecoinFundRail, isTerminalJobStatus, isTextMessage, isValidEvmPrivateKey, isWorkingMessage, issueRouterFeedbackClaim, json, listCredits, listFundingMenuSnapshots, listImplicitCredits, listPendingFundings, listPendingX402Fundings, listPendingX402FundingsForChannel, listResumableTempoChargeFundings, listResumableX402ExactFundings, listResumableX402Fundings, listTempoChannelAssociations, listTransactions, listX402Channels, loadAgentWallet, loadAllJobs, loadBudgetLedger, loadConfig, loadConfiguredMints, loadCredit, loadCreditX402Binding, loadFloat, loadIdentities, loadIdentitySecret, loadImplicitCredits, loadJob, loadLedger, loadPendingFunding, loadReceipt, loadReceipts, loadResumableTempoChargeFunding, loadResumableX402ExactFunding, loadResumableX402Funding, loadTempoChannelAssociation, loadTempoChannelAssociationByKey, loadTempoChannelController, loadTempoChannelEntry, loadWalletConfiguredMints, loadX402Wallet, loggers, looksLikeMnemonic, lookupInvoice, makeInvoice, markCredit, markImplicitCreditLost, markJobTerminal, markRefillDrainNoticed, markRefillRailUnavailable, maxAdvertisedMicro, maxKeysetDenomination, meltAmountBounds, microToSats, missingDleqRecoveryDiagnostic, mnemonicFingerprint, monetaryJson, msatsToMicro, msatsToUsd, msatsToUsdCents, msatsToUsdc, needsPocketRefill, needsTopup, nextStepHint, normalizeCreditEndpoint, normalizeFeedbackEndpointHost, nwcDedupWindowMs, nwcRejectionDisplay, nwcTimeoutMs, offersTempoCreditCharge, offersTempoCreditFunding, offersTempoCreditSession, offersX402CreditChannel, offersX402CreditFlavour, offersX402CreditFunding, parseBudget, parseCreditMenu, parseCreditTerms, parseLnAddress, parseLocktime, parseNwcUri, parseStatedBudget, parseTraceparent, parseUsdPrice, payInvoiceReconciling, payViaFloat, paymentRailLabel, paymentRequiredV2FromV1, pendingDrainById, pendingDrainFor, persistTempoOpenCredential, pickCreditFundRail, pinConfigSnapshot, pinDimension, planConfigReset, planCreditForQuote, planProbeDraw, pocketTargetMicro, pollNextAction, pollPendingCreditFundings, preferLightningFirst, prepareAgentSpend, prepareP2PKMint, previewConfigRollback, printFundingGuidance, probeFloat, probeRailLabel, probeWallets, processX402BatchCorrection, processX402BatchResponse, processX402BatchResponseForWallet, progress, projectDiagnosticFields, projectEventName, projectSpanRow, providerProseSources, providerTextToString, railLabelAtSentenceStart, randomTraceId, raw, readAgentMnemonic, readCompletedCreditHistory, readFundValuation, readX402ChannelOnChain, receiptDisplay, receiptFailureDetail, receiptHint, receiptIssuedAtIso, receiptJsonFields, receiptPubkeyFromSecret, receiptTrustFields, receiveToAgentWallet, reclaimAtMs, reconcileRefusedX402Deposits, reconcileTempoChannelOnChain, recordBalanceResponse, recordCreditX402Instrument, recordDrainReceipts, recordFloatSpend, recordFundResponse, recordFundingMenuSnapshot, recordPendingDrain, recordPendingFunding, recordPendingTempoChargeFunding, recordPendingX402ExactFunding, recordPendingX402Funding, recordRefusedDrawBalance, recordSpend, recordX402ChannelMetadata, recoverPendingSubmission, redactUrl, redactUrlsInText, refFromJob, refundX402BatchChannel, rehydrateOutputData, releaseAgentReserve, removeX402Wallet, renderReceiptHuman, repairConfigDirMode, repinX402WalletNetwork, replayStoredReceipt, reserveAgentWallet, resolveBtcUsdRate, resolveFundMint, resolveLnurlPayMetadataUrl, resolveRpcHttpTransportOptions, resolveRpcOverride, resolveSigningIdentity, resolveTempoAsset, resolveTempoNetwork, resolveX402Asset, resolveX402ChannelRpc, restoreProofsFromOutputs, retireConfigBackup, retirePendingX402Funding, retireTempoChannel, retireTempoChannelScope, retryMintQuoteOperation, rollbackConfig, rpcEndpointLine, rpcEndpointSuffix, saveAgentWallet, saveBudgetLedger, saveIdentities, saveJob, saveLedger, saveX402Wallet, selectProofsForSpend, serializeOutputData, setEmitter, setOutputTraceId, settleDrainEvidence, sha256hex, shellQuoteArg, signAttestation, signDrainReceipt, signDvmRequestData, signFundingReceipt, signReceipt, signRequestData, signedRequestDomain, spendEntry, spendableAt, staleRateNotice, statusSnapshot, swapFeeForProofs, swapSendReserve, sweepPendingMelts, sweepPendingMints, sweepPendingSubmissions, sweepStaleInFlight, tempoAccountFromConfig, tempoBalanceCheckHint, tempoChannelControlledBy, tempoChargeCredentialSettleable, tempoCredentialAmountMicro, tempoCredentialValidBefore, tempoDescriptorController, tempoKeyImportRoutes, tempoSessionAssociationByKey, tempoSessionChallenge, tempoSessionChallengeChannelScope, tempoSessionChallengeMicro, tempoSessionCredentialChannelScope, tempoSessionCredentialCumulativeMicro, tempoSessionCumulativeCapMicro, tempoSessionPriorCumulativeMicro, tempoTokenReference, tempoWrongAssetHint, tierCapOverrides, toAgentProof, toCashuProofs, toFloatError, toLockPubkey, transportErrorCode, trustLadderFor, trustOverrideCapMicro, tryResolveBtcUsdRate, tryResolveTempoAsset, tryX402Payment, unreachableRailDisplay, unreachableRailHint, unrecordedFloatBudgetWarning, unsignRequestData, updateConfig, updateJob, usdToMsats, usdcContractByCaip2, usdcContractFor, usdcDomainNameFor, usdcDomainVersionFor, usdcToMsats, validateAgentMnemonic, validateLnAddress, validateX402Env, verifyAttestation, verifyCanonicalSignedRequest, verifyChallenge, verifyDrainReceipt, verifyDrainReceiptChain, verifyFundingReceipt, verifyFundingReceiptChain, verifyJobReceipt, verifyReceipt, verifyRouterFeedbackClaim, walletExists, warmFxSnapshot, weakestReceiptVerdict, windowEnd, windowStart, withIdentitiesLock, withInitRetry, withNwcPool, withTempoChannelLock, withTraceContext, withWalletLock, withX402ChannelLock, withholdsTempoCreditSession, withinAdvertisedTolerance, writeAgentMnemonic, writeIdentity, x402ChannelBalanceUnreconciledAt, x402ChannelControlledBy, x402ChannelReservation, x402CreditChannelNetworks, x402CreditExactNetworks, x402CreditFlavour, x402CreditFundingNetworks, x402ExactFundingDead, x402FlavourForInstrument, x402InstrumentForFlavour, x402NetworkByCaip2, x402NetworkBySlug, x402NetworkLabel, x402NetworkListForCopy, x402NetworkToCaip2, x402PendingBlockExpiresAt, x402PendingDepositExpiresAt, x402PendingFundingJson, x402PendingRetired, x402PendingStale, x402PendingUnsettled, x402RequiredFromError, x402ReservationRelease, x402SupportedNetworksHint, x402VoucherPendingRefusal, x402VoucherPendingState, x402WalletFromConfig, x402WrongAssetHint } from "./caller.js";
2
2
  export { DEFAULT_LOCK_PUBKEY_GRACE_SECONDS, JobCancelledError, MintHealthTracker, NON_CHANNEL_BITCOIN_RAILS, PAYMENT_PROOF_KEYS, PayoutReporter, PostgresTempoChargeStore, PostgresTempoSessionStore, RevenueReporter, SIGNED_ENVELOPE_FIELDS, SIGNED_ENVELOPE_TYPES, TEMPO_CLOSE_DB_RECOVERY_BUDGET_MS, TEMPO_CLOSE_REQUESTED_TOPIC, TempoSessionChannelMismatchError, X402FacilitatorHealth, X402_BATCH_SETTLEMENT_MAINNET_NETWORK, _testing, abortJob, activePubkeySet, applyPaymentInfoToJob, assertRevenueReporterReady, buildPaymentErrorResponse, clearAccumulatorForDvm, createAdminCashuNonceStore, createDVMServer, createDefaultReplayStore, createInstrumentedFetch, creditDepositPayload, depleteLots, derivedFundCreditId, devModeSkipsPaymentVerification, fifoOrder, fromJobRecord, fundedMicroFor, hasPaymentProof, hashLockKey, humanizeZodError, implicitCreditId, inKindDrawMsats, initLockPubkeyTable, initWalletAccumulatorTable, insertAccumulatorRows, installAdminCashuRoutes, isDerivedCreditId, isInKindDepletion, isNonChannelBitcoinRail, isStaleJobReapable, isTerminal, isYieldMessage, issueUpfrontChallenges, jobCredentialGate, loadLockPubkeyState, lockPubkeyStoreToLockPubkey, lotOwedSats, msatsToFiatMicro, netOwedSats, paymentErrorBody, pinAskFiat, priceFiatMicro, processIncomingPayment, providerMessage, pruneRetired, rateUnavailablePaymentError, repairX402ExactSettlementEffect, resolveFxSnapshot, resolvePriceFiat, revenueReporterBannerState, rotateLockPubkey, seedLockPubkeyState, settleWithFacilitator, toCreditTerms, toJobRecord, unknownRouteNotFound, verifyIncomingPayment, verifyTempoSessionManagementCredential, verifyUpfrontPayment, verifyWithFacilitator, verifyX402Payment, wrapMppx, x402RequiredUsdcMicro, x402SettledShare } from "./server.js";
@@ -1,23 +1,22 @@
1
1
  import { FacilitatorConfig } from '@x402/core/server';
2
- import { aj as PaymentPayload, ap as PaymentRequirementsV1, aq as PaymentRequirementsV2, aE as X402Config, av as SettleResponse, aC as VerifyResponse, bi as X402ExactVersionSupport, bj as X402Receipt, bk as TransactionalPayoutHook, bl as CashuMeltCompleted } from '../step-cache-QG_h5-3G.js';
3
- export { bm as CreditDepositPayload, bn as CreditDrainPayload, bo as FundingLot, bp as LotDebit, bq as LotDepletion, br as MppxServer, bs as NON_CHANNEL_BITCOIN_RAILS, bt as NonChannelBitcoinRail, bu as PayoutReporter, bv as PostgresTempoSessionStore, bw as RevenueReporter, bx as SIGNED_ENVELOPE_FIELDS, by as SIGNED_ENVELOPE_TYPES, bz as X402TrackedChannel, bA as _testing, bB as createDefaultReplayStore, bC as depleteLots, bD as fifoOrder, bE as inKindDrawMsats, bF as isInKindDepletion, bG as isNonChannelBitcoinRail, bH as lotOwedSats, bI as netOwedSats, bJ as wrapMppx } from '../step-cache-QG_h5-3G.js';
2
+ import { al as PaymentPayload, a9 as PaymentRequirementsV1, aa as PaymentRequirementsV2, aE as X402Config, av as SettleResponse, aC as VerifyResponse, bi as X402ExactVersionSupport, bj as X402Receipt, bk as TransactionalPayoutHook, bl as CashuMeltCompleted } from '../step-cache-2MkvenJn.js';
3
+ export { bm as CreditDepositPayload, bn as CreditDrainPayload, bo as FundingLot, bp as LotDebit, bq as LotDepletion, br as MppxServer, bs as NON_CHANNEL_BITCOIN_RAILS, bt as NonChannelBitcoinRail, bu as PayoutReporter, bv as PostgresTempoSessionStore, bw as RevenueReporter, bx as SIGNED_ENVELOPE_FIELDS, by as SIGNED_ENVELOPE_TYPES, bz as X402TrackedChannel, bA as _testing, bB as createDefaultReplayStore, bC as depleteLots, bD as fifoOrder, bE as inKindDrawMsats, bF as isInKindDepletion, bG as isNonChannelBitcoinRail, bH as lotOwedSats, bI as netOwedSats, bJ as wrapMppx } from '../step-cache-2MkvenJn.js';
4
4
  import { Hono } from 'hono';
5
5
  import { Env, BlankSchema } from 'hono/types';
6
6
  import { Pool } from 'pg';
7
7
  export { Pool } from 'pg';
8
8
  import { g as getWallet } from '../wallet-Dwjs5n_M.js';
9
- import { A as AccumulatorPool, a as AccumulatorQuerier, C as ConsumedCredentialStore } from '../credit-menu-CAfqe8IY.js';
10
- export { b as AppEnv, c as CreditFundingReport, F as FiatDenomination, d as FiatDenominationFailure, e as FundOnlyRequest, I as IncomingPaymentOpts, J as JobCancelledError, M as MintHealthTracker, P as PAYMENT_PROOF_KEYS, f as PaymentErrorCode, g as PaymentErrorDetail, h as PaymentInfo, i as PostgresTempoChargeStore, R as ReporterBannerOpts, j as ResolvedFx, k as RevenueBootCheckOpts, S as SDKServerOpts, l as ServerJob, m as ShortPayForfeit, T as TempoChannelReport, n as TempoObserverHealth, o as TempoSessionChannelMismatchError, U as UpfrontPaymentOpts, V as VerifiedIncomingPayment, p as VerifyIncomingSnapshot, X as X402BatchChannelObservation, q as X402FacilitatorHealth, r as X402SettlementEvidenceOutcome, s as X402SettlementRepair, t as X402SettlementRepairRefusal, u as X402SettlementRepaired, v as X402WedgedSettlement, w as X402WedgedSettlementPage, x as X402_BATCH_SETTLEMENT_MAINNET_NETWORK, y as abortJob, z as applyPaymentInfoToJob, B as assertRevenueReporterReady, D as buildPaymentErrorResponse, E as clearAccumulatorForDvm, G as createDVMServer, H as creditDepositPayload, K as derivedFundCreditId, L as devModeSkipsPaymentVerification, N as fromJobRecord, O as fundedMicroFor, Q as hasPaymentProof, W as hashLockKey, Y as implicitCreditId, Z as initWalletAccumulatorTable, _ as insertAccumulatorRows, $ as isDerivedCreditId, a0 as isTerminal, a1 as isYieldMessage, a2 as issueUpfrontChallenges, a3 as msatsToFiatMicro, a4 as paymentErrorBody, a5 as pinAskFiat, a6 as priceFiatMicro, a7 as processIncomingPayment, a8 as providerMessage, a9 as repairX402ExactSettlementEffect, aa as resolveFxSnapshot, ab as resolvePriceFiat, ac as revenueReporterBannerState, ad as toCreditTerms, ae as toJobRecord, af as unknownRouteNotFound, ag as verifyIncomingPayment, ah as verifyTempoSessionManagementCredential, ai as verifyUpfrontPayment, aj as x402RequiredUsdcMicro, ak as x402SettledShare } from '../credit-menu-CAfqe8IY.js';
11
- import { g as LockPubkey } from '../lightning-backend-BAx2Y8pP.js';
12
- export { t as lockPubkeyStoreToLockPubkey } from '../lightning-backend-BAx2Y8pP.js';
13
- export { O as OutgoingMessage, S as StaleJobReapable, i as isStaleJobReapable } from '../job-store-Bx-VFRjg.js';
9
+ import { C as ConsumedCredentialStore, L as LockPubkeyStateLoader } from '../credit-menu-DjnkeEUU.js';
10
+ export { A as AccumulatorPool, a as AppEnv, b as CreditFundingReport, D as DEFAULT_LOCK_PUBKEY_GRACE_SECONDS, F as FiatDenomination, c as FiatDenominationFailure, d as FundOnlyRequest, I as IncomingPaymentOpts, J as JobCancelledError, e as LockPubkeyPool, f as LockPubkeyState, M as MintHealthTracker, P as PAYMENT_PROOF_KEYS, g as PaymentErrorCode, h as PaymentErrorDetail, i as PaymentInfo, j as PostgresTempoChargeStore, R as ReporterBannerOpts, k as ResolvedFx, l as RevenueBootCheckOpts, S as SDKServerOpts, m as ServerJob, n as ShortPayForfeit, T as TempoChannelReport, o as TempoObserverHealth, p as TempoSessionChannelMismatchError, U as UpfrontPaymentOpts, V as VerifiedIncomingPayment, q as VerifyIncomingSnapshot, X as X402BatchChannelObservation, r as X402FacilitatorHealth, s as X402SettlementEvidenceOutcome, t as X402SettlementRepair, u as X402SettlementRepairRefusal, v as X402SettlementRepaired, w as X402WedgedSettlement, x as X402WedgedSettlementPage, y as X402_BATCH_SETTLEMENT_MAINNET_NETWORK, z as abortJob, B as activePubkeySet, E as applyPaymentInfoToJob, G as assertRevenueReporterReady, H as buildPaymentErrorResponse, K as clearAccumulatorForDvm, N as createDVMServer, O as creditDepositPayload, Q as derivedFundCreditId, W as devModeSkipsPaymentVerification, Y as fromJobRecord, Z as fundedMicroFor, _ as hasPaymentProof, $ as hashLockKey, a0 as implicitCreditId, a1 as initLockPubkeyTable, a2 as initWalletAccumulatorTable, a3 as insertAccumulatorRows, a4 as isDerivedCreditId, a5 as isTerminal, a6 as isYieldMessage, a7 as issueUpfrontChallenges, a8 as loadLockPubkeyState, a9 as msatsToFiatMicro, aa as paymentErrorBody, ab as pinAskFiat, ac as priceFiatMicro, ad as processIncomingPayment, ae as providerMessage, af as pruneRetired, ag as repairX402ExactSettlementEffect, ah as resolveFxSnapshot, ai as resolvePriceFiat, aj as revenueReporterBannerState, ak as rotateLockPubkey, al as seedLockPubkeyState, am as toCreditTerms, an as toJobRecord, ao as unknownRouteNotFound, ap as verifyIncomingPayment, aq as verifyTempoSessionManagementCredential, ar as verifyUpfrontPayment, as as x402RequiredUsdcMicro, at as x402SettledShare } from '../credit-menu-DjnkeEUU.js';
11
+ export { O as OutgoingMessage, S as StaleJobReapable, i as isStaleJobReapable } from '../job-store-DdLXBpol.js';
14
12
  import { z } from 'zod';
13
+ export { g as LockPubkeyStoreLockPubkey, t as lockPubkeyStoreToLockPubkey } from '../lightning-backend-Bw-qtAbt.js';
15
14
  import 'mppx';
16
15
  import '@x402/evm/batch-settlement/server';
17
16
  import '@x402/core/types';
18
17
  import 'viem';
19
18
  import '@cashu/cashu-ts';
20
- import '../fx-D9nsN3n4.js';
19
+ import '../fx-zMWFzfrU.js';
21
20
 
22
21
  declare function verifyWithFacilitator(payload: PaymentPayload, requirements: PaymentRequirementsV1 | PaymentRequirementsV2, config?: Pick<X402Config, "facilitator" | "facilitatorAuth">, createAuthHeaders?: FacilitatorConfig["createAuthHeaders"] | undefined): Promise<VerifyResponse>;
23
22
  declare function settleWithFacilitator(payload: PaymentPayload, requirements: PaymentRequirementsV1 | PaymentRequirementsV2, config?: Pick<X402Config, "facilitator" | "facilitatorAuth">, createAuthHeaders?: FacilitatorConfig["createAuthHeaders"] | undefined): Promise<SettleResponse>;
@@ -43,96 +42,6 @@ declare function settleWithFacilitator(payload: PaymentPayload, requirements: Pa
43
42
  */
44
43
  declare function verifyX402Payment(paymentHeader: string, config: X402Config, requiredUsdcMicro: bigint, resource: string, btcUsdRate: number, exactVersions?: X402ExactVersionSupport): Promise<X402Receipt>;
45
44
 
46
- /**
47
- * Snapshot of a DVM's published lock-pubkey state at a point in time. `current`
48
- * is what the SDK advertises as `cashu.lock_pubkeys[0]`; `retired` are the
49
- * pubkeys inside the rotation grace window plus legacy sentinel-0 entries
50
- * kept until explicitly cleaned up. Both halves are needed by the
51
- * receive path (accept proofs locked to any entry) and the admin auth verifier
52
- * (accept signatures from any entry during grace).
53
- */
54
- interface LockPubkeyState {
55
- current: LockPubkey;
56
- retired: {
57
- pubkey: LockPubkey;
58
- retiredAtMs: number;
59
- }[];
60
- }
61
- /**
62
- * Lazy accessor for the DVM's lock-pubkey state. Threaded through the SDK
63
- * server so call sites (info handler, accept flow, admin auth) read the fresh
64
- * state on every invocation — rotation propagation has to be visible without
65
- * a process restart.
66
- */
67
- type LockPubkeyStateLoader = () => Promise<LockPubkeyState>;
68
- type LockPubkeyPool = AccumulatorPool;
69
- /**
70
- * Create the `dvm_lock_pubkeys` table if absent. Each row is one entry in a
71
- * DVM's lock-pubkey lifecycle: `retired_at_ms IS NULL` is the current pubkey,
72
- * any non-null value is a retired pubkey that the rotation walker can still
73
- * derive privkeys for. One current row per `dvm_id` is enforced via a partial
74
- * unique index — keeps `rotateLockPubkey` honest under concurrent calls.
75
- */
76
- declare function initLockPubkeyTable(db: LockPubkeyPool): Promise<void>;
77
- /**
78
- * Idempotent first-boot seed. Inserts `pubkey` as the current row for `dvmId`
79
- * only when no current row exists. Reseeding with a different pubkey is a
80
- * no-op — once the DB has state, `rotateLockPubkey` is the only sanctioned
81
- * mutator, so a stale `DVMKIT_CASHU_LOCK_PUBKEY` env on a redeploy can't
82
- * silently reset the DVM's view of "what's current".
83
- *
84
- * Also backfills any distinct `lock_pubkey` values found in
85
- * `wallet_accumulator` for this DVM that aren't yet in `dvm_lock_pubkeys`,
86
- * inserting them as retired rows with `retired_at_ms = 0` — the
87
- * "long-retired-still-meltable" sentinel. This handles legacy batches
88
- * that would otherwise trip the monitor's `orphan_lock_pubkey` alarm every
89
- * tick. Sentinel-0 rows are exempt from grace-window filtering and
90
- * `pruneRetired` so they stay visible until the operator melts the legacy
91
- * batches and the receive path keeps accepting in-flight tokens locked to
92
- * them.
93
- *
94
- * `ON CONFLICT DO NOTHING` protects concurrent seeds invoked reentrantly from
95
- * one guarded callback. Nested calls bypass the queue to avoid deadlock, so
96
- * both inserts can pass `WHERE NOT EXISTS` before either commits.
97
- */
98
- declare function seedLockPubkeyState(db: LockPubkeyPool, dvmId: string, pubkey: string, now?: number): Promise<void>;
99
- /**
100
- * Read the active lock-pubkey state for a DVM. Retired rows older than the
101
- * grace window are filtered out; aged-out rows linger physically until
102
- * `pruneRetired` deletes them on a monitor tick. Sentinel-0 rows (the
103
- * `retired_at_ms = 0` legacy backfill from `seedLockPubkeyState`) are always
104
- * included regardless of grace. Throws when no current row exists — the SDK's
105
- * accept/info/admin paths must not run before `seedLockPubkeyState` has been
106
- * called.
107
- */
108
- declare function loadLockPubkeyState(db: AccumulatorQuerier, dvmId: string, graceMs: number, now?: number): Promise<LockPubkeyState>;
109
- /**
110
- * Atomically demote the current pubkey to retired (stamping `retired_at_ms`)
111
- * and insert `newPubkey` as the new current row. Wrapped in a transaction so
112
- * the partial unique index never has two current rows visible mid-rotation.
113
- * Returns the post-rotation state filtered by the supplied grace window.
114
- */
115
- declare function rotateLockPubkey(db: LockPubkeyPool, dvmId: string, newPubkey: string, graceMs: number, now?: number): Promise<LockPubkeyState>;
116
- /**
117
- * Delete retired rows whose `retired_at_ms` is older than `now - graceMs`.
118
- * Called from the monitor tick so aged-out entries don't accumulate.
119
- * `wallet_accumulator` rows pointing at those pubkeys remain meltable (the
120
- * builder can still derive the privkey from the mnemonic + rotation_index) —
121
- * pruning only affects what the DVM advertises and accepts.
122
- *
123
- * Sentinel-0 rows (the legacy backfill from `seedLockPubkeyState`) are
124
- * exempted from pruning — they exist precisely so the monitor keeps treating
125
- * legacy `wallet_accumulator` batches as retired-still-meltable rather than
126
- * orphan.
127
- */
128
- declare function pruneRetired(db: AccumulatorQuerier, dvmId: string, graceMs: number, now?: number): Promise<number>;
129
- /**
130
- * Default rotation grace window in seconds. Override through
131
- * `SDKServerOpts.lockPubkeyGraceSeconds`.
132
- */
133
- declare const DEFAULT_LOCK_PUBKEY_GRACE_SECONDS = 86400;
134
- declare function activePubkeySet(state: LockPubkeyState): LockPubkey[];
135
-
136
45
  interface InstallAdminCashuRoutesOpts {
137
46
  db: Pool;
138
47
  /** Identifier of this DVM — bound into every signed admin challenge. */
@@ -277,4 +186,4 @@ declare function humanizeZodError(err: z.ZodError, opts: {
277
186
  schemaUrl: string;
278
187
  }): HumanizedZodError;
279
188
 
280
- export { AccumulatorPool, DEFAULT_LOCK_PUBKEY_GRACE_SECONDS, type LockPubkeyPool, type LockPubkeyState, type LockPubkeyStateLoader, LockPubkey as LockPubkeyStoreLockPubkey, TEMPO_CLOSE_DB_RECOVERY_BUDGET_MS, TEMPO_CLOSE_REQUESTED_TOPIC, activePubkeySet, createAdminCashuNonceStore, createInstrumentedFetch, humanizeZodError, initLockPubkeyTable, installAdminCashuRoutes, jobCredentialGate, loadLockPubkeyState, pruneRetired, rateUnavailablePaymentError, rotateLockPubkey, seedLockPubkeyState, settleWithFacilitator, verifyWithFacilitator, verifyX402Payment };
189
+ export { LockPubkeyStateLoader, TEMPO_CLOSE_DB_RECOVERY_BUDGET_MS, TEMPO_CLOSE_REQUESTED_TOPIC, createAdminCashuNonceStore, createInstrumentedFetch, humanizeZodError, installAdminCashuRoutes, jobCredentialGate, rateUnavailablePaymentError, settleWithFacilitator, verifyWithFacilitator, verifyX402Payment };
@@ -3,7 +3,7 @@ import {
3
3
  } from "../chunk-X7EZ5CLI.js";
4
4
  import {
5
5
  verifyX402Payment
6
- } from "../chunk-7ZUKL4IV.js";
6
+ } from "../chunk-RA2WIX7G.js";
7
7
  import {
8
8
  RevenueReporter
9
9
  } from "../chunk-Z4ZT5LNT.js";
@@ -64,43 +64,45 @@ import {
64
64
  verifyUpfrontPayment,
65
65
  x402RequiredUsdcMicro,
66
66
  x402SettledShare
67
- } from "../chunk-EYTHFFFU.js";
67
+ } from "../chunk-GY66THYI.js";
68
68
  import "../chunk-XRLKGCAW.js";
69
69
  import {
70
70
  settleWithFacilitator,
71
71
  verifyWithFacilitator
72
- } from "../chunk-PLG4XER6.js";
73
- import "../chunk-FYRR2UEZ.js";
74
- import "../chunk-PB4FYZET.js";
72
+ } from "../chunk-S3OY533W.js";
73
+ import "../chunk-OML32F6I.js";
74
+ import "../chunk-EQLA4FFY.js";
75
75
  import "../chunk-YG7G4DPZ.js";
76
76
  import {
77
77
  SIGNED_ENVELOPE_FIELDS,
78
78
  SIGNED_ENVELOPE_TYPES,
79
79
  createDefaultReplayStore,
80
80
  humanizeZodError
81
- } from "../chunk-Z4KLECAC.js";
81
+ } from "../chunk-N5RZ5HVB.js";
82
+ import {
83
+ createInstrumentedFetch,
84
+ isStaleJobReapable
85
+ } from "../chunk-IV6Q7NRW.js";
82
86
  import {
83
87
  JobCancelledError,
84
88
  abortJob,
85
- createInstrumentedFetch,
86
89
  fromJobRecord,
87
- isStaleJobReapable,
88
90
  isTerminal,
89
91
  isYieldMessage,
90
92
  providerMessage,
91
93
  toJobRecord
92
- } from "../chunk-O5AT6S5T.js";
94
+ } from "../chunk-AFV77S4C.js";
93
95
  import {
94
96
  toLockPubkey
95
- } from "../chunk-TUA7PYH7.js";
96
- import "../chunk-IWQHUSMO.js";
97
- import "../chunk-PAIM66YA.js";
98
- import "../chunk-CZULM42S.js";
99
- import "../chunk-A4YFWZ7R.js";
97
+ } from "../chunk-KMED3H3A.js";
98
+ import "../chunk-NFMOPYBA.js";
99
+ import "../chunk-CXCQLOOK.js";
100
+ import "../chunk-RCM3P2HE.js";
100
101
  import "../chunk-OFVV37XC.js";
101
- import "../chunk-6DOGTAHA.js";
102
+ import "../chunk-QR2EF2NI.js";
102
103
  import "../chunk-66HGCPBU.js";
103
104
  import "../chunk-FUJ36YDV.js";
105
+ import "../chunk-BQJIFRAZ.js";
104
106
  import "../chunk-BYCEKO65.js";
105
107
  import "../chunk-AT6V3SY7.js";
106
108
  import {
@@ -112,11 +114,10 @@ import {
112
114
  isNonChannelBitcoinRail,
113
115
  lotOwedSats,
114
116
  netOwedSats
115
- } from "../chunk-JH3SX3LY.js";
117
+ } from "../chunk-6XF3RVVX.js";
116
118
  import "../chunk-COYKJRMM.js";
117
119
  import "../chunk-P6QON7ER.js";
118
- import "../chunk-RLTSCKRI.js";
119
- import "../chunk-LIRAHP7B.js";
120
+ import "../chunk-BPYMEMQX.js";
120
121
  import {
121
122
  _testing,
122
123
  wrapMppx
@@ -1,5 +1,5 @@
1
1
  import { ProofLike } from '@cashu/cashu-ts';
2
- import { a1 as Message, ah as FundingMethod, X as FundingReceipt, bP as CreditSnapshot, Y as JobReceipt, ax as StepRecord, a2 as MessageType } from './step-cache-QG_h5-3G.js';
2
+ import { a3 as Message, aj as FundingMethod, _ as FundingReceipt, bP as CreditSnapshot, $ as JobReceipt, ax as StepRecord, a4 as MessageType } from './step-cache-2MkvenJn.js';
3
3
 
4
4
  type JobStatus = "processing" | "completed" | "failed" | "awaiting-input" | "cancelled" | "working";
5
5
  interface JobRecord {
@@ -1,4 +1,4 @@
1
- import { W as JsonValue } from './step-cache-QG_h5-3G.js';
1
+ import { W as JsonValue } from './step-cache-2MkvenJn.js';
2
2
 
3
3
  declare const lockPubkeyBrand: unique symbol;
4
4
  /**
@@ -227,6 +227,8 @@ declare function checkMintHealth(mintUrl: string, opts?: CheckMintHealthOptions)
227
227
  * *selection* only, so a mint that can still melt stays loadable for cash-out.
228
228
  */
229
229
  declare function canSwap(nuts: Record<string, unknown>): boolean;
230
+ /** The NUT-05 (melt) twin of {@link mintAmountBounds} — limits on one payout. */
231
+ declare function meltAmountBounds(nuts: Record<string, unknown>): MintAmountBounds;
230
232
  /** Whether `sats` falls inside a mint's advertised limits, and which end it broke. */
231
233
  type AmountBoundsVerdict = "ok" | "below_min" | "above_max";
232
234
  /**
@@ -342,4 +344,4 @@ interface LightningBackend {
342
344
  listTransactions?(options: LightningTransactionListOptions): Promise<LightningTransactionSnapshot[]>;
343
345
  }
344
346
 
345
- export { type AttestationPayload as A, type BuilderIdentityKeypair as B, type CreatedInvoice as C, type InvoiceStatus as I, type LightningTransactionListOptions as L, type MintAmountBounds as M, type LightningTransactionSnapshot as a, type LightningBackend as b, type LightningPayment as c, type LightningWalletInfo as d, type MintHealthCheckResult as e, type CheckMintHealthOptions as f, type LockPubkey as g, amountBoundsVerdict as h, assertNutSupport as i, buildAttestation as j, canSwap as k, checkMintHealth as l, generateIdentity as m, hashCapabilities as n, loadIdentitySecret as o, signAttestation as s, toLockPubkey as t, verifyAttestation as v, writeIdentity as w };
347
+ export { type AttestationPayload as A, type BuilderIdentityKeypair as B, type CreatedInvoice as C, type InvoiceStatus as I, type LightningTransactionListOptions as L, type MintAmountBounds as M, type LightningTransactionSnapshot as a, type LightningBackend as b, type LightningPayment as c, type LightningWalletInfo as d, type MintHealthCheckResult as e, type CheckMintHealthOptions as f, type LockPubkey as g, amountBoundsVerdict as h, assertNutSupport as i, buildAttestation as j, canSwap as k, checkMintHealth as l, generateIdentity as m, hashCapabilities as n, loadIdentitySecret as o, meltAmountBounds as p, signAttestation as s, toLockPubkey as t, verifyAttestation as v, writeIdentity as w };
@@ -1,11 +1,10 @@
1
1
  import {
2
2
  MemoryCreditLedger
3
- } from "./chunk-FYRR2UEZ.js";
4
- import "./chunk-JH3SX3LY.js";
3
+ } from "./chunk-OML32F6I.js";
4
+ import "./chunk-6XF3RVVX.js";
5
5
  import "./chunk-COYKJRMM.js";
6
6
  import "./chunk-P6QON7ER.js";
7
- import "./chunk-RLTSCKRI.js";
8
- import "./chunk-LIRAHP7B.js";
7
+ import "./chunk-BPYMEMQX.js";
9
8
  import "./chunk-ETXDTUJO.js";
10
9
  export {
11
10
  MemoryCreditLedger
@@ -51,6 +51,19 @@ var PostgresConsumedCredentialStore = class {
51
51
  );
52
52
  return (rowCount ?? 0) > 0;
53
53
  }
54
+ async consume(realm, challengeId, ttlSeconds) {
55
+ const now = this.now();
56
+ const { rowCount } = await this.pool.query(
57
+ `INSERT INTO ${this.tableName}(realm,challenge_id,expires_at) VALUES($1,$2,$3)
58
+ ON CONFLICT(realm,challenge_id) DO UPDATE SET expires_at=EXCLUDED.expires_at
59
+ WHERE ${this.tableName}.expires_at <= $4`,
60
+ [realm, challengeId, now + ttlSeconds * 1e3, now]
61
+ );
62
+ if (rowCount === 1 && this.gcSampleRate > 0 && Math.random() < this.gcSampleRate) {
63
+ this.gcSweep(now);
64
+ }
65
+ return rowCount === 1;
66
+ }
54
67
  async mark(realm, challengeId, ttlSeconds) {
55
68
  const now = this.now();
56
69
  const expiresAt = now + ttlSeconds * 1e3;
@@ -1,6 +1,8 @@
1
1
  import {
2
2
  PostgresJobStore
3
- } from "./chunk-PB4FYZET.js";
3
+ } from "./chunk-EQLA4FFY.js";
4
+ import "./chunk-AFV77S4C.js";
5
+ import "./chunk-BQJIFRAZ.js";
4
6
  import "./chunk-COYKJRMM.js";
5
7
  import "./chunk-ETXDTUJO.js";
6
8
  export {
@@ -1,21 +1,24 @@
1
- import { ac as CashuMode, bK as CreditDrainEnqueue, bL as HostedSettlementReportObligations, R as ResolvedCreditConfig, bM as DVMAuthScheme, z as SignedRequestDomain, bN as CreditLedgerLike, bO as X402RefundSettlementGate, bP as CreditSnapshot, bQ as DrawResult, bR as X402SettlementStatus, bS as X402UnresolvedRefund, bT as GrownDrawResult, bU as DrawResolution, bV as FundingRecord, X as FundingReceipt, bW as CreditInvoiceRecord, bX as InvoiceSettlement, bY as BlockedInvoiceCursor, bZ as InvoiceReconciliation, b_ as InvoiceWriteOff, b$ as DrawRecord, c0 as StalePendingDrawCursor, c1 as TempoCreditLossEvidence, c2 as CreditLedgerQuerier, c3 as TempoCreditLoss, c4 as X402CreditLossEvidence, c5 as X402CreditLoss, c6 as DrainMethod, c7 as DrainRequestResult, c8 as BitcoinDepositLiability, bo as FundingLot, c9 as CreditDrainRecord, ca as ChannelDrainCursor, cb as DrainWriteOff, cc as DrainReleaseResult, cd as DrainFulfilment, ce as DrainTransitionResult, cf as HostingCleanupFence, Y as JobReceipt, a1 as Message, K as KVStore, F as SignedRequestReplayStore, Z as ZodLike, a as DVMDescriptor } from '../step-cache-QG_h5-3G.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, cz as JobCostReportPayload, cA as JobTerminalReportPayload, cB as PostgresX402ChannelStorage, cC as ReplayStoreBackend, cD as RevenueSkippedNoRailPayload, cE as RevenueSkippedNoRailReason, w as SIGNED_REQUEST_AUTH_ID, x as SIGNED_REQUEST_STATEMENT_VERSION, cF as Secp256k1AuthOpts, y as SignedRequestAudience, B as SignedRequestError, E as SignedRequestFailure, G as SignedRequestSignOpts, H as SignedRequestStatementHeader, M as SignedRequestVerifier, cG as X402ChannelStorageOpts, cH as X402RelayLockHolder, cI as X402RelaySubmissionLock, cJ as X402RelaySubmissionLockError, cK as allocateDrawValue, cL as clientCompatibilityAttributes, cM as clientCompatibilityMiddleware, cN as clientUpgradeRequired, N as createSignedRequestVerifier, cO as parseClientCapabilities, cP as parseClientCompatibility, cQ as parseDvmClient, cR as parseProtocolVersion, cS as requireClientCompatibility, cT as secp256k1Auth, cU as signedRequestInput, T as signedRequestStatementHeader } from '../step-cache-QG_h5-3G.js';
1
+ import { ae as CashuMode, bK as CreditDrainEnqueue, bL as HostedSettlementReportObligations, R as ResolvedCreditConfig, bM as DVMAuthScheme, z as SignedRequestDomain, bN as CreditLedgerLike, bO as X402RefundSettlementGate, bP as CreditSnapshot, bQ as DrawResult, bR as X402SettlementStatus, bS as X402UnresolvedRefund, bT as GrownDrawResult, bU as DrawResolution, bV as FundingRecord, _ as FundingReceipt, bW as CreditInvoiceRecord, bX as InvoiceSettlement, bY as BlockedInvoiceCursor, bZ as InvoiceReconciliation, b_ as InvoiceWriteOff, b$ as DrawRecord, c0 as StalePendingDrawCursor, c1 as TempoCreditLossEvidence, c2 as CreditLedgerQuerier, c3 as TempoCreditLoss, c4 as X402CreditLossEvidence, c5 as X402CreditLoss, c6 as DrainMethod, c7 as DrainRequestResult, c8 as BitcoinDepositLiability, bo as FundingLot, c9 as CreditDrainRecord, ca as ChannelDrainCursor, cb as DrainWriteOff, cc as DrainReleaseResult, cd as DrainFulfilment, ce as DrainTransitionResult, cf as HostingCleanupFence, $ as JobReceipt, a3 as Message, K as KVStore, F as SignedRequestReplayStore, Z as ZodLike, a as DVMDescriptor } from '../step-cache-2MkvenJn.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, cz as JobCostReportPayload, cA as JobTerminalReportPayload, cB as PostgresX402ChannelStorage, cC as ReplayStoreBackend, cD as RevenueSkippedNoRailPayload, cE as RevenueSkippedNoRailReason, w as SIGNED_REQUEST_AUTH_ID, x as SIGNED_REQUEST_STATEMENT_VERSION, cF as Secp256k1AuthOpts, y as SignedRequestAudience, B as SignedRequestError, E as SignedRequestFailure, G as SignedRequestSignOpts, H as SignedRequestStatementHeader, M as SignedRequestVerifier, cG as X402ChannelStorageOpts, cH as X402RelayLockHolder, cI as X402RelaySubmissionLock, cJ as X402RelaySubmissionLockError, cK as allocateDrawValue, cL as clientCompatibilityAttributes, cM as clientCompatibilityMiddleware, cN as clientUpgradeRequired, N as createSignedRequestVerifier, cO as parseClientCapabilities, cP as parseClientCompatibility, cQ as parseDvmClient, cR as parseProtocolVersion, cS as requireClientCompatibility, cT as secp256k1Auth, cU as signedRequestInput, T as signedRequestStatementHeader } from '../step-cache-2MkvenJn.js';
3
3
  import { Pool } from 'pg';
4
- import { al as CreditMenu, b as AppEnv, U as UpfrontPaymentOpts, h as PaymentInfo, am as ReceiptIssuer, an as LightningReceive, ao as TempoSettlementReadiness, ap as DVMHostOpts, aq as DVMServeResult } from '../credit-menu-CAfqe8IY.js';
5
- export { ar as BuildCreditMenuArgs, as as BuilderIdentity, at as CREDIT_ENVELOPE_KEYS, C as ConsumedCredentialStore, au as CreateX402BatchSettlementServerOpts, av as CreditEnvelope, aw as CreditEnvelopeError, ax as CreditFundCommitment, ay as CreditTerms, az as DEFAULT_INVOICE_TTL_SECONDS, aA as DVMHost, aB as HostingClosureCommand, aC as HostingClosureEvidence, aD as HostingControlCommand, aE as HostingControlConfig, aF as HostingControlStatus, aG as JobManager, aH as JobManagerOpts, aI as LightningReceiveConfig, aJ as MIN_INVOICE_TTL_SECONDS, aK as MemoryConsumedCredentialStore, aL as MemoryConsumedCredentialStoreOpts, aM as MemoryProcessedPaymentStore, aN as MemoryX402ExactSettlementStore, aO as MountOpts, aP as OwnerDisplay, aQ as PaidJobCompletion, aR as PaymentMode, aS as PlatformReporterOpts, aT as PostgresProcessedPaymentStore, aU as PostgresX402ExactSettlementStore, aV as PriceFiat, aW as ProcessedPaymentQuerier, aX as ProcessedPaymentRail, aY as ProcessedPaymentRecord, aZ as ProcessedPaymentReplayError, a_ as ProcessedPaymentStore, a$ as X402BatchAcceptance, b0 as X402BatchFunding, b1 as X402BatchRefusal, b2 as X402BatchSettlementServer, b3 as X402ExactAcceptance, b4 as X402ExactIntentConflictError, b5 as X402ExactSettlementAttempt, b6 as X402ExactSettlementChainEvidence, b7 as X402ExactSettlementEffect, b8 as X402ExactSettlementEvidenceMissingError, b9 as X402ExactSettlementEvidenceReader, ba as X402ExactSettlementIntent, bb as X402ExactSettlementNotReadyError, bc as X402ExactSettlementServer, bd as X402ExactSettlementServerOpts, be as X402ExactSettlementStatus, bf as X402ExactSettlementStore, bg as X402SettlementChainEvidence, bh as X402SettlementEvidenceReader, bi as X402SettlementSubmissionError, bj as X402_BATCH_AUTO_SETTLEMENT, bk as X402_BATCH_MIN_WITHDRAW_DELAY_SECONDS, bl as X402_BATCH_SETTLEMENT_NETWORK, bm as attachCreditMenu, bn as buildCreditMenu, bo as createDVMHost, bp as createX402BatchSettlementServer, bq as creditEnvelopeIgnoreFields, br as drawSettlementRef, bs as extractCreditEnvelope, bt as fundingCommitment, bu as selectPrimaryCredit, bv as signHostingClosure, bw as signHostingControl, bx as stripCreditEnvelope, by as toCreditView } from '../credit-menu-CAfqe8IY.js';
6
- import { Context } from 'hono';
4
+ import { au as CreditMenu, a as AppEnv, U as UpfrontPaymentOpts, i as PaymentInfo, av as ReceiptIssuer, aw as LightningReceive, ax as TempoSettlementReadiness, ay as DVMHostOpts, az as DVMServeResult, L as LockPubkeyStateLoader, C as ConsumedCredentialStore } from '../credit-menu-DjnkeEUU.js';
5
+ export { aA as BuildCreditMenuArgs, aB as BuilderIdentity, aC as CREDIT_ENVELOPE_KEYS, aD as CreateX402BatchSettlementServerOpts, aE as CreditEnvelope, aF as CreditEnvelopeError, aG as CreditFundCommitment, aH as CreditTerms, aI as DEFAULT_INVOICE_TTL_SECONDS, aJ as DVMHost, aK as HostingClosureCommand, aL as HostingClosureEvidence, aM as HostingControlCommand, aN as HostingControlConfig, aO as HostingControlStatus, aP as JobManager, aQ as JobManagerOpts, aR as LightningReceiveConfig, aS as MIN_INVOICE_TTL_SECONDS, aT as MemoryConsumedCredentialStore, aU as MemoryConsumedCredentialStoreOpts, aV as MemoryProcessedPaymentStore, aW as MemoryX402ExactSettlementStore, aX as MountOpts, aY as OwnerDisplay, aZ as PaidJobCompletion, a_ as PaymentMode, a$ as PlatformReporterOpts, b0 as PostgresProcessedPaymentStore, b1 as PostgresX402ExactSettlementStore, b2 as PriceFiat, b3 as ProcessedPaymentQuerier, b4 as ProcessedPaymentRail, b5 as ProcessedPaymentRecord, b6 as ProcessedPaymentReplayError, b7 as ProcessedPaymentStore, b8 as X402BatchAcceptance, b9 as X402BatchFunding, ba as X402BatchRefusal, bb as X402BatchSettlementServer, bc as X402ExactAcceptance, bd as X402ExactIntentConflictError, be as X402ExactSettlementAttempt, bf as X402ExactSettlementChainEvidence, bg as X402ExactSettlementEffect, bh as X402ExactSettlementEvidenceMissingError, bi as X402ExactSettlementEvidenceReader, bj as X402ExactSettlementIntent, bk as X402ExactSettlementNotReadyError, bl as X402ExactSettlementServer, bm as X402ExactSettlementServerOpts, bn as X402ExactSettlementStatus, bo as X402ExactSettlementStore, bp as X402SettlementChainEvidence, bq as X402SettlementEvidenceReader, br as X402SettlementSubmissionError, bs as X402_BATCH_AUTO_SETTLEMENT, bt as X402_BATCH_MIN_WITHDRAW_DELAY_SECONDS, bu as X402_BATCH_SETTLEMENT_NETWORK, bv as attachCreditMenu, bw as buildCreditMenu, bx as createDVMHost, by as createX402BatchSettlementServer, bz as creditEnvelopeIgnoreFields, bA as drawSettlementRef, bB as extractCreditEnvelope, bC as fundingCommitment, bD as selectPrimaryCredit, bE as signHostingClosure, bF as signHostingControl, bG as stripCreditEnvelope, bH as toCreditView } from '../credit-menu-DjnkeEUU.js';
6
+ import { Context, Hono } from 'hono';
7
7
  import { z } from 'zod';
8
- import { F as FxFetcher } from '../fx-D9nsN3n4.js';
9
- import { c as StreamableJobStore, R as ReceiptIssuingStore, J as JobRecord, d as RequestIdClaim, e as RequestIdClaimResult, f as JobRetentionCursor, O as OutgoingMessage, A as AppendOutgoingOptions, P as PaymentCreditDelta, V as VerifyAndCreditResult, g as JobCounters } from '../job-store-Bx-VFRjg.js';
10
- export { a as JobStatus, b as JobStore, h as isStreamableJobStore } from '../job-store-Bx-VFRjg.js';
8
+ import { F as FxFetcher } from '../fx-zMWFzfrU.js';
9
+ import { c as StreamableJobStore, R as ReceiptIssuingStore, J as JobRecord, d as RequestIdClaim, e as RequestIdClaimResult, f as JobRetentionCursor, O as OutgoingMessage, A as AppendOutgoingOptions, P as PaymentCreditDelta, V as VerifyAndCreditResult, g as JobCounters, b as JobStore } from '../job-store-DdLXBpol.js';
10
+ export { a as JobStatus, h as isStreamableJobStore } from '../job-store-DdLXBpol.js';
11
+ import { C as ContentHoldHistory, a as ContentHoldMutation } from '../content-retention-DHyLdA6b.js';
12
+ export { b as ContentHold, c as ContentHoldError, d as ContentHoldEvent, e as ContentHoldStore, f as ContentHoldsResponse, J as JobContentMetadata, g as baselineContentExpiry, h as contentMetadata, i as isContentHoldStore } from '../content-retention-DHyLdA6b.js';
11
13
  export { P as PinnedFetch, S as SSRFError, a as SSRFGuardOpts, b as SSRFReason, c as SSRFResolver, d as assertSafeUrl, e as createPinnedFetch } from '../ssrf-dMooihtY.js';
14
+ import { Env, BlankSchema } from 'hono/types';
12
15
  import 'mppx';
13
16
  import '@x402/core/server';
14
17
  import '@x402/evm/batch-settlement/server';
15
18
  import '@x402/core/types';
16
19
  import 'viem';
20
+ import '../lightning-backend-Bw-qtAbt.js';
17
21
  import '@cashu/cashu-ts';
18
- import '../lightning-backend-BAx2Y8pP.js';
19
22
 
20
23
  /** Lifetime of a per-call implicit credit before the ledger refuses new draws. */
21
24
  declare const IMPLICIT_CREDIT_TTL_MS: number;
@@ -395,6 +398,11 @@ declare class PostgresJobStore implements StreamableJobStore, ReceiptIssuingStor
395
398
  expectedLastActivityAt: number;
396
399
  redactedAt: number;
397
400
  }): Promise<boolean>;
401
+ getContentSnapshot(jobId: string, dvmId?: string): Promise<{
402
+ job: JobRecord;
403
+ history: ContentHoldHistory;
404
+ } | undefined>;
405
+ mutateContentHold(jobId: string, mutation: ContentHoldMutation, dvmId?: string): Promise<ContentHoldHistory>;
398
406
  claimReceiptSeq(jobId: string): Promise<number>;
399
407
  saveReceipt(jobId: string, receipt: JobReceipt): Promise<JobReceipt | undefined>;
400
408
  appendOutgoing(jobId: string, message: OutgoingMessage, opts?: AppendOutgoingOptions): Promise<number>;
@@ -513,4 +521,14 @@ declare function hasInvalidRequestId(data: unknown): boolean;
513
521
  /** Single-DVM host. Use createDVMHost for multiple mounts with distinct prefixes. */
514
522
  declare function serve<State, InputSchema extends ZodLike | undefined = undefined>(descriptor: DVMDescriptor<State, InputSchema>, opts?: DVMHostOpts): Promise<DVMServeResult>;
515
523
 
516
- export { BitcoinDepositLiability, BlockedInvoiceCursor, CREDIT_REQUEST_SCHEMA, CreditInvoiceRecord, CreditLedgerLike, CreditLedgerQuerier, CreditMenu, type CreditRequest, type CreditRouteDeps, CreditSnapshot, DVMAuthScheme, DVMHostOpts, DVMServeResult, DrawRecord, DrawResolution, DrawResult, FundingRecord, GrownDrawResult, IMPLICIT_CREDIT_TTL_MS, type InitLockPool, InvoiceReconciliation, InvoiceSettlement, InvoiceWriteOff, JobRecord, LightningReceive, MemoryCreditLedger, PostgresJobStore, PostgresKVStore, PostgresReplayStore, type PostgresReplayStoreOpts, REQUEST_ID_FIELD, type ResolvedCashuOpts, SDK_INIT_ADVISORY_LOCK, SignedRequestDomain, SignedRequestReplayStore, StalePendingDrawCursor, StreamableJobStore, handleCreditRequest, hasInvalidRequestId, protocolEnvelopeIgnoreFields, requestIdFromEnvelope, resolveCashuOptsFromEnv, serve, stripProtocolEnvelope, withSdkInitLock };
524
+ interface InstallAdminContentRoutesOpts {
525
+ dvmId: string;
526
+ store: JobStore;
527
+ retentionDays: number;
528
+ getLockPubkeyState: LockPubkeyStateLoader;
529
+ nonceStore: ConsumedCredentialStore;
530
+ now?: () => number;
531
+ }
532
+ declare function installAdminContentRoutes<E extends Env = Env, S extends BlankSchema = BlankSchema>(app: Hono<E, S>, opts: InstallAdminContentRoutesOpts): void;
533
+
534
+ export { BitcoinDepositLiability, BlockedInvoiceCursor, CREDIT_REQUEST_SCHEMA, ConsumedCredentialStore, ContentHoldHistory, ContentHoldMutation, CreditInvoiceRecord, CreditLedgerLike, CreditLedgerQuerier, CreditMenu, type CreditRequest, type CreditRouteDeps, CreditSnapshot, DVMAuthScheme, DVMHostOpts, DVMServeResult, DrawRecord, DrawResolution, DrawResult, FundingRecord, GrownDrawResult, IMPLICIT_CREDIT_TTL_MS, type InitLockPool, type InstallAdminContentRoutesOpts, InvoiceReconciliation, InvoiceSettlement, InvoiceWriteOff, JobRecord, JobStore, LightningReceive, MemoryCreditLedger, PostgresJobStore, PostgresKVStore, PostgresReplayStore, type PostgresReplayStoreOpts, REQUEST_ID_FIELD, type ResolvedCashuOpts, SDK_INIT_ADVISORY_LOCK, SignedRequestDomain, SignedRequestReplayStore, StalePendingDrawCursor, StreamableJobStore, handleCreditRequest, hasInvalidRequestId, installAdminContentRoutes, protocolEnvelopeIgnoreFields, requestIdFromEnvelope, resolveCashuOptsFromEnv, serve, stripProtocolEnvelope, withSdkInitLock };
@@ -18,7 +18,7 @@ import {
18
18
  parseNwcUri,
19
19
  validateX402Env,
20
20
  withNwcPool
21
- } from "../chunk-FI4CST2D.js";
21
+ } from "../chunk-FWGWLPXF.js";
22
22
  import {
23
23
  MemoryKVStore
24
24
  } from "../chunk-SDK6KDJN.js";
@@ -62,6 +62,7 @@ import {
62
62
  hasInvalidRequestId,
63
63
  initLockPubkeyTable,
64
64
  initWalletAccumulatorTable,
65
+ installAdminContentRoutes,
65
66
  parseClientCapabilities,
66
67
  parseClientCompatibility,
67
68
  parseDvmClient,
@@ -78,56 +79,61 @@ import {
78
79
  stripProtocolEnvelope,
79
80
  toCreditView,
80
81
  unknownRouteNotFound
81
- } from "../chunk-EYTHFFFU.js";
82
+ } from "../chunk-GY66THYI.js";
82
83
  import {
83
84
  MemoryProcessedPaymentStore,
84
85
  PostgresProcessedPaymentStore,
85
86
  ProcessedPaymentReplayError
86
87
  } from "../chunk-XRLKGCAW.js";
87
- import "../chunk-PLG4XER6.js";
88
+ import "../chunk-S3OY533W.js";
88
89
  import {
89
90
  MemoryCreditLedger
90
- } from "../chunk-FYRR2UEZ.js";
91
+ } from "../chunk-OML32F6I.js";
91
92
  import {
92
93
  PostgresJobStore
93
- } from "../chunk-PB4FYZET.js";
94
+ } from "../chunk-EQLA4FFY.js";
94
95
  import "../chunk-YG7G4DPZ.js";
95
96
  import {
96
97
  SignedRequestError,
97
98
  createDefaultReplayStore,
98
99
  createSignedRequestVerifier,
99
100
  signedRequestInput
100
- } from "../chunk-Z4KLECAC.js";
101
+ } from "../chunk-N5RZ5HVB.js";
101
102
  import {
102
103
  isStreamableJobStore
103
- } from "../chunk-O5AT6S5T.js";
104
+ } from "../chunk-IV6Q7NRW.js";
105
+ import {
106
+ ContentHoldError,
107
+ baselineContentExpiry,
108
+ contentMetadata,
109
+ isContentHoldStore
110
+ } from "../chunk-AFV77S4C.js";
104
111
  import {
105
112
  generateEphemeralReceiptKey,
106
113
  isTestMintUrl,
107
114
  receiptPubkeyFromSecret
108
- } from "../chunk-TUA7PYH7.js";
115
+ } from "../chunk-KMED3H3A.js";
116
+ import {
117
+ IMPLICIT_CREDIT_TTL_MS
118
+ } from "../chunk-NFMOPYBA.js";
109
119
  import {
110
120
  X402_DEFAULT_FACILITATOR,
111
121
  X402_DEFAULT_NETWORK,
122
+ resolveRpcOverride,
112
123
  x402NetworkToCaip2
113
- } from "../chunk-IWQHUSMO.js";
114
- import {
115
- IMPLICIT_CREDIT_TTL_MS
116
- } from "../chunk-PAIM66YA.js";
117
- import {
118
- resolveRpcOverride
119
- } from "../chunk-CZULM42S.js";
124
+ } from "../chunk-CXCQLOOK.js";
120
125
  import {
121
126
  SIGNED_REQUEST_AUTH_ID,
122
127
  SIGNED_REQUEST_STATEMENT_VERSION,
123
128
  signedRequestStatementHeader
124
- } from "../chunk-A4YFWZ7R.js";
129
+ } from "../chunk-RCM3P2HE.js";
125
130
  import "../chunk-OFVV37XC.js";
126
131
  import {
127
132
  initLoggers
128
- } from "../chunk-6DOGTAHA.js";
133
+ } from "../chunk-QR2EF2NI.js";
129
134
  import "../chunk-66HGCPBU.js";
130
135
  import "../chunk-FUJ36YDV.js";
136
+ import "../chunk-BQJIFRAZ.js";
131
137
  import "../chunk-BYCEKO65.js";
132
138
  import "../chunk-AT6V3SY7.js";
133
139
  import {
@@ -137,7 +143,7 @@ import {
137
143
  PostgresX402ChannelStorage,
138
144
  X402RelaySubmissionLockError,
139
145
  allocateDrawValue
140
- } from "../chunk-JH3SX3LY.js";
146
+ } from "../chunk-6XF3RVVX.js";
141
147
  import {
142
148
  SDK_INIT_ADVISORY_LOCK,
143
149
  withSdkInitLock
@@ -147,8 +153,7 @@ import {
147
153
  } from "../chunk-P6QON7ER.js";
148
154
  import {
149
155
  assertSupportedX402Network
150
- } from "../chunk-RLTSCKRI.js";
151
- import "../chunk-LIRAHP7B.js";
156
+ } from "../chunk-BPYMEMQX.js";
152
157
  import {
153
158
  TEMPO_MODERATO_CHAIN_ID,
154
159
  TEMPO_MODERATO_RPC,
@@ -1145,7 +1150,7 @@ function createDVMHost(opts = {}) {
1145
1150
  });
1146
1151
  applyRetryToPool(pool, "dvm-host");
1147
1152
  pgPool = pool;
1148
- const { PostgresJobStore: PostgresJobStore2 } = await import("../postgres-job-store-VLXLWXUQ.js");
1153
+ const { PostgresJobStore: PostgresJobStore2 } = await import("../postgres-job-store-VHLQBJZC.js");
1149
1154
  const pgJobStore = new PostgresJobStore2(pool);
1150
1155
  pendingInits.push(pgJobStore.init(), pgJobStore.initStreaming());
1151
1156
  jobStore = pgJobStore;
@@ -1453,13 +1458,13 @@ ${config.facilitatorAuth?.keyId ?? ""}`;
1453
1458
  }
1454
1459
  let sharedPgConsumedStore;
1455
1460
  if (pgPool) {
1456
- const { PostgresConsumedCredentialStore } = await import("../postgres-consumed-credential-store-CUQJKRSL.js");
1461
+ const { PostgresConsumedCredentialStore } = await import("../postgres-consumed-credential-store-BUVCAPLS.js");
1457
1462
  const consumedStore = new PostgresConsumedCredentialStore(pgPool);
1458
1463
  pendingInits.push(consumedStore.init());
1459
1464
  sharedPgConsumedStore = consumedStore;
1460
1465
  }
1461
1466
  if (pgPool) {
1462
- const { CreditLedger: CreditLedger2 } = await import("../credit-ledger-MI2H7NEC.js");
1467
+ const { CreditLedger: CreditLedger2 } = await import("../credit-ledger-MCUXYKSJ.js");
1463
1468
  const pgLedger = new CreditLedger2(pgPool, tempoSessionStore);
1464
1469
  pendingInits.push(pgLedger.init());
1465
1470
  creditLedger = pgLedger;
@@ -1468,7 +1473,7 @@ ${config.facilitatorAuth?.keyId ?? ""}`;
1468
1473
  pendingInits.push(pgProcessed.init());
1469
1474
  processedPayments = pgProcessed;
1470
1475
  } else {
1471
- const { MemoryCreditLedger: MemoryCreditLedger2 } = await import("../memory-credit-ledger-W2BAUYJP.js");
1476
+ const { MemoryCreditLedger: MemoryCreditLedger2 } = await import("../memory-credit-ledger-SBSMGMDX.js");
1472
1477
  creditLedger = disposableCashu?.ledger ?? new MemoryCreditLedger2();
1473
1478
  const { MemoryProcessedPaymentStore: MemoryProcessedPaymentStore2 } = await import("../processed-payment-store-GKMAWOM3.js");
1474
1479
  processedPayments = new MemoryProcessedPaymentStore2();
@@ -2096,6 +2101,7 @@ export {
2096
2101
  CLIENT_COMPATIBILITY_HEADERS,
2097
2102
  CREDIT_ENVELOPE_KEYS,
2098
2103
  CREDIT_REQUEST_SCHEMA,
2104
+ ContentHoldError,
2099
2105
  CreditEnvelopeError,
2100
2106
  CreditLedger,
2101
2107
  CreditLedgerError,
@@ -2135,10 +2141,12 @@ export {
2135
2141
  allocateDrawValue,
2136
2142
  assertSafeUrl,
2137
2143
  attachCreditMenu,
2144
+ baselineContentExpiry,
2138
2145
  buildCreditMenu,
2139
2146
  clientCompatibilityAttributes,
2140
2147
  clientCompatibilityMiddleware,
2141
2148
  clientUpgradeRequired,
2149
+ contentMetadata,
2142
2150
  createDVMHost,
2143
2151
  createPinnedFetch,
2144
2152
  createSignedRequestVerifier,
@@ -2149,6 +2157,8 @@ export {
2149
2157
  fundingCommitment,
2150
2158
  handleCreditRequest,
2151
2159
  hasInvalidRequestId,
2160
+ installAdminContentRoutes,
2161
+ isContentHoldStore,
2152
2162
  isStreamableJobStore,
2153
2163
  parseClientCapabilities,
2154
2164
  parseClientCompatibility,