ln-service 59.5.0 → 59.7.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 +16 -0
- package/README.md +93 -9
- package/package.json +7 -2
- package/.gitattributes +0 -1
- package/.tm_properties +0 -1
- package/test/autopilotrpc-integration/test_autopilot.js +0 -87
- package/test/chainrpc-integration/test_get_block.js +0 -58
- package/test/chainrpc-integration/test_get_block_header.js +0 -62
- package/test/chainrpc-integration/test_get_height.js +0 -42
- package/test/chainrpc-integration/test_subscribe_to_blocks.js +0 -97
- package/test/chainrpc-integration/test_subscribe_to_chain_address.js +0 -119
- package/test/chainrpc-integration/test_subscribe_to_chain_spend.js +0 -116
- package/test/integration/test_add_peer.js +0 -59
- package/test/integration/test_cancel_pending_channel.js +0 -46
- package/test/integration/test_close_channel.js +0 -60
- package/test/integration/test_close_wait_pending.js +0 -121
- package/test/integration/test_create_chain_address.js +0 -63
- package/test/integration/test_create_invoice.js +0 -49
- package/test/integration/test_decode_payment_request.js +0 -75
- package/test/integration/test_delete_payment.js +0 -38
- package/test/integration/test_delete_payments.js +0 -42
- package/test/integration/test_delete_pending_channel.js +0 -202
- package/test/integration/test_encrypted_routes.js +0 -162
- package/test/integration/test_get_access_ids.js +0 -27
- package/test/integration/test_get_backup.js +0 -40
- package/test/integration/test_get_backups.js +0 -38
- package/test/integration/test_get_chain_balance.js +0 -36
- package/test/integration/test_get_chain_fee_estimate.js +0 -63
- package/test/integration/test_get_chain_transactions.js +0 -83
- package/test/integration/test_get_channel.js +0 -64
- package/test/integration/test_get_channel_balance.js +0 -23
- package/test/integration/test_get_channels.js +0 -84
- package/test/integration/test_get_closed_channels.js +0 -275
- package/test/integration/test_get_configuration.js +0 -35
- package/test/integration/test_get_failed_payments.js +0 -164
- package/test/integration/test_get_fee_rates.js +0 -40
- package/test/integration/test_get_forwards.js +0 -144
- package/test/integration/test_get_invoice.js +0 -67
- package/test/integration/test_get_invoices.js +0 -88
- package/test/integration/test_get_methods.js +0 -30
- package/test/integration/test_get_network_centrality.js +0 -72
- package/test/integration/test_get_network_graph.js +0 -87
- package/test/integration/test_get_network_info.js +0 -33
- package/test/integration/test_get_node.js +0 -117
- package/test/integration/test_get_payments.js +0 -69
- package/test/integration/test_get_peers.js +0 -58
- package/test/integration/test_get_pending_coop.js +0 -122
- package/test/integration/test_get_pending_force.js +0 -172
- package/test/integration/test_get_pending_payments.js +0 -86
- package/test/integration/test_get_route_to_destination.js +0 -153
- package/test/integration/test_get_settlement_status.js +0 -78
- package/test/integration/test_get_utxos.js +0 -49
- package/test/integration/test_get_wallet_info.js +0 -55
- package/test/integration/test_grant_access.js +0 -69
- package/test/integration/test_open_channel.js +0 -93
- package/test/integration/test_open_channel_max.js +0 -92
- package/test/integration/test_open_channels.js +0 -164
- package/test/integration/test_open_low_reserve.js +0 -92
- package/test/integration/test_open_simplified_taproot.js +0 -174
- package/test/integration/test_open_standard_taproot.js +0 -94
- package/test/integration/test_pay.js +0 -149
- package/test/integration/test_pay_private_invoice.js +0 -120
- package/test/integration/test_payment_errors.js +0 -102
- package/test/integration/test_propose_channel.js +0 -474
- package/test/integration/test_push_funds.js +0 -82
- package/test/integration/test_rebalance.js +0 -70
- package/test/integration/test_recover_funds_from_channel.js +0 -207
- package/test/integration/test_recover_funds_from_channels.js +0 -203
- package/test/integration/test_remove_peer.js +0 -52
- package/test/integration/test_restrict_macaroon.js +0 -96
- package/test/integration/test_revoke_access.js +0 -41
- package/test/integration/test_send_message_to_peer.js +0 -91
- package/test/integration/test_send_to_chain_address.js +0 -109
- package/test/integration/test_send_to_chain_addresses.js +0 -71
- package/test/integration/test_sign_message.js +0 -22
- package/test/integration/test_stop_daemon.js +0 -33
- package/test/integration/test_subscribe_to_backups.js +0 -94
- package/test/integration/test_subscribe_to_channels.js +0 -186
- package/test/integration/test_subscribe_to_graph.js +0 -176
- package/test/integration/test_subscribe_to_invoices.js +0 -147
- package/test/integration/test_subscribe_to_messages.js +0 -180
- package/test/integration/test_subscribe_to_open_requests.js +0 -167
- package/test/integration/test_subscribe_to_peer_messages.js +0 -130
- package/test/integration/test_subscribe_to_peers.js +0 -61
- package/test/integration/test_subscribe_to_rpc_requests.js +0 -309
- package/test/integration/test_subscribe_to_transactions.js +0 -93
- package/test/integration/test_trusted_funding.js +0 -302
- package/test/integration/test_trusted_open.js +0 -94
- package/test/integration/test_update_routing_fees.js +0 -108
- package/test/integration/test_verify_access.js +0 -38
- package/test/integration/test_verify_backup.js +0 -53
- package/test/integration/test_verify_backups.js +0 -54
- package/test/integration/test_verify_message.js +0 -24
- package/test/invoicesrpc-integration/test_cancel_invoice.js +0 -91
- package/test/invoicesrpc-integration/test_create_hinted_invoice.js +0 -95
- package/test/invoicesrpc-integration/test_get_sweep_transactions.js +0 -124
- package/test/invoicesrpc-integration/test_push_payment.js +0 -92
- package/test/invoicesrpc-integration/test_settle_invoice.js +0 -136
- package/test/invoicesrpc-integration/test_subscribe_cancel_invoice.js +0 -124
- package/test/invoicesrpc-integration/test_subscribe_settle_invoice.js +0 -123
- package/test/macros/index.js +0 -19
- package/test/macros/setup_channel.js +0 -101
- package/test/macros/wait_for_channel.js +0 -99
- package/test/macros/wait_for_pending_channel.js +0 -52
- package/test/macros/wait_for_route.js +0 -76
- package/test/macros/wait_for_termination.js +0 -29
- package/test/macros/wait_for_utxo.js +0 -56
- package/test/peersrpc-integration/test_add_advertised_feature.js +0 -43
- package/test/peersrpc-integration/test_add_external_socket.js +0 -36
- package/test/peersrpc-integration/test_remove_advertised_feature.js +0 -37
- package/test/peersrpc-integration/test_remove_external_socket.js +0 -34
- package/test/peersrpc-integration/test_update_alias.js +0 -33
- package/test/peersrpc-integration/test_update_color.js +0 -33
- package/test/routerrpc-integration/test_delete_forwarding_reputations.js +0 -101
- package/test/routerrpc-integration/test_disable_channel.js +0 -41
- package/test/routerrpc-integration/test_get_forwarding_confidence.js +0 -90
- package/test/routerrpc-integration/test_get_forwarding_reputations.js +0 -128
- package/test/routerrpc-integration/test_get_pathfinding_settings.js +0 -40
- package/test/routerrpc-integration/test_get_payment.js +0 -130
- package/test/routerrpc-integration/test_get_route_confidence.js +0 -77
- package/test/routerrpc-integration/test_get_route_through_hops.js +0 -148
- package/test/routerrpc-integration/test_get_routing_fee_estimate.js +0 -76
- package/test/routerrpc-integration/test_is_destination_payable.js +0 -53
- package/test/routerrpc-integration/test_multipath_payment.js +0 -178
- package/test/routerrpc-integration/test_pay_via_payment_details.js +0 -175
- package/test/routerrpc-integration/test_pay_via_payment_request.js +0 -151
- package/test/routerrpc-integration/test_pay_via_routes.js +0 -224
- package/test/routerrpc-integration/test_probe_for_route.js +0 -153
- package/test/routerrpc-integration/test_route_from_channels_complex.js +0 -327
- package/test/routerrpc-integration/test_route_from_channels_simple.js +0 -151
- package/test/routerrpc-integration/test_subscribe_to_forward_requests.js +0 -225
- package/test/routerrpc-integration/test_subscribe_to_forwards.js +0 -552
- package/test/routerrpc-integration/test_subscribe_to_past_payments.js +0 -81
- package/test/routerrpc-integration/test_subscribe_to_payments.js +0 -115
- package/test/routerrpc-integration/test_update_pathfinding_settings.js +0 -71
- package/test/runner.js +0 -30
- package/test/signerrpc-integration/test_begin_group_signing_session.js +0 -505
- package/test/signerrpc-integration/test_diffie_hellman_compute_secret.js +0 -37
- package/test/signerrpc-integration/test_sign_bytes.js +0 -76
- package/test/signerrpc-integration/test_sign_taproot.js +0 -436
- package/test/signerrpc-integration/test_sign_transaction.js +0 -35
- package/test/signerrpc-integration/test_verify_bytes_signature.js +0 -103
- package/test/tower_clientrpc-integration/test_connect_watchtower.js +0 -60
- package/test/tower_clientrpc-integration/test_get_connected_watchtowers.js +0 -70
- package/test/tower_serverrpc-integration/test_get_tower_server_info.js +0 -34
- package/test/versionrpc-integration/test_get_wallet_version.js +0 -38
- package/test/walletrpc-integration/test_broadcast_chain_transaction.js +0 -62
- package/test/walletrpc-integration/test_create_funded_psbt.js +0 -141
- package/test/walletrpc-integration/test_delete_chain_transaction.js +0 -82
- package/test/walletrpc-integration/test_fund_psbt.js +0 -489
- package/test/walletrpc-integration/test_get_chain_addresses.js +0 -60
- package/test/walletrpc-integration/test_get_chain_fee_rate.js +0 -24
- package/test/walletrpc-integration/test_get_chain_transaction.js +0 -70
- package/test/walletrpc-integration/test_get_locked_utxos.js +0 -67
- package/test/walletrpc-integration/test_get_master_public_keys.js +0 -84
- package/test/walletrpc-integration/test_get_minimum_relay_fee.js +0 -26
- package/test/walletrpc-integration/test_get_pending_sweeps.js +0 -83
- package/test/walletrpc-integration/test_get_public_key.js +0 -28
- package/test/walletrpc-integration/test_lock_utxo.js +0 -80
- package/test/walletrpc-integration/test_partially_sign_psbt.js +0 -224
- package/test/walletrpc-integration/test_request_batched_fee_increase.js +0 -60
- package/test/walletrpc-integration/test_request_chain_fee_increase.js +0 -63
- package/test/walletrpc-integration/test_send_to_chain_output_scripts.js +0 -69
- package/test/walletrpc-integration/test_sign_chain_address_message.js +0 -32
- package/test/walletrpc-integration/test_sign_psbt.js +0 -108
- package/test/walletrpc-integration/test_unlock_utxo.js +0 -72
- package/test/walletrpc-integration/test_update_chain_transaction.js +0 -43
- package/test/walletrpc-integration/test_verify_chain_address_message.js +0 -60
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
const {deepStrictEqual} = require('node:assert').strict;
|
|
2
|
-
const {strictEqual} = require('node:assert').strict;
|
|
3
|
-
const test = require('node:test');
|
|
4
|
-
|
|
5
|
-
const asyncRetry = require('async/retry');
|
|
6
|
-
const {setupChannel} = require('ln-docker-daemons');
|
|
7
|
-
const {spawnLightningCluster} = require('ln-docker-daemons');
|
|
8
|
-
|
|
9
|
-
const {addPeer} = require('./../../');
|
|
10
|
-
const {createChainAddress} = require('./../../');
|
|
11
|
-
const {createInvoice} = require('./../../');
|
|
12
|
-
const {deleteForwardingReputations} = require('./../../');
|
|
13
|
-
const {getFailedPayments} = require('./../../');
|
|
14
|
-
const {getPayment} = require('./../../');
|
|
15
|
-
const {getPayments} = require('./../../');
|
|
16
|
-
const {pay} = require('./../../');
|
|
17
|
-
const {sendToChainAddress} = require('./../../');
|
|
18
|
-
|
|
19
|
-
const channelCapacityTokens = 1e6;
|
|
20
|
-
const confirmationCount = 20;
|
|
21
|
-
const count = 100;
|
|
22
|
-
const size = 3;
|
|
23
|
-
const times = 1000;
|
|
24
|
-
const tokens = 1e6 / 2;
|
|
25
|
-
|
|
26
|
-
// Getting failed payments should return failed payments
|
|
27
|
-
test('Get failed payments', async () => {
|
|
28
|
-
const {kill, nodes} = await spawnLightningCluster({size});
|
|
29
|
-
|
|
30
|
-
const [{generate, lnd}, target, remote] = nodes;
|
|
31
|
-
|
|
32
|
-
try {
|
|
33
|
-
const {address} = await createChainAddress({lnd: remote.lnd});
|
|
34
|
-
|
|
35
|
-
await generate({count});
|
|
36
|
-
|
|
37
|
-
// Send coins to remote so that it can accept the channel
|
|
38
|
-
await sendToChainAddress({lnd, address, tokens: channelCapacityTokens});
|
|
39
|
-
|
|
40
|
-
// Generate to confirm the tx
|
|
41
|
-
await generate({count: confirmationCount});
|
|
42
|
-
await remote.generate({count: confirmationCount});
|
|
43
|
-
|
|
44
|
-
await setupChannel({
|
|
45
|
-
generate,
|
|
46
|
-
lnd,
|
|
47
|
-
capacity: channelCapacityTokens + channelCapacityTokens,
|
|
48
|
-
to: target,
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
await setupChannel({
|
|
52
|
-
capacity: channelCapacityTokens,
|
|
53
|
-
lnd: target.lnd,
|
|
54
|
-
generate: target.generate,
|
|
55
|
-
generator: target,
|
|
56
|
-
give_tokens: Math.round(channelCapacityTokens / 2),
|
|
57
|
-
to: remote,
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
await addPeer({lnd, public_key: remote.id, socket: remote.socket});
|
|
61
|
-
|
|
62
|
-
const invoice = await createInvoice({tokens, lnd: remote.lnd});
|
|
63
|
-
|
|
64
|
-
const bigInvoice = await createInvoice({
|
|
65
|
-
tokens: (channelCapacityTokens / 2) + (channelCapacityTokens / 4),
|
|
66
|
-
lnd: remote.lnd,
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
try {
|
|
70
|
-
await pay({lnd, request: bigInvoice.request});
|
|
71
|
-
} catch (err) {
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// Create a new channel to increase total edge liquidity
|
|
75
|
-
await setupChannel({
|
|
76
|
-
capacity: channelCapacityTokens,
|
|
77
|
-
lnd: target.lnd,
|
|
78
|
-
generate: target.generate,
|
|
79
|
-
generator: target,
|
|
80
|
-
to: remote,
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
await deleteForwardingReputations({lnd});
|
|
84
|
-
|
|
85
|
-
await asyncRetry({times}, async () => {
|
|
86
|
-
await pay({lnd, request: invoice.request});
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
{
|
|
90
|
-
const {payments} = await getFailedPayments({lnd});
|
|
91
|
-
|
|
92
|
-
const [payment] = payments.filter(n => n.mtokens === bigInvoice.mtokens);
|
|
93
|
-
|
|
94
|
-
strictEqual(payment.destination, remote.id, 'Payment to');
|
|
95
|
-
strictEqual(payment.confirmed_at, undefined, 'No confirmation date');
|
|
96
|
-
strictEqual(!!payment.created_at, true, 'Got payment created date');
|
|
97
|
-
strictEqual(payment.fee, undefined, 'No fee when not paid');
|
|
98
|
-
strictEqual(payment.fee_mtokens, undefined, 'No fee mtokens not paid');
|
|
99
|
-
strictEqual(!!payment.id, true, 'Got a payment id');
|
|
100
|
-
strictEqual(!!payment.index, true, 'Got payment index');
|
|
101
|
-
strictEqual(payment.is_confirmed, false, 'Failed payment not confirmed');
|
|
102
|
-
strictEqual(payment.is_outgoing, true, 'Failed payment is outgoing');
|
|
103
|
-
strictEqual(payment.mtokens, bigInvoice.mtokens, 'Payment has mtokens');
|
|
104
|
-
strictEqual(payment.request, bigInvoice.request, 'Probe has a request');
|
|
105
|
-
strictEqual(payment.secret, undefined, 'Failed has no secret');
|
|
106
|
-
strictEqual(payment.safe_fee, undefined, 'Failed has no fee');
|
|
107
|
-
strictEqual(payment.safe_tokens, bigInvoice.tokens, 'Safe tokens');
|
|
108
|
-
strictEqual(payment.tokens, bigInvoice.tokens, 'Failed has tokens');
|
|
109
|
-
|
|
110
|
-
const gotFailed = await getPayment({lnd, id: payment.id});
|
|
111
|
-
|
|
112
|
-
deepStrictEqual(
|
|
113
|
-
gotFailed,
|
|
114
|
-
{
|
|
115
|
-
failed: {
|
|
116
|
-
id: payment.id,
|
|
117
|
-
is_canceled: false,
|
|
118
|
-
is_insufficient_balance: false,
|
|
119
|
-
is_invalid_payment: false,
|
|
120
|
-
is_pathfinding_timeout: false,
|
|
121
|
-
is_route_not_found: true,
|
|
122
|
-
},
|
|
123
|
-
is_confirmed: false,
|
|
124
|
-
is_failed: true,
|
|
125
|
-
is_pending: false,
|
|
126
|
-
payment: undefined,
|
|
127
|
-
pending: undefined,
|
|
128
|
-
},
|
|
129
|
-
'Got failed state'
|
|
130
|
-
);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
{
|
|
134
|
-
const {payments} = await getPayments({lnd});
|
|
135
|
-
|
|
136
|
-
const [payment] = payments;
|
|
137
|
-
|
|
138
|
-
deepStrictEqual(payment.destination, remote.id, 'Paid to');
|
|
139
|
-
deepStrictEqual(!!payment.confirmed_at, true, 'Got confirmation date');
|
|
140
|
-
deepStrictEqual(!!payment.created_at, true, 'Got payment start date');
|
|
141
|
-
deepStrictEqual(payment.fee, 1, 'Got fee paid');
|
|
142
|
-
deepStrictEqual(payment.fee_mtokens, '1500', 'Got fee mtokens paid');
|
|
143
|
-
deepStrictEqual(payment.hops, [target.id], 'Got hops');
|
|
144
|
-
deepStrictEqual(!!payment.id, true, 'Got a payment id');
|
|
145
|
-
deepStrictEqual(!!payment.index, true, 'Got payment index');
|
|
146
|
-
deepStrictEqual(payment.is_confirmed, true, 'Failed not confirmed');
|
|
147
|
-
deepStrictEqual(payment.is_outgoing, true, 'Failed payment is outgoing');
|
|
148
|
-
deepStrictEqual(payment.mtokens, invoice.mtokens, 'Payment has mtokens');
|
|
149
|
-
deepStrictEqual(payment.request, invoice.request, 'Payment has request');
|
|
150
|
-
deepStrictEqual(!!payment.secret, true, 'Failed has no secret');
|
|
151
|
-
deepStrictEqual(payment.safe_fee, 2, 'Failed has no fee');
|
|
152
|
-
deepStrictEqual(payment.safe_tokens, invoice.tokens, 'Safe tokens');
|
|
153
|
-
deepStrictEqual(payment.tokens, invoice.tokens, 'Failed has tokens');
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
await kill({});
|
|
157
|
-
} catch (err) {
|
|
158
|
-
await kill({});
|
|
159
|
-
|
|
160
|
-
strictEqual(err, null, 'Expected no error');
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
return;
|
|
164
|
-
});
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
const {strictEqual} = require('node:assert').strict;
|
|
2
|
-
const test = require('node:test');
|
|
3
|
-
|
|
4
|
-
const {setupChannel} = require('ln-docker-daemons');
|
|
5
|
-
const {spawnLightningCluster} = require('ln-docker-daemons');
|
|
6
|
-
|
|
7
|
-
const {getFeeRates} = require('./../../');
|
|
8
|
-
|
|
9
|
-
const defaultBaseFee = 1;
|
|
10
|
-
const defaultFeeRate = 1;
|
|
11
|
-
const size = 2;
|
|
12
|
-
|
|
13
|
-
// Getting fee rates should return the fee rates of nodes in the channel graph
|
|
14
|
-
test(`Get fee rates`, async () => {
|
|
15
|
-
const {kill, nodes} = await spawnLightningCluster({size});
|
|
16
|
-
|
|
17
|
-
const [{generate, lnd}, to] = nodes;
|
|
18
|
-
|
|
19
|
-
const channelOpen = await setupChannel({generate, lnd, to});
|
|
20
|
-
|
|
21
|
-
const {channels} = await getFeeRates({lnd});
|
|
22
|
-
|
|
23
|
-
strictEqual(channels.length, [channelOpen].length, 'Channel was opened');
|
|
24
|
-
|
|
25
|
-
const [channel] = channels || [{}];
|
|
26
|
-
|
|
27
|
-
if (!!channel.id) {
|
|
28
|
-
strictEqual(channel.id, channelOpen.id, 'Channel id is represented');
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
strictEqual(channel.base_fee, defaultFeeRate, 'Channel base fee');
|
|
32
|
-
strictEqual(channel.base_fee_mtokens, (defaultFeeRate * 1000)+'', 'Base');
|
|
33
|
-
strictEqual(channel.fee_rate, defaultBaseFee, 'Channel fee rate');
|
|
34
|
-
strictEqual(channel.transaction_id, channelOpen.transaction_id, 'Tx id');
|
|
35
|
-
strictEqual(channel.transaction_vout, channelOpen.transaction_vout, 'Vout');
|
|
36
|
-
|
|
37
|
-
await kill({});
|
|
38
|
-
|
|
39
|
-
return;
|
|
40
|
-
});
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
const {deepStrictEqual} = require('node:assert').strict;
|
|
2
|
-
const {strictEqual} = require('node:assert').strict;
|
|
3
|
-
const test = require('node:test');
|
|
4
|
-
|
|
5
|
-
const asyncRetry = require('async/retry');
|
|
6
|
-
const {setupChannel} = require('ln-docker-daemons');
|
|
7
|
-
const {spawnLightningCluster} = require('ln-docker-daemons');
|
|
8
|
-
|
|
9
|
-
const {addPeer} = require('./../../');
|
|
10
|
-
const {createInvoice} = require('./../../');
|
|
11
|
-
const {getForwards} = require('./../../');
|
|
12
|
-
const {pay} = require('./../../');
|
|
13
|
-
|
|
14
|
-
const delay = n => new Promise(resolve => setTimeout(resolve, n));
|
|
15
|
-
const interval = 100;
|
|
16
|
-
const limit = 1;
|
|
17
|
-
const size = 3;
|
|
18
|
-
const times = 1000;
|
|
19
|
-
const tokens = 100;
|
|
20
|
-
|
|
21
|
-
// Getting forwarded payments should return all forwarded payments
|
|
22
|
-
test('Get forwards', async () => {
|
|
23
|
-
const {kill, nodes} = await spawnLightningCluster({size});
|
|
24
|
-
|
|
25
|
-
const [{generate, lnd}, target, remote] = nodes;
|
|
26
|
-
|
|
27
|
-
await asyncRetry({interval, times}, async () => {
|
|
28
|
-
await generate({});
|
|
29
|
-
|
|
30
|
-
await addPeer({lnd, public_key: remote.id, socket: remote.socket});
|
|
31
|
-
|
|
32
|
-
await setupChannel({generate, lnd, to: target});
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
await asyncRetry({interval, times}, async () => {
|
|
36
|
-
await generate({});
|
|
37
|
-
|
|
38
|
-
await addPeer({lnd, public_key: remote.id, socket: remote.socket});
|
|
39
|
-
|
|
40
|
-
await setupChannel({
|
|
41
|
-
lnd: target.lnd,
|
|
42
|
-
generate: target.generate,
|
|
43
|
-
to: remote,
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
await addPeer({lnd, public_key: remote.id, socket: remote.socket});
|
|
48
|
-
|
|
49
|
-
await delay(2000);
|
|
50
|
-
|
|
51
|
-
for (let i = 0, l = remote.lnd; i < 3; i++) {
|
|
52
|
-
await asyncRetry({interval, times}, async () => {
|
|
53
|
-
await delay(1000);
|
|
54
|
-
|
|
55
|
-
await pay({
|
|
56
|
-
lnd,
|
|
57
|
-
request: (await createInvoice({lnd: l, tokens: tokens + i})).request,
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
const page1 = await getForwards({limit, lnd: target.lnd});
|
|
63
|
-
|
|
64
|
-
strictEqual(!!page1.next, true, 'Page 1 leads to page 2');
|
|
65
|
-
|
|
66
|
-
{
|
|
67
|
-
const [forward] = page1.forwards;
|
|
68
|
-
|
|
69
|
-
strictEqual(!!forward.created_at, true, 'Forward created at');
|
|
70
|
-
strictEqual(forward.fee, 1, 'Forward fee charged');
|
|
71
|
-
strictEqual(forward.fee_mtokens, '1000', 'Forward fee charged');
|
|
72
|
-
strictEqual(!!forward.incoming_channel, true, 'Forward incoming channel');
|
|
73
|
-
strictEqual(forward.tokens, 100, 'Forwarded tokens count');
|
|
74
|
-
strictEqual(!!forward.outgoing_channel, true, 'Forward outgoing channel');
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
const page2 = await getForwards({lnd: target.lnd, token: page1.next});
|
|
78
|
-
|
|
79
|
-
strictEqual(!!page2.next, true, 'Page 2 leads to page 3');
|
|
80
|
-
|
|
81
|
-
{
|
|
82
|
-
const [forward] = page2.forwards;
|
|
83
|
-
|
|
84
|
-
strictEqual(forward.tokens, 101, 'Second forward tokens count');
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
const page3 = await getForwards({lnd: target.lnd, token: page2.next});
|
|
88
|
-
|
|
89
|
-
strictEqual(!!page3.next, true, 'Page 3 leads to page 4');
|
|
90
|
-
|
|
91
|
-
{
|
|
92
|
-
const [forward] = page3.forwards;
|
|
93
|
-
|
|
94
|
-
strictEqual(forward.tokens, 102, 'Third forward tokens count');
|
|
95
|
-
|
|
96
|
-
// Check "before" based paging
|
|
97
|
-
const prev0 = await getForwards({
|
|
98
|
-
limit,
|
|
99
|
-
before: forward.created_at,
|
|
100
|
-
lnd: target.lnd,
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
const [firstForward] = prev0.forwards;
|
|
104
|
-
|
|
105
|
-
strictEqual(firstForward.tokens, 100, 'Previous row #1');
|
|
106
|
-
|
|
107
|
-
const prev1 = await getForwards({lnd: target.lnd, token: prev0.next});
|
|
108
|
-
|
|
109
|
-
const [secondForward] = prev1.forwards;
|
|
110
|
-
|
|
111
|
-
strictEqual(secondForward.tokens, 101, 'Previous row #2');
|
|
112
|
-
|
|
113
|
-
const prev2 = await getForwards({lnd: target.lnd, token: prev1.next});
|
|
114
|
-
|
|
115
|
-
strictEqual(prev2.next, undefined, 'Ended paging of previous rows');
|
|
116
|
-
|
|
117
|
-
// Check "after" based paging
|
|
118
|
-
const after0 = await getForwards({
|
|
119
|
-
limit,
|
|
120
|
-
before: forward.created_at,
|
|
121
|
-
after: firstForward.created_at,
|
|
122
|
-
lnd: target.lnd,
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
deepStrictEqual(after0.forwards, prev0.forwards, 'After is inclusive');
|
|
126
|
-
|
|
127
|
-
const after1 = await getForwards({lnd: target.lnd, token: after0.next});
|
|
128
|
-
|
|
129
|
-
deepStrictEqual(after1.forwards, prev1.forwards, 'Iterating before');
|
|
130
|
-
|
|
131
|
-
const after2 = await getForwards({lnd: target.lnd, token: after1.next});
|
|
132
|
-
|
|
133
|
-
strictEqual(after2.next, undefined, 'Before is non-inclusive');
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
const page4 = await getForwards({lnd: target.lnd, token: page3.next});
|
|
137
|
-
|
|
138
|
-
strictEqual(page4.forwards.length, [].length, 'Page 4 has no results');
|
|
139
|
-
strictEqual(page4.next, undefined, 'Page 4 leads to nowhere');
|
|
140
|
-
|
|
141
|
-
await kill({});
|
|
142
|
-
|
|
143
|
-
return;
|
|
144
|
-
});
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
const {strictEqual} = require('node:assert').strict;
|
|
2
|
-
const test = require('node:test');
|
|
3
|
-
|
|
4
|
-
const {setupChannel} = require('ln-docker-daemons');
|
|
5
|
-
const {spawnLightningCluster} = require('ln-docker-daemons');
|
|
6
|
-
|
|
7
|
-
const {createInvoice} = require('./../../');
|
|
8
|
-
const {getInvoice} = require('./../../');
|
|
9
|
-
const {pay} = require('./../../');
|
|
10
|
-
|
|
11
|
-
const description = 'description';
|
|
12
|
-
const secret = '000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f';
|
|
13
|
-
const size = 2;
|
|
14
|
-
const tokens = 42;
|
|
15
|
-
|
|
16
|
-
// getInvoice results in invoice details
|
|
17
|
-
test(`Get an invoice`, async () => {
|
|
18
|
-
const {kill, nodes} = await spawnLightningCluster({size});
|
|
19
|
-
|
|
20
|
-
const [{generate, lnd}, target] = nodes;
|
|
21
|
-
|
|
22
|
-
const channel = await setupChannel({
|
|
23
|
-
generate,
|
|
24
|
-
lnd,
|
|
25
|
-
give_tokens: 1e5,
|
|
26
|
-
to: target,
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
const created = await createInvoice({description, lnd, secret, tokens});
|
|
30
|
-
|
|
31
|
-
const invoice = await getInvoice({lnd, id: created.id});
|
|
32
|
-
|
|
33
|
-
strictEqual(invoice.description, description, 'Invoice description');
|
|
34
|
-
strictEqual(invoice.is_private, false, 'Invoice is public');
|
|
35
|
-
strictEqual(invoice.received, 0, 'Invoice received tokens');
|
|
36
|
-
strictEqual(invoice.received_mtokens, '0', 'Invoice received mtokens');
|
|
37
|
-
strictEqual(invoice.secret, secret, 'Invoice secret');
|
|
38
|
-
strictEqual(invoice.tokens, tokens, 'Invoice tokens');
|
|
39
|
-
|
|
40
|
-
await pay({lnd: target.lnd, request: created.request});
|
|
41
|
-
|
|
42
|
-
const paid = await getInvoice({lnd, id: created.id});
|
|
43
|
-
|
|
44
|
-
if (!!paid.payments.length) {
|
|
45
|
-
strictEqual(paid.payments.length, [created.request].length, 'Paid once');
|
|
46
|
-
|
|
47
|
-
const [payment] = paid.payments;
|
|
48
|
-
|
|
49
|
-
strictEqual(payment.canceled_at, undefined, 'Payment was not canceled');
|
|
50
|
-
strictEqual(!!payment.confirmed_at, true, 'Payment settle date returned');
|
|
51
|
-
strictEqual(!!payment.created_at, true, 'Payment first held date');
|
|
52
|
-
strictEqual(!!payment.created_height, true, 'Payment height');
|
|
53
|
-
strictEqual(payment.in_channel, channel.id, 'Payment channel id returned');
|
|
54
|
-
strictEqual(payment.is_canceled, false, 'Payment not canceled');
|
|
55
|
-
strictEqual(payment.is_confirmed, true, 'Payment was settled');
|
|
56
|
-
strictEqual(payment.is_held, false, 'Payment is no longer held');
|
|
57
|
-
strictEqual(payment.mtokens, (BigInt(tokens) * BigInt(1e3)).toString());
|
|
58
|
-
strictEqual(payment.pending_index, undefined, 'Pending index not defined');
|
|
59
|
-
strictEqual(payment.tokens, tokens, 'Payment tokens returned');
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
strictEqual(paid.is_confirmed, true, 'Invoice has been paid');
|
|
63
|
-
|
|
64
|
-
await kill({});
|
|
65
|
-
|
|
66
|
-
return;
|
|
67
|
-
});
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
const {deepStrictEqual} = require('node:assert').strict;
|
|
2
|
-
const {strictEqual} = require('node:assert').strict;
|
|
3
|
-
const test = require('node:test');
|
|
4
|
-
|
|
5
|
-
const asyncEach = require('async/each');
|
|
6
|
-
const asyncRetry = require('async/retry');
|
|
7
|
-
const {getWalletInfo} = require('./../../');
|
|
8
|
-
const {spawnLightningCluster} = require('ln-docker-daemons');
|
|
9
|
-
|
|
10
|
-
const {cancelHodlInvoice} = require('./../../');
|
|
11
|
-
const {createInvoice} = require('./../../');
|
|
12
|
-
const {getInvoices} = require('./../../');
|
|
13
|
-
|
|
14
|
-
const interval = 1000;
|
|
15
|
-
const limit = 1;
|
|
16
|
-
const times = 1000;
|
|
17
|
-
|
|
18
|
-
// Get invoices should result in a list of created invoices
|
|
19
|
-
test(`Get invoices`, async () => {
|
|
20
|
-
const {kill, nodes} = await spawnLightningCluster({});
|
|
21
|
-
|
|
22
|
-
try {
|
|
23
|
-
const [{generate, lnd}] = nodes;
|
|
24
|
-
|
|
25
|
-
// Make sure that target is synced to the chain otherwise invoice can halt
|
|
26
|
-
await asyncRetry({interval, times}, async () => {
|
|
27
|
-
const wallet = await getWalletInfo({lnd});
|
|
28
|
-
|
|
29
|
-
await generate({});
|
|
30
|
-
|
|
31
|
-
if (!wallet.is_synced_to_chain) {
|
|
32
|
-
throw new Error('WaitingForSyncToChain');
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
const invoices = [
|
|
37
|
-
await createInvoice({lnd, description: '3'}),
|
|
38
|
-
await createInvoice({lnd, description: '2'}),
|
|
39
|
-
await createInvoice({lnd, description: '1'}),
|
|
40
|
-
];
|
|
41
|
-
|
|
42
|
-
invoices.reverse();
|
|
43
|
-
|
|
44
|
-
const firstPage = await getInvoices({limit, lnd});
|
|
45
|
-
|
|
46
|
-
strictEqual(!!firstPage.next, true, 'First page has a next token');
|
|
47
|
-
|
|
48
|
-
const secondPage = await getInvoices({lnd, token: firstPage.next});
|
|
49
|
-
|
|
50
|
-
strictEqual(!!secondPage.next, true, 'Second page has a next token');
|
|
51
|
-
|
|
52
|
-
const thirdPage = await getInvoices({lnd, token: secondPage.next});
|
|
53
|
-
|
|
54
|
-
strictEqual(!!thirdPage.next, false, 'Third page has no next token');
|
|
55
|
-
|
|
56
|
-
const receivedInvoices = []
|
|
57
|
-
.concat(firstPage.invoices)
|
|
58
|
-
.concat(secondPage.invoices)
|
|
59
|
-
.concat(thirdPage.invoices);
|
|
60
|
-
|
|
61
|
-
receivedInvoices.forEach((invoice, i) => {
|
|
62
|
-
const expected = invoices[i];
|
|
63
|
-
|
|
64
|
-
strictEqual(invoice.chain_address, expected.chain_address, 'Address');
|
|
65
|
-
strictEqual(invoice.confirmed_at, expected.confirmed_at, 'Confirmed at');
|
|
66
|
-
strictEqual(invoice.id, expected.id, 'Invoice id');
|
|
67
|
-
strictEqual(invoice.request, expected.request, 'Payment request');
|
|
68
|
-
strictEqual(invoice.secret, expected.secret, 'Payment secret');
|
|
69
|
-
strictEqual(invoice.tokens, expected.tokens, 'Tokens');
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
const reversed = invoices.slice().reverse();
|
|
73
|
-
|
|
74
|
-
await asyncEach(reversed.filter((n, i) => !!i), async invoice => {
|
|
75
|
-
return await cancelHodlInvoice({lnd, id: invoice.id});
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
const unconfirmed = await getInvoices({limit, lnd, is_unconfirmed: true});
|
|
79
|
-
|
|
80
|
-
deepStrictEqual(unconfirmed, thirdPage, 'Pending invoices are ignored');
|
|
81
|
-
} catch (err) {
|
|
82
|
-
strictEqual(err, null, 'No error is expected');
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
await kill({});
|
|
86
|
-
|
|
87
|
-
return;
|
|
88
|
-
});
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
const {strictEqual} = require('node:assert').strict;
|
|
2
|
-
const test = require('node:test');
|
|
3
|
-
|
|
4
|
-
const {spawnLightningCluster} = require('ln-docker-daemons');
|
|
5
|
-
|
|
6
|
-
const {getMethods} = require('./../../');
|
|
7
|
-
|
|
8
|
-
const {isArray} = Array;
|
|
9
|
-
|
|
10
|
-
// Getting LND methods should result in LND methods returned
|
|
11
|
-
test(`Get LND methods`, async () => {
|
|
12
|
-
const {kill, nodes} = await spawnLightningCluster({});
|
|
13
|
-
|
|
14
|
-
const [{lnd}] = nodes;
|
|
15
|
-
|
|
16
|
-
const {methods} = await getMethods({lnd});
|
|
17
|
-
|
|
18
|
-
const [method] = methods;
|
|
19
|
-
|
|
20
|
-
strictEqual(typeof method.endpoint, 'string', 'Has endpoint path');
|
|
21
|
-
strictEqual(isArray(method.permissions), true, 'Has array of permissions');
|
|
22
|
-
|
|
23
|
-
const [permission] = method.permissions;
|
|
24
|
-
|
|
25
|
-
strictEqual(typeof permission, 'string', 'Has permission');
|
|
26
|
-
|
|
27
|
-
await kill({});
|
|
28
|
-
|
|
29
|
-
return;
|
|
30
|
-
});
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
const {strictEqual} = require('node:assert').strict;
|
|
2
|
-
const test = require('node:test');
|
|
3
|
-
|
|
4
|
-
const asyncRetry = require('async/retry');
|
|
5
|
-
const {setupChannel} = require('ln-docker-daemons');
|
|
6
|
-
const {spawnLightningCluster} = require('ln-docker-daemons');
|
|
7
|
-
|
|
8
|
-
const {addPeer} = require('./../../');
|
|
9
|
-
const {getNetworkCentrality} = require('./../../');
|
|
10
|
-
const {getWalletInfo} = require('./../../');
|
|
11
|
-
|
|
12
|
-
const interval = 100;
|
|
13
|
-
const size = 3;
|
|
14
|
-
const times = 800;
|
|
15
|
-
|
|
16
|
-
// Getting the network centrality should return the centrality scores
|
|
17
|
-
test(`Get network centrality`, async () => {
|
|
18
|
-
const {kill, nodes} = await spawnLightningCluster({size});
|
|
19
|
-
|
|
20
|
-
const [control, target, remote] = nodes;
|
|
21
|
-
|
|
22
|
-
const {lnd} = control;
|
|
23
|
-
|
|
24
|
-
try {
|
|
25
|
-
await control.generate({count: 100});
|
|
26
|
-
|
|
27
|
-
await asyncRetry({interval, times}, async () => {
|
|
28
|
-
await addPeer({lnd, public_key: remote.id, socket: remote.socket});
|
|
29
|
-
|
|
30
|
-
await setupChannel({lnd, generate: control.generate, to: target});
|
|
31
|
-
|
|
32
|
-
await setupChannel({
|
|
33
|
-
generate: target.generate,
|
|
34
|
-
lnd: target.lnd,
|
|
35
|
-
to: remote,
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
await asyncRetry({interval, times}, async () => {
|
|
40
|
-
await addPeer({lnd, public_key: remote.id, socket: remote.socket});
|
|
41
|
-
|
|
42
|
-
const {nodes} = await getNetworkCentrality({lnd});
|
|
43
|
-
|
|
44
|
-
const controlScore = nodes.find(n => n.public_key === control.id);
|
|
45
|
-
const remoteScore = nodes.find(n => n.public_key === remote.id);
|
|
46
|
-
const targetScore = nodes.find(n => n.public_key === target.id);
|
|
47
|
-
|
|
48
|
-
if (!targetScore.betweenness || !targetScore.betweenness_normalized) {
|
|
49
|
-
throw new Error('UnexpectedValueForTargetScoreBetweenness');
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (targetScore.betweenness !== 1e6) {
|
|
53
|
-
throw new Error('WrongBetweennessScore');
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
strictEqual(controlScore.betweenness, 0, 'No centrality on control');
|
|
57
|
-
strictEqual(controlScore.betweenness_normalized, 0, 'No centrality');
|
|
58
|
-
strictEqual(remoteScore.betweenness, 0, 'No centrality on remote');
|
|
59
|
-
strictEqual(remoteScore.betweenness_normalized, 0, 'No centrality');
|
|
60
|
-
strictEqual(targetScore.betweenness, 1e6, 'Centrality around target');
|
|
61
|
-
strictEqual(targetScore.betweenness_normalized, 1e6, 'Centrality');
|
|
62
|
-
|
|
63
|
-
return;
|
|
64
|
-
});
|
|
65
|
-
} catch (err) {
|
|
66
|
-
strictEqual(err, null, 'Expected no error');
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
await kill({});
|
|
70
|
-
|
|
71
|
-
return;
|
|
72
|
-
});
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
const {deepStrictEqual} = require('node:assert').strict;
|
|
2
|
-
const test = require('node:test');
|
|
3
|
-
|
|
4
|
-
const asyncRetry = require('async/retry');
|
|
5
|
-
const {setupChannel} = require('ln-docker-daemons');
|
|
6
|
-
const {spawnLightningCluster} = require('ln-docker-daemons');
|
|
7
|
-
|
|
8
|
-
const {getNetworkGraph} = require('./../../');
|
|
9
|
-
const {getNode} = require('./../../');
|
|
10
|
-
|
|
11
|
-
const {ceil} = Math;
|
|
12
|
-
const interval = 250;
|
|
13
|
-
const size = 3;
|
|
14
|
-
const times = 50;
|
|
15
|
-
|
|
16
|
-
// Getting the network graph should return the public nodes and connections
|
|
17
|
-
test(`Get network graph`, async () => {
|
|
18
|
-
const {kill, nodes} = await spawnLightningCluster({size});
|
|
19
|
-
|
|
20
|
-
const [control, target] = nodes;
|
|
21
|
-
|
|
22
|
-
const {generate, lnd} = control;
|
|
23
|
-
|
|
24
|
-
const expectedChannel = await setupChannel({generate, lnd, to: target});
|
|
25
|
-
|
|
26
|
-
// Wait until the node shows up in the graph
|
|
27
|
-
const graph = await asyncRetry({interval, times}, async () => {
|
|
28
|
-
const networkGraph = await getNetworkGraph({lnd});
|
|
29
|
-
|
|
30
|
-
if (!networkGraph.nodes.find(n => n.public_key === control.id)) {
|
|
31
|
-
throw new Error('ExpectedToFindNodeInGraph');
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return networkGraph;
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
const node = graph.nodes.find(n => n.public_key === control.id);
|
|
38
|
-
const [channel] = graph.channels;
|
|
39
|
-
|
|
40
|
-
const nodeDetails = await getNode({lnd, public_key: node.public_key});
|
|
41
|
-
|
|
42
|
-
if (!!nodeDetails && !!nodeDetails.channels.length) {
|
|
43
|
-
const [chan] = nodeDetails.channels;
|
|
44
|
-
|
|
45
|
-
deepStrictEqual(chan, channel, 'Graph channel matches node details');
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
deepStrictEqual(node.alias, control.id.slice(0, 20), 'Node alias is own');
|
|
49
|
-
deepStrictEqual(node.color, '#3399ff', 'Node color is default');
|
|
50
|
-
deepStrictEqual(node.public_key, control.id, 'Node pubkey is own');
|
|
51
|
-
deepStrictEqual(node.sockets.length, 1, 'Socket');
|
|
52
|
-
deepStrictEqual(new Date() - new Date(node.updated_at) < 1e5, true, 'At');
|
|
53
|
-
|
|
54
|
-
channel.policies.forEach(policy => {
|
|
55
|
-
deepStrictEqual(policy.base_fee_mtokens, '1000', 'Default channel base');
|
|
56
|
-
deepStrictEqual([40, 80].includes(policy.cltv_delta), true, 'Cltv delta');
|
|
57
|
-
deepStrictEqual(policy.fee_rate, 1, 'Default channel fee rate');
|
|
58
|
-
deepStrictEqual(policy.is_disabled, false, 'Channels are active');
|
|
59
|
-
deepStrictEqual(
|
|
60
|
-
policy.max_htlc_mtokens,
|
|
61
|
-
`${ceil(channel.capacity * 0.99)}000`
|
|
62
|
-
);
|
|
63
|
-
deepStrictEqual(!!policy.min_htlc_mtokens, true, 'Default min htlc value');
|
|
64
|
-
deepStrictEqual(!!policy.public_key, true, 'Policy has public key');
|
|
65
|
-
deepStrictEqual(new Date()-new Date(policy.updated_at) < 1e5, true, 'At');
|
|
66
|
-
|
|
67
|
-
return;
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
deepStrictEqual(channel.capacity, expectedChannel.capacity, 'Capacity');
|
|
71
|
-
deepStrictEqual(channel.id, expectedChannel.id, 'Channel id');
|
|
72
|
-
deepStrictEqual(channel.transaction_id, expectedChannel.transaction_id, 'T');
|
|
73
|
-
deepStrictEqual(
|
|
74
|
-
channel.transaction_vout,
|
|
75
|
-
expectedChannel.transaction_vout,
|
|
76
|
-
'Tx Vout'
|
|
77
|
-
);
|
|
78
|
-
deepStrictEqual(
|
|
79
|
-
new Date() - new Date(channel.updated_at) < 1e5,
|
|
80
|
-
true,
|
|
81
|
-
'Updated at'
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
await kill({});
|
|
85
|
-
|
|
86
|
-
return;
|
|
87
|
-
});
|