lightning 11.0.5 → 12.0.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 (103) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/grpc/protos/lightning.proto +137 -2
  3. package/grpc/protos/router.proto +69 -3
  4. package/grpc/protos/signer.proto +60 -0
  5. package/grpc/protos/walletkit.proto +67 -1
  6. package/lnd_messages/pay_via_route_request.js +0 -2
  7. package/lnd_methods/info/get_configuration.js +1 -1
  8. package/lnd_methods/info/get_route_to_destination.d.ts +0 -4
  9. package/lnd_methods/info/get_route_to_destination.js +4 -6
  10. package/lnd_methods/macaroon/subscribe_to_rpc_requests.d.ts +0 -2
  11. package/lnd_methods/macaroon/subscribe_to_rpc_requests.js +0 -1
  12. package/lnd_methods/offchain/attempt_route.d.ts +0 -2
  13. package/lnd_methods/offchain/attempt_route.js +0 -1
  14. package/lnd_methods/offchain/finished_payment.d.ts +0 -10
  15. package/lnd_methods/offchain/finished_payment.js +0 -5
  16. package/lnd_methods/offchain/get_channels.d.ts +2 -0
  17. package/lnd_methods/offchain/get_channels.js +1 -0
  18. package/lnd_methods/offchain/get_failed_payments.d.ts +0 -2
  19. package/lnd_methods/offchain/get_failed_payments.js +0 -1
  20. package/lnd_methods/offchain/get_payment.d.ts +0 -6
  21. package/lnd_methods/offchain/get_payment.js +0 -3
  22. package/lnd_methods/offchain/get_payments.d.ts +0 -2
  23. package/lnd_methods/offchain/get_payments.js +0 -1
  24. package/lnd_methods/offchain/get_pending_payments.d.ts +0 -2
  25. package/lnd_methods/offchain/get_pending_payments.js +0 -1
  26. package/lnd_methods/offchain/get_route_through_hops.d.ts +0 -2
  27. package/lnd_methods/offchain/get_route_through_hops.js +0 -1
  28. package/lnd_methods/offchain/list_payments.js +0 -1
  29. package/lnd_methods/offchain/pay.d.ts +0 -4
  30. package/lnd_methods/offchain/pay.js +0 -3
  31. package/lnd_methods/offchain/pay_via_payment_details.d.ts +0 -4
  32. package/lnd_methods/offchain/pay_via_payment_details.js +0 -2
  33. package/lnd_methods/offchain/pay_via_payment_request.d.ts +0 -4
  34. package/lnd_methods/offchain/pay_via_payment_request.js +0 -2
  35. package/lnd_methods/offchain/pay_via_routes.d.ts +0 -4
  36. package/lnd_methods/offchain/pay_via_routes.js +0 -3
  37. package/lnd_methods/offchain/probe_for_route.d.ts +0 -2
  38. package/lnd_methods/offchain/probe_for_route.js +0 -2
  39. package/lnd_methods/offchain/subscribe_to_past_payment.d.ts +0 -4
  40. package/lnd_methods/offchain/subscribe_to_past_payment.js +0 -2
  41. package/lnd_methods/offchain/subscribe_to_past_payments.d.ts +0 -2
  42. package/lnd_methods/offchain/subscribe_to_past_payments.js +0 -1
  43. package/lnd_methods/offchain/subscribe_to_pay.d.ts +0 -10
  44. package/lnd_methods/offchain/subscribe_to_pay.js +0 -5
  45. package/lnd_methods/offchain/subscribe_to_pay_via_details.js +0 -5
  46. package/lnd_methods/offchain/subscribe_to_pay_via_request.js +0 -5
  47. package/lnd_methods/offchain/subscribe_to_pay_via_routes.d.ts +0 -10
  48. package/lnd_methods/offchain/subscribe_to_pay_via_routes.js +0 -5
  49. package/lnd_methods/offchain/subscribe_to_payments.d.ts +0 -4
  50. package/lnd_methods/offchain/subscribe_to_payments.js +0 -2
  51. package/lnd_methods/offchain/subscribe_to_probe_for_route.d.ts +0 -8
  52. package/lnd_methods/offchain/subscribe_to_probe_for_route.js +0 -4
  53. package/lnd_requests/rpc_hop_from_hop.js +0 -7
  54. package/lnd_requests/rpc_route_from_route.js +0 -2
  55. package/lnd_responses/confirmed_from_payment.d.ts +0 -6
  56. package/lnd_responses/confirmed_from_payment.js +0 -3
  57. package/lnd_responses/confirmed_from_payment_status.js +0 -5
  58. package/lnd_responses/pending_from_payment.js +0 -2
  59. package/lnd_responses/routes_from_query_routes.js +0 -3
  60. package/lnd_responses/routing_failure_from_htlc.js +0 -2
  61. package/lnd_responses/rpc_attempt_htlc_as_attempt.js +0 -2
  62. package/lnd_responses/rpc_channel_as_channel.js +6 -0
  63. package/lnd_responses/rpc_hop_as_hop.js +0 -7
  64. package/lnd_responses/rpc_payment_as_payment.js +0 -2
  65. package/lnd_responses/rpc_route_as_route.js +0 -2
  66. package/package.json +4 -4
  67. package/test/lnd_messages/test_pay_via_route_request.js +0 -2
  68. package/test/lnd_methods/fixtures/query_routes_response.json +0 -1
  69. package/test/lnd_methods/info/test_get_route_to_destination.js +0 -3
  70. package/test/lnd_methods/macaroon/test_handle_rpc_request_update.js +0 -2
  71. package/test/lnd_methods/offchain/test_finished_payment.js +0 -4
  72. package/test/lnd_methods/offchain/test_get_channels.js +1 -0
  73. package/test/lnd_methods/offchain/test_get_payment.js +0 -5
  74. package/test/lnd_methods/offchain/test_get_payments.js +0 -2
  75. package/test/lnd_methods/offchain/test_get_route_through_hops.js +0 -4
  76. package/test/lnd_methods/offchain/test_is_destination_payable.js +0 -3
  77. package/test/lnd_methods/offchain/test_pay.js +0 -3
  78. package/test/lnd_methods/offchain/test_pay_via_payment_details.js +0 -4
  79. package/test/lnd_methods/offchain/test_pay_via_payment_request.js +0 -4
  80. package/test/lnd_methods/offchain/test_pay_via_routes.js +0 -9
  81. package/test/lnd_methods/offchain/test_subscribe_to_channels.js +1 -0
  82. package/test/lnd_methods/offchain/test_subscribe_to_past_payments.js +0 -3
  83. package/test/lnd_methods/offchain/test_subscribe_to_pay_via_routes.js +0 -7
  84. package/test/lnd_methods/offchain/test_subscribe_to_payments.js +0 -3
  85. package/test/lnd_methods/offchain/test_subscribe_to_probe_for_route.js +0 -1
  86. package/test/lnd_requests/test_rpc_hop_from_hop.js +1 -10
  87. package/test/lnd_requests/test_rpc_route_from_route.js +0 -4
  88. package/test/lnd_responses/test_confirmed_from_payment.js +0 -3
  89. package/test/lnd_responses/test_confirmed_from_payment_status.js +0 -4
  90. package/test/lnd_responses/test_pending_from_payment.js +0 -2
  91. package/test/lnd_responses/test_routes_from_query_routes.js +0 -2
  92. package/test/lnd_responses/test_routing_failure_from_htlc.js +0 -2
  93. package/test/lnd_responses/test_rpc_attempt_htlc_as_attempt.js +0 -2
  94. package/test/lnd_responses/test_rpc_channel_as_channel.js +6 -0
  95. package/test/lnd_responses/test_rpc_hop_as_hop.js +0 -7
  96. package/test/lnd_responses/test_rpc_payment_as_payment.js +0 -6
  97. package/test/lnd_responses/test_rpc_route_as_route.js +0 -2
  98. package/test-typescript/typescript/attempt_route.test-d.ts +0 -1
  99. package/test-typescript/typescript/confirmed_from_payment.test-d.ts +0 -1
  100. package/test-typescript/typescript/finished_payment.test-d.ts +0 -2
  101. package/test-typescript/typescript/pay.test-d.ts +0 -1
  102. package/test-typescript/typescript/pay_via_routes.test-d.ts +0 -1
  103. package/test-typescript/typescript/subscribe_to_pay_via_routes.test-d.ts +0 -1
