@dvmkit/dvm-cli 0.15.3 → 0.17.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-HXTASGHL.js → chunk-A2B7QDMS.js} +2 -2
- package/dist/{chunk-DZHEYRS2.js → chunk-DE7TEOUR.js} +3136 -2821
- package/dist/{chunk-57PXJ56K.js → chunk-DGA5EFKU.js} +354 -186
- package/dist/{chunk-2MCZ4QOK.js → chunk-ESQ6DCS3.js} +4 -4
- package/dist/{chunk-D5CGDS3V.js → chunk-IK7RI645.js} +2 -2
- package/dist/{chunk-HJ2JYBTT.js → chunk-OEWENVJ7.js} +5 -5
- package/dist/{chunk-F45ETHDP.js → chunk-R6FZT6S2.js} +14 -6
- package/dist/{chunk-I7ZBID4L.js → chunk-REIUNZQX.js} +2 -2
- package/dist/{chunk-YQJRKWNT.js → chunk-THTPKBZX.js} +24488 -22833
- package/dist/{chunk-UCCT5IKU.js → chunk-UFMAHF6T.js} +63 -1
- package/dist/{chunk-UWVMG4VG.js → chunk-VLD7OKSH.js} +6 -6
- package/dist/{chunk-EZL4IVCU.js → chunk-ZGBCVQF2.js} +3 -3
- package/dist/{client-NBC2IDA2.js → client-3JOMNAIQ.js} +6 -6
- package/dist/dvm.js +468 -217
- package/dist/{internal-O7IQD6EQ.js → internal-L362ZUWL.js} +5 -5
- package/dist/{lifecycle-MIJH3JE4.js → lifecycle-BH4OA5I3.js} +6 -6
- package/dist/{payout-reporter-Y6OW3FYD-K6MRWQXK.js → payout-reporter-F5LFV5W4-EJ7E5ALO.js} +2 -2
- package/dist/{pocket-refill-LCDXSC74.js → pocket-refill-5BEM22UM.js} +12 -12
- package/dist/{revenue-reporter-CIG2MEDN-ZXMO6NWG.js → revenue-reporter-2U55YH2I-EUB6PBRN.js} +2 -2
- package/dist/{tempo-lifecycle-FMBCHD2M.js → tempo-lifecycle-WGTX6MJR.js} +8 -8
- package/dist/{tempo-wallet-U3WBWIIH.js → tempo-wallet-OTB2YSWE.js} +7 -7
- package/dist/{wallet-Z3FDX43V.js → wallet-73EJBUSO.js} +7 -7
- package/dist/{x402-ARXZQ5BD-H6PNJYYT.js → x402-G6C4N2BN-TAJEBQGU.js} +2 -2
- package/package.json +3 -2
- package/skills/dvm/calling.md +3 -1
- package/skills/dvm/wallets.md +9 -1
|
@@ -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-32OYGCKJ.js
|
|
6
6
|
import { isIP } from "net";
|
|
7
7
|
var diagnostic_catalogue_v1_default = {
|
|
8
8
|
version: 1,
|
|
@@ -55,6 +55,7 @@ var diagnostic_catalogue_v1_default = {
|
|
|
55
55
|
"caller_data_retention.swept",
|
|
56
56
|
"caller_data_retention_failed",
|
|
57
57
|
"capability_gap_alert_error",
|
|
58
|
+
"capability_schema_drops_signed_envelope",
|
|
58
59
|
"cashu-mint-audit.tick",
|
|
59
60
|
"cashu-mint-health-cron.tick",
|
|
60
61
|
"cashu.get_wallet",
|
|
@@ -172,6 +173,7 @@ var diagnostic_catalogue_v1_default = {
|
|
|
172
173
|
"fleet_drift_check_failed",
|
|
173
174
|
"fly_app_anomaly_check",
|
|
174
175
|
"fly_app_anomaly_check_failed",
|
|
176
|
+
"fly_keepalive_failed",
|
|
175
177
|
"fx-rate-refresh-cron.tick",
|
|
176
178
|
"fx_rate_attempt_failed",
|
|
177
179
|
"fx_rate_cold_start_failed",
|
|
@@ -225,6 +227,7 @@ var diagnostic_catalogue_v1_default = {
|
|
|
225
227
|
"job_status_watch_subscribe_failed",
|
|
226
228
|
"job_terminal_elsewhere",
|
|
227
229
|
"kind",
|
|
230
|
+
"kv_expiry_sweep_failed",
|
|
228
231
|
"kv_store_in_memory",
|
|
229
232
|
"lightning.get_balance",
|
|
230
233
|
"lightning.get_balance.result",
|
|
@@ -244,7 +247,9 @@ var diagnostic_catalogue_v1_default = {
|
|
|
244
247
|
"lightning_rail_health_stale_observation",
|
|
245
248
|
"lightning_rail_health_staleness_ceiling",
|
|
246
249
|
"lightning_rail_health_unavailable",
|
|
250
|
+
"lightning_receive_allow_spend_enabled",
|
|
247
251
|
"lightning_receive_permission_refused",
|
|
252
|
+
"lightning_receive_probe_failed",
|
|
248
253
|
"lightning_receive_unreachable",
|
|
249
254
|
"lightning_settlement_blocked",
|
|
250
255
|
"lightning_settlement_check_failed",
|
|
@@ -337,10 +342,15 @@ var diagnostic_catalogue_v1_default = {
|
|
|
337
342
|
"revenue_deadletter_drain",
|
|
338
343
|
"revenue_deadletter_enqueue_failed",
|
|
339
344
|
"revenue_reporter_abandoned",
|
|
345
|
+
"revenue_report_mark_failed",
|
|
346
|
+
"revenue_skipped_no_ledger",
|
|
340
347
|
"revenue_skipped_no_rail",
|
|
341
348
|
"revenue_skipped_no_rail_check",
|
|
342
349
|
"revenue_skipped_no_rail_record_failed",
|
|
343
350
|
"revenue_skipped_no_rail_report_failed",
|
|
351
|
+
"revenue_skipped_no_reporter",
|
|
352
|
+
"revenue_skipped_released_draw",
|
|
353
|
+
"revenue_skipped_unbookable_draw",
|
|
344
354
|
"revenue_skipped_unsettled_draw",
|
|
345
355
|
"rollback",
|
|
346
356
|
"router.proxy",
|
|
@@ -460,6 +470,8 @@ var diagnostic_catalogue_v1_default = {
|
|
|
460
470
|
"terminal_cost_recovery_complete",
|
|
461
471
|
"terminal_cost_recovery_failed",
|
|
462
472
|
"terminal_cost_recovery_truncated",
|
|
473
|
+
"terminal_revenue_recovered",
|
|
474
|
+
"terminal_revenue_recovery_failed",
|
|
463
475
|
"transcriber_fallback",
|
|
464
476
|
"update",
|
|
465
477
|
"upgrade_prompt_evaluation_failed",
|
|
@@ -482,13 +494,21 @@ var diagnostic_catalogue_v1_default = {
|
|
|
482
494
|
"x402_claim_ceiling_unresolved",
|
|
483
495
|
"x402_credential_rejected",
|
|
484
496
|
"x402_facilitator_capability_degraded",
|
|
497
|
+
"x402_facilitator_extension_response",
|
|
498
|
+
"x402_facilitator_extension_responses_truncated",
|
|
485
499
|
"x402_facilitator_fallback",
|
|
500
|
+
"x402_facilitator_request_refused",
|
|
486
501
|
"x402_facilitator_staleness_ceiling",
|
|
487
502
|
"x402_facilitator_unavailable",
|
|
488
503
|
"x402_network_unsupported",
|
|
489
504
|
"x402_refund_amount_unreported",
|
|
490
505
|
"x402_repair_channel_state_stale",
|
|
491
506
|
"x402_repair_write_off_restore_failed",
|
|
507
|
+
"x402_route_currency_unsupported",
|
|
508
|
+
"x402_route_dual_serve_off",
|
|
509
|
+
"x402_route_origin_from_request",
|
|
510
|
+
"x402_route_response_limit_exceeded",
|
|
511
|
+
"x402_route_settlement_store_missing",
|
|
492
512
|
"x402_self_relay_gas_alert_failed",
|
|
493
513
|
"x402_self_relay_gas_balance",
|
|
494
514
|
"x402_self_relay_gas_balance_failed",
|
|
@@ -498,6 +518,7 @@ var diagnostic_catalogue_v1_default = {
|
|
|
498
518
|
"x402_self_relay_rpc_health_report_failed",
|
|
499
519
|
"x402_self_relay_submission_lock_timeout",
|
|
500
520
|
"x402_self_relay_unserialized",
|
|
521
|
+
"x402_settle_channel_state_dropped",
|
|
501
522
|
"x402_settlement_reconciliation_chain_unreachable",
|
|
502
523
|
"x402_settlement_reconciliation_facilitator_unavailable",
|
|
503
524
|
"x402_settlement_submission_failed",
|
|
@@ -961,6 +982,13 @@ var diagnostic_catalogue_v1_default = {
|
|
|
961
982
|
"HEAD",
|
|
962
983
|
"OPTIONS"
|
|
963
984
|
],
|
|
985
|
+
nwcExcessMethods: [
|
|
986
|
+
"pay_invoice",
|
|
987
|
+
"pay_keysend",
|
|
988
|
+
"multi_pay_invoice",
|
|
989
|
+
"multi_pay_keysend",
|
|
990
|
+
"sign_message"
|
|
991
|
+
],
|
|
964
992
|
rails: [
|
|
965
993
|
"cashu",
|
|
966
994
|
"lightning",
|
|
@@ -1072,6 +1100,10 @@ var diagnostic_catalogue_v1_default = {
|
|
|
1072
1100
|
capabilityFields: [
|
|
1073
1101
|
"capability"
|
|
1074
1102
|
],
|
|
1103
|
+
capabilityChannels: [
|
|
1104
|
+
"job",
|
|
1105
|
+
"x402"
|
|
1106
|
+
],
|
|
1075
1107
|
clientProtocolVersions: [
|
|
1076
1108
|
1
|
|
1077
1109
|
],
|
|
@@ -1191,6 +1223,7 @@ var DATASETS = new Set(diagnostic_catalogue_v1_default.datasets);
|
|
|
1191
1223
|
var LEVELS = new Set(diagnostic_catalogue_v1_default.levels);
|
|
1192
1224
|
var STATUSES = new Set(diagnostic_catalogue_v1_default.statuses);
|
|
1193
1225
|
var METHODS = new Set(diagnostic_catalogue_v1_default.methods);
|
|
1226
|
+
var NWC_EXCESS_METHODS = new Set(diagnostic_catalogue_v1_default.nwcExcessMethods);
|
|
1194
1227
|
var RAILS = new Set(diagnostic_catalogue_v1_default.rails);
|
|
1195
1228
|
var STAGES = new Set(diagnostic_catalogue_v1_default.stages);
|
|
1196
1229
|
var HANDLERS = new Set(diagnostic_catalogue_v1_default.handlers);
|
|
@@ -1204,6 +1237,7 @@ var TRANSACTION_HASH_FIELDS = new Set(diagnostic_catalogue_v1_default.transactio
|
|
|
1204
1237
|
var URL_FIELDS = new Set(diagnostic_catalogue_v1_default.urlFields);
|
|
1205
1238
|
var IDENTITY_FIELDS = new Set(diagnostic_catalogue_v1_default.identityFields);
|
|
1206
1239
|
var CAPABILITY_FIELDS = new Set(diagnostic_catalogue_v1_default.capabilityFields);
|
|
1240
|
+
var CAPABILITY_CHANNELS = new Set(diagnostic_catalogue_v1_default.capabilityChannels);
|
|
1207
1241
|
var CLIENT_PROTOCOL_VERSIONS = new Set(
|
|
1208
1242
|
diagnostic_catalogue_v1_default.clientProtocolVersions
|
|
1209
1243
|
);
|
|
@@ -1227,6 +1261,8 @@ var CARD_REFUND_EVENTS = /* @__PURE__ */ new Set([
|
|
|
1227
1261
|
"card_refund_sweep",
|
|
1228
1262
|
"card_refund_sweep_step_failed"
|
|
1229
1263
|
]);
|
|
1264
|
+
var X402_FACILITATOR_EVENTS = /* @__PURE__ */ new Set(["x402_facilitator_extension_response", "x402_facilitator_request_refused"]);
|
|
1265
|
+
var FACILITATOR_TEXT_MAX = 256;
|
|
1230
1266
|
var CARD_REFUND_COUNTS = /* @__PURE__ */ new Set(["frozen", "unfrozen", "expiry_refunds", "completed", "pending", "stranded_refunds"]);
|
|
1231
1267
|
var CARD_REFUND_STAGES = /* @__PURE__ */ new Set(["plan", "refund", "disputes", "expiry", "retry", "stranded"]);
|
|
1232
1268
|
var CARD_REFUND_STATUSES = /* @__PURE__ */ new Set(["planned", "pending", "requires_action", "succeeded", "failed", "canceled", "rejected"]);
|
|
@@ -1401,10 +1437,23 @@ function projectField(key, value, dataset, authority, identityAuthority, eventNa
|
|
|
1401
1437
|
const closedEnum = Object.hasOwn(PAYMENT_ENUMS, key) ? PAYMENT_ENUMS[key] : Object.hasOwn(ROUTER_ENUMS, key) ? ROUTER_ENUMS[key] : void 0;
|
|
1402
1438
|
if (closedEnum)
|
|
1403
1439
|
return typeof value === "string" && closedEnum.has(value) ? value : void 0;
|
|
1440
|
+
if (eventName === "lightning_receive_allow_spend_enabled") {
|
|
1441
|
+
if (key === "override")
|
|
1442
|
+
return value === "DVMKIT_NWC_RECEIVE_ALLOW_SPEND=true" ? value : void 0;
|
|
1443
|
+
if (key === "excess_methods" && Array.isArray(value)) {
|
|
1444
|
+
return [...new Set(ownDataEntries(value, 64).filter(([key2]) => /^(?:0|[1-9]\d*)$/.test(key2)).map(
|
|
1445
|
+
([, method]) => typeof method === "string" && NWC_EXCESS_METHODS.has(method) ? method : "unknown_method"
|
|
1446
|
+
))];
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1404
1449
|
if (eventName !== void 0 && CARD_REFUND_EVENTS.has(eventName)) {
|
|
1405
1450
|
const projected = projectCardRefundField(key, value);
|
|
1406
1451
|
if (projected !== void 0) return projected;
|
|
1407
1452
|
}
|
|
1453
|
+
if (eventName !== void 0 && X402_FACILITATOR_EVENTS.has(eventName)) {
|
|
1454
|
+
const projected = projectFacilitatorField(key, value);
|
|
1455
|
+
if (projected !== void 0) return projected;
|
|
1456
|
+
}
|
|
1408
1457
|
if (dataset === "tempo") {
|
|
1409
1458
|
if (key === "prior_status")
|
|
1410
1459
|
return typeof value === "string" && TEMPO_CLOSE_REPORT_PRIOR_STATUSES.has(value) ? value : void 0;
|
|
@@ -1458,6 +1507,8 @@ function projectField(key, value, dataset, authority, identityAuthority, eventNa
|
|
|
1458
1507
|
}
|
|
1459
1508
|
if (key === "rail")
|
|
1460
1509
|
return typeof value === "string" && RAILS.has(value) ? value : void 0;
|
|
1510
|
+
if (key === "channel")
|
|
1511
|
+
return typeof value === "string" && CAPABILITY_CHANNELS.has(value) ? value : void 0;
|
|
1461
1512
|
if (key === "stage")
|
|
1462
1513
|
return typeof value === "string" && STAGES.has(value) ? value : void 0;
|
|
1463
1514
|
if (key === "handler")
|
|
@@ -1486,6 +1537,17 @@ function projectField(key, value, dataset, authority, identityAuthority, eventNa
|
|
|
1486
1537
|
return typeof value === "string" && SANCTIONS_REGIONS.has(value) ? value : void 0;
|
|
1487
1538
|
return void 0;
|
|
1488
1539
|
}
|
|
1540
|
+
function projectFacilitatorField(key, value) {
|
|
1541
|
+
if (key === "extension" || key === "extension_status") {
|
|
1542
|
+
return typeof value === "string" && /^[A-Za-z][A-Za-z0-9_.-]{0,63}$/.test(value) ? value : void 0;
|
|
1543
|
+
}
|
|
1544
|
+
if (key === "extension_rejected_reason" || key === "facilitator_message") {
|
|
1545
|
+
if (typeof value !== "string") return void 0;
|
|
1546
|
+
const text = value.replace(/[^\x20-\x7e]+/g, " ").trim().slice(0, FACILITATOR_TEXT_MAX);
|
|
1547
|
+
return text === "" ? void 0 : text;
|
|
1548
|
+
}
|
|
1549
|
+
return void 0;
|
|
1550
|
+
}
|
|
1489
1551
|
function projectCardRefundField(key, value) {
|
|
1490
1552
|
if (key === "credit_id" || key === "drain_id" || key === "challenge_id")
|
|
1491
1553
|
return typeof value === "string" && /^[a-zA-Z0-9_.:-]{1,512}$/.test(value) ? value : void 0;
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
authorizeProtectedRemoval,
|
|
6
6
|
loadConfig,
|
|
7
7
|
updateConfig
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ESQ6DCS3.js";
|
|
9
9
|
import {
|
|
10
10
|
withX402ChannelLock,
|
|
11
11
|
x402WalletFromConfig
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-THTPKBZX.js";
|
|
13
13
|
import {
|
|
14
14
|
DvmError,
|
|
15
15
|
X402_DEFAULT_NETWORK,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
ensureAddress,
|
|
18
18
|
isValidEvmPrivateKey,
|
|
19
19
|
x402NetworkByCaip2
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-DGA5EFKU.js";
|
|
21
21
|
|
|
22
22
|
// src/lib/x402/networks.ts
|
|
23
23
|
function x402NetworkLabel(network) {
|
|
@@ -58,7 +58,7 @@ async function repinX402WalletNetwork(network) {
|
|
|
58
58
|
const privateKey = current.x402?.privateKey;
|
|
59
59
|
if (privateKey === void 0) throw x402WalletMissingError();
|
|
60
60
|
if (!isValidEvmPrivateKey(privateKey)) throw invalidX402PrivateKey();
|
|
61
|
-
return { set: { x402: { privateKey, network } } };
|
|
61
|
+
return { set: { x402: { privateKey, network, ...current.x402?.generated === true ? { generated: true } : {} } } };
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
64
|
const stored = previous?.x402;
|
|
@@ -72,7 +72,7 @@ async function repinX402WalletNetwork(network) {
|
|
|
72
72
|
};
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
-
async function saveX402Wallet(privateKey, network) {
|
|
75
|
+
async function saveX402Wallet(privateKey, network, generated = false) {
|
|
76
76
|
if (network !== void 0) assertSupportedX402Network(network);
|
|
77
77
|
if (!isValidEvmPrivateKey(privateKey)) throw invalidX402PrivateKey();
|
|
78
78
|
const { privateKeyToAccount } = await import("./accounts-2WZE4N5F.js");
|
|
@@ -83,7 +83,7 @@ async function saveX402Wallet(privateKey, network) {
|
|
|
83
83
|
patch: (current) => {
|
|
84
84
|
resolved = network ?? current?.x402?.network;
|
|
85
85
|
return {
|
|
86
|
-
set: { x402: resolved === void 0 ? {
|
|
86
|
+
set: { x402: { privateKey, ...resolved === void 0 ? {} : { network: resolved }, ...generated ? { generated: true } : {} } }
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
89
|
});
|
|
@@ -3,7 +3,7 @@ import { createRequire as __dvmCreateRequire } from "node:module";
|
|
|
3
3
|
const require = __dvmCreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
connectedTempoAccount
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OEWENVJ7.js";
|
|
7
7
|
import {
|
|
8
8
|
deriveIdentityFromPrivkey,
|
|
9
9
|
formatUsdcMicrounits,
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
reconcileTempoChannelOnChain,
|
|
14
14
|
shellQuoteArg,
|
|
15
15
|
tempoChannelControlledBy
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-THTPKBZX.js";
|
|
17
17
|
import {
|
|
18
18
|
DvmError
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-DGA5EFKU.js";
|
|
20
20
|
|
|
21
21
|
// src/lib/cli-identity-resolve.ts
|
|
22
22
|
function resolveSigningIdentity(opts) {
|
|
@@ -3,8 +3,8 @@ import { createRequire as __dvmCreateRequire } from "node:module";
|
|
|
3
3
|
const require = __dvmCreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
tryX402Payment
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-R6FZT6S2.js";
|
|
7
|
+
import "./chunk-THTPKBZX.js";
|
|
8
8
|
import "./chunk-JBU7RKQ3.js";
|
|
9
9
|
import "./chunk-KDNFUDOG.js";
|
|
10
10
|
import "./chunk-IUTVV6N5.js";
|
|
@@ -13,11 +13,11 @@ import "./chunk-6LP4EGKA.js";
|
|
|
13
13
|
import "./chunk-N3UJT2NJ.js";
|
|
14
14
|
import "./chunk-SYFKO6BA.js";
|
|
15
15
|
import "./chunk-PUOXBKY2.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-DGA5EFKU.js";
|
|
17
|
+
import "./chunk-A2B7QDMS.js";
|
|
18
|
+
import "./chunk-IK7RI645.js";
|
|
19
19
|
import "./chunk-R2DSAZBO.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-UFMAHF6T.js";
|
|
21
21
|
import "./chunk-EVQERRCP.js";
|
|
22
22
|
import "./chunk-RA24J4QM.js";
|
|
23
23
|
import "./chunk-B4WHUMZM.js";
|