@dvmkit/dvm-cli 0.2.1 → 0.3.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.
@@ -365,7 +365,7 @@ import {
365
365
  x402ReservationRelease,
366
366
  x402SettledShare,
367
367
  x402VoucherPendingRefusal
368
- } from "./chunk-7FUTMGAW.js";
368
+ } from "./chunk-Z75N4GTG.js";
369
369
  import {
370
370
  PayoutReporter
371
371
  } from "./chunk-V2BE4E5V.js";
@@ -444,7 +444,7 @@ import {
444
444
  x402PendingUnsettled,
445
445
  x402SupportedNetworksHint,
446
446
  x402WrongAssetHint
447
- } from "./chunk-XJN5ZDAL.js";
447
+ } from "./chunk-R4MSO2GX.js";
448
448
  import {
449
449
  RevenueReporter
450
450
  } from "./chunk-XN4YSEO6.js";
@@ -486,7 +486,7 @@ import {
486
486
  unreachableRailHint,
487
487
  withIdentitiesLock,
488
488
  withTempoChannelLock
489
- } from "./chunk-5GIU2LBJ.js";
489
+ } from "./chunk-YLWATJ7F.js";
490
490
  import "./chunk-ECEM3ZAS.js";
491
491
  import "./chunk-4NWEJTAW.js";
492
492
  import "./chunk-BECPI5H5.js";
@@ -556,19 +556,23 @@ import {
556
556
  settleDrainEvidence,
557
557
  usdToMsats,
558
558
  usdcToMsats
559
- } from "./chunk-6CC6JGEU.js";
559
+ } from "./chunk-VY277ROG.js";
560
560
  import {
561
561
  TEMPO_CHAIN_ID,
562
+ TEMPO_MODERATO_CHAIN_ID,
563
+ TEMPO_MODERATO_RPC,
564
+ TEMPO_PATH_USD_MODERATO,
562
565
  connectedTempoAccount,
563
566
  deriveTempoAddress,
564
567
  generateTempoKey,
565
568
  getTempoUsdcBalance,
566
569
  resolveTempoAsset,
570
+ resolveTempoNetwork,
567
571
  tempoBalanceCheckHint,
568
572
  tempoTokenReference,
569
573
  tempoWrongAssetHint,
570
574
  tryResolveTempoAsset
571
- } from "./chunk-JHUMURHA.js";
575
+ } from "./chunk-24VB7FR7.js";
572
576
  import {
573
577
  AGENT_MNEMONIC_FILE,
574
578
  BTC_RATE_FILE,
@@ -618,7 +622,7 @@ import {
618
622
  rollbackConfig,
619
623
  transportErrorCode,
620
624
  updateConfig
621
- } from "./chunk-EGY4KDBW.js";
625
+ } from "./chunk-SKKZ4OAA.js";
622
626
  import "./chunk-EVQERRCP.js";
623
627
  import "./chunk-RA24J4QM.js";
624
628
  import "./chunk-CJTE5TS3.js";
@@ -702,6 +706,9 @@ export {
702
706
  TEMPO_CLOSE_DB_RECOVERY_BUDGET_MS,
703
707
  TEMPO_CLOSE_REQUESTED_TOPIC,
704
708
  TEMPO_EXIT_KEY_MISSING_HINT,
709
+ TEMPO_MODERATO_CHAIN_ID,
710
+ TEMPO_MODERATO_RPC,
711
+ TEMPO_PATH_USD_MODERATO,
705
712
  TempoSessionChannelMismatchError,
706
713
  WALLET_FILE,
707
714
  WALLET_VERSION,
@@ -1098,6 +1105,7 @@ export {
1098
1105
  resolveRpcOverride,
1099
1106
  resolveSigningIdentity,
1100
1107
  resolveTempoAsset,
1108
+ resolveTempoNetwork,
1101
1109
  resolveX402Asset,
1102
1110
  resolveX402ChannelRpc,
1103
1111
  restoreProofsFromOutputs,
@@ -18,14 +18,14 @@ import {
18
18
  recordFloatSpend,
19
19
  resolveFundMint,
20
20
  sweepPendingMints
21
- } from "./chunk-7FUTMGAW.js";
21
+ } from "./chunk-Z75N4GTG.js";
22
22
  import "./chunk-V2BE4E5V.js";
23
23
  import {
24
24
  tryResolveBtcUsdRate
25
- } from "./chunk-XJN5ZDAL.js";
25
+ } from "./chunk-R4MSO2GX.js";
26
26
  import "./chunk-XN4YSEO6.js";
