@dvmkit/dvm-cli 0.6.0 → 0.7.0-rc.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/{_esm-MN4BUYV6.js → _esm-KJAA4KAJ.js} +7 -7
- package/dist/{actions-LR65XILR.js → actions-J7VGYDBF.js} +4 -4
- package/dist/{ccip-JXYJSXTW.js → ccip-CJFG4PLA.js} +1 -1
- package/dist/{chains-LJ7XK6H3.js → chains-J6VIUNUB.js} +4 -4
- package/dist/{chunk-MJ4X4BEW.js → chunk-6LP4EGKA.js} +61 -61
- package/dist/chunk-6QHVPJNX.js +122 -0
- package/dist/chunk-7UAQTHNP.js +77 -0
- package/dist/{chunk-BECPI5H5.js → chunk-B4WHUMZM.js} +36 -36
- package/dist/{chunk-CJTE5TS3.js → chunk-ESOJUXVY.js} +5 -5
- package/dist/{chunk-F55NNH2F.js → chunk-FOWQ7R7S.js} +16 -16
- package/dist/{chunk-ID5G54HJ.js → chunk-FPWP4S5S.js} +5 -3
- package/dist/{chunk-EE2MREOM.js → chunk-IQV4KG63.js} +5 -3
- package/dist/{chunk-R55XNXAR.js → chunk-IUTVV6N5.js} +3 -3
- package/dist/{chunk-Z4CZUMUT.js → chunk-JBU7RKQ3.js} +15 -15
- package/dist/{chunk-SHZMNEXE.js → chunk-JTMBSEZO.js} +2770 -926
- package/dist/{chunk-ERJFRCJO.js → chunk-KDNFUDOG.js} +5 -5
- package/dist/chunk-PG7MEKJI.js +43 -0
- package/dist/{chunk-WTM2EICO.js → chunk-PUOXBKY2.js} +3 -3
- package/dist/{chunk-GZWKCIYN.js → chunk-QXMKABL7.js} +3 -3
- package/dist/chunk-R2DSAZBO.js +87 -0
- package/dist/chunk-RQYMWLX4.js +409 -0
- package/dist/{chunk-FL2ICZW5.js → chunk-SYFKO6BA.js} +3 -3
- package/dist/{chunk-LH3QPVN6.js → chunk-TAZWRWM4.js} +8060 -8058
- package/dist/chunk-U3YRNLZ5.js +262 -0
- package/dist/{chunk-QICJRKB7.js → chunk-VIYUB3XT.js} +11035 -12471
- package/dist/chunk-VLZ2K7JL.js +5460 -0
- package/dist/{chunk-TZWZTS37.js → chunk-WN5R367B.js} +57 -83
- package/dist/{chunk-EZHT2RLJ.js → chunk-X7SEGALJ.js} +3 -3
- package/dist/{chunk-XHOFQ3OS.js → chunk-Y3SQD37C.js} +9 -9
- package/dist/chunk-ZXVOMXT4.js +765 -0
- package/dist/{client-RYDA62DU.js → client-6IHIUB6J.js} +10 -10
- package/dist/client-IDO4IAXG.js +36 -0
- package/dist/{dist-GKCEIY2A.js → dist-23E7OOCA.js} +9 -9
- package/dist/dvm.js +2428 -568
- package/dist/{internal-INUTGTXQ.js → internal-7FXJTFBU.js} +325 -508
- package/dist/lifecycle-LRS3IBQL.js +36 -0
- package/dist/{payout-reporter-3Y2U55ZX-CMKACKA3.js → payout-reporter-WT7XYW42-U2QPDIYC.js} +3 -2
- package/dist/{pocket-refill-K5T4LZF6.js → pocket-refill-J5OWRBXH.js} +33 -30
- package/dist/{revenue-reporter-MAERPYGK-CCPZXGFA.js → revenue-reporter-7UR3W2SD-C5OMRGK3.js} +3 -2
- package/dist/{tempo-AXTE4ZEA.js → tempo-ORFVGUKP.js} +10 -10
- package/dist/tempo-lifecycle-HS2NIFKT.js +38 -0
- package/dist/tempo-wallet-BA2LKR45.js +43 -0
- package/dist/wallet-RPPUCQUR.js +45 -0
- package/dist/{x402-R6HPBY5D-VMSW7Z32.js → x402-ZU4GML7Z-RYEACIIT.js} +4 -19
- package/package.json +4 -2
- package/dist/chunk-3YE43JJR.js +0 -215
- package/dist/chunk-4KINCBHL.js +0 -5153
- package/dist/chunk-FSYEZERJ.js +0 -1667
- package/dist/chunk-VOO5IAK7.js +0 -2318
- package/dist/tempo-lifecycle-ZBBLFBMH-HWI4PLYP.js +0 -32
- package/dist/tempo-wallet-B5XXV3YH-SRQBMYFV.js +0 -41
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire as __dvmCreateRequire } from "node:module";
|
|
3
3
|
const require = __dvmCreateRequire(import.meta.url);
|
|
4
4
|
|
|
5
|
-
// node_modules/@dvmkit/sdk/dist/chunk-
|
|
5
|
+
// node_modules/@dvmkit/sdk/dist/chunk-LAKP6FUI.js
|
|
6
6
|
import { isIP } from "net";
|
|
7
7
|
var diagnostic_catalogue_v1_default = {
|
|
8
8
|
version: 1,
|
|
@@ -1000,9 +1000,61 @@ var diagnostic_catalogue_v1_default = {
|
|
|
1000
1000
|
],
|
|
1001
1001
|
clientVersionFields: [
|
|
1002
1002
|
"client.version"
|
|
1003
|
+
],
|
|
1004
|
+
paymentSkipReasons: [
|
|
1005
|
+
"credit_or_draw_missing",
|
|
1006
|
+
"draw_not_pending",
|
|
1007
|
+
"draw_job_mismatch",
|
|
1008
|
+
"rail_mismatch",
|
|
1009
|
+
"channel_binding_mismatch",
|
|
1010
|
+
"denomination_unavailable",
|
|
1011
|
+
"topup_cap_unavailable",
|
|
1012
|
+
"topup_cap_currency_mismatch",
|
|
1013
|
+
"unknown"
|
|
1014
|
+
],
|
|
1015
|
+
denominationCauses: [
|
|
1016
|
+
"no_msats",
|
|
1017
|
+
"sub_micro",
|
|
1018
|
+
"unsupported_currency",
|
|
1019
|
+
"rate_unavailable",
|
|
1020
|
+
"rate_stale_refused",
|
|
1021
|
+
"unknown"
|
|
1022
|
+
],
|
|
1023
|
+
paymentFailureCategories: [
|
|
1024
|
+
"invalid_challenge",
|
|
1025
|
+
"malformed_credential",
|
|
1026
|
+
"payment_expired",
|
|
1027
|
+
"verification_failed",
|
|
1028
|
+
"insufficient_funds",
|
|
1029
|
+
"invalid_signature",
|
|
1030
|
+
"unsupported_method",
|
|
1031
|
+
"replay_detected",
|
|
1032
|
+
"ledger_refused",
|
|
1033
|
+
"settlement_failed",
|
|
1034
|
+
"unsupported_version",
|
|
1035
|
+
"unknown"
|
|
1036
|
+
],
|
|
1037
|
+
paymentFailureStages: [
|
|
1038
|
+
"verifier",
|
|
1039
|
+
"broadcast",
|
|
1040
|
+
"verifier_broadcast",
|
|
1041
|
+
"replay_store",
|
|
1042
|
+
"funding_ledger",
|
|
1043
|
+
"unknown"
|
|
1044
|
+
],
|
|
1045
|
+
paymentPhases: [
|
|
1046
|
+
"upfront",
|
|
1047
|
+
"mid-job"
|
|
1003
1048
|
]
|
|
1004
1049
|
};
|
|
1005
1050
|
var DIAGNOSTIC_CATALOGUE_VERSION = diagnostic_catalogue_v1_default.version;
|
|
1051
|
+
var PAYMENT_ENUMS = {
|
|
1052
|
+
reason: new Set(diagnostic_catalogue_v1_default.paymentSkipReasons),
|
|
1053
|
+
cause: new Set(diagnostic_catalogue_v1_default.denominationCauses),
|
|
1054
|
+
failure_category: new Set(diagnostic_catalogue_v1_default.paymentFailureCategories),
|
|
1055
|
+
failure_stage: new Set(diagnostic_catalogue_v1_default.paymentFailureStages),
|
|
1056
|
+
phase: new Set(diagnostic_catalogue_v1_default.paymentPhases)
|
|
1057
|
+
};
|
|
1006
1058
|
var EVENTS = new Set(diagnostic_catalogue_v1_default.events);
|
|
1007
1059
|
var ROUTE_TEMPLATES = [...diagnostic_catalogue_v1_default.routeTemplates].sort(
|
|
1008
1060
|
compareRouteTemplates
|
|
@@ -1202,6 +1254,9 @@ function projectFields(input, dataset, authority, identityAuthority) {
|
|
|
1202
1254
|
return output;
|
|
1203
1255
|
}
|
|
1204
1256
|
function projectField(key, value, dataset, authority, identityAuthority) {
|
|
1257
|
+
const paymentEnum = Object.hasOwn(PAYMENT_ENUMS, key) ? PAYMENT_ENUMS[key] : void 0;
|
|
1258
|
+
if (paymentEnum)
|
|
1259
|
+
return typeof value === "string" && paymentEnum.has(value) ? value : void 0;
|
|
1205
1260
|
if (BOOLEAN_FIELDS.has(key))
|
|
1206
1261
|
return typeof value === "boolean" ? value : void 0;
|
|
1207
1262
|
if (INTEGER_FIELDS.has(key))
|
|
@@ -1422,86 +1477,6 @@ function ownValue2(input, key) {
|
|
|
1422
1477
|
}
|
|
1423
1478
|
}
|
|
1424
1479
|
|
|
1425
|
-
// node_modules/@dvmkit/sdk/dist/chunk-COYKJRMM.js
|
|
1426
|
-
import { AsyncLocalStorage } from "async_hooks";
|
|
1427
|
-
var SDK_INIT_ADVISORY_LOCK = 17320927;
|
|
1428
|
-
async function withSdkInitLock(db, fn) {
|
|
1429
|
-
const context = activeInits.getStore();
|
|
1430
|
-
if (context?.get(db)?.active) return fn();
|
|
1431
|
-
assertPoolFitsLock(db);
|
|
1432
|
-
let holder = holders.get(db);
|
|
1433
|
-
if (holder) {
|
|
1434
|
-
holder.refs += 1;
|
|
1435
|
-
} else {
|
|
1436
|
-
holder = { refs: 1, acquired: acquire(db), tail: Promise.resolve() };
|
|
1437
|
-
holders.set(db, holder);
|
|
1438
|
-
}
|
|
1439
|
-
const predecessor = holder.tail;
|
|
1440
|
-
let finishTurn;
|
|
1441
|
-
holder.tail = new Promise((resolve) => {
|
|
1442
|
-
finishTurn = resolve;
|
|
1443
|
-
});
|
|
1444
|
-
let guardedFailed = false;
|
|
1445
|
-
try {
|
|
1446
|
-
await holder.acquired;
|
|
1447
|
-
await predecessor;
|
|
1448
|
-
const token = { active: true };
|
|
1449
|
-
const nextContext = new Map(context);
|
|
1450
|
-
nextContext.set(db, token);
|
|
1451
|
-
try {
|
|
1452
|
-
return await activeInits.run(nextContext, fn);
|
|
1453
|
-
} finally {
|
|
1454
|
-
token.active = false;
|
|
1455
|
-
}
|
|
1456
|
-
} catch (err) {
|
|
1457
|
-
guardedFailed = true;
|
|
1458
|
-
throw err;
|
|
1459
|
-
} finally {
|
|
1460
|
-
try {
|
|
1461
|
-
await releaseHolder(db, holder, guardedFailed);
|
|
1462
|
-
} finally {
|
|
1463
|
-
finishTurn();
|
|
1464
|
-
}
|
|
1465
|
-
}
|
|
1466
|
-
}
|
|
1467
|
-
var holders = /* @__PURE__ */ new WeakMap();
|
|
1468
|
-
var activeInits = new AsyncLocalStorage();
|
|
1469
|
-
function assertPoolFitsLock(db) {
|
|
1470
|
-
const max = db.options?.max;
|
|
1471
|
-
if (max === void 0 || max >= 2) return;
|
|
1472
|
-
throw new Error(
|
|
1473
|
-
`withSdkInitLock: the SDK boot lock needs a pool that allows at least 2 connections (got max=${max}). The lock is held on one pinned client while the guarded DDL runs on another, so boot would hang forever.`
|
|
1474
|
-
);
|
|
1475
|
-
}
|
|
1476
|
-
async function acquire(db) {
|
|
1477
|
-
const client = await db.connect();
|
|
1478
|
-
try {
|
|
1479
|
-
await client.query(`SELECT pg_advisory_lock(${SDK_INIT_ADVISORY_LOCK})`);
|
|
1480
|
-
} catch (err) {
|
|
1481
|
-
client.release();
|
|
1482
|
-
throw err;
|
|
1483
|
-
}
|
|
1484
|
-
return client;
|
|
1485
|
-
}
|
|
1486
|
-
async function releaseHolder(db, holder, guardedFailed) {
|
|
1487
|
-
holder.refs -= 1;
|
|
1488
|
-
if (holder.refs > 0) return;
|
|
1489
|
-
holders.delete(db);
|
|
1490
|
-
let client;
|
|
1491
|
-
try {
|
|
1492
|
-
client = await holder.acquired;
|
|
1493
|
-
} catch {
|
|
1494
|
-
return;
|
|
1495
|
-
}
|
|
1496
|
-
try {
|
|
1497
|
-
await client.query(`SELECT pg_advisory_unlock(${SDK_INIT_ADVISORY_LOCK})`);
|
|
1498
|
-
client.release();
|
|
1499
|
-
} catch (err) {
|
|
1500
|
-
client.release(err instanceof Error ? err : new Error(String(err)));
|
|
1501
|
-
if (!guardedFailed) throw err;
|
|
1502
|
-
}
|
|
1503
|
-
}
|
|
1504
|
-
|
|
1505
1480
|
export {
|
|
1506
1481
|
DIAGNOSTIC_CATALOGUE_VERSION,
|
|
1507
1482
|
createDiagnosticCapabilityAuthority,
|
|
@@ -1512,6 +1487,5 @@ export {
|
|
|
1512
1487
|
projectDiagnosticFields,
|
|
1513
1488
|
projectEventName,
|
|
1514
1489
|
diagnosticConsole,
|
|
1515
|
-
emitDiagnostic
|
|
1516
|
-
withSdkInitLock
|
|
1490
|
+
emitDiagnostic
|
|
1517
1491
|
};
|
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
sha384,
|
|
16
16
|
sha512,
|
|
17
17
|
toBytes,
|
|
18
|
-
toHex,
|
|
18
|
+
toHex2 as toHex,
|
|
19
19
|
toRpcList,
|
|
20
20
|
validate,
|
|
21
21
|
yParityToV
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-TAZWRWM4.js";
|
|
23
23
|
import {
|
|
24
24
|
BaseError,
|
|
25
25
|
concat,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
toNumber2 as toNumber,
|
|
41
41
|
toString,
|
|
42
42
|
trimLeft2 as trimLeft
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-FOWQ7R7S.js";
|
|
44
44
|
import {
|
|
45
45
|
__export
|
|
46
46
|
} from "./chunk-IYHTITNZ.js";
|
|
@@ -28,11 +28,7 @@ import {
|
|
|
28
28
|
toSubscriptionPeriodSeconds,
|
|
29
29
|
validateCredentialHeaderValue,
|
|
30
30
|
verifySubscriptionKeyAuthorization
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import {
|
|
33
|
-
KeyAuthorization_exports,
|
|
34
|
-
tempo
|
|
35
|
-
} from "./chunk-BECPI5H5.js";
|
|
31
|
+
} from "./chunk-6LP4EGKA.js";
|
|
36
32
|
import {
|
|
37
33
|
Assets_exports2 as Assets_exports,
|
|
38
34
|
Chains_exports,
|
|
@@ -46,7 +42,7 @@ import {
|
|
|
46
42
|
networkOf,
|
|
47
43
|
resolve as resolve2,
|
|
48
44
|
toSource
|
|
49
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-SYFKO6BA.js";
|
|
50
46
|
import {
|
|
51
47
|
_minLength,
|
|
52
48
|
amount,
|
|
@@ -68,16 +64,20 @@ import {
|
|
|
68
64
|
toClient,
|
|
69
65
|
toPaymentRequirements,
|
|
70
66
|
transform
|
|
71
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-PUOXBKY2.js";
|
|
68
|
+
import {
|
|
69
|
+
KeyAuthorization_exports,
|
|
70
|
+
tempo
|
|
71
|
+
} from "./chunk-B4WHUMZM.js";
|
|
72
72
|
import {
|
|
73
73
|
Hash_exports,
|
|
74
74
|
parseUnits
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-TAZWRWM4.js";
|
|
76
76
|
import {
|
|
77
77
|
Bytes_exports,
|
|
78
78
|
Hex_exports,
|
|
79
79
|
isAddressEqual
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-FOWQ7R7S.js";
|
|
81
81
|
import {
|
|
82
82
|
getAddress
|
|
83
83
|
} from "./chunk-MLDUKBU3.js";
|