@dvmkit/sdk 0.7.0-rc.8 → 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/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-XO5EUHCW.js → chunk-5TIFEMHJ.js} +1 -1
- package/dist/{chunk-KB7MEWBE.js → chunk-6JZDFYQL.js} +1 -1
- package/dist/{chunk-BDHJVTWA.js → chunk-7RZEJJTN.js} +1 -1
- package/dist/{chunk-XEOTTFLH.js → chunk-FYETJDBB.js} +1 -1
- package/dist/{chunk-Z6EJOVIU.js → chunk-G7IXOVKV.js} +18 -18
- 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/index.js +4 -4
- package/dist/internal/caller.js +6 -6
- 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-3YBSGLYU.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.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
|
@@ -779,6 +779,7 @@ var diagnostic_catalogue_v1_default = {
|
|
|
779
779
|
"hardened",
|
|
780
780
|
"head_status",
|
|
781
781
|
"hint",
|
|
782
|
+
"hosting_identity_revoke_failed",
|
|
782
783
|
"ingest_concurrency",
|
|
783
784
|
"ingest_global_concurrency",
|
|
784
785
|
"ingest_ip_concurrency",
|
|
@@ -1067,6 +1068,25 @@ var diagnostic_catalogue_v1_default = {
|
|
|
1067
1068
|
"UA-14",
|
|
1068
1069
|
"UA-40",
|
|
1069
1070
|
"UA-43"
|
|
1071
|
+
],
|
|
1072
|
+
submitIdentitySources: [
|
|
1073
|
+
"header",
|
|
1074
|
+
"header_absent",
|
|
1075
|
+
"header_invalid",
|
|
1076
|
+
"not_extracted"
|
|
1077
|
+
],
|
|
1078
|
+
fundedRuntimeReclaims: [
|
|
1079
|
+
"closed"
|
|
1080
|
+
],
|
|
1081
|
+
suspensionReasons: [
|
|
1082
|
+
"request_limit",
|
|
1083
|
+
"dvm_limit",
|
|
1084
|
+
"behaviour",
|
|
1085
|
+
"free_tier_idle",
|
|
1086
|
+
"admin_org_suspend",
|
|
1087
|
+
"builder_pause",
|
|
1088
|
+
"withdrawn",
|
|
1089
|
+
"operator"
|
|
1070
1090
|
]
|
|
1071
1091
|
};
|
|
1072
1092
|
|
|
@@ -1080,6 +1100,12 @@ var PAYMENT_ENUMS = {
|
|
|
1080
1100
|
failure_stage: new Set(diagnostic_catalogue_v1_default.paymentFailureStages),
|
|
1081
1101
|
phase: new Set(diagnostic_catalogue_v1_default.paymentPhases)
|
|
1082
1102
|
};
|
|
1103
|
+
var ROUTER_ENUMS = {
|
|
1104
|
+
submit_identity_source: new Set(diagnostic_catalogue_v1_default.submitIdentitySources),
|
|
1105
|
+
funded_runtime_reclaim: new Set(diagnostic_catalogue_v1_default.fundedRuntimeReclaims),
|
|
1106
|
+
suspended_reclaim: new Set(diagnostic_catalogue_v1_default.suspensionReasons),
|
|
1107
|
+
suspended_admin: new Set(diagnostic_catalogue_v1_default.suspensionReasons)
|
|
1108
|
+
};
|
|
1083
1109
|
var EVENTS = new Set(diagnostic_catalogue_v1_default.events);
|
|
1084
1110
|
var ROUTE_TEMPLATES = [...diagnostic_catalogue_v1_default.routeTemplates].sort(
|
|
1085
1111
|
compareRouteTemplates
|
|
@@ -1280,9 +1306,9 @@ function projectFields(input, dataset, authority, identityAuthority) {
|
|
|
1280
1306
|
return output;
|
|
1281
1307
|
}
|
|
1282
1308
|
function projectField(key, value, dataset, authority, identityAuthority) {
|
|
1283
|
-
const
|
|
1284
|
-
if (
|
|
1285
|
-
return typeof value === "string" &&
|
|
1309
|
+
const closedEnum = Object.hasOwn(PAYMENT_ENUMS, key) ? PAYMENT_ENUMS[key] : Object.hasOwn(ROUTER_ENUMS, key) ? ROUTER_ENUMS[key] : void 0;
|
|
1310
|
+
if (closedEnum)
|
|
1311
|
+
return typeof value === "string" && closedEnum.has(value) ? value : void 0;
|
|
1286
1312
|
if (BOOLEAN_FIELDS.has(key))
|
|
1287
1313
|
return typeof value === "boolean" ? value : void 0;
|
|
1288
1314
|
if (INTEGER_FIELDS.has(key))
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
installHostedTempoCloseGuard,
|
|
8
8
|
isTempoInsufficientFundsError,
|
|
9
9
|
resolveTempoNetwork
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QN3CQOE2.js";
|
|
11
11
|
import {
|
|
12
12
|
x402EarnedCeiling
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YNHXOONR.js";
|
|
14
14
|
import {
|
|
15
15
|
createX402FacilitatorAuthHeaders,
|
|
16
16
|
createX402FacilitatorClient,
|
|
@@ -19,13 +19,13 @@ import {
|
|
|
19
19
|
verifyWithFacilitator,
|
|
20
20
|
withPaymentDiagnostics,
|
|
21
21
|
withPaymentStage
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-FYETJDBB.js";
|
|
23
23
|
import {
|
|
24
24
|
MemoryCreditLedger
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-YE53E4BT.js";
|
|
26
26
|
import {
|
|
27
27
|
PostgresJobStore
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-6JZDFYQL.js";
|
|
29
29
|
import {
|
|
30
30
|
parseStoreValue
|
|
31
31
|
} from "./chunk-YG7G4DPZ.js";
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
humanizeZodIssues,
|
|
37
37
|
signedRequestInput,
|
|
38
38
|
zodIssuesOf
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-YS6PWVCZ.js";
|
|
40
40
|
import {
|
|
41
41
|
MemoryJobStore,
|
|
42
42
|
UNCAPPABLE_ASK_TOTAL,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
isJobRetentionStore,
|
|
46
46
|
isReceiptIssuingStore,
|
|
47
47
|
isStreamableJobStore
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-2HAFZ5GC.js";
|
|
49
49
|
import {
|
|
50
50
|
ContentHoldError,
|
|
51
51
|
JobCancelledError,
|
|
@@ -85,7 +85,7 @@ import {
|
|
|
85
85
|
signReceipt,
|
|
86
86
|
toLockPubkey,
|
|
87
87
|
verifyChallenge
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-5TIFEMHJ.js";
|
|
89
89
|
import {
|
|
90
90
|
X402_BATCH_SETTLEMENT_SCHEME,
|
|
91
91
|
X402_DEFAULT_FACILITATOR,
|
|
@@ -117,7 +117,7 @@ import {
|
|
|
117
117
|
pinDimension,
|
|
118
118
|
withSpan,
|
|
119
119
|
withTraceContext
|
|
120
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-RGSWVNQG.js";
|
|
121
121
|
import {
|
|
122
122
|
StepCache
|
|
123
123
|
} from "./chunk-BQJIFRAZ.js";
|
|
@@ -134,7 +134,7 @@ import {
|
|
|
134
134
|
roundUsd,
|
|
135
135
|
satsToFiat,
|
|
136
136
|
validateCurrency
|
|
137
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-5CSR33B5.js";
|
|
138
138
|
import {
|
|
139
139
|
CreditLedger,
|
|
140
140
|
CreditLedgerError,
|
|
@@ -150,10 +150,10 @@ import {
|
|
|
150
150
|
isNonChannelBitcoinRail,
|
|
151
151
|
netOwedSats,
|
|
152
152
|
x402SettlementPending
|
|
153
|
-
} from "./chunk-
|
|
153
|
+
} from "./chunk-IOKEKMIU.js";
|
|
154
154
|
import {
|
|
155
155
|
withPostgresRecoveryContext
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-QM2OS3NJ.js";
|
|
157
157
|
import {
|
|
158
158
|
DvmError,
|
|
159
159
|
x402NetworkByCaip2
|
|
@@ -161,7 +161,7 @@ import {
|
|
|
161
161
|
import {
|
|
162
162
|
createDiagnosticCapabilityAuthority,
|
|
163
163
|
diagnosticConsole
|
|
164
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-5PLQOC4B.js";
|
|
165
165
|
import {
|
|
166
166
|
MemoryProcessedPaymentStore,
|
|
167
167
|
PostgresProcessedPaymentStore,
|
|
@@ -3877,7 +3877,7 @@ async function verifyUpfrontPaymentInScope(opts) {
|
|
|
3877
3877
|
x402Requirements
|
|
3878
3878
|
});
|
|
3879
3879
|
}
|
|
3880
|
-
const { verifyX402Payment } = await import("./x402-
|
|
3880
|
+
const { verifyX402Payment } = await import("./x402-T7WVKDD4.js");
|
|
3881
3881
|
const receipt = await withPaymentStage("verifier_broadcast", () => verifyX402Payment(
|
|
3882
3882
|
x402Payment,
|
|
3883
3883
|
x402Config,
|
|
@@ -4865,7 +4865,7 @@ async function verifyIncomingPaymentInScope(body, opts, snapshot) {
|
|
|
4865
4865
|
snapshot
|
|
4866
4866
|
});
|
|
4867
4867
|
}
|
|
4868
|
-
const { verifyX402Payment } = await import("./x402-
|
|
4868
|
+
const { verifyX402Payment } = await import("./x402-T7WVKDD4.js");
|
|
4869
4869
|
const receipt = await withPaymentStage("verifier_broadcast", () => verifyX402Payment(
|
|
4870
4870
|
body.content.x402_payment,
|
|
4871
4871
|
opts.x402Config,
|
|
@@ -5296,7 +5296,7 @@ async function processIncomingPaymentInScope(job, body, opts) {
|
|
|
5296
5296
|
try {
|
|
5297
5297
|
const requiredMsats = job.pendingPaymentMsats ?? 0;
|
|
5298
5298
|
const requiredUsdcMicro = job.pendingX402AmountUsdcMicro !== void 0 ? BigInt(job.pendingX402AmountUsdcMicro) : BigInt(msatsToUsdc(requiredMsats, rate));
|
|
5299
|
-
const { verifyX402Payment } = await import("./x402-
|
|
5299
|
+
const { verifyX402Payment } = await import("./x402-T7WVKDD4.js");
|
|
5300
5300
|
const receipt = await withPaymentStage("verifier_broadcast", () => verifyX402Payment(
|
|
5301
5301
|
body.content.x402_payment,
|
|
5302
5302
|
opts.x402Config,
|
|
@@ -19537,7 +19537,7 @@ async function createDVMServer(descriptor, opts) {
|
|
|
19537
19537
|
}
|
|
19538
19538
|
}
|
|
19539
19539
|
if (!opts.onJobCompleted && platformToken && platformUrl && dvmId && opts.db) {
|
|
19540
|
-
const { RevenueReporter } = await import("./revenue-reporter-
|
|
19540
|
+
const { RevenueReporter } = await import("./revenue-reporter-NRS2FANA.js");
|
|
19541
19541
|
const reporter = new RevenueReporter(
|
|
19542
19542
|
opts.db,
|
|
19543
19543
|
platformUrl,
|
|
@@ -19547,7 +19547,7 @@ async function createDVMServer(descriptor, opts) {
|
|
|
19547
19547
|
revenueReporter = reporter;
|
|
19548
19548
|
await reporter.init();
|
|
19549
19549
|
reporter.startRetryLoop();
|
|
19550
|
-
const { MemoryX402BatchStore, PayoutReporter } = await import("./payout-reporter-
|
|
19550
|
+
const { MemoryX402BatchStore, PayoutReporter } = await import("./payout-reporter-W3CCLYCN.js");
|
|
19551
19551
|
payoutReporter = new PayoutReporter({
|
|
19552
19552
|
dvmId,
|
|
19553
19553
|
db: opts.db,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
applyRetryToPool
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QM2OS3NJ.js";
|
|
4
4
|
import {
|
|
5
5
|
x402NetworkByCaip2
|
|
6
6
|
} from "./chunk-BPYMEMQX.js";
|
|
7
7
|
import {
|
|
8
8
|
diagnosticConsole
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5PLQOC4B.js";
|
|
10
10
|
import {
|
|
11
11
|
withSdkInitLock
|
|
12
12
|
} from "./chunk-COYKJRMM.js";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
createX402FacilitatorAuthHeaders,
|
|
3
3
|
settleWithFacilitator,
|
|
4
4
|
verifyWithFacilitator
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FYETJDBB.js";
|
|
6
6
|
import {
|
|
7
7
|
buildPaymentRequirements,
|
|
8
8
|
decodePayment,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-KXWROQGK.js";
|
|
16
16
|
import {
|
|
17
17
|
diagnosticConsole
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-5PLQOC4B.js";
|
|
19
19
|
|
|
20
20
|
// src/lib/x402/verify.ts
|
|
21
21
|
async function verifyX402Payment(paymentHeader, config, requiredUsdcMicro, resource, btcUsdRate, exactVersions = { v1: true, v2: true }) {
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
isDrainMethod,
|
|
11
11
|
isFundingRail,
|
|
12
12
|
x402SettlementPending
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-IOKEKMIU.js";
|
|
14
|
+
import "./chunk-QM2OS3NJ.js";
|
|
15
15
|
import "./chunk-BPYMEMQX.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-5PLQOC4B.js";
|
|
17
17
|
import "./chunk-COYKJRMM.js";
|
|
18
18
|
export {
|
|
19
19
|
CreditLedger,
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
SignedRequestError,
|
|
12
12
|
createSignedRequestVerifier
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YS6PWVCZ.js";
|
|
14
14
|
import {
|
|
15
15
|
DEFAULT_CREDIT_MAX,
|
|
16
16
|
DEFAULT_CREDIT_MIN,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-UKD3R2KU.js";
|
|
24
24
|
import {
|
|
25
25
|
buildUpfront
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-2GTLF74N.js";
|
|
27
27
|
import {
|
|
28
28
|
DEFAULT_FX_CURRENCIES,
|
|
29
29
|
DEFAULT_FX_RATE_SOURCE,
|
|
@@ -41,8 +41,8 @@ import {
|
|
|
41
41
|
roundUsd,
|
|
42
42
|
satsToFiat,
|
|
43
43
|
validateCurrency
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import "./chunk-
|
|
44
|
+
} from "./chunk-5CSR33B5.js";
|
|
45
|
+
import "./chunk-5PLQOC4B.js";
|
|
46
46
|
|
|
47
47
|
// src/sdk/configure.ts
|
|
48
48
|
function configureDVM(config) {
|
package/dist/internal/caller.js
CHANGED
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
sha256hex,
|
|
33
33
|
validateX402Env,
|
|
34
34
|
withNwcPool
|
|
35
|
-
} from "../chunk-
|
|
35
|
+
} from "../chunk-7RZEJJTN.js";
|
|
36
36
|
import {
|
|
37
37
|
MemoryKVStore
|
|
38
38
|
} from "../chunk-SDK6KDJN.js";
|
|
@@ -143,7 +143,7 @@ import {
|
|
|
143
143
|
withWalletLock,
|
|
144
144
|
writeAgentMnemonic,
|
|
145
145
|
writeIdentity
|
|
146
|
-
} from "../chunk-
|
|
146
|
+
} from "../chunk-5TIFEMHJ.js";
|
|
147
147
|
import {
|
|
148
148
|
X402_BATCH_SETTLEMENT_SCHEME,
|
|
149
149
|
X402_DEFAULT_FACILITATOR,
|
|
@@ -197,7 +197,7 @@ import {
|
|
|
197
197
|
randomTraceId,
|
|
198
198
|
setEmitter,
|
|
199
199
|
withTraceContext
|
|
200
|
-
} from "../chunk-
|
|
200
|
+
} from "../chunk-RGSWVNQG.js";
|
|
201
201
|
import {
|
|
202
202
|
redactUrl,
|
|
203
203
|
redactUrlsInText
|
|
@@ -211,11 +211,11 @@ import {
|
|
|
211
211
|
InvalidUsdPriceError,
|
|
212
212
|
parseUsdPrice,
|
|
213
213
|
warmFxSnapshot
|
|
214
|
-
} from "../chunk-
|
|
214
|
+
} from "../chunk-5CSR33B5.js";
|
|
215
215
|
import {
|
|
216
216
|
applyRetryToPool,
|
|
217
217
|
withInitRetry
|
|
218
|
-
} from "../chunk-
|
|
218
|
+
} from "../chunk-QM2OS3NJ.js";
|
|
219
219
|
import {
|
|
220
220
|
DvmError,
|
|
221
221
|
X402_NETWORKS,
|
|
@@ -238,7 +238,7 @@ import {
|
|
|
238
238
|
projectDiagnosticFields,
|
|
239
239
|
projectEventName,
|
|
240
240
|
projectSpanRow
|
|
241
|
-
} from "../chunk-
|
|
241
|
+
} from "../chunk-5PLQOC4B.js";
|
|
242
242
|
|
|
243
243
|
// src/lib/budget-core.ts
|
|
244
244
|
function checkBudgetForLedger(ledger, opts) {
|
package/dist/internal/server.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PostgresTempoSessionStore
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-HU6ZMQDN.js";
|
|
4
4
|
import {
|
|
5
5
|
verifyX402Payment
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-WGK5KZ6S.js";
|
|
7
7
|
import {
|
|
8
8
|
RevenueReporter
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-2DE32RAW.js";
|
|
10
10
|
import {
|
|
11
11
|
PostgresTempoChargeStore
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-ZLWPEIE2.js";
|
|
13
13
|
import {
|
|
14
14
|
DEFAULT_LOCK_PUBKEY_GRACE_SECONDS,
|
|
15
15
|
MintHealthTracker,
|
|
@@ -61,31 +61,31 @@ import {
|
|
|
61
61
|
verifyUpfrontPayment,
|
|
62
62
|
x402RequiredUsdcMicro,
|
|
63
63
|
x402SettledShare
|
|
64
|
-
} from "../chunk-
|
|
64
|
+
} from "../chunk-G7IXOVKV.js";
|
|
65
65
|
import {
|
|
66
66
|
_testing,
|
|
67
67
|
wrapMppx
|
|
68
|
-
} from "../chunk-
|
|
68
|
+
} from "../chunk-QN3CQOE2.js";
|
|
69
69
|
import {
|
|
70
70
|
PayoutReporter
|
|
71
|
-
} from "../chunk-
|
|
71
|
+
} from "../chunk-YNHXOONR.js";
|
|
72
72
|
import {
|
|
73
73
|
settleWithFacilitator,
|
|
74
74
|
verifyWithFacilitator
|
|
75
|
-
} from "../chunk-
|
|
76
|
-
import "../chunk-
|
|
77
|
-
import "../chunk-
|
|
75
|
+
} from "../chunk-FYETJDBB.js";
|
|
76
|
+
import "../chunk-YE53E4BT.js";
|
|
77
|
+
import "../chunk-6JZDFYQL.js";
|
|
78
78
|
import "../chunk-YG7G4DPZ.js";
|
|
79
79
|
import {
|
|
80
80
|
SIGNED_ENVELOPE_FIELDS,
|
|
81
81
|
SIGNED_ENVELOPE_TYPES,
|
|
82
82
|
createDefaultReplayStore,
|
|
83
83
|
humanizeZodError
|
|
84
|
-
} from "../chunk-
|
|
84
|
+
} from "../chunk-YS6PWVCZ.js";
|
|
85
85
|
import {
|
|
86
86
|
createInstrumentedFetch,
|
|
87
87
|
isStaleJobReapable
|
|
88
|
-
} from "../chunk-
|
|
88
|
+
} from "../chunk-2HAFZ5GC.js";
|
|
89
89
|
import {
|
|
90
90
|
JobCancelledError,
|
|
91
91
|
abortJob,
|
|
@@ -97,14 +97,14 @@ import {
|
|
|
97
97
|
} from "../chunk-AFV77S4C.js";
|
|
98
98
|
import {
|
|
99
99
|
toLockPubkey
|
|
100
|
-
} from "../chunk-
|
|
100
|
+
} from "../chunk-5TIFEMHJ.js";
|
|
101
101
|
import "../chunk-62FI3NJF.js";
|
|
102
102
|
import "../chunk-UKD3R2KU.js";
|
|
103
|
-
import "../chunk-
|
|
103
|
+
import "../chunk-RGSWVNQG.js";
|
|
104
104
|
import "../chunk-KXWROQGK.js";
|
|
105
105
|
import "../chunk-BQJIFRAZ.js";
|
|
106
|
-
import "../chunk-
|
|
107
|
-
import "../chunk-
|
|
106
|
+
import "../chunk-2GTLF74N.js";
|
|
107
|
+
import "../chunk-5CSR33B5.js";
|
|
108
108
|
import {
|
|
109
109
|
NON_CHANNEL_BITCOIN_RAILS,
|
|
110
110
|
depleteLots,
|
|
@@ -114,10 +114,10 @@ import {
|
|
|
114
114
|
isNonChannelBitcoinRail,
|
|
115
115
|
lotOwedSats,
|
|
116
116
|
netOwedSats
|
|
117
|
-
} from "../chunk-
|
|
118
|
-
import "../chunk-
|
|
117
|
+
} from "../chunk-IOKEKMIU.js";
|
|
118
|
+
import "../chunk-QM2OS3NJ.js";
|
|
119
119
|
import "../chunk-BPYMEMQX.js";
|
|
120
|
-
import "../chunk-
|
|
120
|
+
import "../chunk-5PLQOC4B.js";
|
|
121
121
|
import "../chunk-XRLKGCAW.js";
|
|
122
122
|
import "../chunk-COYKJRMM.js";
|
|
123
123
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MemoryCreditLedger
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-YE53E4BT.js";
|
|
4
|
+
import "./chunk-IOKEKMIU.js";
|
|
5
|
+
import "./chunk-QM2OS3NJ.js";
|
|
6
6
|
import "./chunk-BPYMEMQX.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-5PLQOC4B.js";
|
|
8
8
|
import "./chunk-COYKJRMM.js";
|
|
9
9
|
export {
|
|
10
10
|
MemoryCreditLedger
|
|
@@ -19,8 +19,8 @@ import {
|
|
|
19
19
|
parseMppMethodsAllowlist,
|
|
20
20
|
resolveTempoNetwork,
|
|
21
21
|
wrapMppx
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-QN3CQOE2.js";
|
|
23
|
+
import "./chunk-5PLQOC4B.js";
|
|
24
24
|
export {
|
|
25
25
|
MPPX_HMAC_MISMATCH_REASON,
|
|
26
26
|
TEMPO_MAINNET_CHAIN_ID,
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
PayoutReporter,
|
|
5
5
|
PostgresX402BatchStore,
|
|
6
6
|
x402EarnedCeiling
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-YNHXOONR.js";
|
|
8
|
+
import "./chunk-5PLQOC4B.js";
|
|
9
9
|
import "./chunk-COYKJRMM.js";
|
|
10
10
|
export {
|
|
11
11
|
MemoryX402BatchStore,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PostgresJobStore
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6JZDFYQL.js";
|
|
4
4
|
import "./chunk-AFV77S4C.js";
|
|
5
5
|
import "./chunk-BQJIFRAZ.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-5PLQOC4B.js";
|
|
7
7
|
import "./chunk-COYKJRMM.js";
|
|
8
8
|
export {
|
|
9
9
|
PostgresJobStore
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildUpfront
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2GTLF74N.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-5CSR33B5.js";
|
|
26
|
+
import "./chunk-5PLQOC4B.js";
|
|
27
27
|
export {
|
|
28
28
|
DEFAULT_FX_CURRENCIES,
|
|
29
29
|
DEFAULT_FX_RATE_SOURCE,
|
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,
|