ln-service 59.4.1 → 59.6.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.
- package/CHANGELOG.md +15 -0
- package/README.md +57 -8
- package/package.json +9 -4
- package/.gitattributes +0 -1
- package/.tm_properties +0 -1
- package/test/autopilotrpc-integration/test_autopilot.js +0 -87
- package/test/chainrpc-integration/test_get_block.js +0 -58
- package/test/chainrpc-integration/test_get_block_header.js +0 -62
- package/test/chainrpc-integration/test_get_height.js +0 -42
- package/test/chainrpc-integration/test_subscribe_to_blocks.js +0 -97
- package/test/chainrpc-integration/test_subscribe_to_chain_address.js +0 -119
- package/test/chainrpc-integration/test_subscribe_to_chain_spend.js +0 -116
- package/test/integration/test_add_peer.js +0 -59
- package/test/integration/test_cancel_pending_channel.js +0 -46
- package/test/integration/test_close_channel.js +0 -60
- package/test/integration/test_close_wait_pending.js +0 -121
- package/test/integration/test_create_chain_address.js +0 -63
- package/test/integration/test_create_invoice.js +0 -49
- package/test/integration/test_decode_payment_request.js +0 -75
- package/test/integration/test_delete_payment.js +0 -38
- package/test/integration/test_delete_payments.js +0 -42
- package/test/integration/test_delete_pending_channel.js +0 -202
- package/test/integration/test_encrypted_routes.js +0 -66
- package/test/integration/test_get_access_ids.js +0 -27
- package/test/integration/test_get_backup.js +0 -40
- package/test/integration/test_get_backups.js +0 -38
- package/test/integration/test_get_chain_balance.js +0 -36
- package/test/integration/test_get_chain_fee_estimate.js +0 -63
- package/test/integration/test_get_chain_transactions.js +0 -83
- package/test/integration/test_get_channel.js +0 -64
- package/test/integration/test_get_channel_balance.js +0 -23
- package/test/integration/test_get_channels.js +0 -84
- package/test/integration/test_get_closed_channels.js +0 -275
- package/test/integration/test_get_configuration.js +0 -35
- package/test/integration/test_get_failed_payments.js +0 -164
- package/test/integration/test_get_fee_rates.js +0 -40
- package/test/integration/test_get_forwards.js +0 -144
- package/test/integration/test_get_invoice.js +0 -67
- package/test/integration/test_get_invoices.js +0 -88
- package/test/integration/test_get_methods.js +0 -30
- package/test/integration/test_get_network_centrality.js +0 -72
- package/test/integration/test_get_network_graph.js +0 -87
- package/test/integration/test_get_network_info.js +0 -33
- package/test/integration/test_get_node.js +0 -117
- package/test/integration/test_get_payments.js +0 -69
- package/test/integration/test_get_peers.js +0 -58
- package/test/integration/test_get_pending_coop.js +0 -122
- package/test/integration/test_get_pending_force.js +0 -172
- package/test/integration/test_get_pending_payments.js +0 -86
- package/test/integration/test_get_route_to_destination.js +0 -153
- package/test/integration/test_get_settlement_status.js +0 -78
- package/test/integration/test_get_utxos.js +0 -49
- package/test/integration/test_get_wallet_info.js +0 -55
- package/test/integration/test_grant_access.js +0 -69
- package/test/integration/test_open_channel.js +0 -93
- package/test/integration/test_open_channel_max.js +0 -92
- package/test/integration/test_open_channels.js +0 -164
- package/test/integration/test_open_low_reserve.js +0 -92
- package/test/integration/test_open_simplified_taproot.js +0 -174
- package/test/integration/test_open_standard_taproot.js +0 -94
- package/test/integration/test_pay.js +0 -149
- package/test/integration/test_pay_private_invoice.js +0 -120
- package/test/integration/test_payment_errors.js +0 -102
- package/test/integration/test_propose_channel.js +0 -474
- package/test/integration/test_push_funds.js +0 -82
- package/test/integration/test_rebalance.js +0 -70
- package/test/integration/test_recover_funds_from_channel.js +0 -207
- package/test/integration/test_recover_funds_from_channels.js +0 -203
- package/test/integration/test_remove_peer.js +0 -52
- package/test/integration/test_restrict_macaroon.js +0 -96
- package/test/integration/test_revoke_access.js +0 -41
- package/test/integration/test_send_message_to_peer.js +0 -91
- package/test/integration/test_send_to_chain_address.js +0 -109
- package/test/integration/test_send_to_chain_addresses.js +0 -71
- package/test/integration/test_sign_message.js +0 -22
- package/test/integration/test_stop_daemon.js +0 -33
- package/test/integration/test_subscribe_to_backups.js +0 -94
- package/test/integration/test_subscribe_to_channels.js +0 -186
- package/test/integration/test_subscribe_to_graph.js +0 -176
- package/test/integration/test_subscribe_to_invoices.js +0 -147
- package/test/integration/test_subscribe_to_messages.js +0 -180
- package/test/integration/test_subscribe_to_open_requests.js +0 -167
- package/test/integration/test_subscribe_to_peer_messages.js +0 -130
- package/test/integration/test_subscribe_to_peers.js +0 -61
- package/test/integration/test_subscribe_to_rpc_requests.js +0 -309
- package/test/integration/test_subscribe_to_transactions.js +0 -93
- package/test/integration/test_trusted_funding.js +0 -298
- package/test/integration/test_trusted_open.js +0 -94
- package/test/integration/test_update_routing_fees.js +0 -108
- package/test/integration/test_verify_access.js +0 -38
- package/test/integration/test_verify_backup.js +0 -53
- package/test/integration/test_verify_backups.js +0 -54
- package/test/integration/test_verify_message.js +0 -24
- package/test/invoicesrpc-integration/test_cancel_invoice.js +0 -91
- package/test/invoicesrpc-integration/test_create_hinted_invoice.js +0 -95
- package/test/invoicesrpc-integration/test_get_sweep_transactions.js +0 -124
- package/test/invoicesrpc-integration/test_push_payment.js +0 -92
- package/test/invoicesrpc-integration/test_settle_invoice.js +0 -136
- package/test/invoicesrpc-integration/test_subscribe_cancel_invoice.js +0 -124
- package/test/invoicesrpc-integration/test_subscribe_settle_invoice.js +0 -123
- package/test/macros/index.js +0 -19
- package/test/macros/setup_channel.js +0 -101
- package/test/macros/wait_for_channel.js +0 -99
- package/test/macros/wait_for_pending_channel.js +0 -52
- package/test/macros/wait_for_route.js +0 -76
- package/test/macros/wait_for_termination.js +0 -29
- package/test/macros/wait_for_utxo.js +0 -56
- package/test/peersrpc-integration/test_add_advertised_feature.js +0 -43
- package/test/peersrpc-integration/test_add_external_socket.js +0 -36
- package/test/peersrpc-integration/test_remove_advertised_feature.js +0 -37
- package/test/peersrpc-integration/test_remove_external_socket.js +0 -34
- package/test/peersrpc-integration/test_update_alias.js +0 -33
- package/test/peersrpc-integration/test_update_color.js +0 -33
- package/test/routerrpc-integration/test_delete_forwarding_reputations.js +0 -101
- package/test/routerrpc-integration/test_disable_channel.js +0 -41
- package/test/routerrpc-integration/test_get_forwarding_confidence.js +0 -90
- package/test/routerrpc-integration/test_get_forwarding_reputations.js +0 -128
- package/test/routerrpc-integration/test_get_pathfinding_settings.js +0 -40
- package/test/routerrpc-integration/test_get_payment.js +0 -130
- package/test/routerrpc-integration/test_get_route_confidence.js +0 -77
- package/test/routerrpc-integration/test_get_route_through_hops.js +0 -148
- package/test/routerrpc-integration/test_get_routing_fee_estimate.js +0 -76
- package/test/routerrpc-integration/test_is_destination_payable.js +0 -53
- package/test/routerrpc-integration/test_multipath_payment.js +0 -178
- package/test/routerrpc-integration/test_pay_via_payment_details.js +0 -175
- package/test/routerrpc-integration/test_pay_via_payment_request.js +0 -151
- package/test/routerrpc-integration/test_pay_via_routes.js +0 -224
- package/test/routerrpc-integration/test_probe_for_route.js +0 -150
- package/test/routerrpc-integration/test_route_from_channels_complex.js +0 -327
- package/test/routerrpc-integration/test_route_from_channels_simple.js +0 -151
- package/test/routerrpc-integration/test_subscribe_to_forward_requests.js +0 -225
- package/test/routerrpc-integration/test_subscribe_to_forwards.js +0 -552
- package/test/routerrpc-integration/test_subscribe_to_past_payments.js +0 -81
- package/test/routerrpc-integration/test_subscribe_to_payments.js +0 -115
- package/test/routerrpc-integration/test_update_pathfinding_settings.js +0 -71
- package/test/runner.js +0 -30
- package/test/signerrpc-integration/test_begin_group_signing_session.js +0 -505
- package/test/signerrpc-integration/test_diffie_hellman_compute_secret.js +0 -37
- package/test/signerrpc-integration/test_sign_bytes.js +0 -76
- package/test/signerrpc-integration/test_sign_taproot.js +0 -436
- package/test/signerrpc-integration/test_sign_transaction.js +0 -35
- package/test/signerrpc-integration/test_verify_bytes_signature.js +0 -103
- package/test/tower_clientrpc-integration/test_connect_watchtower.js +0 -60
- package/test/tower_clientrpc-integration/test_get_connected_watchtowers.js +0 -70
- package/test/tower_serverrpc-integration/test_get_tower_server_info.js +0 -34
- package/test/versionrpc-integration/test_get_wallet_version.js +0 -38
- package/test/walletrpc-integration/test_broadcast_chain_transaction.js +0 -62
- package/test/walletrpc-integration/test_create_funded_psbt.js +0 -141
- package/test/walletrpc-integration/test_delete_chain_transaction.js +0 -82
- package/test/walletrpc-integration/test_fund_psbt.js +0 -489
- package/test/walletrpc-integration/test_get_chain_addresses.js +0 -60
- package/test/walletrpc-integration/test_get_chain_fee_rate.js +0 -24
- package/test/walletrpc-integration/test_get_chain_transaction.js +0 -70
- package/test/walletrpc-integration/test_get_locked_utxos.js +0 -67
- package/test/walletrpc-integration/test_get_master_public_keys.js +0 -84
- package/test/walletrpc-integration/test_get_minimum_relay_fee.js +0 -26
- package/test/walletrpc-integration/test_get_pending_sweeps.js +0 -83
- package/test/walletrpc-integration/test_get_public_key.js +0 -28
- package/test/walletrpc-integration/test_lock_utxo.js +0 -80
- package/test/walletrpc-integration/test_partially_sign_psbt.js +0 -224
- package/test/walletrpc-integration/test_request_batched_fee_increase.js +0 -60
- package/test/walletrpc-integration/test_request_chain_fee_increase.js +0 -63
- package/test/walletrpc-integration/test_send_to_chain_output_scripts.js +0 -69
- package/test/walletrpc-integration/test_sign_chain_address_message.js +0 -32
- package/test/walletrpc-integration/test_sign_psbt.js +0 -108
- package/test/walletrpc-integration/test_unlock_utxo.js +0 -72
- package/test/walletrpc-integration/test_update_chain_transaction.js +0 -43
- package/test/walletrpc-integration/test_verify_chain_address_message.js +0 -60
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Versions
|
|
2
2
|
|
|
3
|
+
## 59.6.0
|
|
4
|
+
|
|
5
|
+
- `payViaRoutes`, `subscribeToPayViaRoutes`: Add support for routes into
|
|
6
|
+
blinded paths: `encrypted_data` on blinded path hops and `path_key` on the
|
|
7
|
+
introduction node hop
|
|
8
|
+
- `probeForRoute`, `subscribeToProbeForRoute`: Add `paths` to probe to blinded
|
|
9
|
+
paths: find a route to a path introduction node and return a route that
|
|
10
|
+
continues into the blinded path
|
|
11
|
+
|
|
12
|
+
## 59.5.0
|
|
13
|
+
|
|
14
|
+
- `createSignedRequest`: Add support for signing BLIP39 path payment requests
|
|
15
|
+
- `createUnsignedRequest`: Add support for specifying BLIP39 payment req paths
|
|
16
|
+
- `parsePaymentRequest`: Add support for parsing BLIP39 payment request paths
|
|
17
|
+
|
|
3
18
|
## 59.4.1
|
|
4
19
|
|
|
5
20
|
- `subscribeToForwardRequests`: Invalid requests to forward more than the
|
package/README.md
CHANGED
|
@@ -4576,6 +4576,7 @@ Requires `offchain:write` permission
|
|
|
4576
4576
|
fee_mtokens: <Total Fee Millitokens To Pay String>
|
|
4577
4577
|
hops: [{
|
|
4578
4578
|
channel: <Standard Format Channel Id String>
|
|
4579
|
+
[encrypted_data]: <Blinded Path Encrypted Data Hex String>
|
|
4579
4580
|
fee: <Fee Number>
|
|
4580
4581
|
fee_mtokens: <Fee Millitokens String>
|
|
4581
4582
|
forward: <Forward Tokens Number>
|
|
@@ -4584,6 +4585,7 @@ Requires `offchain:write` permission
|
|
|
4584
4585
|
type: <Message Type Number String>
|
|
4585
4586
|
value: <Message Raw Value Hex Encoded String>
|
|
4586
4587
|
}]
|
|
4588
|
+
[path_key]: <Blinded Path Key Hex String>
|
|
4587
4589
|
[public_key]: <Public Key Hex String>
|
|
4588
4590
|
timeout: <Timeout Block Height Number>
|
|
4589
4591
|
}]
|
|
@@ -4592,19 +4594,21 @@ Requires `offchain:write` permission
|
|
|
4592
4594
|
value: <Message Raw Value Hex Encoded String>
|
|
4593
4595
|
}]
|
|
4594
4596
|
mtokens: <Total Millitokens To Pay String>
|
|
4597
|
+
[payment]: <Payment Identifier Hex String>
|
|
4595
4598
|
timeout: <Expiration Block Height Number>
|
|
4596
4599
|
tokens: <Total Tokens To Pay Number>
|
|
4600
|
+
[total_mtokens]: <Total Millitokens String>
|
|
4597
4601
|
}]
|
|
4598
4602
|
}
|
|
4599
4603
|
|
|
4600
4604
|
@returns via cbk or Promise
|
|
4601
4605
|
{
|
|
4606
|
+
confirmed_at: <Payment Confirmed At ISO 8601 Date String>
|
|
4602
4607
|
failures: [[
|
|
4603
4608
|
<Failure Code Number>
|
|
4604
4609
|
<Failure Code Message String>
|
|
4605
4610
|
<Failure Code Details Object>
|
|
4606
4611
|
]]
|
|
4607
|
-
confirmed_at: <Payment Confirmed At ISO 8601 Date String>
|
|
4608
4612
|
fee: <Fee Paid Tokens Number>
|
|
4609
4613
|
fee_mtokens: <Fee Paid Millitokens String>
|
|
4610
4614
|
hops: [{
|
|
@@ -4697,10 +4701,12 @@ Requires `offchain:write` permission
|
|
|
4697
4701
|
|
|
4698
4702
|
Preferred `confidence` is not supported on LND 0.14.5 and below
|
|
4699
4703
|
|
|
4704
|
+
`paths` are blinded paths. If using, `destination` is not required.
|
|
4705
|
+
|
|
4700
4706
|
{
|
|
4701
4707
|
[cltv_delta]: <Final CLTV Delta Number>
|
|
4702
4708
|
[confidence]: <Preferred Route Confidence Number Out of One Million Number>
|
|
4703
|
-
destination: <Destination Public Key Hex String>
|
|
4709
|
+
[destination]: <Destination Public Key Hex String>
|
|
4704
4710
|
[features]: [{
|
|
4705
4711
|
bit: <Feature Bit Number>
|
|
4706
4712
|
}]
|
|
@@ -4722,10 +4728,23 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
|
|
|
4722
4728
|
[mtokens]: <Millitokens to Pay String>
|
|
4723
4729
|
[outgoing_channel]: <Outgoing Channel Id String>
|
|
4724
4730
|
[path_timeout_ms]: <Time to Spend On A Path Milliseconds Number>
|
|
4731
|
+
[paths]: [{
|
|
4732
|
+
base_fee_mtokens: <Accumulated Base Fee Millitokens String>
|
|
4733
|
+
cltv_delta: <Accumulated CLTV Expiry Delta Number>
|
|
4734
|
+
fee_rate: <Accumulated Fee Rate Millitokens Per Million Number>
|
|
4735
|
+
hops: [{
|
|
4736
|
+
encrypted_data: <Encrypted Recipient Data Hex String>
|
|
4737
|
+
relay_key: <Relaying Node Public Key Hex String>
|
|
4738
|
+
}]
|
|
4739
|
+
[introduction_node]: <Introduction Node Public Key Hex String>
|
|
4740
|
+
key: <First Hop Path Key Public Key Hex String>
|
|
4741
|
+
[max_htlc_mtokens]: <Maximum HTLC Millitokens String>
|
|
4742
|
+
[min_htlc_mtokens]: <Minimum HTLC Millitokens String>
|
|
4743
|
+
}]
|
|
4725
4744
|
[payment]: <Payment Identifier Hex String>
|
|
4726
4745
|
[probe_timeout_ms]: <Probe Timeout Milliseconds Number>
|
|
4727
4746
|
[routes]: [[{
|
|
4728
|
-
[base_fee_mtokens]: <Base Routing Fee In Millitokens
|
|
4747
|
+
[base_fee_mtokens]: <Base Routing Fee In Millitokens String>
|
|
4729
4748
|
[channel]: <Standard Format Channel Id String>
|
|
4730
4749
|
[cltv_delta]: <CLTV Blocks Delta Number>
|
|
4731
4750
|
[fee_rate]: <Fee Rate In Millitokens Per Million Number>
|
|
@@ -4743,10 +4762,12 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
|
|
|
4743
4762
|
fee_mtokens: <Route Fee Millitokens String>
|
|
4744
4763
|
hops: [{
|
|
4745
4764
|
channel: <Standard Format Channel Id String>
|
|
4765
|
+
[encrypted_data]: <Blinded Path Encrypted Data Hex String>
|
|
4746
4766
|
fee: <Fee Number>
|
|
4747
4767
|
fee_mtokens: <Fee Millitokens String>
|
|
4748
4768
|
forward: <Forward Tokens Number>
|
|
4749
4769
|
forward_mtokens: <Forward Millitokens String>
|
|
4770
|
+
[path_key]: <Blinded Path Key Hex String>
|
|
4750
4771
|
public_key: <Forward Edge Public Key Hex String>
|
|
4751
4772
|
timeout: <Timeout Block Height Number>
|
|
4752
4773
|
}]
|
|
@@ -6835,13 +6856,14 @@ Requires `offchain:write` permission
|
|
|
6835
6856
|
|
|
6836
6857
|
{
|
|
6837
6858
|
[id]: <Payment Hash Hex String>
|
|
6838
|
-
lnd: <Authenticated LND
|
|
6859
|
+
lnd: <Authenticated LND API Object>
|
|
6839
6860
|
[pathfinding_timeout]: <Time to Spend Finding a Route Milliseconds Number>
|
|
6840
6861
|
routes: [{
|
|
6841
6862
|
fee: <Total Fee Tokens To Pay Number>
|
|
6842
6863
|
fee_mtokens: <Total Fee Millitokens To Pay String>
|
|
6843
6864
|
hops: [{
|
|
6844
6865
|
channel: <Standard Format Channel Id String>
|
|
6866
|
+
[encrypted_data]: <Blinded Path Encrypted Data Hex String>
|
|
6845
6867
|
fee: <Fee Number>
|
|
6846
6868
|
fee_mtokens: <Fee Millitokens String>
|
|
6847
6869
|
forward: <Forward Tokens Number>
|
|
@@ -6850,6 +6872,7 @@ Requires `offchain:write` permission
|
|
|
6850
6872
|
type: <Message Type Number String>
|
|
6851
6873
|
value: <Message Raw Value Hex Encoded String>
|
|
6852
6874
|
}]
|
|
6875
|
+
[path_key]: <Blinded Path Key Hex String>
|
|
6853
6876
|
public_key: <Public Key Hex String>
|
|
6854
6877
|
timeout: <Timeout Block Height Number>
|
|
6855
6878
|
}]
|
|
@@ -6858,8 +6881,10 @@ Requires `offchain:write` permission
|
|
|
6858
6881
|
value: <Message Raw Value Hex Encoded String>
|
|
6859
6882
|
}]
|
|
6860
6883
|
mtokens: <Total Millitokens To Pay String>
|
|
6884
|
+
[payment]: <Payment Identifier Hex String>
|
|
6861
6885
|
timeout: <Expiration Block Height Number>
|
|
6862
6886
|
tokens: <Total Tokens To Pay Number>
|
|
6887
|
+
[total_mtokens]: <Total Millitokens String>
|
|
6863
6888
|
}]
|
|
6864
6889
|
}
|
|
6865
6890
|
|
|
@@ -6876,6 +6901,7 @@ Requires `offchain:write` permission
|
|
|
6876
6901
|
<Failure Message String>
|
|
6877
6902
|
{
|
|
6878
6903
|
channel: <Standard Format Channel Id String>
|
|
6904
|
+
[index]: <Failure Hop Index Number>
|
|
6879
6905
|
[mtokens]: <Millitokens String>
|
|
6880
6906
|
[policy]: {
|
|
6881
6907
|
base_fee_mtokens: <Base Fee Millitokens String>
|
|
@@ -6920,6 +6946,7 @@ Requires `offchain:write` permission
|
|
|
6920
6946
|
@event 'routing_failure'
|
|
6921
6947
|
{
|
|
6922
6948
|
[channel]: <Standard Format Channel Id String>
|
|
6949
|
+
[height]: <Failure Height Context Number>
|
|
6923
6950
|
[index]: <Failure Hop Index Number>
|
|
6924
6951
|
[mtokens]: <Failure Related Millitokens String>
|
|
6925
6952
|
[policy]: {
|
|
@@ -6945,11 +6972,11 @@ Requires `offchain:write` permission
|
|
|
6945
6972
|
timeout: <Timeout Block Height Number>
|
|
6946
6973
|
}]
|
|
6947
6974
|
mtokens: <Total Millitokens To Pay String>
|
|
6975
|
+
safe_fee: <Payment Forwarding Fee Rounded Up Tokens Number>
|
|
6976
|
+
safe_tokens: <Payment Tokens Rounded Up Number>
|
|
6948
6977
|
timeout: <Expiration Block Height Number>
|
|
6949
6978
|
tokens: <Total Tokens To Pay Number>
|
|
6950
6979
|
}
|
|
6951
|
-
safe_fee: <Payment Forwarding Fee Rounded Up Tokens Number>
|
|
6952
|
-
safe_tokens: <Payment Tokens Rounded Up Number>
|
|
6953
6980
|
[timeout_height]: <Failure Related CLTV Timeout Height Number>
|
|
6954
6981
|
[update]: {
|
|
6955
6982
|
chain: <Chain Id Hex String>
|
|
@@ -6988,6 +7015,8 @@ Requires `offchain:write` permission
|
|
|
6988
7015
|
timeout: <Timeout Block Height Number>
|
|
6989
7016
|
}]
|
|
6990
7017
|
mtokens: <Total Millitokens To Pay String>
|
|
7018
|
+
safe_fee: <Payment Forwarding Fee Rounded Up Tokens Number>
|
|
7019
|
+
safe_tokens: <Payment Tokens Rounded Up Number>
|
|
6991
7020
|
timeout: <Expiration Block Height Number>
|
|
6992
7021
|
tokens: <Total Tokens To Pay Number>
|
|
6993
7022
|
}
|
|
@@ -7195,10 +7224,12 @@ Requires `offchain:write` permission
|
|
|
7195
7224
|
|
|
7196
7225
|
Preferred `confidence` is not supported on LND 0.14.5 and below
|
|
7197
7226
|
|
|
7227
|
+
`paths` are blinded paths. If using, `destination` is not required.
|
|
7228
|
+
|
|
7198
7229
|
{
|
|
7199
7230
|
[cltv_delta]: <Final CLTV Delta Number>
|
|
7200
7231
|
[confidence]: <Preferred Route Confidence Number Out of One Million Number>
|
|
7201
|
-
destination: <Destination Public Key Hex String>
|
|
7232
|
+
[destination]: <Destination Public Key Hex String>
|
|
7202
7233
|
[features]: [{
|
|
7203
7234
|
bit: <Feature Bit Number>
|
|
7204
7235
|
}]
|
|
@@ -7218,6 +7249,19 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
|
|
|
7218
7249
|
[mtokens]: <Millitokens to Probe String>
|
|
7219
7250
|
[outgoing_channel]: <Outgoing Channel Id String>
|
|
7220
7251
|
[path_timeout_ms]: <Skip Individual Path Attempt After Milliseconds Number>
|
|
7252
|
+
[paths]: [{
|
|
7253
|
+
base_fee_mtokens: <Accumulated Base Fee Millitokens String>
|
|
7254
|
+
cltv_delta: <Accumulated CLTV Expiry Delta Number>
|
|
7255
|
+
fee_rate: <Accumulated Fee Rate Millitokens Per Million Number>
|
|
7256
|
+
hops: [{
|
|
7257
|
+
encrypted_data: <Encrypted Recipient Data Hex String>
|
|
7258
|
+
relay_key: <Relaying Node Public Key Hex String>
|
|
7259
|
+
}]
|
|
7260
|
+
[introduction_node]: <Introduction Node Public Key Hex String>
|
|
7261
|
+
key: <First Hop Path Key Public Key Hex String>
|
|
7262
|
+
[max_htlc_mtokens]: <Maximum HTLC Millitokens String>
|
|
7263
|
+
[min_htlc_mtokens]: <Minimum HTLC Millitokens String>
|
|
7264
|
+
}]
|
|
7221
7265
|
[payment]: <Payment Identifier Hex String>
|
|
7222
7266
|
[probe_timeout_ms]: <Fail Entire Probe After Milliseconds Number>
|
|
7223
7267
|
[routes]: [[{
|
|
@@ -7245,10 +7289,12 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
|
|
|
7245
7289
|
fee_mtokens: <Total Fee Millitokens To Pay String>
|
|
7246
7290
|
hops: [{
|
|
7247
7291
|
channel: <Standard Format Channel Id String>
|
|
7292
|
+
[encrypted_data]: <Blinded Path Encrypted Data Hex String>
|
|
7248
7293
|
fee: <Fee Number>
|
|
7249
7294
|
fee_mtokens: <Fee Millitokens String>
|
|
7250
7295
|
forward: <Forward Tokens Number>
|
|
7251
7296
|
forward_mtokens: <Forward Millitokens String>
|
|
7297
|
+
[path_key]: <Blinded Path Key Hex String>
|
|
7252
7298
|
public_key: <Public Key Hex String>
|
|
7253
7299
|
timeout: <Timeout Block Height Number>
|
|
7254
7300
|
}]
|
|
@@ -7298,6 +7344,7 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
|
|
|
7298
7344
|
@event 'routing_failure'
|
|
7299
7345
|
{
|
|
7300
7346
|
[channel]: <Standard Format Channel Id String>
|
|
7347
|
+
index: <Failure Index Number>
|
|
7301
7348
|
[mtokens]: <Millitokens String>
|
|
7302
7349
|
[policy]: {
|
|
7303
7350
|
base_fee_mtokens: <Base Fee Millitokens String>
|
|
@@ -7306,8 +7353,10 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
|
|
|
7306
7353
|
[is_disabled]: <Channel is Disabled Bool>
|
|
7307
7354
|
max_htlc_mtokens: <Maximum HLTC Millitokens Value String>
|
|
7308
7355
|
min_htlc_mtokens: <Minimum HTLC Millitokens Value String>
|
|
7356
|
+
[public_key]: <Public Key Hex String>
|
|
7357
|
+
[updated_at]: <Updated At ISO 8601 Date String>
|
|
7309
7358
|
}
|
|
7310
|
-
public_key: <Public Key Hex String>
|
|
7359
|
+
[public_key]: <Public Key Hex String>
|
|
7311
7360
|
reason: <Failure Reason String>
|
|
7312
7361
|
route: {
|
|
7313
7362
|
[confidence]: <Route Confidence Score Out Of One Million Number>
|
package/package.json
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"bolt07": "2.0.0",
|
|
16
|
-
"invoices": "6.
|
|
17
|
-
"lightning": "12.
|
|
16
|
+
"invoices": "6.2.0",
|
|
17
|
+
"lightning": "12.4.0",
|
|
18
18
|
"macaroon": "3.0.4"
|
|
19
19
|
},
|
|
20
20
|
"description": "Interaction helper for your Lightning Network daemon",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"asyncjs-util": "1.2.12",
|
|
25
25
|
"bip32": "5.0.1",
|
|
26
26
|
"bip66": "2.0.0",
|
|
27
|
-
"bolt04": "1.
|
|
27
|
+
"bolt04": "1.2.0",
|
|
28
28
|
"ecpair": "3.0.2",
|
|
29
29
|
"ln-docker-daemons": "8.0.5",
|
|
30
30
|
"p2tr": "3.0.0",
|
|
@@ -35,6 +35,11 @@
|
|
|
35
35
|
"engines": {
|
|
36
36
|
"node": ">=22"
|
|
37
37
|
},
|
|
38
|
+
"files": [
|
|
39
|
+
"CHANGELOG.md",
|
|
40
|
+
"index.js",
|
|
41
|
+
"macaroons"
|
|
42
|
+
],
|
|
38
43
|
"keywords": [
|
|
39
44
|
"bitcoin",
|
|
40
45
|
"grpc",
|
|
@@ -61,5 +66,5 @@
|
|
|
61
66
|
"integration-test-0.20.0": "DOCKER_LND_VERSION=v0.20.0-beta npm run test",
|
|
62
67
|
"test": "echo $DOCKER_LND_VERSION && node test/runner"
|
|
63
68
|
},
|
|
64
|
-
"version": "59.
|
|
69
|
+
"version": "59.6.0"
|
|
65
70
|
}
|
package/.gitattributes
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
package-lock.json binary
|
package/.tm_properties
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
exclude = '{$exclude,node_modules}'
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
const {strictEqual} = require('node:assert').strict;
|
|
2
|
-
const test = require('node:test');
|
|
3
|
-
|
|
4
|
-
const {setupChannel} = require('ln-docker-daemons');
|
|
5
|
-
const {spawnLightningCluster} = require('ln-docker-daemons');
|
|
6
|
-
|
|
7
|
-
const {addPeer} = require('./../../');
|
|
8
|
-
const {getAutopilot} = require('./../../');
|
|
9
|
-
const {setAutopilot} = require('./../../');
|
|
10
|
-
|
|
11
|
-
const avg = array => array.reduce((a, b) => a + b) / array.length;
|
|
12
|
-
const confirmationCount = 6;
|
|
13
|
-
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
|
|
14
|
-
const maxScore = 1e8;
|
|
15
|
-
const score = 50000000;
|
|
16
|
-
const size = 2;
|
|
17
|
-
|
|
18
|
-
// Adjusting autopilot should result in changed autopilot status
|
|
19
|
-
test(`Autopilot`, async () => {
|
|
20
|
-
const {kill, nodes} = await spawnLightningCluster({size});
|
|
21
|
-
|
|
22
|
-
const [control, target] = nodes;
|
|
23
|
-
|
|
24
|
-
const cluster = {control, target};
|
|
25
|
-
|
|
26
|
-
const {lnd} = cluster.control;
|
|
27
|
-
|
|
28
|
-
await setupChannel({lnd, generate: control.generate, to: cluster.target});
|
|
29
|
-
|
|
30
|
-
strictEqual(
|
|
31
|
-
(await getAutopilot({lnd})).is_enabled,
|
|
32
|
-
false,
|
|
33
|
-
'Autopilot starts off'
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
await Promise.all([
|
|
37
|
-
cluster.control.generate({count: confirmationCount}),
|
|
38
|
-
delay(3000),
|
|
39
|
-
setAutopilot({lnd, is_enabled: true}),
|
|
40
|
-
]);
|
|
41
|
-
|
|
42
|
-
await addPeer({
|
|
43
|
-
lnd,
|
|
44
|
-
public_key: cluster.target.id,
|
|
45
|
-
socket: cluster.target.socket,
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
strictEqual(
|
|
49
|
-
(await getAutopilot({lnd})).is_enabled,
|
|
50
|
-
true,
|
|
51
|
-
'Autopilot turned on'
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
await setAutopilot({lnd, is_enabled: false});
|
|
55
|
-
|
|
56
|
-
strictEqual(
|
|
57
|
-
(await getAutopilot({lnd})).is_enabled,
|
|
58
|
-
false,
|
|
59
|
-
'Autopilot turned off'
|
|
60
|
-
);
|
|
61
|
-
|
|
62
|
-
const pubKey = cluster.control.id;
|
|
63
|
-
|
|
64
|
-
await setAutopilot({
|
|
65
|
-
lnd,
|
|
66
|
-
candidate_nodes: [{public_key: pubKey, score}],
|
|
67
|
-
is_enabled: true,
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
const autopilot = await getAutopilot({lnd, node_scores: [pubKey]});
|
|
71
|
-
|
|
72
|
-
strictEqual(autopilot.is_enabled, true, 'Autopilot was enable');
|
|
73
|
-
|
|
74
|
-
const [node] = autopilot.nodes;
|
|
75
|
-
|
|
76
|
-
strictEqual(node.local_preferential_score, maxScore, 'Local score');
|
|
77
|
-
strictEqual(node.local_score, score, 'Local score is represented');
|
|
78
|
-
strictEqual(node.preferential_score, maxScore, 'Global preferential score');
|
|
79
|
-
strictEqual(node.public_key, pubKey, 'Candidate node public key');
|
|
80
|
-
strictEqual(node.score, score, 'External score is represented');
|
|
81
|
-
strictEqual(node.weighted_local_score, avg([maxScore, score]), 'Weight avg');
|
|
82
|
-
strictEqual(node.weighted_score, avg([maxScore, score]), 'Norm Weight avg');
|
|
83
|
-
|
|
84
|
-
await kill({});
|
|
85
|
-
|
|
86
|
-
return;
|
|
87
|
-
});
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
const {strictEqual} = require('node:assert').strict;
|
|
2
|
-
const test = require('node:test');
|
|
3
|
-
|
|
4
|
-
const {idForBlock} = require('@alexbosworth/blockchain');
|
|
5
|
-
const {spawnLightningCluster} = require('ln-docker-daemons');
|
|
6
|
-
|
|
7
|
-
const {getBlock} = require('./../../');
|
|
8
|
-
const {getHeight} = require('./../../');
|
|
9
|
-
|
|
10
|
-
// Get height should return height
|
|
11
|
-
test(`Get height`, async () => {
|
|
12
|
-
const {nodes} = await spawnLightningCluster({});
|
|
13
|
-
|
|
14
|
-
const [{chain, generate, kill, lnd}] = nodes;
|
|
15
|
-
|
|
16
|
-
const blockchain = await getHeight({lnd});
|
|
17
|
-
|
|
18
|
-
const hash = blockchain.current_block_hash;
|
|
19
|
-
const height = blockchain.current_block_height;
|
|
20
|
-
|
|
21
|
-
// Try getting a block by the hash
|
|
22
|
-
try {
|
|
23
|
-
const {block} = await getBlock({lnd, id: blockchain.current_block_hash});
|
|
24
|
-
|
|
25
|
-
strictEqual(idForBlock({block}).id, hash, 'Got block');
|
|
26
|
-
} catch (err) {
|
|
27
|
-
const [code, message] = err;
|
|
28
|
-
|
|
29
|
-
strictEqual(code, 501, 'Got expected code');
|
|
30
|
-
strictEqual(message, 'GetBlockMethodNotSupported', 'Got expected message');
|
|
31
|
-
|
|
32
|
-
await kill({});
|
|
33
|
-
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// Try getting a block by the height
|
|
38
|
-
try {
|
|
39
|
-
const {block} = await getBlock({height, lnd});
|
|
40
|
-
|
|
41
|
-
strictEqual(idForBlock({block}).id, hash, 'Got block for height');
|
|
42
|
-
} catch (err) {
|
|
43
|
-
strictEqual(err, null, 'Expected no error');
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// Try getting the chain tip block
|
|
47
|
-
try {
|
|
48
|
-
const {block} = await getBlock({lnd});
|
|
49
|
-
|
|
50
|
-
strictEqual(idForBlock({block}).id, hash, 'Got chain tip block');
|
|
51
|
-
} catch (err) {
|
|
52
|
-
strictEqual(err, null, 'Expected no error');
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
await kill({});
|
|
56
|
-
|
|
57
|
-
return;
|
|
58
|
-
});
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
const {strictEqual} = require('node:assert').strict;
|
|
2
|
-
const test = require('node:test');
|
|
3
|
-
|
|
4
|
-
const {spawnLightningCluster} = require('ln-docker-daemons');
|
|
5
|
-
|
|
6
|
-
const {getBlockHeader} = require('./../../');
|
|
7
|
-
const {getHeight} = require('./../../');
|
|
8
|
-
|
|
9
|
-
const headerHexLength = 80 * 2;
|
|
10
|
-
|
|
11
|
-
// Get block header should return the block header
|
|
12
|
-
test(`Get block header`, async () => {
|
|
13
|
-
const {nodes} = await spawnLightningCluster({});
|
|
14
|
-
|
|
15
|
-
const [{chain, generate, kill, lnd}] = nodes;
|
|
16
|
-
|
|
17
|
-
const blockchain = await getHeight({lnd});
|
|
18
|
-
|
|
19
|
-
const hash = blockchain.current_block_hash;
|
|
20
|
-
const height = blockchain.current_block_height;
|
|
21
|
-
|
|
22
|
-
// Try getting a block header by the hash
|
|
23
|
-
try {
|
|
24
|
-
const {header} = await getBlockHeader({
|
|
25
|
-
lnd,
|
|
26
|
-
id: blockchain.current_block_hash,
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
strictEqual(header.length, headerHexLength, 'Got header');
|
|
30
|
-
} catch (err) {
|
|
31
|
-
const [code, message] = err;
|
|
32
|
-
|
|
33
|
-
strictEqual(code, 501, 'Got expected code');
|
|
34
|
-
strictEqual(message, 'GetBlockHeaderMethodNotSupported', 'Got error');
|
|
35
|
-
|
|
36
|
-
await kill({});
|
|
37
|
-
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Try getting a block header by the height
|
|
42
|
-
try {
|
|
43
|
-
const {header} = await getBlockHeader({height, lnd});
|
|
44
|
-
|
|
45
|
-
strictEqual(header.length, headerHexLength, 'Got header');
|
|
46
|
-
} catch (err) {
|
|
47
|
-
strictEqual(err, null, 'Expected no error');
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Try getting the chain tip block header
|
|
51
|
-
try {
|
|
52
|
-
const {header} = await getBlockHeader({lnd});
|
|
53
|
-
|
|
54
|
-
strictEqual(header.length, headerHexLength, 'Got header');
|
|
55
|
-
} catch (err) {
|
|
56
|
-
strictEqual(err, null, 'Expected no error');
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
await kill({});
|
|
60
|
-
|
|
61
|
-
return;
|
|
62
|
-
});
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const {strictEqual} = require('node:assert').strict;
|
|
2
|
-
const test = require('node:test');
|
|
3
|
-
|
|
4
|
-
const asyncRetry = require('async/retry');
|
|
5
|
-
const {spawnLightningCluster} = require('ln-docker-daemons');
|
|
6
|
-
|
|
7
|
-
const {getHeight} = require('./../../');
|
|
8
|
-
|
|
9
|
-
const confirmationCount = 6;
|
|
10
|
-
const interval = 100;
|
|
11
|
-
const times = 100;
|
|
12
|
-
|
|
13
|
-
// Get height should return height
|
|
14
|
-
test(`Get height`, async () => {
|
|
15
|
-
const {nodes} = await spawnLightningCluster({});
|
|
16
|
-
|
|
17
|
-
const [{chain, generate, kill, lnd}] = nodes;
|
|
18
|
-
|
|
19
|
-
const startHeight = (await getHeight({lnd})).current_block_height;
|
|
20
|
-
|
|
21
|
-
await asyncRetry({interval, times}, async () => {
|
|
22
|
-
await generate({});
|
|
23
|
-
|
|
24
|
-
const endHeight = (await getHeight({lnd})).current_block_height;
|
|
25
|
-
|
|
26
|
-
if (endHeight - startHeight < confirmationCount) {
|
|
27
|
-
throw new Error('ExpectedHeightIncreaseReflected');
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
strictEqual(
|
|
31
|
-
endHeight - startHeight >= confirmationCount,
|
|
32
|
-
true,
|
|
33
|
-
'Got height'
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
return;
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
await kill({});
|
|
40
|
-
|
|
41
|
-
return;
|
|
42
|
-
});
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
const EventEmitter = require('node:events');
|
|
2
|
-
const {once} = require('node:events');
|
|
3
|
-
const {strictEqual} = require('node:assert').strict;
|
|
4
|
-
const test = require('node:test');
|
|
5
|
-
|
|
6
|
-
const asyncRetry = require('async/retry');
|
|
7
|
-
const {spawnLightningCluster} = require('ln-docker-daemons');
|
|
8
|
-
|
|
9
|
-
const {createChainAddress} = require('./../../');
|
|
10
|
-
const {getHeight} = require('./../../');
|
|
11
|
-
const {getChainBalance} = require('./../../');
|
|
12
|
-
const {getWalletInfo} = require('./../../');
|
|
13
|
-
const {subscribeToBlocks} = require('./../../');
|
|
14
|
-
|
|
15
|
-
const confirmationCount = 6;
|
|
16
|
-
const interval = 50;
|
|
17
|
-
const race = promises => Promise.race(promises);
|
|
18
|
-
const times = 4000;
|
|
19
|
-
|
|
20
|
-
// Subscribers to blocks should receive block notifications
|
|
21
|
-
test(`Subscribe to blocks`, async () => {
|
|
22
|
-
const blocks = [];
|
|
23
|
-
const {kill, nodes} = await spawnLightningCluster({});
|
|
24
|
-
|
|
25
|
-
const [{generate, lnd}] = nodes;
|
|
26
|
-
|
|
27
|
-
// Try to make sure that the chain notifier RPC is ready
|
|
28
|
-
await asyncRetry({interval, times}, async () => {
|
|
29
|
-
const wallet = await getWalletInfo({lnd});
|
|
30
|
-
|
|
31
|
-
await generate({});
|
|
32
|
-
|
|
33
|
-
if (!wallet.is_synced_to_chain) {
|
|
34
|
-
throw new Error('NotSyncedToChain');
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
const gotHeight = await asyncRetry({interval, times}, async () => {
|
|
39
|
-
const subBlocks = subscribeToBlocks({lnd});
|
|
40
|
-
|
|
41
|
-
const [event] = await race([
|
|
42
|
-
once(subBlocks, 'block'),
|
|
43
|
-
once(subBlocks, 'error'),
|
|
44
|
-
]);
|
|
45
|
-
|
|
46
|
-
if (!event.height) {
|
|
47
|
-
throw new Error('ExpectedBlockEvent');
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return !!event.height;
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
strictEqual(gotHeight, true, 'Got the block height');
|
|
54
|
-
|
|
55
|
-
try {
|
|
56
|
-
// Wait for chainrpc to be active
|
|
57
|
-
await asyncRetry({interval, times}, async () => {
|
|
58
|
-
if (!!(await getChainBalance({lnd})).chain_balance) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
await generate({});
|
|
63
|
-
|
|
64
|
-
await getHeight({lnd});
|
|
65
|
-
|
|
66
|
-
throw new Error('ExpectedChainBalance');
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
const sub = subscribeToBlocks({lnd});
|
|
70
|
-
const startHeight = (await getHeight({lnd})).current_block_height;
|
|
71
|
-
|
|
72
|
-
sub.on('block', data => blocks.push(data));
|
|
73
|
-
sub.on('error', err => {});
|
|
74
|
-
|
|
75
|
-
const {address} = await createChainAddress({lnd});
|
|
76
|
-
|
|
77
|
-
await asyncRetry({interval, times}, async () => {
|
|
78
|
-
await generate({});
|
|
79
|
-
|
|
80
|
-
if (blocks.length < confirmationCount) {
|
|
81
|
-
throw new Error('ExpectedAdditionalBlocks');
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
blocks.forEach(({height, id}) => {
|
|
86
|
-
strictEqual(!!height, true, 'Got expected block height');
|
|
87
|
-
strictEqual(id.length, 64, 'Got expected block hash length');
|
|
88
|
-
return;
|
|
89
|
-
});
|
|
90
|
-
} catch (err) {
|
|
91
|
-
strictEqual(err, null, 'Expected no error');
|
|
92
|
-
} finally {
|
|
93
|
-
await kill({});
|
|
94
|
-
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
});
|