@@ -39,6 +39,7 @@ interface Builder {
3939 void set_chain_source_bitcoind_rpc(string rpc_host, u16 rpc_port, string rpc_user, string rpc_password);
4040 void set_gossip_source_p2p();
4141 void set_gossip_source_rgs(string rgs_server_url);
42+ void set_liquidity_source_lsps1(PublicKey node_id, SocketAddress address, string? token);
4243 void set_liquidity_source_lsps2(PublicKey node_id, SocketAddress address, string? token);
4344 void set_storage_dir_path(string storage_dir_path);
4445 void set_network(Network network);
@@ -78,6 +79,7 @@ interface Node {
7879 SpontaneousPayment spontaneous_payment();
7980 OnchainPayment onchain_payment();
8081 UnifiedQrPayment unified_qr_payment();
82+ Lsps1Liquidity lsps1_liquidity();
8183 [Throws=NodeError]
8284 void connect(PublicKey node_id, SocketAddress address, boolean persist);
8385 [Throws=NodeError]
@@ -173,6 +175,13 @@ interface UnifiedQrPayment {
173175 QrPaymentResult send([ByRef]string uri_str);
174176};
175177
178+ interface Lsps1Liquidity {
179+ [Throws=NodeError]
180+ LSPS1OrderStatus request_channel(u64 lsp_balance_sat, u64 client_balance_sat, u32 channel_expiry_blocks, boolean announce_channel);
181+ [Throws=NodeError]
182+ LSPS1OrderStatus check_order_status(OrderId order_id);
183+ };
184+
176185[Error]
177186enum NodeError {
178187 "AlreadyRunning",
@@ -220,6 +229,8 @@ enum NodeError {
220229 "InvalidUri",
221230 "InvalidQuantity",
222231 "InvalidNodeAlias",
232+ "InvalidDateTime",
233+ "InvalidFeeRate",
223234 "DuplicatePayment",
224235 "UnsupportedCurrency",
225236 "InsufficientFunds",
@@ -370,6 +381,59 @@ dictionary CustomTlvRecord {
370381 sequence<u8> value;
371382};
372383
384+ dictionary LSPS1OrderStatus {
385+ OrderId order_id;
386+ OrderParameters order_params;
387+ PaymentInfo payment_options;
388+ ChannelOrderInfo? channel_state;
389+ };
390+
391+ dictionary OrderParameters {
392+ u64 lsp_balance_sat;
393+ u64 client_balance_sat;
394+ u16 required_channel_confirmations;
395+ u16 funding_confirms_within_blocks;
396+ u32 channel_expiry_blocks;
397+ string? token;
398+ boolean announce_channel;
399+ };
400+
401+ dictionary PaymentInfo {
402+ Bolt11PaymentInfo? bolt11;
403+ OnchainPaymentInfo? onchain;
404+ };
405+
406+ dictionary Bolt11PaymentInfo {
407+ PaymentState state;
408+ DateTime expires_at;
409+ u64 fee_total_sat;
410+ u64 order_total_sat;
411+ Bolt11Invoice invoice;
412+ };
413+
414+ dictionary OnchainPaymentInfo {
415+ PaymentState state;
416+ DateTime expires_at;
417+ u64 fee_total_sat;
418+ u64 order_total_sat;
419+ Address address;
420+ u16? min_onchain_payment_confirmations;
421+ FeeRate min_fee_for_0conf;
422+ Address? refund_onchain_address;
423+ };
424+
425+ dictionary ChannelOrderInfo {
426+ DateTime funded_at;
427+ OutPoint funding_outpoint;
428+ DateTime expires_at;
429+ };
430+
431+ enum PaymentState {
432+ "ExpectPayment",
433+ "Paid",
434+ "Refunded",
435+ };
436+
373437[Enum]
374438interface MaxTotalRoutingFeeLimit {
375439 None ();
@@ -622,3 +686,12 @@ typedef string UntrustedString;
622686
623687[Custom]
624688typedef string NodeAlias;
689+
690+ [Custom]
691+ typedef string OrderId;
692+
693+ [Custom]
694+ typedef string DateTime;
695+
696+ [Custom]
697+ typedef string FeeRate;
0 commit comments