mirror of
https://github.com/alexbosworth/balanceofsatoshis.git
synced 2026-08-13 12:33:37 +02:00
pass min reserve argument through to opens
This commit is contained in:
parent
d8820d8085
commit
8a0ceec1ca
7 changed files with 35 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# Versions
|
||||
|
||||
## 19.5.0
|
||||
## 19.5.1
|
||||
|
||||
- `open`: allow going below safety minimum on remote reserve via
|
||||
`--allow-minimal-reserve`
|
||||
|
|
|
|||
2
bos
2
bos
|
|
@ -1446,7 +1446,7 @@ prog
|
|||
.help('Trusted channel funding is not supported in LND 0.15.0 and below')
|
||||
.help('Simplified Taproot channels are not supported in LND 0.17.0 & below')
|
||||
.argument('<peer_public_keys...>', 'With nodes with public keys')
|
||||
.option('--allow-minimal-reserve', 'Allow peer to have minimal reserve')
|
||||
.option('--allow-minimal-reserve', 'Allow peers to have minimal reserve')
|
||||
.option('--amount <channel_capacity>', 'Capacities to open', REPEATABLE)
|
||||
.option('--avoid-broadcast', 'Avoid broadcasting channel open transaction')
|
||||
.option('--commitment <type>', 'default or simplified_taproot', REPEATABLE)
|
||||
|
|
|
|||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "balanceofsatoshis",
|
||||
"version": "19.5.0",
|
||||
"version": "19.5.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "balanceofsatoshis",
|
||||
"version": "19.5.0",
|
||||
"version": "19.5.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@alexbosworth/blockchain": "2.0.0",
|
||||
|
|
|
|||
|
|
@ -82,5 +82,5 @@
|
|||
"postpublish": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t alexbosworth/balanceofsatoshis -t alexbosworth/balanceofsatoshis:$npm_package_version --push .",
|
||||
"test": "npx nyc@17.1.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"
|
||||
},
|
||||
"version": "19.5.0"
|
||||
"version": "19.5.1"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ const uniq = arr => Array.from(new Set(arr));
|
|||
capacities: [<Channel Capacity Tokens Number>]
|
||||
commitments: [<Channel Commitment Types String>]
|
||||
gives: [<Give Tokens String>]
|
||||
[is_allowing_minimal_reserve]: <Allow Peers to Have Minimal Reserve Bool>
|
||||
nodes: [<Channel Partner Node Identity Public Key Hex String>]
|
||||
rates: [<Set Fee Rate String>]
|
||||
saved: [<Open on Saved Node Name String>]
|
||||
|
|
@ -28,6 +29,7 @@ const uniq = arr => Array.from(new Set(arr));
|
|||
[cooperative_close_address]: <Restrict Coop Close to Address String>
|
||||
description: <Channel Description String>
|
||||
[give_tokens]: <Give Tokens Number>
|
||||
[is_allowing_minimal_reserve]: <Allow Minimal Reserve Bool>
|
||||
is_private: <Channel Is Private Bool>
|
||||
is_simplified_taproot: <Channel Is Taproot Bool>
|
||||
partner_public_key: <Channel Partner Identity Public Key Hex String>
|
||||
|
|
@ -45,6 +47,7 @@ module.exports = args => {
|
|||
description: defaultChannelDescription,
|
||||
fee_rate: numericFeeRate(args.rates[i]),
|
||||
give_tokens: !!args.gives[i] ? Number(args.gives[i]) : undefined,
|
||||
is_allowing_minimal_reserve: args.is_allowing_minimal_reserve,
|
||||
is_private: !!args.types[i] && privateTypes.includes(args.types[i]),
|
||||
is_simplified_taproot: isSimpleP2tr(args.commitments, i),
|
||||
is_trusted_funding: !!args.types[i] && isTrusted(args.types[i]),
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ const utxoPollingTimes = 20;
|
|||
getFile: <Read File Contents Function> (path, cbk) => {}
|
||||
}
|
||||
gives: [<New Channel Give Tokens Number>]
|
||||
[is_allowing_minimal_reserve]: <Allow Peers to Have Minimal Reserve Bool>
|
||||
[is_avoiding_broadcast]: <Avoid Funding Transaction Broadcast Bool>
|
||||
[is_external]: <Use External Funds to Open Channels Bool>
|
||||
lnd: <Authenticated LND API Object>
|
||||
|
|
|
|||
|
|
@ -33,6 +33,29 @@ const tests = [
|
|||
description: 'bos open',
|
||||
fee_rate: undefined,
|
||||
give_tokens: 1,
|
||||
is_allowing_minimal_reserve: undefined,
|
||||
is_private: true,
|
||||
is_simplified_taproot: false,
|
||||
is_trusted_funding: false,
|
||||
node: undefined,
|
||||
partner_public_key: Buffer.alloc(33, 3).toString('hex'),
|
||||
rate: undefined,
|
||||
}],
|
||||
}],
|
||||
},
|
||||
},
|
||||
{
|
||||
args: makeArgs({is_allowing_minimal_reserve: true}),
|
||||
description: 'Arguments are mapped to channel details with min reserve',
|
||||
expected: {
|
||||
opens: [{
|
||||
channels: [{
|
||||
capacity: 2,
|
||||
cooperative_close_address: 'address',
|
||||
description: 'bos open',
|
||||
fee_rate: undefined,
|
||||
give_tokens: 1,
|
||||
is_allowing_minimal_reserve: true,
|
||||
is_private: true,
|
||||
is_simplified_taproot: false,
|
||||
is_trusted_funding: false,
|
||||
|
|
@ -59,6 +82,7 @@ const tests = [
|
|||
description: 'bos open',
|
||||
fee_rate: undefined,
|
||||
give_tokens: undefined,
|
||||
is_allowing_minimal_reserve: undefined,
|
||||
is_private: false,
|
||||
is_simplified_taproot: false,
|
||||
is_trusted_funding: false,
|
||||
|
|
@ -89,6 +113,7 @@ const tests = [
|
|||
description: 'bos open',
|
||||
fee_rate: 1,
|
||||
give_tokens: 3,
|
||||
is_allowing_minimal_reserve: undefined,
|
||||
is_private: true,
|
||||
is_simplified_taproot: false,
|
||||
is_trusted_funding: false,
|
||||
|
|
@ -105,6 +130,7 @@ const tests = [
|
|||
description: 'bos open',
|
||||
fee_rate: 2,
|
||||
give_tokens: 4,
|
||||
is_allowing_minimal_reserve: undefined,
|
||||
is_private: false,
|
||||
is_simplified_taproot: false,
|
||||
is_trusted_funding: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue