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        peer_info::{GetPeerInfoResponse, PeerInfo},
29        submit_block::{SubmitBlockErrorResponse, SubmitBlockResponse},
30        subsidy::{BlockSubsidy, FundingStream, GetBlockSubsidyResponse},
31        transaction::{
32            Input, JoinSplit, Orchard, OrchardAction, OrchardFlags, Output, ScriptPubKey,
33            ScriptSig, ShieldedOutput, ShieldedSpend, TransactionObject, TransactionTemplate,
34        },
35        unified_address::ZListUnifiedReceiversResponse,
36        validate_address::ValidateAddressResponse,
37        z_validate_address::{ZValidateAddressResponse, ZValidateAddressType},
38    },
39    AddressStrings, BlockHeaderObject, BlockObject, GetAddressBalanceRequest,
40    GetAddressBalanceResponse, GetAddressTxIdsRequest, GetAddressUtxosResponse,
41    GetAddressUtxosResponseObject, GetBlockHashResponse, GetBlockHeaderResponse,
42    GetBlockHeightAndHashResponse, GetBlockResponse, GetBlockTransaction, GetBlockTrees,
43    GetBlockchainInfoResponse, GetInfoResponse, GetRawTransactionResponse, Hash,
44    SendRawTransactionResponse, Utxo,
45};
46
47/// Constants needed by clients of Zebra's RPC server
48// TODO: Export all other constants?
49pub use crate::methods::types::long_poll::LONG_POLL_ID_LENGTH;