lightning 8.0.0 → 9.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.
- package/CHANGELOG.md +6 -0
- package/grpc/protos/walletkit.proto +70 -0
- package/lnd_methods/offchain/get_route_through_hops.js +1 -1
- package/lnd_methods/offchain/subscribe_to_pay_via_details.js +1 -1
- package/lnd_methods/offchain/update_routing_fees.js +1 -1
- package/package.json +3 -3
- package/test/lnd_methods/offchain/test_update_routing_fees.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -863,6 +863,76 @@ enum WitnessType {
|
|
|
863
863
|
transaction.
|
|
864
864
|
*/
|
|
865
865
|
COMMITMENT_ANCHOR = 13;
|
|
866
|
+
|
|
867
|
+
/*
|
|
868
|
+
A witness type that is similar to the COMMITMENT_NO_DELAY type,
|
|
869
|
+
but it omits the tweak that randomizes the key we need to
|
|
870
|
+
spend with a channel peer supplied set of randomness.
|
|
871
|
+
*/
|
|
872
|
+
COMMITMENT_NO_DELAY_TWEAKLESS = 14;
|
|
873
|
+
|
|
874
|
+
/*
|
|
875
|
+
A witness type that allows us to spend our output on the counterparty's
|
|
876
|
+
commitment transaction after a confirmation.
|
|
877
|
+
*/
|
|
878
|
+
COMMITMENT_TO_REMOTE_CONFIRMED = 15;
|
|
879
|
+
|
|
880
|
+
/*
|
|
881
|
+
A witness type that allows us to sweep an HTLC output that we extended
|
|
882
|
+
to a party, but was never fulfilled. This _is_ the HTLC output directly
|
|
883
|
+
on our commitment transaction, and the input to the second-level HTLC
|
|
884
|
+
timeout transaction. It can only be spent after CLTV expiry, and
|
|
885
|
+
commitment confirmation.
|
|
886
|
+
*/
|
|
887
|
+
HTLC_OFFERED_TIMEOUT_SECOND_LEVEL_INPUT_CONFIRMED = 16;
|
|
888
|
+
|
|
889
|
+
/*
|
|
890
|
+
A witness type that allows us to sweep an HTLC output that was offered
|
|
891
|
+
to us, and for which we have a payment preimage. This _is_ the HTLC
|
|
892
|
+
output directly on our commitment transaction, and the input to the
|
|
893
|
+
second-level HTLC success transaction. It can only be spent after the
|
|
894
|
+
commitment has confirmed.
|
|
895
|
+
*/
|
|
896
|
+
HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL_INPUT_CONFIRMED = 17;
|
|
897
|
+
|
|
898
|
+
/*
|
|
899
|
+
A witness type that allows us to spend our output on our local
|
|
900
|
+
commitment transaction after a relative and absolute lock-time lockout as
|
|
901
|
+
part of the script enforced lease commitment type.
|
|
902
|
+
*/
|
|
903
|
+
LEASE_COMMITMENT_TIME_LOCK = 18;
|
|
904
|
+
|
|
905
|
+
/*
|
|
906
|
+
A witness type that allows us to spend our output on the counterparty's
|
|
907
|
+
commitment transaction after a confirmation and absolute locktime as part
|
|
908
|
+
of the script enforced lease commitment type.
|
|
909
|
+
*/
|
|
910
|
+
LEASE_COMMITMENT_TO_REMOTE_CONFIRMED = 19;
|
|
911
|
+
|
|
912
|
+
/*
|
|
913
|
+
A witness type that allows us to sweep an HTLC output that we extended
|
|
914
|
+
to a party, but was never fulfilled. This HTLC output isn't directly on
|
|
915
|
+
the commitment transaction, but is the result of a confirmed second-level
|
|
916
|
+
HTLC transaction. As a result, we can only spend this after a CSV delay
|
|
917
|
+
and CLTV locktime as part of the script enforced lease commitment type.
|
|
918
|
+
*/
|
|
919
|
+
LEASE_HTLC_OFFERED_TIMEOUT_SECOND_LEVEL = 20;
|
|
920
|
+
|
|
921
|
+
/*
|
|
922
|
+
A witness type that allows us to sweep an HTLC output that was offered
|
|
923
|
+
to us, and for which we have a payment preimage. This HTLC output isn't
|
|
924
|
+
directly on our commitment transaction, but is the result of confirmed
|
|
925
|
+
second-level HTLC transaction. As a result, we can only spend this after
|
|
926
|
+
a CSV delay and CLTV locktime as part of the script enforced lease
|
|
927
|
+
commitment type.
|
|
928
|
+
*/
|
|
929
|
+
LEASE_HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL = 21;
|
|
930
|
+
|
|
931
|
+
/*
|
|
932
|
+
A witness type that allows us to spend a regular p2tr output that's sent
|
|
933
|
+
to an output which is under complete control of the backing wallet.
|
|
934
|
+
*/
|
|
935
|
+
TAPROOT_PUB_KEY_SPEND = 22;
|
|
866
936
|
}
|
|
867
937
|
|
|
868
938
|
message PendingSweep {
|
|
@@ -4,7 +4,7 @@ const {returnResult} = require('asyncjs-util');
|
|
|
4
4
|
|
|
5
5
|
const {routesFromQueryRoutes} = require('../../lnd_responses');
|
|
6
6
|
|
|
7
|
-
const defaultFinalCltvDelta =
|
|
7
|
+
const defaultFinalCltvDelta = 144;
|
|
8
8
|
const defaultMtokens = '1000000';
|
|
9
9
|
const hexAsBuffer = hex => Buffer.from(hex, 'hex');
|
|
10
10
|
const {isArray} = Array;
|
|
@@ -3,7 +3,7 @@ const {randomBytes} = require('crypto');
|
|
|
3
3
|
const {isLnd} = require('./../../lnd_requests');
|
|
4
4
|
const subscribeToPay = require('./subscribe_to_pay');
|
|
5
5
|
|
|
6
|
-
const defaultCltvDelta =
|
|
6
|
+
const defaultCltvDelta = 144;
|
|
7
7
|
const isPublicKey = n => !!n && /^[0-9A-F]{66}$/i.test(n);
|
|
8
8
|
const method = 'sendPaymentV2';
|
|
9
9
|
const randomId = () => randomBytes(32).toString('hex');
|
|
@@ -5,7 +5,7 @@ const {isLnd} = require('./../../lnd_requests');
|
|
|
5
5
|
const {rpcFailedPolicyAsFail} = require('./../../lnd_responses');
|
|
6
6
|
|
|
7
7
|
const defaultBaseFee = 1;
|
|
8
|
-
const defaultCltvDelta =
|
|
8
|
+
const defaultCltvDelta = 144;
|
|
9
9
|
const defaultRate = 1;
|
|
10
10
|
const feeRatio = 1e6;
|
|
11
11
|
const {floor} = Math;
|
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.15.
|
|
13
|
+
"@types/node": "18.15.13",
|
|
14
14
|
"@types/request": "2.48.8",
|
|
15
15
|
"@types/ws": "8.5.4",
|
|
16
16
|
"async": "3.2.4",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"ws": "8.13.0"
|
|
38
38
|
},
|
|
39
39
|
"engines": {
|
|
40
|
-
"node": ">=
|
|
40
|
+
"node": ">=16"
|
|
41
41
|
},
|
|
42
42
|
"keywords": [
|
|
43
43
|
"grpc",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"directory": "test/typescript"
|
|
60
60
|
},
|
|
61
61
|
"types": "index.d.ts",
|
|
62
|
-
"version": "
|
|
62
|
+
"version": "9.0.0"
|
|
63
63
|
}
|
|
@@ -119,7 +119,7 @@ const tests = [
|
|
|
119
119
|
fee_rate: 0.000001,
|
|
120
120
|
global: true,
|
|
121
121
|
max_htlc_msat: undefined,
|
|
122
|
-
time_lock_delta:
|
|
122
|
+
time_lock_delta: 144,
|
|
123
123
|
},
|
|
124
124
|
}),
|
|
125
125
|
description: 'The global channel policy is updated',
|
|
@@ -135,7 +135,7 @@ const tests = [
|
|
|
135
135
|
fee_rate: 0.000001,
|
|
136
136
|
global: true,
|
|
137
137
|
max_htlc_msat: undefined,
|
|
138
|
-
time_lock_delta:
|
|
138
|
+
time_lock_delta: 144,
|
|
139
139
|
},
|
|
140
140
|
}),
|
|
141
141
|
description: 'The global channel policy base fee mtokens is updated',
|