#[macro_export]
macro_rules! impl_client_v29__dump_tx_out_set {
() => {
impl Client {
pub fn dump_tx_out_set(&self, path: &str, snapshot_type: &str) -> Result<DumpTxOutSet> {
self.call("dumptxoutset", &[path.into(), snapshot_type.into()])
}
}
};
}
#[macro_export]
macro_rules! impl_client_v29__get_descriptor_activity {
() => {
impl Client {
pub fn get_descriptor_activity(&self) -> Result<GetDescriptorActivity> {
let block_hashes: &[BlockHash] = &[];
let scan_objects: &[&str] = &[];
let params = vec![json!(block_hashes), json!(scan_objects)];
self.call("getdescriptoractivity", ¶ms)
}
}
};
}
#[macro_export]
macro_rules! impl_client_v29__get_block {
() => {
impl Client {
pub fn get_block(&self, hash: BlockHash) -> Result<Block> {
let json = self.get_block_verbose_zero(hash)?;
Ok(json.block()?)
}
pub fn get_block_verbose_zero(&self, hash: BlockHash) -> Result<GetBlockVerboseZero> {
self.call("getblock", &[into_json(hash)?, 0.into()])
}
pub fn get_block_verbose_one(&self, hash: BlockHash) -> Result<GetBlockVerboseOne> {
self.call("getblock", &[into_json(hash)?, 1.into()])
}
pub fn get_block_verbose_two(&self, hash: BlockHash) -> Result<GetBlockVerboseTwo> {
self.call("getblock", &[into_json(hash)?, 2.into()])
}
pub fn get_block_verbose_three(&self, hash: BlockHash) -> Result<GetBlockVerboseThree> {
self.call("getblock", &[into_json(hash)?, 3.into()])
}
}
};
}