Trait themelio_nodeprot::NodeServer[][src]

pub trait NodeServer<C: ContentAddrStore>: Send + Sync {
    fn send_tx(&self, state: NetState, tx: Transaction) -> Result<()>;
fn get_abbr_block(
        &self,
        height: BlockHeight
    ) -> Result<(AbbrBlock, ConsensusProof)>;
fn get_summary(&self) -> Result<StateSummary>;
fn get_state(&self, height: BlockHeight) -> Result<SealedState<C>>;
fn get_smt_branch(
        &self,
        height: BlockHeight,
        elem: Substate,
        key: HashVal
    ) -> Result<(Vec<u8>, CompressedProof)>;
fn get_stakers_raw(
        &self,
        height: BlockHeight
    ) -> Result<BTreeMap<HashVal, Vec<u8>>>; }
Expand description

This trait represents a server of Themelio’s node protocol. Actual nodes should implement this.

Required methods

Broadcasts a transaction to the network

Gets an “abbreviated block”

Gets abbreviated blocks within a large rang Gets a state summary

Gets a full state

Gets an SMT branch

Gets stakers

Implementors