Skip to content

Commit

Permalink
Temp 19: Add Balance type
Browse files Browse the repository at this point in the history
  • Loading branch information
thunderbiscuit committed Oct 11, 2023
1 parent be982c7 commit 70815a6
Show file tree
Hide file tree
Showing 4 changed files with 312 additions and 258 deletions.
22 changes: 22 additions & 0 deletions bdk-ffi/src/bdk.udl
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ interface Wallet {
constructor(Descriptor descriptor, Descriptor? change_descriptor, Network network, WalletType wallet_type);

AddressInfo get_address(AddressIndex address_index);

Network network();

Balance get_balance();
};

enum WalletType {
Expand All @@ -148,6 +152,10 @@ interface Address {
[Throws=BdkError]
constructor(string address, Network network);

Network network();

string to_qr_uri();

string as_string();
};

Expand All @@ -163,3 +171,17 @@ interface AddressIndex {
LastUnused();
Peek(u32 index);
};

interface Balance {
u64 immature();

u64 trusted_pending();

u64 untrusted_pending();

u64 confirmed();

u64 trusted_spendable();

u64 total();
};
Loading

0 comments on commit 70815a6

Please sign in to comment.