ln-service 58.1.0 → 59.0.1

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # Versions
2
2
 
3
+ ## 59.0.1
4
+
5
+ ### Breaking Changes
6
+
7
+ - Eliminate support for `channel_capacity` in payment hops
8
+ - End support for node.js 20, require 22 or higher
9
+ - End support for LND 0.19 and below
10
+
3
11
  ## 58.1.0
4
12
 
5
13
  - `getChannels`: Add support for `partner_scid_alias`
package/README.md CHANGED
@@ -10,12 +10,6 @@ through npm.
10
10
  Supported LND versions:
11
11
 
12
12
  - v0.20.0-beta to v0.20.1-beta
13
- - v0.19.0-beta to v0.19.3-beta
14
- - v0.18.0-beta to v0.18.5-beta
15
- - v0.17.0-beta to v0.17.5-beta
16
- - v0.16.0-beta to v0.16.4-beta
17
- - v0.15.2-beta to v0.15.5-beta
18
- - v0.14.4-beta to v0.14.5-beta
19
13
 
20
14
  For typescript-ready methods, check out https://github.com/alexbosworth/lightning#readme
21
15
 
@@ -2268,7 +2262,6 @@ Requires `offchain:read` permission
2268
2262
  fee_mtokens: <Route Fee Millitokens String>
