lightning 9.0.0 → 9.2.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 +10 -0
- package/lnd_methods/info/constants.json +1 -0
- package/lnd_methods/offchain/get_channels.d.ts +2 -0
- package/lnd_methods/offchain/get_channels.js +1 -0
- package/lnd_methods/offchain/get_pending_channels.js +0 -1
- package/lnd_methods/offchain/subscribe_to_channels.d.ts +2 -0
- package/lnd_methods/offchain/subscribe_to_channels.js +1 -0
- package/lnd_methods/offchain/subscribe_to_open_requests.d.ts +2 -0
- package/lnd_methods/offchain/subscribe_to_open_requests.js +2 -0
- package/lnd_responses/channel_accept_as_open_request.js +9 -0
- package/lnd_responses/constants.json +6 -0
- package/lnd_responses/index.js +0 -2
- package/lnd_responses/rpc_channel_as_channel.js +7 -2
- package/package.json +3 -3
- package/test/lnd_methods/offchain/test_get_channels.js +8 -2
- package/test/lnd_methods/offchain/test_subscribe_to_channels.js +2 -1
- package/test/lnd_methods/offchain/test_subscribe_to_open_requests.js +2 -0
- package/test/lnd_responses/test_channel_accept_as_open_request.js +2 -0
- package/test/lnd_responses/test_rpc_channel_as_channel.js +8 -2
- package/test/lnd_responses/test_rpc_channel_as_old_rpc_channel.js +0 -64
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Versions
|
|
2
2
|
|
|
3
|
+
## 9.2.0
|
|
4
|
+
|
|
5
|
+
- `getChannels`: Add support for `type` to show channel type
|
|
6
|
+
- `subscribeToChannels`: Add support for `channel_opened` `type` to show type
|
|
7
|
+
|
|
8
|
+
## 9.1.0
|
|
9
|
+
|
|
10
|
+
- `getWalletInfo`: Add support for LND 0.16.1
|
|
11
|
+
- `subscribeToOpenRequests`: Add `type` for channel request commitment type
|
|
12
|
+
|
|
3
13
|
## 9.0.0
|
|
4
14
|
|
|
5
15
|
### Breaking Changes
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"d62c575f8499a314eb27f12462d20500b6bda2c7": "0.10.3-beta",
|
|
45
45
|
"df0b82f0165f19bde8832bacd1e35544b0a2990d": "0.14.0-beta",
|
|
46
46
|
"eecbe99d68384c734b2c91fd0800484e69c5cab2": "0.14.4-beta",
|
|
47
|
+
"fb765fdb1daf1c1db08ab9b6aa0c442af431bc82": "0.16.1-beta",
|
|
47
48
|
"fd1a95bf322cdd1c743a1554f8e470fbf9a5e564": "0.15.1-beta"
|
|
48
49
|
},
|
|
49
50
|
"weightedType": "weightedcomb",
|
|
@@ -114,6 +114,8 @@ export type GetChannelsResult = {
|
|
|
114
114
|
transaction_id: string;
|
|
115
115
|
/** Blockchain Transaction Vout */
|
|
116
116
|
transaction_vout: number;
|
|
117
|
+
/** Channel Commitment Transaction Type */
|
|
118
|
+
type?: string;
|
|
117
119
|
/** Unsettled Balance Tokens */
|
|
118
120
|
unsettled_balance: number;
|
|
119
121
|
}[];
|
|
@@ -78,6 +78,7 @@ const type = 'default';
|
|
|
78
78
|
[time_online]: <Monitoring Uptime Channel Up Milliseconds Number>
|
|
79
79
|
transaction_id: <Blockchain Transaction Id String>
|
|
80
80
|
transaction_vout: <Blockchain Transaction Vout Number>
|
|
81
|
+
[type]: <Channel Commitment Transaction Type String>
|
|
81
82
|
unsettled_balance: <Unsettled Balance Tokens Number>
|
|
82
83
|
}]
|
|
83
84
|
}
|
|
@@ -4,7 +4,6 @@ const {returnResult} = require('asyncjs-util');
|
|
|
4
4
|
|
|
5
5
|
const {isLnd} = require('./../../lnd_requests');
|
|
6
6
|
const {pendingAsPendingChannels} = require('./../../lnd_responses');
|
|
7
|
-
const {rpcChannelAsOldRpcChannel} = require('./../../lnd_responses');
|
|
8
7
|
|
|
9
8
|
const {isArray} = Array;
|
|
10
9
|
const method = 'pendingChannels';
|
|
@@ -127,6 +127,8 @@ export type SubscribeToChannelsChannelOpenedEvent = {
|
|
|
127
127
|
transaction_id: string;
|
|
128
128
|
/** Blockchain Transaction Vout */
|
|
129
129
|
transaction_vout: number;
|
|
130
|
+
/** Channel Commitment Transaction Type */
|
|
131
|
+
type?: string;
|
|
130
132
|
/** Unsettled Balance Tokens */
|
|
131
133
|
unsettled_balance: number;
|
|
132
134
|
};
|
|
@@ -109,6 +109,7 @@ const updateOpening = 'pending_open_channel';
|
|
|
109
109
|
sent: <Sent Tokens Number>
|
|
110
110
|
transaction_id: <Blockchain Transaction Id String>
|
|
111
111
|
transaction_vout: <Blockchain Transaction Vout Number>
|
|
112
|
+
[type]: <Channel Commitment Transaction Type String>
|
|
112
113
|
unsettled_balance: <Unsettled Balance Tokens Number>
|
|
113
114
|
}
|
|
114
115
|
|
|
@@ -60,6 +60,7 @@ const type = 'default';
|
|
|
60
60
|
reject: <Reject Request Function> ({
|
|
61
61
|
[reason]: <500 Character Limited Rejection Reason String>
|
|
62
62
|
}) -> {}
|
|
63
|
+
[type]: <Channel Commitment Transaction Type String>
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
@event 'error'
|
|
@@ -132,6 +133,7 @@ module.exports = ({lnd}) => {
|
|
|
132
133
|
pending_chan_id: id,
|
|
133
134
|
});
|
|
134
135
|
},
|
|
136
|
+
type: request.type,
|
|
135
137
|
}));
|
|
136
138
|
} catch (err) {
|
|
137
139
|
return emitError([503, err.message]);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const {channelTypes} = require('./constants');
|
|
2
|
+
|
|
1
3
|
const bufferAsHex = buffer => buffer.toString('hex');
|
|
2
4
|
const compressedPublicKeyLength = 33;
|
|
3
5
|
const hashAsId = hash => hash.reverse().toString('hex');
|
|
@@ -13,6 +15,7 @@ const weightPerVByte = 4;
|
|
|
13
15
|
chain_hash: <Blockchain Genesis Block Hash Bytes Buffer Object>
|
|
14
16
|
channel_flags: <Bit-field Channel Type Flags Number>
|
|
15
17
|
channel_reserve: <Reserve Tokens Requirement String>
|
|
18
|
+
commitment_type: <Channel Commitment Transaction Type String>
|
|
16
19
|
csv_delay: <Relative Time Lock Blocks Count Number>
|
|
17
20
|
dust_limit: <Dust Limit Tokens of Peer's Commitment Transaction String>
|
|
18
21
|
fee_per_kw: <Commitment Transaction Fee Rate String>
|
|
@@ -45,6 +48,7 @@ const weightPerVByte = 4;
|
|
|
45
48
|
min_chain_output: <Minimum Chain Output Tokens Number>
|
|
46
49
|
min_htlc_mtokens: <Minimum HTLC Millitokens String>
|
|
47
50
|
partner_public_key: <Peer Public Key Hex String>
|
|
51
|
+
[type]: <Channel Commitment Transaction Type String>
|
|
48
52
|
}
|
|
49
53
|
*/
|
|
50
54
|
module.exports = data => {
|
|
@@ -64,6 +68,10 @@ module.exports = data => {
|
|
|
64
68
|
throw new Error('ExpectedChannelReserveForChannelRequest');
|
|
65
69
|
}
|
|
66
70
|
|
|
71
|
+
if (!data.commitment_type) {
|
|
72
|
+
throw new Error('ExpectedCommitmentTypeForChannelRequest');
|
|
73
|
+
}
|
|
74
|
+
|
|
67
75
|
if (data.csv_delay === undefined) {
|
|
68
76
|
throw new Error('ExpectedCsvDelayInChannelOpenRequest');
|
|
69
77
|
}
|
|
@@ -125,5 +133,6 @@ module.exports = data => {
|
|
|
125
133
|
min_chain_output: Number(data.dust_limit),
|
|
126
134
|
min_htlc_mtokens: data.min_htlc,
|
|
127
135
|
partner_public_key: bufferAsHex(data.node_pubkey),
|
|
136
|
+
type: channelTypes[data.commitment_type],
|
|
128
137
|
};
|
|
129
138
|
};
|
|
@@ -14,6 +14,12 @@
|
|
|
14
14
|
"failed": "FAILED",
|
|
15
15
|
"pending": "IN_FLIGHT"
|
|
16
16
|
},
|
|
17
|
+
"channelTypes": {
|
|
18
|
+
"ANCHORS": "anchor",
|
|
19
|
+
"LEGACY": "original",
|
|
20
|
+
"SCRIPT_ENFORCED_LEASE": "anchor_with_lease_constraint",
|
|
21
|
+
"STATIC_REMOTE_KEY": "original_with_static_to_remote"
|
|
22
|
+
},
|
|
17
23
|
"commitmentTypes": {
|
|
18
24
|
"anchor": "ANCHORS",
|
|
19
25
|
"static_remote_key": "STATIC_REMOTE_KEY",
|
package/lnd_responses/index.js
CHANGED
|
@@ -18,7 +18,6 @@ const routingFailureFromHtlc = require('./routing_failure_from_htlc');
|
|
|
18
18
|
const rpcAddressesAsAddresses = require('./rpc_addresses_as_addresses');
|
|
19
19
|
const rpcAttemptHtlcAsAttempt = require('./rpc_attempt_htlc_as_attempt');
|
|
20
20
|
const rpcChannelAsChannel = require('./rpc_channel_as_channel');
|
|
21
|
-
const rpcChannelAsOldRpcChannel = require('./rpc_channel_as_old_rpc_channel');
|
|
22
21
|
const rpcChannelClosedAsClosed = require('./rpc_channel_closed_as_closed');
|
|
23
22
|
const rpcChannelUpdateAsUpdate = require('./rpc_channel_update_as_update');
|
|
24
23
|
const rpcClosedChannelAsClosed = require('./rpc_closed_channel_as_closed');
|
|
@@ -64,7 +63,6 @@ module.exports = {
|
|
|
64
63
|
rpcAddressesAsAddresses,
|
|
65
64
|
rpcAttemptHtlcAsAttempt,
|
|
66
65
|
rpcChannelAsChannel,
|
|
67
|
-
rpcChannelAsOldRpcChannel,
|
|
68
66
|
rpcChannelClosedAsClosed,
|
|
69
67
|
rpcChannelUpdateAsUpdate,
|
|
70
68
|
rpcClosedChannelAsClosed,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const {chanFormat} = require('bolt07');
|
|
2
2
|
|
|
3
|
-
const {
|
|
3
|
+
const {channelTypes} = require('./constants');
|
|
4
4
|
const parseThawHeight = require('./parse_thaw_height');
|
|
5
5
|
const rpcHtlcAsPayment = require('./rpc_htlc_as_payment');
|
|
6
6
|
|
|
@@ -118,6 +118,7 @@ const outpointDelimiter = ':';
|
|
|
118
118
|
time_online: <Monitoring Uptime Channel Up Milliseconds Number>
|
|
119
119
|
transaction_id: <Blockchain Transaction Id String>
|
|
120
120
|
transaction_vout: <Blockchain Transaction Vout Number>
|
|
121
|
+
[type]: <Channel Commitment Transaction Type String>
|
|
121
122
|
unsettled_balance: <Unsettled Balance Tokens Number>
|
|
122
123
|
}
|
|
123
124
|
*/
|
|
@@ -150,6 +151,10 @@ module.exports = args => {
|
|
|
150
151
|
throw new Error('ExpectedCommitWeightInChannelMessage');
|
|
151
152
|
}
|
|
152
153
|
|
|
154
|
+
if (!args.commitment_type) {
|
|
155
|
+
throw new Error('ExpectedChannelCommitmentTypeInChannelMessage');
|
|
156
|
+
}
|
|
157
|
+
|
|
153
158
|
if (args.fee_per_kw === undefined) {
|
|
154
159
|
throw new Error('ExpectedFeePerKwInChannelMessage');
|
|
155
160
|
}
|
|
@@ -210,7 +215,6 @@ module.exports = args => {
|
|
|
210
215
|
throw new Error('ExpectedUnsettledBalanceInChannelMessage');
|
|
211
216
|
}
|
|
212
217
|
|
|
213
|
-
const chanType = args.commitment_type;
|
|
214
218
|
const commitWeight = Number(args.commit_weight);
|
|
215
219
|
const {height} = parseThawHeight({id: args.chan_id, thaw: args.thaw_height});
|
|
216
220
|
const own = args.local_constraints;
|
|
@@ -266,6 +270,7 @@ module.exports = args => {
|
|
|
266
270
|
time_online: uptime,
|
|
267
271
|
transaction_id: transactionId,
|
|
268
272
|
transaction_vout: Number(vout),
|
|
273
|
+
type: channelTypes[args.commitment_type],
|
|
269
274
|
unsettled_balance: Number(args.unsettled_balance),
|
|
270
275
|
};
|
|
271
276
|
};
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"@grpc/grpc-js": "1.8.14",
|
|
11
11
|
"@grpc/proto-loader": "0.7.6",
|
|
12
12
|
"@types/express": "4.17.17",
|
|
13
|
-
"@types/node": "18.
|
|
13
|
+
"@types/node": "18.16.2",
|
|
14
14
|
"@types/request": "2.48.8",
|
|
15
15
|
"@types/ws": "8.5.4",
|
|
16
16
|
"async": "3.2.4",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"invoices": "2.2.3",
|
|
27
27
|
"psbt": "2.7.2",
|
|
28
28
|
"tiny-secp256k1": "2.2.1",
|
|
29
|
-
"type-fest": "3.
|
|
29
|
+
"type-fest": "3.9.0"
|
|
30
30
|
},
|
|
31
31
|
"description": "Lightning Network client library",
|
|
32
32
|
"devDependencies": {
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"directory": "test/typescript"
|
|
60
60
|
},
|
|
61
61
|
"types": "index.d.ts",
|
|
62
|
-
"version": "9.
|
|
62
|
+
"version": "9.2.0"
|
|
63
63
|
}
|
|
@@ -53,6 +53,7 @@ const makeExpected = overrides => {
|
|
|
53
53
|
time_online: 1000,
|
|
54
54
|
transaction_id: '00',
|
|
55
55
|
transaction_vout: 1,
|
|
56
|
+
type: 'anchor',
|
|
56
57
|
unsettled_balance: 1,
|
|
57
58
|
};
|
|
58
59
|
|
|
@@ -71,7 +72,7 @@ const makeLnd = overrides => {
|
|
|
71
72
|
close_address: 'cooperative_close_address',
|
|
72
73
|
commit_fee: '1',
|
|
73
74
|
commit_weight: '1',
|
|
74
|
-
commitment_type: '
|
|
75
|
+
commitment_type: 'ANCHORS',
|
|
75
76
|
fee_per_kw: '1',
|
|
76
77
|
initiator: true,
|
|
77
78
|
lifetime: 1,
|
|
@@ -174,6 +175,11 @@ const tests = [
|
|
|
174
175
|
description: 'Channel commit weight is expected',
|
|
175
176
|
error: [503, 'ExpectedCommitWeight'],
|
|
176
177
|
},
|
|
178
|
+
{
|
|
179
|
+
args: {lnd: makeLnd({commitment_type: undefined})},
|
|
180
|
+
description: 'Channel commit type is expected',
|
|
181
|
+
error: [503, 'ExpectedChannelCommitmentTypeInChannelMessage'],
|
|
182
|
+
},
|
|
177
183
|
{
|
|
178
184
|
args: {lnd: makeLnd({fee_per_kw: undefined})},
|
|
179
185
|
description: 'Channel fee per kw is expected',
|
|
@@ -242,7 +248,7 @@ const tests = [
|
|
|
242
248
|
{
|
|
243
249
|
args: {
|
|
244
250
|
lnd: makeLnd({
|
|
245
|
-
commitment_type: '
|
|
251
|
+
commitment_type: 'ANCHORS',
|
|
246
252
|
thaw_height: 1,
|
|
247
253
|
}),
|
|
248
254
|
},
|
|
@@ -66,7 +66,7 @@ const makeLnd = ({data, err}) => {
|
|
|
66
66
|
close_address: '',
|
|
67
67
|
commit_fee: '1',
|
|
68
68
|
commit_weight: '1',
|
|
69
|
-
commitment_type: '
|
|
69
|
+
commitment_type: 'ANCHORS',
|
|
70
70
|
csv_delay: 1,
|
|
71
71
|
fee_per_kw: '1',
|
|
72
72
|
initiator: true,
|
|
@@ -278,6 +278,7 @@ const tests = [
|
|
|
278
278
|
time_online: 1000,
|
|
279
279
|
transaction_id: '0000000000000000000000000000000000000000000000000000000000000000',
|
|
280
280
|
transaction_vout: 0,
|
|
281
|
+
type: 'anchor',
|
|
281
282
|
unsettled_balance: 1,
|
|
282
283
|
},
|
|
283
284
|
},
|
|
@@ -21,6 +21,7 @@ const makeLnd = ({data, err}) => {
|
|
|
21
21
|
chain_hash: Buffer.alloc(32),
|
|
22
22
|
channel_flags: 34,
|
|
23
23
|
channel_reserve: '1',
|
|
24
|
+
commitment_type: 'LEGACY',
|
|
24
25
|
csv_delay: 1,
|
|
25
26
|
dust_limit: '1',
|
|
26
27
|
fee_per_kw: '1000',
|
|
@@ -90,6 +91,7 @@ const tests = [
|
|
|
90
91
|
min_chain_output: 1,
|
|
91
92
|
min_htlc_mtokens: '1000',
|
|
92
93
|
partner_public_key: '030303030303030303030303030303030303030303030303030303030303030303',
|
|
94
|
+
type: 'original',
|
|
93
95
|
}
|
|
94
96
|
},
|
|
95
97
|
{event: 'error', data: {details: 'Cancelled on client'}},
|
|
@@ -7,6 +7,7 @@ const makeArgs = overrides => {
|
|
|
7
7
|
chain_hash: Buffer.alloc(32),
|
|
8
8
|
channel_flags: 34,
|
|
9
9
|
channel_reserve: '1',
|
|
10
|
+
commitment_type: 'LEGACY',
|
|
10
11
|
csv_delay: 1,
|
|
11
12
|
dust_limit: '1',
|
|
12
13
|
fee_per_kw: '1000',
|
|
@@ -43,6 +44,7 @@ const tests = [
|
|
|
43
44
|
min_chain_output: 1,
|
|
44
45
|
min_htlc_mtokens: '1000',
|
|
45
46
|
partner_public_key: Buffer.alloc(33, 3).toString('hex'),
|
|
47
|
+
type: 'original',
|
|
46
48
|
},
|
|
47
49
|
},
|
|
48
50
|
{
|
|
@@ -13,7 +13,7 @@ const makeArgs = overrides => {
|
|
|
13
13
|
close_address: undefined,
|
|
14
14
|
commit_fee: '1',
|
|
15
15
|
commit_weight: '1',
|
|
16
|
-
commitment_type: '
|
|
16
|
+
commitment_type: 'ANCHORS',
|
|
17
17
|
csv_delay: 1,
|
|
18
18
|
fee_per_kw: '1',
|
|
19
19
|
initiator: false,
|
|
@@ -112,6 +112,7 @@ const makeExpected = overrides => {
|
|
|
112
112
|
time_online: 1000,
|
|
113
113
|
transaction_id: '00',
|
|
114
114
|
transaction_vout: 1,
|
|
115
|
+
type: 'anchor',
|
|
115
116
|
unsettled_balance: 1,
|
|
116
117
|
};
|
|
117
118
|
|
|
@@ -156,6 +157,11 @@ const tests = [
|
|
|
156
157
|
description: 'Channel commit weight is expected',
|
|
157
158
|
error: 'ExpectedCommitWeightInChannelMessage',
|
|
158
159
|
},
|
|
160
|
+
{
|
|
161
|
+
args: makeArgs({commitment_type: undefined}),
|
|
162
|
+
description: 'Channel commit type is expected',
|
|
163
|
+
error: 'ExpectedChannelCommitmentTypeInChannelMessage',
|
|
164
|
+
},
|
|
159
165
|
{
|
|
160
166
|
args: makeArgs({fee_per_kw: undefined}),
|
|
161
167
|
description: 'Channel fee per kw is expected',
|
|
@@ -242,7 +248,7 @@ const tests = [
|
|
|
242
248
|
expected: makeExpected({id: '0x0x2', other_ids: ['0x0x3']}),
|
|
243
249
|
},
|
|
244
250
|
{
|
|
245
|
-
args: makeArgs({commitment_type: '
|
|
251
|
+
args: makeArgs({commitment_type: 'ANCHORS', initiator: true}),
|
|
246
252
|
description: 'Initiated RPC channel is mapped to channel',
|
|
247
253
|
expected: makeExpected({
|
|
248
254
|
is_partner_initiated: false,
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
const {test} = require('@alexbosworth/tap');
|
|
2
|
-
|
|
3
|
-
const {rpcChannelAsOldRpcChannel} = require('./../../lnd_responses');
|
|
4
|
-
|
|
5
|
-
const makeArgs = overrides => {
|
|
6
|
-
const args = {
|
|
7
|
-
channel: {
|
|
8
|
-
commitment_type: undefined,
|
|
9
|
-
uptime: 1,
|
|
10
|
-
},
|
|
11
|
-
version: undefined,
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
Object.keys(overrides).forEach(k => args[k] = overrides[k]);
|
|
15
|
-
|
|
16
|
-
return args;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const makeExpected = overrides => {
|
|
20
|
-
const expected = {
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
Object.keys(overrides).forEach(k => expected[k] = overrides[k]);
|
|
24
|
-
|
|
25
|
-
return expected;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const tests = [
|
|
29
|
-
{
|
|
30
|
-
args: makeArgs({}),
|
|
31
|
-
description: 'Initiated RPC channel is mapped to channel',
|
|
32
|
-
expected: {commitment_type: undefined, uptime: 1},
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
args: makeArgs({
|
|
36
|
-
channel: {commitment_type: undefined, uptime: 1},
|
|
37
|
-
version: '0.11.1-beta',
|
|
38
|
-
}),
|
|
39
|
-
description: 'Old RPC channel is mapped to channel',
|
|
40
|
-
expected: {commitment_type: 'UNKNOWN_COMMITMENT_TYPE', uptime: 1},
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
args: makeArgs({
|
|
44
|
-
channel: {commitment_type: 'LEGACY', uptime: 1},
|
|
45
|
-
version: '0.11.1-beta',
|
|
46
|
-
}),
|
|
47
|
-
description: 'Legacy was 0 but it is updated to 1, so 1 means 2',
|
|
48
|
-
expected: {commitment_type: 'STATIC_REMOTE_KEY', uptime: 1},
|
|
49
|
-
},
|
|
50
|
-
];
|
|
51
|
-
|
|
52
|
-
tests.forEach(({args, description, error, expected}) => {
|
|
53
|
-
return test(description, ({end, strictSame, throws}) => {
|
|
54
|
-
if (!!error) {
|
|
55
|
-
throws(() => rpcChannelAsOldRpcChannel(args), new Error(error), 'Error');
|
|
56
|
-
} else {
|
|
57
|
-
const channel = rpcChannelAsOldRpcChannel(args);
|
|
58
|
-
|
|
59
|
-
strictSame(channel, expected, 'Channel cast as old channel');
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return end();
|
|
63
|
-
});
|
|
64
|
-
});
|