@1sat/cli 0.0.90 → 0.0.92

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/src/help.ts CHANGED
@@ -276,10 +276,23 @@ export const COMMANDS: CommandSpec[] = [
276
276
  name: 'ordinals',
277
277
  description: '1Sat Ordinal inscriptions',
278
278
  subcommands: [
279
- { name: 'list', description: 'List owned ordinals/inscriptions' },
280
279
  {
281
- name: 'mint',
282
- description: 'Mint a new ordinal inscription',
280
+ name: 'list',
281
+ description: 'List owned ordinals (prints id)',
282
+ args: [
283
+ { flag: '--limit', values: '<n>' },
284
+ { flag: '--offset', values: '<n>' },
285
+ { flag: '--ids', values: '<id1,id2>' },
286
+ { flag: '--tags', values: '<t1,t2>' },
287
+ {
288
+ flag: '--include',
289
+ values: '<locking scripts|entire transactions>',
290
+ },
291
+ ],
292
+ },
293
+ {
294
+ name: 'inscribe',
295
+ description: 'Inscribe a file on-chain',
283
296
  args: [
284
297
  { flag: '--file', values: '<path>', required: true },
285
298
  {
@@ -296,49 +309,53 @@ export const COMMANDS: CommandSpec[] = [
296
309
  flag: '--sign-with-bap',
297
310
  description: 'Sign inscription with BAP identity',
298
311
  },
312
+ { flag: '--stream', description: 'Multi-tx stream inscription' },
313
+ { flag: '--stream-chunk-size', values: '<bytes>' },
299
314
  ],
300
315
  },
301
316
  {
302
- name: 'transfer',
303
- description: 'Transfer an ordinal',
317
+ name: 'send',
318
+ description: 'Send an ordinal by id',
304
319
  args: [
305
- { flag: '--outpoint', values: '<txid.vout>', required: true },
306
- { flag: '--to', values: '<address>', required: true },
320
+ { flag: '--id', values: '<tracking-id>', required: true },
321
+ { flag: '--to', values: '<address|identityKey>', required: true },
307
322
  ],
308
323
  },
309
324
  {
310
325
  name: 'sell',
311
326
  description: 'List an ordinal for sale (OrdLock)',
312
327
  args: [
313
- { flag: '--outpoint', values: '<txid.vout>', required: true },
328
+ { flag: '--id', values: '<tracking-id>', required: true },
314
329
  { flag: '--price', values: '<sats>', required: true },
330
+ { flag: '--pay-address', values: '<address>' },
315
331
  ],
316
332
  },
317
333
  {
318
334
  name: 'cancel',
319
335
  description: 'Cancel an ordinal listing',
320
- args: [{ flag: '--outpoint', values: '<txid.vout>', required: true }],
336
+ args: [{ flag: '--id', values: '<tracking-id>', required: true }],
321
337
  },
322
338
  {
323
339
  name: 'buy',
324
340
  description: 'Purchase a listed ordinal',
325
- args: [{ flag: '--outpoint', values: '<txid.vout>', required: true }],
341
+ args: [
342
+ { flag: '--outpoint', values: '<txid.vout>', required: true },
343
+ { flag: '--beef', values: '<file|hex|base64>' },
344
+ ],
326
345
  },
327
346
  {
328
347
  name: 'burn',
329
348
  description: 'Burn ordinals permanently',
330
- args: [
331
- { flag: '--outpoints', values: '<op1,op2,...>', required: true },
332
- ],
349
+ args: [{ flag: '--ids', values: '<id1,id2,...>', required: true }],
333
350
  },
334
351
  ],
335
352
  },
336
353
 
337
- // Tokens
354
+ // BSV21
338
355
  {
339
- group: 'Tokens (BSV21)',
340
- name: 'tokens',
341
- description: 'BSV21 fungible tokens',
356
+ group: 'BSV21',
357
+ name: 'bsv21',
358
+ description: 'BSV21 fungible tokens (alias: tokens)',
342
359
  subcommands: [
343
360
  { name: 'balances', description: 'Show token balances by token ID' },
344
361
  {
@@ -406,6 +423,7 @@ export const COMMANDS: CommandSpec[] = [
406
423
  { flag: '--outpoint', values: '<txid.vout>', required: true },
407
424
  { flag: '--token-id', values: '<id>', required: true },
408
425
  { flag: '--amount', values: '<n>', required: true },
426
+ { flag: '--beef', values: '<file|hex|base64>' },
409
427
  ],
410
428
  },
411
429
  ],
@@ -417,21 +435,25 @@ export const COMMANDS: CommandSpec[] = [
417
435
  name: 'locks',
418
436
  description: 'Time-locked BSV',
419
437
  subcommands: [
420
- { name: 'info', description: 'Show locked totals and maturity status' },
438
+ { name: 'list', description: 'List lock UTXOs (prints id)' },
421
439
  {
422
- name: 'lock',
440
+ name: 'bsv',
423
441
  description: 'Time-lock BSV until a block height',
424
442
  args: [
425
443
  { flag: '--sats', values: '<amount>', required: true },
426
444
  {
427
- flag: '--blocks',
428
- values: '<n>',
445
+ flag: '--until',
446
+ values: '<height>',
429
447
  required: true,
430
448
  description: 'Target unlock block height',
431
449
  },
432
450
  ],
433
451
  },
434
- { name: 'unlock', description: 'Unlock all matured locks' },
452
+ {
453
+ name: 'unlock',
454
+ description: 'Unlock matured locks (all or --ids)',
455
+ args: [{ flag: '--ids', values: '<id1,id2>' }],
456
+ },
435
457
  ],
436
458
  },
437
459
 
@@ -498,39 +520,102 @@ export const COMMANDS: CommandSpec[] = [
498
520
  name: 'opns',
499
521
  description: 'Ordinals Name System — on-chain names',
500
522
  subcommands: [
523
+ {
524
+ name: 'lookup',
525
+ description: 'List OpNS names (prints id, name, outpoint)',
526
+ args: [
527
+ { flag: '--limit', values: '<n>' },
528
+ { flag: '--offset', values: '<n>' },
529
+ { flag: '--ids', values: '<id1,id2>' },
530
+ { flag: '--names', values: '<n1,n2>' },
531
+ { flag: '--tags', values: '<t1,t2>' },
532
+ {
533
+ flag: '--include',
534
+ values: '<locking scripts|entire transactions>',
535
+ },
536
+ ],
537
+ },
501
538
  {
502
539
  name: 'register',
503
- description: 'Register a payment identity key on an OpNS name',
504
- args: [{ flag: '--outpoint', values: '<txid.vout>', required: true }],
540
+ description: 'Register identity on an owned OpNS name',
541
+ args: [{ flag: '--id', values: '<tracking-id>', required: true }],
505
542
  },
506
543
  {
507
544
  name: 'deregister',
508
- description: 'Deregister the payment identity from an OpNS name',
509
- args: [{ flag: '--outpoint', values: '<txid.vout>', required: true }],
545
+ description: 'Deregister identity from an OpNS name',
546
+ args: [{ flag: '--id', values: '<tracking-id>', required: true }],
510
547
  },
511
- { name: 'lookup', description: 'List OpNS names from wallet' },
512
548
  {
513
549
  name: 'sell',
514
550
  description: 'List an OpNS name for sale',
515
551
  args: [
516
- { flag: '--outpoint', values: '<txid.vout>', required: true },
552
+ { flag: '--id', values: '<tracking-id>', required: true },
517
553
  { flag: '--price', values: '<satoshis>', required: true },
518
- {
519
- flag: '--pay-address',
520
- values: '<address>',
521
- required: false,
522
- },
554
+ { flag: '--pay-address', values: '<address>' },
555
+ ],
556
+ },
557
+ {
558
+ name: 'send',
559
+ description: 'Send an OpNS name',
560
+ args: [
561
+ { flag: '--id', values: '<tracking-id>', required: true },
562
+ { flag: '--to', values: '<address|identityKey>', required: true },
523
563
  ],
524
564
  },
525
565
  {
526
566
  name: 'buy',
527
567
  description: 'Purchase an OpNS name listing',
528
- args: [{ flag: '--outpoint', values: '<txid.vout>', required: true }],
568
+ args: [
569
+ { flag: '--outpoint', values: '<txid.vout>', required: true },
570
+ { flag: '--beef', values: '<file|hex|base64>' },
571
+ { flag: '--name', values: '<name>' },
572
+ { flag: '--origin', values: '<outpoint>' },
573
+ ],
529
574
  },
530
575
  {
531
576
  name: 'cancel-listing',
532
577
  description: 'Cancel a market listing on an OpNS name',
533
- args: [{ flag: '--outpoint', values: '<txid.vout>', required: true }],
578
+ args: [{ flag: '--id', values: '<tracking-id>', required: true }],
579
+ },
580
+ {
581
+ name: 'internalize',
582
+ description: 'Internalize a foreign OpNS mint AtomicBEEF',
583
+ args: [
584
+ { flag: '--beef', values: '<file|hex|base64>', required: true },
585
+ {
586
+ flag: '--key-id',
587
+ values: '<keyID>',
588
+ description: 'default 1sat 0',
589
+ },
590
+ ],
591
+ },
592
+ ],
593
+ },
594
+
595
+ // MessageBox
596
+ {
597
+ group: 'Wallet',
598
+ name: 'messagebox',
599
+ description:
600
+ 'MessageBox inbox (paymail remittances). Not the same as `wallet sync` (address/owner scan).',
601
+ subcommands: [
602
+ {
603
+ name: 'sync',
604
+ description:
605
+ 'Pull payment_inbox (default) and internalize paymail payments',
606
+ args: [
607
+ {
608
+ flag: '--url',
609
+ values: '<host>',
610
+ description:
611
+ 'MessageBox host (default https://messagebox.1sat.app)',
612
+ },
613
+ {
614
+ flag: '--box',
615
+ values: '<name>',
616
+ description: 'Inbox name (default payment_inbox)',
617
+ },
618
+ ],
534
619
  },
535
620
  ],
536
621
  },
@@ -566,7 +651,10 @@ export const COMMANDS: CommandSpec[] = [
566
651
  name: '(no subcommand)',
567
652
  description: 'Host server + monitor daemon',
568
653
  },
569
- { name: 'wallet', description: 'Wallet storage server only (BRC-100 HTTP)' },
654
+ {
655
+ name: 'wallet',
656
+ description: 'Wallet storage server only (BRC-100 HTTP)',
657
+ },
570
658
  { name: 'monitor', description: 'Monitor daemon only' },
571
659
  ],
572
660
  },
