corepc_client/client_sync/v29/hidden.rs
1// SPDX-License-Identifier: CC0-1.0
2
3//! Macros for implementing JSON-RPC methods on a client.
4//!
5//! Specifically this is `== Hidden ==` methods that are not listed in the
6//! API docs of Bitcoin Core `v29`.
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 `getorphantxs` verbosity level 0.
13#[macro_export]
14macro_rules! impl_client_v29__get_orphan_txs {
15 () => {
16 impl Client {
17 pub fn get_orphan_txs(&self) -> Result<GetOrphanTxs> { self.call("getorphantxs", &[]) }
18 }
19 };
20}
21
22/// Implements Bitcoin Core JSON-RPC API method `getorphantxs` verbosity level 1.
23#[macro_export]
24macro_rules! impl_client_v29__get_orphan_txs_verbosity_1 {
25 () => {
26 impl Client {
27 pub fn get_orphan_txs_verbosity_1(&self) -> Result<GetOrphanTxsVerboseOne> {
28 self.call("getorphantxs", &[into_json(1)?])
29 }
30 }
31 };
32}
33
34/// Implements Bitcoin Core JSON-RPC API method `getorphantxs` verbosity level 2.
35#[macro_export]
36macro_rules! impl_client_v29__get_orphan_txs_verbosity_2 {
37 () => {
38 impl Client {
39 pub fn get_orphan_txs_verbosity_2(&self) -> Result<GetOrphanTxsVerboseTwo> {
40 self.call("getorphantxs", &[into_json(2)?])
41 }
42 }
43 };
44}