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
@@ -16,8 +16,6 @@ export type SubscribeToPayViaRoutesArgs = AuthenticatedLightningArgs<{
16
16
  hops: {
17
17
  /** Standard Format Channel Id */
18
18
  channel: string;
19
- /** Channel Capacity Tokens */
20
- channel_capacity: number;
21
19
  /** Fee */
22
20
  fee: number;
23
21
  /** Fee Millitokens */
@@ -98,8 +96,6 @@ export type SubscribeToPayViaRoutesPayingEvent = {
98
96
  hops: {
99
97
  /** Standard Format Channel Id */
100
98
  channel: string;
101
- /** Channel Capacity Tokens */
102
- channel_capacity: number;
103
99
  /** Fee */
104
100
  fee: number;
105
101
  /** Fee Millitokens */
@@ -155,8 +151,6 @@ export type SubscribeToPayViaRoutesRoutingFailureEvent = {
155
151
  hops: {
156
152
  /** Standard Format Channel Id */
157
153
  channel: string;
158
- /** Channel Capacity Tokens */
159
- channel_capacity: number;
160
154
  /** Fee */
161
155
  fee: number;
162
156
  /** Fee Millitokens */
@@ -205,8 +199,6 @@ export type SubscribeToPayViaRoutesSuccessEvent = {
205
199
  hops: {
206
200
  /** Standard Format Channel Id */
207
201
  channel: string;
208
- /** Hop Channel Capacity Tokens */
209
- channel_capacity: number;
210
202
  /** Hop Forward Fee Millitokens */
211
203
  fee_mtokens: string;
212
204
  /** Hop Forwarded Millitokens */
@@ -230,8 +222,6 @@ export type SubscribeToPayViaRoutesSuccessEvent = {
230
222
  hops: {
231
223
  /** Standard Format Channel Id */
232
224
  channel: string;
233
- /** Channel Capacity Tokens */
234
- channel_capacity: number;
235
225
  /** Fee */
236
226
  fee: number;
237
227
  /** Fee Millitokens */
@@ -38,7 +38,6 @@ const unknownWireError = 'unknown wire error';
38
38
  fee_mtokens: <Total Fee Millitokens To Pay String>
39
39
  hops: [{
40
40
  channel: <Standard Format Channel Id String>
41
- channel_capacity: <Channel Capacity Tokens Number>
42
41
  fee: <Fee Number>
43
42
  fee_mtokens: <Fee Millitokens String>
44
43
  forward: <Forward Tokens Number>
@@ -104,7 +103,6 @@ const unknownWireError = 'unknown wire error';
104
103
  fee_mtokens: <Total Fee Millitokens To Pay String>
105
104
  hops: [{
106
105
  channel: <Standard Format Channel Id String>
107
- channel_capacity: <Channel Capacity Tokens Number>
108
106
  fee: <Fee Number>
109
107
  fee_mtokens: <Fee Millitokens String>
110
108
  forward: <Forward Tokens Number>
@@ -139,7 +137,6 @@ const unknownWireError = 'unknown wire error';
139
137
  fee_mtokens: <Total Fee Millitokens To Pay String>
140
138
  hops: [{
141
139
  channel: <Standard Format Channel Id String>
142
- channel_capacity: <Channel Capacity Tokens Number>
143
140
  fee: <Fee Number>
144
141
  fee_mtokens: <Fee Millitokens String>
145
142
  forward: <Forward Tokens Number>
@@ -169,7 +166,6 @@ const unknownWireError = 'unknown wire error';
169
166
  fee_mtokens: <Fee Paid Millitokens String>
170
167
  hops: [{
171
168
  channel: <Standard Format Channel Id String>
172
- channel_capacity: <Hop Channel Capacity Tokens Number>
173
169
  fee_mtokens: <Hop Forward Fee Millitokens String>
174
170
  forward_mtokens: <Hop Forwarded Millitokens String>
175
171
  timeout: <Hop CLTV Expiry Block Height Number>
@@ -183,7 +179,6 @@ const unknownWireError = 'unknown wire error';
183
179
  fee_mtokens: <Total Fee Millitokens To Pay String>
184
180
  hops: [{
185
181
  channel: <Standard Format Channel Id String>
186
- channel_capacity: <Channel Capacity Tokens Number>
187
182
  fee: <Fee Number>
188
183
  fee_mtokens: <Fee Millitokens String>
189
184
  forward: <Forward Tokens Number>
@@ -35,8 +35,6 @@ export interface SubscribeToPaymentsConfirmedEvent {
35
35
  hops: Array<{
36
36
  /** Standard Format Channel Id String */
37
37
  channel: string;
38
- /** Channel Capacity Tokens Number */
39
- channel_capacity: number;
40
38
  /** Fee Tokens Rounded Down Number */
41
39
  fee: number;
42
40
  /** Fee Millitokens String */
@@ -113,8 +111,6 @@ export interface SubscribeToPaymentsPayingEvent {
113
111
  hops: Array<{
114
112
  /** Standard Format Channel Id String */
115
113
  channel: string;
116
- /** Channel Capacity Tokens Number */
117
- channel_capacity: number;
118
114
  /** Fee Tokens Rounded Down Number */
119
115
  fee: number;
120
116
  /** Fee Millitokens String */
@@ -40,7 +40,6 @@ const type = 'router';
40
40
  fee_mtokens: <Total Fee Millitokens Paid String>
41
41
  hops: [{
42
42
  channel: <Standard Format Channel Id String>
43
- channel_capacity: <Channel Capacity Tokens Number>
44
43
  fee: <Fee Tokens Rounded Down Number>
45
44
  fee_mtokens: <Fee Millitokens String>
46
45
  forward: <Forward Tokens Number>
@@ -82,7 +81,6 @@ const type = 'router';
82
81
  fee_mtokens: <Total Fee Millitokens Pending String>
83
82
  hops: [{
84
83
  channel: <Standard Format Channel Id String>
85
- channel_capacity: <Channel Capacity Tokens Number>
86
84
  fee: <Fee Tokens Rounded Down Number>
87
85
  fee_mtokens: <Fee Millitokens String>
88
86
  forward: <Forward Tokens Number>
@@ -46,8 +46,6 @@ export type SubscribeToProbeForRouteArgs = AuthenticatedLightningArgs<{
46
46
  routes?: {
47
47
  /** Base Routing Fee In Millitokens */
48
48
  base_fee_mtokens?: string;
49
- /** Channel Capacity Tokens */
50
- channel_capacity?: number;
51
49
  /** Standard Format Channel Id */
52
50
  channel?: string;
53
51
  /** CLTV Blocks Delta */
@@ -76,8 +74,6 @@ export type SubscribeToProbeForRouteProbeSuccessEvent = {
76
74
  hops: {
77
75
  /** Standard Format Channel Id */
78
76
  channel: string;
79
- /** Channel Capacity Tokens */
80
- channel_capacity: number;
81
77
  /** Fee */
82
78
  fee: number;
83
79
  /** Fee Millitokens */
@@ -125,8 +121,6 @@ export type SubscribeToProbeForRouteProbingEvent = {
125
121
  hops: {
126
122
  /** Standard Format Channel Id */
127
123
  channel: string;
128
- /** Channel Capacity Tokens */
129
- channel_capacity: number;
130
124
  /** Fee */
131
125
  fee: number;
132
126
  /** Fee Millitokens */
@@ -196,8 +190,6 @@ export type SubscribeToProbeForRouteRoutingFailureEvent = {
196
190
  hops: {
197
191
  /** Standard Format Channel Id */
198
192
  channel: string;
199
- /** Channel Capacity Tokens */
200
- channel_capacity: number;
201
193
  /** Fee */
202
194
  fee: number;
203
195
  /** Fee Millitokens */
@@ -49,7 +49,6 @@ const {nextTick} = process;
49
49
  [probe_timeout_ms]: <Fail Entire Probe After Milliseconds Number>
50
50
  [routes]: [[{
51
51
  [base_fee_mtokens]: <Base Routing Fee In Millitokens String>
52
- [channel_capacity]: <Channel Capacity Tokens Number>
53
52
  [channel]: <Standard Format Channel Id String>
54
53
  [cltv_delta]: <CLTV Blocks Delta Number>
55
54
  [fee_rate]: <Fee Rate In Millitokens Per Million Number>
@@ -73,7 +72,6 @@ const {nextTick} = process;
73
72
  fee_mtokens: <Total Fee Millitokens To Pay String>
74
73
  hops: [{
75
74
  channel: <Standard Format Channel Id String>
76
- channel_capacity: <Channel Capacity Tokens Number>
77
75
  fee: <Fee Number>
78
76
  fee_mtokens: <Fee Millitokens String>
79
77
  forward: <Forward Tokens Number>
@@ -103,7 +101,6 @@ const {nextTick} = process;
103
101
  fee_mtokens: <Total Fee Millitokens To Pay String>
104
102
  hops: [{
105
103
  channel: <Standard Format Channel Id String>
106
- channel_capacity: <Channel Capacity Tokens Number>
107
104
  fee: <Fee Number>
108
105
  fee_mtokens: <Fee Millitokens String>
109
106
  forward: <Forward Tokens Number>
@@ -148,7 +145,6 @@ const {nextTick} = process;
148
145
  fee_mtokens: <Total Fee Millitokens To Pay String>
149
146
  hops: [{
150
147
  channel: <Standard Format Channel Id String>
151
- channel_capacity: <Channel Capacity Tokens Number>
152
148
  fee: <Fee Number>
153
149
  fee_mtokens: <Fee Millitokens String>
154
150
  forward: <Forward Tokens Number>
@@ -8,7 +8,6 @@ const millitokensAsTokens = n => Number(BigInt(n) / BigInt(1e3));
8
8
 
9
9
  {
10
10
  channel: <Standard Format Channel Id String>
11
- channel_capacity: <Channel Capacity Tokens Number>
12
11
  fee: <Fee Number>
13
12
  fee_mtokens: <Fee Millitokens String>
14
13
  forward: <Forward Tokens Number>
@@ -29,7 +28,6 @@ const millitokensAsTokens = n => Number(BigInt(n) / BigInt(1e3));
29
28
  amt_to_forward: <Tokens to Forward String>
30
29
  amt_to_forward_msat: <Millitokens to Forward String>
31
30
  chan_id: <Numeric Format Channel Id String>
32
- chan_capacity: <Channel Capacity Number>
33
31
  [custom_records]: {<TLV Type Number String>: <TLV Value Buffer Object>}
34
32
  expiry: <Timeout Chain Height Number>
35
33
  fee: <Fee in Tokens Number>
@@ -39,10 +37,6 @@ const millitokensAsTokens = n => Number(BigInt(n) / BigInt(1e3));
39
37
  }
40
38
  */
41
39
  module.exports = args => {
42
- if (!isNumber(args.channel_capacity)) {
43
- throw new Error('ExpectedNumericChannelCapacityToMapRpcHopFromHop');
44
- }
45
-
46
40
  if (!args.forward_mtokens) {
47
41
  throw new Error('ExpectedForwardMillitokensToMapRpcHopFromHop');
48
42
  }
@@ -55,7 +49,6 @@ module.exports = args => {
55
49
  amt_to_forward: millitokensAsTokens(args.forward_mtokens).toString(),
56
50
  amt_to_forward_msat: args.forward_mtokens,
57
51
  chan_id: chanNumber({channel: args.channel}).number,
58
- chan_capacity: args.channel_capacity.toString(),
59
52
  expiry: args.timeout,
60
53
  fee: millitokensAsTokens(args.fee_mtokens).toString(),
61
54
  fee_msat: args.fee_mtokens,
@@ -9,7 +9,6 @@ const isNumber = n => !isNaN(n);
9
9
  fee_mtokens: <Route Fee Millitokens String>
10
10
  hops: [{
11
11
  channel: <Standard Format Channel Id String>
12
- channel_capacity: <Channel Capacity Tokens Number>
13
12
  fee: <Fee Number>
14
13
  fee_mtokens: <Fee Millitokens String>
15
14
  forward: <Forward Tokens Number>
@@ -41,7 +40,6 @@ const isNumber = n => !isNaN(n);
41
40
  amt_to_forward: <Tokens to Forward String>
42
41
  amt_to_forward_msat: <Millitokens to Forward String>
43
42
  chan_id: <Numeric Format Channel Id String>
44
- chan_capacity: <Channel Capacity Number>
45
43
  [custom_records]: {<TLV Type Number String>: <TLV Value Buffer Object>}
46
44
  expiry: <Timeout Chain Height Number>
47
45
  fee: <Fee in Tokens Number>
@@ -24,8 +24,6 @@ export type ConfirmedFromPaymentArgs = {
24
24
  amt_to_forward_msat: string;
25
25
  /** Numeric Format Channel Id String */
26
26
  chan_id: string;
27
- /** Channel Capacity String */
28
- chan_capacity: string;
29
27
  custom_records: {
30
28
  [key: string]: Buffer;
31
29
  };
@@ -88,8 +86,6 @@ export type ConfirmedFromPaymentResult = {
88
86
  hops: {
89
87
  /** First Path Standard Format Channel Id String */
90
88
  channel: string;
91
- /** First Path Channel Capacity Tokens Number */
92
- channel_capacity: number;
93
89
  /** First Route Fee Path Rounded Down Number */
94
90
  fee: number;
95
91
  /** First Path Fee Millitokens String */
@@ -117,8 +113,6 @@ export type ConfirmedFromPaymentResult = {
117
113
  hops: {
118
114
  /** Standard Format Channel Id String */
119
115
  channel: string;
120
- /** Channel Capacity Tokens Number */
121
- channel_capacity: number;
122
116
  /** Fee Tokens Rounded Down Number */
123
117
  fee: number;
124
118
  /** Fee Millitokens String */
@@ -27,7 +27,6 @@ const nsAsDate = ns => new Date(Number(BigInt(ns) / BigInt(1e6)));
27
27
  amt_to_forward: <Tokens to Forward String>
28
28
  amt_to_forward_msat: <Millitokens to Forward String>
29
29
  chan_id: <Numeric Format Channel Id String>
30
- chan_capacity: <Channel Capacity Tokens String>
31
30
  custom_records: {
32
31
  <UInt64 String>: <Record Data Buffer>
33
32
  }
@@ -72,7 +71,6 @@ const nsAsDate = ns => new Date(Number(BigInt(ns) / BigInt(1e6)));
72
71
  fee_mtokens: <Total Fee Millitokens Paid String>
73
72
  hops: [{
74
73
  channel: <First Path Standard Format Channel Id String>
75
- channel_capacity: <First Path Channel Capacity Tokens Number>
76
74
  fee: <First Route Fee Path Rounded Down Number>
77
75
  fee_mtokens: <First Path Fee Millitokens String>
78
76
  forward: <First Path Forward Tokens Number>
@@ -88,7 +86,6 @@ const nsAsDate = ns => new Date(Number(BigInt(ns) / BigInt(1e6)));
88
86
  fee_mtokens: <Total Fee Millitokens Paid String>
89
87
  hops: [{
90
88
  channel: <Standard Format Channel Id String>
91
- channel_capacity: <Channel Capacity Tokens Number>
92
89
  fee: <Fee Tokens Rounded Down Number>
93
90
  fee_mtokens: <Fee Millitokens String>
94
91
  forward: <Forward Tokens Number>
@@ -22,7 +22,6 @@ const sum = arr => arr.reduce((sum, n) => sum + BigInt(n), BigInt(Number()));
22
22
  route: [{
23
23
  hops: [{
24
24
  amt_to_forward_msat: <Forward Amount Millitokens String>
25
- chan_capacity: <Channel Capacity Tokens String>
26
25
  chan_id: <Numeric Format Channel Id String>
27
26
  custom_records: {
28
27
  <Record Type String>: <Record Value Buffer>
@@ -46,7 +45,6 @@ const sum = arr => arr.reduce((sum, n) => sum + BigInt(n), BigInt(Number()));
46
45
  [route]: {
47
46
  hops: [{
48
47
  amt_to_forward_msat: <Forward Amount Millitokens String>
49
- chan_capacity: <Channel Capacity Tokens String>
50
48
  chan_id: <Numeric Format Channel Id String>
51
49
  custom_records: {
52
50
  <Record Type String>: <Record Value Buffer>
@@ -75,7 +73,6 @@ const sum = arr => arr.reduce((sum, n) => sum + BigInt(n), BigInt(Number()));
75
73
  fee_mtokens: <Total Fee Millitokens Paid String>
76
74
  hops: [{
77
75
  channel: <First Route Standard Format Channel Id String>
78
- channel_capacity: <First Route Channel Capacity Tokens Number>
79
76
  fee: <First Route Fee Tokens Rounded Down Number>
80
77
  fee_mtokens: <First Route Fee Millitokens String>
81
78
  forward: <First Route Forward Tokens Number>
@@ -88,7 +85,6 @@ const sum = arr => arr.reduce((sum, n) => sum + BigInt(n), BigInt(Number()));
88
85
  fee_mtokens: <Total Fee Millitokens Paid String>
89
86
  hops: [{
90
87
  channel: <Standard Format Channel Id String>
91
- channel_capacity: <Channel Capacity Tokens Number>
92
88
  fee: <Fee Tokens Rounded Down Number>
93
89
  fee_mtokens: <Fee Millitokens String>
94
90
  forward: <Forward Tokens Number>
@@ -139,7 +135,6 @@ module.exports = ({htlcs, preimage, route}) => {
139
135
  fee_mtokens: route.total_fees_msat,
140
136
  hops: route.hops.map(hop => ({
141
137
  channel: chanFormat({number: hop.chan_id}).channel,
142
- channel_capacity: Number(hop.chan_capacity),
143
138
  fee: safeTokens({mtokens: hop.fee_msat}).tokens,
144
139
  fee_mtokens: hop.fee_msat,
145
140
  forward: safeTokens({mtokens: hop.amt_to_forward_msat}).tokens,
@@ -27,7 +27,6 @@ const nsAsDate = ns => new Date(Number(BigInt(ns) / BigInt(1e6)));
27
27
  amt_to_forward: <Tokens to Forward String>
28
28
  amt_to_forward_msat: <Millitokens to Forward String>
29
29
  chan_id: <Numeric Format Channel Id String>
30
- chan_capacity: <Channel Capacity Tokens String>
31
30
  custom_records: {
32
31
  <UInt64 String>: <Record Data Buffer>
33
32
  }
@@ -74,7 +73,6 @@ const nsAsDate = ns => new Date(Number(BigInt(ns) / BigInt(1e6)));
74
73
  fee_mtokens: <Total Fee Millitokens Pending String>
75
74
  hops: [{
76
75
  channel: <Standard Format Channel Id String>
77
- channel_capacity: <Channel Capacity Tokens Number>
78
76
  fee: <Fee Tokens Rounded Down Number>
79
77
  fee_mtokens: <Fee Millitokens String>
80
78
  forward: <Forward Tokens Number>
@@ -16,7 +16,6 @@ const successDenominator = 1e6;
16
16
  routes: [{
17
17
  hops: [{
18
18
  amt_to_forward_msat: <Amount to Forward Millitokens String>
19
- chan_capacity: <Channel Capacity Tokens String>
20
19
  chan_id: <Numeric Format Channel Id String>
21
20
  custom_records: {
22
21
  <Record Type String>: <Record Value Buffer>
@@ -46,7 +45,6 @@ const successDenominator = 1e6;
46
45
  fee_mtokens: <Route Fee Millitokens String>
47
46
  hops: [{
48
47
  channel: <Standard Format Channel Id String>
49
- channel_capacity: <Channel Capacity Tokens Number>
50
48
  fee: <Fee Number>
51
49
  fee_mtokens: <Fee Millitokens String>
52
50
  forward: <Forward Tokens Number>
@@ -124,7 +122,6 @@ module.exports = ({response}) => {
124
122
  hops: route.hops.map(h => {
125
123
  return {
126
124
  channel: chanFormat({number: h.chan_id}).channel,
127
- channel_capacity: Number(h.chan_capacity),
128
125
  fee: safeTokens({mtokens: h.fee_msat}).tokens,
129
126
  fee_mtokens: h.fee_msat,
130
127
  forward: safeTokens({mtokens: h.amt_to_forward_msat}).tokens,
@@ -31,7 +31,6 @@ const rpcRouteAsRoute = require('./rpc_route_as_route');
31
31
  amt_to_forward: <Tokens to Forward String>
32
32
  amt_to_forward_msat: <Millitokens to Forward String>
33
33
  chan_id: <Numeric Format Channel Id String>
34
- chan_capacity: <Channel Capacity Number>
35
34
  expiry: <Timeout Chain Height Number>
36
35
  fee: <Fee in Tokens Number>
37
36
  fee_msat: <Fee in Millitokens Number>
@@ -66,7 +65,6 @@ const rpcRouteAsRoute = require('./rpc_route_as_route');
66
65
  fee_mtokens: <Total Route Fee Millitokens To Pay String>
67
66
  hops: [{
68
67
  channel: <Standard Format Channel Id String>
69
- channel_capacity: <Channel Capacity Tokens Number>
70
68
  fee: <Fee Number>
71
69
  fee_mtokens: <Fee Millitokens String>
72
70
  forward: <Forward Tokens Number>
@@ -34,7 +34,6 @@ const nsAsMs = ns => Number(BigInt(ns) / BigInt(1e6));
34
34
  hops: [{
35
35
  amt_to_forward_msat: <Millitokens to Forward String>
36
36
  chan_id: <Numeric Format Channel Id String>
37
- chan_capacity: <Channel Capacity Number>
38
37
  custom_records: {
39
38
  <UInt64 String>: <Record Data Buffer>
40
39
  }
@@ -72,7 +71,6 @@ const nsAsMs = ns => Number(BigInt(ns) / BigInt(1e6));
72
71
  fee_mtokens: <Route Fee Millitokens String>
73
72
  hops: [{
74
73
  channel: <Standard Format Channel Id String>
75
- channel_capacity: <Channel Capacity Tokens Number>
76
74
  fee: <Fee Number>
77
75
  fee_mtokens: <Fee Millitokens String>
78
76
  forward: <Forward Tokens Number>
@@ -36,6 +36,7 @@ const outpointDelimiter = ':';
36
36
  }
37
37
  num_updates: <Updated Channel Count String>
38
38
  memo: <Channel Description String>
39
+ [peer_scid_alias]: <Peer Short Channel Id Alias String>
39
40
  pending_htlcs: [{
40
41
  amount: <HTLC Tokens Amount String>
41
42
  expiration_height: <CLTV Timeout Block Height Number>
@@ -61,6 +62,7 @@ const outpointDelimiter = ':';
61
62
  total_satoshis_received: <Total Tokens Transferred Inbound String>
62
63
  total_satoshis_sent: <Total Tokens Transferred Outbound String>
63
64
  unsettled_balance: <Balance In Transaction Tokens String>
65
+ [peer_scid_alias]: <Peer Assigned Channel Id Number String>
64
66
  uptime: <Channel Internal Monitoring Channel Active Seconds Number>
65
67
  zero_conf_confirmed_scid: <Trusted Channel Confirmed Id Number String>
66
68
  }
@@ -93,6 +95,7 @@ const outpointDelimiter = ':';
93
95
  local_reserve: <Local Reserved Tokens Number>
94
96
  other_ids: [<Other Channel Id String>]
95
97
  partner_public_key: <Channel Partner Public Key String>
98
+ [partner_scid_alias]: <Peer Assigned Standard Format Channel Id String>
96
99
  past_states: <Total Count of Past States Number>
97
100
  pending_payments: [{
98
101
  id: <Payment Preimage Hash Hex String>
@@ -256,6 +259,9 @@ module.exports = args => {
256
259
  local_min_htlc_mtokens: own.min_htlc_msat,
257
260
  local_reserve: Number(own.chan_reserve_sat),
258
261
  other_ids: otherIds.map(n => n.channel),
262
+ partner_scid_alias: args.peer_scid_alias
263
+ ? chanFormat({number: args.peer_scid_alias}).channel
264
+ : undefined,
259
265
  partner_public_key: args.remote_pubkey,
260
266
  past_states: Number(args.num_updates),
261
267
  pending_payments: args.pending_htlcs.map(rpcHtlcAsPayment),
@@ -7,7 +7,6 @@ const millitokensPerToken = BigInt(1e3);
7
7
  {
8
8
  amt_to_forward_msat: <Millitokens to Forward String>
9
9
  chan_id: <Numeric Format Channel Id String>
10
- chan_capacity: <Channel Capacity Number>
11
10
  custom_records: {
12
11
  <UInt64 String>: <Record Data Buffer>
13
12
  }
@@ -27,7 +26,6 @@ const millitokensPerToken = BigInt(1e3);
27
26
  @returns
28
27
  {
29
28
  channel: <Standard Format Channel Id String>
30
- channel_capacity: <Channel Capacity Tokens Number>
31
29
  fee: <Fee Number>
32
30
  fee_mtokens: <Fee Millitokens String>
33
31
  forward: <Forward Tokens Number>
@@ -53,10 +51,6 @@ module.exports = hop => {
53
51
  throw new Error('ExpectedNumericChannelIdInRpcHopDetails');
54
52
  }
55
53
 
56
- if (hop.chan_capacity === undefined) {
57
- throw new Error('ExpectedChannelCapacityTokensNumberInRpcHopDetails');
58
- }
59
-
60
54
  if (!hop.fee_msat) {
61
55
  throw new Error('ExpectedHtlcForwardingMillitokensFeeInRpcHopDetails');
62
56
  }
@@ -79,7 +73,6 @@ module.exports = hop => {
79
73
 
80
74
  return {
81
75
  channel: chanFormat({number: hop.chan_id}).channel,
82
- channel_capacity: Number(hop.chan_capacity),
83
76
  fee: Number(BigInt(hop.fee_msat) / millitokensPerToken),
84
77
  fee_mtokens: hop.fee_msat,
85
78
  forward: Number(BigInt(hop.amt_to_forward_msat) / millitokensPerToken),
@@ -45,7 +45,6 @@ const routePublicKeys = route => route.hops.map(n => n.public_key);
45
45
  amt_to_forward: <Tokens to Forward String>
46
46
  amt_to_forward_msat: <Millitokens to Forward String>
47
47
  chan_id: <Numeric Format Channel Id String>
48
- chan_capacity: <Channel Capacity Number>
49
48
  expiry: <Timeout Chain Height Number>
50
49
  fee: <Fee in Tokens Number>
51
50
  fee_msat: <Fee in Millitokens Number>
@@ -121,7 +120,6 @@ const routePublicKeys = route => route.hops.map(n => n.public_key);
121
120
  fee_mtokens: <Route Fee Millitokens String>
122
121
  hops: [{
123
122
  channel: <Standard Format Channel Id String>
124
- channel_capacity: <Channel Capacity Tokens Number>
125
123
  fee: <Fee Number>
126
124
  fee_mtokens: <Fee Millitokens String>
127
125
  forward: <Forward Tokens Number>
@@ -9,7 +9,6 @@ const millitokensPerToken = BigInt(1e3);
9
9
  hops: [{
10
10
  amt_to_forward_msat: <Millitokens to Forward String>
11
11
  chan_id: <Numeric Format Channel Id String>
12
- chan_capacity: <Channel Capacity Number>
13
12
  custom_records: {
14
13
  <UInt64 String>: <Record Data Buffer>
15
14
  }
@@ -36,7 +35,6 @@ const millitokensPerToken = BigInt(1e3);
36
35
  fee_mtokens: <Route Fee Millitokens String>
37
36
  hops: [{
38
37
  channel: <Standard Format Channel Id String>
39
- channel_capacity: <Channel Capacity Tokens Number>
40
38
  fee: <Fee Tokens Number>
41
39
  fee_mtokens: <Fee Millitokens String>
42
40
  forward: <Forward Tokens Number>
package/package.json CHANGED
@@ -9,8 +9,8 @@
9
9
  "dependencies": {
10
10
  "@alexbosworth/blockchain": "3.2.0",
11
11
  "@grpc/grpc-js": "1.14.3",
12
- "@grpc/proto-loader": "0.8.0",
13
- "@types/node": "25.6.0",
12
+ "@grpc/proto-loader": "0.8.1",
13
+ "@types/node": "25.7.0",
14
14
  "@types/request": "2.48.13",
15
15
  "@types/ws": "8.18.1",
16
16
  "async": "3.2.6",
@@ -28,7 +28,7 @@
28
28
  "typescript": "6.0.3"
29
29
  },
30
30
  "engines": {
31
- "node": ">=20"
31
+ "node": ">=22"
32
32
  },
33
33
  "keywords": [
34
34
  "grpc",
@@ -51,5 +51,5 @@
51
51
  "directory": "test-typescript/typescript"
52
52
  },
53
53
  "types": "index.d.ts",
54
- "version": "11.0.5"
54
+ "version": "12.0.0"
55
55
  }
@@ -11,7 +11,6 @@ const makeArgs = overrides => {
11
11
  hops: [{
12
12
  amt_to_forward_msat: '1',
13
13
  chan_id: '1',
14
- chan_capacity: 1,
15
14
  custom_records: {},
16
15
  expiry: 1,
17
16
  pub_key: Buffer.alloc(33, 3).toString('hex'),
@@ -37,7 +36,6 @@ const makeExpected = overrides => {
37
36
  fee_mtokens: '1',
38
37
  hops: [{
39
38
  channel: '0x0x1',
40
- channel_capacity: 1,
41
39
  fee: 0,
42
40
  fee_mtokens: '1',
43
41
  forward: 0,
@@ -2,7 +2,6 @@
2
2
  "routes": [{
3
3
  "hops": [{
4
4
  "amt_to_forward_msat": "1",
5
- "chan_capacity": "1",
6
5
  "chan_id": "1",
7
6
  "custom_records": {},
8
7
  "expiry": 1,
@@ -15,7 +15,6 @@ const makeLnd = ({custom, err, res}) => {
15
15
  routes: [{
16
16
  hops: [{
17
17
  amt_to_forward_msat: '1',
18
- chan_capacity: '1',
19
18
  chan_id: '1',
20
19
  custom_records: custom || customRecords,
21
20
  expiry: 1,
@@ -173,7 +172,6 @@ const tests = [
173
172
  fee_mtokens: '1',
174
173
  hops: [{
175
174
  channel: '0x0x1',
176
- channel_capacity: 1,
177
175
  fee: 0,
178
176
  fee_mtokens: '1',
179
177
  forward: 0,
@@ -202,7 +200,6 @@ const tests = [
202
200
  fee_mtokens: '1',
203
201
  hops: [{
204
202
  channel: '0x0x1',
205
- channel_capacity: 1,
206
203
  fee: 0,
207
204
  fee_mtokens: '1',
208
205
  forward: 0,
@@ -134,7 +134,6 @@ const tests = [
134
134
  hops: [{
135
135
  amt_to_forward_msat: '1',
136
136
  chan_id: '1',
137
- chan_capacity: 1,
138
137
  custom_records: {},
139
138
  expiry: 1,
140
139
  pub_key: Buffer.alloc(33, 3).toString('hex'),
@@ -176,7 +175,6 @@ const tests = [
176
175
  fee_mtokens: '1',
177
176
  hops: [{
178
177
  channel: '0x0x1',
179
- channel_capacity: 1,
180
178
  fee: 0,
181
179
  fee_mtokens: '1',
182
180
  forward: 0,
@@ -12,7 +12,6 @@ const makeArgs = overrides => {
12
12
  fee_mtokens: '1000',
13
13
  hops: [{
14
14
  channel: '0x0x1',
15
- channel_capacity: 1,
16
15
  fee: 1,
17
16
  fee_mtokens: '1000',
18
17
  forward_mtokens: '1000',
@@ -26,7 +25,6 @@ const makeArgs = overrides => {
26
25
  fee_mtokens: '1000',
27
26
  hops: [{
28
27
  channel: '0x0x1',
29
- channel_capacity: 1,
30
28
  fee: 1,
31
29
  fee_mtokens: '1000',
32
30
  forward_mtokens: '1000',
@@ -100,7 +98,6 @@ const tests = [
100
98
  fee_mtokens: '1000',
101
99
  hops: [{
102
100
  channel: '0x0x1',
103
- channel_capacity: 1,
104
101
  fee: 1,
105
102
  fee_mtokens: '1000',
106
103
  forward_mtokens: '1000',
@@ -114,7 +111,6 @@ const tests = [
114
111
  fee_mtokens: '1000',
115
112
  hops: [{
116
113
  channel: '0x0x1',
117
- channel_capacity: 1,
118
114
  fee: 1,
119
115
  fee_mtokens: '1000',
120
116
  forward_mtokens: '1000',
@@ -28,6 +28,7 @@ const makeExpected = overrides => {
28
28
  local_max_pending_mtokens: '1',
29
29
  local_reserve: 1,
30
30
  other_ids: [],
31
+ partner_scid_alias: undefined,
31
32
  partner_public_key: 'b',
32
33
  past_states: 1,
33
34
  pending_payments: [{