@dvmkit/sdk 0.7.0-rc.7 → 0.7.0-rc.9
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/README.md +6 -2
- package/dist/{chunk-YK54BJ2L.js → chunk-2DE32RAW.js} +1 -1
- package/dist/{chunk-NUPEAWRM.js → chunk-2GTLF74N.js} +1 -1
- package/dist/{chunk-MYJOV4R4.js → chunk-2HAFZ5GC.js} +1 -1
- package/dist/{chunk-LQQ6H4UB.js → chunk-5CSR33B5.js} +1 -1
- package/dist/{chunk-FXDQMJQ2.js → chunk-5PLQOC4B.js} +29 -3
- package/dist/{chunk-QTH7CIA3.js → chunk-5TIFEMHJ.js} +83 -1
- package/dist/{chunk-JUEEUV5X.js → chunk-6JZDFYQL.js} +15 -4
- package/dist/{chunk-BDHJVTWA.js → chunk-7RZEJJTN.js} +1 -1
- package/dist/{chunk-XEOTTFLH.js → chunk-FYETJDBB.js} +1 -1
- package/dist/{chunk-HGMS3LR7.js → chunk-G7IXOVKV.js} +27 -21
- package/dist/{chunk-GDCIHJAR.js → chunk-HU6ZMQDN.js} +1 -1
- package/dist/{chunk-WP7UX6RF.js → chunk-IOKEKMIU.js} +2 -2
- package/dist/{chunk-6RYCZLCK.js → chunk-QM2OS3NJ.js} +1 -1
- package/dist/{chunk-KYCLHWKO.js → chunk-QN3CQOE2.js} +1 -1
- package/dist/{chunk-SX4WCPW7.js → chunk-RGSWVNQG.js} +1 -1
- package/dist/{chunk-HG2CZPRJ.js → chunk-RJFBBEWQ.js} +1 -1
- package/dist/{chunk-BIZR5ORK.js → chunk-WGK5KZ6S.js} +2 -2
- package/dist/{chunk-FOJKZ4E7.js → chunk-YE53E4BT.js} +1 -1
- package/dist/{chunk-3VFEX2Y3.js → chunk-YNHXOONR.js} +1 -1
- package/dist/{chunk-X5RY2G3C.js → chunk-YS6PWVCZ.js} +1 -1
- package/dist/{chunk-BQP3LU2O.js → chunk-ZLWPEIE2.js} +1 -1
- package/dist/{credit-ledger-SW4BGMNH.js → credit-ledger-F2LWQU6N.js} +3 -3
- package/dist/{credit-menu-Bm8opjYy.d.ts → credit-menu-CUJdCfpt.d.ts} +2 -0
- package/dist/index.js +4 -4
- package/dist/internal/caller.d.ts +64 -1
- package/dist/internal/caller.js +14 -6
- package/dist/internal/index.js +1 -1
- package/dist/internal/server.d.ts +2 -2
- package/dist/internal/server.js +19 -19
- package/dist/{memory-credit-ledger-E4C3VQE4.js → memory-credit-ledger-XOOWJTBZ.js} +4 -4
- package/dist/{mpp-setup-BYKGEYFA.js → mpp-setup-KGX6PLAF.js} +2 -2
- package/dist/{payout-reporter-3UVWPGMO.js → payout-reporter-W3CCLYCN.js} +2 -2
- package/dist/{postgres-consumed-credential-store-EZ4KETWH.js → postgres-consumed-credential-store-LUJ5CUJS.js} +1 -1
- package/dist/{postgres-job-store-E6AUHNKB.js → postgres-job-store-IX7IUXF4.js} +2 -2
- package/dist/{postgres-replay-store-GIYZS4LJ.js → postgres-replay-store-Q6MEQDWZ.js} +2 -2
- package/dist/{pricing-DG5IJ5QF.js → pricing-ZUEFO3CM.js} +3 -3
- package/dist/{revenue-reporter-E56J3NZK.js → revenue-reporter-NRS2FANA.js} +2 -2
- package/dist/server/index.d.ts +4 -3
- package/dist/server/index.js +26 -26
- package/dist/{tempo-charge-store-WTBIX2JX.js → tempo-charge-store-NZJTJCUO.js} +2 -2
- package/dist/{tempo-session-store-AWIFUAA6.js → tempo-session-store-ENFDLDKC.js} +3 -3
- package/dist/testing/index.js +5 -5
- package/dist/{x402-BN26TQZ6.js → x402-T7WVKDD4.js} +3 -3
- package/package.json +1 -1
package/dist/server/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PostgresReplayStore
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-RJFBBEWQ.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-7RZEJJTN.js";
|
|
22
22
|
import {
|
|
23
23
|
MemoryKVStore
|
|
24
24
|
} from "../chunk-SDK6KDJN.js";
|
|
@@ -80,32 +80,32 @@ import {
|
|
|
80
80
|
stripProtocolEnvelope,
|
|
81
81
|
toCreditView,
|
|
82
82
|
unknownRouteNotFound
|
|
83
|
-
} from "../chunk-
|
|
83
|
+
} from "../chunk-G7IXOVKV.js";
|
|
84
84
|
import {
|
|
85
85
|
TEMPO_MODERATO_CHAIN_ID,
|
|
86
86
|
TEMPO_MODERATO_RPC,
|
|
87
87
|
TEMPO_SETTLEMENT_DEFAULT_LOW_BALANCE_MICRO,
|
|
88
88
|
TempoSettlementReadiness,
|
|
89
89
|
resolveTempoNetwork
|
|
90
|
-
} from "../chunk-
|
|
91
|
-
import "../chunk-
|
|
92
|
-
import "../chunk-
|
|
90
|
+
} from "../chunk-QN3CQOE2.js";
|
|
91
|
+
import "../chunk-YNHXOONR.js";
|
|
92
|
+
import "../chunk-FYETJDBB.js";
|
|
93
93
|
import {
|
|
94
94
|
MemoryCreditLedger
|
|
95
|
-
} from "../chunk-
|
|
95
|
+
} from "../chunk-YE53E4BT.js";
|
|
96
96
|
import {
|
|
97
97
|
PostgresJobStore
|
|
98
|
-
} from "../chunk-
|
|
98
|
+
} from "../chunk-6JZDFYQL.js";
|
|
99
99
|
import "../chunk-YG7G4DPZ.js";
|
|
100
100
|
import {
|
|
101
101
|
SignedRequestError,
|
|
102
102
|
createDefaultReplayStore,
|
|
103
103
|
createSignedRequestVerifier,
|
|
104
104
|
signedRequestInput
|
|
105
|
-
} from "../chunk-
|
|
105
|
+
} from "../chunk-YS6PWVCZ.js";
|
|
106
106
|
import {
|
|
107
107
|
isStreamableJobStore
|
|
108
|
-
} from "../chunk-
|
|
108
|
+
} from "../chunk-2HAFZ5GC.js";
|
|
109
109
|
import {
|
|
110
110
|
ContentHoldError,
|
|
111
111
|
baselineContentExpiry,
|
|
@@ -116,7 +116,7 @@ import {
|
|
|
116
116
|
IMPLICIT_CREDIT_TTL_MS,
|
|
117
117
|
generateEphemeralReceiptKey,
|
|
118
118
|
receiptPubkeyFromSecret
|
|
119
|
-
} from "../chunk-
|
|
119
|
+
} from "../chunk-5TIFEMHJ.js";
|
|
120
120
|
import {
|
|
121
121
|
X402_DEFAULT_FACILITATOR,
|
|
122
122
|
X402_DEFAULT_NETWORK,
|
|
@@ -130,11 +130,11 @@ import {
|
|
|
130
130
|
} from "../chunk-UKD3R2KU.js";
|
|
131
131
|
import {
|
|
132
132
|
initLoggers
|
|
133
|
-
} from "../chunk-
|
|
133
|
+
} from "../chunk-RGSWVNQG.js";
|
|
134
134
|
import "../chunk-KXWROQGK.js";
|
|
135
135
|
import "../chunk-BQJIFRAZ.js";
|
|
136
|
-
import "../chunk-
|
|
137
|
-
import "../chunk-
|
|
136
|
+
import "../chunk-2GTLF74N.js";
|
|
137
|
+
import "../chunk-5CSR33B5.js";
|
|
138
138
|
import {
|
|
139
139
|
CreditLedger,
|
|
140
140
|
CreditLedgerError,
|
|
@@ -142,16 +142,16 @@ import {
|
|
|
142
142
|
PostgresX402ChannelStorage,
|
|
143
143
|
X402RelaySubmissionLockError,
|
|
144
144
|
allocateDrawValue
|
|
145
|
-
} from "../chunk-
|
|
145
|
+
} from "../chunk-IOKEKMIU.js";
|
|
146
146
|
import {
|
|
147
147
|
applyRetryToPool
|
|
148
|
-
} from "../chunk-
|
|
148
|
+
} from "../chunk-QM2OS3NJ.js";
|
|
149
149
|
import {
|
|
150
150
|
assertSupportedX402Network
|
|
151
151
|
} from "../chunk-BPYMEMQX.js";
|
|
152
152
|
import {
|
|
153
153
|
diagnosticConsole
|
|
154
|
-
} from "../chunk-
|
|
154
|
+
} from "../chunk-5PLQOC4B.js";
|
|
155
155
|
import {
|
|
156
156
|
MemoryProcessedPaymentStore,
|
|
157
157
|
PostgresProcessedPaymentStore,
|
|
@@ -1147,7 +1147,7 @@ function createDVMHost(opts = {}) {
|
|
|
1147
1147
|
});
|
|
1148
1148
|
applyRetryToPool(pool, "dvm-host");
|
|
1149
1149
|
pgPool = pool;
|
|
1150
|
-
const { PostgresJobStore: PostgresJobStore2 } = await import("../postgres-job-store-
|
|
1150
|
+
const { PostgresJobStore: PostgresJobStore2 } = await import("../postgres-job-store-IX7IUXF4.js");
|
|
1151
1151
|
const pgJobStore = new PostgresJobStore2(pool);
|
|
1152
1152
|
pendingInits.push(pgJobStore.init(), pgJobStore.initStreaming());
|
|
1153
1153
|
jobStore = pgJobStore;
|
|
@@ -1240,11 +1240,11 @@ ${config.facilitatorAuth?.keyId ?? ""}`;
|
|
|
1240
1240
|
let tempoChargeBackend = "user-supplied";
|
|
1241
1241
|
const mppTempoRecipient = envMaybe.DVMKIT_TEMPO_RECIPIENT;
|
|
1242
1242
|
if (!mpp && mppTempoRecipient) {
|
|
1243
|
-
const { createMppFromOpts, createDualKeyMppxFromOpts, parseMppMethodsAllowlist } = await import("../mpp-setup-
|
|
1243
|
+
const { createMppFromOpts, createDualKeyMppxFromOpts, parseMppMethodsAllowlist } = await import("../mpp-setup-KGX6PLAF.js");
|
|
1244
1244
|
tempoChargeBackend = pgPool ? "postgres" : "memory";
|
|
1245
1245
|
let tempoCharge;
|
|
1246
1246
|
if (pgPool) {
|
|
1247
|
-
const { PostgresTempoChargeStore } = await import("../tempo-charge-store-
|
|
1247
|
+
const { PostgresTempoChargeStore } = await import("../tempo-charge-store-NZJTJCUO.js");
|
|
1248
1248
|
const chargeStore = new PostgresTempoChargeStore(pgPool);
|
|
1249
1249
|
tempoChargeStore = chargeStore;
|
|
1250
1250
|
pendingInits.push(chargeStore.init());
|
|
@@ -1264,7 +1264,7 @@ ${config.facilitatorAuth?.keyId ?? ""}`;
|
|
|
1264
1264
|
{ createPublicClient, createWalletClient, erc20Abi, http },
|
|
1265
1265
|
{ tempo: tempoMainnet, tempoModerato }
|
|
1266
1266
|
] = await Promise.all([
|
|
1267
|
-
import("../tempo-session-store-
|
|
1267
|
+
import("../tempo-session-store-ENFDLDKC.js"),
|
|
1268
1268
|
import("viem/accounts"),
|
|
1269
1269
|
import("viem"),
|
|
1270
1270
|
import("viem/chains")
|
|
@@ -1417,7 +1417,7 @@ ${config.facilitatorAuth?.keyId ?? ""}`;
|
|
|
1417
1417
|
}
|
|
1418
1418
|
}
|
|
1419
1419
|
const fxSource = envMaybe.DVMKIT_FX_SOURCE;
|
|
1420
|
-
const { createFxFetcher, resolveFxSourceFromEnv, warmFxSnapshot } = await import("../pricing-
|
|
1420
|
+
const { createFxFetcher, resolveFxSourceFromEnv, warmFxSnapshot } = await import("../pricing-ZUEFO3CM.js");
|
|
1421
1421
|
const fxFetcher = opts.fx ?? createFxFetcher({ source: resolveFxSourceFromEnv(envMaybe) });
|
|
1422
1422
|
const hostRailConfigured = (opts.paymentMethods?.length ?? 0) > 0 || (effectiveMints?.length ?? 0) > 0 || !!x402WithDualServe || !!mpp;
|
|
1423
1423
|
if (mounts.some((entry) => mountNeedsFx(entry, hostRailConfigured))) warmFxSnapshot(fxFetcher);
|
|
@@ -1427,7 +1427,7 @@ ${config.facilitatorAuth?.keyId ?? ""}`;
|
|
|
1427
1427
|
assertReceiptIdentity(envMaybe, opts.builder, receiptKey, cashuOpts.dvmId, opts.devMode);
|
|
1428
1428
|
let sharedPgReplayStore;
|
|
1429
1429
|
if (pgPool) {
|
|
1430
|
-
const { PostgresReplayStore: PostgresReplayStore2 } = await import("../postgres-replay-store-
|
|
1430
|
+
const { PostgresReplayStore: PostgresReplayStore2 } = await import("../postgres-replay-store-Q6MEQDWZ.js");
|
|
1431
1431
|
const store2 = new PostgresReplayStore2(pgPool);
|
|
1432
1432
|
pendingInits.push(store2.init());
|
|
1433
1433
|
sharedPgReplayStore = store2;
|
|
@@ -1455,13 +1455,13 @@ ${config.facilitatorAuth?.keyId ?? ""}`;
|
|
|
1455
1455
|
}
|
|
1456
1456
|
let sharedPgConsumedStore;
|
|
1457
1457
|
if (pgPool) {
|
|
1458
|
-
const { PostgresConsumedCredentialStore } = await import("../postgres-consumed-credential-store-
|
|
1458
|
+
const { PostgresConsumedCredentialStore } = await import("../postgres-consumed-credential-store-LUJ5CUJS.js");
|
|
1459
1459
|
const consumedStore = new PostgresConsumedCredentialStore(pgPool);
|
|
1460
1460
|
pendingInits.push(consumedStore.init());
|
|
1461
1461
|
sharedPgConsumedStore = consumedStore;
|
|
1462
1462
|
}
|
|
1463
1463
|
if (pgPool) {
|
|
1464
|
-
const { CreditLedger: CreditLedger2 } = await import("../credit-ledger-
|
|
1464
|
+
const { CreditLedger: CreditLedger2 } = await import("../credit-ledger-F2LWQU6N.js");
|
|
1465
1465
|
const pgLedger = new CreditLedger2(pgPool, tempoSessionStore);
|
|
1466
1466
|
pendingInits.push(pgLedger.init());
|
|
1467
1467
|
creditLedger = pgLedger;
|
|
@@ -1470,7 +1470,7 @@ ${config.facilitatorAuth?.keyId ?? ""}`;
|
|
|
1470
1470
|
pendingInits.push(pgProcessed.init());
|
|
1471
1471
|
processedPayments = pgProcessed;
|
|
1472
1472
|
} else {
|
|
1473
|
-
const { MemoryCreditLedger: MemoryCreditLedger2 } = await import("../memory-credit-ledger-
|
|
1473
|
+
const { MemoryCreditLedger: MemoryCreditLedger2 } = await import("../memory-credit-ledger-XOOWJTBZ.js");
|
|
1474
1474
|
creditLedger = disposableCashu?.ledger ?? new MemoryCreditLedger2();
|
|
1475
1475
|
const { MemoryProcessedPaymentStore: MemoryProcessedPaymentStore2 } = await import("../processed-payment-store-GKMAWOM3.js");
|
|
1476
1476
|
processedPayments = new MemoryProcessedPaymentStore2();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PostgresTempoChargeStore
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZLWPEIE2.js";
|
|
4
4
|
import "./chunk-YG7G4DPZ.js";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-5PLQOC4B.js";
|
|
6
6
|
import "./chunk-COYKJRMM.js";
|
|
7
7
|
export {
|
|
8
8
|
PostgresTempoChargeStore
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PostgresTempoSessionStore,
|
|
3
3
|
assertMonotonicTransition
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HU6ZMQDN.js";
|
|
5
5
|
import "./chunk-YG7G4DPZ.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-QM2OS3NJ.js";
|
|
7
|
+
import "./chunk-5PLQOC4B.js";
|
|
8
8
|
import "./chunk-COYKJRMM.js";
|
|
9
9
|
export {
|
|
10
10
|
PostgresTempoSessionStore,
|
package/dist/testing/index.js
CHANGED
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
MemoryJobStore,
|
|
6
6
|
createInstrumentedFetch
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-2HAFZ5GC.js";
|
|
8
8
|
import {
|
|
9
9
|
JobCancelledError
|
|
10
10
|
} from "../chunk-AFV77S4C.js";
|
|
11
11
|
import {
|
|
12
12
|
createNoopLogger
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-RGSWVNQG.js";
|
|
14
14
|
import "../chunk-KXWROQGK.js";
|
|
15
15
|
import "../chunk-BQJIFRAZ.js";
|
|
16
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-2GTLF74N.js";
|
|
17
17
|
import {
|
|
18
18
|
validateCurrency
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import "../chunk-
|
|
19
|
+
} from "../chunk-5CSR33B5.js";
|
|
20
|
+
import "../chunk-5PLQOC4B.js";
|
|
21
21
|
|
|
22
22
|
// src/sdk/testing/test-context.ts
|
|
23
23
|
function createTestContext(opts) {
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
} from "./chunk-OFSOLHRX.js";
|
|
7
7
|
import {
|
|
8
8
|
verifyX402Payment
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-WGK5KZ6S.js";
|
|
10
|
+
import "./chunk-FYETJDBB.js";
|
|
11
11
|
import {
|
|
12
12
|
X402_DEFAULT_FACILITATOR,
|
|
13
13
|
X402_DEFAULT_NETWORK,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
x402NetworkListForCopy,
|
|
37
37
|
x402SupportedNetworksHint
|
|
38
38
|
} from "./chunk-BPYMEMQX.js";
|
|
39
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-5PLQOC4B.js";
|
|
40
40
|
export {
|
|
41
41
|
X402_DEFAULT_FACILITATOR,
|
|
42
42
|
X402_DEFAULT_NETWORK,
|