We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 26b7871 commit c2daffbCopy full SHA for c2daffb
bdk-ffi/src/esplora.rs
@@ -178,6 +178,18 @@ impl EsploraClient {
178
.map_err(EsploraError::from)
179
}
180
181
+ /// Get a `Txid` of a transaction given its index in a block with a given hash.
182
+ pub fn get_txid_at_block_index(
183
+ &self,
184
+ block_hash: Arc<BlockHash>,
185
+ index: u64,
186
+ ) -> Result<Option<Arc<Txid>>, EsploraError> {
187
+ self.0
188
+ .get_txid_at_block_index(&block_hash.0, index as usize)
189
+ .map(|txid| txid.map(Txid).map(Arc::new))
190
+ .map_err(EsploraError::from)
191
+ }
192
+
193
/// Get a `Header` given a particular block hash.
194
pub fn get_header_by_hash(&self, block_hash: Arc<BlockHash>) -> Result<Header, EsploraError> {
195
self.0
0 commit comments