astra-lightning 1.0.0 → 1.0.1
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/grpc/protos/lightning.proto +59 -59
- package/index.js +161 -159
- package/lnd_methods/index.js +160 -158
- package/lnd_methods/offchain/index.d.ts +58 -57
- package/lnd_methods/offchain/index.js +2 -0
- package/lnd_methods/offchain/pay_taproot_invoice.d.ts +22 -0
- package/lnd_methods/offchain/pay_taproot_invoice.js +80 -0
- package/lnd_responses/rpc_channel_as_channel.js +12 -6
- package/package.json +1 -1
|
@@ -1190,8 +1190,9 @@ message SendCoinsRequest {
|
|
|
1190
1190
|
int64 sat_per_byte = 5 [deprecated = true];
|
|
1191
1191
|
|
|
1192
1192
|
/*
|
|
1193
|
-
If set, the amount field
|
|
1194
|
-
|
|
1193
|
+
If set, then the amount field will be ignored, and lnd will attempt to
|
|
1194
|
+
send all the coins under control of the internal wallet to the specified
|
|
1195
|
+
address.
|
|
1195
1196
|
*/
|
|
1196
1197
|
bool send_all = 6;
|
|
1197
1198
|
|
|
@@ -1207,9 +1208,6 @@ message SendCoinsRequest {
|
|
|
1207
1208
|
|
|
1208
1209
|
// The strategy to use for selecting coins.
|
|
1209
1210
|
CoinSelectionStrategy coin_selection_strategy = 10;
|
|
1210
|
-
|
|
1211
|
-
// A list of selected outpoints as inputs for the transaction.
|
|
1212
|
-
repeated OutPoint outpoints = 11;
|
|
1213
1211
|
}
|
|
1214
1212
|
message SendCoinsResponse {
|
|
1215
1213
|
// The transaction ID of the transaction
|
|
@@ -1388,8 +1386,14 @@ enum CommitmentType {
|
|
|
1388
1386
|
A channel that uses musig2 for the funding output, and the new tapscript
|
|
1389
1387
|
features where relevant.
|
|
1390
1388
|
*/
|
|
1391
|
-
// TODO(roasbeef): need script enforce mirror type for the above as well?
|
|
1392
1389
|
SIMPLE_TAPROOT = 5;
|
|
1390
|
+
|
|
1391
|
+
/*
|
|
1392
|
+
Identical to the SIMPLE_TAPROOT channel type, but with extra functionality.
|
|
1393
|
+
This channel type also commits to additional meta data in the tapscript
|
|
1394
|
+
leaves for the scripts in a channel.
|
|
1395
|
+
*/
|
|
1396
|
+
SIMPLE_TAPROOT_OVERLAY = 6;
|
|
1393
1397
|
}
|
|
1394
1398
|
|
|
1395
1399
|
message ChannelConstraints {
|
|
@@ -1592,6 +1596,11 @@ message Channel {
|
|
|
1592
1596
|
the channel's operation.
|
|
1593
1597
|
*/
|
|
1594
1598
|
string memo = 36;
|
|
1599
|
+
|
|
1600
|
+
/*
|
|
1601
|
+
Custom channel data that might be populated in custom channels.
|
|
1602
|
+
*/
|
|
1603
|
+
bytes custom_channel_data = 37;
|
|
1595
1604
|
}
|
|
1596
1605
|
|
|
1597
1606
|
message ListChannelsRequest {
|
|
@@ -2028,10 +2037,38 @@ message ChannelOpenUpdate {
|
|
|
2028
2037
|
ChannelPoint channel_point = 1;
|
|
2029
2038
|
}
|
|
2030
2039
|
|
|
2040
|
+
message CloseOutput {
|
|
2041
|
+
// The amount in satoshi of this close output. This amount is the final
|
|
2042
|
+
// commitment balance of the channel and the actual amount paid out on chain
|
|
2043
|
+
// might be smaller due to subtracted fees.
|
|
2044
|
+
int64 amount_sat = 1;
|
|
2045
|
+
|
|
2046
|
+
// The pkScript of the close output.
|
|
2047
|
+
bytes pk_script = 2;
|
|
2048
|
+
|
|
2049
|
+
// Whether this output is for the local or remote node.
|
|
2050
|
+
bool is_local = 3;
|
|
2051
|
+
|
|
2052
|
+
// The TLV encoded custom channel data records for this output, which might
|
|
2053
|
+
// be set for custom channels.
|
|
2054
|
+
bytes custom_channel_data = 4;
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2031
2057
|
message ChannelCloseUpdate {
|
|
2032
2058
|
bytes closing_txid = 1;
|
|
2033
2059
|
|
|
2034
2060
|
bool success = 2;
|
|
2061
|
+
|
|
2062
|
+
// The local channel close output. If the local channel balance was dust to
|
|
2063
|
+
// begin with, this output will not be set.
|
|
2064
|
+
CloseOutput local_close_output = 3;
|
|
2065
|
+
|
|
2066
|
+
// The remote channel close output. If the remote channel balance was dust
|
|
2067
|
+
// to begin with, this output will not be set.
|
|
2068
|
+
CloseOutput remote_close_output = 4;
|
|
2069
|
+
|
|
2070
|
+
// Any additional outputs that might be added for custom channel types.
|
|
2071
|
+
repeated CloseOutput additional_outputs = 5;
|
|
2035
2072
|
}
|
|
2036
2073
|
|
|
2037
2074
|
message CloseChannelRequest {
|
|
@@ -2709,6 +2746,11 @@ message PendingChannelsResponse {
|
|
|
2709
2746
|
impacts the channel's operation.
|
|
2710
2747
|
*/
|
|
2711
2748
|
string memo = 13;
|
|
2749
|
+
|
|
2750
|
+
/*
|
|
2751
|
+
Custom channel data that might be populated in custom channels.
|
|
2752
|
+
*/
|
|
2753
|
+
bytes custom_channel_data = 34;
|
|
2712
2754
|
}
|
|
2713
2755
|
|
|
2714
2756
|
message PendingOpenChannel {
|
|
@@ -2968,6 +3010,12 @@ message ChannelBalanceResponse {
|
|
|
2968
3010
|
|
|
2969
3011
|
// Sum of channels pending remote balances.
|
|
2970
3012
|
Amount pending_open_remote_balance = 8;
|
|
3013
|
+
|
|
3014
|
+
/*
|
|
3015
|
+
Custom channel data that might be populated if there are custom channels
|
|
3016
|
+
present.
|
|
3017
|
+
*/
|
|
3018
|
+
bytes custom_channel_data = 9;
|
|
2971
3019
|
}
|
|
2972
3020
|
|
|
2973
3021
|
message QueryRoutesRequest {
|
|
@@ -3445,10 +3493,6 @@ message ChanInfoRequest {
|
|
|
3445
3493
|
output index for the channel.
|
|
3446
3494
|
*/
|
|
3447
3495
|
uint64 chan_id = 1 [jstype = JS_STRING];
|
|
3448
|
-
|
|
3449
|
-
// The channel point of the channel in format funding_txid:output_index. If
|
|
3450
|
-
// chan_id is specified, this field is ignored.
|
|
3451
|
-
string chan_point = 2;
|
|
3452
3496
|
}
|
|
3453
3497
|
|
|
3454
3498
|
message NetworkInfoRequest {
|
|
@@ -3838,48 +3882,6 @@ message Invoice {
|
|
|
3838
3882
|
Note: Output only, don't specify for creating an invoice.
|
|
3839
3883
|
*/
|
|
3840
3884
|
map<string, AMPInvoiceState> amp_invoice_state = 28;
|
|
3841
|
-
|
|
3842
|
-
/*
|
|
3843
|
-
Signals that the invoice should include blinded paths to hide the true
|
|
3844
|
-
identity of the recipient.
|
|
3845
|
-
*/
|
|
3846
|
-
bool is_blinded = 29;
|
|
3847
|
-
|
|
3848
|
-
/*
|
|
3849
|
-
Config values to use when creating blinded paths for this invoice. These
|
|
3850
|
-
can be used to override the defaults config values provided in by the
|
|
3851
|
-
global config. This field is only used if is_blinded is true.
|
|
3852
|
-
*/
|
|
3853
|
-
BlindedPathConfig blinded_path_config = 30;
|
|
3854
|
-
}
|
|
3855
|
-
|
|
3856
|
-
message BlindedPathConfig {
|
|
3857
|
-
/*
|
|
3858
|
-
The minimum number of real hops to include in a blinded path. This doesn't
|
|
3859
|
-
include our node, so if the minimum is 1, then the path will contain at
|
|
3860
|
-
minimum our node along with an introduction node hop. If it is zero then
|
|
3861
|
-
the shortest path will use our node as an introduction node.
|
|
3862
|
-
*/
|
|
3863
|
-
optional uint32 min_num_real_hops = 1;
|
|
3864
|
-
|
|
3865
|
-
/*
|
|
3866
|
-
The number of hops to include in a blinded path. This doesn't include our
|
|
3867
|
-
node, so if it is 1, then the path will contain our node along with an
|
|
3868
|
-
introduction node or dummy node hop. If paths shorter than NumHops is
|
|
3869
|
-
found, then they will be padded using dummy hops.
|
|
3870
|
-
*/
|
|
3871
|
-
optional uint32 num_hops = 2;
|
|
3872
|
-
|
|
3873
|
-
/*
|
|
3874
|
-
The maximum number of blinded paths to select and add to an invoice.
|
|
3875
|
-
*/
|
|
3876
|
-
optional uint32 max_num_paths = 3;
|
|
3877
|
-
|
|
3878
|
-
/*
|
|
3879
|
-
A list of node IDs of nodes that should not be used in any of our generated
|
|
3880
|
-
blinded paths.
|
|
3881
|
-
*/
|
|
3882
|
-
repeated bytes node_omission_list = 4;
|
|
3883
3885
|
}
|
|
3884
3886
|
|
|
3885
3887
|
enum InvoiceHTLCState {
|
|
@@ -3922,6 +3924,10 @@ message InvoiceHTLC {
|
|
|
3922
3924
|
|
|
3923
3925
|
// Details relevant to AMP HTLCs, only populated if this is an AMP HTLC.
|
|
3924
3926
|
AMP amp = 11;
|
|
3927
|
+
|
|
3928
|
+
// Custom tlv records that were only sent on the p2p wire message, not in
|
|
3929
|
+
// the onion.
|
|
3930
|
+
map<uint64, bytes> wire_custom_records = 12;
|
|
3925
3931
|
}
|
|
3926
3932
|
|
|
3927
3933
|
// Details specific to AMP HTLCs.
|
|
@@ -4088,11 +4094,6 @@ enum PaymentFailureReason {
|
|
|
4088
4094
|
Insufficient local balance.
|
|
4089
4095
|
*/
|
|
4090
4096
|
FAILURE_REASON_INSUFFICIENT_BALANCE = 5;
|
|
4091
|
-
|
|
4092
|
-
/*
|
|
4093
|
-
The payment was canceled.
|
|
4094
|
-
*/
|
|
4095
|
-
FAILURE_REASON_CANCELED = 6;
|
|
4096
4097
|
}
|
|
4097
4098
|
|
|
4098
4099
|
message Payment {
|
|
@@ -4105,7 +4106,7 @@ message Payment {
|
|
|
4105
4106
|
// Deprecated, use creation_time_ns
|
|
4106
4107
|
int64 creation_date = 3 [deprecated = true];
|
|
4107
4108
|
|
|
4108
|
-
|
|
4109
|
+
reserved 4;
|
|
4109
4110
|
|
|
4110
4111
|
// Deprecated, use fee_sat or fee_msat.
|
|
4111
4112
|
int64 fee = 5 [deprecated = true];
|
|
@@ -4338,7 +4339,6 @@ message PayReq {
|
|
|
4338
4339
|
bytes payment_addr = 11;
|
|
4339
4340
|
int64 num_msat = 12;
|
|
4340
4341
|
map<uint32, Feature> features = 13;
|
|
4341
|
-
repeated BlindedPaymentPath blinded_paths = 14;
|
|
4342
4342
|
}
|
|
4343
4343
|
|
|
4344
4344
|
enum FeatureBit {
|
package/index.js
CHANGED
|
@@ -1,162 +1,163 @@
|
|
|
1
|
-
const {addAdvertisedFeature} = require('./lnd_methods');
|
|
2
|
-
const {addExternalSocket} = require('./lnd_methods');
|
|
3
|
-
const {addPeer} = require('./lnd_methods');
|
|
4
|
-
const {authenticatedLndGrpc} = require('./lnd_grpc');
|
|
5
|
-
const {beginGroupSigningSession} = require('./lnd_methods');
|
|
6
|
-
const {broadcastChainTransaction} = require('./lnd_methods');
|
|
7
|
-
const {cancelHodlInvoice} = require('./lnd_methods');
|
|
8
|
-
const {cancelPendingChannel} = require('./lnd_methods');
|
|
9
|
-
const {changePassword} = require('./lnd_methods');
|
|
10
|
-
const {closeChannel} = require('./lnd_methods');
|
|
11
|
-
const {connectWatchtower} = require('./lnd_methods');
|
|
12
|
-
const {createChainAddress} = require('./lnd_methods');
|
|
13
|
-
const {createFundedPsbt} = require('./lnd_methods');
|
|
14
|
-
const {createHodlInvoice} = require('./lnd_methods');
|
|
15
|
-
const {createInvoice} = require('./lnd_methods');
|
|
16
|
-
const {createSeed} = require('./lnd_methods');
|
|
17
|
-
const {createWallet} = require('./lnd_methods');
|
|
18
|
-
const {decodePaymentRequest} = require('./lnd_methods');
|
|
19
|
-
const {deleteChainTransaction} = require('./lnd_methods');
|
|
20
|
-
const {deleteFailedPayAttempts} = require('./lnd_methods');
|
|
21
|
-
const {deleteFailedPayments} = require('./lnd_methods');
|
|
22
|
-
const {deleteForwardingReputations} = require('./lnd_methods');
|
|
23
|
-
const {deletePayment} = require('./lnd_methods');
|
|
24
|
-
const {deletePayments} = require('./lnd_methods');
|
|
25
|
-
const {deletePendingChannel} = require('./lnd_methods');
|
|
26
|
-
const {diffieHellmanComputeSecret} = require('./lnd_methods');
|
|
27
|
-
const {disableChannel} = require('./lnd_methods');
|
|
28
|
-
const {disconnectWatchtower} = require('./lnd_methods');
|
|
29
|
-
const {enableChannel} = require('./lnd_methods');
|
|
30
|
-
const {endGroupSigningSession} = require('./lnd_methods');
|
|
31
|
-
const {fundPendingChannels} = require('./lnd_methods');
|
|
32
|
-
const {fundPsbt} = require('./lnd_methods');
|
|
33
|
-
const {getAccessIds} = require('./lnd_methods');
|
|
34
|
-
const {getAutopilot} = require('./lnd_methods');
|
|
35
|
-
const {getBackup} = require('./lnd_methods');
|
|
36
|
-
const {getBackups} = require('./lnd_methods');
|
|
37
|
-
const {getBlock} = require('./lnd_methods');
|
|
38
|
-
const {getBlockHeader} = require('./lnd_methods');
|
|
39
|
-
const {getChainAddresses} = require('./lnd_methods');
|
|
40
|
-
const {getChainBalance} = require('./lnd_methods');
|
|
41
|
-
const {getChainFeeEstimate} = require('./lnd_methods');
|
|
42
|
-
const {getChainFeeRate} = require('./lnd_methods');
|
|
43
|
-
const {getChainTransaction} = require('./lnd_methods');
|
|
44
|
-
const {getChainTransactions} = require('./lnd_methods');
|
|
45
|
-
const {getChannel} = require('./lnd_methods');
|
|
46
|
-
const {getChannelBalance} = require('./lnd_methods');
|
|
47
|
-
const {getChannels} = require('./lnd_methods');
|
|
48
|
-
const {getClosedChannels} = require('./lnd_methods');
|
|
49
|
-
const {getConfiguration} = require('./lnd_methods');
|
|
50
|
-
const {getConnectedWatchtowers} = require('./lnd_methods');
|
|
51
|
-
const {getEphemeralChannelIds} = require('./lnd_methods');
|
|
52
|
-
const {getFailedPayments} = require('./lnd_methods');
|
|
53
|
-
const {getFeeRates} = require('./lnd_methods');
|
|
54
|
-
const {getForwardingConfidence} = require('./lnd_methods');
|
|
55
|
-
const {getForwardingReputations} = require('./lnd_methods');
|
|
56
|
-
const {getForwards} = require('./lnd_methods');
|
|
57
|
-
const {getHeight} = require('./lnd_methods');
|
|
58
|
-
const {getIdentity} = require('./lnd_methods');
|
|
59
|
-
const {getInvoice} = require('./lnd_methods');
|
|
60
|
-
const {getInvoices} = require('./lnd_methods');
|
|
61
|
-
const {getLockedUtxos} = require('./lnd_methods');
|
|
62
|
-
const {getMasterPublicKeys} = require('./lnd_methods');
|
|
63
|
-
const {getMethods} = require('./lnd_methods');
|
|
64
|
-
const {getMinimumRelayFee} = require('./lnd_methods');
|
|
65
|
-
const {getNetworkCentrality} = require('./lnd_methods');
|
|
66
|
-
const {getNetworkGraph} = require('./lnd_methods');
|
|
67
|
-
const {getNetworkInfo} = require('./lnd_methods');
|
|
68
|
-
const {getNode} = require('./lnd_methods');
|
|
69
|
-
const {getPathfindingSettings} = require('./lnd_methods');
|
|
70
|
-
const {getPayment} = require('./lnd_methods');
|
|
71
|
-
const {getPayments} = require('./lnd_methods');
|
|
72
|
-
const {getPeers} = require('./lnd_methods');
|
|
73
|
-
const {getPendingChainBalance} = require('./lnd_methods');
|
|
74
|
-
const {getPendingChannels} = require('./lnd_methods');
|
|
75
|
-
const {getPendingPayments} = require('./lnd_methods');
|
|
76
|
-
const {getPendingSweeps} = require('./lnd_methods');
|
|
77
|
-
const {getPublicKey} = require('./lnd_methods');
|
|
78
|
-
const {getRouteConfidence} = require('./lnd_methods');
|
|
79
|
-
const {getRouteThroughHops} = require('./lnd_methods');
|
|
80
|
-
const {getRouteToDestination} = require('./lnd_methods');
|
|
81
|
-
const {getSettlementStatus} = require('./lnd_methods');
|
|
82
|
-
const {getSweepTransactions} = require('./lnd_methods');
|
|
83
|
-
const {getTowerServerInfo} = require('./lnd_methods');
|
|
84
|
-
const {getUtxos} = require('./lnd_methods');
|
|
85
|
-
const {getWalletInfo} = require('./lnd_methods');
|
|
86
|
-
const {getWalletStatus} = require('./lnd_methods');
|
|
87
|
-
const {getWalletVersion} = require('./lnd_methods');
|
|
88
|
-
const {grantAccess} = require('./lnd_methods');
|
|
89
|
-
const {isDestinationPayable} = require('./lnd_methods');
|
|
90
|
-
const {lockUtxo} = require('./lnd_methods');
|
|
91
|
-
const {openChannel} = require('./lnd_methods');
|
|
92
|
-
const {openChannels} = require('./lnd_methods');
|
|
93
|
-
const {partiallySignPsbt} = require('./lnd_methods');
|
|
94
|
-
const {pay} = require('./lnd_methods');
|
|
95
|
-
const {
|
|
96
|
-
const {
|
|
97
|
-
const {
|
|
98
|
-
const {
|
|
99
|
-
const {
|
|
100
|
-
const {
|
|
101
|
-
const {
|
|
102
|
-
const {
|
|
103
|
-
const {
|
|
104
|
-
const {
|
|
105
|
-
const {
|
|
106
|
-
const {
|
|
107
|
-
const {
|
|
108
|
-
const {
|
|
109
|
-
const {
|
|
110
|
-
const {
|
|
111
|
-
const {
|
|
112
|
-
const {
|
|
113
|
-
const {
|
|
114
|
-
const {
|
|
115
|
-
const {
|
|
116
|
-
const {
|
|
117
|
-
const {
|
|
118
|
-
const {
|
|
119
|
-
const {
|
|
120
|
-
const {
|
|
121
|
-
const {
|
|
122
|
-
const {
|
|
123
|
-
const {
|
|
124
|
-
const {
|
|
125
|
-
const {
|
|
126
|
-
const {
|
|
127
|
-
const {
|
|
128
|
-
const {
|
|
129
|
-
const {
|
|
130
|
-
const {
|
|
131
|
-
const {
|
|
132
|
-
const {
|
|
133
|
-
const {
|
|
134
|
-
const {
|
|
135
|
-
const {
|
|
136
|
-
const {
|
|
137
|
-
const {
|
|
138
|
-
const {
|
|
139
|
-
const {
|
|
140
|
-
const {
|
|
141
|
-
const {
|
|
142
|
-
const {
|
|
143
|
-
const {
|
|
144
|
-
const {
|
|
145
|
-
const {
|
|
146
|
-
const {
|
|
147
|
-
const {
|
|
148
|
-
const {
|
|
149
|
-
const {
|
|
150
|
-
const {
|
|
151
|
-
const {
|
|
152
|
-
const {
|
|
153
|
-
const {
|
|
154
|
-
const {
|
|
155
|
-
const {
|
|
156
|
-
const {
|
|
157
|
-
const {
|
|
158
|
-
const {
|
|
159
|
-
const {
|
|
1
|
+
const { addAdvertisedFeature } = require('./lnd_methods');
|
|
2
|
+
const { addExternalSocket } = require('./lnd_methods');
|
|
3
|
+
const { addPeer } = require('./lnd_methods');
|
|
4
|
+
const { authenticatedLndGrpc } = require('./lnd_grpc');
|
|
5
|
+
const { beginGroupSigningSession } = require('./lnd_methods');
|
|
6
|
+
const { broadcastChainTransaction } = require('./lnd_methods');
|
|
7
|
+
const { cancelHodlInvoice } = require('./lnd_methods');
|
|
8
|
+
const { cancelPendingChannel } = require('./lnd_methods');
|
|
9
|
+
const { changePassword } = require('./lnd_methods');
|
|
10
|
+
const { closeChannel } = require('./lnd_methods');
|
|
11
|
+
const { connectWatchtower } = require('./lnd_methods');
|
|
12
|
+
const { createChainAddress } = require('./lnd_methods');
|
|
13
|
+
const { createFundedPsbt } = require('./lnd_methods');
|
|
14
|
+
const { createHodlInvoice } = require('./lnd_methods');
|
|
15
|
+
const { createInvoice } = require('./lnd_methods');
|
|
16
|
+
const { createSeed } = require('./lnd_methods');
|
|
17
|
+
const { createWallet } = require('./lnd_methods');
|
|
18
|
+
const { decodePaymentRequest } = require('./lnd_methods');
|
|
19
|
+
const { deleteChainTransaction } = require('./lnd_methods');
|
|
20
|
+
const { deleteFailedPayAttempts } = require('./lnd_methods');
|
|
21
|
+
const { deleteFailedPayments } = require('./lnd_methods');
|
|
22
|
+
const { deleteForwardingReputations } = require('./lnd_methods');
|
|
23
|
+
const { deletePayment } = require('./lnd_methods');
|
|
24
|
+
const { deletePayments } = require('./lnd_methods');
|
|
25
|
+
const { deletePendingChannel } = require('./lnd_methods');
|
|
26
|
+
const { diffieHellmanComputeSecret } = require('./lnd_methods');
|
|
27
|
+
const { disableChannel } = require('./lnd_methods');
|
|
28
|
+
const { disconnectWatchtower } = require('./lnd_methods');
|
|
29
|
+
const { enableChannel } = require('./lnd_methods');
|
|
30
|
+
const { endGroupSigningSession } = require('./lnd_methods');
|
|
31
|
+
const { fundPendingChannels } = require('./lnd_methods');
|
|
32
|
+
const { fundPsbt } = require('./lnd_methods');
|
|
33
|
+
const { getAccessIds } = require('./lnd_methods');
|
|
34
|
+
const { getAutopilot } = require('./lnd_methods');
|
|
35
|
+
const { getBackup } = require('./lnd_methods');
|
|
36
|
+
const { getBackups } = require('./lnd_methods');
|
|
37
|
+
const { getBlock } = require('./lnd_methods');
|
|
38
|
+
const { getBlockHeader } = require('./lnd_methods');
|
|
39
|
+
const { getChainAddresses } = require('./lnd_methods');
|
|
40
|
+
const { getChainBalance } = require('./lnd_methods');
|
|
41
|
+
const { getChainFeeEstimate } = require('./lnd_methods');
|
|
42
|
+
const { getChainFeeRate } = require('./lnd_methods');
|
|
43
|
+
const { getChainTransaction } = require('./lnd_methods');
|
|
44
|
+
const { getChainTransactions } = require('./lnd_methods');
|
|
45
|
+
const { getChannel } = require('./lnd_methods');
|
|
46
|
+
const { getChannelBalance } = require('./lnd_methods');
|
|
47
|
+
const { getChannels } = require('./lnd_methods');
|
|
48
|
+
const { getClosedChannels } = require('./lnd_methods');
|
|
49
|
+
const { getConfiguration } = require('./lnd_methods');
|
|
50
|
+
const { getConnectedWatchtowers } = require('./lnd_methods');
|
|
51
|
+
const { getEphemeralChannelIds } = require('./lnd_methods');
|
|
52
|
+
const { getFailedPayments } = require('./lnd_methods');
|
|
53
|
+
const { getFeeRates } = require('./lnd_methods');
|
|
54
|
+
const { getForwardingConfidence } = require('./lnd_methods');
|
|
55
|
+
const { getForwardingReputations } = require('./lnd_methods');
|
|
56
|
+
const { getForwards } = require('./lnd_methods');
|
|
57
|
+
const { getHeight } = require('./lnd_methods');
|
|
58
|
+
const { getIdentity } = require('./lnd_methods');
|
|
59
|
+
const { getInvoice } = require('./lnd_methods');
|
|
60
|
+
const { getInvoices } = require('./lnd_methods');
|
|
61
|
+
const { getLockedUtxos } = require('./lnd_methods');
|
|
62
|
+
const { getMasterPublicKeys } = require('./lnd_methods');
|
|
63
|
+
const { getMethods } = require('./lnd_methods');
|
|
64
|
+
const { getMinimumRelayFee } = require('./lnd_methods');
|
|
65
|
+
const { getNetworkCentrality } = require('./lnd_methods');
|
|
66
|
+
const { getNetworkGraph } = require('./lnd_methods');
|
|
67
|
+
const { getNetworkInfo } = require('./lnd_methods');
|
|
68
|
+
const { getNode } = require('./lnd_methods');
|
|
69
|
+
const { getPathfindingSettings } = require('./lnd_methods');
|
|
70
|
+
const { getPayment } = require('./lnd_methods');
|
|
71
|
+
const { getPayments } = require('./lnd_methods');
|
|
72
|
+
const { getPeers } = require('./lnd_methods');
|
|
73
|
+
const { getPendingChainBalance } = require('./lnd_methods');
|
|
74
|
+
const { getPendingChannels } = require('./lnd_methods');
|
|
75
|
+
const { getPendingPayments } = require('./lnd_methods');
|
|
76
|
+
const { getPendingSweeps } = require('./lnd_methods');
|
|
77
|
+
const { getPublicKey } = require('./lnd_methods');
|
|
78
|
+
const { getRouteConfidence } = require('./lnd_methods');
|
|
79
|
+
const { getRouteThroughHops } = require('./lnd_methods');
|
|
80
|
+
const { getRouteToDestination } = require('./lnd_methods');
|
|
81
|
+
const { getSettlementStatus } = require('./lnd_methods');
|
|
82
|
+
const { getSweepTransactions } = require('./lnd_methods');
|
|
83
|
+
const { getTowerServerInfo } = require('./lnd_methods');
|
|
84
|
+
const { getUtxos } = require('./lnd_methods');
|
|
85
|
+
const { getWalletInfo } = require('./lnd_methods');
|
|
86
|
+
const { getWalletStatus } = require('./lnd_methods');
|
|
87
|
+
const { getWalletVersion } = require('./lnd_methods');
|
|
88
|
+
const { grantAccess } = require('./lnd_methods');
|
|
89
|
+
const { isDestinationPayable } = require('./lnd_methods');
|
|
90
|
+
const { lockUtxo } = require('./lnd_methods');
|
|
91
|
+
const { openChannel } = require('./lnd_methods');
|
|
92
|
+
const { openChannels } = require('./lnd_methods');
|
|
93
|
+
const { partiallySignPsbt } = require('./lnd_methods');
|
|
94
|
+
const { pay } = require('./lnd_methods');
|
|
95
|
+
const { payTaprootInvoice } = require('./lnd_methods');
|
|
96
|
+
const { payViaPaymentDetails } = require('./lnd_methods');
|
|
97
|
+
const { payViaPaymentRequest } = require('./lnd_methods');
|
|
98
|
+
const { payViaRoutes } = require('./lnd_methods');
|
|
99
|
+
const { prepareForChannelProposal } = require('./lnd_methods');
|
|
100
|
+
const { probeForRoute } = require('./lnd_methods');
|
|
101
|
+
const { proposeChannel } = require('./lnd_methods');
|
|
102
|
+
const { recoverFundsFromChannel } = require('./lnd_methods');
|
|
103
|
+
const { recoverFundsFromChannels } = require('./lnd_methods');
|
|
104
|
+
const { removeAdvertisedFeature } = require('./lnd_methods');
|
|
105
|
+
const { removeExternalSocket } = require('./lnd_methods');
|
|
106
|
+
const { removePeer } = require('./lnd_methods');
|
|
107
|
+
const { requestBatchedFeeIncrease } = require('./lnd_methods');
|
|
108
|
+
const { requestChainFeeIncrease } = require('./lnd_methods');
|
|
109
|
+
const { revokeAccess } = require('./lnd_methods');
|
|
110
|
+
const { sendMessageToPeer } = require('./lnd_methods');
|
|
111
|
+
const { sendToChainAddress } = require('./lnd_methods');
|
|
112
|
+
const { sendToChainAddresses } = require('./lnd_methods');
|
|
113
|
+
const { sendToChainOutputScripts } = require('./lnd_methods');
|
|
114
|
+
const { setAutopilot } = require('./lnd_methods');
|
|
115
|
+
const { settleHodlInvoice } = require('./lnd_methods');
|
|
116
|
+
const { signBytes } = require('./lnd_methods');
|
|
117
|
+
const { signChainAddressMessage } = require('./lnd_methods');
|
|
118
|
+
const { signMessage } = require('./lnd_methods');
|
|
119
|
+
const { signPsbt } = require('./lnd_methods');
|
|
120
|
+
const { signTransaction } = require('./lnd_methods');
|
|
121
|
+
const { stopDaemon } = require('./lnd_methods');
|
|
122
|
+
const { subscribeToBackups } = require('./lnd_methods');
|
|
123
|
+
const { subscribeToBlocks } = require('./lnd_methods');
|
|
124
|
+
const { subscribeToChainAddress } = require('./lnd_methods');
|
|
125
|
+
const { subscribeToChainSpend } = require('./lnd_methods');
|
|
126
|
+
const { subscribeToChannels } = require('./lnd_methods');
|
|
127
|
+
const { subscribeToForwardRequests } = require('./lnd_methods');
|
|
128
|
+
const { subscribeToForwards } = require('./lnd_methods');
|
|
129
|
+
const { subscribeToGraph } = require('./lnd_methods');
|
|
130
|
+
const { subscribeToInvoice } = require('./lnd_methods');
|
|
131
|
+
const { subscribeToInvoices } = require('./lnd_methods');
|
|
132
|
+
const { subscribeToOpenRequests } = require('./lnd_methods');
|
|
133
|
+
const { subscribeToPastPayment } = require('./lnd_methods');
|
|
134
|
+
const { subscribeToPastPayments } = require('./lnd_methods');
|
|
135
|
+
const { subscribeToPayViaDetails } = require('./lnd_methods');
|
|
136
|
+
const { subscribeToPayViaRequest } = require('./lnd_methods');
|
|
137
|
+
const { subscribeToPayViaRoutes } = require('./lnd_methods');
|
|
138
|
+
const { subscribeToPayments } = require('./lnd_methods');
|
|
139
|
+
const { subscribeToPeerMessages } = require('./lnd_methods');
|
|
140
|
+
const { subscribeToPeers } = require('./lnd_methods');
|
|
141
|
+
const { subscribeToProbeForRoute } = require('./lnd_methods');
|
|
142
|
+
const { subscribeToRpcRequests } = require('./lnd_methods');
|
|
143
|
+
const { subscribeToTransactions } = require('./lnd_methods');
|
|
144
|
+
const { subscribeToWalletStatus } = require('./lnd_methods');
|
|
145
|
+
const { unauthenticatedLndGrpc } = require('./lnd_grpc');
|
|
146
|
+
const { unlockUtxo } = require('./lnd_methods');
|
|
147
|
+
const { unlockWallet } = require('./lnd_methods');
|
|
148
|
+
const { updateAlias } = require('./lnd_methods');
|
|
149
|
+
const { updateChainTransaction } = require('./lnd_methods');
|
|
150
|
+
const { updateColor } = require('./lnd_methods');
|
|
151
|
+
const { updateConnectedWatchtower } = require('./lnd_methods');
|
|
152
|
+
const { updateGroupSigningSession } = require('./lnd_methods');
|
|
153
|
+
const { updatePathfindingSettings } = require('./lnd_methods');
|
|
154
|
+
const { updateRoutingFees } = require('./lnd_methods');
|
|
155
|
+
const { verifyAccess } = require('./lnd_methods');
|
|
156
|
+
const { verifyBackup } = require('./lnd_methods');
|
|
157
|
+
const { verifyBackups } = require('./lnd_methods');
|
|
158
|
+
const { verifyBytesSignature } = require('./lnd_methods');
|
|
159
|
+
const { verifyChainAddressMessage } = require('./lnd_methods');
|
|
160
|
+
const { verifyMessage } = require('./lnd_methods');
|
|
160
161
|
|
|
161
162
|
module.exports = {
|
|
162
163
|
addAdvertisedFeature,
|
|
@@ -253,6 +254,7 @@ module.exports = {
|
|
|
253
254
|
openChannels,
|
|
254
255
|
partiallySignPsbt,
|
|
255
256
|
pay,
|
|
257
|
+
payTaprootInvoice,
|
|
256
258
|
payViaPaymentDetails,
|
|
257
259
|
payViaPaymentRequest,
|
|
258
260
|
payViaRoutes,
|
package/lnd_methods/index.js
CHANGED
|
@@ -1,161 +1,162 @@
|
|
|
1
|
-
const {addAdvertisedFeature} = require('./peers');
|
|
2
|
-
const {addExternalSocket} = require('./peers');
|
|
3
|
-
const {addPeer} = require('./peers');
|
|
4
|
-
const {beginGroupSigningSession} = require('./signer');
|
|
5
|
-
const {broadcastChainTransaction} = require('./onchain');
|
|
6
|
-
const {cancelHodlInvoice} = require('./invoices');
|
|
7
|
-
const {cancelPendingChannel} = require('./onchain');
|
|
8
|
-
const {changePassword} = require('./unauthenticated');
|
|
9
|
-
const {closeChannel} = require('./onchain');
|
|
10
|
-
const {connectWatchtower} = require('./offchain');
|
|
11
|
-
const {createChainAddress} = require('./address');
|
|
12
|
-
const {createFundedPsbt} = require('./onchain');
|
|
13
|
-
const {createHodlInvoice} = require('./invoices');
|
|
14
|
-
const {createInvoice} = require('./invoices');
|
|
15
|
-
const {createSeed} = require('./unauthenticated');
|
|
16
|
-
const {createWallet} = require('./unauthenticated');
|
|
17
|
-
const {decodePaymentRequest} = require('./offchain');
|
|
18
|
-
const {deleteChainTransaction} = require('./onchain');
|
|
19
|
-
const {deleteFailedPayAttempts} = require('./offchain');
|
|
20
|
-
const {deleteFailedPayments} = require('./offchain');
|
|
21
|
-
const {deleteForwardingReputations} = require('./offchain');
|
|
22
|
-
const {deletePayment} = require('./offchain');
|
|
23
|
-
const {deletePayments} = require('./offchain');
|
|
24
|
-
const {deletePendingChannel} = require('./offchain');
|
|
25
|
-
const {diffieHellmanComputeSecret} = require('./signer');
|
|
26
|
-
const {disableChannel} = require('./offchain');
|
|
27
|
-
const {disconnectWatchtower} = require('./offchain');
|
|
28
|
-
const {enableChannel} = require('./offchain');
|
|
29
|
-
const {endGroupSigningSession} = require('./signer');
|
|
30
|
-
const {fundPendingChannels} = require('./onchain');
|
|
31
|
-
const {fundPsbt} = require('./onchain');
|
|
32
|
-
const {getAccessIds} = require('./macaroon');
|
|
33
|
-
const {getAutopilot} = require('./info');
|
|
34
|
-
const {getBackup} = require('./offchain');
|
|
35
|
-
const {getBackups} = require('./offchain');
|
|
36
|
-
const {getBlock} = require('./onchain');
|
|
37
|
-
const {getBlockHeader} = require('./onchain');
|
|
38
|
-
const {getChainAddresses} = require('./onchain');
|
|
39
|
-
const {getChainBalance} = require('./onchain');
|
|
40
|
-
const {getChainFeeEstimate} = require('./onchain');
|
|
41
|
-
const {getChainFeeRate} = require('./onchain');
|
|
42
|
-
const {getChainTransaction} = require('./onchain');
|
|
43
|
-
const {getChainTransactions} = require('./onchain');
|
|
44
|
-
const {getChannel} = require('./info');
|
|
45
|
-
const {getChannelBalance} = require('./offchain');
|
|
46
|
-
const {getChannels} = require('./offchain');
|
|
47
|
-
const {getClosedChannels} = require('./offchain');
|
|
48
|
-
const {getConfiguration} = require('./info');
|
|
49
|
-
const {getConnectedWatchtowers} = require('./offchain');
|
|
50
|
-
const {getEphemeralChannelIds} = require('./offchain');
|
|
51
|
-
const {getFailedPayments} = require('./offchain');
|
|
52
|
-
const {getFeeRates} = require('./offchain');
|
|
53
|
-
const {getForwardingConfidence} = require('./offchain');
|
|
54
|
-
const {getForwardingReputations} = require('./offchain');
|
|
55
|
-
const {getForwards} = require('./offchain');
|
|
56
|
-
const {getHeight} = require('./generic');
|
|
57
|
-
const {getIdentity} = require('./info');
|
|
58
|
-
const {getInvoice} = require('./invoices');
|
|
59
|
-
const {getInvoices} = require('./invoices');
|
|
60
|
-
const {getLockedUtxos} = require('./onchain');
|
|
61
|
-
const {getMasterPublicKeys} = require('./onchain');
|
|
62
|
-
const {getMethods} = require('./info');
|
|
63
|
-
const {getMinimumRelayFee} = require('./onchain');
|
|
64
|
-
const {getNetworkCentrality} = require('./info');
|
|
65
|
-
const {getNetworkGraph} = require('./info');
|
|
66
|
-
const {getNetworkInfo} = require('./info');
|
|
67
|
-
const {getNode} = require('./info');
|
|
68
|
-
const {getPathfindingSettings} = require('./offchain');
|
|
69
|
-
const {getPayment} = require('./offchain');
|
|
70
|
-
const {getPayments} = require('./offchain');
|
|
71
|
-
const {getPeers} = require('./peers');
|
|
72
|
-
const {getPendingChainBalance} = require('./onchain');
|
|
73
|
-
const {getPendingChannels} = require('./offchain');
|
|
74
|
-
const {getPendingPayments} = require('./offchain');
|
|
75
|
-
const {getPendingSweeps} = require('./onchain');
|
|
76
|
-
const {getPublicKey} = require('./address');
|
|
77
|
-
const {getRouteConfidence} = require('./generic');
|
|
78
|
-
const {getRouteThroughHops} = require('./offchain');
|
|
79
|
-
const {getRouteToDestination} = require('./info');
|
|
80
|
-
const {getSettlementStatus} = require('./offchain');
|
|
81
|
-
const {getSweepTransactions} = require('./onchain');
|
|
82
|
-
const {getTowerServerInfo} = require('./info');
|
|
83
|
-
const {getUtxos} = require('./onchain');
|
|
84
|
-
const {getWalletInfo} = require('./info');
|
|
85
|
-
const {getWalletStatus} = require('./unauthenticated');
|
|
86
|
-
const {getWalletVersion} = require('./info');
|
|
87
|
-
const {grantAccess} = require('./macaroon');
|
|
88
|
-
const {isDestinationPayable} = require('./offchain');
|
|
89
|
-
const {lockUtxo} = require('./onchain');
|
|
90
|
-
const {openChannel} = require('./onchain');
|
|
91
|
-
const {openChannels} = require('./onchain');
|
|
92
|
-
const {partiallySignPsbt} = require('./onchain');
|
|
93
|
-
const {pay} = require('./offchain');
|
|
94
|
-
const {
|
|
95
|
-
const {
|
|
96
|
-
const {
|
|
97
|
-
const {
|
|
98
|
-
const {
|
|
99
|
-
const {
|
|
100
|
-
const {
|
|
101
|
-
const {
|
|
102
|
-
const {
|
|
103
|
-
const {
|
|
104
|
-
const {
|
|
105
|
-
const {
|
|
106
|
-
const {
|
|
107
|
-
const {
|
|
108
|
-
const {
|
|
109
|
-
const {
|
|
110
|
-
const {
|
|
111
|
-
const {
|
|
112
|
-
const {
|
|
113
|
-
const {
|
|
114
|
-
const {
|
|
115
|
-
const {
|
|
116
|
-
const {
|
|
117
|
-
const {
|
|
118
|
-
const {
|
|
119
|
-
const {
|
|
120
|
-
const {
|
|
121
|
-
const {
|
|
122
|
-
const {
|
|
123
|
-
const {
|
|
124
|
-
const {
|
|
125
|
-
const {
|
|
126
|
-
const {
|
|
127
|
-
const {
|
|
128
|
-
const {
|
|
129
|
-
const {
|
|
130
|
-
const {
|
|
131
|
-
const {
|
|
132
|
-
const {
|
|
133
|
-
const {
|
|
134
|
-
const {
|
|
135
|
-
const {
|
|
136
|
-
const {
|
|
137
|
-
const {
|
|
138
|
-
const {
|
|
139
|
-
const {
|
|
140
|
-
const {
|
|
141
|
-
const {
|
|
142
|
-
const {
|
|
143
|
-
const {
|
|
144
|
-
const {
|
|
145
|
-
const {
|
|
146
|
-
const {
|
|
147
|
-
const {
|
|
148
|
-
const {
|
|
149
|
-
const {
|
|
150
|
-
const {
|
|
151
|
-
const {
|
|
152
|
-
const {
|
|
153
|
-
const {
|
|
154
|
-
const {
|
|
155
|
-
const {
|
|
156
|
-
const {
|
|
157
|
-
const {
|
|
158
|
-
const {
|
|
1
|
+
const { addAdvertisedFeature } = require('./peers');
|
|
2
|
+
const { addExternalSocket } = require('./peers');
|
|
3
|
+
const { addPeer } = require('./peers');
|
|
4
|
+
const { beginGroupSigningSession } = require('./signer');
|
|
5
|
+
const { broadcastChainTransaction } = require('./onchain');
|
|
6
|
+
const { cancelHodlInvoice } = require('./invoices');
|
|
7
|
+
const { cancelPendingChannel } = require('./onchain');
|
|
8
|
+
const { changePassword } = require('./unauthenticated');
|
|
9
|
+
const { closeChannel } = require('./onchain');
|
|
10
|
+
const { connectWatchtower } = require('./offchain');
|
|
11
|
+
const { createChainAddress } = require('./address');
|
|
12
|
+
const { createFundedPsbt } = require('./onchain');
|
|
13
|
+
const { createHodlInvoice } = require('./invoices');
|
|
14
|
+
const { createInvoice } = require('./invoices');
|
|
15
|
+
const { createSeed } = require('./unauthenticated');
|
|
16
|
+
const { createWallet } = require('./unauthenticated');
|
|
17
|
+
const { decodePaymentRequest } = require('./offchain');
|
|
18
|
+
const { deleteChainTransaction } = require('./onchain');
|
|
19
|
+
const { deleteFailedPayAttempts } = require('./offchain');
|
|
20
|
+
const { deleteFailedPayments } = require('./offchain');
|
|
21
|
+
const { deleteForwardingReputations } = require('./offchain');
|
|
22
|
+
const { deletePayment } = require('./offchain');
|
|
23
|
+
const { deletePayments } = require('./offchain');
|
|
24
|
+
const { deletePendingChannel } = require('./offchain');
|
|
25
|
+
const { diffieHellmanComputeSecret } = require('./signer');
|
|
26
|
+
const { disableChannel } = require('./offchain');
|
|
27
|
+
const { disconnectWatchtower } = require('./offchain');
|
|
28
|
+
const { enableChannel } = require('./offchain');
|
|
29
|
+
const { endGroupSigningSession } = require('./signer');
|
|
30
|
+
const { fundPendingChannels } = require('./onchain');
|
|
31
|
+
const { fundPsbt } = require('./onchain');
|
|
32
|
+
const { getAccessIds } = require('./macaroon');
|
|
33
|
+
const { getAutopilot } = require('./info');
|
|
34
|
+
const { getBackup } = require('./offchain');
|
|
35
|
+
const { getBackups } = require('./offchain');
|
|
36
|
+
const { getBlock } = require('./onchain');
|
|
37
|
+
const { getBlockHeader } = require('./onchain');
|
|
38
|
+
const { getChainAddresses } = require('./onchain');
|
|
39
|
+
const { getChainBalance } = require('./onchain');
|
|
40
|
+
const { getChainFeeEstimate } = require('./onchain');
|
|
41
|
+
const { getChainFeeRate } = require('./onchain');
|
|
42
|
+
const { getChainTransaction } = require('./onchain');
|
|
43
|
+
const { getChainTransactions } = require('./onchain');
|
|
44
|
+
const { getChannel } = require('./info');
|
|
45
|
+
const { getChannelBalance } = require('./offchain');
|
|
46
|
+
const { getChannels } = require('./offchain');
|
|
47
|
+
const { getClosedChannels } = require('./offchain');
|
|
48
|
+
const { getConfiguration } = require('./info');
|
|
49
|
+
const { getConnectedWatchtowers } = require('./offchain');
|
|
50
|
+
const { getEphemeralChannelIds } = require('./offchain');
|
|
51
|
+
const { getFailedPayments } = require('./offchain');
|
|
52
|
+
const { getFeeRates } = require('./offchain');
|
|
53
|
+
const { getForwardingConfidence } = require('./offchain');
|
|
54
|
+
const { getForwardingReputations } = require('./offchain');
|
|
55
|
+
const { getForwards } = require('./offchain');
|
|
56
|
+
const { getHeight } = require('./generic');
|
|
57
|
+
const { getIdentity } = require('./info');
|
|
58
|
+
const { getInvoice } = require('./invoices');
|
|
59
|
+
const { getInvoices } = require('./invoices');
|
|
60
|
+
const { getLockedUtxos } = require('./onchain');
|
|
61
|
+
const { getMasterPublicKeys } = require('./onchain');
|
|
62
|
+
const { getMethods } = require('./info');
|
|
63
|
+
const { getMinimumRelayFee } = require('./onchain');
|
|
64
|
+
const { getNetworkCentrality } = require('./info');
|
|
65
|
+
const { getNetworkGraph } = require('./info');
|
|
66
|
+
const { getNetworkInfo } = require('./info');
|
|
67
|
+
const { getNode } = require('./info');
|
|
68
|
+
const { getPathfindingSettings } = require('./offchain');
|
|
69
|
+
const { getPayment } = require('./offchain');
|
|
70
|
+
const { getPayments } = require('./offchain');
|
|
71
|
+
const { getPeers } = require('./peers');
|
|
72
|
+
const { getPendingChainBalance } = require('./onchain');
|
|
73
|
+
const { getPendingChannels } = require('./offchain');
|
|
74
|
+
const { getPendingPayments } = require('./offchain');
|
|
75
|
+
const { getPendingSweeps } = require('./onchain');
|
|
76
|
+
const { getPublicKey } = require('./address');
|
|
77
|
+
const { getRouteConfidence } = require('./generic');
|
|
78
|
+
const { getRouteThroughHops } = require('./offchain');
|
|
79
|
+
const { getRouteToDestination } = require('./info');
|
|
80
|
+
const { getSettlementStatus } = require('./offchain');
|
|
81
|
+
const { getSweepTransactions } = require('./onchain');
|
|
82
|
+
const { getTowerServerInfo } = require('./info');
|
|
83
|
+
const { getUtxos } = require('./onchain');
|
|
84
|
+
const { getWalletInfo } = require('./info');
|
|
85
|
+
const { getWalletStatus } = require('./unauthenticated');
|
|
86
|
+
const { getWalletVersion } = require('./info');
|
|
87
|
+
const { grantAccess } = require('./macaroon');
|
|
88
|
+
const { isDestinationPayable } = require('./offchain');
|
|
89
|
+
const { lockUtxo } = require('./onchain');
|
|
90
|
+
const { openChannel } = require('./onchain');
|
|
91
|
+
const { openChannels } = require('./onchain');
|
|
92
|
+
const { partiallySignPsbt } = require('./onchain');
|
|
93
|
+
const { pay } = require('./offchain');
|
|
94
|
+
const { payTaprootInvoice } = require('./offchain');
|
|
95
|
+
const { payViaPaymentDetails } = require('./offchain');
|
|
96
|
+
const { payViaPaymentRequest } = require('./offchain');
|
|
97
|
+
const { payViaRequest } = require('./offchain');
|
|
98
|
+
const { payViaRoutes } = require('./offchain');
|
|
99
|
+
const { prepareForChannelProposal } = require('./onchain');
|
|
100
|
+
const { probeForRoute } = require('./offchain');
|
|
101
|
+
const { proposeChannel } = require('./onchain');
|
|
102
|
+
const { recoverFundsFromChannel } = require('./offchain');
|
|
103
|
+
const { recoverFundsFromChannels } = require('./offchain');
|
|
104
|
+
const { removeAdvertisedFeature } = require('./peers');
|
|
105
|
+
const { removeExternalSocket } = require('./peers');
|
|
106
|
+
const { removePeer } = require('./peers');
|
|
107
|
+
const { requestBatchedFeeIncrease } = require('./onchain');
|
|
108
|
+
const { requestChainFeeIncrease } = require('./onchain');
|
|
109
|
+
const { revokeAccess } = require('./macaroon');
|
|
110
|
+
const { sendMessageToPeer } = require('./offchain');
|
|
111
|
+
const { sendToChainAddress } = require('./onchain');
|
|
112
|
+
const { sendToChainAddresses } = require('./onchain');
|
|
113
|
+
const { sendToChainOutputScripts } = require('./onchain');
|
|
114
|
+
const { setAutopilot } = require('./onchain');
|
|
115
|
+
const { settleHodlInvoice } = require('./invoices');
|
|
116
|
+
const { signBytes } = require('./signer');
|
|
117
|
+
const { signChainAddressMessage } = require('./onchain');
|
|
118
|
+
const { signMessage } = require('./message');
|
|
119
|
+
const { signPsbt } = require('./onchain');
|
|
120
|
+
const { signTransaction } = require('./signer');
|
|
121
|
+
const { stopDaemon } = require('./info');
|
|
122
|
+
const { subscribeToBackups } = require('./offchain');
|
|
123
|
+
const { subscribeToBlocks } = require('./onchain');
|
|
124
|
+
const { subscribeToChainAddress } = require('./onchain');
|
|
125
|
+
const { subscribeToChainSpend } = require('./onchain');
|
|
126
|
+
const { subscribeToChannels } = require('./offchain');
|
|
127
|
+
const { subscribeToForwardRequests } = require('./offchain');
|
|
128
|
+
const { subscribeToForwards } = require('./offchain');
|
|
129
|
+
const { subscribeToGraph } = require('./info');
|
|
130
|
+
const { subscribeToInvoice } = require('./invoices');
|
|
131
|
+
const { subscribeToInvoices } = require('./invoices');
|
|
132
|
+
const { subscribeToOpenRequests } = require('./offchain');
|
|
133
|
+
const { subscribeToPastPayment } = require('./offchain');
|
|
134
|
+
const { subscribeToPastPayments } = require('./offchain');
|
|
135
|
+
const { subscribeToPayViaDetails } = require('./offchain');
|
|
136
|
+
const { subscribeToPayViaRequest } = require('./offchain');
|
|
137
|
+
const { subscribeToPayViaRoutes } = require('./offchain');
|
|
138
|
+
const { subscribeToPayments } = require('./offchain');
|
|
139
|
+
const { subscribeToPeerMessages } = require('./offchain');
|
|
140
|
+
const { subscribeToPeers } = require('./peers');
|
|
141
|
+
const { subscribeToProbeForRoute } = require('./offchain');
|
|
142
|
+
const { subscribeToRpcRequests } = require('./macaroon');
|
|
143
|
+
const { subscribeToTransactions } = require('./onchain');
|
|
144
|
+
const { subscribeToWalletStatus } = require('./unauthenticated');
|
|
145
|
+
const { unlockUtxo } = require('./onchain');
|
|
146
|
+
const { unlockWallet } = require('./unauthenticated');
|
|
147
|
+
const { updateAlias } = require('./peers');
|
|
148
|
+
const { updateChainTransaction } = require('./onchain');
|
|
149
|
+
const { updateColor } = require('./peers');
|
|
150
|
+
const { updateConnectedWatchtower } = require('./offchain');
|
|
151
|
+
const { updateGroupSigningSession } = require('./signer');
|
|
152
|
+
const { updatePathfindingSettings } = require('./offchain');
|
|
153
|
+
const { updateRoutingFees } = require('./offchain');
|
|
154
|
+
const { verifyAccess } = require('./macaroon');
|
|
155
|
+
const { verifyBackup } = require('./offchain');
|
|
156
|
+
const { verifyBackups } = require('./offchain');
|
|
157
|
+
const { verifyBytesSignature } = require('./signer');
|
|
158
|
+
const { verifyChainAddressMessage } = require('./onchain');
|
|
159
|
+
const { verifyMessage } = require('./message');
|
|
159
160
|
|
|
160
161
|
module.exports = {
|
|
161
162
|
addAdvertisedFeature,
|
|
@@ -251,6 +252,7 @@ module.exports = {
|
|
|
251
252
|
openChannels,
|
|
252
253
|
partiallySignPsbt,
|
|
253
254
|
pay,
|
|
255
|
+
payTaprootInvoice,
|
|
254
256
|
payViaPaymentDetails,
|
|
255
257
|
payViaPaymentRequest,
|
|
256
258
|
payViaRequest,
|
|
@@ -1,57 +1,58 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
28
|
-
export * from
|
|
29
|
-
export * from
|
|
30
|
-
export * from
|
|
31
|
-
export * from
|
|
32
|
-
export * from
|
|
33
|
-
export * from
|
|
34
|
-
export * from
|
|
35
|
-
export * from
|
|
36
|
-
export * from
|
|
37
|
-
export * from
|
|
38
|
-
export * from
|
|
39
|
-
export * from
|
|
40
|
-
export * from
|
|
41
|
-
export * from
|
|
42
|
-
export * from
|
|
43
|
-
export * from
|
|
44
|
-
export * from
|
|
45
|
-
export * from
|
|
46
|
-
export * from
|
|
47
|
-
export * from
|
|
48
|
-
export * from
|
|
49
|
-
export * from
|
|
50
|
-
export * from
|
|
51
|
-
export * from
|
|
52
|
-
export * from
|
|
53
|
-
export * from
|
|
54
|
-
export * from
|
|
55
|
-
export * from
|
|
56
|
-
export * from
|
|
57
|
-
export * from
|
|
1
|
+
export * from "./connect_watchtower";
|
|
2
|
+
export * from "./decode_payment_request";
|
|
3
|
+
export * from "./delete_failed_pay_attempts";
|
|
4
|
+
export * from "./delete_failed_payments";
|
|
5
|
+
export * from "./delete_forwarding_reputations";
|
|
6
|
+
export * from "./delete_payment";
|
|
7
|
+
export * from "./delete_payments";
|
|
8
|
+
export * from "./delete_pending_channel";
|
|
9
|
+
export * from "./disable_channel";
|
|
10
|
+
export * from "./disconnect_watchtower";
|
|
11
|
+
export * from "./enable_channel";
|
|
12
|
+
export * from "./get_backup";
|
|
13
|
+
export * from "./get_backups";
|
|
14
|
+
export * from "./get_channel_balance";
|
|
15
|
+
export * from "./get_channels";
|
|
16
|
+
export * from "./get_closed_channels";
|
|
17
|
+
export * from "./get_connected_watchtowers";
|
|
18
|
+
export * from "./get_ephemeral_channel_ids";
|
|
19
|
+
export * from "./get_failed_payments";
|
|
20
|
+
export * from "./get_fee_rates";
|
|
21
|
+
export * from "./get_forwarding_confidence";
|
|
22
|
+
export * from "./get_forwarding_reputations";
|
|
23
|
+
export * from "./get_forwards";
|
|
24
|
+
export * from "./get_pathfinding_settings";
|
|
25
|
+
export * from "./get_payment";
|
|
26
|
+
export * from "./get_payments";
|
|
27
|
+
export * from "./get_pending_channels";
|
|
28
|
+
export * from "./get_pending_payments";
|
|
29
|
+
export * from "./get_route_through_hops";
|
|
30
|
+
export * from "./get_settlement_status";
|
|
31
|
+
export * from "./is_destination_payable";
|
|
32
|
+
export * from "./pay_via_payment_details";
|
|
33
|
+
export * from "./pay_via_payment_request";
|
|
34
|
+
export * from "./pay_via_routes";
|
|
35
|
+
export * from "./pay";
|
|
36
|
+
export * from "./pay_taproot_invoice";
|
|
37
|
+
export * from "./probe_for_route";
|
|
38
|
+
export * from "./recover_funds_from_channel";
|
|
39
|
+
export * from "./recover_funds_from_channels";
|
|
40
|
+
export * from "./send_message_to_peer";
|
|
41
|
+
export * from "./subscribe_to_backups";
|
|
42
|
+
export * from "./subscribe_to_channels";
|
|
43
|
+
export * from "./subscribe_to_forward_requests";
|
|
44
|
+
export * from "./subscribe_to_forwards";
|
|
45
|
+
export * from "./subscribe_to_open_requests";
|
|
46
|
+
export * from "./subscribe_to_past_payment";
|
|
47
|
+
export * from "./subscribe_to_past_payments";
|
|
48
|
+
export * from "./subscribe_to_pay_via_details";
|
|
49
|
+
export * from "./subscribe_to_pay_via_request";
|
|
50
|
+
export * from "./subscribe_to_pay_via_routes";
|
|
51
|
+
export * from "./subscribe_to_payments";
|
|
52
|
+
export * from "./subscribe_to_peer_messages";
|
|
53
|
+
export * from "./subscribe_to_probe_for_route";
|
|
54
|
+
export * from "./update_connected_watchtower";
|
|
55
|
+
export * from "./update_pathfinding_settings";
|
|
56
|
+
export * from "./update_routing_fees";
|
|
57
|
+
export * from "./verify_backup";
|
|
58
|
+
export * from "./verify_backups";
|
|
@@ -30,6 +30,7 @@ const getRouteThroughHops = require('./get_route_through_hops');
|
|
|
30
30
|
const getSettlementStatus = require('./get_settlement_status');
|
|
31
31
|
const isDestinationPayable = require('./is_destination_payable');
|
|
32
32
|
const pay = require('./pay');
|
|
33
|
+
const payTaprootInvoice = require('./pay_taproot_invoice');
|
|
33
34
|
const payViaPaymentDetails = require('./pay_via_payment_details');
|
|
34
35
|
const payViaPaymentRequest = require('./pay_via_payment_request');
|
|
35
36
|
const payViaRoutes = require('./pay_via_routes');
|
|
@@ -89,6 +90,7 @@ module.exports = {
|
|
|
89
90
|
getSettlementStatus,
|
|
90
91
|
isDestinationPayable,
|
|
91
92
|
pay,
|
|
93
|
+
payTaprootInvoice,
|
|
92
94
|
payViaPaymentDetails,
|
|
93
95
|
payViaPaymentRequest,
|
|
94
96
|
payViaRoutes,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AuthenticatedLightningArgs,
|
|
3
|
+
AuthenticatedLightningMethod,
|
|
4
|
+
} from "../../typescript";
|
|
5
|
+
export type PaymentTaprootInvoiceArgs = AuthenticatedLightningArgs<{
|
|
6
|
+
tpr: any;
|
|
7
|
+
asset_id: string;
|
|
8
|
+
asset_amount: number;
|
|
9
|
+
peer_pubkey: string;
|
|
10
|
+
payment_request: {
|
|
11
|
+
payment_request: string;
|
|
12
|
+
fee_limit_sat: number;
|
|
13
|
+
allow_self_payment: boolean;
|
|
14
|
+
};
|
|
15
|
+
}>;
|
|
16
|
+
|
|
17
|
+
export type PaymentTaprootInvoiceResult = any;
|
|
18
|
+
|
|
19
|
+
export const payTaprootInvoice: AuthenticatedLightningMethod<
|
|
20
|
+
PaymentTaprootInvoiceArgs,
|
|
21
|
+
PaymentTaprootInvoiceResult
|
|
22
|
+
>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
const hexAsBuffer = (hex) => (!!hex ? Buffer.from(hex, "hex") : undefined);
|
|
2
|
+
|
|
3
|
+
function convertBuffers(obj, key) {
|
|
4
|
+
if (Array.isArray(obj)) {
|
|
5
|
+
return obj.map(convertBuffers);
|
|
6
|
+
} else if (typeof obj === "object" && obj) {
|
|
7
|
+
if (Buffer.isBuffer(obj)) {
|
|
8
|
+
const buffer = Buffer.from(obj);
|
|
9
|
+
return buffer.toString("hex");
|
|
10
|
+
} else {
|
|
11
|
+
const result = {};
|
|
12
|
+
Object.keys(obj).forEach((key) => {
|
|
13
|
+
result[key] = convertBuffers(obj[key], key);
|
|
14
|
+
});
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
} else {
|
|
19
|
+
return obj;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
module.exports = (args) => {
|
|
24
|
+
return new Promise((resolve, reject) => {
|
|
25
|
+
if (!args.tpr) {
|
|
26
|
+
reject(new Error('ExpectedAuthenticatedLndToMakePayment'));
|
|
27
|
+
}
|
|
28
|
+
if (!args.asset_id) {
|
|
29
|
+
reject(new Error('ExpectedAssetIdToMakePayment'));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (!args.asset_amount) {
|
|
33
|
+
reject(new Error('ExpectedAssetAmountToMakePayment'));
|
|
34
|
+
}
|
|
35
|
+
if (!args.peer_pubkey) {
|
|
36
|
+
reject(new Error('ExpectedPeerPubkeyToMakePayment'));
|
|
37
|
+
}
|
|
38
|
+
if (!args.payment_request) {
|
|
39
|
+
reject(new Error('ExpectedPaymentRequestToMakePayment'));
|
|
40
|
+
}
|
|
41
|
+
const callRequest = {
|
|
42
|
+
asset_id: hexAsBuffer(args.asset_id),
|
|
43
|
+
asset_amount: args.asset_amount,
|
|
44
|
+
peer_pubkey: hexAsBuffer(args.peer_pubkey),
|
|
45
|
+
payment_request: args.payment_request,
|
|
46
|
+
}
|
|
47
|
+
const sub = args.tpr.taproot_asset_channels.sendPayment(callRequest);
|
|
48
|
+
const ret = {
|
|
49
|
+
payment_result: null,
|
|
50
|
+
failure_reason: null,
|
|
51
|
+
assepted_sell_order: null,
|
|
52
|
+
}
|
|
53
|
+
sub.on('data', response => {
|
|
54
|
+
if (response?.accepted_sell_order) {
|
|
55
|
+
ret.assepted_sell_order = response.accepted_sell_order
|
|
56
|
+
}
|
|
57
|
+
if (response?.payment_result) {
|
|
58
|
+
ret.payment_result = response?.payment_result;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
});
|
|
62
|
+
sub.on("status", function (status) {
|
|
63
|
+
if (status == 6) {
|
|
64
|
+
ret.failure_reason = status.details;
|
|
65
|
+
reject(new Error(status?.details))
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
sub.on('error', err => {
|
|
69
|
+
if (err?.details.indexOf("EOF") === -1) {
|
|
70
|
+
ret.failure_reason = err?.details;
|
|
71
|
+
reject(new Error(err?.details))
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
sub.on('end', () => {
|
|
75
|
+
sub.removeAllListeners();
|
|
76
|
+
resolve(convertBuffers(ret))
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
});
|
|
80
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const {chanFormat} = require('bolt07');
|
|
1
|
+
const { chanFormat } = require('bolt07');
|
|
2
2
|
|
|
3
|
-
const {channelTypes} = require('./constants');
|
|
3
|
+
const { channelTypes } = require('./constants');
|
|
4
4
|
const parseThawHeight = require('./parse_thaw_height');
|
|
5
5
|
const rpcHtlcAsPayment = require('./rpc_htlc_as_payment');
|
|
6
6
|
|
|
7
|
-
const {isArray} = Array;
|
|
7
|
+
const { isArray } = Array;
|
|
8
8
|
const msPerSec = 1e3;
|
|
9
9
|
const outpointDelimiter = ':';
|
|
10
10
|
|
|
@@ -218,7 +218,7 @@ module.exports = args => {
|
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
const commitWeight = Number(args.commit_weight);
|
|
221
|
-
const {height} = parseThawHeight({id: args.chan_id, thaw: args.thaw_height});
|
|
221
|
+
const { height } = parseThawHeight({ id: args.chan_id, thaw: args.thaw_height });
|
|
222
222
|
const own = args.local_constraints;
|
|
223
223
|
const peer = args.remote_constraints;
|
|
224
224
|
const pushAmount = Number(args.push_amount_sat) || Number();
|
|
@@ -231,7 +231,11 @@ module.exports = args => {
|
|
|
231
231
|
|
|
232
232
|
const otherIds = args.alias_scids
|
|
233
233
|
.filter(n => n !== channelId)
|
|
234
|
-
.map(number => chanFormat({number}));
|
|
234
|
+
.map(number => chanFormat({ number }));
|
|
235
|
+
|
|
236
|
+
const customChannelData = args.custom_channel_data ?
|
|
237
|
+
Buffer.from(args.custom_channel_data, "hex").toString("utf-8")
|
|
238
|
+
: ""
|
|
235
239
|
|
|
236
240
|
return {
|
|
237
241
|
capacity: Number(args.capacity),
|
|
@@ -240,7 +244,8 @@ module.exports = args => {
|
|
|
240
244
|
cooperative_close_address: args.close_address || undefined,
|
|
241
245
|
cooperative_close_delay_height: height,
|
|
242
246
|
description: args.memo || undefined,
|
|
243
|
-
id: chanFormat({number: channelId}).channel,
|
|
247
|
+
id: chanFormat({ number: channelId }).channel,
|
|
248
|
+
channel_id: channelId,
|
|
244
249
|
is_active: args.active,
|
|
245
250
|
is_closing: false,
|
|
246
251
|
is_opening: false,
|
|
@@ -275,5 +280,6 @@ module.exports = args => {
|
|
|
275
280
|
transaction_vout: Number(vout),
|
|
276
281
|
type: channelTypes[args.commitment_type],
|
|
277
282
|
unsettled_balance: Number(args.unsettled_balance),
|
|
283
|
+
custom_channel_data: customChannelData,
|
|
278
284
|
};
|
|
279
285
|
};
|
package/package.json
CHANGED