@@ -24,7 +24,6 @@ const makeLnd = args => {
24
24
  hops: [{
25
25
  amt_to_forward: '1',
26
26
  amt_to_forward_msat: '1000',
27
- chan_capacity: '1',
28
27
  chan_id: '1',
29
28
  custom_records: {'1': Buffer.alloc(1)},
30
29
  expiry: 1,
@@ -91,7 +90,6 @@ const makeExpectedPayment = ({}) => {
91
90
  fee_mtokens: '1',
92
91
  hops: [{
93
92
  channel: '0x0x1',
94
- channel_capacity: 1,
95
93
  fee: 0,
96
94
  fee_mtokens: '1',
97
95
  forward: 0,
@@ -105,7 +103,6 @@ const makeExpectedPayment = ({}) => {
105
103
  fee_mtokens: '1',
106
104
  hops: [{
107
105
  channel: '0x0x1',
108
- channel_capacity: 1,
109
106
  fee: 0,
110
107
  fee_mtokens: '1',
111
108
  forward: 0,
@@ -136,7 +133,6 @@ const makeLegacyConfirmed = ({}) => {
136
133
  route: {
137
134
  hops: [{
138
135
  amt_to_forward_msat: '1',
139
- chan_capacity: '1',
140
136
  chan_id: '1',
141
137
  expiry: 1,
142
138
  fee_msat: '1',
@@ -201,7 +197,6 @@ const tests = [
201
197
  fee_mtokens: '1000',
202
198
  hops: [{
203
199
  channel: '0x0x1',
204
- channel_capacity: 1,
205
200
  fee: 1,
206
201
  fee_mtokens: '1000',
207
202
  forward: 1,
@@ -23,7 +23,6 @@ const makeLnd = args => {
23
23
  amt_to_forward: '1',
24
24
  amt_to_forward_msat: '1000',
25
25
  chan_id: '1',
26
- chan_capacity: 1,
27
26
  expiry: 1,
28
27
  fee: 1,
29
28
  fee_msat: '1000',
@@ -77,7 +76,6 @@ const makeExpectedPayment = ({}) => {
77
76
  fee_mtokens: '1000',
78
77
  hops: [{
79
78
  channel: '0x0x1',
80
- channel_capacity: 1,
81
79
  fee: 1,
82
80
  fee_mtokens: '1000',
83
81
  forward: 1,
@@ -11,7 +11,6 @@ const makeExpected = overrides => {
11
11
  fee_mtokens: '1',
12
12
  hops: [{
13
13
  channel: '0x0x1',
14
- channel_capacity: 1,
15
14
  fee: 0,
16
15
  fee_mtokens: '1',
17
16
  forward: 0,
@@ -41,7 +40,6 @@ const makeLnd = ({}) => {
41
40
  route: {
42
41
  hops: [{
43
42
  amt_to_forward_msat: '1',
44
- chan_capacity: '1',
45
43
  chan_id: '1',
46
44
  expiry: 1,
47
45
  fee_msat: '1',
@@ -193,7 +191,6 @@ const tests = [
193
191
  route: {
194
192
  hops: [{
195
193
  amt_to_forward_msat: '1',
196
- chan_capacity: '1',
197
194
  chan_id: '1',
198
195
  expiry: 1,
199
196
  fee_msat: '1',
@@ -221,7 +218,6 @@ const tests = [
221
218
  fee_mtokens: '1',
222
219
  hops: [{
223
220
  channel: '0x0x1',
224
- channel_capacity: 1,
225
221
  fee: 0,
226
222
  fee_mtokens: '1',
227
223
  forward: 0,
@@ -39,7 +39,6 @@ const makePaymentData = overrides => {
39
39
  hops: [{
40
40
  amt_to_forward_msat: '1000',
41
41
  chan_id: '1',
42
- chan_capacity: 1,
43
42
  expiry: 1,
44
43
  fee_msat: '1000',
45
44
  mpp_record: {
@@ -168,7 +167,6 @@ const makeExpectedPayment = ({}) => {
168
167
  fee_mtokens: '1',
169
168
  hops: [{
170
169
  channel: '0x0x1',
171
- channel_capacity: 1,
172
170
  fee: 0,
173
171
  fee_mtokens: '1',
174
172
  forward: 0,
@@ -182,7 +180,6 @@ const makeExpectedPayment = ({}) => {
182
180
  fee_mtokens: '1',
183
181
  hops: [{
184
182
  channel: '0x0x1',
185
- channel_capacity: 1,
186
183
  fee: 0,
187
184
  fee_mtokens: '1',
188
185
  forward: 0,
@@ -44,7 +44,6 @@ const makePaymentData = overrides => {
44
44
  hops: [{
45
45
  amt_to_forward_msat: '1000',
46
46
  chan_id: '1',
47
- chan_capacity: 1,
48
47
  expiry: 1,
49
48
  fee_msat: '1000',
50
49
  mpp_record: {
@@ -127,7 +126,6 @@ const tests = [
127
126
  fee_mtokens: '1000',
128
127
  hops: [{
129
128
  channel: '1x1x1',
130
- channel_capacity: 1,
131
129
  fee: 1,
132
130
  fee_mtokens: '1000',
133
131
  forward: 1,
@@ -148,7 +146,6 @@ const tests = [
148
146
  fee_mtokens: '1000',
149
147
  hops: [{
150
148
  channel: '1x1x1',
151
- channel_capacity: 1,
152
149
  fee: 1,
153
150
  fee_mtokens: '1000',
154
151
  forward: 1,
@@ -39,7 +39,6 @@ const makePaymentData = overrides => {
39
39
  hops: [{
40
40
  amt_to_forward_msat: '1000',
41
41
  chan_id: '1',
42
- chan_capacity: 1,
43
42
  expiry: 1,
44
43
  fee_msat: '1000',
45
44
  mpp_record: {
@@ -168,7 +167,6 @@ const makeExpectedPayment = ({}) => {
168
167
  fee_mtokens: '1',
169
168
  hops: [{
170
169
  channel: '0x0x1',
171
- channel_capacity: 1,
172
170
  fee: 0,
173
171
  fee_mtokens: '1',
174
172
  forward: 0,
@@ -182,7 +180,6 @@ const makeExpectedPayment = ({}) => {
182
180
  fee_mtokens: '1',
183
181
  hops: [{
184
182
  channel: '0x0x1',
185
- channel_capacity: 1,
186
183
  fee: 0,
187
184
  fee_mtokens: '1',
188
185
  forward: 0,
@@ -213,7 +210,6 @@ const makeLegacyConfirmed = ({}) => {
213
210
  route: {
214
211
  hops: [{
215
212
  amt_to_forward_msat: '1',
216
- chan_capacity: '1',
217
213
  chan_id: '1',
218
214
  expiry: 1,
219
215
  fee_msat: '1',
@@ -39,7 +39,6 @@ const makePaymentData = overrides => {
39
39
  hops: [{
40
40
  amt_to_forward_msat: '1000',
41
41
  chan_id: '1',
42
- chan_capacity: 1,
43
42
  expiry: 1,
44
43
  fee_msat: '1000',
45
44
  mpp_record: {
@@ -136,7 +135,6 @@ const makeExpectedPayment = ({}) => {
136
135
  fee_mtokens: '1',
137
136
  hops: [{
138
137
  channel: '0x0x1',
139
- channel_capacity: 1,
140
138
  fee: 0,
141
139
  fee_mtokens: '1',
142
140
  forward: 0,
@@ -150,7 +148,6 @@ const makeExpectedPayment = ({}) => {
150
148
  fee_mtokens: '1',
151
149
  hops: [{
152
150
  channel: '0x0x1',
153
- channel_capacity: 1,
154
151
  fee: 0,
155
152
  fee_mtokens: '1',
156
153
  forward: 0,
@@ -181,7 +178,6 @@ const makeLegacyConfirmed = ({}) => {
181
178
  route: {
182
179
  hops: [{
183
180
  amt_to_forward_msat: '1',
184
- chan_capacity: '1',
185
181
  chan_id: '1',
186
182
  expiry: 1,
187
183
  fee_msat: '1',
@@ -94,7 +94,6 @@ const tests = [
94
94
  fee_mtokens: '1000',
95
95
  hops: [{
96
96
  channel: '1x1x1',
97
- channel_capacity: 1,
98
97
  fee: 1,
99
98
  fee_mtokens: '1000',
100
99
  forward: 1,
@@ -121,7 +120,6 @@ const tests = [
121
120
  fee_mtokens: '1000',
122
121
  hops: [{
123
122
  channel: '1x1x1',
124
- channel_capacity: 1,
125
123
  fee: 1,
126
124
  fee_mtokens: '1000',
127
125
  forward: 1,
@@ -152,7 +150,6 @@ const tests = [
152
150
  fee_mtokens: '1000',
153
151
  hops: [{
154
152
  channel: '1x1x1',
155
- channel_capacity: 1,
156
153
  fee: 1,
157
154
  fee_mtokens: '1000',
158
155
  forward: 1,
@@ -178,7 +175,6 @@ const tests = [
178
175
  fee_mtokens: '1000',
179
176
  hops: [...Array(21)].map(() => ({
180
177
  channel: '1x1x1',
181
- channel_capacity: 1,
182
178
  fee: 1,
183
179
  fee_mtokens: '1000',
184
180
  forward: 1,
@@ -214,7 +210,6 @@ const tests = [
214
210
  fee_mtokens: '1000',
215
211
  hops: [{
216
212
  channel: '1x1x1',
217
- channel_capacity: 1,
218
213
  fee: 1,
219
214
  fee_mtokens: '1000',
220
215
  forward: 1,
@@ -284,7 +279,6 @@ const tests = [
284
279
  hops: [
285
280
  {
286
281
  channel: '1x1x1',
287
- channel_capacity: 1,
288
282
  fee: 1,
289
283
  fee_mtokens: '1000',
290
284
  forward: 1,
@@ -294,7 +288,6 @@ const tests = [
294
288
  },
295
289
  {
296
290
  channel: '0x116x52145',
297
- channel_capacity: 1,
298
291
  fee: 1,
299
292
  fee_mtokens: '1000',
300
293
  forward: 1,
@@ -355,7 +348,6 @@ const tests = [
355
348
  fee_mtokens: '1000',
356
349
  hops: [{
357
350
  channel: '1x1x1',
358
- channel_capacity: 1,
359
351
  fee: 1,
360
352
  fee_mtokens: '1000',
361
353
  forward: 1,
@@ -375,7 +367,6 @@ const tests = [
375
367
  fee_mtokens: '1000',
376
368
  hops: [{
377
369
  channel: '1x1x1',
378
- channel_capacity: 1,
379
370
  fee: 1,
380
371
  fee_mtokens: '1000',
381
372
  forward: 1,
@@ -264,6 +264,7 @@ const tests = [
264
264
  local_reserve: 1,
265
265
  other_ids: [],
266
266
  partner_public_key: '000000000000000000000000000000000000000000000000000000000000000000',
267
+ partner_scid_alias: undefined,
267
268
  past_states: 1,
268
269
  pending_payments: [],
269
270
  received: 1,
@@ -167,7 +167,6 @@ const tests = [
167
167
  hops: [{
168
168
  amt_to_forward: '1',
169
169
  amt_to_forward_msat: '1000',
170
- chan_capacity: '1',
171
170
  chan_id: '1',
172
171
  custom_records: {'1': Buffer.alloc(1)},
173
172
  expiry: 1,
@@ -212,7 +211,6 @@ const tests = [
212
211
  hops: [
213
212
  {
214
213
  channel: '0x0x1',
215
- channel_capacity: 1,
216
214
  fee: 1,
217
215
  fee_mtokens: '1000',
218
216
  forward: 1,
@@ -231,7 +229,6 @@ const tests = [
231
229
  hops: [
232
230
  {
233
231
  channel: '0x0x1',
234
- channel_capacity: 1,
235
232
  fee: 1,
236
233
  fee_mtokens: '1000',
237
234
  forward: 1,
@@ -13,7 +13,6 @@ const route = {
13
13
  fee_mtokens: '1000',
14
14
  hops: [{
15
15
  channel: '0x0x1',
16
- channel_capacity: 1,
17
16
  fee_mtokens: '1',
18
17
  forward_mtokens: '1',
19
18
  public_key: 'public_key',
@@ -244,14 +243,12 @@ const tests = [
244
243
  hops: [
245
244
  {
246
245
  channel: '0x0x1',
247
- channel_capacity: 1,
248
246
  fee_mtokens: '1',
249
247
  forward_mtokens: '1',
250
248
  public_key: 'public_key',
251
249
  },
252
250
  {
253
251
  channel: '0x0x1',
254
- channel_capacity: 1,
255
252
  fee_mtokens: '1',
256
253
  forward_mtokens: '1',
257
254
  public_key: 'public_key',
@@ -271,14 +268,12 @@ const tests = [
271
268
  hops: [
272
269
  {
273
270
  channel: '0x0x1',
274
- channel_capacity: 1,
275
271
  fee_mtokens: '1',
276
272
  forward_mtokens: '1',
277
273
  public_key: 'public_key',
278
274
  },
279
275
  {
280
276
  channel: '0x0x1',
281
- channel_capacity: 1,
282
277
  fee_mtokens: '1',
283
278
  forward_mtokens: '1',
284
279
  public_key: 'public_key',
@@ -302,14 +297,12 @@ const tests = [
302
297
  hops: [
303
298
  {
304
299
  channel: '0x0x1',
305
- channel_capacity: 1,
306
300
  fee_mtokens: '1',
307
301
  forward_mtokens: '1',
308
302
  public_key: 'public_key',
309
303
  },
310
304
  {
311
305
  channel: '0x0x1',
312
- channel_capacity: 1,
313
306
  fee_mtokens: '1',
314
307
  forward_mtokens: '1',
315
308
  public_key: 'public_key',
@@ -59,7 +59,6 @@ const tests = [
59
59
  hops: [{
60
60
  amt_to_forward: '1',
61
61
  amt_to_forward_msat: '1000',
62
- chan_capacity: '1',
63
62
  chan_id: '1',
64
63
  custom_records: {'1': Buffer.alloc(1)},
65
64
  expiry: 1,
@@ -102,7 +101,6 @@ const tests = [
102
101
  fee_mtokens: '1000',
103
102
  hops: [{
104
103
  channel: '0x0x1',
105
- channel_capacity: 1,
106
104
  fee: 1,
107
105
  fee_mtokens: '1000',
108
106
  forward: 1,
@@ -118,7 +116,6 @@ const tests = [
118
116
  fee_mtokens: '1000',
119
117
  hops: [{
120
118
  channel: '0x0x1',
121
- channel_capacity: 1,
122
119
  fee: 1,
123
120
  fee_mtokens: '1000',
124
121
  forward: 1,
@@ -15,7 +15,6 @@ const expectedRoute = {
15
15
  fee_mtokens: '1',
16
16
  hops: [{
17
17
  channel: '0x0x1',
18
- channel_capacity: 1,
19
18
  fee: 0,
20
19
  fee_mtokens: '1',
21
20
  forward: 0,
@@ -7,23 +7,17 @@ const rpcHopFromHop = require('./../../lnd_requests/rpc_hop_from_hop');
7
7
  const tests = [
8
8
  {
9
9
  args: {},
10
- description: 'Channel capacity is expected',
11
- error: 'ExpectedNumericChannelCapacityToMapRpcHopFromHop',
12
- },
13
- {
14
- args: {channel_capacity: 1},
15
10
  description: 'Forward mtokens are expected',
16
11
  error: 'ExpectedForwardMillitokensToMapRpcHopFromHop',
17
12
  },
18
13
  {
19
- args: {channel_capacity: 1, forward_mtokens: '1'},
14
+ args: {forward_mtokens: '1'},
20
15
  description: 'Fee mtokens are expected',
21
16
  error: 'ExpectedFeeMillitokensToMapRpcHopFromHop',
22
17
  },
23
18
  {
24
19
  args: {
25
20
  channel: '0x0x1',
26
- channel_capacity: 1,
27
21
  fee: 1,
28
22
  fee_mtokens: '1000',
29
23
  forward: '1',
@@ -36,7 +30,6 @@ const tests = [
36
30
  amt_to_forward: '1',
37
31
  amt_to_forward_msat: '1000',
38
32
  chan_id: '1',
39
- chan_capacity: '1',
40
33
  expiry: 1,
41
34
  fee: '1',
42
35
  fee_msat: '1000',
@@ -47,7 +40,6 @@ const tests = [
47
40
  {
48
41
  args: {
49
42
  channel: '0x0x1',
50
- channel_capacity: 1,
51
43
  fee: 1,
52
44
  fee_mtokens: '1000',
53
45
  forward: '1',
@@ -61,7 +53,6 @@ const tests = [
61
53
  amt_to_forward: '1',
62
54
  amt_to_forward_msat: '1000',
63
55
  chan_id: '1',
64
- chan_capacity: '1',
65
56
  custom_records: {'12': Buffer.from('34', 'hex')},
66
57
  expiry: 1,
67
58
  fee: '1',
@@ -40,7 +40,6 @@ const tests = [
40
40
  fee_mtokens: '1000',
41
41
  hops: [{
42
42
  channel: '0x0x1',
43
- channel_capacity: 1,
44
43
  fee: 1,
45
44
  fee_mtokens: '1000',
46
45
  forward: 1,
@@ -59,7 +58,6 @@ const tests = [
59
58
  amt_to_forward: '1',
60
59
  amt_to_forward_msat: '1000',
61
60
  chan_id: '1',
62
- chan_capacity: '1',
63
61
  expiry: 1,
64
62
  fee: '1',
65
63
  fee_msat: '1000',
@@ -83,7 +81,6 @@ const tests = [
83
81
  fee_mtokens: '1000',
84
82
  hops: [{
85
83
  channel: '0x0x1',
86
- channel_capacity: 1,
87
84
  fee: 1,
88
85
  fee_mtokens: '1000',
89
86
  forward: 1,
@@ -102,7 +99,6 @@ const tests = [
102
99
  amt_to_forward: '1',
103
100
  amt_to_forward_msat: '1000',
104
101
  chan_id: '1',
105
- chan_capacity: '1',
106
102
  custom_records: {'1': Buffer.alloc(1)},
107
103
  expiry: 1,
108
104
  fee: '1',
@@ -20,7 +20,6 @@ const makeArgs = overrides => {
20
20
  hops: [{
21
21
  amt_to_forward: '1',
22
22
  amt_to_forward_msat: '1000',
23
- chan_capacity: '1',
24
23
  chan_id: '1',
25
24
  custom_records: {'1': Buffer.alloc(1)},
26
25
  expiry: 1,
@@ -62,7 +61,6 @@ const makeExpected = overrides => {
62
61
  fee_mtokens: '1000',
63
62
  hops: [{
64
63
  channel: '0x0x1',
65
- channel_capacity: 1,
66
64
  fee: 1,
67
65
  fee_mtokens: '1000',
68
66
  forward: 1,
@@ -78,7 +76,6 @@ const makeExpected = overrides => {
78
76
  fee_mtokens: '1000',
79
77
  hops: [{
80
78
  channel: '0x0x1',
81
- channel_capacity: 1,
82
79
  fee: 1,
83
80
  fee_mtokens: '1000',
84
81
  forward: 1,
@@ -11,7 +11,6 @@ const makeHtlc = overrides => {
11
11
  route: {
12
12
  hops: [{
13
13
  amt_to_forward_msat: '1000',
14
- chan_capacity: '1',
15
14
  chan_id: '1',
16
15
  custom_records: {
17
16
  '1': Buffer.alloc(1),
@@ -41,7 +40,6 @@ const makeRoute = () => {
41
40
  return {
42
41
  hops: [{
43
42
  amt_to_forward_msat: '1000',
44
- chan_capacity: 1,
45
43
  chan_id: '1',
46
44
  custom_records: {
47
45
  '1': Buffer.alloc(1),
@@ -78,7 +76,6 @@ const makeExpected = overrides => {
78
76
  fee_mtokens: '1000',
79
77
  hops: [{
80
78
  channel: '0x0x1',
81
- channel_capacity: 1,
82
79
  fee: 1,
83
80
  fee_mtokens: '1000',
84
81
  forward: 1,
@@ -91,7 +88,6 @@ const makeExpected = overrides => {
91
88
  fee_mtokens: '1000',
92
89
  hops: [{
93
90
  channel: '0x0x1',
94
- channel_capacity: 1,
95
91
  fee: 1,
96
92
  fee_mtokens: '1000',
97
93
  forward: 1,
@@ -20,7 +20,6 @@ const makeArgs = overrides => {
20
20
  hops: [{
21
21
  amt_to_forward: '1',
22
22
  amt_to_forward_msat: '1000',
23
- chan_capacity: '1',
24
23
  chan_id: '1',
25
24
  custom_records: {'1': Buffer.alloc(1)},
26
25
  expiry: 1,
@@ -65,7 +64,6 @@ const makeExpected = overrides => {
65
64
  fee_mtokens: '1000',
66
65
  hops: [{
67
66
  channel: '0x0x1',
68
- channel_capacity: 1,
69
67
  fee: 1,
70
68
  fee_mtokens: '1000',
71
69
  forward: 1,
@@ -56,7 +56,6 @@ const tests = [
56
56
  fee_mtokens: '1000',
57
57
  hops: [{
58
58
  channel: '1352793x157x0',
59
- channel_capacity: 16270430,
60
59
  fee: 1,
61
60
  fee_mtokens: '1000',
62
61
  forward: 830497,
@@ -81,7 +80,6 @@ const tests = [
81
80
  hops: [{
82
81
  amt_to_forward: '830497',
83
82
  amt_to_forward_msat: '830497000',
84
- chan_capacity: '16270430',
85
83
  chan_id: '1487411633484267520',
86
84
  custom_records: [{
87
85
  type: recordType,
@@ -33,7 +33,6 @@ const makeHtlc = overrides => {
33
33
  amt_to_forward: '1',
34
34
  amt_to_forward_msat: '1000',
35
35
  chan_id: '1',
36
- chan_capacity: 1,
37
36
  expiry: 1,
38
37
  fee: 0,
39
38
  fee_msat: '0',
@@ -62,7 +61,6 @@ const makeExpected = overrides => {
62
61
  hops: [
63
62
  {
64
63
  channel: '0x0x1',
65
- channel_capacity: 1,
66
64
  fee: 0,
67
65
  fee_mtokens: '0',
68
66
  forward: 1,
@@ -8,7 +8,6 @@ const route = {
8
8
  hops: [{
9
9
  amt_to_forward_msat: '1000',
10
10
  chan_id: '1',
11
- chan_capacity: 1,
12
11
  expiry: 1,
13
12
  fee_msat: '1000',
14
13
  mpp_record: {payment_addr: Buffer.alloc(1), total_amt_msat: '1'},
@@ -46,7 +45,6 @@ const makeExpected = overrides => {
46
45
  fee_mtokens: '1000',
47
46
  hops: [{
48
47
  channel: '0x0x1',
49
- channel_capacity: 1,
50
48
  fee: 1,
51
49
  fee_mtokens: '1000',
52
50
  forward: 1,
@@ -87,6 +87,7 @@ const makeExpected = overrides => {
87
87
  local_min_htlc_mtokens: '1',
88
88
  local_reserve: 1,
89
89
  other_ids: [],
90
+ partner_scid_alias: undefined,
90
91
  partner_public_key: '00',
91
92
  past_states: 1,
92
93
  pending_payments: [{
@@ -250,6 +251,11 @@ const tests = [
250
251
  description: 'RPC channel is mapped to channel with scids',
251
252
  expected: makeExpected({id: '0x0x2', other_ids: ['0x0x3']}),
252
253
  },
254
+ {
255
+ args: makeArgs({peer_scid_alias: '4'}),
256
+ description: 'RPC channel is mapped to channel with peer scid alias',
257
+ expected: makeExpected({partner_scid_alias: '0x0x4'}),
258
+ },
253
259
  {
254
260
  args: makeArgs({commitment_type: 'ANCHORS', initiator: true}),
255
261
  description: 'Initiated RPC channel is mapped to channel',
@@ -8,7 +8,6 @@ const makeArgs = overrides => {
8
8
  const args = {
9
9
  amt_to_forward_msat: '1000',
10
10
  chan_id: '1',
11
- chan_capacity: 1,
12
11
  expiry: 1,
13
12
  fee_msat: '1000',
14
13
  mpp_record: {payment_addr: Buffer.alloc(1), total_amt_msat: '1'},
@@ -24,7 +23,6 @@ const makeArgs = overrides => {
24
23
  const makeExpected = overrides => {
25
24
  const expected = {
26
25
  channel: '0x0x1',
27
- channel_capacity: 1,
28
26
  fee: 1,
29
27
  fee_mtokens: '1000',
30
28
  forward: 1,
@@ -54,11 +52,6 @@ const tests = [
54
52
  description: 'Channel id is expected',
55
53
  error: 'ExpectedNumericChannelIdInRpcHopDetails',
56
54
  },
57
- {
58
- args: makeArgs({chan_capacity: undefined}),
59
- description: 'Channel capacity is expected',
60
- error: 'ExpectedChannelCapacityTokensNumberInRpcHopDetails',
61
- },
62
55
  {
63
56
  args: makeArgs({fee_msat: undefined}),
64
57
  description: 'Forwarding fee millitokens is expected',
@@ -39,7 +39,6 @@ const makeArgs = overrides => {
39
39
  {
40
40
  amt_to_forward_msat: '1000',
41
41
  chan_id: '1',
42
- chan_capacity: 1,
43
42
  expiry: 1,
44
43
  fee_msat: '1000',
45
44
  mpp_record: {
@@ -52,7 +51,6 @@ const makeArgs = overrides => {
52
51
  {
53
52
  amt_to_forward_msat: '1000',
54
53
  chan_id: '1',
55
- chan_capacity: 1,
56
54
  expiry: 1,
57
55
  fee_msat: '1000',
58
56
  mpp_record: {
@@ -101,7 +99,6 @@ const makeExpected = overrides => {
101
99
  hops: [
102
100
  {
103
101
  channel: '0x0x1',
104
- channel_capacity: 1,
105
102
  fee: 1,
106
103
  fee_mtokens: '1000',
107
104
  forward: 1,
@@ -111,7 +108,6 @@ const makeExpected = overrides => {
111
108
  },
112
109
  {
113
110
  channel: '0x0x1',
114
- channel_capacity: 1,
115
111
  fee: 1,
116
112
  fee_mtokens: '1000',
117
113
  forward: 1,
@@ -257,7 +253,6 @@ const tests = [
257
253
  hops: [{
258
254
  amt_to_forward: '100',
259
255
  amt_to_forward_msat: '100000',
260
- chan_capacity: '1000000',
261
256
  chan_id: '487083651170304',
262
257
  custom_records: {},
263
258
  expiry: 491,
@@ -302,7 +297,6 @@ const tests = [
302
297
  fee_mtokens: '0',
303
298
  hops: [{
304
299
  channel: '443x1x0',
305
- channel_capacity: 1000000,
306
300
  fee: 0,
307
301
  fee_mtokens: '0',
308
302
  forward: 100,