3
3
4
4
/* auto-generated by NAPI-RS */
5
5
6
- export interface PhoenixdConfig {
7
- url : string
8
- password : string
9
- socks5Proxy ?: string
10
- acceptInvalidCerts ?: boolean
11
- httpTimeout ?: number
12
- }
13
- export interface PhoenixdNode {
14
- config : PhoenixdConfig
15
- }
16
- export interface Bolt11Resp {
17
- amountSat : number
18
- paymentHash : string
19
- serialized : string
20
- }
21
- export interface PhoenixPayInvoiceResp {
22
- amountSat : number
23
- routingFeeSat : number
24
- paymentId : string
25
- paymentHash : string
26
- preimage : string
27
- }
28
- export interface ClnConfig {
29
- url : string
30
- rune : string
31
- socks5Proxy ?: string
32
- acceptInvalidCerts ?: boolean
33
- httpTimeout ?: number
34
- }
35
- export interface ClnNode {
36
- config : ClnConfig
37
- }
38
- export interface LndConfig {
39
- url : string
40
- macaroon : string
41
- socks5Proxy ?: string
42
- acceptInvalidCerts ?: boolean
43
- httpTimeout ?: number
44
- }
45
- export interface LndNode {
46
- config : LndConfig
47
- }
48
- export const enum InvoiceType {
49
- Bolt11 = 'Bolt11' ,
50
- Bolt12 = 'Bolt12'
51
- }
52
- export interface TlvRecord {
53
- type : number
54
- value : string
55
- }
56
- export interface NodeInfo {
57
- alias : string
58
- color : string
59
- pubkey : string
60
- network : string
61
- blockHeight : number
62
- blockHash : string
63
- sendBalanceMsat : number
64
- receiveBalanceMsat : number
65
- feeCreditBalanceMsat : number
66
- unsettledSendBalanceMsat : number
67
- unsettledReceiveBalanceMsat : number
68
- pendingOpenSendBalance : number
69
- pendingOpenReceiveBalance : number
70
- }
71
- export interface Transaction {
72
- type : string
73
- invoice : string
74
- description : string
75
- descriptionHash : string
76
- preimage : string
77
- paymentHash : string
78
- amountMsats : number
79
- feesPaid : number
80
- createdAt : number
81
- expiresAt : number
82
- settledAt : number
83
- payerNote ?: string
84
- externalId ?: string
85
- }
86
- export interface NodeConnectionInfo {
87
- pubkey : string
88
- address : string
89
- port : number
90
- }
91
- export interface Channel {
92
- localBalance : number
93
- localSpendableBalance : number
94
- remoteBalance : number
95
- id : string
96
- remotePubkey : string
97
- fundingTxId : string
98
- fundingTxVout : number
99
- active : boolean
100
- public : boolean
101
- internalChannel : string
102
- confirmations : number
103
- confirmationsRequired : number
104
- forwardingFeeBaseMsat : number
105
- unspendablePunishmentReserve : number
106
- counterpartyUnspendablePunishmentReserve : number
107
- error : string
108
- isOutbound : boolean
109
- }
110
- export interface NodeStatus {
111
- isReady : boolean
112
- internalNodeStatus : string
113
- }
114
- export interface ConnectPeerRequest {
115
- pubkey : string
116
- address : string
117
- port : number
118
- }
119
- export interface OpenChannelRequest {
120
- pubkey : string
121
- amountMsats : number
122
- public : boolean
123
- }
124
- export interface OpenChannelResponse {
125
- fundingTxId : string
126
- }
127
- export interface CloseChannelRequest {
128
- channelId : string
129
- nodeId : string
130
- force : boolean
131
- }
132
- export interface UpdateChannelRequest {
133
- channelId : string
134
- nodeId : string
135
- forwardingFeeBaseMsat : number
136
- maxDustHtlcExposureFromFeeRateMultiplier : number
137
- }
138
- export interface CloseChannelResponse {
139
-
140
- }
141
- export interface PendingBalanceDetails {
142
- channelId : string
143
- nodeId : string
144
- amountMsats : number
145
- fundingTxId : string
146
- fundingTxVout : number
147
- }
148
- export interface OnchainBalanceResponse {
149
- spendable : number
150
- total : number
151
- reserved : number
152
- pendingBalancesFromChannelClosures : number
153
- pendingBalancesDetails : Array < PendingBalanceDetails >
154
- internalBalances : string
155
- }
156
- export interface PeerDetails {
157
- nodeId : string
158
- address : string
159
- isPersisted : boolean
160
- isConnected : boolean
161
- }
162
- export interface LightningBalanceResponse {
163
- totalSpendable : number
164
- totalReceivable : number
165
- nextMaxSpendable : number
166
- nextMaxReceivable : number
167
- nextMaxSpendableMpp : number
168
- nextMaxReceivableMpp : number
169
- }
170
- export interface PayInvoiceResponse {
171
- paymentHash : string
172
- preimage : string
173
- feeMsats : number
174
- }
175
- export interface PayKeysendResponse {
176
- fee : number
177
- }
178
- export interface BalancesResponse {
179
- onchain : OnchainBalanceResponse
180
- lightning : LightningBalanceResponse
181
- }
182
- export interface PaymentFailedEventProperties {
183
- transaction : Transaction
184
- reason : string
185
- }
186
- export interface ListTransactionsParams {
187
- from : number
188
- limit : number
189
- paymentHash ?: string
190
- }
191
- export interface CreateInvoiceParams {
192
- invoiceType : InvoiceType
193
- amountMsats ?: number
194
- offer ?: string
195
- description ?: string
196
- descriptionHash ?: string
197
- expiry ?: number
198
- rPreimage ?: string
199
- isBlinded ?: boolean
200
- isKeysend ?: boolean
201
- isAmp ?: boolean
202
- isPrivate ?: boolean
203
- }
204
- export interface PayCode {
205
- offerId : string
206
- bolt12 : string
207
- label ?: string
208
- active ?: boolean
209
- singleUse ?: boolean
210
- used ?: boolean
211
- }
212
- export interface PayInvoiceParams {
213
- invoice : string
214
- feeLimitMsat ?: number
215
- feeLimitPercentage ?: number
216
- timeoutSeconds ?: number
217
- amountMsats ?: number
218
- maxParts ?: number
219
- firstHopPubkey ?: string
220
- lastHopPubkey ?: string
221
- allowSelfPayment ?: boolean
222
- isAmp ?: boolean
223
- }
224
- export interface OnInvoiceEventParams {
225
- paymentHash : string
226
- pollingDelaySec : number
227
- maxPollingSec : number
228
- }
229
- export interface Payment {
230
- paymentId : string
231
- circId : string
232
- round : number
233
- relayFingerprint : string
234
- updatedAt : number
235
- amountMsats : number
236
- }
237
6
export declare class PhoenixdNode {
238
7
constructor ( config : PhoenixdConfig )
239
8
getUrl ( ) : string
@@ -243,7 +12,7 @@ export declare class PhoenixdNode {
243
12
createInvoice ( params : CreateInvoiceParams ) : Transaction
244
13
payInvoice ( params : PayInvoiceParams ) : PayInvoiceResponse
245
14
getOffer ( ) : PayCode
246
- lookupInvoice ( paymentHash : string ) : Transaction
15
+ lookupInvoice ( params : LookupInvoiceParams ) : Transaction
247
16
payOffer ( offer : string , amountMsats : number , payerNote ?: string | undefined | null ) : PayInvoiceResponse
248
17
listTransactions ( params : ListTransactionsParams ) : Array < Transaction >
249
18
onInvoiceEvents ( params : OnInvoiceEventParams , callback : ( arg0 : string , arg1 ?: Transaction | undefined | null ) => void ) : void
@@ -259,7 +28,7 @@ export declare class ClnNode {
259
28
getOffer ( search ?: string | undefined | null ) : PayCode
260
29
listOffers ( search ?: string | undefined | null ) : Array < PayCode >
261
30
payOffer ( offer : string , amountMsats : number , payerNote ?: string | undefined | null ) : PayInvoiceResponse
262
- lookupInvoice ( paymentHash : string ) : Transaction
31
+ lookupInvoice ( params : LookupInvoiceParams ) : Transaction
263
32
listTransactions ( params : ListTransactionsParams ) : Array < Transaction >
264
33
decode ( str : string ) : string
265
34
onInvoiceEvents ( params : OnInvoiceEventParams , callback : ( arg0 : string , arg1 ?: Transaction | undefined | null ) => void ) : void
@@ -275,7 +44,7 @@ export declare class LndNode {
275
44
getOffer ( search ?: string | undefined | null ) : PayCode
276
45
listOffers ( search ?: string | undefined | null ) : Array < PayCode >
277
46
payOffer ( offer : string , amountMsats : number , payerNote ?: string | undefined | null ) : PayInvoiceResponse
278
- lookupInvoice ( paymentHash : string ) : Transaction
47
+ lookupInvoice ( params : LookupInvoiceParams ) : Transaction
279
48
listTransactions ( params : ListTransactionsParams ) : Array < Transaction >
280
49
decode ( str : string ) : string
281
50
onInvoiceEvents ( params : OnInvoiceEventParams , callback : ( arg0 : string , arg1 ?: Transaction | undefined | null ) => void ) : void
0 commit comments