@@ -56,10 +56,6 @@ interface LDKNode {
56
56
[Throws=NodeError]
57
57
Txid send_all_to_onchain_address([ByRef]Address address);
58
58
[Throws=NodeError]
59
- u64 spendable_onchain_balance_sats();
60
- [Throws=NodeError]
61
- u64 total_onchain_balance_sats();
62
- [Throws=NodeError]
63
59
void connect(PublicKey node_id, SocketAddress address, boolean persist);
64
60
[Throws=NodeError]
65
61
void disconnect(PublicKey node_id);
@@ -94,6 +90,7 @@ interface LDKNode {
94
90
PaymentDetails? payment([ByRef]PaymentHash payment_hash);
95
91
[Throws=NodeError]
96
92
void remove_payment([ByRef]PaymentHash payment_hash);
93
+ BalanceDetails list_balances();
97
94
sequence<PaymentDetails> list_payments();
98
95
sequence<PeerDetails> list_peers();
99
96
sequence<ChannelDetails> list_channels();
@@ -235,7 +232,6 @@ dictionary ChannelDetails {
235
232
u64? unspendable_punishment_reserve;
236
233
UserChannelId user_channel_id;
237
234
u32 feerate_sat_per_1000_weight;
238
- u64 balance_msat;
239
235
u64 outbound_capacity_msat;
240
236
u64 inbound_capacity_msat;
241
237
u32? confirmations_required;
@@ -266,6 +262,31 @@ dictionary PeerDetails {
266
262
boolean is_connected;
267
263
};
268
264
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
+
269
290
interface ChannelConfig {
270
291
constructor();
271
292
u32 forwarding_fee_proportional_millionths();
@@ -294,6 +315,9 @@ enum LogLevel {
294
315
[Custom]
295
316
typedef string Txid;
296
317
318
+ [Custom]
319
+ typedef string BlockHash;
320
+
297
321
[Custom]
298
322
typedef string SocketAddress;
299
323
0 commit comments