@1sat/cli 0.0.129 → 0.0.130

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/cli.js CHANGED
@@ -1423,11 +1423,11 @@ var init_help = __esm(() => {
1423
1423
  {
1424
1424
  group: "Wallet",
1425
1425
  name: "messagebox",
1426
- description: "MessageBox inbox (paymail remittances). Not the same as `wallet sync` (address/owner scan).",
1426
+ description: "MessageBox inboxes (paymail remittances, BRC-169 handle payments). Not the same as `wallet sync` (address/owner scan).",
1427
1427
  subcommands: [
1428
1428
  {
1429
1429
  name: "sync",
1430
- description: "Pull payment_inbox (default) and internalize paymail payments",
1430
+ description: "Pull payment_inbox (default) and internalize paymail payments, then metanet_inbox (BRC-169 handle payments)",
1431
1431
  args: [
1432
1432
  {
1433
1433
  flag: "--url",
@@ -1437,7 +1437,7 @@ var init_help = __esm(() => {
1437
1437
  {
1438
1438
  flag: "--box",
1439
1439
  values: "<name>",
1440
- description: "Inbox name (default payment_inbox)"
1440
+ description: "Paymail inbox name (default payment_inbox); metanet_inbox is always pulled"
1441
1441
  }
1442
1442
  ]
1443
1443
  }
@@ -2614,7 +2614,7 @@ var init_mcp_proxy = __esm(() => {
2614
2614
  });
2615
2615
 
2616
2616
  // src/commands/messagebox.ts
2617
- import { syncMessages } from "@1sat/actions";
2617
+ import { syncMessages, syncMetanetInbox } from "@1sat/actions";
2618
2618
  async function handleMessageboxCommand(args, opts) {
2619
2619
  const [subcommand, ...rest] = args;
2620
2620
  switch (subcommand) {
@@ -2639,13 +2639,20 @@ async function messageboxSync(args, opts) {
2639
2639
  ...url ? { messageboxUrl: url } : {},
2640
2640
  ...box ? { messageBox: box } : {}
2641
2641
  });
2642
+ const metanet = await syncMetanetInbox.execute(ctx, {
2643
+ ...url ? { messageboxUrl: url } : {}
2644
+ });
2642
2645
  if (opts.json) {
2643
- output(result, opts);
2646
+ output({ ...result, metanet }, opts);
2644
2647
  return;
2645
2648
  }
2646
2649
  console.log(`
2647
- processed: ${result.processed} failed: ${result.failed}
2648
- `);
2650
+ processed: ${result.processed} failed: ${result.failed}`);
2651
+ console.log(`metanet_inbox: received ${metanet.received.length} skipped ${metanet.skipped.length}${metanet.error ? ` error: ${metanet.error}` : ""}`);
2652
+ for (const s of metanet.skipped) {
2653
+ console.log(` skipped ${s.messageId}: ${s.reason}`);
2654
+ }
2655
+ console.log();
2649
2656
  } finally {
2650
2657
  await destroy();
2651
2658
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1sat/cli",
3
- "version": "0.0.129",
3
+ "version": "0.0.130",
4
4
  "description": "CLI for 1Sat Ordinals SDK",
5
5
  "type": "module",
6
6
  "main": "./dist/cli.js",
@@ -27,12 +27,12 @@
27
27
  ],
28
28
  "license": "MIT",
29
29
  "dependencies": {
30
- "@1sat/actions": "0.0.231",
31
- "@1sat/client": "0.0.60",
32
- "@1sat/types": "0.0.51",
33
- "@1sat/wallet": "0.0.117",
34
- "@1sat/wallet-node": "0.0.84",
35
- "@1sat/wallet-server": "0.0.62",
30
+ "@1sat/actions": "0.0.232",
31
+ "@1sat/client": "0.0.61",
32
+ "@1sat/types": "0.0.52",
33
+ "@1sat/wallet": "0.0.118",
34
+ "@1sat/wallet-node": "0.0.85",
35
+ "@1sat/wallet-server": "0.0.63",
36
36
  "@bopen-io/messagebox-server": "^1.3.2",
37
37
  "@bsv/sdk": "^2.6.0",
38
38
  "@bsv/wallet-toolbox": "npm:@bopen-io/wallet-toolbox@2.14.6",
@@ -1,10 +1,11 @@
1
1
  /**
2
- * MessageBox commands — pull paymail / P2P inbox into the wallet.
2
+ * MessageBox commands — pull paymail / P2P inbox and BRC-169 handle
3
+ * payments (`metanet_inbox`) into the wallet.
3
4
  *
4
5
  * 1sat messagebox sync [--url <host>] [--box <name>]
5
6
  */
6
7
 
7
- import { syncMessages } from '@1sat/actions'
8
+ import { syncMessages, syncMetanetInbox } from '@1sat/actions'
8
9
  import type { GlobalFlags } from '../args.js'
9
10
  import { extractFlag } from '../args.js'
10
11
  import { loadContext } from '../context.js'
@@ -46,13 +47,23 @@ async function messageboxSync(
46
47
  ...(url ? { messageboxUrl: url } : {}),
47
48
  ...(box ? { messageBox: box } : {}),
48
49
  })
50
+ const metanet = await syncMetanetInbox.execute(ctx, {
51
+ ...(url ? { messageboxUrl: url } : {}),
52
+ })
49
53
 
50
54
  if (opts.json) {
51
- output(result, opts)
55
+ output({ ...result, metanet }, opts)
52
56
  return
53
57
  }
54
58
 
55
- console.log(`\nprocessed: ${result.processed} failed: ${result.failed}\n`)
59
+ console.log(`\nprocessed: ${result.processed} failed: ${result.failed}`)
60
+ console.log(
61
+ `metanet_inbox: received ${metanet.received.length} skipped ${metanet.skipped.length}${metanet.error ? ` error: ${metanet.error}` : ''}`,
62
+ )
63
+ for (const s of metanet.skipped) {
64
+ console.log(` skipped ${s.messageId}: ${s.reason}`)
65
+ }
66
+ console.log()
56
67
  } finally {
57
68
  await destroy()
58
69
  }
package/src/help.ts CHANGED
@@ -671,12 +671,12 @@ export const COMMANDS: CommandSpec[] = [
671
671
  group: 'Wallet',
672
672
  name: 'messagebox',
673
673
  description:
674
- 'MessageBox inbox (paymail remittances). Not the same as `wallet sync` (address/owner scan).',
674
+ 'MessageBox inboxes (paymail remittances, BRC-169 handle payments). Not the same as `wallet sync` (address/owner scan).',
675
675
  subcommands: [
676
676
  {
677
677
  name: 'sync',
678
678
  description:
679
- 'Pull payment_inbox (default) and internalize paymail payments',
679
+ 'Pull payment_inbox (default) and internalize paymail payments, then metanet_inbox (BRC-169 handle payments)',
680
680
  args: [
681
681
  {
682
682
  flag: '--url',
@@ -687,7 +687,8 @@ export const COMMANDS: CommandSpec[] = [
687
687
  {
688
688
  flag: '--box',
689
689
  values: '<name>',
690
- description: 'Inbox name (default payment_inbox)',
690
+ description:
691
+ 'Paymail inbox name (default payment_inbox); metanet_inbox is always pulled',
691
692
  },
692
693
  ],
693
694
  },