Skip to main content

zebra_rpc/
client.rs

1//! Client for Zebra's RPC server.
2//! Types, constants, and functions needed by clients of Zebra's RPC server
3//
4// Re-exports types to build the API. We want to flatten the module substructure
5// which is split mostly to keep file sizes small. Additionally, we re-export
6// types from other crates which are exposed in the API.
7//
8// TODO: Move `hex_data` and `trees` modules to/under the `types` module?
9
10pub use zebra_chain;
11
12#[allow(deprecated)]
13pub use crate::methods::{
14    hex_data::HexData,
15    trees::{
16        Commitments, GetSubtreesByIndexResponse, GetTreestateResponse, SubtreeRpcData, Treestate,
17    },
18    types::{
19        default_roots::DefaultRoots,
20        get_block_template::{
21            BlockProposalResponse, BlockTemplateResponse, BlockTemplateTimeSource,
22            GetBlockTemplateCapability, GetBlockTemplateParameters, GetBlockTemplateRequestMode,
23            GetBlockTemplateResponse,
24        },
25        get_blockchain_info::GetBlockchainInfoBalance,
26        get_mining_info::GetMiningInfoResponse,
27        get_raw_mempool::{GetRawMempoolResponse, MempoolObject},
28        network_info::GetNetworkInfoResponse,
29        peer_info::{GetPeerInfoResponse, PeerInfo},
30        submit_block::{SubmitBlockErrorResponse, SubmitBlockResponse},
31        subsidy::{BlockSubsidy, FundingStream, GetBlockSubsidyResponse},
32        transaction::{
33            Input, JoinSplit, Orchard, OrchardAction, OrchardFlags, Output, ScriptPubKey,
34            ScriptSig, ShieldedOutput, ShieldedSpend, TransactionObject, TransactionTemplate,
35        },
36        unified_address::ZListUnifiedReceiversResponse,
37        validate_address::ValidateAddressResponse,
38        z_validate_address::{ZValidateAddressResponse, ZValidateAddressType},
39    },
40    AddressStrings, BlockHeaderObject, BlockObject, GetAddressBalanceRequest,
41    GetAddressBalanceResponse, GetAddressTxIdsRequest, GetAddressUtxosResponse,
42    GetAddressUtxosResponseObject, GetBlockHashResponse, GetBlockHeaderResponse,
43    GetBlockHeightAndHashResponse, GetBlockResponse, GetBlockTransaction, GetBlockTrees,
44    GetBlockchainInfoResponse, GetInfoResponse, GetRawTransactionResponse, Hash,
45    SendRawTransactionResponse, Utxo,
46};
47
48/// Constants needed by clients of Zebra's RPC server
49// TODO: Export all other constants?
50pub use crate::methods::types::long_poll::LONG_POLL_ID_LENGTH;