CoreRPCLike

Trait CoreRPCLike 

Source
pub trait CoreRPCLike {
Show 20 methods // Required methods fn get_block_hash(&self, height: CoreHeight) -> Result<BlockHash, Error>; fn get_block_header(&self, block_hash: &BlockHash) -> Result<Header, Error>; fn get_block_time_from_height( &self, height: CoreHeight, ) -> Result<TimestampMillis, Error>; fn get_best_chain_lock(&self) -> Result<ChainLock, Error>; fn submit_chain_lock(&self, chain_lock: &ChainLock) -> Result<u32, Error>; fn get_transaction(&self, tx_id: &Txid) -> Result<Transaction, Error>; fn get_asset_unlock_statuses( &self, indices: &[u64], core_chain_locked_height: u32, ) -> Result<Vec<AssetUnlockStatusResult>, Error>; fn get_transaction_extended_info( &self, tx_id: &Txid, ) -> Result<GetRawTransactionResult, Error>; fn get_fork_info(&self, name: &str) -> Result<Option<SoftforkInfo>, Error>; fn get_block(&self, block_hash: &BlockHash) -> Result<Block, Error>; fn get_block_json(&self, block_hash: &BlockHash) -> Result<Value, Error>; fn get_chain_tips(&self) -> Result<GetChainTipsResult, Error>; fn get_quorum_listextended( &self, height: Option<CoreHeight>, ) -> Result<ExtendedQuorumListResult, Error>; fn get_quorum_info( &self, quorum_type: QuorumType, hash: &QuorumHash, include_secret_key_share: Option<bool>, ) -> Result<QuorumInfoResult, Error>; fn get_protx_diff_with_masternodes( &self, base_block: Option<u32>, block: u32, ) -> Result<MasternodeListDiff, Error>; fn verify_instant_lock( &self, instant_lock: &InstantLock, max_height: Option<u32>, ) -> Result<bool, Error>; fn verify_chain_lock(&self, chain_lock: &ChainLock) -> Result<bool, Error>; fn masternode_sync_status(&self) -> Result<MnSyncStatus, Error>; fn send_raw_transaction(&self, transaction: &[u8]) -> Result<Txid, Error>; // Provided method fn get_optional_transaction_extended_info( &self, transaction_id: &Txid, ) -> Result<Option<GetRawTransactionResult>, Error> { ... }
}
Expand description

Core RPC interface

Required Methods§

Source

fn get_block_hash(&self, height: CoreHeight) -> Result<BlockHash, Error>

Get block hash by height

Source

fn get_block_header(&self, block_hash: &BlockHash) -> Result<Header, Error>

Get block hash by height

Source

fn get_block_time_from_height( &self, height: CoreHeight, ) -> Result<TimestampMillis, Error>

Get block time of a chain locked core height

Source

fn get_best_chain_lock(&self) -> Result<ChainLock, Error>

Get the best chain lock

Source

fn submit_chain_lock(&self, chain_lock: &ChainLock) -> Result<u32, Error>

Submit a chain lock

Source

fn get_transaction(&self, tx_id: &Txid) -> Result<Transaction, Error>

Get transaction

Source

fn get_asset_unlock_statuses( &self, indices: &[u64], core_chain_locked_height: u32, ) -> Result<Vec<AssetUnlockStatusResult>, Error>

Get asset unlock statuses

Source

fn get_transaction_extended_info( &self, tx_id: &Txid, ) -> Result<GetRawTransactionResult, Error>

Get transaction

Source

fn get_fork_info(&self, name: &str) -> Result<Option<SoftforkInfo>, Error>

Get block by hash

Source

fn get_block(&self, block_hash: &BlockHash) -> Result<Block, Error>

Get block by hash

Source

fn get_block_json(&self, block_hash: &BlockHash) -> Result<Value, Error>

Get block by hash in JSON format

Source

fn get_chain_tips(&self) -> Result<GetChainTipsResult, Error>

Get chain tips

Source

fn get_quorum_listextended( &self, height: Option<CoreHeight>, ) -> Result<ExtendedQuorumListResult, Error>

Source

fn get_quorum_info( &self, quorum_type: QuorumType, hash: &QuorumHash, include_secret_key_share: Option<bool>, ) -> Result<QuorumInfoResult, Error>

Source

fn get_protx_diff_with_masternodes( &self, base_block: Option<u32>, block: u32, ) -> Result<MasternodeListDiff, Error>

Get the difference in masternode list, return masternodes as diff elements

Source

fn verify_instant_lock( &self, instant_lock: &InstantLock, max_height: Option<u32>, ) -> Result<bool, Error>

Verify Instant Lock signature If max_height is provided the chain lock will be verified against quorums available at this height

Source

fn verify_chain_lock(&self, chain_lock: &ChainLock) -> Result<bool, Error>

Verify a chain lock signature

Source

fn masternode_sync_status(&self) -> Result<MnSyncStatus, Error>

Returns masternode sync status

Source

fn send_raw_transaction(&self, transaction: &[u8]) -> Result<Txid, Error>

Sends raw transaction to the network

Provided Methods§

Source

fn get_optional_transaction_extended_info( &self, transaction_id: &Txid, ) -> Result<Option<GetRawTransactionResult>, Error>

Get optional transaction extended info Returns None if transaction doesn’t exists

Implementors§