2269
2263
  hops: [{
2270
2264
  channel: <Standard Format Channel Id String>
2271
- channel_capacity: <Channel Capacity Tokens Number>
2272
2265
  fee: <Fee Number>
2273
2266
  fee_mtokens: <Fee Millitokens String>
2274
2267
  forward: <Forward Tokens Number>
@@ -2999,7 +2992,6 @@ Requires `offchain:read` permission
2999
2992
  fee_mtokens: <Total Fee Millitokens Paid String>
3000
2993
  hops: [{
3001
2994
  channel: <Standard Format Channel Id String>
3002
- channel_capacity: <Channel Capacity Tokens Number>
3003
2995
  fee: <Fee Tokens Rounded Down Number>
3004
2996
  fee_mtokens: <Fee Millitokens String>
3005
2997
  forward_mtokens: <Forward Millitokens String>
@@ -3024,7 +3016,6 @@ Requires `offchain:read` permission
3024
3016
  fee_mtokens: <Total Fee Millitokens Paid String>
3025
3017
  hops: [{
3026
3018
  channel: <Standard Format Channel Id String>
3027
- channel_capacity: <Channel Capacity Tokens Number>
3028
3019
  fee: <Fee Tokens Rounded Down Number>
3029
3020
  fee_mtokens: <Fee Millitokens String>
3030
3021
  forward: <Forwarded Tokens Number>
@@ -3108,7 +3099,6 @@ Requires `offchain:read` permission
3108
3099
  fee_mtokens: <Route Fee Millitokens String>
3109
3100
  hops: [{
3110
3101
  channel: <Standard Format Channel Id String>
3111
- channel_capacity: <Channel Capacity Tokens Number>
3112
3102
  fee: <Fee Number>
3113
3103
  fee_mtokens: <Fee Millitokens String>
3114
3104
  forward: <Forward Tokens Number>
@@ -3351,7 +3341,6 @@ Requires `offchain:read` permission
3351
3341
  fee_mtokens: <Route Fee Millitokens String>
3352
3342
  hops: [{
3353
3343
  channel: <Standard Format Channel Id String>
3354
- channel_capacity: <Channel Capacity Tokens Number>
3355
3344
  fee: <Fee Number>
3356
3345
  fee_mtokens: <Fee Millitokens String>
3357
3346
  forward: <Forward Tokens Number>
@@ -3519,7 +3508,6 @@ Requires `offchain:read` permission
3519
3508
  fee_mtokens: <Route Fee Millitokens String>
3520
3509
  hops: [{
3521
3510
  channel: <Standard Format Channel Id String>
3522
- channel_capacity: <Channel Capacity Tokens Number>
3523
3511
  fee: <Fee Number>
3524
3512
  fee_mtokens: <Fee Millitokens String>
3525
3513
  forward: <Forward Tokens Number>
@@ -3595,7 +3583,6 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
3595
3583
  [routes]: [[{
3596
3584
  [base_fee_mtokens]: <Base Routing Fee In Millitokens String>
3597
3585
  [channel]: <Standard Format Channel Id String>
3598
- [channel_capacity]: <Channel Capacity Tokens Number>
3599
3586
  [cltv_delta]: <CLTV Delta Blocks Number>
3600
3587
  [fee_rate]: <Fee Rate In Millitokens Per Million Number>
3601
3588
  public_key: <Forward Edge Public Key Hex String>
@@ -3613,7 +3600,6 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
3613
3600
  fee_mtokens: <Route Fee Millitokens String>
3614
3601
  hops: [{
3615
3602
  channel: <Standard Format Channel Id String>
3616
- channel_capacity: <Channel Capacity Tokens Number>
3617
3603
  fee: <Fee Number>
3618
3604
  fee_mtokens: <Fee Millitokens String>
3619
3605
  forward: <Forward Tokens Number>
@@ -4345,7 +4331,6 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
4345
4331
  fee_mtokens: <Total Fee Millitokens To Pay String>
4346
4332
  hops: [{
4347
4333
  channel: <Standard Format Channel Id String>
4348
- channel_capacity: <Channel Capacity Tokens Number>
4349
4334
  fee: <Fee Number>
4350
4335
  fee_mtokens: <Fee Millitokens String>
4351
4336
  forward: <Forward Tokens Number>
@@ -4375,7 +4360,6 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
4375
4360
  fee_mtokens: <Fee Paid Millitokens String>
4376
4361
  hops: [{
4377
4362
  channel: <Standard Format Channel Id String>
4378
- channel_capacity: <Hop Channel Capacity Tokens Number>
4379
4363
  fee_mtokens: <Hop Forward Fee Millitokens String>
4380
4364
  forward_mtokens: <Hop Forwarded Millitokens String>
4381
4365
  timeout: <Hop CLTV Expiry Block Height Number>
@@ -4453,7 +4437,6 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
4453
4437
  fee_mtokens: <Total Fee Millitokens Paid String>
4454
4438
  hops: [{
4455
4439
  channel: <First Route Standard Format Channel Id String>
4456
- channel_capacity: <First Route Channel Capacity Tokens Number>
4457
4440
  fee: <First Route Fee Tokens Rounded Down Number>
4458
4441
  fee_mtokens: <First Route Fee Millitokens String>
4459
4442
  forward_mtokens: <First Route Forward Millitokens String>
@@ -4466,7 +4449,6 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
4466
4449
  fee_mtokens: <Total Fee Millitokens Paid String>
4467
4450
  hops: [{
4468
4451
  channel: <First Route Standard Format Channel Id String>
4469
- channel_capacity: <First Route Channel Capacity Tokens Number>
4470
4452
  fee: <First Route Fee Tokens Rounded Down Number>
4471
4453
  fee_mtokens: <First Route Fee Millitokens String>
4472
4454
  forward_mtokens: <First Route Forward Millitokens String>
@@ -4530,7 +4512,6 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
4530
4512
  fee_mtokens: <Total Fee Millitokens Paid String>
4531
4513
  hops: [{
4532
4514
  channel: <First Route Standard Format Channel Id String>
4533
- channel_capacity: <First Route Channel Capacity Tokens Number>
4534
4515
  fee: <First Route Fee Tokens Rounded Down Number>
4535
4516
  fee_mtokens: <First Route Fee Millitokens String>
4536
4517
  forward_mtokens: <First Route Forward Millitokens String>
@@ -4544,7 +4525,6 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
4544
4525
  fee_mtokens: <Total Fee Millitokens Paid String>
4545
4526
  hops: [{
4546
4527
  channel: <First Route Standard Format Channel Id String>
4547
- channel_capacity: <First Route Channel Capacity Tokens Number>
4548
4528
  fee: <First Route Fee Tokens Rounded Down Number>
4549
4529
  fee_mtokens: <First Route Fee Millitokens String>
4550
4530
  forward_mtokens: <First Route Forward Millitokens String>
@@ -4585,7 +4565,6 @@ Requires `offchain:write` permission
4585
4565
  fee_mtokens: <Total Fee Millitokens To Pay String>
4586
4566
  hops: [{
4587
4567
  channel: <Standard Format Channel Id String>
4588
- channel_capacity: <Channel Capacity Tokens Number>
4589
4568
  fee: <Fee Number>
4590
4569
  fee_mtokens: <Fee Millitokens String>
4591
4570
  forward: <Forward Tokens Number>
@@ -4619,7 +4598,6 @@ Requires `offchain:write` permission
4619
4598
  fee_mtokens: <Fee Paid Millitokens String>
4620
4599
  hops: [{
4621
4600
  channel: <Standard Format Channel Id String>
4622
- channel_capacity: <Hop Channel Capacity Tokens Number>
4623
4601
  fee_mtokens: <Hop Forward Fee Millitokens String>
4624
4602
  forward_mtokens: <Hop Forwarded Millitokens String>
4625
4603
  timeout: <Hop CLTV Expiry Block Height Number>
@@ -4737,7 +4715,6 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
4737
4715
  [probe_timeout_ms]: <Probe Timeout Milliseconds Number>
4738
4716
  [routes]: [[{
4739
4717
  [base_fee_mtokens]: <Base Routing Fee In Millitokens Number String>
4740
- [channel_capacity]: <Channel Capacity Tokens Number>
4741
4718
  [channel]: <Standard Format Channel Id String>
4742
4719
  [cltv_delta]: <CLTV Blocks Delta Number>
4743
4720
  [fee_rate]: <Fee Rate In Millitokens Per Million Number>
@@ -4755,7 +4732,6 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
4755
4732
  fee_mtokens: <Route Fee Millitokens String>
4756
4733
  hops: [{
4757
4734
  channel: <Standard Format Channel Id String>
4758
- channel_capacity: <Channel Capacity Tokens Number>
4759
4735
  fee: <Fee Number>
4760
4736
  fee_mtokens: <Fee Millitokens String>
4761
4737
  forward: <Forward Tokens Number>
@@ -5122,7 +5098,6 @@ Either next hop destination in channels or final destination is required
5122
5098
  fee_mtokens: <Total Fee Millitokens To Pay String>
5123
5099
  hops: [{
5124
5100
  channel: <Standard Format Channel Id String>
5125
- channel_capacity: <Channel Capacity Tokens Number>
5126
5101
  fee: <Fee Number>
5127
5102
  fee_mtokens: <Fee Millitokens String>
5128
5103
  forward: <Forward Tokens Number>
@@ -6281,7 +6256,6 @@ Requires `offchain:read` permission
6281
6256
  fee_mtokens: <Total Fee Millitokens Paid String>
6282
6257
  hops: [{
6283
6258
  channel: <Standard Format Channel Id String>
6284
- channel_capacity: <Channel Capacity Tokens Number>
6285
6259
  fee: <Fee Tokens Rounded Down Number>
6286
6260
  fee_mtokens: <Fee Millitokens String>
6287
6261
  forward: <Forward Tokens Number>
@@ -6322,7 +6296,6 @@ Requires `offchain:read` permission
6322
6296
  fee_mtokens: <Total Fee Millitokens Pending String>
6323
6297
  hops: [{
6324
6298
  channel: <Standard Format Channel Id String>
6325
- channel_capacity: <Channel Capacity Tokens Number>
6326
6299
  fee: <Fee Tokens Rounded Down Number>
6327
6300
  fee_mtokens: <Fee Millitokens String>
6328
6301
  forward: <Forward Tokens Number>
@@ -6387,7 +6360,6 @@ Note: Method not supported on LND 0.13.4 and below
6387
6360
  fee_mtokens: <Total Fee Millitokens Paid String>
6388
6361
  hops: [{
6389
6362
  channel: <Standard Format Channel Id String>
6390
- channel_capacity: <Channel Capacity Tokens Number>
6391
6363
  fee: <Fee Tokens Rounded Down Number>
6392
6364
  fee_mtokens: <Fee Millitokens String>
6393
6365
  forward_mtokens: <Forward Millitokens String>
@@ -6473,7 +6445,6 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
6473
6445
  fee_mtokens: <Total Fee Millitokens Paid String>
6474
6446
  hops: [{
6475
6447
  channel: <Standard Format Channel Id String>
6476
- channel_capacity: <Channel Capacity Tokens Number>
6477
6448
  fee_mtokens: <Fee Millitokens String>
6478
6449
  forward_mtokens: <Forward Millitokens String>
6479
6450
  public_key: <Public Key Hex String>
@@ -6500,7 +6471,6 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
6500
6471
  fee_mtokens: <Route Total Fee Millitokens String>
6501
6472
  hops: [{
6502
6473
  channel: <Standard Format Channel Id String>
6503
- channel_capacity: <Channel Capacity Tokens Number>
6504
6474
  fee: <Hop Forwarding Fee Rounded Down Tokens Number>
6505
6475
  fee_mtokens: <Hop Forwarding Fee Millitokens String>
6506
6476
  forward: <Hop Forwarding Tokens Rounded Down Number>
@@ -6527,7 +6497,6 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
6527
6497
  fee_mtokens: <Total Fee Millitokens Pending String>
6528
6498
  hops: [{
6529
6499
  channel: <Standard Format Channel Id String>
6530
- channel_capacity: <Channel Capacity Tokens Number>
6531
6500
  fee: <Fee Tokens Rounded Down Number>
6532
6501
  fee_mtokens: <Fee Millitokens String>
6533
6502
  forward: <Forward Tokens Number>
@@ -6557,7 +6526,6 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
6557
6526
  fee_mtokens: <Total Route Fee Millitokens To Pay String>
6558
6527
  hops: [{
6559
6528
  channel: <Standard Format Channel Id String>
6560
- channel_capacity: <Channel Capacity Tokens Number>
6561
6529
  fee: <Fee Number>
6562
6530
  fee_mtokens: <Fee Millitokens String>
6563
6531
  forward: <Forward Tokens Number>
@@ -6628,7 +6596,6 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
6628
6596
  fee_mtokens: <Total Fee Millitokens To Pay String>
6629
6597
  hops: [{
6630
6598
  channel: <Standard Format Channel Id String>
6631
- channel_capacity: <Channel Capacity Tokens Number>
6632
6599
  fee_mtokens: <Fee Millitokens String>
6633
6600
  forward_mtokens: <Forward Millitokens String>
6634
6601
  public_key: <Public Key Hex String>
@@ -6657,7 +6624,6 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
6657
6624
  fee_mtokens: <Route Total Fee Millitokens String>
6658
6625
  hops: [{
6659
6626
  channel: <Standard Format Channel Id String>
6660
- channel_capacity: <Channel Capacity Tokens Number>
6661
6627
  fee: <Hop Forwarding Fee Rounded Down Tokens Number>
6662
6628
  fee_mtokens: <Hop Forwarding Fee Millitokens String>
6663
6629
  forward: <Hop Forwarding Tokens Rounded Down Number>
@@ -6685,7 +6651,6 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
6685
6651
  fee_mtokens: <Total Fee Millitokens Pending String>
6686
6652
  hops: [{
6687
6653
  channel: <Standard Format Channel Id String>
6688
- channel_capacity: <Channel Capacity Tokens Number>
6689
6654
  fee: <Fee Tokens Rounded Down Number>
6690
6655
  fee_mtokens: <Fee Millitokens String>
6691
6656
  forward: <Forward Tokens Number>
@@ -6715,7 +6680,6 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
6715
6680
  fee_mtokens: <Total Route Fee Millitokens To Pay String>
6716
6681
  hops: [{
6717
6682
  channel: <Standard Format Channel Id String>
6718
- channel_capacity: <Channel Capacity Tokens Number>
6719
6683
  fee: <Fee Number>
6720
6684
  fee_mtokens: <Fee Millitokens String>
6721
6685
  forward: <Forward Tokens Number>
@@ -6756,7 +6720,6 @@ Requires `offchain:write` permission
6756
6720
  fee_mtokens: <Total Fee Millitokens To Pay String>
6757
6721
  hops: [{
6758
6722
  channel: <Standard Format Channel Id String>
6759
- channel_capacity: <Channel Capacity Tokens Number>
6760
6723
  fee: <Fee Number>
6761
6724
  fee_mtokens: <Fee Millitokens String>
6762
6725
  forward: <Forward Tokens Number>
@@ -6819,7 +6782,6 @@ Requires `offchain:write` permission
6819
6782
  fee_mtokens: <Total Fee Millitokens To Pay String>
6820
6783
  hops: [{
6821
6784
  channel: <Standard Format Channel Id String>
6822
- channel_capacity: <Channel Capacity Tokens Number>
6823
6785
  fee: <Fee Number>
6824
6786
  fee_mtokens: <Fee Millitokens String>
6825
6787
  forward: <Forward Tokens Number>
@@ -6853,7 +6815,6 @@ Requires `offchain:write` permission
6853
6815
  fee_mtokens: <Total Fee Millitokens To Pay String>
6854
6816
  hops: [{
6855
6817
  channel: <Standard Format Channel Id String>
6856
- channel_capacity: <Channel Capacity Tokens Number>
6857
6818
  fee: <Fee Number>
6858
6819
  fee_mtokens: <Fee Millitokens String>
6859
6820
  forward: <Forward Tokens Number>
@@ -6884,7 +6845,6 @@ Requires `offchain:write` permission
6884
6845
  fee_mtokens: <Fee Paid Millitokens String>
6885
6846
  hops: [{
6886
6847
  channel: <Standard Format Channel Id String>
6887
- channel_capacity: <Hop Channel Capacity Tokens Number>
6888
6848
  fee_mtokens: <Hop Forward Fee Millitokens String>
6889
6849
  forward_mtokens: <Hop Forwarded Millitokens String>
6890
6850
  timeout: <Hop CLTV Expiry Block Height Number>
@@ -6898,7 +6858,6 @@ Requires `offchain:write` permission
6898
6858
  fee_mtokens: <Total Fee Millitokens To Pay String>
6899
6859
  hops: [{
6900
6860
  channel: <Standard Format Channel Id String>
6901
- channel_capacity: <Channel Capacity Tokens Number>
6902
6861
  fee: <Fee Number>
6903
6862
  fee_mtokens: <Fee Millitokens String>
6904
6863
  forward: <Forward Tokens Number>
@@ -6959,7 +6918,6 @@ Note: Method not supported on LND 0.15.5 and below
6959
6918
  fee_mtokens: <Total Fee Millitokens Paid String>
6960
6919
  hops: [{
6961
6920
  channel: <Standard Format Channel Id String>
6962
- channel_capacity: <Channel Capacity Tokens Number>
6963
6921
  fee: <Fee Tokens Rounded Down Number>
6964
6922
  fee_mtokens: <Fee Millitokens String>
6965
6923
  forward: <Forward Tokens Number>
@@ -7001,7 +6959,6 @@ Note: Method not supported on LND 0.15.5 and below
7001
6959
  fee_mtokens: <Total Fee Millitokens Pending String>
7002
6960
  hops: [{
7003
6961
  channel: <Standard Format Channel Id String>
7004
- channel_capacity: <Channel Capacity Tokens Number>
7005
6962
  fee: <Fee Tokens Rounded Down Number>
7006
6963
  fee_mtokens: <Fee Millitokens String>
7007
6964
  forward: <Forward Tokens Number>
@@ -7143,7 +7100,6 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
7143
7100
  [probe_timeout_ms]: <Fail Entire Probe After Milliseconds Number>
7144
7101
  [routes]: [[{
7145
7102
  [base_fee_mtokens]: <Base Routing Fee In Millitokens String>
7146
- [channel_capacity]: <Channel Capacity Tokens Number>
7147
7103
  [channel]: <Standard Format Channel Id String>
7148
7104
  [cltv_delta]: <CLTV Blocks Delta Number>
7149
7105
  [fee_rate]: <Fee Rate In Millitokens Per Million Number>
@@ -7167,7 +7123,6 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
7167
7123
  fee_mtokens: <Total Fee Millitokens To Pay String>
7168
7124
  hops: [{
7169
7125
  channel: <Standard Format Channel Id String>
7170
- channel_capacity: <Channel Capacity Tokens Number>
7171
7126
  fee: <Fee Number>
7172
7127
  fee_mtokens: <Fee Millitokens String>
7173
7128
  forward: <Forward Tokens Number>
@@ -7197,7 +7152,6 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
7197
7152
  fee_mtokens: <Total Fee Millitokens To Pay String>
7198
7153
  hops: [{
7199
7154
  channel: <Standard Format Channel Id String>
7200
- channel_capacity: <Channel Capacity Tokens Number>
7201
7155
  fee: <Fee Number>
7202
7156
  fee_mtokens: <Fee Millitokens String>
7203
7157
  forward: <Forward Tokens Number>
@@ -7239,7 +7193,6 @@ Preferred `confidence` is not supported on LND 0.14.5 and below
7239
7193
  fee_mtokens: <Total Fee Millitokens To Pay String>
7240
7194
  hops: [{
7241
7195
  channel: <Standard Format Channel Id String>
7242
- channel_capacity: <Channel Capacity Tokens Number>
7243
7196
  fee: <Fee Number>
7244
7197
  fee_mtokens: <Fee Millitokens String>
7245
7198
  forward: <Forward Tokens Number>
@@ -7364,7 +7317,6 @@ This method is not supported in LND 0.13.4 and below
7364
7317
  fee_mtokens: <Route Fee Millitokens String>
7365
7318
  hops: [{
7366
7319
  channel: <Standard Format Channel Id String>
7367
- channel_capacity: <Channel Capacity Tokens Number>
7368
7320
  fee: <Fee Tokens Number>
7369
7321
  fee_mtokens: <Fee Millitokens String>
7370
7322
  forward: <Forward Tokens Number>
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "dependencies": {
10
10
  "bolt07": "1.9.5",
11
11
  "invoices": "5.0.2",
12
- "lightning": "11.1.0",
12
+ "lightning": "12.0.1",
13
13
  "macaroon": "3.0.4"
14
14
  },
15
15
  "description": "Interaction helper for your Lightning Network daemon",
@@ -24,7 +24,7 @@
24
24
  "bn.js": "5.2.3",
25
25
  "bs58check": "4.0.0",
26
26
  "ecpair": "3.0.1",
27
- "ln-docker-daemons": "7.0.2",
27
+ "ln-docker-daemons": "8.0.0",
28
28
  "p2tr": "2.0.0",
29
29
  "portfinder": "1.0.38",
30
30
  "psbt": "5.0.0",
@@ -34,7 +34,7 @@
34
34
  "varuint-bitcoin": "2.0.0"
35
35
  },
36
36
  "engines": {
37
- "node": ">=20"
37
+ "node": ">=22"
38
38
  },
39
39
  "keywords": [
40
40
  "bitcoin",
@@ -53,34 +53,7 @@
53
53
  "scripts": {
54
54
  "integration-test-0.20.1": "DOCKER_LND_VERSION=v0.20.1-beta npm run test",
55
55
  "integration-test-0.20.0": "DOCKER_LND_VERSION=v0.20.0-beta npm run test",
56
- "integration-test-0.19.3": "DOCKER_LND_VERSION=v0.19.3-beta npm run test",
57
- "integration-test-0.19.2": "DOCKER_LND_VERSION=v0.19.2-beta npm run test",
58
- "integration-test-0.19.1": "DOCKER_LND_VERSION=v0.19.1-beta npm run test",
59
- "integration-test-0.19.0": "DOCKER_LND_VERSION=v0.19.0-beta npm run test",
60
- "integration-test-0.18.5": "DOCKER_LND_VERSION=v0.18.5-beta npm run test",
61
- "integration-test-0.18.4": "DOCKER_LND_VERSION=v0.18.4-beta npm run test",
62
- "integration-test-0.18.3": "DOCKER_LND_VERSION=v0.18.3-beta npm run test",
63
- "integration-test-0.18.2": "DOCKER_LND_VERSION=v0.18.2-beta npm run test",
64
- "integration-test-0.18.1": "DOCKER_LND_VERSION=v0.18.1-beta npm run test",
65
- "integration-test-0.18.0": "DOCKER_LND_VERSION=v0.18.0-beta npm run test",
66
- "integration-test-0.17.5": "DOCKER_LND_VERSION=v0.17.5-beta npm run test",
67
- "integration-test-0.17.4": "DOCKER_LND_VERSION=v0.17.4-beta npm run test",
68
- "integration-test-0.17.3": "DOCKER_LND_VERSION=v0.17.3-beta npm run test",
69
- "integration-test-0.17.2": "DOCKER_LND_VERSION=v0.17.2-beta npm run test",
70
- "integration-test-0.17.1": "DOCKER_LND_VERSION=v0.17.1-beta npm run test",
71
- "integration-test-0.17.0": "DOCKER_LND_VERSION=v0.17.0-beta npm run test",
72
- "integration-test-0.16.4": "DOCKER_LND_VERSION=v0.16.4-beta npm run test",
73
- "integration-test-0.16.3": "DOCKER_LND_VERSION=v0.16.3-beta npm run test",
74
- "integration-test-0.16.2": "DOCKER_LND_VERSION=v0.16.2-beta npm run test",
75
- "integration-test-0.16.1": "DOCKER_LND_VERSION=v0.16.1-beta npm run test",
76
- "integration-test-0.16.0": "DOCKER_LND_VERSION=v0.16.0-beta npm run test",
77
- "integration-test-0.15.5": "DOCKER_LND_VERSION=v0.15.5-beta npm run test",
78
- "integration-test-0.15.4": "DOCKER_LND_VERSION=v0.15.4-beta npm run test",
79
- "integration-test-0.15.3": "DOCKER_LND_VERSION=v0.15.3-beta npm run test",
80
- "integration-test-0.15.2": "DOCKER_LND_VERSION=v0.15.2-beta npm run test",
81
- "integration-test-0.14.5": "DOCKER_LND_VERSION=v0.14.5-beta npm run test",
82
- "integration-test-0.14.4": "DOCKER_LND_VERSION=v0.14.4-beta npm run test",
83
56
  "test": "echo $DOCKER_LND_VERSION && node test/runner"
84
57
  },
85
- "version": "58.1.0"
58
+ "version": "59.0.1"
86
59
  }
@@ -28,120 +28,122 @@ test(`Pay`, async ({end, equal, strictSame}) => {
28
28
 
29
29
  const [{generate, lnd}, target, remote] = nodes;
30
30
 
31
- const channel = await setupChannel({generate, lnd, to: target});
32
-
33
- const remoteChan = await setupChannel({
34
- generate: target.generate,
35
- lnd: target.lnd,
36
- to: remote,
37
- });
38
-
39
- await addPeer({lnd, public_key: remote.id, socket: remote.socket});
40
-
41
- const invoice = await createInvoice({tokens, lnd: remote.lnd});
42
-
43
- const commitTxFee = channel.commit_transaction_fee;
44
-
45
- const paid = await asyncRetry({interval, times}, async () => {
46
- return await pay({lnd, request: invoice.request});
47
- });
48
-
49
- strictEqual(paid.fee, 1, 'Fee paid for hop');
50
- strictEqual(paid.fee_mtokens, '1000', 'Fee mtokens tokens paid');
51
- strictEqual(paid.id, invoice.id, 'Payment hash is equal on both sides');
52
- strictEqual(paid.is_confirmed, true, 'Invoice is paid');
53
- strictEqual(paid.is_outgoing, true, 'Payments are outgoing');
54
- strictEqual(paid.mtokens, '101000', 'Paid mtokens');
55
- strictEqual(paid.secret, invoice.secret, 'Paid for invoice secret');
56
- strictEqual(paid.tokens, invoice.tokens + 1, 'Paid correct number of tok');
57
-
58
- const height = (await getHeight({lnd})).current_block_height;
59
-
60
- paid.hops.forEach(n => {
61
- strictEqual(
62
- n.timeout === height + 40 ||
63
- n.timeout === height + 43 ||
64
- n.timeout === height + 80,
65
- true
66
- );
67
-
68
- delete n.timeout;
69
-
70
- return;
71
- });
72
-
73
- const expectedHops = [
74
- {
75
- channel: channel.id,
76
- channel_capacity: 1000000,
77
- fee: 1,
78
- fee_mtokens: '1000',
79
- forward: 100,
80
- forward_mtokens: `${invoice.tokens}${mtokPadding}`,
81
- public_key: target.id,
82
- },
83
- {
84
- channel: remoteChan.id,
85
- channel_capacity: 1000000,
86
- fee: 0,
87
- fee_mtokens: '0',
88
- forward: 100,
89
- forward_mtokens: '100000',
90
- public_key: remote.id,
91
- },
92
- ];
93
-
94
- deepStrictEqual(paid.hops, expectedHops, 'Hops are returned');
95
-
96
- const invoice2 = await createInvoice({lnd: remote.lnd, tokens: 100});
97
-
98
- const {destination} = await decodePaymentRequest({
99
- lnd: remote.lnd,
100
- request: invoice2.request,
101
- });
102
-
103
- await generate({count: confirmationCount});
104
-
105
- const route = await asyncRetry({interval, times}, async () => {
106
- const {route} = await getRouteToDestination({
107
- destination,
108
- lnd,
109
- payment: invoice2.payment,
110
- tokens: invoice2.tokens,
111
- total_mtokens: !!invoice2.payment ? invoice2.mtokens : undefined,
31
+ try {
32
+ const channel = await setupChannel({generate, lnd, to: target});
33
+
34
+ const remoteChan = await setupChannel({
35
+ generate: target.generate,
36
+ lnd: target.lnd,
37
+ to: remote,
112
38
  });
113
39
 
114
- if (!route) {
115
- throw new Error('ExpectedRouteToDestination');
116
- }
40
+ await addPeer({lnd, public_key: remote.id, socket: remote.socket});
117
41
 
118
- return route;
119
- });
42
+ const invoice = await createInvoice({tokens, lnd: remote.lnd});
120
43
 
121
- // Test paying to a route, but to an id that isn't known
122
- try {
123
- await pay({
124
- lnd,
125
- path: {routes: [route], id: randomBytes(32).toString('hex')},
44
+ const commitTxFee = channel.commit_transaction_fee;
45
+
46
+ const paid = await asyncRetry({interval, times}, async () => {
47
+ return await pay({lnd, request: invoice.request});
126
48
  });
127
- } catch (err) {
128
- const [code, message] = err;
129
49
 
130
- strictEqual(code, 404, 'Unknown payment hashes mean user error');
131
- strictEqual(message, 'UnknownPaymentHash', 'Specifically unknown error');
132
- }
50
+ strictEqual(paid.fee, 1, 'Fee paid for hop');
51
+ strictEqual(paid.fee_mtokens, '1000', 'Fee mtokens tokens paid');
52
+ strictEqual(paid.id, invoice.id, 'Payment hash is equal on both sides');
53
+ strictEqual(paid.is_confirmed, true, 'Invoice is paid');
54
+ strictEqual(paid.is_outgoing, true, 'Payments are outgoing');
55
+ strictEqual(paid.mtokens, '101000', 'Paid mtokens');
56
+ strictEqual(paid.secret, invoice.secret, 'Paid for invoice secret');
57
+ strictEqual(paid.tokens, invoice.tokens + 1, 'Paid correct number of tok');
58
+
59
+ const height = (await getHeight({lnd})).current_block_height;
60
+
61
+ paid.hops.forEach(n => {
62
+ strictEqual(
63
+ n.timeout === height + 40 ||
64
+ n.timeout === height + 43 ||
65
+ n.timeout === height + 80,
66
+ true
67
+ );
68
+
69
+ delete n.timeout;
70
+
71
+ return;
72
+ });
73
+
74
+ const expectedHops = [
75
+ {
76
+ channel: channel.id,
77
+ fee: 1,
78
+ fee_mtokens: '1000',
79
+ forward: 100,
80
+ forward_mtokens: `${invoice.tokens}${mtokPadding}`,
81
+ public_key: target.id,
82
+ },
83
+ {
84
+ channel: remoteChan.id,
85
+ fee: 0,
86
+ fee_mtokens: '0',
87
+ forward: 100,
88
+ forward_mtokens: '100000',
89
+ public_key: remote.id,
90
+ },
91
+ ];
92
+
93
+ deepStrictEqual(paid.hops, expectedHops, 'Hops are returned');
94
+
95
+ const invoice2 = await createInvoice({lnd: remote.lnd, tokens: 100});
96
+
97
+ const {destination} = await decodePaymentRequest({
98
+ lnd: remote.lnd,
99
+ request: invoice2.request,
100
+ });
101
+
102
+ await generate({count: confirmationCount});
133
103
 
134
- // Test paying regularly to a destination
135
- const directPay = await pay({
136
- lnd,
137
- path: {routes: [route], id: invoice2.id},
138
- });
104
+ const route = await asyncRetry({interval, times}, async () => {
105
+ const {route} = await getRouteToDestination({
106
+ destination,
107
+ lnd,
108
+ payment: invoice2.payment,
109
+ tokens: invoice2.tokens,
110
+ total_mtokens: !!invoice2.payment ? invoice2.mtokens : undefined,
111
+ });
139
112
 
140
- const zeroInvoice = await createInvoice({lnd: target.lnd});
113
+ if (!route) {
114
+ throw new Error('ExpectedRouteToDestination');
115
+ }
141
116
 
142
- await pay({lnd, request: zeroInvoice.request, mtokens: '1000'});
117
+ return route;
118
+ });
119
+
120
+ // Test paying to a route, but to an id that isn't known
121
+ try {
122
+ await pay({
123
+ lnd,
124
+ path: {routes: [route], id: randomBytes(32).toString('hex')},
125
+ });
126
+ } catch (err) {
127
+ const [code, message] = err;
128
+
129
+ strictEqual(code, 404, 'Unknown payment hashes mean user error');
130
+ strictEqual(message, 'UnknownPaymentHash', 'Specifically unknown error');
131
+ }
143
132
 
144
- await kill({});
133
+ // Test paying regularly to a destination
134
+ const directPay = await pay({
135
+ lnd,
136
+ path: {routes: [route], id: invoice2.id},
137
+ });
138
+
139
+ const zeroInvoice = await createInvoice({lnd: target.lnd});
140
+
141
+ await pay({lnd, request: zeroInvoice.request, mtokens: '1000'});
142
+ } catch (err) {
143
+ strictEqual(err, null, 'Not expecting an error');
144
+ } finally {
145
+ await kill({});
146
+ }
145
147
 
146
148
  return;
147
149
  });
@@ -273,7 +273,6 @@ test(`Subscribe to RPC requests`, async () => {
273
273
  fee_mtokens: '0',
274
274
  hops: [{
275
275
  channel: '0x0x1',
276
- channel_capacity: 1,
277
276
  fee: 0,
278
277
  fee_mtokens: '0',
279
278
  forward: 0,
@@ -202,6 +202,8 @@ test(`Open unconfirmed channels`, async () => {
202
202
 
203
203
  // Remove the channel
204
204
  await asyncRetry({interval, times}, async () => {
205
+ await generate({});
206
+
205
207
  await closeChannel({lnd, id: confirmed.id});
206
208
  });
207
209
 
@@ -252,7 +254,21 @@ test(`Open unconfirmed channels`, async () => {
252
254
  return confirmed;
253
255
  });
254
256
 
255
- const [closedChannel] = (await getClosedChannels({lnd})).channels;
257
+ const [closedChannel] = await asyncRetry({interval, times}, async () => {
258
+ const {channels} = await getClosedChannels({lnd});
259
+
260
+ await generate({});
261
+
262
+ if (!channels.length) {
263
+ throw new Error('ExpectedAClosedChannel');
264
+ }
265
+
266
+ if (!closings.length) {
267
+ throw new Error('ExpectedClosingEvent');
268
+ }
269
+
270
+ return channels;
271
+ });
256
272
 
257
273
  equal(closedChannel.id, confirmed.id, 'Closed channel shows confirmed id');
258
274
  deepEqual(closedChannel.other_ids, confirmed.other_ids, 'Saved temp id');
@@ -10,7 +10,7 @@ const {updateRoutingFees} = require('./../../');
10
10
 
11
11
  const baseFeeTokens = 9;
12
12
  const channelCapacityTokens = 1e6;
13
- const cltvDelta = 18;
13
+ const cltvDelta = 24;
14
14
  const confirmationCount = 6;
15
15
  const defaultFee = 1e3;
16
16
  const feeRate = 0;
@@ -13,7 +13,6 @@ const times = 1500;
13
13
  [routes]: [[{
14
14
  [base_fee_mtokens]: <Base Routing Fee In Millitokens String>
15
15
  [channel]: <Standard Format Channel Id String>
16
- [channel_capacity]: <Channel Capacity Tokens Number>
17
16
  [cltv_delta]: <CLTV Delta Blocks Number>
18
17
  [fee_rate]: <Fee Rate In Millitokens Per Million Number>
19
18
  public_key: <Forward Edge Public Key Hex String>
@@ -28,7 +27,6 @@ const times = 1500;
28
27
  fee_mtokens: <Route Fee Millitokens String>
29
28
  hops: [{
30
29
  channel: <Standard Format Channel Id String>
31
- channel_capacity: <Channel Capacity Tokens Number>
32
30
  fee: <Fee Number>
33
31
  fee_mtokens: <Fee Millitokens String>
34
32
  forward: <Forward Tokens Number>
@@ -103,7 +103,6 @@ test(`Get payment`, async () => {
103
103
  const expectedHops = [
104
104
  {
105
105
  channel: channel.id,
106
- channel_capacity: 1000000,
107
106
  fee: 1,
108
107
  fee_mtokens: '1000',
109
108
  forward: invoice.tokens,
@@ -112,7 +111,6 @@ test(`Get payment`, async () => {
112
111
  },
113
112
  {
114
113
  channel: remoteChan.id,
115
- channel_capacity: 1000000,
116
114
  fee: 0,
117
115
  fee_mtokens: '0',
118
116
  forward: 100,
@@ -53,7 +53,6 @@ test(`Pay via payment details`, async () => {
53
53
  const expectedHops = [
54
54
  {
55
55
  channel: channel.id,
56
- channel_capacity: 1000000,
57
56
  fee: 1,
58
57
  fee_mtokens: '1000',
59
58
  forward: invoice.tokens,
@@ -62,7 +61,6 @@ test(`Pay via payment details`, async () => {
62
61
  },
63
62
  {
64
63
  channel: remoteChan.id,
65
- channel_capacity: 1000000,
66
64
  fee: 0,
67
65
  fee_mtokens: '0',
68
66
  forward: invoice.tokens,
@@ -106,7 +106,6 @@ test(`Pay via payment request`, async () => {
106
106
  const expectedHops = [
107
107
  {
108
108
  channel: channel.id,
109
- channel_capacity: 1000000,
110
109
  fee: 1,
111
110
  fee_mtokens: '1000',
112
111
  forward: 100,
@@ -115,7 +114,6 @@ test(`Pay via payment request`, async () => {
115
114
  },
116
115
  {
117
116
  channel: remoteChan.id,
118
- channel_capacity: 1000000,
119
117
  fee: 0,
120
118
  fee_mtokens: '0',
121
119
  forward: 100,
@@ -96,7 +96,6 @@ test(`Subscribe to requests`, async () => {
96
96
  hops: [
97
97
  {
98
98
  channel: channel.id,
99
- channel_capacity: 1e6,
100
99
  fee: 1,
101
100
  fee_mtokens: '1000',
102
101
  forward: 100,
@@ -106,7 +105,6 @@ test(`Subscribe to requests`, async () => {
106
105
  },
107
106
  {
108
107
  channel: remoteChan.id,
109
- channel_capacity: 1e6,
110
108
  fee: 0,
111
109
  fee_mtokens: '0',
112
110
  forward: 100,
@@ -154,7 +152,6 @@ test(`Subscribe to requests`, async () => {
154
152
  hops: [
155
153
  {
156
154
  channel: forward.in_channel,
157
- channel_capacity: 1e6,
158
155
  fee: 1,
159
156
  fee_mtokens: '1000',
160
157
  forward: 100,
@@ -164,7 +161,6 @@ test(`Subscribe to requests`, async () => {
164
161
  },
165
162
  {
166
163
  channel: forward.out_channel,
167
- channel_capacity: 1e6,
168
164
  fee: 0,
169
165
  fee_mtokens: '0',
170
166
  forward: 100,