@dvmkit/sdk 0.21.1 → 0.21.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-MWDUGMN2.js → chunk-27QB2D3Z.js} +2 -2
- package/dist/{chunk-CVN2YNMG.js → chunk-2AGADOX3.js} +1 -1
- package/dist/{chunk-5RLNRLLB.js → chunk-2HSWWHXK.js} +1 -1
- package/dist/{chunk-CXRI4N4Y.js → chunk-2RZRYMCR.js} +1 -1
- package/dist/{chunk-C65P6MGZ.js → chunk-3V6CSTWB.js} +1 -1
- package/dist/{chunk-KRX7VNBG.js → chunk-62JG4AF7.js} +1 -1
- package/dist/{chunk-A6AOE63A.js → chunk-6GZF7VDO.js} +5 -1
- package/dist/{chunk-LY2JYSJS.js → chunk-7KNFEDFW.js} +1 -1
- package/dist/{chunk-DJRTYBEE.js → chunk-B27E7JIR.js} +1 -1
- package/dist/{chunk-2PN4DKZW.js → chunk-D2MGOQIS.js} +1 -1
- package/dist/{chunk-34H4ZKBM.js → chunk-FAT57DAP.js} +1 -1
- package/dist/{chunk-7RWE6ELV.js → chunk-IUFVIIPF.js} +1 -1
- package/dist/{chunk-I5MXADJS.js → chunk-JOSNSNS7.js} +2 -2
- package/dist/{chunk-INYFUPXV.js → chunk-LSANCGLP.js} +1 -1
- package/dist/{chunk-RX6FT7XA.js → chunk-LWF4ABYF.js} +1 -1
- package/dist/{chunk-ALTE7I6C.js → chunk-MA55LUNR.js} +1 -0
- package/dist/{chunk-QTKGFG3I.js → chunk-NRE4NOCY.js} +1 -1
- package/dist/{chunk-MUMZPUYD.js → chunk-VIAMJ6GS.js} +26 -24
- package/dist/{chunk-6RJAE332.js → chunk-WWKFG6TM.js} +1 -1
- package/dist/{chunk-72A4PHLD.js → chunk-XWG54M6T.js} +1 -1
- package/dist/{chunk-QCZXKUS2.js → chunk-Y746QPX7.js} +1 -1
- package/dist/{chunk-OTNHKRHA.js → chunk-ZBOCNF56.js} +2 -2
- package/dist/{content-retention-COnj0QKi.d.ts → content-retention-efjireLM.d.ts} +1 -1
- package/dist/{credit-ledger-ZCJXJG6R.js → credit-ledger-M3EBVMOP.js} +3 -3
- package/dist/{credit-menu-DbjmA1vK.d.ts → credit-menu-UOOxuxVL.d.ts} +4 -4
- package/dist/{fx-DfzQ0Lge.d.ts → fx-BtxHVj6w.d.ts} +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +4 -4
- package/dist/internal/caller.d.ts +6 -6
- package/dist/internal/caller.js +7 -7
- package/dist/internal/server.d.ts +7 -7
- package/dist/internal/server.js +20 -20
- package/dist/{job-store-p45j28px.d.ts → job-store-DWVkleH3.d.ts} +1 -1
- package/dist/{lightning-backend-DO7G7VqP.d.ts → lightning-backend-CTijN35u.d.ts} +1 -1
- package/dist/{memory-credit-ledger-N4PZKTT5.js → memory-credit-ledger-WL2VKLE3.js} +4 -4
- package/dist/{mpp-setup-BLIYBORK.js → mpp-setup-DBYDXISN.js} +3 -3
- package/dist/{payout-reporter-5QAHCYIO.js → payout-reporter-D5TCIBQA.js} +2 -2
- package/dist/{postgres-consumed-credential-store-4PCJEZBD.js → postgres-consumed-credential-store-IPWPJ6V7.js} +1 -1
- package/dist/{postgres-job-store-QKN5LGAH.js → postgres-job-store-POZJNFJU.js} +2 -2
- package/dist/{postgres-replay-store-GH5AINQR.js → postgres-replay-store-JQYAKG47.js} +2 -2
- package/dist/{pricing-JJYLTTWK.js → pricing-FGPVRNTL.js} +3 -3
- package/dist/{revenue-reporter-6XARUEG6.js → revenue-reporter-QKCBYFWT.js} +2 -2
- package/dist/server/index.d.ts +10 -10
- package/dist/server/index.js +38 -29
- package/dist/{step-cache-CcCjpZm1.d.ts → step-cache-Bx_ZybWF.d.ts} +2 -1
- package/dist/{tempo-charge-store-A3CDF7D5.js → tempo-charge-store-P7ZBR3GG.js} +2 -2
- package/dist/{tempo-session-store-XJE6GIXN.js → tempo-session-store-ZVRBAMLG.js} +3 -3
- package/dist/testing/index.d.ts +3 -3
- package/dist/testing/index.js +6 -6
- package/dist/{usd-BnAFcUai.d.ts → usd-eOAMEO12.d.ts} +1 -1
- package/dist/{x402-XLFD43RF.js → x402-44JZJQ5F.js} +3 -3
- package/package.json +1 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { FacilitatorConfig } from '@x402/core/server';
|
|
2
|
-
import { ap as PaymentPayload, ae as PaymentRequirementsV1, af as PaymentRequirementsV2, aK as X402Config, aA as SettleResponse, aI as VerifyResponse, br as X402ExactVersionSupport, bs as X402Receipt, bt as TransactionalPayoutHook, bu as CashuMeltCompleted } from '../step-cache-
|
|
3
|
-
export { bv as CreditDepositPayload, bw as CreditDrainPayload, bx as FundingLot, by as LotDebit, bz as LotDepletion, bA as MppxServer, bB as NON_CHANNEL_BITCOIN_RAILS, bC as NonChannelBitcoinRail, bD as PayoutReporter, bE as PostgresTempoSessionStore, bF as RevenueReporter, bG as SIGNED_ENVELOPE_FIELDS, bH as SIGNED_ENVELOPE_TYPES, bI as X402TrackedChannel, bJ as _testing, bK as createDefaultReplayStore, bL as depleteLots, bM as fifoOrder, bN as inKindDrawMsats, bO as isInKindDepletion, bP as isNonChannelBitcoinRail, bQ as lotOwedSats, bR as netOwedSats, bS as wrapMppx } from '../step-cache-
|
|
2
|
+
import { ap as PaymentPayload, ae as PaymentRequirementsV1, af as PaymentRequirementsV2, aK as X402Config, aA as SettleResponse, aI as VerifyResponse, br as X402ExactVersionSupport, bs as X402Receipt, bt as TransactionalPayoutHook, bu as CashuMeltCompleted } from '../step-cache-Bx_ZybWF.js';
|
|
3
|
+
export { bv as CreditDepositPayload, bw as CreditDrainPayload, bx as FundingLot, by as LotDebit, bz as LotDepletion, bA as MppxServer, bB as NON_CHANNEL_BITCOIN_RAILS, bC as NonChannelBitcoinRail, bD as PayoutReporter, bE as PostgresTempoSessionStore, bF as RevenueReporter, bG as SIGNED_ENVELOPE_FIELDS, bH as SIGNED_ENVELOPE_TYPES, bI as X402TrackedChannel, bJ as _testing, bK as createDefaultReplayStore, bL as depleteLots, bM as fifoOrder, bN as inKindDrawMsats, bO as isInKindDepletion, bP as isNonChannelBitcoinRail, bQ as lotOwedSats, bR as netOwedSats, bS as wrapMppx } from '../step-cache-Bx_ZybWF.js';
|
|
4
4
|
import { Hono } from 'hono';
|
|
5
5
|
import { Env, BlankSchema } from 'hono/types';
|
|
6
6
|
import { Pool } from 'pg';
|
|
7
7
|
export { Pool } from 'pg';
|
|
8
8
|
import { g as getWallet } from '../wallet-Dwjs5n_M.js';
|
|
9
|
-
import { C as ConsumedCredentialStore, L as LockPubkeyStateLoader } from '../credit-menu-
|
|
10
|
-
export { A as AccumulatorPool, a as AppEnv, b as CreditFundingReport, D as DEFAULT_LOCK_PUBKEY_GRACE_SECONDS, F as FiatDenomination, c as FiatDenominationFailure, d as FundOnlyRequest, I as IncomingPaymentOpts, J as JobCancelledError, e as LockPubkeyPool, f as LockPubkeyState, M as MintHealthTracker, P as PAYMENT_PROOF_KEYS, g as PaymentErrorCode, h as PaymentErrorDetail, i as PaymentInfo, j as PostgresTempoChargeStore, R as ReporterBannerOpts, k as ResolvedFx, l as RevenueBootCheckOpts, S as SDKServerOpts, m as ServerJob, n as ShortPayForfeit, T as TempoChannelReport, o as TempoObserverHealth, p as TempoSessionChannelMismatchError, U as UpfrontPaymentOpts, V as VerifiedIncomingPayment, q as VerifyIncomingSnapshot, X as X402BatchChannelObservation, r as X402FacilitatorHealth, s as X402SettlementEvidenceOutcome, t as X402SettlementRepair, u as X402SettlementRepairRefusal, v as X402SettlementRepaired, w as X402WedgedSettlement, x as X402WedgedSettlementPage, y as X402_BATCH_SETTLEMENT_MAINNET_NETWORK, z as abortJob, B as activePubkeySet, E as applyPaymentInfoToJob, G as assertRevenueReporterReady, H as buildPaymentErrorResponse, K as clearAccumulatorForDvm, N as createDVMServer, O as creditDepositPayload, Q as derivedFundCreditId, W as devModeSkipsPaymentVerification, Y as fromJobRecord, Z as fundedMicroFor, _ as hasPaymentProof, $ as hashLockKey, a0 as implicitCreditId, a1 as initLockPubkeyTable, a2 as initWalletAccumulatorTable, a3 as insertAccumulatorRows, a4 as isDerivedCreditId, a5 as isTerminal, a6 as isYieldMessage, a7 as issueUpfrontChallenges, a8 as loadLockPubkeyState, a9 as msatsToFiatMicro, aa as paymentErrorBody, ab as pinAskFiat, ac as priceFiatMicro, ad as processIncomingPayment, ae as providerMessage, af as pruneRetired, ag as repairX402ExactSettlementEffect, ah as resolveFxSnapshot, ai as resolvePriceFiat, aj as revenueReporterBannerState, ak as rotateLockPubkey, al as seedLockPubkeyState, am as toCreditTerms, an as toJobRecord, ao as unknownRouteNotFound, ap as verifyIncomingPayment, aq as verifyTempoSessionManagementCredential, ar as verifyUpfrontPayment, as as x402RequiredUsdcMicro, at as x402SettledShare } from '../credit-menu-
|
|
11
|
-
export { O as OutgoingMessage, S as StaleJobReapable, i as isStaleJobReapable } from '../job-store-
|
|
9
|
+
import { C as ConsumedCredentialStore, L as LockPubkeyStateLoader } from '../credit-menu-UOOxuxVL.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-UOOxuxVL.js';
|
|
11
|
+
export { O as OutgoingMessage, S as StaleJobReapable, i as isStaleJobReapable } from '../job-store-DWVkleH3.js';
|
|
12
12
|
import { z } from 'zod';
|
|
13
|
-
export { f as LockPubkeyStoreLockPubkey, t as lockPubkeyStoreToLockPubkey } from '../lightning-backend-
|
|
13
|
+
export { f as LockPubkeyStoreLockPubkey, t as lockPubkeyStoreToLockPubkey } from '../lightning-backend-CTijN35u.js';
|
|
14
14
|
import 'mppx';
|
|
15
15
|
import '@x402/evm/batch-settlement/server';
|
|
16
16
|
import '@x402/core/types';
|
|
17
17
|
import 'viem';
|
|
18
18
|
import '@cashu/cashu-ts';
|
|
19
|
-
import '../fx-
|
|
19
|
+
import '../fx-BtxHVj6w.js';
|
|
20
20
|
|
|
21
21
|
declare function verifyWithFacilitator(payload: PaymentPayload, requirements: PaymentRequirementsV1 | PaymentRequirementsV2, config?: Pick<X402Config, "facilitator" | "facilitatorAuth">, createAuthHeaders?: FacilitatorConfig["createAuthHeaders"] | undefined): Promise<VerifyResponse>;
|
|
22
22
|
declare function settleWithFacilitator(payload: PaymentPayload, requirements: PaymentRequirementsV1 | PaymentRequirementsV2, config?: Pick<X402Config, "facilitator" | "facilitatorAuth">, createAuthHeaders?: FacilitatorConfig["createAuthHeaders"] | undefined): Promise<SettleResponse>;
|
package/dist/internal/server.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PostgresTempoSessionStore
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-FAT57DAP.js";
|
|
4
4
|
import {
|
|
5
5
|
verifyX402Payment
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-ZBOCNF56.js";
|
|
7
7
|
import {
|
|
8
8
|
RevenueReporter
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-2AGADOX3.js";
|
|
10
10
|
import {
|
|
11
11
|
PostgresTempoChargeStore
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-2RZRYMCR.js";
|
|
13
13
|
import {
|
|
14
14
|
DEFAULT_LOCK_PUBKEY_GRACE_SECONDS,
|
|
15
15
|
MintHealthTracker,
|
|
@@ -61,27 +61,27 @@ import {
|
|
|
61
61
|
verifyUpfrontPayment,
|
|
62
62
|
x402RequiredUsdcMicro,
|
|
63
63
|
x402SettledShare
|
|
64
|
-
} from "../chunk-
|
|
64
|
+
} from "../chunk-VIAMJ6GS.js";
|
|
65
65
|
import "../chunk-XRLKGCAW.js";
|
|
66
66
|
import {
|
|
67
67
|
PayoutReporter
|
|
68
|
-
} from "../chunk-
|
|
68
|
+
} from "../chunk-62JG4AF7.js";
|
|
69
69
|
import {
|
|
70
70
|
settleWithFacilitator,
|
|
71
71
|
verifyWithFacilitator
|
|
72
|
-
} from "../chunk-
|
|
73
|
-
import "../chunk-
|
|
74
|
-
import "../chunk-
|
|
72
|
+
} from "../chunk-3V6CSTWB.js";
|
|
73
|
+
import "../chunk-B27E7JIR.js";
|
|
74
|
+
import "../chunk-Y746QPX7.js";
|
|
75
75
|
import {
|
|
76
76
|
SIGNED_ENVELOPE_FIELDS,
|
|
77
77
|
SIGNED_ENVELOPE_TYPES,
|
|
78
78
|
createDefaultReplayStore,
|
|
79
79
|
humanizeZodError
|
|
80
|
-
} from "../chunk-
|
|
80
|
+
} from "../chunk-6GZF7VDO.js";
|
|
81
81
|
import {
|
|
82
82
|
createInstrumentedFetch,
|
|
83
83
|
isStaleJobReapable
|
|
84
|
-
} from "../chunk-
|
|
84
|
+
} from "../chunk-WWKFG6TM.js";
|
|
85
85
|
import {
|
|
86
86
|
JobCancelledError,
|
|
87
87
|
abortJob,
|
|
@@ -93,14 +93,14 @@ import {
|
|
|
93
93
|
} from "../chunk-KVKJ7R5V.js";
|
|
94
94
|
import {
|
|
95
95
|
toLockPubkey
|
|
96
|
-
} from "../chunk-
|
|
96
|
+
} from "../chunk-IUFVIIPF.js";
|
|
97
97
|
import "../chunk-NUDHO4HV.js";
|
|
98
98
|
import "../chunk-SXL44PL5.js";
|
|
99
|
-
import "../chunk-
|
|
99
|
+
import "../chunk-NRE4NOCY.js";
|
|
100
100
|
import "../chunk-FUJ36YDV.js";
|
|
101
101
|
import "../chunk-BQJIFRAZ.js";
|
|
102
|
-
import "../chunk-
|
|
103
|
-
import "../chunk-
|
|
102
|
+
import "../chunk-LWF4ABYF.js";
|
|
103
|
+
import "../chunk-XWG54M6T.js";
|
|
104
104
|
import {
|
|
105
105
|
NON_CHANNEL_BITCOIN_RAILS,
|
|
106
106
|
depleteLots,
|
|
@@ -110,20 +110,20 @@ import {
|
|
|
110
110
|
isNonChannelBitcoinRail,
|
|
111
111
|
lotOwedSats,
|
|
112
112
|
netOwedSats
|
|
113
|
-
} from "../chunk-
|
|
113
|
+
} from "../chunk-JOSNSNS7.js";
|
|
114
114
|
import "../chunk-YG7G4DPZ.js";
|
|
115
115
|
import "../chunk-COYKJRMM.js";
|
|
116
116
|
import "../chunk-5UC7TOQC.js";
|
|
117
|
-
import "../chunk-
|
|
117
|
+
import "../chunk-LSANCGLP.js";
|
|
118
118
|
import "../chunk-BPYMEMQX.js";
|
|
119
119
|
import "../chunk-H3GGFEE5.js";
|
|
120
120
|
import {
|
|
121
121
|
_testing,
|
|
122
122
|
wrapMppx
|
|
123
|
-
} from "../chunk-
|
|
124
|
-
import "../chunk-
|
|
123
|
+
} from "../chunk-27QB2D3Z.js";
|
|
124
|
+
import "../chunk-7KNFEDFW.js";
|
|
125
125
|
import "../chunk-66HGCPBU.js";
|
|
126
|
-
import "../chunk-
|
|
126
|
+
import "../chunk-MA55LUNR.js";
|
|
127
127
|
export {
|
|
128
128
|
DEFAULT_LOCK_PUBKEY_GRACE_SECONDS,
|
|
129
129
|
JobCancelledError,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a9 as Message, V as UpfrontPayment, an as FundingMethod, a3 as FundingReceipt, bZ as CreditSnapshot, a4 as JobReceipt, aC as StepRecord, a5 as MessageType } from './step-cache-
|
|
1
|
+
import { a9 as Message, V as UpfrontPayment, an as FundingMethod, a3 as FundingReceipt, bZ as CreditSnapshot, a4 as JobReceipt, aC as StepRecord, a5 as MessageType } from './step-cache-Bx_ZybWF.js';
|
|
2
2
|
import { ProofLike } from '@cashu/cashu-ts';
|
|
3
3
|
|
|
4
4
|
type JobStatus = "processing" | "completed" | "failed" | "awaiting-input" | "cancelled" | "working";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MemoryCreditLedger
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-B27E7JIR.js";
|
|
4
|
+
import "./chunk-JOSNSNS7.js";
|
|
5
5
|
import "./chunk-YG7G4DPZ.js";
|
|
6
6
|
import "./chunk-COYKJRMM.js";
|
|
7
7
|
import "./chunk-5UC7TOQC.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-LSANCGLP.js";
|
|
9
9
|
import "./chunk-BPYMEMQX.js";
|
|
10
10
|
import "./chunk-H3GGFEE5.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-MA55LUNR.js";
|
|
12
12
|
export {
|
|
13
13
|
MemoryCreditLedger
|
|
14
14
|
};
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
parseMppMethodsAllowlist,
|
|
21
21
|
resolveTempoNetwork,
|
|
22
22
|
wrapMppx
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-27QB2D3Z.js";
|
|
24
|
+
import "./chunk-7KNFEDFW.js";
|
|
25
25
|
import "./chunk-66HGCPBU.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-MA55LUNR.js";
|
|
27
27
|
export {
|
|
28
28
|
MPPX_HMAC_MISMATCH_REASON,
|
|
29
29
|
TEMPO_MAINNET_CHAIN_ID,
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
PayoutReporter,
|
|
5
5
|
PostgresX402BatchStore,
|
|
6
6
|
x402EarnedCeiling
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-62JG4AF7.js";
|
|
8
8
|
import "./chunk-COYKJRMM.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-MA55LUNR.js";
|
|
10
10
|
export {
|
|
11
11
|
MemoryX402BatchStore,
|
|
12
12
|
PAYOUT_SNAPSHOT_INTERVAL_MS,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PostgresJobStore
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Y746QPX7.js";
|
|
4
4
|
import "./chunk-KVKJ7R5V.js";
|
|
5
5
|
import "./chunk-BQJIFRAZ.js";
|
|
6
6
|
import "./chunk-COYKJRMM.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-MA55LUNR.js";
|
|
8
8
|
export {
|
|
9
9
|
PostgresJobStore
|
|
10
10
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildUpfront
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LWF4ABYF.js";
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_FX_CURRENCIES,
|
|
6
6
|
DEFAULT_FX_RATE_SOURCE,
|
|
@@ -22,8 +22,8 @@ import {
|
|
|
22
22
|
satsToFiat,
|
|
23
23
|
validateCurrency,
|
|
24
24
|
warmFxSnapshot
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-XWG54M6T.js";
|
|
26
|
+
import "./chunk-MA55LUNR.js";
|
|
27
27
|
export {
|
|
28
28
|
DEFAULT_FX_CURRENCIES,
|
|
29
29
|
DEFAULT_FX_RATE_SOURCE,
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ai as CashuMode, bT as CreditLedgerQuerier, bU as CreditDrainEnqueue, bV as HostedSettlementReportObligations, w as ResolvedCreditConfig, bW as DVMAuthScheme, F as SignedRequestDomain, bX as CreditLedgerLike, bY as X402RefundSettlementGate, bZ as CreditSnapshot, b_ as CreditDrawRefundArgs, b$ as CreditDrawRefundResult, c0 as DrawResult, c1 as X402SettlementStatus, c2 as X402UnresolvedRefund, c3 as GrownDrawResult, c4 as DrawResolution, c5 as FundingRecord, c6 as CreditFundingEvidence, c7 as CreditInvoiceRecord, c8 as InvoiceSettlement, c9 as BlockedInvoiceCursor, ca as InvoiceReconciliation, cb as InvoiceWriteOff, cc as DrawRecord, cd as StalePendingDrawCursor, ce as TempoCreditLossEvidence, cf as TempoCreditLoss, cg as X402CreditLossEvidence, ch as X402CreditLoss, ci as DrainMethod, cj as DrainRequestResult, ck as BitcoinDepositLiability, bx as FundingLot, cl as CreditDrainRecord, cm as ChannelDrainCursor, cn as DrainWriteOff, co as DrainTransitionResult, cp as DrainReleaseResult, cq as DrainFulfilment, cr as HostingCleanupFence, aC as StepRecord, a4 as JobReceipt, a9 as Message, K as KVStore, M as SignedRequestReplayStore, Z as ZodLike, a as DVMDescriptor } from '../step-cache-
|
|
2
|
-
export { cs as CLIENT_COMPATIBILITY_HEADERS, d as CanonicalEnvelope, ct as ClientCompatibility, cu as ClientCompatibilityEnv, cv as ClientCompatibilityGate, cw as ClientCompatibilityRequirement, cx as ClientSemVer, g as CreateSignedRequestVerifierOpts, cy as CreditFundingBasis, cz as CreditInvoiceStatus, cA as CreditLedger, cB as CreditLedgerError, cC as CreditLedgerErrorCode, cD as CreditLedgerErrorDetails, cE as CreditLedgerPool, cF as CreditStatus, cG as DRAIN_DELIVERY_RESERVE_SATS, cH as DVM_PROTOCOL_VERSION, cI as DrainConflictReason, cJ as DrawRailValue, cK as DrawStatus, cL as HostedTempoCloseReportWriteOff, cM as JobCostReportPayload, cN as JobTerminalReportPayload, cO as PostgresX402ChannelStorage, cP as ReplayStoreBackend, cQ as RevenueSkippedNoRailPayload, cR as RevenueSkippedNoRailReason, z as SIGNED_REQUEST_AUTH_ID, B as SIGNED_REQUEST_STATEMENT_VERSION, cS as Secp256k1AuthOpts, E as SignedRequestAudience, G as SignedRequestError, H as SignedRequestFailure, N as SignedRequestSignOpts, O as SignedRequestStatementHeader, T as SignedRequestVerifier, cT as TempoDrainDecision, cU as TempoDrainDecisionArgs, cV as TempoDrainDecisionResult, cW as TempoDrainHoldReason, V as UpfrontPayment, cX as X402ChannelStorageOpts, cY as X402RelayLockHolder, cZ as X402RelaySubmissionLock, c_ as X402RelaySubmissionLockError, c$ as allocateDrawValue, d0 as clientCompatibilityAttributes, d1 as clientCompatibilityMiddleware, d2 as clientUpgradeRequired, W as createSignedRequestVerifier, d3 as parseClientCapabilities, d4 as parseClientCompatibility, d5 as parseDvmClient, d6 as parseProtocolVersion, d7 as requireClientCompatibility, d8 as retryHostedTempoCloseReport, d9 as secp256k1Auth, da as signedRequestInput, Y as signedRequestStatementHeader, db as writeOffHostedTempoCloseReport } from '../step-cache-
|
|
1
|
+
import { ai as CashuMode, bT as CreditLedgerQuerier, bU as CreditDrainEnqueue, bV as HostedSettlementReportObligations, w as ResolvedCreditConfig, bW as DVMAuthScheme, F as SignedRequestDomain, bX as CreditLedgerLike, bY as X402RefundSettlementGate, bZ as CreditSnapshot, b_ as CreditDrawRefundArgs, b$ as CreditDrawRefundResult, c0 as DrawResult, c1 as X402SettlementStatus, c2 as X402UnresolvedRefund, c3 as GrownDrawResult, c4 as DrawResolution, c5 as FundingRecord, c6 as CreditFundingEvidence, c7 as CreditInvoiceRecord, c8 as InvoiceSettlement, c9 as BlockedInvoiceCursor, ca as InvoiceReconciliation, cb as InvoiceWriteOff, cc as DrawRecord, cd as StalePendingDrawCursor, ce as TempoCreditLossEvidence, cf as TempoCreditLoss, cg as X402CreditLossEvidence, ch as X402CreditLoss, ci as DrainMethod, cj as DrainRequestResult, ck as BitcoinDepositLiability, bx as FundingLot, cl as CreditDrainRecord, cm as ChannelDrainCursor, cn as DrainWriteOff, co as DrainTransitionResult, cp as DrainReleaseResult, cq as DrainFulfilment, cr as HostingCleanupFence, aC as StepRecord, a4 as JobReceipt, a9 as Message, K as KVStore, M as SignedRequestReplayStore, Z as ZodLike, a as DVMDescriptor } from '../step-cache-Bx_ZybWF.js';
|
|
2
|
+
export { cs as CLIENT_COMPATIBILITY_HEADERS, d as CanonicalEnvelope, ct as ClientCompatibility, cu as ClientCompatibilityEnv, cv as ClientCompatibilityGate, cw as ClientCompatibilityRequirement, cx as ClientSemVer, g as CreateSignedRequestVerifierOpts, cy as CreditFundingBasis, cz as CreditInvoiceStatus, cA as CreditLedger, cB as CreditLedgerError, cC as CreditLedgerErrorCode, cD as CreditLedgerErrorDetails, cE as CreditLedgerPool, cF as CreditStatus, cG as DRAIN_DELIVERY_RESERVE_SATS, cH as DVM_PROTOCOL_VERSION, cI as DrainConflictReason, cJ as DrawRailValue, cK as DrawStatus, cL as HostedTempoCloseReportWriteOff, cM as JobCostReportPayload, cN as JobTerminalReportPayload, cO as PostgresX402ChannelStorage, cP as ReplayStoreBackend, cQ as RevenueSkippedNoRailPayload, cR as RevenueSkippedNoRailReason, z as SIGNED_REQUEST_AUTH_ID, B as SIGNED_REQUEST_STATEMENT_VERSION, cS as Secp256k1AuthOpts, E as SignedRequestAudience, G as SignedRequestError, H as SignedRequestFailure, N as SignedRequestSignOpts, O as SignedRequestStatementHeader, T as SignedRequestVerifier, cT as TempoDrainDecision, cU as TempoDrainDecisionArgs, cV as TempoDrainDecisionResult, cW as TempoDrainHoldReason, V as UpfrontPayment, cX as X402ChannelStorageOpts, cY as X402RelayLockHolder, cZ as X402RelaySubmissionLock, c_ as X402RelaySubmissionLockError, c$ as allocateDrawValue, d0 as clientCompatibilityAttributes, d1 as clientCompatibilityMiddleware, d2 as clientUpgradeRequired, W as createSignedRequestVerifier, d3 as parseClientCapabilities, d4 as parseClientCompatibility, d5 as parseDvmClient, d6 as parseProtocolVersion, d7 as requireClientCompatibility, d8 as retryHostedTempoCloseReport, d9 as secp256k1Auth, da as signedRequestInput, Y as signedRequestStatementHeader, db as writeOffHostedTempoCloseReport } from '../step-cache-Bx_ZybWF.js';
|
|
3
3
|
import { Pool } from 'pg';
|
|
4
|
-
import { au as CreditMenu, a as AppEnv, U as UpfrontPaymentOpts, i as PaymentInfo, av as ReceiptIssuer, aw as LightningReceive, ax as TempoSettlementReadiness, ay as DVMHostOpts, az as DVMServeResult, L as LockPubkeyStateLoader, C as ConsumedCredentialStore } from '../credit-menu-
|
|
5
|
-
export { aA as BuildCreditMenuArgs, aB as BuilderIdentity, aC as CREDIT_ENVELOPE_KEYS, aD as CreateX402BatchSettlementServerOpts, aE as CreditEnvelope, aF as CreditEnvelopeError, aG as CreditFundCommitment, aH as CreditTerms, aI as DEFAULT_INVOICE_TTL_SECONDS, aJ as DVMHost, aK as HostingClosureCommand, aL as HostingClosureEvidence, aM as HostingControlCommand, aN as HostingControlConfig, aO as HostingControlStatus, aP as JobManager, aQ as JobManagerOpts, aR as LightningReceiveConfig, aS as MIN_INVOICE_TTL_SECONDS, aT as MemoryConsumedCredentialStore, aU as MemoryConsumedCredentialStoreOpts, aV as MemoryProcessedPaymentStore, aW as MemoryX402ExactSettlementStore, aX as MountOpts, aY as OwnerDisplay, aZ as PaidJobCompletion, a_ as PaymentMode, a$ as PlatformReporterOpts, b0 as PostgresProcessedPaymentStore, b1 as PostgresX402ExactSettlementStore, b2 as PriceFiat, b3 as ProcessedPaymentQuerier, b4 as ProcessedPaymentRail, b5 as ProcessedPaymentRecord, b6 as ProcessedPaymentReplayError, b7 as ProcessedPaymentStore, b8 as X402BatchAcceptance, b9 as X402BatchFunding, ba as X402BatchRefusal, bb as X402BatchSettlementServer, bc as X402ExactAcceptance, bd as X402ExactIntentConflictError, be as X402ExactSettlementAttempt, bf as X402ExactSettlementChainEvidence, bg as X402ExactSettlementEffect, bh as X402ExactSettlementEvidenceMissingError, bi as X402ExactSettlementEvidenceReader, bj as X402ExactSettlementIntent, bk as X402ExactSettlementNotReadyError, bl as X402ExactSettlementServer, bm as X402ExactSettlementServerOpts, bn as X402ExactSettlementStatus, bo as X402ExactSettlementStore, bp as X402SettlementChainEvidence, bq as X402SettlementEvidenceReader, br as X402SettlementSubmissionError, bs as X402_BATCH_AUTO_SETTLEMENT, bt as X402_BATCH_MIN_WITHDRAW_DELAY_SECONDS, bu as X402_BATCH_SETTLEMENT_NETWORK, bv as attachCreditMenu, bw as buildCreditMenu, bx as createDVMHost, by as createX402BatchSettlementServer, bz as creditEnvelopeIgnoreFields, bA as drawSettlementRef, bB as extractCreditEnvelope, bC as fundingCommitment, bD as selectPrimaryCredit, bE as signHostingClosure, bF as signHostingControl, bG as stripCreditEnvelope, bH as toCreditView } from '../credit-menu-
|
|
4
|
+
import { au as CreditMenu, a as AppEnv, U as UpfrontPaymentOpts, i as PaymentInfo, av as ReceiptIssuer, aw as LightningReceive, ax as TempoSettlementReadiness, ay as DVMHostOpts, az as DVMServeResult, L as LockPubkeyStateLoader, C as ConsumedCredentialStore } from '../credit-menu-UOOxuxVL.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-UOOxuxVL.js';
|
|
6
6
|
import { Context, Hono } from 'hono';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { F as FxFetcher } from '../fx-
|
|
9
|
-
import { c as StreamableJobStore, R as ReceiptIssuingStore, J as JobRecord, d as RequestIdClaim, e as RequestIdClaimResult, f as JobRetentionCursor, O as OutgoingMessage, A as AppendOutgoingOptions, P as PaymentCreditDelta, V as VerifyAndCreditResult, g as JobCounters, b as JobStore } from '../job-store-
|
|
10
|
-
export { a as JobStatus, h as isStreamableJobStore } from '../job-store-
|
|
11
|
-
import { C as ContentHoldHistory, a as ContentHoldMutation } from '../content-retention-
|
|
12
|
-
export { b as ContentHold, c as ContentHoldError, d as ContentHoldEvent, e as ContentHoldStore, f as ContentHoldsResponse, J as JobContentMetadata, g as baselineContentExpiry, h as contentMetadata, i as isContentHoldStore } from '../content-retention-
|
|
8
|
+
import { F as FxFetcher } from '../fx-BtxHVj6w.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-DWVkleH3.js';
|
|
10
|
+
export { a as JobStatus, h as isStreamableJobStore } from '../job-store-DWVkleH3.js';
|
|
11
|
+
import { C as ContentHoldHistory, a as ContentHoldMutation } from '../content-retention-efjireLM.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-efjireLM.js';
|
|
13
13
|
export { P as PinnedFetch, S as SSRFError, a as SSRFGuardOpts, b as SSRFReason, c as SSRFResolver, d as assertSafeUrl, e as createPinnedFetch } from '../ssrf-dMooihtY.js';
|
|
14
14
|
import { Env, BlankSchema } from 'hono/types';
|
|
15
15
|
import 'mppx';
|
|
@@ -17,7 +17,7 @@ import '@x402/core/server';
|
|
|
17
17
|
import '@x402/evm/batch-settlement/server';
|
|
18
18
|
import '@x402/core/types';
|
|
19
19
|
import 'viem';
|
|
20
|
-
import '../lightning-backend-
|
|
20
|
+
import '../lightning-backend-CTijN35u.js';
|
|
21
21
|
import '@cashu/cashu-ts';
|
|
22
22
|
|
|
23
23
|
/** Default lifetime of a per-call implicit credit: 90 days before the ledger refuses new draws. */
|
package/dist/server/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PostgresReplayStore
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-2HSWWHXK.js";
|
|
4
4
|
import {
|
|
5
5
|
PostgresKVStore
|
|
6
6
|
} from "../chunk-V5ZRATJH.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
parseNwcUri,
|
|
19
19
|
validateX402Env,
|
|
20
20
|
withNwcPool
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-D2MGOQIS.js";
|
|
22
22
|
import {
|
|
23
23
|
MemoryKVStore
|
|
24
24
|
} from "../chunk-SDK6KDJN.js";
|
|
@@ -47,6 +47,7 @@ import {
|
|
|
47
47
|
X402_BATCH_SETTLEMENT_NETWORK,
|
|
48
48
|
attachCreditMenu,
|
|
49
49
|
buildCreditMenu,
|
|
50
|
+
callerInputIssues,
|
|
50
51
|
clientCompatibilityAttributes,
|
|
51
52
|
clientCompatibilityMiddleware,
|
|
52
53
|
clientUpgradeRequired,
|
|
@@ -82,29 +83,30 @@ import {
|
|
|
82
83
|
toCreditView,
|
|
83
84
|
unknownRouteNotFound,
|
|
84
85
|
writeOffHostedTempoCloseReport
|
|
85
|
-
} from "../chunk-
|
|
86
|
+
} from "../chunk-VIAMJ6GS.js";
|
|
86
87
|
import {
|
|
87
88
|
MemoryProcessedPaymentStore,
|
|
88
89
|
PostgresProcessedPaymentStore,
|
|
89
90
|
ProcessedPaymentReplayError
|
|
90
91
|
} from "../chunk-XRLKGCAW.js";
|
|
91
|
-
import "../chunk-
|
|
92
|
-
import "../chunk-
|
|
92
|
+
import "../chunk-62JG4AF7.js";
|
|
93
|
+
import "../chunk-3V6CSTWB.js";
|
|
93
94
|
import {
|
|
94
95
|
MemoryCreditLedger
|
|
95
|
-
} from "../chunk-
|
|
96
|
+
} from "../chunk-B27E7JIR.js";
|
|
96
97
|
import {
|
|
97
98
|
PostgresJobStore
|
|
98
|
-
} from "../chunk-
|
|
99
|
+
} from "../chunk-Y746QPX7.js";
|
|
99
100
|
import {
|
|
100
101
|
SignedRequestError,
|
|
102
|
+
carriesSignedEnvelope,
|
|
101
103
|
createDefaultReplayStore,
|
|
102
104
|
createSignedRequestVerifier,
|
|
103
105
|
signedRequestInput
|
|
104
|
-
} from "../chunk-
|
|
106
|
+
} from "../chunk-6GZF7VDO.js";
|
|
105
107
|
import {
|
|
106
108
|
isStreamableJobStore
|
|
107
|
-
} from "../chunk-
|
|
109
|
+
} from "../chunk-WWKFG6TM.js";
|
|
108
110
|
import {
|
|
109
111
|
ContentHoldError,
|
|
110
112
|
baselineContentExpiry,
|
|
@@ -115,7 +117,7 @@ import {
|
|
|
115
117
|
IMPLICIT_CREDIT_TTL_MS,
|
|
116
118
|
generateEphemeralReceiptKey,
|
|
117
119
|
receiptPubkeyFromSecret
|
|
118
|
-
} from "../chunk-
|
|
120
|
+
} from "../chunk-IUFVIIPF.js";
|
|
119
121
|
import {
|
|
120
122
|
X402_DEFAULT_FACILITATOR,
|
|
121
123
|
X402_DEFAULT_NETWORK,
|
|
@@ -127,11 +129,11 @@ import {
|
|
|
127
129
|
SIGNED_REQUEST_STATEMENT_VERSION,
|
|
128
130
|
signedRequestStatementHeader
|
|
129
131
|
} from "../chunk-SXL44PL5.js";
|
|
130
|
-
import "../chunk-
|
|
132
|
+
import "../chunk-NRE4NOCY.js";
|
|
131
133
|
import "../chunk-FUJ36YDV.js";
|
|
132
134
|
import "../chunk-BQJIFRAZ.js";
|
|
133
|
-
import "../chunk-
|
|
134
|
-
import "../chunk-
|
|
135
|
+
import "../chunk-LWF4ABYF.js";
|
|
136
|
+
import "../chunk-XWG54M6T.js";
|
|
135
137
|
import {
|
|
136
138
|
CreditLedger,
|
|
137
139
|
CreditLedgerError,
|
|
@@ -139,7 +141,7 @@ import {
|
|
|
139
141
|
PostgresX402ChannelStorage,
|
|
140
142
|
X402RelaySubmissionLockError,
|
|
141
143
|
allocateDrawValue
|
|
142
|
-
} from "../chunk-
|
|
144
|
+
} from "../chunk-JOSNSNS7.js";
|
|
143
145
|
import "../chunk-YG7G4DPZ.js";
|
|
144
146
|
import {
|
|
145
147
|
SDK_INIT_ADVISORY_LOCK,
|
|
@@ -148,7 +150,7 @@ import {
|
|
|
148
150
|
import "../chunk-5UC7TOQC.js";
|
|
149
151
|
import {
|
|
150
152
|
applyRetryToPool
|
|
151
|
-
} from "../chunk-
|
|
153
|
+
} from "../chunk-LSANCGLP.js";
|
|
152
154
|
import {
|
|
153
155
|
assertSupportedX402Network
|
|
154
156
|
} from "../chunk-BPYMEMQX.js";
|
|
@@ -159,14 +161,14 @@ import {
|
|
|
159
161
|
TEMPO_SETTLEMENT_DEFAULT_LOW_BALANCE_MICRO,
|
|
160
162
|
TempoSettlementReadiness,
|
|
161
163
|
resolveTempoNetwork
|
|
162
|
-
} from "../chunk-
|
|
164
|
+
} from "../chunk-27QB2D3Z.js";
|
|
163
165
|
import {
|
|
164
166
|
initLoggers
|
|
165
|
-
} from "../chunk-
|
|
167
|
+
} from "../chunk-7KNFEDFW.js";
|
|
166
168
|
import "../chunk-66HGCPBU.js";
|
|
167
169
|
import {
|
|
168
170
|
diagnosticConsole
|
|
169
|
-
} from "../chunk-
|
|
171
|
+
} from "../chunk-MA55LUNR.js";
|
|
170
172
|
|
|
171
173
|
// src/sdk/server/cashu-env.ts
|
|
172
174
|
async function resolveCashuOptsFromEnv(env, pool, cashuModeHint) {
|
|
@@ -1193,7 +1195,7 @@ function createDVMHost(opts = {}) {
|
|
|
1193
1195
|
});
|
|
1194
1196
|
applyRetryToPool(pool, "dvm-host");
|
|
1195
1197
|
pgPool = pool;
|
|
1196
|
-
const { PostgresJobStore: PostgresJobStore2 } = await import("../postgres-job-store-
|
|
1198
|
+
const { PostgresJobStore: PostgresJobStore2 } = await import("../postgres-job-store-POZJNFJU.js");
|
|
1197
1199
|
const pgJobStore = new PostgresJobStore2(pool);
|
|
1198
1200
|
pendingInits.push(pgJobStore.init(), pgJobStore.initStreaming());
|
|
1199
1201
|
jobStore = pgJobStore;
|
|
@@ -1286,11 +1288,11 @@ ${config.facilitatorAuth?.keyId ?? ""}`;
|
|
|
1286
1288
|
let tempoChargeBackend = "user-supplied";
|
|
1287
1289
|
const mppTempoRecipient = envMaybe.DVMKIT_TEMPO_RECIPIENT;
|
|
1288
1290
|
if (!mpp && mppTempoRecipient) {
|
|
1289
|
-
const { createMppFromOpts, createDualKeyMppxFromOpts, parseMppMethodsAllowlist } = await import("../mpp-setup-
|
|
1291
|
+
const { createMppFromOpts, createDualKeyMppxFromOpts, parseMppMethodsAllowlist } = await import("../mpp-setup-DBYDXISN.js");
|
|
1290
1292
|
tempoChargeBackend = pgPool ? "postgres" : "memory";
|
|
1291
1293
|
let tempoCharge;
|
|
1292
1294
|
if (pgPool) {
|
|
1293
|
-
const { PostgresTempoChargeStore } = await import("../tempo-charge-store-
|
|
1295
|
+
const { PostgresTempoChargeStore } = await import("../tempo-charge-store-P7ZBR3GG.js");
|
|
1294
1296
|
const chargeStore = new PostgresTempoChargeStore(pgPool);
|
|
1295
1297
|
tempoChargeStore = chargeStore;
|
|
1296
1298
|
pendingInits.push(chargeStore.init());
|
|
@@ -1310,7 +1312,7 @@ ${config.facilitatorAuth?.keyId ?? ""}`;
|
|
|
1310
1312
|
{ createPublicClient, createWalletClient, erc20Abi, http },
|
|
1311
1313
|
{ tempo: tempoMainnet, tempoModerato }
|
|
1312
1314
|
] = await Promise.all([
|
|
1313
|
-
import("../tempo-session-store-
|
|
1315
|
+
import("../tempo-session-store-ZVRBAMLG.js"),
|
|
1314
1316
|
import("viem/accounts"),
|
|
1315
1317
|
import("viem"),
|
|
1316
1318
|
import("viem/chains")
|
|
@@ -1463,7 +1465,7 @@ ${config.facilitatorAuth?.keyId ?? ""}`;
|
|
|
1463
1465
|
}
|
|
1464
1466
|
}
|
|
1465
1467
|
const fxSource = envMaybe.DVMKIT_FX_SOURCE;
|
|
1466
|
-
const { createFxFetcher, resolveFxSourceFromEnv, warmFxSnapshot } = await import("../pricing-
|
|
1468
|
+
const { createFxFetcher, resolveFxSourceFromEnv, warmFxSnapshot } = await import("../pricing-FGPVRNTL.js");
|
|
1467
1469
|
const fxFetcher = opts.fx ?? createFxFetcher({ source: resolveFxSourceFromEnv(envMaybe) });
|
|
1468
1470
|
const hostRailConfigured = (opts.paymentMethods?.length ?? 0) > 0 || (effectiveMints?.length ?? 0) > 0 || !!x402WithDualServe || !!mpp;
|
|
1469
1471
|
if (mounts.some((entry) => mountNeedsFx(entry, hostRailConfigured))) warmFxSnapshot(fxFetcher);
|
|
@@ -1473,7 +1475,7 @@ ${config.facilitatorAuth?.keyId ?? ""}`;
|
|
|
1473
1475
|
assertReceiptIdentity(envMaybe, opts.builder, receiptKey, cashuOpts.dvmId, opts.devMode);
|
|
1474
1476
|
let sharedPgReplayStore;
|
|
1475
1477
|
if (pgPool) {
|
|
1476
|
-
const { PostgresReplayStore: PostgresReplayStore2 } = await import("../postgres-replay-store-
|
|
1478
|
+
const { PostgresReplayStore: PostgresReplayStore2 } = await import("../postgres-replay-store-JQYAKG47.js");
|
|
1477
1479
|
const store2 = new PostgresReplayStore2(pgPool);
|
|
1478
1480
|
pendingInits.push(store2.init());
|
|
1479
1481
|
sharedPgReplayStore = store2;
|
|
@@ -1501,13 +1503,13 @@ ${config.facilitatorAuth?.keyId ?? ""}`;
|
|
|
1501
1503
|
}
|
|
1502
1504
|
let sharedPgConsumedStore;
|
|
1503
1505
|
if (pgPool) {
|
|
1504
|
-
const { PostgresConsumedCredentialStore } = await import("../postgres-consumed-credential-store-
|
|
1506
|
+
const { PostgresConsumedCredentialStore } = await import("../postgres-consumed-credential-store-IPWPJ6V7.js");
|
|
1505
1507
|
const consumedStore = new PostgresConsumedCredentialStore(pgPool);
|
|
1506
1508
|
pendingInits.push(consumedStore.init());
|
|
1507
1509
|
sharedPgConsumedStore = consumedStore;
|
|
1508
1510
|
}
|
|
1509
1511
|
if (pgPool) {
|
|
1510
|
-
const { CreditLedger: CreditLedger2 } = await import("../credit-ledger-
|
|
1512
|
+
const { CreditLedger: CreditLedger2 } = await import("../credit-ledger-M3EBVMOP.js");
|
|
1511
1513
|
const pgLedger = new CreditLedger2(pgPool, tempoSessionStore);
|
|
1512
1514
|
pendingInits.push(pgLedger.init());
|
|
1513
1515
|
creditLedger = pgLedger;
|
|
@@ -1516,7 +1518,7 @@ ${config.facilitatorAuth?.keyId ?? ""}`;
|
|
|
1516
1518
|
pendingInits.push(pgProcessed.init());
|
|
1517
1519
|
processedPayments = pgProcessed;
|
|
1518
1520
|
} else {
|
|
1519
|
-
const { MemoryCreditLedger: MemoryCreditLedger2 } = await import("../memory-credit-ledger-
|
|
1521
|
+
const { MemoryCreditLedger: MemoryCreditLedger2 } = await import("../memory-credit-ledger-WL2VKLE3.js");
|
|
1520
1522
|
creditLedger = disposableCashu?.ledger ?? new MemoryCreditLedger2();
|
|
1521
1523
|
const { MemoryProcessedPaymentStore: MemoryProcessedPaymentStore2 } = await import("../processed-payment-store-GKMAWOM3.js");
|
|
1522
1524
|
processedPayments = new MemoryProcessedPaymentStore2();
|
|
@@ -2106,8 +2108,15 @@ function secp256k1Auth(opts = {}) {
|
|
|
2106
2108
|
id: SIGNED_REQUEST_AUTH_ID,
|
|
2107
2109
|
allowUnsignedPaid: opts.allowUnsignedPaid === true,
|
|
2108
2110
|
checkAuth(schema, input, domain) {
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
+
try {
|
|
2112
|
+
const envelope = getVerifier(schema).checkAuth(input, domain);
|
|
2113
|
+
return { pubkey: envelope.pubkey, envelope };
|
|
2114
|
+
} catch (err) {
|
|
2115
|
+
if (err instanceof SignedRequestError && err.sub_reason === "schema_invalid" && !carriesSignedEnvelope(input) && callerInputIssues(err.issues).length === 0) {
|
|
2116
|
+
throw new SignedRequestError("signed request required", "signature_required");
|
|
2117
|
+
}
|
|
2118
|
+
throw err;
|
|
2119
|
+
}
|
|
2111
2120
|
},
|
|
2112
2121
|
recheckSignature(schema, input, domain) {
|
|
2113
2122
|
getVerifier(schema).verifySignature(input, domain);
|
|
@@ -5342,7 +5342,8 @@ interface SignedRequestVerifier<T> {
|
|
|
5342
5342
|
*/
|
|
5343
5343
|
signRequest(privkey: Uint8Array, body: Record<string, unknown>, opts?: SignedRequestSignOpts, domain?: SignedRequestDomain): T & CanonicalEnvelope;
|
|
5344
5344
|
}
|
|
5345
|
-
|
|
5345
|
+
/** Authentication failure; signature_required means no envelope fields were supplied. */
|
|
5346
|
+
type SignedRequestFailure = "schema_invalid" | "timestamp_drift" | "signature_required" | "signature_invalid" | "replay_detected";
|
|
5346
5347
|
/**
|
|
5347
5348
|
* One definition of envelope field types shared by the runtime shape guard
|
|
5348
5349
|
* and error disclosure classifier. Envelope failures stay private; violations
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PostgresTempoChargeStore
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2RZRYMCR.js";
|
|
4
4
|
import "./chunk-YG7G4DPZ.js";
|
|
5
5
|
import "./chunk-COYKJRMM.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-MA55LUNR.js";
|
|
7
7
|
export {
|
|
8
8
|
PostgresTempoChargeStore
|
|
9
9
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PostgresTempoSessionStore,
|
|
3
3
|
assertMonotonicTransition
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FAT57DAP.js";
|
|
5
5
|
import "./chunk-YG7G4DPZ.js";
|
|
6
6
|
import "./chunk-COYKJRMM.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-LSANCGLP.js";
|
|
8
|
+
import "./chunk-MA55LUNR.js";
|
|
9
9
|
export {
|
|
10
10
|
PostgresTempoSessionStore,
|
|
11
11
|
assertMonotonicTransition
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as ContentHoldHistory, a as ContentHoldMutation } from '../content-retention-
|
|
2
|
-
import { a4 as JobReceipt, a9 as Message, a5 as MessageType, K as KVStore, L as Logger, x as ResponseContent, P as PaymentContent, S as SDKJobContext } from '../step-cache-
|
|
3
|
-
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-
|
|
1
|
+
import { C as ContentHoldHistory, a as ContentHoldMutation } from '../content-retention-efjireLM.js';
|
|
2
|
+
import { a4 as JobReceipt, a9 as Message, a5 as MessageType, K as KVStore, L as Logger, x as ResponseContent, P as PaymentContent, S as SDKJobContext } from '../step-cache-Bx_ZybWF.js';
|
|
3
|
+
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-DWVkleH3.js';
|
|
4
4
|
import 'hono';
|
|
5
5
|
import 'mppx';
|
|
6
6
|
import '@x402/core/server';
|
package/dist/testing/index.js
CHANGED
|
@@ -4,22 +4,22 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
MemoryJobStore,
|
|
6
6
|
createInstrumentedFetch
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-WWKFG6TM.js";
|
|
8
8
|
import {
|
|
9
9
|
JobCancelledError
|
|
10
10
|
} from "../chunk-KVKJ7R5V.js";
|
|
11
11
|
import {
|
|
12
12
|
createNoopLogger
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-NRE4NOCY.js";
|
|
14
14
|
import "../chunk-FUJ36YDV.js";
|
|
15
15
|
import "../chunk-BQJIFRAZ.js";
|
|
16
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-LWF4ABYF.js";
|
|
17
17
|
import {
|
|
18
18
|
validateCurrency
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import "../chunk-
|
|
19
|
+
} from "../chunk-XWG54M6T.js";
|
|
20
|
+
import "../chunk-7KNFEDFW.js";
|
|
21
21
|
import "../chunk-66HGCPBU.js";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-MA55LUNR.js";
|
|
23
23
|
|
|
24
24
|
// src/sdk/testing/test-context.ts
|
|
25
25
|
function createTestContext(opts) {
|