corepc_client/client_sync/v30/blockchain.rs
1// SPDX-License-Identifier: CC0-1.0
2
3//! Macros for implementing JSON-RPC methods on a client.
4//!
5//! Specifically this is methods found under the `== Blockchain ==` section of the
6//! API docs of Bitcoin Core `v30`.
7//!
8//! All macros require `Client` to be in scope.
9//!
10//! See or use the `define_jsonrpc_bitreq_client!` macro to define a `Client`.
11
12/// Implements Bitcoin Core JSON-RPC API method `getdescriptoractivity`.
13#[macro_export]
14macro_rules! impl_client_v30__get_descriptor_activity {
15 () => {
16 impl Client {
17 pub fn get_descriptor_activity(
18 &self,
19 block_hashes: &[BlockHash],
20 scan_objects: &[&str],
21 ) -> Result<GetDescriptorActivity> {
22 let params = vec![json!(block_hashes), json!(scan_objects)];
23 self.call("getdescriptoractivity", ¶ms)
24 }
25 }
26 };
27}