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
12pub use crate::methods::{
13    hex_data::HexData,
14    trees::{
15        Commitments, GetSubtreesByIndexResponse, GetTreestateResponse, SubtreeRpcData, Treestate,
16    },
17    types::{
18        default_roots::DefaultRoots,
19        get_block_template::{
20            BlockProposalResponse, BlockTemplateResponse, BlockTemplateTimeSource,
21            GetBlockTemplateCapability, GetBlockTemplateParameters, GetBlockTemplateRequestMode,
22            GetBlockTemplateResponse,
23        },
24        get_blockchain_info::GetBlockchainInfoBalance,
25        get_mining_info::GetMiningInfoResponse,
26        get_raw_mempool::{GetRawMempoolResponse, MempoolObject},
27        peer_info::{GetPeerInfoResponse, PeerInfo},
28        submit_block::{SubmitBlockErrorResponse, SubmitBlockResponse},
29        subsidy::{BlockSubsidy, FundingStream, GetBlockSubsidyResponse},
30        transaction::{
31            Input, Orchard, OrchardAction, Output, ScriptPubKey, ScriptSig, ShieldedOutput,
32            ShieldedSpend, TransactionObject, TransactionTemplate,
33        },
34        unified_address::ZListUnifiedReceiversResponse,
35        validate_address::ValidateAddressResponse,
36        z_validate_address::{ZValidateAddressResponse, ZValidateAddressType},
37    },
38    BlockHeaderObject, BlockObject, GetAddressBalanceRequest, GetAddressBalanceResponse,
39    GetAddressTxIdsRequest, GetAddressUtxosResponse, GetBlockHashResponse, GetBlockHeaderResponse,
40    GetBlockHeightAndHashResponse, GetBlockResponse, GetBlockTransaction, GetBlockTrees,
41    GetBlockchainInfoResponse, GetInfoResponse, GetRawTransactionResponse, Hash,
42    SendRawTransactionResponse, Utxo,
43};
44
45/// Constants needed by clients of Zebra's RPC server
46// TODO: Export all other constants?
47pub use crate::methods::types::long_poll::LONG_POLL_ID_LENGTH;