Skip to content

Commit 9d22588

Browse files
feat: Convert Bolt11Invoice from string type to full interface in UDL
- Replace [Custom] typedef string Bolt11Invoice with interface definition - Define required Bolt11Invoice methods in the UDL interface (expiry_time, min_final_cltv_expiry_delta, amount_milli_satoshis, is_expired, etc.)
1 parent 5abb42f commit 9d22588

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

bindings/ldk_node.udl

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,18 @@ dictionary NodeAnnouncementInfo {
693693
sequence<SocketAddress> addresses;
694694
};
695695

696+
interface Bolt11Invoice {
697+
sequence<u8> signable_hash();
698+
u64 expiry_time();
699+
u64 min_final_cltv_expiry_delta();
700+
u64? amount_milli_satoshis();
701+
boolean is_expired();
702+
u64 duration_since_epoch();
703+
boolean would_expire(u64 at_time);
704+
u64 duration_until_expiry();
705+
PaymentHash payment_hash();
706+
};
707+
696708
[Custom]
697709
typedef string Txid;
698710

@@ -711,9 +723,6 @@ typedef string NodeId;
711723
[Custom]
712724
typedef string Address;
713725

714-
[Custom]
715-
typedef string Bolt11Invoice;
716-
717726
[Custom]
718727
typedef string Offer;
719728

0 commit comments

Comments
 (0)