@infernetprotocol/cli 0.1.71 → 0.1.73
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/commands/mcp.js +1 -1
- package/commands/order.js +1 -1
- package/commands/payout.js +17 -6
- package/package.json +8 -8
package/commands/mcp.js
CHANGED
|
@@ -20,7 +20,7 @@ const PROTOCOL_VERSION = '2025-06-18';
|
|
|
20
20
|
|
|
21
21
|
const id = { type: 'string', description: 'reservation id (uuid)' };
|
|
22
22
|
const ORDER_PROPS = {
|
|
23
|
-
gpu_class: { type: 'string',
|
|
23
|
+
gpu_class: { type: 'string', description: 'l40s, a100, h100, h100x2, or a consumer card on demand (rtx5090, rtx4090, ... one model per order); see order_capacity' },
|
|
24
24
|
models: { type: 'array', items: { type: 'string' }, description: 'exact model ids, from order_capacity' },
|
|
25
25
|
hours: { type: 'integer', minimum: 1, maximum: 168 },
|
|
26
26
|
start_at: { type: 'string', description: 'whole UTC hour, ISO; default the next hour' },
|
package/commands/order.js
CHANGED
|
@@ -13,7 +13,7 @@ price; non-compliant hours are credited or refunded.
|
|
|
13
13
|
|
|
14
14
|
Usage:
|
|
15
15
|
infernet order capacity what is on sale now: classes, prices, free nodes, models
|
|
16
|
-
infernet order quote --gpu l40s --models m1[,m2] [--hours 1] [--start 2026-10-28T15:00:00Z]
|
|
16
|
+
infernet order quote --gpu l40s|rtx4090 --models m1[,m2] [--hours 1] [--start 2026-10-28T15:00:00Z]
|
|
17
17
|
infernet order create --gpu l40s --models m1[,m2] [--hours 1] [--start ISO] [--email you@x]
|
|
18
18
|
--checkout pay at CoinPay (any coin or PayPal): prints the checkout URL
|
|
19
19
|
--x402 pay now in USDC from X402_PRIVATE_KEY (or --key-file F)
|
package/commands/payout.js
CHANGED
|
@@ -24,7 +24,8 @@ Every completed job credits your node. Free (playground) jobs earn a house
|
|
|
24
24
|
subsidy per 1k output tokens, "pending approval" until the rate is approved;
|
|
25
25
|
paid jobs earn your share of the client's payment once it is confirmed.
|
|
26
26
|
Earnings accrue with or without a payout address: you only need one to
|
|
27
|
-
withdraw. Withdrawals are
|
|
27
|
+
withdraw. Withdrawals are sent through CoinPay after approval; small ones
|
|
28
|
+
(up to the network's auto-approve amount) go out as soon as you ask.
|
|
28
29
|
|
|
29
30
|
Admin (needs INFERNET_ADMIN_TOKEN or --token):
|
|
30
31
|
infernet payout admin list [--status requested|sending|sent|all]
|
|
@@ -32,7 +33,10 @@ Admin (needs INFERNET_ADMIN_TOKEN or --token):
|
|
|
32
33
|
infernet payout admin reject <request-id> [--reason <text>]
|
|
33
34
|
infernet payout admin mark-sent <request-id> --tx <hash>
|
|
34
35
|
infernet payout admin mark-failed <request-id>
|
|
35
|
-
infernet payout admin settings [--rate <usd per 1k>] [--fee <pct>] [--min <usd>]
|
|
36
|
+
infernet payout admin settings [--rate <usd per 1k>] [--fee <pct>] [--min <usd>]
|
|
37
|
+
[--auto-approve-max <usd>] [--approve-subsidy]
|
|
38
|
+
|
|
39
|
+
Or sign in to the website with the admin account and use /admin/payouts.
|
|
36
40
|
|
|
37
41
|
Supported coins: ${PAYMENT_COIN_CODES.join(', ')}
|
|
38
42
|
`;
|
|
@@ -161,9 +165,14 @@ async function runRequest(args, ctx) {
|
|
|
161
165
|
try {
|
|
162
166
|
const out = await client.requestPayout(amount);
|
|
163
167
|
const r = out?.request ?? {};
|
|
168
|
+
const to = `${r.coin}${r.network ? ` (${r.network})` : ''} ${r.address}`;
|
|
169
|
+
if (r.status === 'sent') {
|
|
170
|
+
process.stdout.write(`Sent ${fmtUsd(r.amount_usd)} to ${to}.\ntx ${r.tx_hash}\n`);
|
|
171
|
+
return 0;
|
|
172
|
+
}
|
|
164
173
|
process.stdout.write(
|
|
165
|
-
`Requested ${fmtUsd(r.amount_usd)} to ${
|
|
166
|
-
`Request ${r.id} is waiting for approval; \`infernet payout list\` shows its status.\n`
|
|
174
|
+
`Requested ${fmtUsd(r.amount_usd)} to ${to}.\n` +
|
|
175
|
+
`Request ${r.id} is ${r.status === 'sending' ? 'being sent' : 'waiting for approval'}; \`infernet payout list\` shows its status.\n`
|
|
167
176
|
);
|
|
168
177
|
return 0;
|
|
169
178
|
} catch (err) {
|
|
@@ -214,7 +223,8 @@ async function runAdmin(args, positional) {
|
|
|
214
223
|
);
|
|
215
224
|
const c = t.config ?? {};
|
|
216
225
|
process.stdout.write(
|
|
217
|
-
`Config: subsidy ${fmtUsd(c.subsidy_per_1k_output_usd)}/1k (${c.subsidy_approved ? 'approved' : 'NOT approved'}), fee ${c.house_fee_pct}%, minimum ${fmtUsd(c.min_payout_usd)}
|
|
226
|
+
`Config: subsidy ${fmtUsd(c.subsidy_per_1k_output_usd)}/1k (${c.subsidy_approved ? 'approved' : 'NOT approved'}), fee ${c.house_fee_pct}%, minimum ${fmtUsd(c.min_payout_usd)}, ` +
|
|
227
|
+
`auto-approve ${Number(c.auto_approve_max_usd) > 0 ? `up to ${fmtUsd(c.auto_approve_max_usd)}` : 'off'}\n\n`
|
|
218
228
|
);
|
|
219
229
|
const rows = data?.rows ?? [];
|
|
220
230
|
if (!rows.length) {
|
|
@@ -235,6 +245,7 @@ async function runAdmin(args, positional) {
|
|
|
235
245
|
if (args.get('rate') != null) body.subsidy_per_1k_output_usd = Number(args.get('rate'));
|
|
236
246
|
if (args.get('fee') != null) body.house_fee_pct = Number(args.get('fee'));
|
|
237
247
|
if (args.get('min') != null) body.min_payout_usd = Number(args.get('min'));
|
|
248
|
+
if (args.get('auto-approve-max') != null) body.auto_approve_max_usd = Number(args.get('auto-approve-max'));
|
|
238
249
|
if (args.has('approve-subsidy')) body.subsidy_approved = true;
|
|
239
250
|
if (args.has('unapprove-subsidy')) body.subsidy_approved = false;
|
|
240
251
|
const data = Object.keys(body).length
|
|
@@ -265,7 +276,7 @@ async function runAdmin(args, positional) {
|
|
|
265
276
|
const data = await adminCall(opts, 'POST', `/api/v1/admin/payouts/${enc(id)}`, body);
|
|
266
277
|
const r = data?.request ?? {};
|
|
267
278
|
process.stdout.write(`${r.id}: ${r.status}${data?.outcome ? ` (outcome ${data.outcome})` : ''}${r.tx_hash ? ` tx ${r.tx_hash}` : ''}${r.error ? ` ${r.error}` : ''}\n`);
|
|
268
|
-
return r.status === 'failed' ? 1 : 0;
|
|
279
|
+
return r.status === 'failed' || data?.outcome === 'not_sent' ? 1 : 0;
|
|
269
280
|
} catch (err) {
|
|
270
281
|
process.stderr.write(`payout admin ${action ?? 'list'} failed: ${err?.message ?? err}\n`);
|
|
271
282
|
return 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infernetprotocol/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.73",
|
|
4
4
|
"description": "GPU-node CLI / daemon for the Infernet Protocol — register a GPU server with a Supabase control plane and start earning.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
"ora": "^9.4.1",
|
|
32
32
|
"react": "^17.0.2",
|
|
33
33
|
"react-blessed": "^0.7.2",
|
|
34
|
-
"@infernetprotocol/auth": "0.1.
|
|
35
|
-
"@infernetprotocol/config": "0.1.
|
|
36
|
-
"@infernetprotocol/
|
|
37
|
-
"@infernetprotocol/
|
|
38
|
-
"@infernetprotocol/
|
|
39
|
-
"@infernetprotocol/
|
|
40
|
-
"@infernetprotocol/
|
|
34
|
+
"@infernetprotocol/auth": "0.1.73",
|
|
35
|
+
"@infernetprotocol/config": "0.1.73",
|
|
36
|
+
"@infernetprotocol/engine": "0.1.73",
|
|
37
|
+
"@infernetprotocol/gpu": "0.1.73",
|
|
38
|
+
"@infernetprotocol/liquid-agent": "0.1.73",
|
|
39
|
+
"@infernetprotocol/rpc-adapter": "0.1.73",
|
|
40
|
+
"@infernetprotocol/deploy-providers": "0.1.73"
|
|
41
41
|
},
|
|
42
42
|
"repository": {
|
|
43
43
|
"type": "git",
|