corepc_client/client_sync/v18/
network.rs

1// SPDX-License-Identifier: CC0-1.0
2
3//! Macros for implementing JSON-RPC methods on a client.
4//!
5//! Requires `Client` to be in scope.
6//!
7//! Specifically this is methods found under the `== Network ==` section of the
8//! API docs of Bitcoin Core `v0.18`.
9//!
10//! See, or use the `define_jsonrpc_minreq_client!` macro to define a `Client`.
11
12/// Implements Bitcoin Core JSON-RPC API method `getnodeaddresses`.
13#[macro_export]
14macro_rules! impl_client_v18__get_node_addresses {
15    () => {
16        impl Client {
17            pub fn get_node_addresses(&self) -> Result<GetNodeAddresses> {
18                self.call("getnodeaddresses", &[])
19            }
20        }
21    };
22}