27
27
  import "./chunk-3SWX5BQP.js";
28
- import "./chunk-5GIU2LBJ.js";
28
+ import "./chunk-YLWATJ7F.js";
29
29
  import "./chunk-ECEM3ZAS.js";
30
30
  import "./chunk-4NWEJTAW.js";
31
31
  import "./chunk-BECPI5H5.js";
@@ -35,11 +35,11 @@ import "./chunk-EZHT2RLJ.js";
35
35
  import {
36
36
  formatUsd,
37
37
  info
38
- } from "./chunk-6CC6JGEU.js";
39
- import "./chunk-JHUMURHA.js";
38
+ } from "./chunk-VY277ROG.js";
39
+ import "./chunk-24VB7FR7.js";
40
40
  import {
41
41
  loadConfig
42
- } from "./chunk-EGY4KDBW.js";
42
+ } from "./chunk-SKKZ4OAA.js";
43
43
  import "./chunk-EVQERRCP.js";
44
44
  import "./chunk-RA24J4QM.js";
45
45
  import "./chunk-CJTE5TS3.js";
@@ -3,16 +3,16 @@ import { createRequire as __dvmCreateRequire } from "node:module";
3
3
  const require = __dvmCreateRequire(import.meta.url);
4
4
  import {
5
5
  assertTempoWalletIdle
6
- } from "./chunk-5GIU2LBJ.js";
6
+ } from "./chunk-YLWATJ7F.js";
7
7
  import "./chunk-ECEM3ZAS.js";
8
8
  import "./chunk-4NWEJTAW.js";
9
9
  import "./chunk-BECPI5H5.js";
10
10
  import "./chunk-N3UJT2NJ.js";
11
11
  import "./chunk-2VVVWBQA.js";
12
12
  import "./chunk-EZHT2RLJ.js";
13
- import "./chunk-6CC6JGEU.js";
14
- import "./chunk-JHUMURHA.js";
15
- import "./chunk-EGY4KDBW.js";
13
+ import "./chunk-VY277ROG.js";
14
+ import "./chunk-24VB7FR7.js";
15
+ import "./chunk-SKKZ4OAA.js";
16
16
  import "./chunk-EVQERRCP.js";
17
17
  import "./chunk-CJTE5TS3.js";
18
18
  import "./chunk-GZWKCIYN.js";
@@ -3,28 +3,36 @@ import { createRequire as __dvmCreateRequire } from "node:module";
3
3
  const require = __dvmCreateRequire(import.meta.url);
4
4
  import {
5
5
  TEMPO_CHAIN_ID,
6
+ TEMPO_MODERATO_CHAIN_ID,
7
+ TEMPO_MODERATO_RPC,
8
+ TEMPO_PATH_USD_MODERATO,
6
9
  TEMPO_USDC_MAINNET,
7
10
  connectedTempoAccount,
8
11
  deriveTempoAddress,
9
12
  generateTempoKey,
10
13
  getTempoUsdcBalance,
11
14
  resolveTempoAsset,
15
+ resolveTempoNetwork,
12
16
  tempoBalanceCheckHint,
13
17
  tempoTokenLabel,
14
18
  tempoTokenReference,
15
19
  tempoWrongAssetHint,
16
20
  tryResolveTempoAsset
17
- } from "./chunk-JHUMURHA.js";
18
- import "./chunk-EGY4KDBW.js";
21
+ } from "./chunk-24VB7FR7.js";
22
+ import "./chunk-SKKZ4OAA.js";
19
23
  import "./chunk-IYHTITNZ.js";
20
24
  export {
21
25
  TEMPO_CHAIN_ID,
26
+ TEMPO_MODERATO_CHAIN_ID,
27
+ TEMPO_MODERATO_RPC,
28
+ TEMPO_PATH_USD_MODERATO,
22
29
  TEMPO_USDC_MAINNET,
23
30
  connectedTempoAccount,
24
31
  deriveTempoAddress,
25
32
  generateTempoKey,
26
33
  getTempoUsdcBalance,
27
34
  resolveTempoAsset,
35
+ resolveTempoNetwork,
28
36
  tempoBalanceCheckHint,
29
37
  tempoTokenLabel,
30
38
  tempoTokenReference,
@@ -37,9 +37,9 @@ import {
37
37
  x402NetworkToCaip2,
38
38
  x402SupportedNetworksHint,
39
39
  x402WrongAssetHint
40
- } from "./chunk-XJN5ZDAL.js";
41
- import "./chunk-6CC6JGEU.js";
42
- import "./chunk-EGY4KDBW.js";
40
+ } from "./chunk-R4MSO2GX.js";
41
+ import "./chunk-VY277ROG.js";
42
+ import "./chunk-SKKZ4OAA.js";
43
43
  import "./chunk-IYHTITNZ.js";
