From 9d1a2763ca2017bd7bb3047c964772bda8ba79bb Mon Sep 17 00:00:00 2001 From: thunderbiscuit Date: Wed, 31 Jul 2024 09:27:27 -0500 Subject: [PATCH] feat: expose derivation_index method on wallet type --- bdk-ffi/src/bdk.udl | 2 ++ bdk-ffi/src/wallet.rs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/bdk-ffi/src/bdk.udl b/bdk-ffi/src/bdk.udl index 24a2c1ed..41f6313a 100644 --- a/bdk-ffi/src/bdk.udl +++ b/bdk-ffi/src/bdk.udl @@ -391,6 +391,8 @@ interface Wallet { [Name=load, Throws=LoadWithPersistError] constructor(Descriptor descriptor, Descriptor change_descriptor, Connection connection); + u32? derivation_index(KeychainKind keychain); + AddressInfo reveal_next_address(KeychainKind keychain); Network network(); diff --git a/bdk-ffi/src/wallet.rs b/bdk-ffi/src/wallet.rs index 2a374399..8d6d632b 100644 --- a/bdk-ffi/src/wallet.rs +++ b/bdk-ffi/src/wallet.rs @@ -85,6 +85,10 @@ impl Wallet { .map_err(CannotConnectError::from) } + pub(crate) fn derivation_index(&self, keychain: KeychainKind) -> Option { + self.get_wallet().derivation_index(keychain) + } + pub fn network(&self) -> Network { self.get_wallet().network() }