@dvmkit/dvm-cli 0.12.0 → 0.13.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-GHNF2I5C.js → chunk-C2BJETRG.js} +56 -54
- package/dist/{chunk-6EYBCGGD.js → chunk-C2EZ3VY2.js} +2 -2
- package/dist/{chunk-K562SFVD.js → chunk-CCF4QONY.js} +2 -2
- package/dist/{chunk-MMXHV3KC.js → chunk-GWLOO5XD.js} +2 -2
- package/dist/{chunk-7N3HQJKE.js → chunk-I2C3YEUN.js} +4 -4
- package/dist/{chunk-GEZVSJDM.js → chunk-KQQALLOL.js} +3 -3
- package/dist/{chunk-PWOTICNA.js → chunk-NLUOHCX2.js} +1899 -92
- package/dist/{chunk-3R2GM6AD.js → chunk-PS4AUWK3.js} +2 -2
- package/dist/{chunk-IQKAJ4AN.js → chunk-RPM5XEVS.js} +3 -2
- package/dist/{chunk-MBSCP52L.js → chunk-SEJWBDGY.js} +31255 -11304
- package/dist/{chunk-HWWW7JEM.js → chunk-ZDWZT6NA.js} +3 -3
- package/dist/{chunk-UVFFMKU4.js → chunk-ZV57FFIL.js} +68 -4
- package/dist/{client-HEWHZMS2.js → client-6JRGRKFQ.js} +6 -6
- package/dist/dvm.js +4484 -2349
- package/dist/{internal-ZZHCUKOM.js → internal-KPPGYK5N.js} +5 -5
- package/dist/{lifecycle-XGNIMPTB.js → lifecycle-7YRNRLDQ.js} +6 -6
- package/dist/{payout-reporter-DDQ7FGRC-OKICJCC2.js → payout-reporter-KTLBNJJ7-WDT6M4GN.js} +2 -2
- package/dist/{pocket-refill-PMY77T54.js → pocket-refill-E2QVQDME.js} +10 -10
- package/dist/{revenue-reporter-RIEHBKRA-75BDPVVX.js → revenue-reporter-FD3GDQZS-COUBEUDN.js} +2 -2
- package/dist/{tempo-lifecycle-LGGBDCKK.js → tempo-lifecycle-EOP5IHJT.js} +8 -8
- package/dist/{tempo-wallet-PLFC443A.js → tempo-wallet-4A5M3FVO.js} +7 -7
- package/dist/{wallet-UJ7EJNQA.js → wallet-LASVQ72F.js} +7 -7
- package/dist/{x402-AY6P5KV4-SIZF7YNW.js → x402-MFBRORHG-34VE7EWO.js} +2 -2
- package/package.json +2 -2
- package/skills/dvm/calling.md +3 -1
- package/skills/dvm/credit.md +8 -0
|
@@ -469,7 +469,7 @@ import {
|
|
|
469
469
|
x402SettledShare,
|
|
470
470
|
x402VoucherPendingState,
|
|
471
471
|
x402WalletFromConfig
|
|
472
|
-
} from "./chunk-
|
|
472
|
+
} from "./chunk-SEJWBDGY.js";
|
|
473
473
|
import "./chunk-JBU7RKQ3.js";
|
|
474
474
|
import "./chunk-KDNFUDOG.js";
|
|
475
475
|
import "./chunk-IUTVV6N5.js";
|
|
@@ -531,13 +531,13 @@ import {
|
|
|
531
531
|
x402NetworkListForCopy,
|
|
532
532
|
x402NetworkToCaip2,
|
|
533
533
|
x402SupportedNetworksHint
|
|
534
|
-
} from "./chunk-
|
|
534
|
+
} from "./chunk-C2BJETRG.js";
|
|
535
535
|
import {
|
|
536
536
|
RevenueReporter
|
|
537
|
-
} from "./chunk-
|
|
537
|
+
} from "./chunk-CCF4QONY.js";
|
|
538
538
|
import {
|
|
539
539
|
PayoutReporter
|
|
540
|
-
} from "./chunk-
|
|
540
|
+
} from "./chunk-PS4AUWK3.js";
|
|
541
541
|
import "./chunk-R2DSAZBO.js";
|
|
542
542
|
import {
|
|
543
543
|
DIAGNOSTIC_CATALOGUE_VERSION,
|
|
@@ -548,7 +548,7 @@ import {
|
|
|
548
548
|
projectDiagnosticFields,
|
|
549
549
|
projectEventName,
|
|
550
550
|
projectSpanRow
|
|
551
|
-
} from "./chunk-
|
|
551
|
+
} from "./chunk-ZV57FFIL.js";
|
|
552
552
|
import "./chunk-EVQERRCP.js";
|
|
553
553
|
import "./chunk-RA24J4QM.js";
|
|
554
554
|
import "./chunk-B4WHUMZM.js";
|
|
@@ -3,8 +3,8 @@ import { createRequire as __dvmCreateRequire } from "node:module";
|
|
|
3
3
|
const require = __dvmCreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
assertX402WalletIdle
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-C2EZ3VY2.js";
|
|
7
|
+
import "./chunk-SEJWBDGY.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-C2BJETRG.js";
|
|
17
|
+
import "./chunk-CCF4QONY.js";
|
|
18
|
+
import "./chunk-PS4AUWK3.js";
|
|
19
19
|
import "./chunk-R2DSAZBO.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-ZV57FFIL.js";
|
|
21
21
|
import "./chunk-EVQERRCP.js";
|
|
22
22
|
import "./chunk-RA24J4QM.js";
|
|
23
23
|
import "./chunk-B4WHUMZM.js";
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
PayoutReporter,
|
|
8
8
|
PostgresX402BatchStore,
|
|
9
9
|
x402EarnedCeiling
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PS4AUWK3.js";
|
|
11
11
|
import "./chunk-R2DSAZBO.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-ZV57FFIL.js";
|
|
13
13
|
import "./chunk-IYHTITNZ.js";
|
|
14
14
|
export {
|
|
15
15
|
MemoryX402BatchStore,
|
|
@@ -13,22 +13,22 @@ import {
|
|
|
13
13
|
recordFloatSpend,
|
|
14
14
|
resolveFundMint,
|
|
15
15
|
sweepPendingMints
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-NLUOHCX2.js";
|
|
17
|
+
import "./chunk-I2C3YEUN.js";
|
|
18
18
|
import {
|
|
19
19
|
info,
|
|
20
20
|
tryResolveBtcUsdRate
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-RPM5XEVS.js";
|
|
22
|
+
import "./chunk-KQQALLOL.js";
|
|
23
23
|
import {
|
|
24
24
|
loadConfig
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-GWLOO5XD.js";
|
|
26
26
|
import {
|
|
27
27
|
effectiveFundingMint,
|
|
28
28
|
effectiveMints,
|
|
29
29
|
formatUsd,
|
|
30
30
|
loadAgentWallet
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-SEJWBDGY.js";
|
|
32
32
|
import "./chunk-JBU7RKQ3.js";
|
|
33
33
|
import "./chunk-KDNFUDOG.js";
|
|
34
34
|
import "./chunk-IUTVV6N5.js";
|
|
@@ -40,11 +40,11 @@ import "./chunk-PUOXBKY2.js";
|
|
|
40
40
|
import {
|
|
41
41
|
microToSats,
|
|
42
42
|
msatsToMicro
|
|
43
|
-
} from "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
43
|
+
} from "./chunk-C2BJETRG.js";
|
|
44
|
+
import "./chunk-CCF4QONY.js";
|
|
45
|
+
import "./chunk-PS4AUWK3.js";
|
|
46
46
|
import "./chunk-R2DSAZBO.js";
|
|
47
|
-
import "./chunk-
|
|
47
|
+
import "./chunk-ZV57FFIL.js";
|
|
48
48
|
import "./chunk-EVQERRCP.js";
|
|
49
49
|
import "./chunk-RA24J4QM.js";
|
|
50
50
|
import "./chunk-B4WHUMZM.js";
|
package/dist/{revenue-reporter-RIEHBKRA-75BDPVVX.js → revenue-reporter-FD3GDQZS-COUBEUDN.js}
RENAMED
|
@@ -3,9 +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-
|
|
6
|
+
} from "./chunk-CCF4QONY.js";
|
|
7
7
|
import "./chunk-R2DSAZBO.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-ZV57FFIL.js";
|
|
9
9
|
import "./chunk-IYHTITNZ.js";
|
|
10
10
|
export {
|
|
11
11
|
RevenueReporter
|
|
@@ -3,10 +3,10 @@ import { createRequire as __dvmCreateRequire } from "node:module";
|
|
|
3
3
|
const require = __dvmCreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
assertTempoWalletIdle
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-ZDWZT6NA.js";
|
|
7
|
+
import "./chunk-I2C3YEUN.js";
|
|
8
|
+
import "./chunk-GWLOO5XD.js";
|
|
9
|
+
import "./chunk-SEJWBDGY.js";
|
|
10
10
|
import "./chunk-JBU7RKQ3.js";
|
|
11
11
|
import "./chunk-KDNFUDOG.js";
|
|
12
12
|
import "./chunk-IUTVV6N5.js";
|
|
@@ -15,11 +15,11 @@ import "./chunk-6LP4EGKA.js";
|
|
|
15
15
|
import "./chunk-N3UJT2NJ.js";
|
|
16
16
|
import "./chunk-SYFKO6BA.js";
|
|
17
17
|
import "./chunk-PUOXBKY2.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-C2BJETRG.js";
|
|
19
|
+
import "./chunk-CCF4QONY.js";
|
|
20
|
+
import "./chunk-PS4AUWK3.js";
|
|
21
21
|
import "./chunk-R2DSAZBO.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-ZV57FFIL.js";
|
|
23
23
|
import "./chunk-EVQERRCP.js";
|
|
24
24
|
import "./chunk-RA24J4QM.js";
|
|
25
25
|
import "./chunk-B4WHUMZM.js";
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
generateTempoKey,
|
|
7
7
|
tempoBalanceCheckHint,
|
|
8
8
|
tempoWrongAssetHint
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-I2C3YEUN.js";
|
|
10
|
+
import "./chunk-GWLOO5XD.js";
|
|
11
|
+
import "./chunk-SEJWBDGY.js";
|
|
12
12
|
import "./chunk-JBU7RKQ3.js";
|
|
13
13
|
import "./chunk-KDNFUDOG.js";
|
|
14
14
|
import "./chunk-IUTVV6N5.js";
|
|
@@ -17,11 +17,11 @@ import "./chunk-6LP4EGKA.js";
|
|
|
17
17
|
import "./chunk-N3UJT2NJ.js";
|
|
18
18
|
import "./chunk-SYFKO6BA.js";
|
|
19
19
|
import "./chunk-PUOXBKY2.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-C2BJETRG.js";
|
|
21
|
+
import "./chunk-CCF4QONY.js";
|
|
22
|
+
import "./chunk-PS4AUWK3.js";
|
|
23
23
|
import "./chunk-R2DSAZBO.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-ZV57FFIL.js";
|
|
25
25
|
import "./chunk-EVQERRCP.js";
|
|
26
26
|
import "./chunk-RA24J4QM.js";
|
|
27
27
|
import "./chunk-B4WHUMZM.js";
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
removeX402Wallet,
|
|
8
8
|
repinX402WalletNetwork,
|
|
9
9
|
saveX402Wallet
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-KQQALLOL.js";
|
|
11
|
+
import "./chunk-GWLOO5XD.js";
|
|
12
|
+
import "./chunk-SEJWBDGY.js";
|
|
13
13
|
import "./chunk-JBU7RKQ3.js";
|
|
14
14
|
import "./chunk-KDNFUDOG.js";
|
|
15
15
|
import "./chunk-IUTVV6N5.js";
|
|
@@ -18,11 +18,11 @@ import "./chunk-6LP4EGKA.js";
|
|
|
18
18
|
import "./chunk-N3UJT2NJ.js";
|
|
19
19
|
import "./chunk-SYFKO6BA.js";
|
|
20
20
|
import "./chunk-PUOXBKY2.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-C2BJETRG.js";
|
|
22
|
+
import "./chunk-CCF4QONY.js";
|
|
23
|
+
import "./chunk-PS4AUWK3.js";
|
|
24
24
|
import "./chunk-R2DSAZBO.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-ZV57FFIL.js";
|
|
26
26
|
import "./chunk-EVQERRCP.js";
|
|
27
27
|
import "./chunk-RA24J4QM.js";
|
|
28
28
|
import "./chunk-B4WHUMZM.js";
|
|
@@ -30,8 +30,8 @@ import {
|
|
|
30
30
|
x402NetworkListForCopy,
|
|
31
31
|
x402NetworkToCaip2,
|
|
32
32
|
x402SupportedNetworksHint
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import "./chunk-
|
|
33
|
+
} from "./chunk-C2BJETRG.js";
|
|
34
|
+
import "./chunk-ZV57FFIL.js";
|
|
35
35
|
import "./chunk-IYHTITNZ.js";
|
|
36
36
|
export {
|
|
37
37
|
X402_DEFAULT_FACILITATOR,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dvmkit/dvm-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Command-line client and agent skill for Digital Vending Machines: pay-per-use HTTPS services AI agents can find, pay, and call with no account or API key",
|
|
5
5
|
"author": "DVM Technologies Ltd",
|
|
6
6
|
"keywords": [
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@cashu/cashu-ts": "4.10.2",
|
|
70
|
-
"@dvmkit/sdk": "0.
|
|
70
|
+
"@dvmkit/sdk": "0.22.0",
|
|
71
71
|
"@x402/evm": "2.21.0",
|
|
72
72
|
"commander": "14.0.3",
|
|
73
73
|
"mppx": "0.8.15",
|
package/skills/dvm/calling.md
CHANGED
|
@@ -8,6 +8,8 @@ Reuse an endpoint or favourite the user already chose. Run `dvm fav list` when t
|
|
|
8
8
|
|
|
9
9
|
Use the qualified `identifier` returned by discovery with `-d`. Use `--endpoint` for an actual URL or a saved `@alias`; never invent a URL from an unqualified name. Confirm that the selected capability accepts the input and provides the result the user needs.
|
|
10
10
|
|
|
11
|
+
For a service URL the user already has, including an unlisted service, inspect it directly with `dvm describe https://example.com`. Select a capability by appending its advertised name: `dvm quote --endpoint https://example.com/ask --input "your question"`, then use the same URL with `dvm request`. `dvm describe https://example.com/ask` also accepts this form. A working base path takes precedence: the final segment is treated as a capability only when that URL's `/v1/info` returns 404 and its immediate parent advertises capabilities. An unknown name returns `unknown_capability`; a base URL with several choices returns `ambiguous_capability`. Both errors list `available_capabilities` and give a direct retry without discovery. `not_a_dvm_endpoint` means `/v1/info` returned 404; check the service base URL.
|
|
12
|
+
|
|
11
13
|
To remember a chosen service, save its verified endpoint:
|
|
12
14
|
|
|
13
15
|
```bash
|
|
@@ -43,7 +45,7 @@ When a respond or pay action includes `expires_at_ms` (Unix milliseconds), relay
|
|
|
43
45
|
|
|
44
46
|
Read `payload_in`: when it points to messages, retrieve them and obtain the artifact rather than reporting only the summary. Check the result against the user's request. Keep receipt verification separate from result quality and job completion.
|
|
45
47
|
|
|
46
|
-
`dvm status <job-id>` includes `spend` for locally recorded jobs. Relay its `display` to show the total paid, charge count, approved budget, and refund count. `charges` lists conversation payments in sequence order with fiat-first `display`, `rail`, provider-wrapped `reason`, and `approval` (`auto`, `explicit`, or `unknown` for older records). `payments` includes upfront payments; `max_payments` is the stored cap on all payments, including the upfront payment. `total_msats` comes from the stored running total, which already includes the upfront rail payment (falling back to the completion cost for older records). `upfront_display` identifies the difference between that total and the conversation charges; the initial payment has no conversation message. When every payment has a recorded price in one fiat currency, the total sums those prices and the budget uses the resulting aggregate fiat/msat ratio. An upfront payment without a recorded fiat price keeps the existing amount display. Jobs paid from prepaid credit say so; their upfront draw amount is not recorded locally, and `upfront_display` is omitted. Refunds (including change) are listed separately and do not reduce the gross paid total. `log_mismatch` flags inconsistent local payment amounts or counts only after a job is terminal, including when the total minus conversation charges differs from a recorded completion cost; an active log may still be behind. A job that started free records no completion cost, so a missing mid-job payment message there shows as an upfront amount rather than a mismatch. When a receipt is available, `receipt_total_display` shows its signed total. `receipt_mismatch` is true when
|
|
48
|
+
`dvm status <job-id>` includes `spend` for locally recorded jobs. Relay its `display` to show the total paid, charge count, approved budget, and refund count. `charges` lists conversation payments in sequence order with fiat-first `display`, `rail`, provider-wrapped `reason`, and `approval` (`auto`, `explicit`, or `unknown` for older records). `payments` includes upfront payments; `max_payments` is the stored cap on all payments, including the upfront payment. `total_msats` comes from the stored running total, which already includes the upfront rail payment (falling back to the completion cost for older records). `upfront_display` identifies the difference between that total and the conversation charges; the initial payment has no conversation message. When every payment has a recorded price in one fiat currency, the total sums those prices and the budget uses the resulting aggregate fiat/msat ratio. An upfront payment without a recorded fiat price keeps the existing amount display. Jobs paid from prepaid credit say so; their upfront draw amount is not recorded locally, and `upfront_display` is omitted. Refunds (including change) are listed separately and do not reduce the gross paid total. `log_mismatch` flags inconsistent local payment amounts or counts only after a job is terminal, including when the total minus conversation charges differs from a recorded completion cost; an active log may still be behind. A job that started free records no completion cost, so a missing mid-job payment message there shows as an upfront amount rather than a mismatch. When a receipt is available, `receipt_total_display` shows its signed total. `receipt_mismatch` is true when comparable Bitcoin-native signed and local totals differ in either direction, and false when they agree. The display states both amounts neutrally: mint fees, returned change, or a payment not recorded locally can explain the difference. If the receipt, upfront record, or any conversation charge identifies Tempo/x402, the aggregate BTC totals are exchange-rate valuations. Their displays are labeled `BTC valuation`; `receipt_mismatch` is omitted even when the converted totals happen to agree. The display explicitly says the comparison is unknown because local records lack comparable native settlement amounts. Converted BTC differences do not establish a difference in token principal or fees, including on mixed-rail jobs. For jobs paid from prepaid credit, the comparison is unknown and `receipt_mismatch` is omitted because the local record does not hold the credit draw amount; the receipt total includes that draw. Check `receipt_verified` separately before trusting the signature. Human status prints the bill and charge list before `Next:`. Jobs accessed without a local record omit `spend`.
|
|
47
49
|
|
|
48
50
|
Check `content_metadata_source` and `content_metadata_known` before reporting content availability or expiry. `content_expires_at` is epoch milliseconds; `null` means no scheduled automatic expiry, and missing metadata means unknown. Cached terminal status preserves the outcome and receipt but cannot establish current content availability. Use `dvm status <job-id> --messages` for a fresh read. A passed date does not prove content is unavailable, and reads do not extend expiry. Save useful output with `dvm messages <job-id> --no-stream > messages.json`. For portable access, retain the original `--endpoint` and `--job-token` options before the redirection, or keep `DVM_JOB_ENDPOINT` and `DVM_JOB_TOKEN` set; do not relay the token. Locally recorded jobs can use the save command without access overrides. `--human` saves artifacts to private temporary files at the printed paths. Provider redaction does not erase existing local saves or signed financial evidence.
|
|
49
51
|
|
package/skills/dvm/credit.md
CHANGED
|
@@ -18,6 +18,14 @@ After funding or an automatic refill, inspect every funding result, not just the
|
|
|
18
18
|
|
|
19
19
|
When `credit_funding_skipped` reports unavailable BTC/USD pricing, relay its `display` and `hint`. Automatic funding remains enabled, and this request follows the ordinary per-call payment path; the notice does not report a prepaid purchase or authorize another one.
|
|
20
20
|
|
|
21
|
+
## Card top-ups (Stripe Link)
|
|
22
|
+
|
|
23
|
+
Some providers take card payments for prepaid credit (`stripe` in their funding rails). A card top-up always needs the human's approval in Stripe Link, so the CLI never makes one by itself: an automatic refill of a card-funded credit stops with `credit_refill_card_approval_required` and the `fund_command` to run. Run `dvm credit fund <dvm> --rail stripe --amount '$X'` first: it charges nothing and returns `card_approval_required` with the exact `link_cli.create` and `link_cli.retrieve` commands, the amount in cents, and the provider's `network_id`. Tell the human it is a card charge that can be refunded later, less a share of Stripe's processing fee, then run the create command and wait for their approval (up to 30 minutes). Take `shared_payment_token.id` (an `spt_…` value) from the retrieve command's JSON and pipe it into `next_command` (`--spt -`); the card is charged when that command runs, not when the human approves. Never pay it with `link-cli mpp pay`, and never print, log or store the token: it is a bearer approval for a card charge. Card top-ups are whole cents, from $0.50 up to $500 (Link's limit per approval).
|
|
24
|
+
|
|
25
|
+
If the fund result carries `card_charge: "unknown"` (its display says the card may or may not have been charged), re-run the same command with the same `--spt` inside the window it names: the resend books the earlier charge or makes it once, never twice. Do not ask the human for a new approval until the CLI says the earlier top-up is closed. With `retryable: true`, re-running is the next step; if the DVM keeps refusing, the hint names `--credit-id <new id>` to fund a separate credit. With `retryable: false` (the top-up's five-minute window has passed and no credit came of it), do not re-run: follow the hint, which is to check `dvm credit balance` and the card statement before asking for a new approval. If the charge happened and was never booked, a provider that keeps its ledger in Postgres refunds it to the card after its stranded-charge sweep (about 30 minutes); otherwise the provider's operator can find and refund it from the fund id. A decline or an unusable approval says so in `display`; relay it and ask for a new approval.
|
|
26
|
+
|
|
27
|
+
Card credit is refunded only to the card: `dvm credit drain <dvm> --method stripe` (the method is chosen automatically for card-funded credit; `--address` does not apply). A `pending` drain means Stripe has not finished; re-run the same command later, which polls the same drain. A `sent` drain carries `refund_ids` and `card_refund` with the refunded amount and the fee share in dollars.
|
|
28
|
+
|
|
21
29
|
## Draw and reclaim
|
|
22
30
|
|
|
23
31
|
Return to [calling](calling.md) for jobs. Keep the same signing identity. If the CLI reconciles funding onto another credit ID, inspect that named balance and follow its selection guidance before the next job; do not buy again to make the balance appear.
|