syntax = "proto3"; package forge_abi; import "rpc.proto"; // forge RPC definition // Notice: when you define a new RPC, please follow the naming convention. Your // function name is snake case, and req / req are PASCAL case of the function // name, prefixed with Request / Response. e.g. rpc get_abc(RequestGetAbc) // returns (ResponseGetAbc). If you break this, RPC builder would complain. service ChainRpc { // tx related rpc create_tx(RequestCreateTx) returns (ResponseCreateTx); rpc multisig(RequestMultisig) returns (ResponseMultisig); rpc send_tx(RequestSendTx) returns (ResponseSendTx); rpc get_tx(stream RequestGetTx) returns (stream ResponseGetTx); rpc get_block(stream RequestGetBlock) returns (stream ResponseGetBlock); rpc get_blocks(RequestGetBlocks) returns (ResponseGetBlocks); rpc get_unconfirmed_txs(RequestGetUnconfirmedTxs) returns (ResponseGetUnconfirmedTxs); // utility rpc get_chain_info(RequestGetChainInfo) returns (ResponseGetChainInfo); rpc get_node_info(RequestGetNodeInfo) returns (ResponseGetNodeInfo); rpc search(RequestSearch) returns (ResponseSearch); rpc get_net_info(RequestGetNetInfo) returns (ResponseGetNetInfo); rpc get_validators_info(RequestGetValidatorsInfo) returns (ResponseGetValidatorsInfo); rpc get_config(RequestGetConfig) returns (ResponseGetConfig); } service EventRpc { rpc subscribe(RequestSubscribe) returns (stream ResponseSubscribe); rpc unsubscribe(RequestUnsubscribe) returns (ResponseUnsubscribe); } service FileRpc { // filesystem related rpc store_file(stream RequestStoreFile) returns (ResponseStoreFile); rpc load_file(RequestLoadFile) returns (stream ResponseLoadFile); rpc pin_file(RequestPinFile) returns (ResponsePinFile); } service StateRpc { // state related rpc get_account_state(stream RequestGetAccountState) returns (stream ResponseGetAccountState); rpc get_asset_state(stream RequestGetAssetState) returns (stream ResponseGetAssetState); rpc get_forge_state(RequestGetForgeState) returns (ResponseGetForgeState); rpc get_protocol_state(stream RequestGetProtocolState) returns (stream ResponseGetProtocolState); rpc get_stake_state(stream RequestGetStakeState) returns (stream ResponseGetStakeState); rpc get_tether_state(stream RequestGetTetherState) returns (stream ResponseGetTetherState); rpc get_swap_state(stream RequestGetSwapState) returns (stream ResponseGetSwapState); rpc get_delegate_state(stream RequestGetDelegateState) returns (stream ResponseGetDelegateState); } service WalletRpc { // wallet related rpc create_wallet(RequestCreateWallet) returns (ResponseCreateWallet); rpc load_wallet(RequestLoadWallet) returns (ResponseLoadWallet); rpc recover_wallet(RequestRecoverWallet) returns (ResponseRecoverWallet); rpc list_wallet(RequestListWallet) returns (stream ResponseListWallet); rpc remove_wallet(RequestRemoveWallet) returns (ResponseRemoveWallet); rpc declare_node(RequestDeclareNode) returns (ResponseDeclareNode); } service StatsRpc { rpc get_forge_stats(RequestGetForgeStats) returns (ResponseGetForgeStats); rpc list_transactions(RequestListTransactions) returns (ResponseListTransactions); rpc list_assets(RequestListAssets) returns (ResponseListAssets); rpc list_stakes(RequestListStakes) returns (ResponseListStakes); rpc list_account(RequestListAccount) returns (ResponseListAccount); rpc list_top_accounts(RequestListTopAccounts) returns (ResponseListTopAccounts); rpc list_asset_transactions(RequestListAssetTransactions) returns (ResponseListAssetTransactions); rpc list_blocks(RequestListBlocks) returns (ResponseListBlocks); rpc get_health_status(RequestGetHealthStatus) returns (ResponseGetHealthStatus); rpc list_tethers(RequestListTethers) returns (ResponseListTethers); rpc list_swap(RequestListSwap) returns (ResponseListSwap); }