balanceofsatoshis 19.3.4 → 19.4.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/bos +76 -0
  3. package/package.json +7 -7
package/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Versions
2
2
 
3
- ## 19.3.4
3
+ ## 19.4.0
4
+
5
+ - `create-fanout-group`, `join-fanout-group`: add commands for collab fanout
6
+
7
+ ## 19.3.5
4
8
 
5
9
  - Probing at low local balance value channels now corrects for fee buffer
6
10
 
package/bos CHANGED
@@ -591,6 +591,46 @@ prog
591
591
  });
592
592
  })
593
593
 
594
+ // Create a fanout group
595
+ .command('create-fanout-group', 'Coordinate a group to fanout utxos')
596
+ .help('Other nodes can join the group using join-channel-group')
597
+ .help('When using --allow, all joining nodes must be identified')
598
+ .help('To specify order of group pairings, order using --allow ordering')
599
+ .help('For 2 person channels the joining node is the channel initiator')
600
+ .option('--allow <public_key>', 'Only allow these nodes to join', REPEATABLE)
601
+ .option('--output-size <output_size>', 'Output size', INT, 5e6)
602
+ .option('--fee-rate <per_vbyte>', 'Chain fee rate for open', INT)
603
+ .option('--node <node_name>', 'Use saved node to create channels group')
604
+ .option('--size <count>', 'Number of group members', INT, 3)
605
+ .option('--output-count <count>', 'Number of fanout sized outputs', INT, 1)
606
+ .option('--select-utxos', 'Specify UTXOs to spend interactively from a list')
607
+ .option('--utxo <outpoint>', 'Spend a specific tx_id:vout', REPEATABLE)
608
+ .action((args, options, logger) => {
609
+ return new Promise(async (resolve, reject) => {
610
+ try {
611
+ const {lnd} = await lndForNode(logger, options.node);
612
+
613
+ const defaultRate = await lnService.getChainFeeRate({lnd});
614
+
615
+ return await paidServices.createGroupFanout({
616
+ lnd,
617
+ logger,
618
+ ask: await commands.interrogate({}),
619
+ capacity: options.outputSize,
620
+ count: options.size,
621
+ inputs: flatten([options.utxo].filter(n => !!n)),
622
+ is_selecting_utxos: options.selectUtxos || !options.utxo,
623
+ members: flatten([options.allow].filter(n => !!n)),
624
+ output_count: options.outputCount,
625
+ rate: options.feeRate || floor(defaultRate.tokens_per_vbyte),
626
+ },
627
+ responses.returnObject({exit, logger, reject, resolve}));
628
+ } catch (err) {
629
+ return logger.error({err}) && reject();
630
+ }
631
+ });
632
+ })
633
+
594
634
  // Export LND credentials
595
635
  .command('credentials', 'Export local credentials')
596
636
  .help('Output encrypted remote access credentials. Use with "nodes --add"')
@@ -1170,6 +1210,42 @@ prog
1170
1210
  });
1171
1211
  })
1172
1212
 
1213
+ // Join a fanout group
1214
+ .command('join-fanout-group', 'Join a group to fanout with peers')
1215
+ .help('Another node should have run create-fanout-group to create group')
1216
+ .argument('<code>', 'Invite code to join group', STRING)
1217
+ .option('--max-fee-rate <per_vbyte>', 'Maximum fee/vbyte for open', INT)
1218
+ .option('--node <node_name>', 'Use saved node to join group')
1219
+ .option('--output-count <count>', 'Number of outputs for fanout', INT, 1)
1220
+ .option('--select-utxos', 'Specify UTXOs to spend interactively from a list')
1221
+ .option('--utxo <outpoint>', 'Spend a specific tx_id:vout', REPEATABLE)
1222
+ .action((args, options, logger) => {
1223
+ return new Promise(async (resolve, reject) => {
1224
+ try {
1225
+ const {lnd} = await lndForNode(logger, options.node);
1226
+
1227
+ const defaultRate = await lnService.getChainFeeRate({
1228
+ confirmation_target: 2,
1229
+ lnd,
1230
+ });
1231
+
1232
+ return await paidServices.joinGroupFanout({
1233
+ lnd,
1234
+ logger,
1235
+ ask: await commands.interrogate({}),
1236
+ code: args.code,
1237
+ inputs: flatten([options.utxo].filter(n => !!n)),
1238
+ is_selecting_utxos: options.selectUtxos || !options.utxo,
1239
+ max_rate: options.maxFeeRate || defaultRate.tokens_per_vbyte,
1240
+ output_count: options.outputCount,
1241
+ },
1242
+ responses.returnObject({exit, logger, reject, resolve}));
1243
+ } catch (err) {
1244
+ return logger.error({err}) && reject();
1245
+ }
1246
+ });
1247
+ })
1248
+
1173
1249
  // Intercept forwarding requests, enforce requirements on acceptance
1174
1250
  .command('limit-forwarding', 'Enforce rules for routing payments')
1175
1251
  .help(`--deny option can be repeated for multiple denied from/to paths`)
package/package.json CHANGED
@@ -30,19 +30,19 @@
30
30
  "crypto-js": "4.2.0",
31
31
  "csv-parse": "5.5.6",
32
32
  "ecpair": "2.1.0",
33
- "goldengate": "14.0.8",
33
+ "goldengate": "14.0.9",
34
34
  "grammy": "1.30.0",
35
35
  "hot-formula-parser": "4.0.0",
36
36
  "import-lazy": "4.0.0",
37
37
  "ini": "5.0.0",
38
- "inquirer": "11.0.2",
39
- "ln-accounting": "8.0.4",
40
- "ln-service": "57.20.2",
38
+ "inquirer": "12.0.0",
39
+ "ln-accounting": "8.0.5",
40
+ "ln-service": "57.22.0",
41
41
  "ln-sync": "6.4.0",
42
- "ln-telegram": "6.1.7",
42
+ "ln-telegram": "6.1.10",
43
43
  "minimist": "1.2.8",
44
44
  "moment": "2.30.1",
45
- "paid-services": "6.1.5",
45
+ "paid-services": "6.2.0",
46
46
  "probing": "5.0.3",
47
47
  "psbt": "3.0.0",
48
48
  "qrcode-terminal": "0.12.0",
@@ -83,5 +83,5 @@
83
83
  "postpublish": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t alexbosworth/balanceofsatoshis -t alexbosworth/balanceofsatoshis:$npm_package_version --push .",
84
84
  "test": "npx nyc@17.0.0 node --experimental-test-coverage --test test/arrays/*.js test/balances/*.js test/chain/*.js test/display/*.js test/encryption/*.js test/lnd/*.js test/network/*.js test/nodes/*.js test/peers/*.js test/responses/*.js test/routing/*.js test/services/*.js test/swaps/*.js test/tags/*.js test/telegram/*.js test/wallets/*.js"
85
85
  },
86
- "version": "19.3.4"
86
+ "version": "19.4.0"
87
87
  }