44
44
  export {
45
45
  X402_DEFAULT_FACILITATOR,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dvmkit/dvm-cli",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
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.1.4-rc.7",
53
+ "@dvmkit/sdk": "0.1.5-rc.7",
54
54
  "@x402/evm": "2.21.0",
55
55
  "commander": "14.0.3",
56
56
  "mppx": "0.8.15",
@@ -34,7 +34,7 @@ One funded wallet pays every provider — no accounts, no API keys to broker. Ev
34
34
 
35
35
  ## The loop
36
36
 
37
- Preflight when wallet state is uncertain: `dvm doctor` (exits 1 on failure, names each failing check; chainable as `dvm doctor && dvm request …`). If it warns `cli_build_stale`, update the CLI before reporting any bug — stale binaries reproduce long-fixed defects.
37
+ Preflight when wallet state is uncertain: `dvm doctor` (exits 1 on failure, names each failing check; chainable as `dvm doctor && dvm request …`). Add an endpoint, alias, favorite, or qualified DVM selector — `dvm doctor <target>` — to compare that DVM's public Tempo chain with the connected wallet without signing or attempting payment. If it warns `cli_build_stale`, update the CLI before reporting any bug — stale binaries reproduce long-fixed defects.
38
38
 
39
39
  1. **Find** — `dvm search "<what the user wants>" --limit 5` (free-text, ranked), or `dvm browse` to walk the catalog (`--tag`, `--builder`, `--offset`). Each platform row's `identifier` (`<handle>--<slug>` or `<handle>--<slug>/<capability>`) pipes straight into `-d`; an endpoint-only row uses `--endpoint`. `display.*` fields explain the choice to your user. Skip when the user already gave an endpoint or favorite.
40
40
  2. **Inspect** — `dvm describe <identifier>`. `input_schema` present → structured input: `--param key=value` (repeatable) or `--data @payload.json` for nested values (the `@file` form survives shell quoting; prefer it for non-trivial payloads). No `input_schema` → primitive input: `-i "<text>"`. Wrong form → the error names the expected fields and hands back a retryable `next_action`.
@@ -57,6 +57,8 @@ Preflight when wallet state is uncertain: `dvm doctor` (exits 1 on failure, name
57
57
 
58
58
  When the wallet can't cover a job, fund it: `dvm wallet fund '$5'` (quote the amount — an unquoted `$5` is eaten by the shell).
59
59
 
60
+ For a disposable Tempo test wallet, isolate its state and select Moderato explicitly: `export DVM_CONFIG_DIR="$(mktemp -d)"`; `dvm init`; `dvm wallet tempo-connect --network moderato`; `dvm wallet fund '$1' --rail tempo`; `dvm wallet balance`. The fund command calls Tempo's public faucet, reports the token increase it actually observes, and uses no real funds. Keep that config directory for the whole test run: a mainnet wallet will refuse the faucet, and a wallet never signs a Tempo challenge for the other network.
61
+
60
62
  - **Float connected** (`dvm doctor` shows `wallet_lightning`): funding is autonomous — you'll see `float_paying` → `minted`; just confirm the balance. Failures return structured `float_*` codes with relay-safe `display` and next steps; the one to memorize is in Money safety (`float_payment_unknown` = never retry blind).
61
63
  - **Human-assisted funding:** package the handoff as one short context message, the exact invoice or address in its own standalone message or code block, and the QR as a separate image attachment where the surface takes media. Never bury the copy value in prose or relay secrets. Follow the output's next step to confirm the balance.
62
64
  - **Pairing a Lightning float remotely:** use `dvm wallet pair` — relay `next_action.display` verbatim (it carries the session code the human must compare), send the private `next_action.url` as its own standalone message, then run the exact `next_action.command`. Never ask the user to paste an NWC connection string into chat. `printf '<nwc-uri>' | dvm wallet connect` is only for when you and the human share one trusted machine.