lightning 11.0.4 → 11.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Versions
2
2
 
3
- ## 11.0.4
3
+ ## 11.1.0
4
+
5
+ - `getChannels`: Add support for `partner_scid_alias`
6
+
7
+ ## 11.0.5
4
8
 
5
9
  - Add support for LND 0.20.1
6
10
 
@@ -60,6 +60,8 @@ export type GetChannelsResult = {
60
60
  local_reserve: number;
61
61
  /** Other Channel Ids */
62
62
  other_ids: string[];
63
+ /** Peer Assigned Standard Format Channel Id */
64
+ partner_scid_alias?: string;
63
65
  /** Channel Partner Public Key */
64
66
  partner_public_key: string;
65
67
  /** Past Channel States Count */
@@ -54,6 +54,7 @@ const type = 'default';
54
54
  local_reserve: <Local Reserved Tokens Number>
55
55
  other_ids: [<Other Channel Id String>]
56
56
  partner_public_key: <Channel Partner Public Key String>
57
+ [partner_scid_alias]: <Peer Assigned Standard Format Channel Id String>
57
58
  past_states: <Total Count of Past Channel States Number>
58
59
  pending_payments: [{
59
60
  id: <Payment Preimage Hash Hex String>
@@ -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),
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "@alexbosworth/blockchain": "3.2.0",
11
11
  "@grpc/grpc-js": "1.14.3",
12
12
  "@grpc/proto-loader": "0.8.0",
13
- "@types/node": "25.5.2",
13
+ "@types/node": "25.6.0",
14
14
  "@types/request": "2.48.13",
15
15
  "@types/ws": "8.18.1",
16
16
  "async": "3.2.6",
@@ -20,12 +20,12 @@
20
20
  "bolt09": "2.2.0",
21
21
  "invoices": "5.0.2",
22
22
  "psbt": "5.0.0",
23
- "type-fest": "5.5.0"
23
+ "type-fest": "5.6.0"
24
24
  },
25
25
  "description": "Lightning Network client library",
26
26
  "devDependencies": {
27
27
  "tsd": "0.33.0",
28
- "typescript": "6.0.2"
28
+ "typescript": "6.0.3"
29
29
  },
30
30
  "engines": {
31
31
  "node": ">=20"
@@ -51,5 +51,5 @@
51
51
  "directory": "test-typescript/typescript"
52
52
  },
53
53
  "types": "index.d.ts",
54
- "version": "11.0.4"
54
+ "version": "11.1.0"
55
55
  }
@@ -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: [{
@@ -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,
@@ -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',