From: 志宇 Date: Sat, 13 Jan 2024 10:33:01 +0000 (+0800) Subject: feat(chain): add `SpkIterator::descriptor` method X-Git-Tag: v1.0.0-alpha.4~2^2~4 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/struct.CommandStringError.html?a=commitdiff_plain;h=81aeaba48a980a7e7add76ac2d24e896bedaa1d2;p=bdk feat(chain): add `SpkIterator::descriptor` method Otherwise there will be no way to view the descriptor of the `SpkIterator`. --- diff --git a/crates/chain/src/spk_iter.rs b/crates/chain/src/spk_iter.rs index a28944f1..2772dcf7 100644 --- a/crates/chain/src/spk_iter.rs +++ b/crates/chain/src/spk_iter.rs @@ -87,6 +87,11 @@ where secp: Secp256k1::verification_only(), } } + + /// Get a reference to the internal descriptor. + pub fn descriptor(&self) -> &D { + &self.descriptor + } } impl Iterator for SpkIterator