]> Untitled Git - bdk/commitdiff
feat(chain): add `SpkIterator::descriptor` method
author志宇 <hello@evanlinjin.me>
Sat, 13 Jan 2024 10:33:01 +0000 (18:33 +0800)
committer志宇 <hello@evanlinjin.me>
Wed, 17 Jan 2024 03:17:25 +0000 (11:17 +0800)
Otherwise there will be no way to view the descriptor of the
`SpkIterator`.

crates/chain/src/spk_iter.rs

index a28944f1e18db58ec6154e090d945c5a4b88b6f4..2772dcf7ca613740643a09b9008091a06d700f80 100644 (file)
@@ -87,6 +87,11 @@ where
             secp: Secp256k1::verification_only(),
         }
     }
+
+    /// Get a reference to the internal descriptor.
+    pub fn descriptor(&self) -> &D {
+        &self.descriptor
+    }
 }
 
 impl<D> Iterator for SpkIterator<D>