@@ -56,10 +56,6 @@ interface LDKNode {
5656 [Throws=NodeError]
5757 Txid send_all_to_onchain_address([ByRef]Address address);
5858 [Throws=NodeError]
59- u64 spendable_onchain_balance_sats();
60- [Throws=NodeError]
61- u64 total_onchain_balance_sats();
62- [Throws=NodeError]
6359 void connect(PublicKey node_id, SocketAddress address, boolean persist);
6460 [Throws=NodeError]
6561 void disconnect(PublicKey node_id);
@@ -94,6 +90,7 @@ interface LDKNode {
9490 PaymentDetails? payment([ByRef]PaymentHash payment_hash);
9591 [Throws=NodeError]
9692 void remove_payment([ByRef]PaymentHash payment_hash);
93+ BalanceDetails list_balances();
9794 sequence<PaymentDetails> list_payments();
9895 sequence<PeerDetails> list_peers();
9996 sequence<ChannelDetails> list_channels();
@@ -235,7 +232,6 @@ dictionary ChannelDetails {
235232 u64? unspendable_punishment_reserve;
236233 UserChannelId user_channel_id;
237234 u32 feerate_sat_per_1000_weight;
238- u64 balance_msat;
239235 u64 outbound_capacity_msat;
240236 u64 inbound_capacity_msat;
241237 u32? confirmations_required;
@@ -266,6 +262,31 @@ dictionary PeerDetails {
266262 boolean is_connected;
267263};
268264
265+ [Enum]
266+ interface LightningBalance {
267+ ClaimableOnChannelClose ( ChannelId channel_id, PublicKey counterparty_node_id, u64 amount_satoshis );
268+ ClaimableAwaitingConfirmations ( ChannelId channel_id, PublicKey counterparty_node_id, u64 amount_satoshis, u32 confirmation_height );
269+ ContentiousClaimable ( ChannelId channel_id, PublicKey counterparty_node_id, u64 amount_satoshis, u32 timeout_height, PaymentHash payment_hash, PaymentPreimage payment_preimage );
270+ MaybeTimeoutClaimableHTLC ( ChannelId channel_id, PublicKey counterparty_node_id, u64 amount_satoshis, u32 claimable_height, PaymentHash payment_hash);
271+ MaybePreimageClaimableHTLC ( ChannelId channel_id, PublicKey counterparty_node_id, u64 amount_satoshis, u32 expiry_height, PaymentHash payment_hash);
272+ CounterpartyRevokedOutputClaimable ( ChannelId channel_id, PublicKey counterparty_node_id, u64 amount_satoshis );
273+ };
274+
275+ [Enum]
276+ interface PendingSweepBalance {
277+ PendingBroadcast ( ChannelId? channel_id, u64 amount_satoshis );
278+ BroadcastAwaitingConfirmation ( ChannelId? channel_id, u32 latest_broadcast_height, Txid latest_spending_txid, u64 amount_satoshis );
279+ AwaitingThresholdConfirmations ( ChannelId? channel_id, Txid latest_spending_txid, BlockHash confirmation_hash, u32 confirmation_height, u64 amount_satoshis);
280+ };
281+
282+ dictionary BalanceDetails {
283+ u64 total_onchain_balance_sats;
284+ u64 spendable_onchain_balance_sats;
285+ u64 total_lightning_balance_sats;
286+ sequence<LightningBalance> lightning_balances;
287+ sequence<PendingSweepBalance> pending_balances_from_channel_closures;
288+ };
289+
269290interface ChannelConfig {
270291 constructor();
271292 u32 forwarding_fee_proportional_millionths();
@@ -294,6 +315,9 @@ enum LogLevel {
294315[Custom]
295316typedef string Txid;
296317
318+ [Custom]
319+ typedef string BlockHash;
320+
297321[Custom]
298322typedef string SocketAddress;
299323
0 commit comments