expose: get_address peek

This commit is contained in:
Ed Ball authored and thunderbiscuit committed 2023-02-02 12:25:42 -05:00
1 parent aa842c3844
commit 7fefb8a7b9
2 files changed
+9 -3

No files matched your search

+5 -3
View File
@@ -53,9 +53,11 @@ dictionary AddressInfo {
string address;
};
enum AddressIndex {
"New",
"LastUnused",
[Enum]
interface AddressIndex {
New();
LastUnused();
Peek(u32 index);
};
enum Network {
+4
View File
@@ -69,6 +69,9 @@ pub enum AddressIndex {
/// caller is untrusted; for example when deriving donation addresses on-demand for a public
/// web page.
LastUnused,
Peek {
index: u32,
},
}
impl From<AddressIndex> for BdkAddressIndex {
@@ -76,6 +79,7 @@ impl From<AddressIndex> for BdkAddressIndex {
match x {
AddressIndex::New => BdkAddressIndex::New,
AddressIndex::LastUnused => BdkAddressIndex::LastUnused,
AddressIndex::Peek { index } => BdkAddressIndex::Peek(index),
}
}
}