lightning 11.0.5 → 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 +4 -0
- package/lnd_methods/offchain/get_channels.d.ts +2 -0
- package/lnd_methods/offchain/get_channels.js +1 -0
- package/lnd_responses/rpc_channel_as_channel.js +6 -0
- package/package.json +1 -1
- package/test/lnd_methods/offchain/test_get_channels.js +1 -0
- package/test/lnd_methods/offchain/test_subscribe_to_channels.js +1 -0
- package/test/lnd_responses/test_rpc_channel_as_channel.js +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -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
|
@@ -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',
|