corepc_client/client_sync/v29/
blockchain.rs1#[macro_export]
14macro_rules! impl_client_v29__dump_tx_out_set {
15 () => {
16 impl Client {
17 pub fn dump_tx_out_set(&self, path: &str, snapshot_type: &str) -> Result<DumpTxOutSet> {
18 self.call("dumptxoutset", &[path.into(), snapshot_type.into()])
19 }
20 }
21 };
22}
23
24#[macro_export]
26macro_rules! impl_client_v29__get_descriptor_activity {
27 () => {
28 impl Client {
29 pub fn get_descriptor_activity(&self) -> Result<GetDescriptorActivity> {
30 let block_hashes: &[BlockHash] = &[];
31 let scan_objects: &[&str] = &[];
32 let params = vec![json!(block_hashes), json!(scan_objects)];
34 self.call("getdescriptoractivity", ¶ms)
35 }
36 }
37 };
38}
39
40#[macro_export]
42macro_rules! impl_client_v29__get_block {
43 () => {
44 impl Client {
45 pub fn get_block(&self, hash: BlockHash) -> Result<Block> {
47 let json = self.get_block_verbose_zero(hash)?;
48 Ok(json.block()?)
49 }
50
51 pub fn get_block_verbose_zero(&self, hash: BlockHash) -> Result<GetBlockVerboseZero> {
53 self.call("getblock", &[into_json(hash)?, 0.into()])
54 }
55
56 pub fn get_block_verbose_one(&self, hash: BlockHash) -> Result<GetBlockVerboseOne> {
58 self.call("getblock", &[into_json(hash)?, 1.into()])
59 }
60
61 pub fn get_block_verbose_two(&self, hash: BlockHash) -> Result<GetBlockVerboseTwo> {
63 self.call("getblock", &[into_json(hash)?, 2.into()])
64 }
65
66 pub fn get_block_verbose_three(&self, hash: BlockHash) -> Result<GetBlockVerboseThree> {
68 self.call("getblock", &[into_json(hash)?, 3.into()])
69 }
70 }
71 };
72}