@@ -58,10 +58,11 @@ interface Builder {
58
58
void set_chain_source_bitcoind_rpc(string rpc_host, u16 rpc_port, string rpc_user, string rpc_password);
59
59
void set_gossip_source_p2p();
60
60
void set_gossip_source_rgs(string rgs_server_url);
61
- void set_liquidity_source_lsps2(SocketAddress address, PublicKey node_id, string? token);
61
+ void set_liquidity_source_lsps1(PublicKey node_id, SocketAddress address, string? token);
62
+ void set_liquidity_source_lsps2(PublicKey node_id, SocketAddress address, string? token);
62
63
void set_storage_dir_path(string storage_dir_path);
63
- void set_filesystem_logger(string? log_file_path, LogLevel? log_level );
64
- void set_log_facade_logger(LogLevel log_level );
64
+ void set_filesystem_logger(string? log_file_path, LogLevel? max_log_level );
65
+ void set_log_facade_logger(LogLevel? max_log_level );
65
66
void set_custom_logger(LogWriter log_writer);
66
67
void set_network(Network network);
67
68
[Throws=BuildError]
@@ -100,6 +101,7 @@ interface Node {
100
101
SpontaneousPayment spontaneous_payment();
101
102
OnchainPayment onchain_payment();
102
103
UnifiedQrPayment unified_qr_payment();
104
+ LSPS1Liquidity lsps1_liquidity();
103
105
[Throws=NodeError]
104
106
void connect(PublicKey node_id, SocketAddress address, boolean persist);
105
107
[Throws=NodeError]
@@ -126,6 +128,8 @@ interface Node {
126
128
NetworkGraph network_graph();
127
129
string sign_message([ByRef]sequence<u8> msg);
128
130
boolean verify_signature([ByRef]sequence<u8> msg, [ByRef]string sig, [ByRef]PublicKey pkey);
131
+ [Throws=NodeError]
132
+ bytes export_pathfinding_scores();
129
133
};
130
134
131
135
[Enum]
@@ -211,6 +215,13 @@ interface UnifiedQrPayment {
211
215
QrPaymentResult send([ByRef]string uri_str);
212
216
};
213
217
218
+ interface LSPS1Liquidity {
219
+ [Throws=NodeError]
220
+ LSPS1OrderStatus request_channel(u64 lsp_balance_sat, u64 client_balance_sat, u32 channel_expiry_blocks, boolean announce_channel);
221
+ [Throws=NodeError]
222
+ LSPS1OrderStatus check_order_status(OrderId order_id);
223
+ };
224
+
214
225
[Error]
215
226
enum NodeError {
216
227
"AlreadyRunning",
@@ -258,6 +269,8 @@ enum NodeError {
258
269
"InvalidUri",
259
270
"InvalidQuantity",
260
271
"InvalidNodeAlias",
272
+ "InvalidDateTime",
273
+ "InvalidFeeRate",
261
274
"DuplicatePayment",
262
275
"UnsupportedCurrency",
263
276
"InsufficientFunds",
@@ -416,6 +429,59 @@ dictionary CustomTlvRecord {
416
429
sequence<u8> value;
417
430
};
418
431
432
+ dictionary LSPS1OrderStatus {
433
+ OrderId order_id;
434
+ OrderParameters order_params;
435
+ PaymentInfo payment_options;
436
+ ChannelOrderInfo? channel_state;
437
+ };
438
+
439
+ dictionary OrderParameters {
440
+ u64 lsp_balance_sat;
441
+ u64 client_balance_sat;
442
+ u16 required_channel_confirmations;
443
+ u16 funding_confirms_within_blocks;
444
+ u32 channel_expiry_blocks;
445
+ string? token;
446
+ boolean announce_channel;
447
+ };
448
+
449
+ dictionary PaymentInfo {
450
+ Bolt11PaymentInfo? bolt11;
451
+ OnchainPaymentInfo? onchain;
452
+ };
453
+
454
+ dictionary Bolt11PaymentInfo {
455
+ PaymentState state;
456
+ DateTime expires_at;
457
+ u64 fee_total_sat;
458
+ u64 order_total_sat;
459
+ Bolt11Invoice invoice;
460
+ };
461
+
462
+ dictionary OnchainPaymentInfo {
463
+ PaymentState state;
464
+ DateTime expires_at;
465
+ u64 fee_total_sat;
466
+ u64 order_total_sat;
467
+ Address address;
468
+ u16? min_onchain_payment_confirmations;
469
+ FeeRate min_fee_for_0conf;
470
+ Address? refund_onchain_address;
471
+ };
472
+
473
+ dictionary ChannelOrderInfo {
474
+ DateTime funded_at;
475
+ OutPoint funding_outpoint;
476
+ DateTime expires_at;
477
+ };
478
+
479
+ enum PaymentState {
480
+ "ExpectPayment",
481
+ "Paid",
482
+ "Refunded",
483
+ };
484
+
419
485
[Enum]
420
486
interface MaxTotalRoutingFeeLimit {
421
487
None ();
@@ -662,3 +728,9 @@ typedef string UntrustedString;
662
728
663
729
[Custom]
664
730
typedef string NodeAlias;
731
+
732
+ [Custom]
733
+ typedef string OrderId;
734
+
735
+ [Custom]
736
+ typedef string DateTime;
0 commit comments