beignet 0.2.0 → 0.3.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/README.md +284 -1
- package/dist/cli/beignet-node.js +1019 -47
- package/dist/cli/beignet-node.js.map +1 -1
- package/dist/cli/cli.js +1201 -16
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/config.js +21 -1
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/daemon.js +342 -16
- package/dist/cli/daemon.js.map +1 -1
- package/dist/cli/errors.js +2 -0
- package/dist/cli/errors.js.map +1 -1
- package/dist/cli/openapi.js +1207 -14
- package/dist/cli/openapi.js.map +1 -1
- package/dist/cli/restore.js +89 -0
- package/dist/cli/restore.js.map +1 -0
- package/dist/cli/wallet-storage.js +34 -0
- package/dist/cli/wallet-storage.js.map +1 -0
- package/dist/electrum/index.js +105 -10
- package/dist/electrum/index.js.map +1 -1
- package/dist/lightning/advisor/fee-tuner.js +42 -0
- package/dist/lightning/advisor/fee-tuner.js.map +1 -0
- package/dist/lightning/advisor/index.js +9 -1
- package/dist/lightning/advisor/index.js.map +1 -1
- package/dist/lightning/advisor/rebalance-planner.js +55 -0
- package/dist/lightning/advisor/rebalance-planner.js.map +1 -0
- package/dist/lightning/backup/index.js +18 -0
- package/dist/lightning/backup/index.js.map +1 -0
- package/dist/lightning/backup/scb.js +42 -0
- package/dist/lightning/backup/scb.js.map +1 -0
- package/dist/lightning/chain/chain-monitor.js +27 -0
- package/dist/lightning/chain/chain-monitor.js.map +1 -1
- package/dist/lightning/chain/output-resolver.js +55 -6
- package/dist/lightning/chain/output-resolver.js.map +1 -1
- package/dist/lightning/chain/types.js +1 -0
- package/dist/lightning/chain/types.js.map +1 -1
- package/dist/lightning/channel/channel-manager.js +64 -0
- package/dist/lightning/channel/channel-manager.js.map +1 -1
- package/dist/lightning/channel/channel-state.js.map +1 -1
- package/dist/lightning/channel/channel.js +124 -4
- package/dist/lightning/channel/channel.js.map +1 -1
- package/dist/lightning/channel/dual-funding.js +6 -5
- package/dist/lightning/channel/dual-funding.js.map +1 -1
- package/dist/lightning/channel/types.js +3 -1
- package/dist/lightning/channel/types.js.map +1 -1
- package/dist/lightning/channel/validation.js +3 -3
- package/dist/lightning/channel/validation.js.map +1 -1
- package/dist/lightning/crypto/index.js +1 -0
- package/dist/lightning/crypto/index.js.map +1 -1
- package/dist/lightning/crypto/message-signing.js +116 -0
- package/dist/lightning/crypto/message-signing.js.map +1 -0
- package/dist/lightning/crypto/xchacha20poly1305.js +77 -0
- package/dist/lightning/crypto/xchacha20poly1305.js.map +1 -0
- package/dist/lightning/features/flags.js +1 -0
- package/dist/lightning/features/flags.js.map +1 -1
- package/dist/lightning/gossip/messages.js +37 -1
- package/dist/lightning/gossip/messages.js.map +1 -1
- package/dist/lightning/index.js +2 -1
- package/dist/lightning/index.js.map +1 -1
- package/dist/lightning/keys/wallet-keys.js +1 -0
- package/dist/lightning/keys/wallet-keys.js.map +1 -1
- package/dist/lightning/message/index.js +1 -0
- package/dist/lightning/message/index.js.map +1 -1
- package/dist/lightning/message/peer-storage.js +43 -0
- package/dist/lightning/message/peer-storage.js.map +1 -0
- package/dist/lightning/message/types.js +2 -0
- package/dist/lightning/message/types.js.map +1 -1
- package/dist/lightning/node/lightning-node.js +1583 -235
- package/dist/lightning/node/lightning-node.js.map +1 -1
- package/dist/lightning/node/types.js +18 -1
- package/dist/lightning/node/types.js.map +1 -1
- package/dist/lightning/offer/offer-manager.js +2 -5
- package/dist/lightning/offer/offer-manager.js.map +1 -1
- package/dist/lightning/offer/tlv.js +3 -1
- package/dist/lightning/offer/tlv.js.map +1 -1
- package/dist/lightning/storage/encryption.js +67 -0
- package/dist/lightning/storage/encryption.js.map +1 -0
- package/dist/lightning/storage/index.js +1 -0
- package/dist/lightning/storage/index.js.map +1 -1
- package/dist/lightning/storage/serialization.js +6 -2
- package/dist/lightning/storage/serialization.js.map +1 -1
- package/dist/lightning/storage/sqlite-storage.js +387 -33
- package/dist/lightning/storage/sqlite-storage.js.map +1 -1
- package/dist/lightning/watchtower/blob.js +135 -0
- package/dist/lightning/watchtower/blob.js.map +1 -0
- package/dist/lightning/watchtower/index.js +55 -0
- package/dist/lightning/watchtower/index.js.map +1 -0
- package/dist/lightning/watchtower/justice.js +182 -0
- package/dist/lightning/watchtower/justice.js.map +1 -0
- package/dist/lightning/watchtower/tower-connection.js +208 -0
- package/dist/lightning/watchtower/tower-connection.js.map +1 -0
- package/dist/lightning/watchtower/types.js +3 -0
- package/dist/lightning/watchtower/types.js.map +1 -0
- package/dist/lightning/watchtower/watchtower-client.js +402 -0
- package/dist/lightning/watchtower/watchtower-client.js.map +1 -0
- package/dist/lightning/watchtower/wtwire.js +201 -0
- package/dist/lightning/watchtower/wtwire.js.map +1 -0
- package/dist/shapes/electrum.js +32 -1
- package/dist/shapes/electrum.js.map +1 -1
- package/dist/shapes/wallet.js +11 -1
- package/dist/shapes/wallet.js.map +1 -1
- package/dist/transaction/index.js +163 -15
- package/dist/transaction/index.js.map +1 -1
- package/dist/types/cli/beignet-node.d.ts +144 -3
- package/dist/types/cli/daemon.d.ts +2 -0
- package/dist/types/cli/errors.d.ts +2 -0
- package/dist/types/cli/restore.d.ts +10 -0
- package/dist/types/cli/types.d.ts +228 -1
- package/dist/types/cli/wallet-storage.d.ts +3 -0
- package/dist/types/electrum/index.d.ts +12 -0
- package/dist/types/electrum.js +1 -0
- package/dist/types/electrum.js.map +1 -1
- package/dist/types/lightning/advisor/fee-tuner.d.ts +20 -0
- package/dist/types/lightning/advisor/index.d.ts +4 -0
- package/dist/types/lightning/advisor/rebalance-planner.d.ts +12 -0
- package/dist/types/lightning/backup/index.d.ts +1 -0
- package/dist/types/lightning/backup/scb.d.ts +24 -0
- package/dist/types/lightning/chain/chain-monitor.d.ts +1 -0
- package/dist/types/lightning/chain/types.d.ts +1 -0
- package/dist/types/lightning/channel/channel-manager.d.ts +7 -0
- package/dist/types/lightning/channel/channel-state.d.ts +2 -0
- package/dist/types/lightning/channel/channel.d.ts +6 -0
- package/dist/types/lightning/channel/dual-funding.d.ts +2 -1
- package/dist/types/lightning/channel/types.d.ts +2 -0
- package/dist/types/lightning/channel/validation.d.ts +1 -1
- package/dist/types/lightning/crypto/index.d.ts +1 -0
- package/dist/types/lightning/crypto/message-signing.d.ts +9 -0
- package/dist/types/lightning/crypto/xchacha20poly1305.d.ts +3 -0
- package/dist/types/lightning/features/flags.d.ts +1 -0
- package/dist/types/lightning/gossip/messages.d.ts +4 -0
- package/dist/types/lightning/index.d.ts +1 -0
- package/dist/types/lightning/keys/wallet-keys.d.ts +2 -1
- package/dist/types/lightning/message/index.d.ts +1 -0
- package/dist/types/lightning/message/peer-storage.d.ts +9 -0
- package/dist/types/lightning/message/types.d.ts +2 -0
- package/dist/types/lightning/node/lightning-node.d.ts +116 -4
- package/dist/types/lightning/node/types.d.ts +62 -1
- package/dist/types/lightning/storage/encryption.d.ts +11 -0
- package/dist/types/lightning/storage/index.d.ts +1 -0
- package/dist/types/lightning/storage/serialization.d.ts +2 -0
- package/dist/types/lightning/storage/sqlite-storage.d.ts +43 -3
- package/dist/types/lightning/storage/types.d.ts +62 -0
- package/dist/types/lightning/watchtower/blob.d.ts +32 -0
- package/dist/types/lightning/watchtower/index.d.ts +9 -0
- package/dist/types/lightning/watchtower/justice.d.ts +29 -0
- package/dist/types/lightning/watchtower/tower-connection.d.ts +34 -0
- package/dist/types/lightning/watchtower/types.d.ts +44 -0
- package/dist/types/lightning/watchtower/watchtower-client.d.ts +67 -0
- package/dist/types/lightning/watchtower/wtwire.d.ts +90 -0
- package/dist/types/shapes/electrum.d.ts +3 -1
- package/dist/types/transaction/index.d.ts +6 -0
- package/dist/types/transaction.js.map +1 -1
- package/dist/types/types/electrum.d.ts +3 -2
- package/dist/types/types/transaction.d.ts +1 -1
- package/dist/types/types/wallet.d.ts +78 -4
- package/dist/types/utils/descriptors.d.ts +2 -0
- package/dist/types/utils/fees.d.ts +3 -0
- package/dist/types/utils/helpers.d.ts +3 -1
- package/dist/types/utils/index.d.ts +5 -0
- package/dist/types/utils/multisig.d.ts +29 -0
- package/dist/types/utils/transaction.d.ts +7 -0
- package/dist/types/utils/wallet-storage-encryption.d.ts +3 -0
- package/dist/types/utils/wallet.d.ts +1 -1
- package/dist/types/utils/watch-only.d.ts +12 -0
- package/dist/types/wallet/constants.d.ts +1 -0
- package/dist/types/wallet/index.d.ts +61 -4
- package/dist/types/wallet.js +3 -0
- package/dist/types/wallet.js.map +1 -1
- package/dist/utils/derivation-path.js +8 -7
- package/dist/utils/derivation-path.js.map +1 -1
- package/dist/utils/descriptors.js +56 -0
- package/dist/utils/descriptors.js.map +1 -0
- package/dist/utils/electrum.js +10 -2
- package/dist/utils/electrum.js.map +1 -1
- package/dist/utils/fees.js +19 -0
- package/dist/utils/fees.js.map +1 -0
- package/dist/utils/helpers.js +22 -5
- package/dist/utils/helpers.js.map +1 -1
- package/dist/utils/index.js +5 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/multisig.js +90 -0
- package/dist/utils/multisig.js.map +1 -0
- package/dist/utils/transaction.js +30 -3
- package/dist/utils/transaction.js.map +1 -1
- package/dist/utils/wallet-storage-encryption.js +45 -0
- package/dist/utils/wallet-storage-encryption.js.map +1 -0
- package/dist/utils/wallet.js +3 -1
- package/dist/utils/wallet.js.map +1 -1
- package/dist/utils/watch-only.js +102 -0
- package/dist/utils/watch-only.js.map +1 -0
- package/dist/wallet/constants.js +2 -1
- package/dist/wallet/constants.js.map +1 -1
- package/dist/wallet/index.js +787 -30
- package/dist/wallet/index.js.map +1 -1
- package/docs/ROADMAP.md +292 -0
- package/package.json +1 -1
package/dist/cli/openapi.js
CHANGED
|
@@ -160,6 +160,101 @@ function getOpenApiSpec() {
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
},
|
|
163
|
+
'/forwards': {
|
|
164
|
+
get: {
|
|
165
|
+
summary: 'List settled forwards (fees earned), newest first',
|
|
166
|
+
tags: ['Payments'],
|
|
167
|
+
parameters: [
|
|
168
|
+
{
|
|
169
|
+
name: 'since',
|
|
170
|
+
in: 'query',
|
|
171
|
+
schema: { type: 'integer' },
|
|
172
|
+
description: 'Only events settled at/after this ms timestamp'
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: 'until',
|
|
176
|
+
in: 'query',
|
|
177
|
+
schema: { type: 'integer' },
|
|
178
|
+
description: 'Only events settled at/before this ms timestamp'
|
|
179
|
+
},
|
|
180
|
+
{ name: 'limit', in: 'query', schema: { type: 'integer' } },
|
|
181
|
+
{ name: 'offset', in: 'query', schema: { type: 'integer' } },
|
|
182
|
+
{
|
|
183
|
+
name: 'channelId',
|
|
184
|
+
in: 'query',
|
|
185
|
+
schema: { type: 'string' },
|
|
186
|
+
description: 'Match the inbound OR outbound leg'
|
|
187
|
+
}
|
|
188
|
+
],
|
|
189
|
+
responses: {
|
|
190
|
+
'200': {
|
|
191
|
+
description: 'Forwarding events (msat values as strings)',
|
|
192
|
+
content: jsonContent({
|
|
193
|
+
type: 'array',
|
|
194
|
+
items: { $ref: '#/components/schemas/ForwardingEvent' }
|
|
195
|
+
})
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
'/forwards/summary': {
|
|
201
|
+
get: {
|
|
202
|
+
summary: 'Forwarding totals: count, volume out, fees earned',
|
|
203
|
+
tags: ['Payments'],
|
|
204
|
+
parameters: [
|
|
205
|
+
{
|
|
206
|
+
name: 'since',
|
|
207
|
+
in: 'query',
|
|
208
|
+
schema: { type: 'integer' },
|
|
209
|
+
description: 'Only events settled at/after this ms timestamp'
|
|
210
|
+
}
|
|
211
|
+
],
|
|
212
|
+
responses: {
|
|
213
|
+
'200': {
|
|
214
|
+
description: 'Forwarding summary (msat values as strings)',
|
|
215
|
+
content: jsonContent({
|
|
216
|
+
$ref: '#/components/schemas/ForwardingSummary'
|
|
217
|
+
})
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
'/watchtowers': {
|
|
223
|
+
get: {
|
|
224
|
+
summary: 'List configured watchtowers with per-tower session + backlog health',
|
|
225
|
+
tags: ['Node'],
|
|
226
|
+
responses: {
|
|
227
|
+
'200': {
|
|
228
|
+
description: 'Watchtower health',
|
|
229
|
+
content: jsonContent({
|
|
230
|
+
type: 'object',
|
|
231
|
+
properties: {
|
|
232
|
+
towers: {
|
|
233
|
+
type: 'array',
|
|
234
|
+
items: { $ref: '#/components/schemas/WatchtowerInfo' }
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
})
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
'/watchtower/add': {
|
|
243
|
+
post: {
|
|
244
|
+
summary: 'Add a watchtower (pubkey@host:port, LND altruist tower)',
|
|
245
|
+
tags: ['Node'],
|
|
246
|
+
requestBody: bodyContent({ uri: 'string' }),
|
|
247
|
+
responses: { '200': { description: 'Tower added' } }
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
'/watchtower/remove': {
|
|
251
|
+
delete: {
|
|
252
|
+
summary: 'Remove a watchtower and drop its sessions + backlog',
|
|
253
|
+
tags: ['Node'],
|
|
254
|
+
requestBody: bodyContent({ uri: 'string' }),
|
|
255
|
+
responses: { '200': { description: 'Tower removed' } }
|
|
256
|
+
}
|
|
257
|
+
},
|
|
163
258
|
'/invoices': {
|
|
164
259
|
get: {
|
|
165
260
|
summary: 'List created invoices',
|
|
@@ -193,6 +288,75 @@ function getOpenApiSpec() {
|
|
|
193
288
|
}
|
|
194
289
|
}
|
|
195
290
|
},
|
|
291
|
+
'/invoice/create-hold': {
|
|
292
|
+
post: {
|
|
293
|
+
summary: 'Create a hold invoice for a caller-supplied payment hash (preimage stays with the caller; the incoming HTLC parks until settle/cancel)',
|
|
294
|
+
tags: ['Invoices'],
|
|
295
|
+
requestBody: bodyContent({
|
|
296
|
+
paymentHash: 'string',
|
|
297
|
+
amountMsat: 'string?',
|
|
298
|
+
amountSats: 'number?',
|
|
299
|
+
description: 'string?',
|
|
300
|
+
expiry: 'number?'
|
|
301
|
+
}),
|
|
302
|
+
responses: {
|
|
303
|
+
'200': {
|
|
304
|
+
description: 'Created hold invoice',
|
|
305
|
+
content: jsonContent({ $ref: '#/components/schemas/InvoiceInfo' })
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
'/invoice/settle-hold': {
|
|
311
|
+
post: {
|
|
312
|
+
summary: 'Settle a hold invoice with its preimage: validates sha256(preimage) and fulfills every parked HTLC (all MPP parts)',
|
|
313
|
+
tags: ['Invoices'],
|
|
314
|
+
requestBody: bodyContent({ preimage: 'string' }),
|
|
315
|
+
responses: {
|
|
316
|
+
'200': {
|
|
317
|
+
description: 'Settled',
|
|
318
|
+
content: jsonContent({
|
|
319
|
+
type: 'object',
|
|
320
|
+
properties: { paymentHash: { type: 'string' } }
|
|
321
|
+
})
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
'/invoice/cancel-hold': {
|
|
327
|
+
post: {
|
|
328
|
+
summary: 'Cancel a hold invoice: fails parked HTLCs back with incorrect_or_unknown_payment_details and rejects future ones',
|
|
329
|
+
tags: ['Invoices'],
|
|
330
|
+
requestBody: bodyContent({ paymentHash: 'string' }),
|
|
331
|
+
responses: {
|
|
332
|
+
'200': {
|
|
333
|
+
description: 'Cancelled',
|
|
334
|
+
content: jsonContent({
|
|
335
|
+
type: 'object',
|
|
336
|
+
properties: {
|
|
337
|
+
paymentHash: { type: 'string' },
|
|
338
|
+
htlcsFailed: { type: 'integer' }
|
|
339
|
+
}
|
|
340
|
+
})
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
'/invoices/held': {
|
|
346
|
+
get: {
|
|
347
|
+
summary: 'List hold invoices with lifecycle state and parked totals',
|
|
348
|
+
tags: ['Invoices'],
|
|
349
|
+
responses: {
|
|
350
|
+
'200': {
|
|
351
|
+
description: 'Hold invoices',
|
|
352
|
+
content: jsonContent({
|
|
353
|
+
type: 'array',
|
|
354
|
+
items: { $ref: '#/components/schemas/HoldInvoiceInfo' }
|
|
355
|
+
})
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
},
|
|
196
360
|
'/invoice': {
|
|
197
361
|
get: {
|
|
198
362
|
summary: 'Get a specific invoice by payment hash',
|
|
@@ -370,15 +534,81 @@ function getOpenApiSpec() {
|
|
|
370
534
|
}
|
|
371
535
|
}
|
|
372
536
|
},
|
|
537
|
+
'/channel/update-commitment-feerate': {
|
|
538
|
+
post: {
|
|
539
|
+
summary: 'Update the channel commitment transaction feerate (BOLT 2 update_fee). Not the routing fee policy.',
|
|
540
|
+
tags: ['Channels'],
|
|
541
|
+
requestBody: bodyContent({
|
|
542
|
+
channelId: 'string',
|
|
543
|
+
feeratePerKw: 'number'
|
|
544
|
+
}),
|
|
545
|
+
responses: { '200': { description: 'Commitment feerate updated' } }
|
|
546
|
+
}
|
|
547
|
+
},
|
|
373
548
|
'/channel/update-fee': {
|
|
374
549
|
post: {
|
|
375
|
-
summary: '
|
|
550
|
+
summary: 'Deprecated alias for /channel/update-commitment-feerate. Sets the commitment feerate, not the routing fee policy.',
|
|
551
|
+
deprecated: true,
|
|
376
552
|
tags: ['Channels'],
|
|
377
553
|
requestBody: bodyContent({
|
|
378
554
|
channelId: 'string',
|
|
379
555
|
feeratePerKw: 'number'
|
|
380
556
|
}),
|
|
381
|
-
responses: { '200': { description: '
|
|
557
|
+
responses: { '200': { description: 'Commitment feerate updated' } }
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
'/channel/update-policy': {
|
|
561
|
+
post: {
|
|
562
|
+
summary: 'Set the ROUTING fee policy for one channel (channelId) or all channels (all: true); regenerates and re-broadcasts the channel_update. Msat fields accept number or decimal string.',
|
|
563
|
+
tags: ['Channels'],
|
|
564
|
+
requestBody: bodyContent({
|
|
565
|
+
channelId: 'string?',
|
|
566
|
+
all: 'boolean?',
|
|
567
|
+
feeBaseMsat: 'number?',
|
|
568
|
+
feeProportionalMillionths: 'number?',
|
|
569
|
+
cltvExpiryDelta: 'number?',
|
|
570
|
+
htlcMinimumMsat: 'string?',
|
|
571
|
+
htlcMaximumMsat: 'string?'
|
|
572
|
+
}),
|
|
573
|
+
responses: {
|
|
574
|
+
'200': {
|
|
575
|
+
description: 'Updated count + effective policies',
|
|
576
|
+
content: jsonContent({
|
|
577
|
+
type: 'object',
|
|
578
|
+
properties: {
|
|
579
|
+
updated: { type: 'integer' },
|
|
580
|
+
policies: {
|
|
581
|
+
type: 'array',
|
|
582
|
+
items: { $ref: '#/components/schemas/ChannelPolicy' }
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
})
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
},
|
|
590
|
+
'/channel/policy': {
|
|
591
|
+
get: {
|
|
592
|
+
summary: 'Get the effective routing fee policy for a channel (override or node defaults)',
|
|
593
|
+
tags: ['Channels'],
|
|
594
|
+
parameters: [
|
|
595
|
+
{
|
|
596
|
+
name: 'channelId',
|
|
597
|
+
in: 'query',
|
|
598
|
+
required: true,
|
|
599
|
+
schema: { type: 'string' }
|
|
600
|
+
}
|
|
601
|
+
],
|
|
602
|
+
responses: {
|
|
603
|
+
'200': {
|
|
604
|
+
description: 'Effective channel policy',
|
|
605
|
+
content: jsonContent({
|
|
606
|
+
$ref: '#/components/schemas/ChannelPolicy'
|
|
607
|
+
})
|
|
608
|
+
},
|
|
609
|
+
'400': { description: 'Missing channelId' },
|
|
610
|
+
'404': { description: 'Channel not found' }
|
|
611
|
+
}
|
|
382
612
|
}
|
|
383
613
|
},
|
|
384
614
|
'/channels/ensure-minimum': {
|
|
@@ -466,12 +696,12 @@ function getOpenApiSpec() {
|
|
|
466
696
|
},
|
|
467
697
|
'/peer/connect': {
|
|
468
698
|
post: {
|
|
469
|
-
summary: 'Connect to a peer',
|
|
699
|
+
summary: 'Connect to a peer (omit host+port to resolve the address from the gossip graph / DNS bootstrap)',
|
|
470
700
|
tags: ['Peers'],
|
|
471
701
|
requestBody: bodyContent({
|
|
472
702
|
pubkey: 'string',
|
|
473
|
-
host: 'string',
|
|
474
|
-
port: 'number'
|
|
703
|
+
host: 'string?',
|
|
704
|
+
port: 'number?'
|
|
475
705
|
}),
|
|
476
706
|
responses: {
|
|
477
707
|
'200': {
|
|
@@ -725,6 +955,305 @@ function getOpenApiSpec() {
|
|
|
725
955
|
responses: { '200': { description: 'Probe result' } }
|
|
726
956
|
}
|
|
727
957
|
},
|
|
958
|
+
'/graph/info': {
|
|
959
|
+
get: {
|
|
960
|
+
summary: 'Network graph summary (node/channel counts, last sync)',
|
|
961
|
+
tags: ['Graph'],
|
|
962
|
+
responses: {
|
|
963
|
+
'200': {
|
|
964
|
+
description: 'Graph summary',
|
|
965
|
+
content: jsonContent({ $ref: '#/components/schemas/GraphInfo' })
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
},
|
|
970
|
+
'/graph/node': {
|
|
971
|
+
get: {
|
|
972
|
+
summary: 'Node announcement info (alias, addresses, features) + its known channels',
|
|
973
|
+
tags: ['Graph'],
|
|
974
|
+
parameters: [
|
|
975
|
+
{
|
|
976
|
+
name: 'pubkey',
|
|
977
|
+
in: 'query',
|
|
978
|
+
required: true,
|
|
979
|
+
schema: { type: 'string' },
|
|
980
|
+
description: '33-byte node public key (hex)'
|
|
981
|
+
}
|
|
982
|
+
],
|
|
983
|
+
responses: {
|
|
984
|
+
'200': {
|
|
985
|
+
description: 'Graph node info',
|
|
986
|
+
content: jsonContent({
|
|
987
|
+
$ref: '#/components/schemas/GraphNodeInfo'
|
|
988
|
+
})
|
|
989
|
+
},
|
|
990
|
+
'404': { description: 'Node not found in graph' }
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
},
|
|
994
|
+
'/graph/channel': {
|
|
995
|
+
get: {
|
|
996
|
+
summary: 'Channel info from gossip: endpoints, capacity and both directions of routing policy',
|
|
997
|
+
tags: ['Graph'],
|
|
998
|
+
parameters: [
|
|
999
|
+
{
|
|
1000
|
+
name: 'scid',
|
|
1001
|
+
in: 'query',
|
|
1002
|
+
required: true,
|
|
1003
|
+
schema: { type: 'string' },
|
|
1004
|
+
description: 'Short channel id as <block>x<txIndex>x<output> or 16-char hex'
|
|
1005
|
+
}
|
|
1006
|
+
],
|
|
1007
|
+
responses: {
|
|
1008
|
+
'200': {
|
|
1009
|
+
description: 'Graph channel info',
|
|
1010
|
+
content: jsonContent({
|
|
1011
|
+
$ref: '#/components/schemas/GraphChannelInfo'
|
|
1012
|
+
})
|
|
1013
|
+
},
|
|
1014
|
+
'404': { description: 'Channel not found in graph' }
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
},
|
|
1018
|
+
'/graph/describe': {
|
|
1019
|
+
get: {
|
|
1020
|
+
summary: 'Paged dump of known graph channels (limit defaults to 500 and is capped at 500)',
|
|
1021
|
+
tags: ['Graph'],
|
|
1022
|
+
parameters: [
|
|
1023
|
+
{ name: 'limit', in: 'query', schema: { type: 'integer' } },
|
|
1024
|
+
{ name: 'offset', in: 'query', schema: { type: 'integer' } }
|
|
1025
|
+
],
|
|
1026
|
+
responses: {
|
|
1027
|
+
'200': {
|
|
1028
|
+
description: 'Paged channel dump with totalChannels/limit/offset',
|
|
1029
|
+
content: jsonContent({
|
|
1030
|
+
type: 'object',
|
|
1031
|
+
properties: {
|
|
1032
|
+
totalChannels: { type: 'integer' },
|
|
1033
|
+
limit: { type: 'integer' },
|
|
1034
|
+
offset: { type: 'integer' },
|
|
1035
|
+
channels: {
|
|
1036
|
+
type: 'array',
|
|
1037
|
+
items: { $ref: '#/components/schemas/GraphChannelInfo' }
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
})
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
},
|
|
1045
|
+
'/route/query': {
|
|
1046
|
+
post: {
|
|
1047
|
+
summary: 'Compute a route to a destination WITHOUT sending; hops feed /payment/send-to-route',
|
|
1048
|
+
tags: ['Routing'],
|
|
1049
|
+
requestBody: bodyContent({
|
|
1050
|
+
destination: 'string',
|
|
1051
|
+
amountSats: 'number',
|
|
1052
|
+
maxFeeSats: 'number?'
|
|
1053
|
+
}),
|
|
1054
|
+
responses: {
|
|
1055
|
+
'200': {
|
|
1056
|
+
description: 'Route with per-hop fees and totals',
|
|
1057
|
+
content: jsonContent({
|
|
1058
|
+
$ref: '#/components/schemas/RouteQueryResult'
|
|
1059
|
+
})
|
|
1060
|
+
},
|
|
1061
|
+
'400': { description: 'No route or fee exceeds maximum' }
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
},
|
|
1065
|
+
'/payment/send-to-route': {
|
|
1066
|
+
post: {
|
|
1067
|
+
summary: 'Send a payment along an explicit route (hops from POST /route/query)',
|
|
1068
|
+
tags: ['Payments'],
|
|
1069
|
+
requestBody: {
|
|
1070
|
+
content: {
|
|
1071
|
+
'application/json': {
|
|
1072
|
+
schema: {
|
|
1073
|
+
type: 'object',
|
|
1074
|
+
properties: {
|
|
1075
|
+
paymentHash: { type: 'string' },
|
|
1076
|
+
route: {
|
|
1077
|
+
type: 'object',
|
|
1078
|
+
properties: {
|
|
1079
|
+
hops: {
|
|
1080
|
+
type: 'array',
|
|
1081
|
+
items: { $ref: '#/components/schemas/RouteHop' }
|
|
1082
|
+
}
|
|
1083
|
+
},
|
|
1084
|
+
required: ['hops']
|
|
1085
|
+
},
|
|
1086
|
+
paymentSecret: {
|
|
1087
|
+
type: 'string',
|
|
1088
|
+
description: 'Invoice payment_secret (required by most modern invoices)'
|
|
1089
|
+
}
|
|
1090
|
+
},
|
|
1091
|
+
required: ['paymentHash', 'route']
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
},
|
|
1096
|
+
responses: {
|
|
1097
|
+
'200': {
|
|
1098
|
+
description: 'Payment info',
|
|
1099
|
+
content: jsonContent({
|
|
1100
|
+
$ref: '#/components/schemas/PaymentInfo'
|
|
1101
|
+
})
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
},
|
|
1106
|
+
'/message/sign': {
|
|
1107
|
+
post: {
|
|
1108
|
+
summary: "Sign a message with the node identity key (LND-compatible: double-SHA256 of 'Lightning Signed Message:' + message, compact recoverable ECDSA, zbase32)",
|
|
1109
|
+
tags: ['Node'],
|
|
1110
|
+
requestBody: bodyContent({ message: 'string' }),
|
|
1111
|
+
responses: {
|
|
1112
|
+
'200': {
|
|
1113
|
+
description: 'Signature (zbase32) and our node pubkey',
|
|
1114
|
+
content: jsonContent({
|
|
1115
|
+
type: 'object',
|
|
1116
|
+
properties: {
|
|
1117
|
+
signature: { type: 'string' },
|
|
1118
|
+
pubkey: { type: 'string' }
|
|
1119
|
+
}
|
|
1120
|
+
})
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
},
|
|
1125
|
+
'/message/verify': {
|
|
1126
|
+
post: {
|
|
1127
|
+
summary: 'Verify an LND-style message signature: recovers the signer pubkey and reports whether it is a known graph node. Compare pubkey against the expected signer.',
|
|
1128
|
+
tags: ['Node'],
|
|
1129
|
+
requestBody: bodyContent({ message: 'string', signature: 'string' }),
|
|
1130
|
+
responses: {
|
|
1131
|
+
'200': {
|
|
1132
|
+
description: 'Verification result',
|
|
1133
|
+
content: jsonContent({
|
|
1134
|
+
type: 'object',
|
|
1135
|
+
properties: {
|
|
1136
|
+
valid: { type: 'boolean' },
|
|
1137
|
+
pubkey: { type: 'string', nullable: true },
|
|
1138
|
+
knownNode: { type: 'boolean' }
|
|
1139
|
+
}
|
|
1140
|
+
})
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
},
|
|
1145
|
+
'/gossip/sync': {
|
|
1146
|
+
post: {
|
|
1147
|
+
summary: 'Request a gossip graph sync from one peer (pubkey) or all connected peers',
|
|
1148
|
+
tags: ['Graph'],
|
|
1149
|
+
requestBody: bodyContent({ pubkey: 'string?' }),
|
|
1150
|
+
responses: {
|
|
1151
|
+
'200': {
|
|
1152
|
+
description: 'Pubkeys a sync was initiated with',
|
|
1153
|
+
content: jsonContent({
|
|
1154
|
+
type: 'object',
|
|
1155
|
+
properties: {
|
|
1156
|
+
syncedFrom: {
|
|
1157
|
+
type: 'array',
|
|
1158
|
+
items: { type: 'string' }
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
})
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
},
|
|
1166
|
+
'/gossip/sync-rapid': {
|
|
1167
|
+
post: {
|
|
1168
|
+
summary: 'Download and apply a Rapid Gossip Sync snapshot (mainnet only)',
|
|
1169
|
+
tags: ['Graph'],
|
|
1170
|
+
responses: {
|
|
1171
|
+
'200': {
|
|
1172
|
+
description: 'Ingestion counts',
|
|
1173
|
+
content: jsonContent({
|
|
1174
|
+
type: 'object',
|
|
1175
|
+
properties: {
|
|
1176
|
+
channelsAdded: { type: 'integer' },
|
|
1177
|
+
updatesApplied: { type: 'integer' }
|
|
1178
|
+
}
|
|
1179
|
+
})
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
},
|
|
1184
|
+
'/channel/diagnostics': {
|
|
1185
|
+
get: {
|
|
1186
|
+
summary: 'Routing-readiness diagnostics for a channel (SCID/announcement/peer-connection issues)',
|
|
1187
|
+
tags: ['Channels'],
|
|
1188
|
+
parameters: [
|
|
1189
|
+
{
|
|
1190
|
+
name: 'channelId',
|
|
1191
|
+
in: 'query',
|
|
1192
|
+
required: true,
|
|
1193
|
+
schema: { type: 'string' }
|
|
1194
|
+
}
|
|
1195
|
+
],
|
|
1196
|
+
responses: {
|
|
1197
|
+
'200': { description: 'Diagnostics with an issues list' },
|
|
1198
|
+
'404': { description: 'Channel not found' }
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
},
|
|
1202
|
+
'/address/validate': {
|
|
1203
|
+
post: {
|
|
1204
|
+
summary: 'Validate a Bitcoin address for the active network',
|
|
1205
|
+
tags: ['Node'],
|
|
1206
|
+
requestBody: bodyContent({ address: 'string' }),
|
|
1207
|
+
responses: {
|
|
1208
|
+
'200': {
|
|
1209
|
+
description: 'Validity',
|
|
1210
|
+
content: jsonContent({
|
|
1211
|
+
type: 'object',
|
|
1212
|
+
properties: {
|
|
1213
|
+
address: { type: 'string' },
|
|
1214
|
+
valid: { type: 'boolean' }
|
|
1215
|
+
}
|
|
1216
|
+
})
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
},
|
|
1221
|
+
'/recover-fallback-funds': {
|
|
1222
|
+
post: {
|
|
1223
|
+
summary: 'Sweep UTXOs at the funding-key fallback address into the wallet',
|
|
1224
|
+
tags: ['Node'],
|
|
1225
|
+
requestBody: bodyContent({ feeRatePerVbyte: 'number?' }),
|
|
1226
|
+
responses: {
|
|
1227
|
+
'200': {
|
|
1228
|
+
description: 'Broadcast txid and recovered amount, or { recovered: false } when nothing to recover',
|
|
1229
|
+
content: jsonContent({
|
|
1230
|
+
type: 'object',
|
|
1231
|
+
properties: {
|
|
1232
|
+
txid: { type: 'string' },
|
|
1233
|
+
amountSat: { type: 'integer' },
|
|
1234
|
+
inputCount: { type: 'integer' },
|
|
1235
|
+
recovered: { type: 'boolean' }
|
|
1236
|
+
}
|
|
1237
|
+
})
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
},
|
|
1242
|
+
'/backup/trigger': {
|
|
1243
|
+
post: {
|
|
1244
|
+
summary: 'Trigger an on-demand backup to the configured backupPath (no-op when unset)',
|
|
1245
|
+
tags: ['Node'],
|
|
1246
|
+
responses: {
|
|
1247
|
+
'200': {
|
|
1248
|
+
description: 'Trigger acknowledged',
|
|
1249
|
+
content: jsonContent({
|
|
1250
|
+
type: 'object',
|
|
1251
|
+
properties: { triggered: { type: 'boolean' } }
|
|
1252
|
+
})
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
},
|
|
728
1257
|
'/backup': {
|
|
729
1258
|
post: {
|
|
730
1259
|
summary: 'Create database backup',
|
|
@@ -733,6 +1262,46 @@ function getOpenApiSpec() {
|
|
|
733
1262
|
responses: { '200': { description: 'Backup result' } }
|
|
734
1263
|
}
|
|
735
1264
|
},
|
|
1265
|
+
'/backup/scb': {
|
|
1266
|
+
get: {
|
|
1267
|
+
summary: 'Export the encrypted static channel backup (seed-encrypted blob)',
|
|
1268
|
+
tags: ['Node'],
|
|
1269
|
+
responses: {
|
|
1270
|
+
'200': {
|
|
1271
|
+
description: 'Encoded SCB blob, channel count, and on-disk path'
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
},
|
|
1276
|
+
'/backup/peer-retrieved': {
|
|
1277
|
+
get: {
|
|
1278
|
+
summary: 'Get the newest valid SCB a peer returned via BOLT 1 peer storage (recovery flow: reinstall with the mnemonic, connect to peers, fetch this, then POST /restore/scb with its encoded blob)',
|
|
1279
|
+
tags: ['Node'],
|
|
1280
|
+
responses: {
|
|
1281
|
+
'200': {
|
|
1282
|
+
description: 'Encoded SCB blob, its creation timestamp, and the peer that returned it'
|
|
1283
|
+
},
|
|
1284
|
+
'404': {
|
|
1285
|
+
description: 'No peer has returned a valid backup this session'
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
},
|
|
1290
|
+
'/restore/scb': {
|
|
1291
|
+
post: {
|
|
1292
|
+
summary: 'Restore channels from a static channel backup (on-chain recovery only: the peer force-closes and our balance is swept from its commitment)',
|
|
1293
|
+
tags: ['Node'],
|
|
1294
|
+
requestBody: bodyContent({ encoded: 'string?', path: 'string?' }),
|
|
1295
|
+
responses: {
|
|
1296
|
+
'200': {
|
|
1297
|
+
description: 'Channel ids now recovering, entries skipped with reasons, and total channel count in the backup'
|
|
1298
|
+
},
|
|
1299
|
+
'400': {
|
|
1300
|
+
description: 'Invalid params (need exactly one of encoded/path), wrong seed, or wrong network'
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
},
|
|
736
1305
|
'/send': {
|
|
737
1306
|
post: {
|
|
738
1307
|
summary: 'Send on-chain Bitcoin',
|
|
@@ -745,6 +1314,133 @@ function getOpenApiSpec() {
|
|
|
745
1314
|
responses: { '200': { description: 'Transaction info' } }
|
|
746
1315
|
}
|
|
747
1316
|
},
|
|
1317
|
+
'/send-max': {
|
|
1318
|
+
post: {
|
|
1319
|
+
summary: 'Sweep the entire spendable on-chain balance to one address (amount = balance minus fee)',
|
|
1320
|
+
tags: ['Node'],
|
|
1321
|
+
requestBody: bodyContent({
|
|
1322
|
+
address: 'string',
|
|
1323
|
+
satsPerVbyte: 'number?'
|
|
1324
|
+
}),
|
|
1325
|
+
responses: {
|
|
1326
|
+
'200': {
|
|
1327
|
+
description: 'Transaction info',
|
|
1328
|
+
content: jsonContent({ $ref: '#/components/schemas/TxInfo' })
|
|
1329
|
+
},
|
|
1330
|
+
'400': { description: 'Invalid address/fee rate or no UTXOs' }
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
},
|
|
1334
|
+
'/tx/bump-fee': {
|
|
1335
|
+
post: {
|
|
1336
|
+
summary: 'Replace an unconfirmed RBF-signalling wallet transaction with a higher-fee version (BIP 125)',
|
|
1337
|
+
tags: ['Node'],
|
|
1338
|
+
requestBody: bodyContent({
|
|
1339
|
+
txid: 'string',
|
|
1340
|
+
satsPerVbyte: 'number'
|
|
1341
|
+
}),
|
|
1342
|
+
responses: {
|
|
1343
|
+
'200': {
|
|
1344
|
+
description: 'Boost result',
|
|
1345
|
+
content: jsonContent({ $ref: '#/components/schemas/BoostResult' })
|
|
1346
|
+
},
|
|
1347
|
+
'400': {
|
|
1348
|
+
description: 'NOT_BOOSTABLE (unknown/confirmed/non-RBF tx; try /tx/boost for CPFP) or invalid params'
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
},
|
|
1353
|
+
'/tx/boost': {
|
|
1354
|
+
post: {
|
|
1355
|
+
summary: 'Fee-bump an unconfirmed wallet transaction: RBF when possible, otherwise CPFP',
|
|
1356
|
+
tags: ['Node'],
|
|
1357
|
+
requestBody: bodyContent({
|
|
1358
|
+
txid: 'string',
|
|
1359
|
+
satsPerVbyte: 'number?'
|
|
1360
|
+
}),
|
|
1361
|
+
responses: {
|
|
1362
|
+
'200': {
|
|
1363
|
+
description: 'Boost result',
|
|
1364
|
+
content: jsonContent({ $ref: '#/components/schemas/BoostResult' })
|
|
1365
|
+
},
|
|
1366
|
+
'400': {
|
|
1367
|
+
description: 'NOT_BOOSTABLE or invalid params'
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
},
|
|
1372
|
+
'/transactions/boostable': {
|
|
1373
|
+
get: {
|
|
1374
|
+
summary: 'List unconfirmed wallet transactions eligible for RBF and/or CPFP fee bumping',
|
|
1375
|
+
tags: ['Node'],
|
|
1376
|
+
responses: {
|
|
1377
|
+
'200': {
|
|
1378
|
+
description: 'Boostable transactions by method',
|
|
1379
|
+
content: jsonContent({
|
|
1380
|
+
$ref: '#/components/schemas/BoostableTransactions'
|
|
1381
|
+
})
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
},
|
|
1386
|
+
'/consolidate': {
|
|
1387
|
+
post: {
|
|
1388
|
+
summary: 'Merge all spendable UTXOs into a single output at a fresh wallet address (send-max-to-self)',
|
|
1389
|
+
tags: ['Node'],
|
|
1390
|
+
requestBody: bodyContent({ satsPerVbyte: 'number?' }),
|
|
1391
|
+
responses: {
|
|
1392
|
+
'200': {
|
|
1393
|
+
description: 'Consolidation result',
|
|
1394
|
+
content: jsonContent({
|
|
1395
|
+
$ref: '#/components/schemas/ConsolidateResult'
|
|
1396
|
+
})
|
|
1397
|
+
},
|
|
1398
|
+
'400': {
|
|
1399
|
+
description: 'NOTHING_TO_CONSOLIDATE (fewer than 2 UTXOs) or invalid params'
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
},
|
|
1404
|
+
'/psbt/build': {
|
|
1405
|
+
post: {
|
|
1406
|
+
summary: 'Build an UNSIGNED PSBT for an external signer (hardware wallet); includes bip32 derivation metadata, nothing is signed or broadcast',
|
|
1407
|
+
tags: ['Node'],
|
|
1408
|
+
requestBody: bodyContent({
|
|
1409
|
+
outputs: 'array',
|
|
1410
|
+
satsPerVbyte: 'number?'
|
|
1411
|
+
}),
|
|
1412
|
+
responses: {
|
|
1413
|
+
'200': {
|
|
1414
|
+
description: 'Unsigned PSBT (base64) with fee, vsize estimate and input/output summary'
|
|
1415
|
+
},
|
|
1416
|
+
'400': { description: 'Invalid outputs/fee rate or no UTXOs' }
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
},
|
|
1420
|
+
'/psbt/import-signed': {
|
|
1421
|
+
post: {
|
|
1422
|
+
summary: 'Validate and finalize an externally signed PSBT; returns { txid, txHex } WITHOUT broadcasting',
|
|
1423
|
+
tags: ['Node'],
|
|
1424
|
+
requestBody: bodyContent({ psbtBase64: 'string' }),
|
|
1425
|
+
responses: {
|
|
1426
|
+
'200': { description: 'Finalized transaction (not broadcast)' },
|
|
1427
|
+
'400': {
|
|
1428
|
+
description: 'PSBT_IMPORT_FAILED (missing/invalid signatures)'
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
},
|
|
1433
|
+
'/psbt/combine': {
|
|
1434
|
+
post: {
|
|
1435
|
+
summary: 'Combine partially signed copies of the same PSBT (multi-party signing)',
|
|
1436
|
+
tags: ['Node'],
|
|
1437
|
+
requestBody: bodyContent({ psbts: 'array' }),
|
|
1438
|
+
responses: {
|
|
1439
|
+
'200': { description: 'Combined PSBT (base64)' },
|
|
1440
|
+
'400': { description: 'Fewer than two PSBTs or malformed input' }
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
},
|
|
748
1444
|
'/readiness': {
|
|
749
1445
|
get: {
|
|
750
1446
|
summary: 'Get mainnet readiness report with weighted checks',
|
|
@@ -785,10 +1481,62 @@ function getOpenApiSpec() {
|
|
|
785
1481
|
tags: ['Node'],
|
|
786
1482
|
responses: {
|
|
787
1483
|
'200': {
|
|
788
|
-
description: 'Liquidity snapshot',
|
|
1484
|
+
description: 'Liquidity snapshot',
|
|
1485
|
+
content: jsonContent({
|
|
1486
|
+
$ref: '#/components/schemas/LiquiditySnapshot'
|
|
1487
|
+
})
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
},
|
|
1492
|
+
'/advisor/recommendations': {
|
|
1493
|
+
get: {
|
|
1494
|
+
summary: 'Liquidity analysis (advisor analyze) plus the concrete circular-rebalance plan',
|
|
1495
|
+
tags: ['Node'],
|
|
1496
|
+
responses: {
|
|
1497
|
+
'200': {
|
|
1498
|
+
description: 'Advisor recommendations',
|
|
1499
|
+
content: jsonContent({
|
|
1500
|
+
$ref: '#/components/schemas/AdvisorRecommendations'
|
|
1501
|
+
})
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
},
|
|
1506
|
+
'/advisor/execute-rebalances': {
|
|
1507
|
+
post: {
|
|
1508
|
+
summary: 'Execute the advisor rebalance plan under a strict per-UTC-day routing-fee budget (persisted across restarts)',
|
|
1509
|
+
tags: ['Node'],
|
|
1510
|
+
requestBody: bodyContent({ budgetSatsPerDay: 'number?' }),
|
|
1511
|
+
responses: {
|
|
1512
|
+
'200': {
|
|
1513
|
+
description: 'Execution summary (msat values as strings)',
|
|
1514
|
+
content: jsonContent({
|
|
1515
|
+
$ref: '#/components/schemas/RebalanceExecutionSummary'
|
|
1516
|
+
})
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
},
|
|
1521
|
+
'/rebalance': {
|
|
1522
|
+
post: {
|
|
1523
|
+
summary: 'Circular rebalance: self-payment out over fromChannelId and back in over toChannelId; aborts without paying if the route fee exceeds maxFeeSats',
|
|
1524
|
+
tags: ['Channels'],
|
|
1525
|
+
requestBody: bodyContent({
|
|
1526
|
+
fromChannelId: 'string',
|
|
1527
|
+
toChannelId: 'string',
|
|
1528
|
+
amountSats: 'number',
|
|
1529
|
+
maxFeeSats: 'number'
|
|
1530
|
+
}),
|
|
1531
|
+
responses: {
|
|
1532
|
+
'200': {
|
|
1533
|
+
description: 'Rebalance result',
|
|
789
1534
|
content: jsonContent({
|
|
790
|
-
$ref: '#/components/schemas/
|
|
1535
|
+
$ref: '#/components/schemas/RebalanceResult'
|
|
791
1536
|
})
|
|
1537
|
+
},
|
|
1538
|
+
'400': {
|
|
1539
|
+
description: 'No route, fee exceeds maxFeeSats, or invalid params'
|
|
792
1540
|
}
|
|
793
1541
|
}
|
|
794
1542
|
}
|
|
@@ -933,7 +1681,7 @@ function getOpenApiSpec() {
|
|
|
933
1681
|
},
|
|
934
1682
|
'/events': {
|
|
935
1683
|
get: {
|
|
936
|
-
summary: 'Server-Sent Events stream (payment:received, payment:sent, payment:failed, channel:ready, channel:closed, peer:connect, peer:disconnect, node:ready)',
|
|
1684
|
+
summary: 'Server-Sent Events stream (payment:received, payment:sent, payment:failed, invoice:settled, channel:opening, channel:ready, channel:pending-close, channel:force-closing, channel:closed, peer:connect, peer:disconnect, node:ready; plus htlc:forwarded, htlc:fulfilled, htlc:failed when the daemon is started with htlcEvents)',
|
|
937
1685
|
tags: ['Node'],
|
|
938
1686
|
responses: {
|
|
939
1687
|
'200': {
|
|
@@ -967,34 +1715,128 @@ function getOpenApiSpec() {
|
|
|
967
1715
|
},
|
|
968
1716
|
'/spend-limit': {
|
|
969
1717
|
get: {
|
|
970
|
-
summary: 'Get daily spending limit info',
|
|
1718
|
+
summary: 'Get combined daily spending limit info (Lightning + external on-chain sends share one budget)',
|
|
1719
|
+
description: 'The daily limit covers Lightning payments AND external on-chain sends (amount + fee). Consolidation, channel funding and fee bumps are excluded. spentSats mirrors totalSats for back-compat.',
|
|
971
1720
|
tags: ['Node'],
|
|
972
1721
|
responses: {
|
|
973
1722
|
'200': {
|
|
974
|
-
description: 'Spending limit info',
|
|
1723
|
+
description: 'Spending limit info with LN/onchain breakdown',
|
|
975
1724
|
content: jsonContent({
|
|
976
1725
|
type: 'object',
|
|
977
1726
|
properties: {
|
|
978
1727
|
limitSats: { type: 'integer', nullable: true },
|
|
979
1728
|
spentSats: { type: 'integer' },
|
|
980
1729
|
remainingSats: { type: 'number' },
|
|
981
|
-
resetsAt: { type: 'integer' }
|
|
1730
|
+
resetsAt: { type: 'integer' },
|
|
1731
|
+
totalSats: { type: 'integer' },
|
|
1732
|
+
lightningSats: { type: 'integer' },
|
|
1733
|
+
onchainSats: { type: 'integer' }
|
|
1734
|
+
}
|
|
1735
|
+
})
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
},
|
|
1740
|
+
'/utxo/freeze': {
|
|
1741
|
+
post: {
|
|
1742
|
+
summary: 'Freeze a UTXO so coin selection cannot spend it until unfrozen',
|
|
1743
|
+
tags: ['Node'],
|
|
1744
|
+
requestBody: bodyContent({ txid: 'string', index: 'integer' }),
|
|
1745
|
+
responses: {
|
|
1746
|
+
'200': {
|
|
1747
|
+
description: 'Frozen outpoint',
|
|
1748
|
+
content: jsonContent({
|
|
1749
|
+
type: 'object',
|
|
1750
|
+
properties: { frozen: { type: 'string' } }
|
|
1751
|
+
})
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
},
|
|
1756
|
+
'/utxo/unfreeze': {
|
|
1757
|
+
post: {
|
|
1758
|
+
summary: 'Unfreeze a previously frozen UTXO',
|
|
1759
|
+
tags: ['Node'],
|
|
1760
|
+
requestBody: bodyContent({ txid: 'string', index: 'integer' }),
|
|
1761
|
+
responses: {
|
|
1762
|
+
'200': {
|
|
1763
|
+
description: 'Unfrozen outpoint',
|
|
1764
|
+
content: jsonContent({
|
|
1765
|
+
type: 'object',
|
|
1766
|
+
properties: { unfrozen: { type: 'string' } }
|
|
1767
|
+
})
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
},
|
|
1772
|
+
'/address/label': {
|
|
1773
|
+
post: {
|
|
1774
|
+
summary: 'Set a user label for an address (empty label clears it)',
|
|
1775
|
+
tags: ['Node'],
|
|
1776
|
+
requestBody: bodyContent({ address: 'string', label: 'string' }),
|
|
1777
|
+
responses: {
|
|
1778
|
+
'200': {
|
|
1779
|
+
description: 'Stored label',
|
|
1780
|
+
content: jsonContent({
|
|
1781
|
+
type: 'object',
|
|
1782
|
+
properties: {
|
|
1783
|
+
address: { type: 'string' },
|
|
1784
|
+
label: { type: 'string' }
|
|
982
1785
|
}
|
|
983
1786
|
})
|
|
984
1787
|
}
|
|
985
1788
|
}
|
|
986
1789
|
}
|
|
987
1790
|
},
|
|
1791
|
+
'/address/labels': {
|
|
1792
|
+
get: {
|
|
1793
|
+
summary: 'List all user address labels keyed by address',
|
|
1794
|
+
tags: ['Node'],
|
|
1795
|
+
responses: {
|
|
1796
|
+
'200': {
|
|
1797
|
+
description: 'Labels map',
|
|
1798
|
+
content: jsonContent({
|
|
1799
|
+
type: 'object',
|
|
1800
|
+
additionalProperties: { type: 'string' }
|
|
1801
|
+
})
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1805
|
+
},
|
|
1806
|
+
'/wallet/descriptors': {
|
|
1807
|
+
get: {
|
|
1808
|
+
summary: 'Export BIP 380 output descriptors for the on-chain wallet (public keys only)',
|
|
1809
|
+
tags: ['Node'],
|
|
1810
|
+
responses: {
|
|
1811
|
+
'200': {
|
|
1812
|
+
description: 'Descriptors',
|
|
1813
|
+
content: jsonContent({
|
|
1814
|
+
$ref: '#/components/schemas/DescriptorsInfo'
|
|
1815
|
+
})
|
|
1816
|
+
}
|
|
1817
|
+
}
|
|
1818
|
+
}
|
|
1819
|
+
},
|
|
988
1820
|
'/address/new': {
|
|
989
1821
|
post: {
|
|
990
1822
|
summary: 'Generate a new on-chain receiving address',
|
|
1823
|
+
description: 'Pass bip21:true (with optional amountSats/label/message) to also receive the address encoded as a BIP21 payment URI.',
|
|
991
1824
|
tags: ['Node'],
|
|
1825
|
+
requestBody: bodyContent({
|
|
1826
|
+
bip21: 'boolean?',
|
|
1827
|
+
amountSats: 'integer?',
|
|
1828
|
+
label: 'string?',
|
|
1829
|
+
message: 'string?'
|
|
1830
|
+
}),
|
|
992
1831
|
responses: {
|
|
993
1832
|
'200': {
|
|
994
1833
|
description: 'New address',
|
|
995
1834
|
content: jsonContent({
|
|
996
1835
|
type: 'object',
|
|
997
|
-
properties: {
|
|
1836
|
+
properties: {
|
|
1837
|
+
address: { type: 'string' },
|
|
1838
|
+
bip21: { type: 'string' }
|
|
1839
|
+
}
|
|
998
1840
|
})
|
|
999
1841
|
}
|
|
1000
1842
|
}
|
|
@@ -1018,6 +1860,7 @@ function getOpenApiSpec() {
|
|
|
1018
1860
|
'/mnemonic': {
|
|
1019
1861
|
get: {
|
|
1020
1862
|
summary: 'Get wallet mnemonic (requires API token)',
|
|
1863
|
+
description: 'Seed generation is CLI-only: `beignet init` creates the mnemonic; the daemon never generates or replaces a seed. This endpoint only reveals the configured mnemonic, and only when apiToken is set (returns MNEMONIC_REQUIRES_AUTH otherwise).',
|
|
1021
1864
|
tags: ['Node'],
|
|
1022
1865
|
responses: {
|
|
1023
1866
|
'200': {
|
|
@@ -1451,7 +2294,33 @@ function getOpenApiSpec() {
|
|
|
1451
2294
|
vout: { type: 'integer' },
|
|
1452
2295
|
address: { type: 'string' },
|
|
1453
2296
|
valueSats: { type: 'integer' },
|
|
1454
|
-
height: { type: 'integer' }
|
|
2297
|
+
height: { type: 'integer' },
|
|
2298
|
+
frozen: {
|
|
2299
|
+
type: 'boolean',
|
|
2300
|
+
description: 'Frozen UTXOs are excluded from coin selection until unfrozen'
|
|
2301
|
+
}
|
|
2302
|
+
}
|
|
2303
|
+
},
|
|
2304
|
+
DescriptorsInfo: {
|
|
2305
|
+
type: 'object',
|
|
2306
|
+
description: 'BIP 380 output descriptors (with checksums). Public keys only; private keys are never exported.',
|
|
2307
|
+
properties: {
|
|
2308
|
+
fingerprint: { type: 'string' },
|
|
2309
|
+
network: { type: 'string' },
|
|
2310
|
+
account: { type: 'integer' },
|
|
2311
|
+
birthdayHeight: { type: 'integer' },
|
|
2312
|
+
watchOnly: { type: 'boolean' },
|
|
2313
|
+
descriptors: {
|
|
2314
|
+
type: 'array',
|
|
2315
|
+
items: {
|
|
2316
|
+
type: 'object',
|
|
2317
|
+
properties: {
|
|
2318
|
+
addressType: { type: 'string' },
|
|
2319
|
+
external: { type: 'string' },
|
|
2320
|
+
internal: { type: 'string' }
|
|
2321
|
+
}
|
|
2322
|
+
}
|
|
2323
|
+
}
|
|
1455
2324
|
}
|
|
1456
2325
|
},
|
|
1457
2326
|
OnchainFees: {
|
|
@@ -1465,6 +2334,40 @@ function getOpenApiSpec() {
|
|
|
1465
2334
|
timestamp: { type: 'integer' }
|
|
1466
2335
|
}
|
|
1467
2336
|
},
|
|
2337
|
+
ForwardingEvent: {
|
|
2338
|
+
type: 'object',
|
|
2339
|
+
description: 'One settled forward. Msat values are decimal strings (JSON-safe bigint).',
|
|
2340
|
+
properties: {
|
|
2341
|
+
id: { type: 'integer' },
|
|
2342
|
+
settledAt: { type: 'integer' },
|
|
2343
|
+
inChannelId: { type: 'string' },
|
|
2344
|
+
outChannelId: { type: 'string' },
|
|
2345
|
+
inScid: { type: 'string' },
|
|
2346
|
+
outScid: { type: 'string' },
|
|
2347
|
+
amountInMsat: { type: 'string' },
|
|
2348
|
+
amountOutMsat: { type: 'string' },
|
|
2349
|
+
feeMsat: { type: 'string' }
|
|
2350
|
+
}
|
|
2351
|
+
},
|
|
2352
|
+
ForwardingSummary: {
|
|
2353
|
+
type: 'object',
|
|
2354
|
+
properties: {
|
|
2355
|
+
count: { type: 'integer' },
|
|
2356
|
+
volumeOutMsat: { type: 'string' },
|
|
2357
|
+
feesEarnedMsat: { type: 'string' }
|
|
2358
|
+
}
|
|
2359
|
+
},
|
|
2360
|
+
WatchtowerInfo: {
|
|
2361
|
+
type: 'object',
|
|
2362
|
+
properties: {
|
|
2363
|
+
uri: { type: 'string' },
|
|
2364
|
+
pubkey: { type: 'string' },
|
|
2365
|
+
connected: { type: 'boolean' },
|
|
2366
|
+
sessions: { type: 'integer' },
|
|
2367
|
+
pendingBacklog: { type: 'integer' },
|
|
2368
|
+
lastAck: { type: 'integer', nullable: true }
|
|
2369
|
+
}
|
|
2370
|
+
},
|
|
1468
2371
|
HealthInfo: {
|
|
1469
2372
|
type: 'object',
|
|
1470
2373
|
properties: {
|
|
@@ -1519,7 +2422,36 @@ function getOpenApiSpec() {
|
|
|
1519
2422
|
fundingTxid: { type: 'string' },
|
|
1520
2423
|
shortChannelId: { type: 'string' },
|
|
1521
2424
|
feeratePerKw: { type: 'integer' },
|
|
1522
|
-
htlcCount: { type: 'integer' }
|
|
2425
|
+
htlcCount: { type: 'integer' },
|
|
2426
|
+
feeBaseMsat: { type: 'integer' },
|
|
2427
|
+
feeProportionalMillionths: { type: 'integer' },
|
|
2428
|
+
cltvExpiryDelta: { type: 'integer' },
|
|
2429
|
+
htlcMinimumMsat: {
|
|
2430
|
+
type: 'string',
|
|
2431
|
+
description: 'Msat as decimal string'
|
|
2432
|
+
},
|
|
2433
|
+
htlcMaximumMsat: {
|
|
2434
|
+
type: 'string',
|
|
2435
|
+
description: 'Msat as decimal string'
|
|
2436
|
+
}
|
|
2437
|
+
}
|
|
2438
|
+
},
|
|
2439
|
+
ChannelPolicy: {
|
|
2440
|
+
type: 'object',
|
|
2441
|
+
properties: {
|
|
2442
|
+
channelId: { type: 'string' },
|
|
2443
|
+
feeBaseMsat: { type: 'integer' },
|
|
2444
|
+
feeProportionalMillionths: { type: 'integer' },
|
|
2445
|
+
cltvExpiryDelta: { type: 'integer' },
|
|
2446
|
+
htlcMinimumMsat: {
|
|
2447
|
+
type: 'string',
|
|
2448
|
+
description: 'Msat as decimal string'
|
|
2449
|
+
},
|
|
2450
|
+
htlcMaximumMsat: {
|
|
2451
|
+
type: 'string',
|
|
2452
|
+
description: 'Msat as decimal string'
|
|
2453
|
+
},
|
|
2454
|
+
source: { type: 'string', enum: ['override', 'default'] }
|
|
1523
2455
|
}
|
|
1524
2456
|
},
|
|
1525
2457
|
PaymentInfo: {
|
|
@@ -1576,6 +2508,26 @@ function getOpenApiSpec() {
|
|
|
1576
2508
|
status: { type: 'string', enum: ['PENDING', 'PAID', 'EXPIRED'] }
|
|
1577
2509
|
}
|
|
1578
2510
|
},
|
|
2511
|
+
HoldInvoiceInfo: {
|
|
2512
|
+
type: 'object',
|
|
2513
|
+
properties: {
|
|
2514
|
+
paymentHash: { type: 'string' },
|
|
2515
|
+
bolt11: { type: 'string' },
|
|
2516
|
+
state: {
|
|
2517
|
+
type: 'string',
|
|
2518
|
+
enum: ['OPEN', 'ACCEPTED', 'SETTLED', 'CANCELLED']
|
|
2519
|
+
},
|
|
2520
|
+
heldAmountMsat: {
|
|
2521
|
+
type: 'string',
|
|
2522
|
+
description: 'Total msat currently parked'
|
|
2523
|
+
},
|
|
2524
|
+
htlcCount: { type: 'integer' },
|
|
2525
|
+
amountSats: { type: 'integer' },
|
|
2526
|
+
description: { type: 'string' },
|
|
2527
|
+
expiry: { type: 'integer' },
|
|
2528
|
+
createdAt: { type: 'integer' }
|
|
2529
|
+
}
|
|
2530
|
+
},
|
|
1579
2531
|
OfferInfo: {
|
|
1580
2532
|
type: 'object',
|
|
1581
2533
|
properties: {
|
|
@@ -1650,6 +2602,130 @@ function getOpenApiSpec() {
|
|
|
1650
2602
|
cltvDelta: { type: 'integer' }
|
|
1651
2603
|
}
|
|
1652
2604
|
},
|
|
2605
|
+
GraphInfo: {
|
|
2606
|
+
type: 'object',
|
|
2607
|
+
properties: {
|
|
2608
|
+
nodeCount: { type: 'integer' },
|
|
2609
|
+
channelCount: { type: 'integer' },
|
|
2610
|
+
lastSyncAt: {
|
|
2611
|
+
type: 'integer',
|
|
2612
|
+
description: 'Epoch ms of the last gossip/RGS sync this session, if any'
|
|
2613
|
+
}
|
|
2614
|
+
}
|
|
2615
|
+
},
|
|
2616
|
+
GraphChannelPolicy: {
|
|
2617
|
+
type: 'object',
|
|
2618
|
+
description: "One direction's routing policy from a channel_update",
|
|
2619
|
+
properties: {
|
|
2620
|
+
feeBaseMsat: { type: 'integer' },
|
|
2621
|
+
feeProportionalMillionths: { type: 'integer' },
|
|
2622
|
+
cltvExpiryDelta: { type: 'integer' },
|
|
2623
|
+
htlcMinimumMsat: {
|
|
2624
|
+
type: 'string',
|
|
2625
|
+
description: 'Msat as decimal string'
|
|
2626
|
+
},
|
|
2627
|
+
htlcMaximumMsat: {
|
|
2628
|
+
type: 'string',
|
|
2629
|
+
description: 'Msat as decimal string'
|
|
2630
|
+
},
|
|
2631
|
+
disabled: { type: 'boolean' },
|
|
2632
|
+
lastUpdate: {
|
|
2633
|
+
type: 'integer',
|
|
2634
|
+
description: 'channel_update timestamp (seconds)'
|
|
2635
|
+
}
|
|
2636
|
+
}
|
|
2637
|
+
},
|
|
2638
|
+
GraphChannelInfo: {
|
|
2639
|
+
type: 'object',
|
|
2640
|
+
properties: {
|
|
2641
|
+
shortChannelId: {
|
|
2642
|
+
type: 'string',
|
|
2643
|
+
description: '<block>x<txIndex>x<outputIndex>'
|
|
2644
|
+
},
|
|
2645
|
+
node1Pubkey: { type: 'string' },
|
|
2646
|
+
node2Pubkey: { type: 'string' },
|
|
2647
|
+
capacitySats: {
|
|
2648
|
+
type: 'integer',
|
|
2649
|
+
description: 'Best-known lower bound from htlc_maximum_msat (capacity is not gossiped)'
|
|
2650
|
+
},
|
|
2651
|
+
node1Policy: {
|
|
2652
|
+
$ref: '#/components/schemas/GraphChannelPolicy'
|
|
2653
|
+
},
|
|
2654
|
+
node2Policy: {
|
|
2655
|
+
$ref: '#/components/schemas/GraphChannelPolicy'
|
|
2656
|
+
}
|
|
2657
|
+
}
|
|
2658
|
+
},
|
|
2659
|
+
GraphNodeInfo: {
|
|
2660
|
+
type: 'object',
|
|
2661
|
+
properties: {
|
|
2662
|
+
pubkey: { type: 'string' },
|
|
2663
|
+
alias: { type: 'string' },
|
|
2664
|
+
color: { type: 'string' },
|
|
2665
|
+
addresses: {
|
|
2666
|
+
type: 'array',
|
|
2667
|
+
items: {
|
|
2668
|
+
type: 'object',
|
|
2669
|
+
properties: {
|
|
2670
|
+
type: { type: 'integer' },
|
|
2671
|
+
host: { type: 'string' },
|
|
2672
|
+
port: { type: 'integer' }
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2675
|
+
},
|
|
2676
|
+
featuresHex: { type: 'string' },
|
|
2677
|
+
lastUpdate: {
|
|
2678
|
+
type: 'integer',
|
|
2679
|
+
description: 'node_announcement timestamp (seconds)'
|
|
2680
|
+
},
|
|
2681
|
+
channelCount: { type: 'integer' },
|
|
2682
|
+
channels: { type: 'array', items: { type: 'string' } }
|
|
2683
|
+
}
|
|
2684
|
+
},
|
|
2685
|
+
RouteHop: {
|
|
2686
|
+
type: 'object',
|
|
2687
|
+
properties: {
|
|
2688
|
+
pubkey: { type: 'string' },
|
|
2689
|
+
shortChannelId: {
|
|
2690
|
+
type: 'string',
|
|
2691
|
+
description: '<block>x<txIndex>x<outputIndex> (16-char hex also accepted on input)'
|
|
2692
|
+
},
|
|
2693
|
+
amountToForwardMsat: {
|
|
2694
|
+
type: 'string',
|
|
2695
|
+
description: 'Msat as decimal string'
|
|
2696
|
+
},
|
|
2697
|
+
outgoingCltvValue: {
|
|
2698
|
+
type: 'integer',
|
|
2699
|
+
description: 'RELATIVE CLTV delta from pathfinding (absolute height added at send)'
|
|
2700
|
+
},
|
|
2701
|
+
feeMsat: {
|
|
2702
|
+
type: 'string',
|
|
2703
|
+
description: 'Fee this hop charges, msat as decimal string'
|
|
2704
|
+
},
|
|
2705
|
+
cltvExpiryDelta: { type: 'integer' }
|
|
2706
|
+
},
|
|
2707
|
+
required: [
|
|
2708
|
+
'pubkey',
|
|
2709
|
+
'shortChannelId',
|
|
2710
|
+
'amountToForwardMsat',
|
|
2711
|
+
'outgoingCltvValue'
|
|
2712
|
+
]
|
|
2713
|
+
},
|
|
2714
|
+
RouteQueryResult: {
|
|
2715
|
+
type: 'object',
|
|
2716
|
+
properties: {
|
|
2717
|
+
destination: { type: 'string' },
|
|
2718
|
+
amountSats: { type: 'integer' },
|
|
2719
|
+
hops: {
|
|
2720
|
+
type: 'array',
|
|
2721
|
+
items: { $ref: '#/components/schemas/RouteHop' }
|
|
2722
|
+
},
|
|
2723
|
+
totalAmountMsat: { type: 'string' },
|
|
2724
|
+
totalFeeMsat: { type: 'string' },
|
|
2725
|
+
totalCltvDelta: { type: 'integer' },
|
|
2726
|
+
finalCltvExpiry: { type: 'integer' }
|
|
2727
|
+
}
|
|
2728
|
+
},
|
|
1653
2729
|
TxInfo: {
|
|
1654
2730
|
type: 'object',
|
|
1655
2731
|
properties: {
|
|
@@ -1657,6 +2733,45 @@ function getOpenApiSpec() {
|
|
|
1657
2733
|
hex: { type: 'string' }
|
|
1658
2734
|
}
|
|
1659
2735
|
},
|
|
2736
|
+
BoostResult: {
|
|
2737
|
+
type: 'object',
|
|
2738
|
+
properties: {
|
|
2739
|
+
txid: {
|
|
2740
|
+
type: 'string',
|
|
2741
|
+
description: 'Replacement (RBF) or child (CPFP) txid'
|
|
2742
|
+
},
|
|
2743
|
+
hex: { type: 'string' },
|
|
2744
|
+
boostType: { type: 'string', enum: ['rbf', 'cpfp'] },
|
|
2745
|
+
feeSats: { type: 'integer' },
|
|
2746
|
+
originalTxid: { type: 'string' }
|
|
2747
|
+
}
|
|
2748
|
+
},
|
|
2749
|
+
BoostableTransactions: {
|
|
2750
|
+
type: 'object',
|
|
2751
|
+
properties: {
|
|
2752
|
+
rbf: {
|
|
2753
|
+
type: 'array',
|
|
2754
|
+
items: { $ref: '#/components/schemas/OnchainTxInfo' }
|
|
2755
|
+
},
|
|
2756
|
+
cpfp: {
|
|
2757
|
+
type: 'array',
|
|
2758
|
+
items: { $ref: '#/components/schemas/OnchainTxInfo' }
|
|
2759
|
+
}
|
|
2760
|
+
}
|
|
2761
|
+
},
|
|
2762
|
+
ConsolidateResult: {
|
|
2763
|
+
type: 'object',
|
|
2764
|
+
properties: {
|
|
2765
|
+
txid: { type: 'string' },
|
|
2766
|
+
hex: { type: 'string' },
|
|
2767
|
+
utxosConsolidated: { type: 'integer' },
|
|
2768
|
+
address: {
|
|
2769
|
+
type: 'string',
|
|
2770
|
+
description: 'Fresh wallet address holding the merged output'
|
|
2771
|
+
},
|
|
2772
|
+
feeSats: { type: 'integer' }
|
|
2773
|
+
}
|
|
2774
|
+
},
|
|
1660
2775
|
SpliceResult: {
|
|
1661
2776
|
type: 'object',
|
|
1662
2777
|
properties: {
|
|
@@ -1717,6 +2832,84 @@ function getOpenApiSpec() {
|
|
|
1717
2832
|
}
|
|
1718
2833
|
}
|
|
1719
2834
|
},
|
|
2835
|
+
RebalancePlan: {
|
|
2836
|
+
type: 'object',
|
|
2837
|
+
properties: {
|
|
2838
|
+
fromChannelId: {
|
|
2839
|
+
type: 'string',
|
|
2840
|
+
description: 'Channel to push liquidity out of'
|
|
2841
|
+
},
|
|
2842
|
+
toChannelId: {
|
|
2843
|
+
type: 'string',
|
|
2844
|
+
description: 'Channel to pull liquidity in on'
|
|
2845
|
+
},
|
|
2846
|
+
amountSats: { type: 'integer' },
|
|
2847
|
+
reason: { type: 'string' }
|
|
2848
|
+
},
|
|
2849
|
+
required: ['fromChannelId', 'toChannelId', 'amountSats', 'reason']
|
|
2850
|
+
},
|
|
2851
|
+
AdvisorRecommendations: {
|
|
2852
|
+
allOf: [
|
|
2853
|
+
{ $ref: '#/components/schemas/LiquiditySnapshot' },
|
|
2854
|
+
{
|
|
2855
|
+
type: 'object',
|
|
2856
|
+
properties: {
|
|
2857
|
+
rebalancePlan: {
|
|
2858
|
+
type: 'array',
|
|
2859
|
+
items: { $ref: '#/components/schemas/RebalancePlan' },
|
|
2860
|
+
description: 'Circular rebalances the executor would run (nothing is executed by this endpoint)'
|
|
2861
|
+
}
|
|
2862
|
+
}
|
|
2863
|
+
}
|
|
2864
|
+
]
|
|
2865
|
+
},
|
|
2866
|
+
RebalanceResult: {
|
|
2867
|
+
type: 'object',
|
|
2868
|
+
properties: {
|
|
2869
|
+
paymentHash: { type: 'string' },
|
|
2870
|
+
amountSats: { type: 'integer' },
|
|
2871
|
+
feeMsat: {
|
|
2872
|
+
type: 'string',
|
|
2873
|
+
description: 'Routing fee paid, msat as decimal string'
|
|
2874
|
+
},
|
|
2875
|
+
feeSats: { type: 'integer' },
|
|
2876
|
+
hops: { type: 'integer' }
|
|
2877
|
+
},
|
|
2878
|
+
required: ['paymentHash', 'amountSats', 'feeMsat', 'feeSats', 'hops']
|
|
2879
|
+
},
|
|
2880
|
+
RebalanceExecutionSummary: {
|
|
2881
|
+
type: 'object',
|
|
2882
|
+
properties: {
|
|
2883
|
+
attempts: {
|
|
2884
|
+
type: 'array',
|
|
2885
|
+
items: {
|
|
2886
|
+
type: 'object',
|
|
2887
|
+
properties: {
|
|
2888
|
+
fromChannelId: { type: 'string' },
|
|
2889
|
+
toChannelId: { type: 'string' },
|
|
2890
|
+
amountSats: { type: 'integer' },
|
|
2891
|
+
status: {
|
|
2892
|
+
type: 'string',
|
|
2893
|
+
enum: ['SUCCEEDED', 'FAILED', 'SKIPPED_BUDGET']
|
|
2894
|
+
},
|
|
2895
|
+
feeMsat: { type: 'string' },
|
|
2896
|
+
error: { type: 'string' }
|
|
2897
|
+
}
|
|
2898
|
+
}
|
|
2899
|
+
},
|
|
2900
|
+
succeeded: { type: 'integer' },
|
|
2901
|
+
failed: { type: 'integer' },
|
|
2902
|
+
skippedBudget: { type: 'integer' },
|
|
2903
|
+
feeSpentMsat: {
|
|
2904
|
+
type: 'string',
|
|
2905
|
+
description: 'Fees spent by this run, msat as decimal string'
|
|
2906
|
+
},
|
|
2907
|
+
budgetRemainingMsat: {
|
|
2908
|
+
type: 'string',
|
|
2909
|
+
description: 'Remaining budget for the current UTC day'
|
|
2910
|
+
}
|
|
2911
|
+
}
|
|
2912
|
+
},
|
|
1720
2913
|
LiquidityRecommendation: {
|
|
1721
2914
|
type: 'object',
|
|
1722
2915
|
properties: {
|