@dvmkit/dvm-cli 0.5.0 → 0.7.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- 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-QICJRKB7.js → chunk-32AOWN2U.js} +11032 -12469
- package/dist/chunk-3E4LW5R5.js +77 -0
- package/dist/chunk-5RVUW52C.js +122 -0
- package/dist/{chunk-MJ4X4BEW.js → chunk-6LP4EGKA.js} +61 -61
- package/dist/chunk-6PVFVHS5.js +5460 -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-MWWZX7OQ.js +262 -0
- package/dist/chunk-PATIATFK.js +765 -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-SNSJAOR3.js +43 -0
- package/dist/{chunk-FL2ICZW5.js → chunk-SYFKO6BA.js} +3 -3
- package/dist/{chunk-LH3QPVN6.js → chunk-TAZWRWM4.js} +8060 -8058
- package/dist/chunk-VIRAAIDU.js +409 -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/{client-RYDA62DU.js → client-6IHIUB6J.js} +10 -10
- package/dist/client-VHGN7ZFZ.js +36 -0
- package/dist/{dist-GKCEIY2A.js → dist-23E7OOCA.js} +9 -9
- package/dist/dvm.js +2844 -623
- package/dist/{internal-INUTGTXQ.js → internal-7RZYJLLG.js} +325 -508
- package/dist/lifecycle-Z7YUOTR5.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-CCWF3G4N.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-OT75TYVA.js +38 -0
- package/dist/tempo-wallet-SGYOEWVY.js +43 -0
- package/dist/wallet-BRXTQ4BB.js +45 -0
- package/dist/{x402-R6HPBY5D-VMSW7Z32.js → x402-ZU4GML7Z-RYEACIIT.js} +4 -19
- package/package.json +4 -2
- package/skills/dvm/credit.md +4 -0
- package/skills/dvm/wallets.md +4 -0
- 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
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __dvmCreateRequire } from "node:module";
|
|
3
|
+
const require = __dvmCreateRequire(import.meta.url);
|
|
4
|
+
import {
|
|
5
|
+
assertX402WalletIdle
|
|
6
|
+
} from "./chunk-SNSJAOR3.js";
|
|
7
|
+
import "./chunk-32AOWN2U.js";
|
|
8
|
+
import "./chunk-JBU7RKQ3.js";
|
|
9
|
+
import "./chunk-KDNFUDOG.js";
|
|
10
|
+
import "./chunk-IUTVV6N5.js";
|
|
11
|
+
import "./chunk-Y3SQD37C.js";
|
|
12
|
+
import "./chunk-6LP4EGKA.js";
|
|
13
|
+
import "./chunk-N3UJT2NJ.js";
|
|
14
|
+
import "./chunk-SYFKO6BA.js";
|
|
15
|
+
import "./chunk-PUOXBKY2.js";
|
|
16
|
+
import "./chunk-JTMBSEZO.js";
|
|
17
|
+
import "./chunk-IQV4KG63.js";
|
|
18
|
+
import "./chunk-FPWP4S5S.js";
|
|
19
|
+
import "./chunk-R2DSAZBO.js";
|
|
20
|
+
import "./chunk-WN5R367B.js";
|
|
21
|
+
import "./chunk-EVQERRCP.js";
|
|
22
|
+
import "./chunk-RA24J4QM.js";
|
|
23
|
+
import "./chunk-B4WHUMZM.js";
|
|
24
|
+
import "./chunk-X7SEGALJ.js";
|
|
25
|
+
import "./chunk-ESOJUXVY.js";
|
|
26
|
+
import "./chunk-QXMKABL7.js";
|
|
27
|
+
import "./chunk-TAZWRWM4.js";
|
|
28
|
+
import "./chunk-6O27TEXD.js";
|
|
29
|
+
import "./chunk-65EY7CT4.js";
|
|
30
|
+
import "./chunk-FOWQ7R7S.js";
|
|
31
|
+
import "./chunk-MLDUKBU3.js";
|
|
32
|
+
import "./chunk-7OK7MBT6.js";
|
|
33
|
+
import "./chunk-IYHTITNZ.js";
|
|
34
|
+
export {
|
|
35
|
+
assertX402WalletIdle
|
|
36
|
+
};
|
|
@@ -6,8 +6,9 @@ import {
|
|
|
6
6
|
PAYOUT_SNAPSHOT_INTERVAL_MS,
|
|
7
7
|
PayoutReporter,
|
|
8
8
|
PostgresX402BatchStore
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-FPWP4S5S.js";
|
|
10
|
+
import "./chunk-R2DSAZBO.js";
|
|
11
|
+
import "./chunk-WN5R367B.js";
|
|
11
12
|
import "./chunk-IYHTITNZ.js";
|
|
12
13
|
export {
|
|
13
14
|
MemoryX402BatchStore,
|
|
@@ -3,55 +3,58 @@ import { createRequire as __dvmCreateRequire } from "node:module";
|
|
|
3
3
|
const require = __dvmCreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
assertFloatBudget,
|
|
6
|
-
effectiveFundingMint,
|
|
7
|
-
effectiveMints,
|
|
8
6
|
emitFloatBudgetWarning,
|
|
9
7
|
floatPaymentDisplay,
|
|
10
8
|
fundAgentWallet,
|
|
11
|
-
loadAgentWallet,
|
|
12
9
|
loadFloat,
|
|
13
|
-
microToSats,
|
|
14
|
-
msatsToMicro,
|
|
15
10
|
needsPocketRefill,
|
|
16
11
|
payViaFloat,
|
|
17
12
|
pocketTargetMicro,
|
|
18
13
|
recordFloatSpend,
|
|
19
14
|
resolveFundMint,
|
|
20
15
|
sweepPendingMints
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-ID5G54HJ.js";
|
|
24
|
-
import "./chunk-TZWZTS37.js";
|
|
16
|
+
} from "./chunk-6PVFVHS5.js";
|
|
17
|
+
import "./chunk-5RVUW52C.js";
|
|
25
18
|
import {
|
|
26
19
|
info,
|
|
27
20
|
tryResolveBtcUsdRate
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-Z4CZUMUT.js";
|
|
31
|
-
import "./chunk-ERJFRCJO.js";
|
|
32
|
-
import "./chunk-R55XNXAR.js";
|
|
33
|
-
import "./chunk-XHOFQ3OS.js";
|
|
34
|
-
import "./chunk-MJ4X4BEW.js";
|
|
35
|
-
import "./chunk-BECPI5H5.js";
|
|
36
|
-
import "./chunk-N3UJT2NJ.js";
|
|
37
|
-
import "./chunk-FL2ICZW5.js";
|
|
38
|
-
import "./chunk-WTM2EICO.js";
|
|
39
|
-
import "./chunk-EZHT2RLJ.js";
|
|
40
|
-
import {
|
|
41
|
-
formatUsd
|
|
42
|
-
} from "./chunk-VOO5IAK7.js";
|
|
43
|
-
import "./chunk-3YE43JJR.js";
|
|
21
|
+
} from "./chunk-VIRAAIDU.js";
|
|
22
|
+
import "./chunk-3E4LW5R5.js";
|
|
44
23
|
import {
|
|
45
24
|
loadConfig
|
|
46
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-PATIATFK.js";
|
|
26
|
+
import {
|
|
27
|
+
effectiveFundingMint,
|
|
28
|
+
effectiveMints,
|
|
29
|
+
formatUsd,
|
|
30
|
+
loadAgentWallet
|
|
31
|
+
} from "./chunk-32AOWN2U.js";
|
|
32
|
+
import "./chunk-JBU7RKQ3.js";
|
|
33
|
+
import "./chunk-KDNFUDOG.js";
|
|
34
|
+
import "./chunk-IUTVV6N5.js";
|
|
35
|
+
import "./chunk-Y3SQD37C.js";
|
|
36
|
+
import "./chunk-6LP4EGKA.js";
|
|
37
|
+
import "./chunk-N3UJT2NJ.js";
|
|
38
|
+
import "./chunk-SYFKO6BA.js";
|
|
39
|
+
import "./chunk-PUOXBKY2.js";
|
|
40
|
+
import {
|
|
41
|
+
microToSats,
|
|
42
|
+
msatsToMicro
|
|
43
|
+
} from "./chunk-JTMBSEZO.js";
|
|
44
|
+
import "./chunk-IQV4KG63.js";
|
|
45
|
+
import "./chunk-FPWP4S5S.js";
|
|
46
|
+
import "./chunk-R2DSAZBO.js";
|
|
47
|
+
import "./chunk-WN5R367B.js";
|
|
47
48
|
import "./chunk-EVQERRCP.js";
|
|
48
49
|
import "./chunk-RA24J4QM.js";
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-B4WHUMZM.js";
|
|
51
|
+
import "./chunk-X7SEGALJ.js";
|
|
52
|
+
import "./chunk-ESOJUXVY.js";
|
|
53
|
+
import "./chunk-QXMKABL7.js";
|
|
54
|
+
import "./chunk-TAZWRWM4.js";
|
|
52
55
|
import "./chunk-6O27TEXD.js";
|
|
53
56
|
import "./chunk-65EY7CT4.js";
|
|
54
|
-
import "./chunk-
|
|
57
|
+
import "./chunk-FOWQ7R7S.js";
|
|
55
58
|
import "./chunk-MLDUKBU3.js";
|
|
56
59
|
import "./chunk-7OK7MBT6.js";
|
|
57
60
|
import "./chunk-IYHTITNZ.js";
|
package/dist/{revenue-reporter-MAERPYGK-CCPZXGFA.js → revenue-reporter-7UR3W2SD-C5OMRGK3.js}
RENAMED
|
@@ -3,8 +3,9 @@ import { createRequire as __dvmCreateRequire } from "node:module";
|
|
|
3
3
|
const require = __dvmCreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
RevenueReporter
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-IQV4KG63.js";
|
|
7
|
+
import "./chunk-R2DSAZBO.js";
|
|
8
|
+
import "./chunk-WN5R367B.js";
|
|
8
9
|
import "./chunk-IYHTITNZ.js";
|
|
9
10
|
export {
|
|
10
11
|
RevenueReporter
|
|
@@ -6,22 +6,22 @@ import {
|
|
|
6
6
|
legacy_exports,
|
|
7
7
|
session_exports,
|
|
8
8
|
subscription_exports
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-JBU7RKQ3.js";
|
|
10
|
+
import "./chunk-IUTVV6N5.js";
|
|
11
11
|
import {
|
|
12
12
|
Methods_exports
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-BECPI5H5.js";
|
|
13
|
+
} from "./chunk-6LP4EGKA.js";
|
|
15
14
|
import "./chunk-N3UJT2NJ.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-EZHT2RLJ.js";
|
|
15
|
+
import "./chunk-PUOXBKY2.js";
|
|
18
16
|
import "./chunk-EVQERRCP.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-B4WHUMZM.js";
|
|
18
|
+
import "./chunk-X7SEGALJ.js";
|
|
19
|
+
import "./chunk-ESOJUXVY.js";
|
|
20
|
+
import "./chunk-QXMKABL7.js";
|
|
21
|
+
import "./chunk-TAZWRWM4.js";
|
|
22
22
|
import "./chunk-6O27TEXD.js";
|
|
23
23
|
import "./chunk-65EY7CT4.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-FOWQ7R7S.js";
|
|
25
25
|
import "./chunk-MLDUKBU3.js";
|
|
26
26
|
import "./chunk-7OK7MBT6.js";
|
|
27
27
|
import "./chunk-IYHTITNZ.js";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __dvmCreateRequire } from "node:module";
|
|
3
|
+
const require = __dvmCreateRequire(import.meta.url);
|
|
4
|
+
import {
|
|
5
|
+
assertTempoWalletIdle
|
|
6
|
+
} from "./chunk-MWWZX7OQ.js";
|
|
7
|
+
import "./chunk-3E4LW5R5.js";
|
|
8
|
+
import "./chunk-PATIATFK.js";
|
|
9
|
+
import "./chunk-32AOWN2U.js";
|
|
10
|
+
import "./chunk-JBU7RKQ3.js";
|
|
11
|
+
import "./chunk-KDNFUDOG.js";
|
|
12
|
+
import "./chunk-IUTVV6N5.js";
|
|
13
|
+
import "./chunk-Y3SQD37C.js";
|
|
14
|
+
import "./chunk-6LP4EGKA.js";
|
|
15
|
+
import "./chunk-N3UJT2NJ.js";
|
|
16
|
+
import "./chunk-SYFKO6BA.js";
|
|
17
|
+
import "./chunk-PUOXBKY2.js";
|
|
18
|
+
import "./chunk-JTMBSEZO.js";
|
|
19
|
+
import "./chunk-IQV4KG63.js";
|
|
20
|
+
import "./chunk-FPWP4S5S.js";
|
|
21
|
+
import "./chunk-R2DSAZBO.js";
|
|
22
|
+
import "./chunk-WN5R367B.js";
|
|
23
|
+
import "./chunk-EVQERRCP.js";
|
|
24
|
+
import "./chunk-RA24J4QM.js";
|
|
25
|
+
import "./chunk-B4WHUMZM.js";
|
|
26
|
+
import "./chunk-X7SEGALJ.js";
|
|
27
|
+
import "./chunk-ESOJUXVY.js";
|
|
28
|
+
import "./chunk-QXMKABL7.js";
|
|
29
|
+
import "./chunk-TAZWRWM4.js";
|
|
30
|
+
import "./chunk-6O27TEXD.js";
|
|
31
|
+
import "./chunk-65EY7CT4.js";
|
|
32
|
+
import "./chunk-FOWQ7R7S.js";
|
|
33
|
+
import "./chunk-MLDUKBU3.js";
|
|
34
|
+
import "./chunk-7OK7MBT6.js";
|
|
35
|
+
import "./chunk-IYHTITNZ.js";
|
|
36
|
+
export {
|
|
37
|
+
assertTempoWalletIdle
|
|
38
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __dvmCreateRequire } from "node:module";
|
|
3
|
+
const require = __dvmCreateRequire(import.meta.url);
|
|
4
|
+
import {
|
|
5
|
+
connectedTempoAccount,
|
|
6
|
+
generateTempoKey,
|
|
7
|
+
tempoBalanceCheckHint,
|
|
8
|
+
tempoWrongAssetHint
|
|
9
|
+
} from "./chunk-3E4LW5R5.js";
|
|
10
|
+
import "./chunk-PATIATFK.js";
|
|
11
|
+
import "./chunk-32AOWN2U.js";
|
|
12
|
+
import "./chunk-JBU7RKQ3.js";
|
|
13
|
+
import "./chunk-KDNFUDOG.js";
|
|
14
|
+
import "./chunk-IUTVV6N5.js";
|
|
15
|
+
import "./chunk-Y3SQD37C.js";
|
|
16
|
+
import "./chunk-6LP4EGKA.js";
|
|
17
|
+
import "./chunk-N3UJT2NJ.js";
|
|
18
|
+
import "./chunk-SYFKO6BA.js";
|
|
19
|
+
import "./chunk-PUOXBKY2.js";
|
|
20
|
+
import "./chunk-JTMBSEZO.js";
|
|
21
|
+
import "./chunk-IQV4KG63.js";
|
|
22
|
+
import "./chunk-FPWP4S5S.js";
|
|
23
|
+
import "./chunk-R2DSAZBO.js";
|
|
24
|
+
import "./chunk-WN5R367B.js";
|
|
25
|
+
import "./chunk-EVQERRCP.js";
|
|
26
|
+
import "./chunk-RA24J4QM.js";
|
|
27
|
+
import "./chunk-B4WHUMZM.js";
|
|
28
|
+
import "./chunk-X7SEGALJ.js";
|
|
29
|
+
import "./chunk-ESOJUXVY.js";
|
|
30
|
+
import "./chunk-QXMKABL7.js";
|
|
31
|
+
import "./chunk-TAZWRWM4.js";
|
|
32
|
+
import "./chunk-6O27TEXD.js";
|
|
33
|
+
import "./chunk-65EY7CT4.js";
|
|
34
|
+
import "./chunk-FOWQ7R7S.js";
|
|
35
|
+
import "./chunk-MLDUKBU3.js";
|
|
36
|
+
import "./chunk-7OK7MBT6.js";
|
|
37
|
+
import "./chunk-IYHTITNZ.js";
|
|
38
|
+
export {
|
|
39
|
+
connectedTempoAccount,
|
|
40
|
+
generateTempoKey,
|
|
41
|
+
tempoBalanceCheckHint,
|
|
42
|
+
tempoWrongAssetHint
|
|
43
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __dvmCreateRequire } from "node:module";
|
|
3
|
+
const require = __dvmCreateRequire(import.meta.url);
|
|
4
|
+
import {
|
|
5
|
+
connectedX402Payer,
|
|
6
|
+
loadX402Wallet,
|
|
7
|
+
removeX402Wallet,
|
|
8
|
+
repinX402WalletNetwork,
|
|
9
|
+
saveX402Wallet
|
|
10
|
+
} from "./chunk-5RVUW52C.js";
|
|
11
|
+
import "./chunk-PATIATFK.js";
|
|
12
|
+
import "./chunk-32AOWN2U.js";
|
|
13
|
+
import "./chunk-JBU7RKQ3.js";
|
|
14
|
+
import "./chunk-KDNFUDOG.js";
|
|
15
|
+
import "./chunk-IUTVV6N5.js";
|
|
16
|
+
import "./chunk-Y3SQD37C.js";
|
|
17
|
+
import "./chunk-6LP4EGKA.js";
|
|
18
|
+
import "./chunk-N3UJT2NJ.js";
|
|
19
|
+
import "./chunk-SYFKO6BA.js";
|
|
20
|
+
import "./chunk-PUOXBKY2.js";
|
|
21
|
+
import "./chunk-JTMBSEZO.js";
|
|
22
|
+
import "./chunk-IQV4KG63.js";
|
|
23
|
+
import "./chunk-FPWP4S5S.js";
|
|
24
|
+
import "./chunk-R2DSAZBO.js";
|
|
25
|
+
import "./chunk-WN5R367B.js";
|
|
26
|
+
import "./chunk-EVQERRCP.js";
|
|
27
|
+
import "./chunk-RA24J4QM.js";
|
|
28
|
+
import "./chunk-B4WHUMZM.js";
|
|
29
|
+
import "./chunk-X7SEGALJ.js";
|
|
30
|
+
import "./chunk-ESOJUXVY.js";
|
|
31
|
+
import "./chunk-QXMKABL7.js";
|
|
32
|
+
import "./chunk-TAZWRWM4.js";
|
|
33
|
+
import "./chunk-6O27TEXD.js";
|
|
34
|
+
import "./chunk-65EY7CT4.js";
|
|
35
|
+
import "./chunk-FOWQ7R7S.js";
|
|
36
|
+
import "./chunk-MLDUKBU3.js";
|
|
37
|
+
import "./chunk-7OK7MBT6.js";
|
|
38
|
+
import "./chunk-IYHTITNZ.js";
|
|
39
|
+
export {
|
|
40
|
+
connectedX402Payer,
|
|
41
|
+
loadX402Wallet,
|
|
42
|
+
removeX402Wallet,
|
|
43
|
+
repinX402WalletNetwork,
|
|
44
|
+
saveX402Wallet
|
|
45
|
+
};
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
buildPaymentRequirements,
|
|
13
13
|
caip2ToX402Network,
|
|
14
14
|
chainIdFromCaip2,
|
|
15
|
-
connectedX402Payer,
|
|
16
15
|
decodePayment,
|
|
17
16
|
decodePaymentRequiredHeader,
|
|
18
17
|
encodePayment,
|
|
@@ -22,24 +21,17 @@ import {
|
|
|
22
21
|
exactEvmAuthorization,
|
|
23
22
|
generateX402PrivateKey,
|
|
24
23
|
getX402Balance,
|
|
25
|
-
loadX402Wallet,
|
|
26
24
|
paymentRequiredV2FromV1,
|
|
27
|
-
removeX402Wallet,
|
|
28
|
-
repinX402WalletNetwork,
|
|
29
25
|
resolveX402Asset,
|
|
30
|
-
saveX402Wallet,
|
|
31
|
-
tryX402Payment,
|
|
32
26
|
usdcContractByCaip2,
|
|
33
27
|
verifyX402Payment,
|
|
34
28
|
x402NetworkByCaip2,
|
|
35
29
|
x402NetworkLabel,
|
|
36
30
|
x402NetworkListForCopy,
|
|
37
31
|
x402NetworkToCaip2,
|
|
38
|
-
x402SupportedNetworksHint
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
import "./chunk-VOO5IAK7.js";
|
|
42
|
-
import "./chunk-4KINCBHL.js";
|
|
32
|
+
x402SupportedNetworksHint
|
|
33
|
+
} from "./chunk-JTMBSEZO.js";
|
|
34
|
+
import "./chunk-WN5R367B.js";
|
|
43
35
|
import "./chunk-IYHTITNZ.js";
|
|
44
36
|
export {
|
|
45
37
|
X402_DEFAULT_FACILITATOR,
|
|
@@ -52,7 +44,6 @@ export {
|
|
|
52
44
|
buildPaymentRequirements,
|
|
53
45
|
caip2ToX402Network,
|
|
54
46
|
chainIdFromCaip2,
|
|
55
|
-
connectedX402Payer,
|
|
56
47
|
decodePayment,
|
|
57
48
|
decodePaymentRequiredHeader,
|
|
58
49
|
encodePayment,
|
|
@@ -62,19 +53,13 @@ export {
|
|
|
62
53
|
exactEvmAuthorization,
|
|
63
54
|
generateX402PrivateKey,
|
|
64
55
|
getX402Balance,
|
|
65
|
-
loadX402Wallet,
|
|
66
56
|
paymentRequiredV2FromV1,
|
|
67
|
-
removeX402Wallet,
|
|
68
|
-
repinX402WalletNetwork,
|
|
69
57
|
resolveX402Asset,
|
|
70
|
-
saveX402Wallet,
|
|
71
|
-
tryX402Payment,
|
|
72
58
|
usdcContractByCaip2,
|
|
73
59
|
verifyX402Payment,
|
|
74
60
|
x402NetworkByCaip2,
|
|
75
61
|
x402NetworkLabel,
|
|
76
62
|
x402NetworkListForCopy,
|
|
77
63
|
x402NetworkToCaip2,
|
|
78
|
-
x402SupportedNetworksHint
|
|
79
|
-
x402WrongAssetHint
|
|
64
|
+
x402SupportedNetworksHint
|
|
80
65
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dvmkit/dvm-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0-rc.1",
|
|
4
4
|
"description": "CLI for Digital Vending Machines — discover, pay, and use DVMs from the terminal",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@cashu/cashu-ts": "4.10.2",
|
|
53
|
-
"@dvmkit/sdk": "0.
|
|
53
|
+
"@dvmkit/sdk": "0.7.0-rc.2",
|
|
54
54
|
"@x402/evm": "2.21.0",
|
|
55
55
|
"commander": "14.0.3",
|
|
56
56
|
"mppx": "0.8.15",
|
|
@@ -67,12 +67,14 @@
|
|
|
67
67
|
"@types/node": "25.3.4",
|
|
68
68
|
"@types/proper-lockfile": "4.1.4",
|
|
69
69
|
"@types/qrcode": "1.5.6",
|
|
70
|
+
"@types/ws": "8.18.1",
|
|
70
71
|
"eslint": "10.9.1",
|
|
71
72
|
"globals": "17.11.0",
|
|
72
73
|
"tsup": "8.5.1",
|
|
73
74
|
"typescript": "5.9.3",
|
|
74
75
|
"typescript-eslint": "8.68.0",
|
|
75
76
|
"vitest": "4.1.10",
|
|
77
|
+
"ws": "8.21.0",
|
|
76
78
|
"yaml": "2.9.0"
|
|
77
79
|
}
|
|
78
80
|
}
|
package/skills/dvm/credit.md
CHANGED
|
@@ -27,3 +27,7 @@ To reclaim unused credit, inspect the balance and use `dvm credit drain <dvm>` w
|
|
|
27
27
|
If the provider cannot answer, the available recovery depends on the original funding instrument. Channel exits can recover remaining collateral after the required delay; one-payment funding may depend on a provider refund. Follow [recovery](recovery.md) and the published contract before promising an amount or a completion time. Expiry alone is not proof of a refund or continued recoverability.
|
|
28
28
|
|
|
29
29
|
Success means the selected credit can fund the intended jobs, the posture matches the user's authorization, or the reclaim has a verified result. Keep pending obligations explicit. Exact flags, posture scope, expiry, and settlement behavior live in [credits](https://dvmkit.com/docs/credits.md).
|
|
30
|
+
|
|
31
|
+
## Keep offline reclaim evidence
|
|
32
|
+
|
|
33
|
+
Read `dvm credit receipts <dvm>` or export with `--export`; archived completed refunds remain available after the working projection drops older bundles. Keep the original caller signing identity and endpoint. Exports preserve signed receipts and their pinned builder anchor for offline verification, with native settlement fields and honest unknowns. A local settlement timestamp is an unsigned observation, separate from receipt authentication. Unsupported receipt or identity fields fail export rather than stripping signed fields or exposing recovery credentials; use `--drain-id` to select a supported bundle. Pending recovery stays pending and belongs in the recovery procedure.
|
package/skills/dvm/wallets.md
CHANGED
|
@@ -27,3 +27,7 @@ If funding or settlement is uncertain, keep its records and enter [recovery](rec
|
|
|
27
27
|
For disposable tests, use a separate `DVM_CONFIG_DIR` and explicitly select a supported test network. A development server or fresh config does not make funds fake. Keep the test state until payments and refunds are resolved; never replace the user's normal configuration with it.
|
|
28
28
|
|
|
29
29
|
Success means the intended wallet is connected on the intended network and its observed balance can fund the authorized task. Return to [calling](calling.md) or [credit](credit.md). For connection options, funding rails, and withdrawal procedures, read [wallets](https://dvmkit.com/docs/wallets.md) and [budgets](https://dvmkit.com/docs/budgets.md).
|
|
30
|
+
|
|
31
|
+
## Audit local history
|
|
32
|
+
|
|
33
|
+
Use `dvm wallet history` for durable spending, completed refunds/losses, and active recovery. `total_usd` is the displayed page's budget valuation, including funding once; draws, refunds, losses, and recovery do not add another outflow. A BTC-equivalent valuation does not establish the native payment rail. Preserve unknown currency and fee fields. Continue with `next_cursor` and the same filters; a stale continuation requires restarting, while `--offset` assumes unchanged records. History reads scan the retained archive even when the output page is short.
|
package/dist/chunk-3YE43JJR.js
DELETED
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __dvmCreateRequire } from "node:module";
|
|
3
|
-
const require = __dvmCreateRequire(import.meta.url);
|
|
4
|
-
import {
|
|
5
|
-
DvmError,
|
|
6
|
-
isValidEvmPrivateKey,
|
|
7
|
-
loadConfig,
|
|
8
|
-
redactUrl,
|
|
9
|
-
redactUrlsInText,
|
|
10
|
-
resolveRpcHttpTransportOptions,
|
|
11
|
-
resolveRpcOverride,
|
|
12
|
-
updateConfig
|
|
13
|
-
} from "./chunk-4KINCBHL.js";
|
|
14
|
-
|
|
15
|
-
// node_modules/@dvmkit/sdk/dist/chunk-GFY5FRX3.js
|
|
16
|
-
var TEMPO_USDC_MAINNET = "0x20C000000000000000000000b9537d11c60E8b50";
|
|
17
|
-
var TEMPO_CHAIN_ID = 4217;
|
|
18
|
-
var TEMPO_MODERATO_CHAIN_ID = 42431;
|
|
19
|
-
var TEMPO_PATH_USD_MODERATO = "0x20c0000000000000000000000000000000000000";
|
|
20
|
-
var TEMPO_MODERATO_RPC = "https://rpc.moderato.tempo.xyz";
|
|
21
|
-
function resolveTempoNetwork(network = "mainnet") {
|
|
22
|
-
return network === "moderato" ? {
|
|
23
|
-
network,
|
|
24
|
-
chainId: TEMPO_MODERATO_CHAIN_ID,
|
|
25
|
-
rpcUrl: TEMPO_MODERATO_RPC,
|
|
26
|
-
defaultToken: TEMPO_PATH_USD_MODERATO
|
|
27
|
-
} : {
|
|
28
|
-
network,
|
|
29
|
-
chainId: TEMPO_CHAIN_ID,
|
|
30
|
-
rpcUrl: "https://rpc.tempo.xyz",
|
|
31
|
-
defaultToken: TEMPO_USDC_MAINNET
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
function resolveTempoAsset(env = process.env, network = "mainnet") {
|
|
35
|
-
const address = env.DVM_TEMPO_CURRENCY ?? resolveTempoNetwork(network).defaultToken;
|
|
36
|
-
if (!HEX_ADDRESS_RE.test(address)) {
|
|
37
|
-
throw new DvmError(
|
|
38
|
-
"tempo_config_invalid",
|
|
39
|
-
`DVM_TEMPO_CURRENCY must be a 0x-prefixed 40-char hex address; got '${address}'.`,
|
|
40
|
-
"Unset DVM_TEMPO_CURRENCY to fall back to the bundled USDC.e mainnet default."
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
const symbol = tempoTokenSymbol(address);
|
|
44
|
-
return {
|
|
45
|
-
address,
|
|
46
|
-
symbol,
|
|
47
|
-
label: tempoTokenLabel(address),
|
|
48
|
-
unit: symbol ?? "tokens"
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
function tempoTokenLabel(address) {
|
|
52
|
-
return tempoTokenSymbol(address) ?? `the token at ${shortAddress(address)}`;
|
|
53
|
-
}
|
|
54
|
-
function tempoTokenReference(address) {
|
|
55
|
-
const symbol = tempoTokenSymbol(address);
|
|
56
|
-
return symbol ? `${symbol} (${address})` : address;
|
|
57
|
-
}
|
|
58
|
-
function tempoBalanceCheckHint(token) {
|
|
59
|
-
const configured = tryResolveTempoAsset();
|
|
60
|
-
if (configured?.address.toLowerCase() === token.toLowerCase()) {
|
|
61
|
-
return "This channel's token is the rail's configured settlement asset, so 'dvm wallet balance' reads it.";
|
|
62
|
-
}
|
|
63
|
-
return `'dvm wallet balance' reads the rail's configured settlement asset (${configured?.address ?? "unresolvable in this environment"}) rather than this channel's token (${token}), so query that contract directly for the balance that matters here.`;
|
|
64
|
-
}
|
|
65
|
-
function tryResolveTempoAsset(env = process.env) {
|
|
66
|
-
try {
|
|
67
|
-
return resolveTempoAsset(env);
|
|
68
|
-
} catch {
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
function tempoWrongAssetHint(asset) {
|
|
73
|
-
return `This rail settles only in ${asset.label} (${asset.address}) on Tempo. Another Tempo dollar \u2014 USDT0 or any other stablecoin \u2014 is a different contract and will never show up here, however much of it your wallet says you hold. If you funded with the wrong one, swap it to ${asset.label} on Tempo (an on-chain swap, fees are sub-cent) or send ${asset.label} to this address.`;
|
|
74
|
-
}
|
|
75
|
-
function tempoTokenSymbol(address) {
|
|
76
|
-
if (address.toLowerCase() === TEMPO_USDC_MAINNET.toLowerCase()) return "USDC.e";
|
|
77
|
-
if (address.toLowerCase() === TEMPO_PATH_USD_MODERATO.toLowerCase()) return "pathUSD";
|
|
78
|
-
return null;
|
|
79
|
-
}
|
|
80
|
-
var HEX_ADDRESS_RE = /^0x[0-9a-fA-F]{40}$/;
|
|
81
|
-
async function connectedTempoAccount() {
|
|
82
|
-
const config = loadConfig();
|
|
83
|
-
return tempoAccountFromConfig(config);
|
|
84
|
-
}
|
|
85
|
-
async function generateTempoKey(opts = {}) {
|
|
86
|
-
const config = loadConfig();
|
|
87
|
-
if (!config) {
|
|
88
|
-
throw new DvmError(
|
|
89
|
-
"no_config",
|
|
90
|
-
"No config found.",
|
|
91
|
-
"Run `dvm init` before generating a Tempo wallet."
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
const existing = await tempoAccountFromConfig(config);
|
|
95
|
-
if (existing && !opts.force) {
|
|
96
|
-
throw new DvmError(
|
|
97
|
-
"tempo_wallet_exists",
|
|
98
|
-
`Tempo wallet already configured (address ${existing.address}).`,
|
|
99
|
-
"Pass `--force` to replace, or run `dvm wallet tempo-disconnect` to clear it first."
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
if (existing && opts.force) {
|
|
103
|
-
const { assertTempoWalletIdle } = await import("./tempo-lifecycle-ZBBLFBMH-HWI4PLYP.js");
|
|
104
|
-
await assertTempoWalletIdle("replace");
|
|
105
|
-
}
|
|
106
|
-
const { privateKeyToAccount, generatePrivateKey } = await import("./accounts-2WZE4N5F.js");
|
|
107
|
-
const privateKey = generatePrivateKey();
|
|
108
|
-
const account = privateKeyToAccount(privateKey);
|
|
109
|
-
const generated = {
|
|
110
|
-
privateKey,
|
|
111
|
-
address: account.address.toLowerCase(),
|
|
112
|
-
network: opts.network ?? "mainnet"
|
|
113
|
-
};
|
|
114
|
-
await opts.beforePersist?.(generated);
|
|
115
|
-
await updateConfig({
|
|
116
|
-
reason: "tempo_wallet_generate",
|
|
117
|
-
patch: () => ({
|
|
118
|
-
set: {
|
|
119
|
-
tempo: { method: "tempo", apiKey: privateKey, network: generated.network }
|
|
120
|
-
}
|
|
121
|
-
})
|
|
122
|
-
});
|
|
123
|
-
return generated;
|
|
124
|
-
}
|
|
125
|
-
async function getTempoUsdcBalance(account) {
|
|
126
|
-
const accountNetwork = account.network ?? "mainnet";
|
|
127
|
-
const network = resolveTempoNetwork(accountNetwork);
|
|
128
|
-
const tokenAddress = resolveTempoAsset(process.env, accountNetwork).address;
|
|
129
|
-
const { createPublicClient, http, erc20Abi } = await import("./_esm-MN4BUYV6.js");
|
|
130
|
-
const { tempo, tempoModerato } = await import("./chains-LJ7XK6H3.js");
|
|
131
|
-
const chain = accountNetwork === "moderato" ? tempoModerato : tempo;
|
|
132
|
-
const { url: rpcUrl, source: rpcSource } = resolveRpcOverride(
|
|
133
|
-
process.env.DVM_TEMPO_RPC_URL,
|
|
134
|
-
network.rpcUrl
|
|
135
|
-
);
|
|
136
|
-
try {
|
|
137
|
-
const transportOptions = resolveRpcHttpTransportOptions(
|
|
138
|
-
rpcSource,
|
|
139
|
-
process.env.DVM_TEMPO_RPC_HEADERS_JSON
|
|
140
|
-
);
|
|
141
|
-
const client = createPublicClient({
|
|
142
|
-
chain,
|
|
143
|
-
transport: transportOptions ? http(rpcUrl, transportOptions) : http(rpcUrl)
|
|
144
|
-
});
|
|
145
|
-
const raw = await client.readContract({
|
|
146
|
-
address: tokenAddress,
|
|
147
|
-
abi: erc20Abi,
|
|
148
|
-
functionName: "balanceOf",
|
|
149
|
-
args: [account.address]
|
|
150
|
-
});
|
|
151
|
-
return {
|
|
152
|
-
address: account.address,
|
|
153
|
-
rawBaseUnits: raw,
|
|
154
|
-
usdc: Number(raw) / 1e6,
|
|
155
|
-
tokenAddress,
|
|
156
|
-
chainId: network.chainId,
|
|
157
|
-
// redacted here rather than at a display surface, so the clear
|
|
158
|
-
// endpoint never leaves this function on the success path either.
|
|
159
|
-
rpcUrlRedacted: redactUrl(rpcUrl),
|
|
160
|
-
rpcSource,
|
|
161
|
-
fetchedAtMs: Date.now()
|
|
162
|
-
};
|
|
163
|
-
} catch (err) {
|
|
164
|
-
const cause = redactUrlsInText(err instanceof Error ? err.message : String(err));
|
|
165
|
-
throw new DvmError(
|
|
166
|
-
"tempo_rpc_error",
|
|
167
|
-
`Tempo USDC balance lookup failed: ${cause}`,
|
|
168
|
-
// A caller who set the override doesn't need to be told to set it. Which
|
|
169
|
-
// knob is theirs to turn depends on whose endpoint this was.
|
|
170
|
-
rpcSource === "override" ? `DVM_TEMPO_RPC_URL sent this read to ${redactUrl(rpcUrl)}. Correct it, or unset it to fall back to Tempo's bundled endpoint.` : `Verify connectivity to Tempo's bundled endpoint (${redactUrl(rpcUrl)}), or send the read somewhere else with DVM_TEMPO_RPC_URL.`
|
|
171
|
-
);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
async function deriveTempoAddress(privateKey) {
|
|
175
|
-
if (!isValidEvmPrivateKey(privateKey)) throw invalidTempoPrivateKey();
|
|
176
|
-
const { privateKeyToAccount } = await import("./accounts-2WZE4N5F.js");
|
|
177
|
-
return privateKeyToAccount(privateKey).address.toLowerCase();
|
|
178
|
-
}
|
|
179
|
-
function shortAddress(addr) {
|
|
180
|
-
return `${addr.slice(0, 6)}\u2026${addr.slice(-4)}`;
|
|
181
|
-
}
|
|
182
|
-
async function tempoAccountFromConfig(config) {
|
|
183
|
-
if (config?.tempo?.method !== "tempo") return null;
|
|
184
|
-
const apiKey = config.tempo.apiKey;
|
|
185
|
-
if (!apiKey || !isValidEvmPrivateKey(apiKey)) return null;
|
|
186
|
-
const privateKey = apiKey;
|
|
187
|
-
const address = await deriveTempoAddress(privateKey);
|
|
188
|
-
return { privateKey, address, network: config.tempo.network ?? "mainnet" };
|
|
189
|
-
}
|
|
190
|
-
function invalidTempoPrivateKey() {
|
|
191
|
-
return new DvmError(
|
|
192
|
-
"invalid_api_key",
|
|
193
|
-
"A Tempo private key must be a valid 0x-prefixed 32-byte hex secp256k1 private key.",
|
|
194
|
-
"Generate one with `cast wallet new` or `openssl rand -hex 32` (and prepend 0x)."
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
export {
|
|
199
|
-
TEMPO_USDC_MAINNET,
|
|
200
|
-
TEMPO_CHAIN_ID,
|
|
201
|
-
TEMPO_MODERATO_CHAIN_ID,
|
|
202
|
-
TEMPO_PATH_USD_MODERATO,
|
|
203
|
-
TEMPO_MODERATO_RPC,
|
|
204
|
-
resolveTempoNetwork,
|
|
205
|
-
resolveTempoAsset,
|
|
206
|
-
tempoTokenLabel,
|
|
207
|
-
tempoTokenReference,
|
|
208
|
-
tempoBalanceCheckHint,
|
|
209
|
-
tryResolveTempoAsset,
|
|
210
|
-
tempoWrongAssetHint,
|
|
211
|
-
connectedTempoAccount,
|
|
212
|
-
generateTempoKey,
|
|
213
|
-
getTempoUsdcBalance,
|
|
214
|
-
deriveTempoAddress
|
|
215
|
-
};
|