@@ -583,7 +671,7 @@ export const COMMANDS: CommandSpec[] = [
583
671
  args: [
584
672
  {
585
673
  flag: '--window',
586
- values: "<all|30d|12h|90m>",
674
+ values: '<all|30d|12h|90m>',
587
675
  required: true,
588
676
  description:
589
677
  "Only reqs created within the window; 'all' for every invalid record",
@@ -602,6 +690,27 @@ export const COMMANDS: CommandSpec[] = [
602
690
  },
603
691
 
604
692
  // Advanced
693
+ {
694
+ group: 'Advanced',
695
+ name: 'authfetch',
696
+ description:
697
+ 'HTTP request with BRC-104 AuthFetch using CLI wallet keys. On 402, confirms payment unless --yes.',
698
+ positional: '<method> <url>',
699
+ args: [
700
+ {
701
+ flag: '--body',
702
+ values: '<json|@file>',
703
+ description: 'Request body (JSON string or @path)',
704
+ },
705
+ {
706
+ flag: '--header',
707
+ values: "'Name: value'",
708
+ description: 'Extra header (repeatable)',
709
+ },
710
+ ],
711
+ notes:
712
+ "Examples:\n 1sat authfetch GET https://wallet.1sat.app/hosting/status\n 1sat authfetch GET https://wallet.1sat.app/hosting/price\n 1sat authfetch POST https://wallet.1sat.app/hosting/subscribe --body '{}' --yes",
713
+ },
605
714
  {
606
715
  group: 'Advanced',
607
716
  name: 'action',
package/src/main.ts CHANGED
@@ -12,17 +12,19 @@ import { resolve } from 'node:path'
12
12
  import { config as loadEnv } from 'dotenv'
13
13
  import { parseGlobalFlags } from './args'
14
14
  import { handleActionCommand } from './commands/action'
15
+ import { handleAuthfetchCommand } from './commands/authfetch'
15
16
  import { handleConfigCommand } from './commands/config'
16
17
  import { handleIdentityCommand } from './commands/identity'
17
18
  import { handleInitCommand } from './commands/init'
18
19
  import { handleLocksCommand } from './commands/locks'
19
20
  import { handleMcpProxyCommand } from './commands/mcp-proxy'
21
+ import { handleMessageboxCommand } from './commands/messagebox'
20
22
  import { handleOpnsCommand } from './commands/opns'
21
23
  import { handleOrdinalsCommand } from './commands/ordinals'
22
24
  import { handleRemoteCommand } from './commands/remote'
23
25
  import { handleServeCommand } from './commands/serve'
24
- import { handleStorageCommand } from './commands/storage'
25
26
  import { handleSocialCommand } from './commands/social'
27
+ import { handleStorageCommand } from './commands/storage'
26
28
  import { handleSweepCommand } from './commands/sweep'
27
29
  import { handleTokensCommand } from './commands/tokens'
28
30
  import { handleTxCommand } from './commands/tx'
@@ -87,6 +89,10 @@ async function main(): Promise<void> {
87
89
  await handleRemoteCommand(rest, flags)
88
90
  break
89
91
 
92
+ case 'authfetch':
93
+ await handleAuthfetchCommand(rest, flags)
94
+ break
95
+
90
96
  case 'wallet':
91
97
  await handleWalletCommand(rest, flags)
92
98
  break
@@ -95,7 +101,8 @@ async function main(): Promise<void> {
95
101
  await handleOrdinalsCommand(rest, flags)
96
102
  break
97
103
 
98
- case 'tokens':
104
+ case 'bsv21':
105
+ case 'tokens': // deprecated alias
99
106
  await handleTokensCommand(rest, flags)
100
107
  break
101
108
 
@@ -115,6 +122,10 @@ async function main(): Promise<void> {
115
122
  await handleOpnsCommand(rest, flags)
116
123
  break
117
124
 
125
+ case 'messagebox':
126
+ await handleMessageboxCommand(rest, flags)
127
+ break
128
+
118
129
  case 'sweep':
119
130
  await handleSweepCommand(rest, flags)
120
131
  break