@dvmkit/dvm-cli 0.15.2 → 0.16.0
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-I7ZBID4L.js → chunk-2TNH4ME5.js} +2 -2
- package/dist/{chunk-HXTASGHL.js → chunk-A2B7QDMS.js} +2 -2
- package/dist/{chunk-EZL4IVCU.js → chunk-CEBEPXQ7.js} +3 -3
- package/dist/{chunk-57PXJ56K.js → chunk-DGA5EFKU.js} +354 -186
- package/dist/{chunk-UWVMG4VG.js → chunk-H6WQ4S6K.js} +3 -3
- package/dist/{chunk-D5CGDS3V.js → chunk-IK7RI645.js} +2 -2
- package/dist/{chunk-ECJO73RZ.js → chunk-LDYMUQZE.js} +2795 -2549
- package/dist/{chunk-5SHB3MZ7.js → chunk-NSA2RJ2T.js} +37 -7
- package/dist/{chunk-YQJRKWNT.js → chunk-U2PODYIS.js} +24487 -22833
- package/dist/{chunk-UCCT5IKU.js → chunk-UFMAHF6T.js} +63 -1
- package/dist/{chunk-2MCZ4QOK.js → chunk-WRIXUSMR.js} +2 -2
- package/dist/{chunk-HJ2JYBTT.js → chunk-WSLZBJ52.js} +4 -4
- package/dist/{client-YIHI4AIC.js → client-S5PTHG25.js} +6 -6
- package/dist/dvm.js +483 -197
- package/dist/{internal-O7IQD6EQ.js → internal-3SIUYRWP.js} +5 -5
- package/dist/{lifecycle-MIJH3JE4.js → lifecycle-7NHL5ATK.js} +6 -6
- package/dist/{payout-reporter-Y6OW3FYD-K6MRWQXK.js → payout-reporter-F5LFV5W4-EJ7E5ALO.js} +2 -2
- package/dist/{pocket-refill-XZTMPTP6.js → pocket-refill-3CA4PFXG.js} +10 -10
- package/dist/{revenue-reporter-CIG2MEDN-ZXMO6NWG.js → revenue-reporter-2U55YH2I-EUB6PBRN.js} +2 -2
- package/dist/{tempo-lifecycle-FMBCHD2M.js → tempo-lifecycle-GAM3DJ63.js} +8 -8
- package/dist/{tempo-wallet-U3WBWIIH.js → tempo-wallet-JTARPYLN.js} +7 -7
- package/dist/{wallet-Z3FDX43V.js → wallet-QKAKRLPI.js} +7 -7
- package/dist/{x402-ARXZQ5BD-H6PNJYYT.js → x402-G6C4N2BN-TAJEBQGU.js} +2 -2
- package/package.json +2 -2
- package/skills/dvm/calling.md +1 -1
- package/skills/dvm/wallets.md +9 -1
|
@@ -3,12 +3,125 @@ import { createRequire as __dvmCreateRequire } from "node:module";
|
|
|
3
3
|
const require = __dvmCreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
diagnosticConsole
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UFMAHF6T.js";
|
|
7
7
|
import {
|
|
8
8
|
__export
|
|
9
9
|
} from "./chunk-IYHTITNZ.js";
|
|
10
10
|
|
|
11
|
-
// node_modules/@dvmkit/sdk/dist/chunk-
|
|
11
|
+
// node_modules/@dvmkit/sdk/dist/chunk-GONRWBKB.js
|
|
12
|
+
function msatsToUsd(msats, rate) {
|
|
13
|
+
return msats / 1e11 * rate;
|
|
14
|
+
}
|
|
15
|
+
function usdToMsats(usd, rate) {
|
|
16
|
+
return Math.round(usd / rate * 1e11);
|
|
17
|
+
}
|
|
18
|
+
function msatsToUsdCents(msats, btcPriceUsd) {
|
|
19
|
+
const usd = msatsToUsd(msats, btcPriceUsd);
|
|
20
|
+
return Math.round(usd * 100);
|
|
21
|
+
}
|
|
22
|
+
function msatsToUsdc(msats, btcUsdRate) {
|
|
23
|
+
if (!Number.isSafeInteger(msats) || msats < 0) {
|
|
24
|
+
throw new RangeError("msats must be a non-negative safe integer");
|
|
25
|
+
}
|
|
26
|
+
if (!Number.isFinite(btcUsdRate) || btcUsdRate <= 0) {
|
|
27
|
+
throw new RangeError("BTC/USD rate must be finite and positive");
|
|
28
|
+
}
|
|
29
|
+
const [mantissa, exponent = "0"] = btcUsdRate.toString().split("e");
|
|
30
|
+
const decimalPlaces = mantissa.split(".")[1]?.length ?? 0;
|
|
31
|
+
const shift = Number(exponent) - decimalPlaces;
|
|
32
|
+
let numerator = BigInt(msats) * BigInt(mantissa.replace(".", ""));
|
|
33
|
+
let denominator = 100000n;
|
|
34
|
+
if (shift > 0) numerator *= 10n ** BigInt(shift);
|
|
35
|
+
else if (shift < 0) denominator *= 10n ** BigInt(-shift);
|
|
36
|
+
const micro = (numerator + denominator - 1n) / denominator;
|
|
37
|
+
if (micro > BigInt(Number.MAX_SAFE_INTEGER)) {
|
|
38
|
+
throw new RangeError("USDC micro-unit amount exceeds the safe integer range");
|
|
39
|
+
}
|
|
40
|
+
return Number(micro);
|
|
41
|
+
}
|
|
42
|
+
function usdcToMsats(usdc, btcUsdRate) {
|
|
43
|
+
return usdToMsats(usdc, btcUsdRate);
|
|
44
|
+
}
|
|
45
|
+
function msatsToMicro(msats, btcRate) {
|
|
46
|
+
return Math.round(msatsToUsd(msats, btcRate) * 1e6);
|
|
47
|
+
}
|
|
48
|
+
function microToSats(micro, btcRate) {
|
|
49
|
+
return Math.ceil(usdToMsats(micro / 1e6, btcRate) / 1e3);
|
|
50
|
+
}
|
|
51
|
+
function resolveRpcOverride(envValue, bundled) {
|
|
52
|
+
const override = envValue?.trim() ?? "";
|
|
53
|
+
return override.length > 0 ? { url: override, source: "override" } : { url: bundled, source: "bundled" };
|
|
54
|
+
}
|
|
55
|
+
function resolveRpcHttpTransportOptions(source, envValue) {
|
|
56
|
+
if (source !== "override" || !envValue?.trim()) return void 0;
|
|
57
|
+
let parsed;
|
|
58
|
+
try {
|
|
59
|
+
parsed = JSON.parse(envValue);
|
|
60
|
+
} catch {
|
|
61
|
+
throw new Error("RPC headers must be a JSON object of non-empty string values.");
|
|
62
|
+
}
|
|
63
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
|
|
64
|
+
throw new Error("RPC headers must be a JSON object of non-empty string values.");
|
|
65
|
+
const headers = {};
|
|
66
|
+
for (const [name, value] of Object.entries(parsed)) {
|
|
67
|
+
if (!/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/.test(name) || typeof value !== "string" || value.length === 0 || /[\r\n]/.test(value))
|
|
68
|
+
throw new Error("RPC headers must be a JSON object of non-empty string values.");
|
|
69
|
+
headers[name] = value;
|
|
70
|
+
}
|
|
71
|
+
if (Object.keys(headers).length === 0)
|
|
72
|
+
throw new Error("RPC headers must be a JSON object of non-empty string values.");
|
|
73
|
+
return { fetchOptions: { headers } };
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// node_modules/@dvmkit/sdk/dist/chunk-FUJ36YDV.js
|
|
77
|
+
var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
78
|
+
var LONG_HEX_RE = /^[0-9a-f]{16,}$/i;
|
|
79
|
+
var NUMERIC_RE = /^\d{4,}$/;
|
|
80
|
+
var BASE58_RE = /^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{32,}$/;
|
|
81
|
+
var OPAQUE_TOKEN_MIN_LENGTH = 32;
|
|
82
|
+
var OPAQUE_TOKEN_MIN_UNIQUE_CHARS = 8;
|
|
83
|
+
var URL_IN_TEXT_RE = /https?:\/\/[^\s"'`<>]+/gi;
|
|
84
|
+
function redactPath(pathname) {
|
|
85
|
+
const segments = pathname.split("/");
|
|
86
|
+
const redacted = segments.map((seg) => {
|
|
87
|
+
if (!seg) return seg;
|
|
88
|
+
if (UUID_RE.test(seg)) return ":uuid";
|
|
89
|
+
if (LONG_HEX_RE.test(seg)) return ":hex";
|
|
90
|
+
if (NUMERIC_RE.test(seg)) return ":n";
|
|
91
|
+
if (BASE58_RE.test(seg)) return ":b58";
|
|
92
|
+
if (isOpaqueToken(seg)) return ":token";
|
|
93
|
+
return seg;
|
|
94
|
+
});
|
|
95
|
+
return redacted.join("/");
|
|
96
|
+
}
|
|
97
|
+
function redactUrl(url) {
|
|
98
|
+
let parsed;
|
|
99
|
+
try {
|
|
100
|
+
parsed = new URL(url);
|
|
101
|
+
} catch {
|
|
102
|
+
return url;
|
|
103
|
+
}
|
|
104
|
+
return `${parsed.origin}${redactPath(parsed.pathname)}`;
|
|
105
|
+
}
|
|
106
|
+
function redactUrlsInText(text) {
|
|
107
|
+
return text.replace(URL_IN_TEXT_RE, (match) => {
|
|
108
|
+
const trailing = /[.,;:!?)\]}]+$/.exec(match)?.[0] ?? "";
|
|
109
|
+
const url = trailing.length > 0 ? match.slice(0, -trailing.length) : match;
|
|
110
|
+
return `${redactUrl(url)}${trailing}`;
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
function isOpaqueToken(segment) {
|
|
114
|
+
if (segment.length < OPAQUE_TOKEN_MIN_LENGTH) return false;
|
|
115
|
+
const distinct = /* @__PURE__ */ new Set();
|
|
116
|
+
for (let index = 0; index < segment.length; index++) {
|
|
117
|
+
distinct.add(segment.charCodeAt(index));
|
|
118
|
+
if (distinct.size >= OPAQUE_TOKEN_MIN_UNIQUE_CHARS) return true;
|
|
119
|
+
}
|
|
120
|
+
return false;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// node_modules/@dvmkit/sdk/dist/chunk-2EWECWQW.js
|
|
124
|
+
var X402_DEFAULT_FACILITATOR = "https://x402.org/facilitator";
|
|
12
125
|
var DvmError = class extends Error {
|
|
13
126
|
constructor(code, message2, hint, data, display, proseSources) {
|
|
14
127
|
super(message2);
|
|
@@ -148,54 +261,65 @@ function x402SupportedNetworksHint() {
|
|
|
148
261
|
}
|
|
149
262
|
var BY_CAIP2 = new Map(X402_NETWORKS.map((n) => [n.caip2, n]));
|
|
150
263
|
var BY_SLUG = new Map(X402_NETWORKS.map((n) => [n.slug, n]));
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
return
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
264
|
+
function callerSettleResponse(answer, options = {}) {
|
|
265
|
+
const body = isRecord(answer) ? answer : {};
|
|
266
|
+
const payer = boundedToken(body.payer);
|
|
267
|
+
const network = boundedToken(body.network);
|
|
268
|
+
const errorReason = typeof body.errorReason === "string" ? body.errorReason.replace(/[^\x20-\x7e]+/g, " ").trim().slice(0, SETTLE_ERROR_REASON_MAX) : "";
|
|
269
|
+
const channelState = options.channelId === void 0 ? void 0 : loggedChannelState(body.extra, options.channelId);
|
|
270
|
+
return {
|
|
271
|
+
success: body.success === true,
|
|
272
|
+
transaction: boundedToken(body.transaction) ?? "",
|
|
273
|
+
...network !== void 0 && { network },
|
|
274
|
+
...payer !== void 0 && { payer },
|
|
275
|
+
...errorReason !== "" && { errorReason },
|
|
276
|
+
...channelState !== void 0 && { extra: { channelState } }
|
|
277
|
+
};
|
|
162
278
|
}
|
|
163
|
-
function
|
|
164
|
-
if (!
|
|
165
|
-
|
|
279
|
+
function settleChannelState(extra, channelId) {
|
|
280
|
+
if (!isRecord(extra) || extra.channelState === void 0) return { kind: "absent" };
|
|
281
|
+
const state = extra.channelState;
|
|
282
|
+
if (!isRecord(state) || typeof state.channelId !== "string" || !CHANNEL_ID.test(state.channelId) || state.channelId.toLowerCase() !== channelId.toLowerCase()) {
|
|
283
|
+
return { kind: "dropped" };
|
|
166
284
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
else if (shift < 0) denominator *= 10n ** BigInt(-shift);
|
|
177
|
-
const micro = (numerator + denominator - 1n) / denominator;
|
|
178
|
-
if (micro > BigInt(Number.MAX_SAFE_INTEGER)) {
|
|
179
|
-
throw new RangeError("USDC micro-unit amount exceeds the safe integer range");
|
|
285
|
+
const kept = { channelId: state.channelId };
|
|
286
|
+
for (const field of CHANNEL_AMOUNT_FIELDS) {
|
|
287
|
+
const value = state[field];
|
|
288
|
+
if (value === void 0) continue;
|
|
289
|
+
const decimal = typeof value === "number" && Number.isSafeInteger(value) && value >= 0 ? String(value) : value;
|
|
290
|
+
if (typeof decimal !== "string" || !UINT256_DECIMAL.test(decimal) || BigInt(decimal) > UINT256_MAX) {
|
|
291
|
+
return { kind: "dropped" };
|
|
292
|
+
}
|
|
293
|
+
kept[field] = decimal;
|
|
180
294
|
}
|
|
181
|
-
return
|
|
295
|
+
return { kind: "kept", state: kept };
|
|
182
296
|
}
|
|
183
|
-
|
|
184
|
-
|
|
297
|
+
var SETTLE_TOKEN_MAX = 128;
|
|
298
|
+
var SETTLE_ERROR_REASON_MAX = 128;
|
|
299
|
+
var UINT256_DECIMAL = /^\d{1,78}$/;
|
|
300
|
+
var UINT256_MAX = 2n ** 256n - 1n;
|
|
301
|
+
var CHANNEL_ID = /^0x[0-9a-fA-F]{64}$/;
|
|
302
|
+
var CHANNEL_AMOUNT_FIELDS = ["balance", "totalClaimed", "chargedCumulativeAmount"];
|
|
303
|
+
function loggedChannelState(extra, channelId) {
|
|
304
|
+
const bound = settleChannelState(extra, channelId);
|
|
305
|
+
if (bound.kind === "dropped") {
|
|
306
|
+
diagnosticConsole.warn({ event: "x402_settle_channel_state_dropped", rail: "x402" });
|
|
307
|
+
}
|
|
308
|
+
return bound.kind === "kept" ? bound.state : void 0;
|
|
185
309
|
}
|
|
186
|
-
function
|
|
187
|
-
return
|
|
310
|
+
function boundedToken(value) {
|
|
311
|
+
return typeof value === "string" && value.length <= SETTLE_TOKEN_MAX && /^[\x21-\x7e]*$/.test(value) ? value : void 0;
|
|
188
312
|
}
|
|
189
|
-
function
|
|
190
|
-
return
|
|
313
|
+
function isRecord(value) {
|
|
314
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
191
315
|
}
|
|
192
|
-
var X402_DEFAULT_FACILITATOR = "https://x402.org/facilitator";
|
|
193
316
|
var X402_VERSION = 2;
|
|
194
317
|
var X402_V1_VERSION = 1;
|
|
195
318
|
var DEFAULT_MAX_TIMEOUT_SECONDS = 60;
|
|
196
319
|
var X402_DEFAULT_NETWORK = "eip155:8453";
|
|
197
320
|
var X402_EXACT_SCHEME = "exact";
|
|
198
321
|
var X402_BATCH_SETTLEMENT_SCHEME = "batch-settlement";
|
|
322
|
+
var X402_BATCH_SETTLEMENT_RESOURCE = "/v1/credit";
|
|
199
323
|
function buildPaymentRequirements(opts) {
|
|
200
324
|
const { x402Config, requiredUsdcMicro, resource, description, mimeType } = opts;
|
|
201
325
|
const maxTimeoutSeconds = opts.maxTimeoutSeconds ?? DEFAULT_MAX_TIMEOUT_SECONDS;
|
|
@@ -250,11 +374,7 @@ function paymentRequiredV2FromV1(requirements, error) {
|
|
|
250
374
|
return {
|
|
251
375
|
x402Version: X402_VERSION,
|
|
252
376
|
...error ? { error } : {},
|
|
253
|
-
resource:
|
|
254
|
-
url: first.resource,
|
|
255
|
-
...first.description ? { description: first.description } : {},
|
|
256
|
-
...first.mimeType ? { mimeType: first.mimeType } : {}
|
|
257
|
-
},
|
|
377
|
+
resource: resourceInfoFromV1(first),
|
|
258
378
|
accepts: requirements.map((requirement) => {
|
|
259
379
|
const network = x402NetworkBySlug(requirement.network)?.caip2 ?? requirement.network;
|
|
260
380
|
const usdcContract = usdcContractByCaip2(network);
|
|
@@ -276,6 +396,19 @@ function paymentRequiredV2FromV1(requirements, error) {
|
|
|
276
396
|
extensions: {}
|
|
277
397
|
};
|
|
278
398
|
}
|
|
399
|
+
function x402DeclarationFor(requirement) {
|
|
400
|
+
return { resource: resourceInfoFromV1(requirement) };
|
|
401
|
+
}
|
|
402
|
+
function withServerDeclaration(payload, declaration) {
|
|
403
|
+
const { resource: _resource, extensions: _extensions, ...rest } = payload;
|
|
404
|
+
if (payload.x402Version !== X402_VERSION) return rest;
|
|
405
|
+
const extensions = declaration.extensions;
|
|
406
|
+
return {
|
|
407
|
+
...rest,
|
|
408
|
+
resource: declaration.resource,
|
|
409
|
+
...extensions && Object.keys(extensions).length > 0 ? { extensions } : {}
|
|
410
|
+
};
|
|
411
|
+
}
|
|
279
412
|
function caip2ToX402Network(network) {
|
|
280
413
|
return x402NetworkByCaip2(network)?.slug ?? network;
|
|
281
414
|
}
|
|
@@ -303,7 +436,7 @@ function decodePayment(header) {
|
|
|
303
436
|
const parsed = JSON.parse(decoded);
|
|
304
437
|
if (!parsed || typeof parsed !== "object") throw new Error("Invalid payment header shape");
|
|
305
438
|
const version = parsed.x402Version;
|
|
306
|
-
const scheme = version === X402_V1_VERSION ? parsed.scheme : version === X402_VERSION &&
|
|
439
|
+
const scheme = version === X402_V1_VERSION ? parsed.scheme : version === X402_VERSION && isRecord2(parsed.accepted) ? parsed.accepted.scheme : void 0;
|
|
307
440
|
if (typeof scheme !== "string") throw new Error("Invalid payment scheme");
|
|
308
441
|
const decoder2 = PAYMENT_SCHEME_DECODERS[scheme];
|
|
309
442
|
if (!decoder2) throw new Error(`Unsupported x402 payment scheme: ${scheme}`);
|
|
@@ -317,7 +450,7 @@ function encodePaymentRequiredHeader(required) {
|
|
|
317
450
|
}
|
|
318
451
|
function decodePaymentRequiredHeader(header) {
|
|
319
452
|
const parsed = JSON.parse(Buffer.from(header, "base64").toString("utf-8"));
|
|
320
|
-
if (!
|
|
453
|
+
if (!isRecord2(parsed) || parsed.x402Version !== X402_VERSION || !isRecord2(parsed.resource)) {
|
|
321
454
|
throw new Error("Invalid PAYMENT-REQUIRED header shape");
|
|
322
455
|
}
|
|
323
456
|
if (typeof parsed.resource.url !== "string" || !Array.isArray(parsed.accepts)) {
|
|
@@ -329,8 +462,8 @@ function decodePaymentRequiredHeader(header) {
|
|
|
329
462
|
function exactEvmAuthorization(payload) {
|
|
330
463
|
return payload.payload.authorization;
|
|
331
464
|
}
|
|
332
|
-
function encodeSettleResponseHeader(
|
|
333
|
-
return Buffer.from(JSON.stringify(
|
|
465
|
+
function encodeSettleResponseHeader(answer, options = {}) {
|
|
466
|
+
return Buffer.from(JSON.stringify(callerSettleResponse(answer, options)), "utf-8").toString("base64");
|
|
334
467
|
}
|
|
335
468
|
var PAYMENT_SCHEME_DECODERS = {
|
|
336
469
|
exact: decodeExactPayment
|
|
@@ -348,7 +481,7 @@ function decodeExactPayment(parsed) {
|
|
|
348
481
|
if (parsed.resource !== void 0 && !isResourceInfo(parsed.resource)) {
|
|
349
482
|
throw new Error("Invalid x402 v2 resource");
|
|
350
483
|
}
|
|
351
|
-
if (parsed.extensions !== void 0 && !
|
|
484
|
+
if (parsed.extensions !== void 0 && !isRecord2(parsed.extensions)) {
|
|
352
485
|
throw new Error("Invalid x402 v2 extensions");
|
|
353
486
|
}
|
|
354
487
|
return parsed;
|
|
@@ -356,12 +489,12 @@ function decodeExactPayment(parsed) {
|
|
|
356
489
|
throw new Error(`Unsupported x402 version: ${String(parsed.x402Version)}`);
|
|
357
490
|
}
|
|
358
491
|
function validateV2Requirements(value) {
|
|
359
|
-
if (!
|
|
492
|
+
if (!isRecord2(value) || typeof value.scheme !== "string" || typeof value.network !== "string" || typeof value.amount !== "string" || typeof value.asset !== "string" || typeof value.payTo !== "string" || typeof value.maxTimeoutSeconds !== "number" || !isOptionalRecord(value.extra)) {
|
|
360
493
|
throw new Error("Invalid x402 v2 payment requirements");
|
|
361
494
|
}
|
|
362
495
|
}
|
|
363
496
|
function validateExactEvmPayload(value) {
|
|
364
|
-
if (!
|
|
497
|
+
if (!isRecord2(value) || typeof value.signature !== "string" || !isRecord2(value.authorization)) {
|
|
365
498
|
throw new Error("Invalid exact EVM payload");
|
|
366
499
|
}
|
|
367
500
|
const authorization = value.authorization;
|
|
@@ -379,85 +512,21 @@ function paymentRequirementExtra(caip2, asset, usdcContract, version) {
|
|
|
379
512
|
version: network.domainVersion
|
|
380
513
|
};
|
|
381
514
|
}
|
|
515
|
+
function resourceInfoFromV1(requirement) {
|
|
516
|
+
return {
|
|
517
|
+
url: requirement.resource,
|
|
518
|
+
...requirement.description ? { description: requirement.description } : {},
|
|
519
|
+
...requirement.mimeType ? { mimeType: requirement.mimeType } : {}
|
|
520
|
+
};
|
|
521
|
+
}
|
|
382
522
|
function isResourceInfo(value) {
|
|
383
|
-
return
|
|
523
|
+
return isRecord2(value) && typeof value.url === "string";
|
|
384
524
|
}
|
|
385
|
-
function
|
|
525
|
+
function isRecord2(value) {
|
|
386
526
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
387
527
|
}
|
|
388
528
|
function isOptionalRecord(value) {
|
|
389
|
-
return value === void 0 || value === null ||
|
|
390
|
-
}
|
|
391
|
-
function resolveRpcOverride(envValue, bundled) {
|
|
392
|
-
const override = envValue?.trim() ?? "";
|
|
393
|
-
return override.length > 0 ? { url: override, source: "override" } : { url: bundled, source: "bundled" };
|
|
394
|
-
}
|
|
395
|
-
function resolveRpcHttpTransportOptions(source, envValue) {
|
|
396
|
-
if (source !== "override" || !envValue?.trim()) return void 0;
|
|
397
|
-
let parsed;
|
|
398
|
-
try {
|
|
399
|
-
parsed = JSON.parse(envValue);
|
|
400
|
-
} catch {
|
|
401
|
-
throw new Error("RPC headers must be a JSON object of non-empty string values.");
|
|
402
|
-
}
|
|
403
|
-
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
|
|
404
|
-
throw new Error("RPC headers must be a JSON object of non-empty string values.");
|
|
405
|
-
const headers = {};
|
|
406
|
-
for (const [name, value] of Object.entries(parsed)) {
|
|
407
|
-
if (!/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/.test(name) || typeof value !== "string" || value.length === 0 || /[\r\n]/.test(value))
|
|
408
|
-
throw new Error("RPC headers must be a JSON object of non-empty string values.");
|
|
409
|
-
headers[name] = value;
|
|
410
|
-
}
|
|
411
|
-
if (Object.keys(headers).length === 0)
|
|
412
|
-
throw new Error("RPC headers must be a JSON object of non-empty string values.");
|
|
413
|
-
return { fetchOptions: { headers } };
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
// node_modules/@dvmkit/sdk/dist/chunk-FUJ36YDV.js
|
|
417
|
-
var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
418
|
-
var LONG_HEX_RE = /^[0-9a-f]{16,}$/i;
|
|
419
|
-
var NUMERIC_RE = /^\d{4,}$/;
|
|
420
|
-
var BASE58_RE = /^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{32,}$/;
|
|
421
|
-
var OPAQUE_TOKEN_MIN_LENGTH = 32;
|
|
422
|
-
var OPAQUE_TOKEN_MIN_UNIQUE_CHARS = 8;
|
|
423
|
-
var URL_IN_TEXT_RE = /https?:\/\/[^\s"'`<>]+/gi;
|
|
424
|
-
function redactPath(pathname) {
|
|
425
|
-
const segments = pathname.split("/");
|
|
426
|
-
const redacted = segments.map((seg) => {
|
|
427
|
-
if (!seg) return seg;
|
|
428
|
-
if (UUID_RE.test(seg)) return ":uuid";
|
|
429
|
-
if (LONG_HEX_RE.test(seg)) return ":hex";
|
|
430
|
-
if (NUMERIC_RE.test(seg)) return ":n";
|
|
431
|
-
if (BASE58_RE.test(seg)) return ":b58";
|
|
432
|
-
if (isOpaqueToken(seg)) return ":token";
|
|
433
|
-
return seg;
|
|
434
|
-
});
|
|
435
|
-
return redacted.join("/");
|
|
436
|
-
}
|
|
437
|
-
function redactUrl(url) {
|
|
438
|
-
let parsed;
|
|
439
|
-
try {
|
|
440
|
-
parsed = new URL(url);
|
|
441
|
-
} catch {
|
|
442
|
-
return url;
|
|
443
|
-
}
|
|
444
|
-
return `${parsed.origin}${redactPath(parsed.pathname)}`;
|
|
445
|
-
}
|
|
446
|
-
function redactUrlsInText(text) {
|
|
447
|
-
return text.replace(URL_IN_TEXT_RE, (match) => {
|
|
448
|
-
const trailing = /[.,;:!?)\]}]+$/.exec(match)?.[0] ?? "";
|
|
449
|
-
const url = trailing.length > 0 ? match.slice(0, -trailing.length) : match;
|
|
450
|
-
return `${redactUrl(url)}${trailing}`;
|
|
451
|
-
});
|
|
452
|
-
}
|
|
453
|
-
function isOpaqueToken(segment) {
|
|
454
|
-
if (segment.length < OPAQUE_TOKEN_MIN_LENGTH) return false;
|
|
455
|
-
const distinct = /* @__PURE__ */ new Set();
|
|
456
|
-
for (let index = 0; index < segment.length; index++) {
|
|
457
|
-
distinct.add(segment.charCodeAt(index));
|
|
458
|
-
if (distinct.size >= OPAQUE_TOKEN_MIN_UNIQUE_CHARS) return true;
|
|
459
|
-
}
|
|
460
|
-
return false;
|
|
529
|
+
return value === void 0 || value === null || isRecord2(value);
|
|
461
530
|
}
|
|
462
531
|
|
|
463
532
|
// node_modules/@noble/hashes/utils.js
|
|
@@ -2994,7 +3063,7 @@ var schnorr = /* @__PURE__ */ (() => {
|
|
|
2994
3063
|
};
|
|
2995
3064
|
})();
|
|
2996
3065
|
|
|
2997
|
-
// node_modules/@dvmkit/sdk/dist/chunk-
|
|
3066
|
+
// node_modules/@dvmkit/sdk/dist/chunk-IBIHGJZW.js
|
|
2998
3067
|
function resolveX402Asset(network = X402_DEFAULT_NETWORK) {
|
|
2999
3068
|
const spec = x402NetworkByCaip2(network);
|
|
3000
3069
|
if (!spec) return null;
|
|
@@ -3107,7 +3176,7 @@ function buildNoopLoggers() {
|
|
|
3107
3176
|
};
|
|
3108
3177
|
}
|
|
3109
3178
|
|
|
3110
|
-
// node_modules/@dvmkit/sdk/dist/chunk-
|
|
3179
|
+
// node_modules/@dvmkit/sdk/dist/chunk-RZHHFA7S.js
|
|
3111
3180
|
import { AsyncLocalStorage } from "async_hooks";
|
|
3112
3181
|
import { createPrivateKey, randomBytes as randomBytes2 } from "crypto";
|
|
3113
3182
|
|
|
@@ -10599,7 +10668,7 @@ var SignJWT = class {
|
|
|
10599
10668
|
}
|
|
10600
10669
|
};
|
|
10601
10670
|
|
|
10602
|
-
// node_modules/@dvmkit/sdk/dist/chunk-
|
|
10671
|
+
// node_modules/@dvmkit/sdk/dist/chunk-RZHHFA7S.js
|
|
10603
10672
|
var scopes = new AsyncLocalStorage();
|
|
10604
10673
|
function withPaymentDiagnostics(fn) {
|
|
10605
10674
|
return scopes.run({}, fn);
|
|
@@ -10684,6 +10753,37 @@ function normalizeEs256KeySecret(keySecret) {
|
|
|
10684
10753
|
if (!keySecret.includes("-----BEGIN EC PRIVATE KEY-----")) return keySecret;
|
|
10685
10754
|
return createPrivateKey(keySecret).export({ format: "pem", type: "pkcs8" });
|
|
10686
10755
|
}
|
|
10756
|
+
var X402_SETTLEMENT_PENDING = "settlement_pending";
|
|
10757
|
+
var FACILITATOR_TIMEOUT_REASON = "facilitator_timeout";
|
|
10758
|
+
var X402_DEFAULT_FACILITATOR_TIMEOUT_MS = 1e4;
|
|
10759
|
+
var X402_EXTENSION_RESPONSES_HEADER = "EXTENSION-RESPONSES";
|
|
10760
|
+
var X402_EXTENSION_RESPONSES_LOGGED_MAX = 8;
|
|
10761
|
+
var X402FacilitatorTimeoutError = class extends Error {
|
|
10762
|
+
constructor(timeoutMs) {
|
|
10763
|
+
super(`x402 facilitator did not answer within ${timeoutMs}ms`);
|
|
10764
|
+
this.timeoutMs = timeoutMs;
|
|
10765
|
+
this.name = "X402FacilitatorTimeoutError";
|
|
10766
|
+
}
|
|
10767
|
+
timeoutMs;
|
|
10768
|
+
};
|
|
10769
|
+
async function withTimeout(config, run) {
|
|
10770
|
+
const timeoutMs = config.facilitatorTimeoutMs ?? X402_DEFAULT_FACILITATOR_TIMEOUT_MS;
|
|
10771
|
+
const controller = new AbortController();
|
|
10772
|
+
let timer;
|
|
10773
|
+
const deadline = new Promise((_, reject) => {
|
|
10774
|
+
timer = setTimeout(() => {
|
|
10775
|
+
controller.abort();
|
|
10776
|
+
reject(new X402FacilitatorTimeoutError(timeoutMs));
|
|
10777
|
+
}, timeoutMs);
|
|
10778
|
+
});
|
|
10779
|
+
const call = run(controller.signal);
|
|
10780
|
+
call.catch(() => void 0);
|
|
10781
|
+
try {
|
|
10782
|
+
return await Promise.race([call, deadline]);
|
|
10783
|
+
} finally {
|
|
10784
|
+
clearTimeout(timer);
|
|
10785
|
+
}
|
|
10786
|
+
}
|
|
10687
10787
|
async function verifyWithFacilitator(payload, requirements, config = {}, createAuthHeaders = createX402FacilitatorAuthHeaders(config)) {
|
|
10688
10788
|
const facilitator = config.facilitator ?? X402_DEFAULT_FACILITATOR;
|
|
10689
10789
|
const url = facilitator.replace(/\/$/, "") + "/verify";
|
|
@@ -10692,28 +10792,39 @@ async function verifyWithFacilitator(payload, requirements, config = {}, createA
|
|
|
10692
10792
|
{ facilitator_url: url },
|
|
10693
10793
|
() => withPaymentStage("verifier", async () => {
|
|
10694
10794
|
const authHeaders = (await createAuthHeaders?.())?.verify ?? {};
|
|
10695
|
-
|
|
10696
|
-
|
|
10697
|
-
|
|
10698
|
-
|
|
10699
|
-
|
|
10700
|
-
|
|
10701
|
-
|
|
10702
|
-
|
|
10703
|
-
|
|
10704
|
-
|
|
10705
|
-
|
|
10706
|
-
|
|
10707
|
-
|
|
10708
|
-
|
|
10709
|
-
|
|
10795
|
+
try {
|
|
10796
|
+
return await withTimeout(config, async (signal) => {
|
|
10797
|
+
const res = await fetch(url, {
|
|
10798
|
+
method: "POST",
|
|
10799
|
+
headers: { "Content-Type": "application/json", ...authHeaders },
|
|
10800
|
+
body: JSON.stringify({
|
|
10801
|
+
x402Version: payload.x402Version,
|
|
10802
|
+
paymentPayload: payload,
|
|
10803
|
+
paymentRequirements: requirements
|
|
10804
|
+
}),
|
|
10805
|
+
signal
|
|
10806
|
+
});
|
|
10807
|
+
logExtensionResponses(res, "verifier");
|
|
10808
|
+
if (!res.ok) {
|
|
10809
|
+
const rejection = await readFacilitatorRejection(res, res.status === 400);
|
|
10810
|
+
if (rejection?.isValid === false && typeof rejection.invalidReason === "string" && rejection.invalidReason.length > 0) {
|
|
10811
|
+
logRejected("verifier");
|
|
10812
|
+
return rejection;
|
|
10813
|
+
}
|
|
10814
|
+
logRejected("verifier");
|
|
10815
|
+
logRefusedRequest("verifier", res.status, rejection);
|
|
10816
|
+
return { isValid: false, invalidReason: `facilitator_status_${res.status}` };
|
|
10817
|
+
}
|
|
10818
|
+
const data = await res.json();
|
|
10819
|
+
if (!data.isValid) logRejected("verifier");
|
|
10820
|
+
callerLoggers.x402.info("x402.verify_with_facilitator.result", { is_valid: data.isValid });
|
|
10821
|
+
return data;
|
|
10822
|
+
});
|
|
10823
|
+
} catch (err) {
|
|
10824
|
+
if (!(err instanceof X402FacilitatorTimeoutError)) throw err;
|
|
10710
10825
|
logRejected("verifier");
|
|
10711
|
-
return { isValid: false, invalidReason:
|
|
10826
|
+
return { isValid: false, invalidReason: FACILITATOR_TIMEOUT_REASON };
|
|
10712
10827
|
}
|
|
10713
|
-
const data = await res.json();
|
|
10714
|
-
if (!data.isValid) logRejected("verifier");
|
|
10715
|
-
callerLoggers.x402.info("x402.verify_with_facilitator.result", { is_valid: data.isValid });
|
|
10716
|
-
return data;
|
|
10717
10828
|
})
|
|
10718
10829
|
);
|
|
10719
10830
|
}
|
|
@@ -10725,46 +10836,92 @@ async function settleWithFacilitator(payload, requirements, config = {}, createA
|
|
|
10725
10836
|
{ facilitator_url: url },
|
|
10726
10837
|
() => withPaymentStage("broadcast", async () => {
|
|
10727
10838
|
const authHeaders = (await createAuthHeaders?.())?.settle ?? {};
|
|
10728
|
-
|
|
10729
|
-
|
|
10730
|
-
|
|
10731
|
-
|
|
10732
|
-
|
|
10733
|
-
|
|
10734
|
-
|
|
10735
|
-
|
|
10736
|
-
|
|
10737
|
-
|
|
10738
|
-
|
|
10739
|
-
|
|
10839
|
+
return withTimeout(config, async (signal) => {
|
|
10840
|
+
const res = await fetch(url, {
|
|
10841
|
+
method: "POST",
|
|
10842
|
+
headers: { "Content-Type": "application/json", ...authHeaders },
|
|
10843
|
+
body: JSON.stringify({
|
|
10844
|
+
x402Version: payload.x402Version,
|
|
10845
|
+
paymentPayload: payload,
|
|
10846
|
+
paymentRequirements: requirements
|
|
10847
|
+
}),
|
|
10848
|
+
signal
|
|
10849
|
+
});
|
|
10850
|
+
logExtensionResponses(res, "broadcast");
|
|
10851
|
+
if (!res.ok) {
|
|
10852
|
+
const rejection = await readFacilitatorRejection(res, true);
|
|
10853
|
+
if (rejection?.success === false && typeof rejection.errorReason === "string" && rejection.errorReason.length > 0 && (res.status === 400 || rejection.errorReason === X402_SETTLEMENT_PENDING)) {
|
|
10854
|
+
if (rejection.errorReason !== X402_SETTLEMENT_PENDING) logRejected("broadcast");
|
|
10855
|
+
return rejection;
|
|
10856
|
+
}
|
|
10740
10857
|
logRejected("broadcast");
|
|
10741
|
-
|
|
10858
|
+
logRefusedRequest("broadcast", res.status, rejection);
|
|
10859
|
+
return { success: false, errorReason: `facilitator_status_${res.status}` };
|
|
10742
10860
|
}
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
|
|
10746
|
-
|
|
10747
|
-
|
|
10748
|
-
|
|
10749
|
-
|
|
10750
|
-
tx_hash: data.transaction
|
|
10861
|
+
const data = await res.json();
|
|
10862
|
+
if (!data.success && data.errorReason !== X402_SETTLEMENT_PENDING) logRejected("broadcast");
|
|
10863
|
+
callerLoggers.x402.info("x402.settle_with_facilitator.result", {
|
|
10864
|
+
success: data.success,
|
|
10865
|
+
tx_hash: data.transaction
|
|
10866
|
+
});
|
|
10867
|
+
return data;
|
|
10751
10868
|
});
|
|
10752
|
-
return data;
|
|
10753
10869
|
})
|
|
10754
10870
|
);
|
|
10755
10871
|
}
|
|
10756
|
-
async function readFacilitatorRejection(res) {
|
|
10757
|
-
if (
|
|
10872
|
+
async function readFacilitatorRejection(res, readBody) {
|
|
10873
|
+
if (!readBody) return null;
|
|
10758
10874
|
try {
|
|
10759
10875
|
const body = await res.json();
|
|
10760
|
-
return
|
|
10876
|
+
return isRecord3(body) ? body : null;
|
|
10761
10877
|
} catch {
|
|
10762
10878
|
return null;
|
|
10763
10879
|
}
|
|
10764
10880
|
}
|
|
10765
|
-
function
|
|
10881
|
+
function isRecord3(value) {
|
|
10766
10882
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
10767
10883
|
}
|
|
10884
|
+
function logExtensionResponses(res, stage) {
|
|
10885
|
+
const header = res.headers.get(X402_EXTENSION_RESPONSES_HEADER);
|
|
10886
|
+
if (!header) return;
|
|
10887
|
+
let decoded;
|
|
10888
|
+
try {
|
|
10889
|
+
decoded = JSON.parse(Buffer.from(header, "base64").toString("utf8"));
|
|
10890
|
+
} catch {
|
|
10891
|
+
return;
|
|
10892
|
+
}
|
|
10893
|
+
if (!isRecord3(decoded)) return;
|
|
10894
|
+
const entries = Object.entries(decoded);
|
|
10895
|
+
for (const [extension, value] of entries.slice(0, X402_EXTENSION_RESPONSES_LOGGED_MAX)) {
|
|
10896
|
+
const entry = isRecord3(value) ? value : {};
|
|
10897
|
+
const rejectedReason = entry.rejectedReason ?? entry.reason;
|
|
10898
|
+
diagnosticConsole[entry.status === "rejected" ? "warn" : "info"]({
|
|
10899
|
+
event: "x402_facilitator_extension_response",
|
|
10900
|
+
rail: "x402",
|
|
10901
|
+
failure_stage: stage,
|
|
10902
|
+
extension,
|
|
10903
|
+
extension_status: entry.status,
|
|
10904
|
+
...rejectedReason !== void 0 && { extension_rejected_reason: rejectedReason }
|
|
10905
|
+
});
|
|
10906
|
+
}
|
|
10907
|
+
if (entries.length > X402_EXTENSION_RESPONSES_LOGGED_MAX) {
|
|
10908
|
+
diagnosticConsole.warn({
|
|
10909
|
+
event: "x402_facilitator_extension_responses_truncated",
|
|
10910
|
+
rail: "x402",
|
|
10911
|
+
failure_stage: stage,
|
|
10912
|
+
count: entries.length - X402_EXTENSION_RESPONSES_LOGGED_MAX
|
|
10913
|
+
});
|
|
10914
|
+
}
|
|
10915
|
+
}
|
|
10916
|
+
function logRefusedRequest(stage, status, body) {
|
|
10917
|
+
diagnosticConsole.warn({
|
|
10918
|
+
event: "x402_facilitator_request_refused",
|
|
10919
|
+
rail: "x402",
|
|
10920
|
+
failure_stage: stage,
|
|
10921
|
+
status_code: status,
|
|
10922
|
+
...body?.errorMessage !== void 0 && { facilitator_message: body.errorMessage }
|
|
10923
|
+
});
|
|
10924
|
+
}
|
|
10768
10925
|
function logRejected(stage) {
|
|
10769
10926
|
diagnosticConsole.warn({
|
|
10770
10927
|
event: "x402_credential_rejected",
|
|
@@ -10774,8 +10931,8 @@ function logRejected(stage) {
|
|
|
10774
10931
|
});
|
|
10775
10932
|
}
|
|
10776
10933
|
|
|
10777
|
-
// node_modules/@dvmkit/sdk/dist/chunk-
|
|
10778
|
-
async function verifyX402Payment(paymentHeader, config, requiredUsdcMicro, resource, btcUsdRate, exactVersions = { v1: true, v2: true }) {
|
|
10934
|
+
// node_modules/@dvmkit/sdk/dist/chunk-27DVKVFJ.js
|
|
10935
|
+
async function verifyX402Payment(paymentHeader, config, requiredUsdcMicro, resource, btcUsdRate, exactVersions = { v1: true, v2: true }, declaration) {
|
|
10779
10936
|
return callerLoggers.x402.span(
|
|
10780
10937
|
"x402.verify_payment",
|
|
10781
10938
|
{
|
|
@@ -10797,6 +10954,10 @@ async function verifyX402Payment(paymentHeader, config, requiredUsdcMicro, resou
|
|
|
10797
10954
|
}
|
|
10798
10955
|
const requirementOpts = { x402Config: config, requiredUsdcMicro, resource };
|
|
10799
10956
|
const requirements = payload.x402Version === 1 ? buildPaymentRequirements({ ...requirementOpts, version: 1 }) : buildPaymentRequirements({ ...requirementOpts, version: 2 });
|
|
10957
|
+
payload = withServerDeclaration(
|
|
10958
|
+
payload,
|
|
10959
|
+
declaration ?? x402DeclarationFor(buildPaymentRequirements({ ...requirementOpts, version: 1 }))
|
|
10960
|
+
);
|
|
10800
10961
|
const createAuthHeaders = createX402FacilitatorAuthHeaders(config);
|
|
10801
10962
|
const verifyRes = await verifyWithFacilitator(
|
|
10802
10963
|
payload,
|
|
@@ -10851,6 +11012,18 @@ function logRejected2(category, stage) {
|
|
|
10851
11012
|
}
|
|
10852
11013
|
|
|
10853
11014
|
export {
|
|
11015
|
+
msatsToUsd,
|
|
11016
|
+
usdToMsats,
|
|
11017
|
+
msatsToUsdCents,
|
|
11018
|
+
msatsToUsdc,
|
|
11019
|
+
usdcToMsats,
|
|
11020
|
+
msatsToMicro,
|
|
11021
|
+
microToSats,
|
|
11022
|
+
resolveRpcOverride,
|
|
11023
|
+
resolveRpcHttpTransportOptions,
|
|
11024
|
+
redactUrl,
|
|
11025
|
+
redactUrlsInText,
|
|
11026
|
+
X402_DEFAULT_FACILITATOR,
|
|
10854
11027
|
DvmError,
|
|
10855
11028
|
providerProseSources,
|
|
10856
11029
|
isAbortError,
|
|
@@ -10862,22 +11035,19 @@ export {
|
|
|
10862
11035
|
x402NetworkListForCopy,
|
|
10863
11036
|
assertSupportedX402Network,
|
|
10864
11037
|
x402SupportedNetworksHint,
|
|
10865
|
-
|
|
10866
|
-
|
|
10867
|
-
msatsToUsdCents,
|
|
10868
|
-
msatsToUsdc,
|
|
10869
|
-
usdcToMsats,
|
|
10870
|
-
msatsToMicro,
|
|
10871
|
-
microToSats,
|
|
10872
|
-
X402_DEFAULT_FACILITATOR,
|
|
11038
|
+
callerSettleResponse,
|
|
11039
|
+
settleChannelState,
|
|
10873
11040
|
X402_VERSION,
|
|
10874
11041
|
X402_V1_VERSION,
|
|
10875
11042
|
X402_DEFAULT_NETWORK,
|
|
10876
11043
|
X402_EXACT_SCHEME,
|
|
10877
11044
|
X402_BATCH_SETTLEMENT_SCHEME,
|
|
11045
|
+
X402_BATCH_SETTLEMENT_RESOURCE,
|
|
10878
11046
|
buildPaymentRequirements,
|
|
10879
11047
|
buildPaymentRequiredV2,
|
|
10880
11048
|
paymentRequiredV2FromV1,
|
|
11049
|
+
x402DeclarationFor,
|
|
11050
|
+
withServerDeclaration,
|
|
10881
11051
|
caip2ToX402Network,
|
|
10882
11052
|
x402NetworkToCaip2,
|
|
10883
11053
|
chainIdFromCaip2,
|
|
@@ -10891,10 +11061,6 @@ export {
|
|
|
10891
11061
|
decodePaymentRequiredHeader,
|
|
10892
11062
|
exactEvmAuthorization,
|
|
10893
11063
|
encodeSettleResponseHeader,
|
|
10894
|
-
resolveRpcOverride,
|
|
10895
|
-
resolveRpcHttpTransportOptions,
|
|
10896
|
-
redactUrl,
|
|
10897
|
-
redactUrlsInText,
|
|
10898
11064
|
anumber,
|
|
10899
11065
|
abytes,
|
|
10900
11066
|
ahash,
|
|
@@ -10941,6 +11107,8 @@ export {
|
|
|
10941
11107
|
paymentFailureStage,
|
|
10942
11108
|
createX402FacilitatorAuthHeaders,
|
|
10943
11109
|
createX402FacilitatorClient,
|
|
11110
|
+
X402_SETTLEMENT_PENDING,
|
|
11111
|
+
X402_DEFAULT_FACILITATOR_TIMEOUT_MS,
|
|
10944
11112
|
verifyWithFacilitator,
|
|
10945
11113
|
settleWithFacilitator,
|
|
10946
11114
|
verifyX402Payment
|