From 4925a8d7484cac05ef0b0d44cf551360e2771bac Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Tue, 22 Oct 2024 17:20:37 -0400 Subject: [PATCH] feat: expose Policy::id method --- bdk-ffi/src/bdk.udl | 4 +++- bdk-ffi/src/types.rs | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bdk-ffi/src/bdk.udl b/bdk-ffi/src/bdk.udl index 4a7373f2..61985e13 100644 --- a/bdk-ffi/src/bdk.udl +++ b/bdk-ffi/src/bdk.udl @@ -444,7 +444,9 @@ interface Wallet { interface Update {}; -interface Policy {}; +interface Policy { + string id(); +}; interface TxBuilder { constructor(); diff --git a/bdk-ffi/src/types.rs b/bdk-ffi/src/types.rs index 392d4539..d8ff5ea5 100644 --- a/bdk-ffi/src/types.rs +++ b/bdk-ffi/src/types.rs @@ -251,3 +251,8 @@ impl From for BdkPolicy { value.0 } } +impl Policy { + pub fn id(&self) -> String { + self.0.id.clone() + } +}