[][src]Trait exonum_btc_anchoring::api::PublicApi

pub trait PublicApi {
    type Error: Fail;
    fn actual_address(&self, _query: ()) -> Result<Address, Self::Error>;
fn following_address(
        &self,
        _query: ()
    ) -> Result<Option<Address>, Self::Error>;
fn find_transaction(
        &self,
        query: FindTransactionQuery
    ) -> Result<Option<TransactionProof>, Self::Error>;
fn block_header_proof(
        &self,
        query: HeightQuery
    ) -> Result<BlockHeaderProof, Self::Error>; }

Public API specification for the Exonum Bitcoin anchoring service.

Associated Types

type Error: Fail

Error type for the current public API implementation.

Loading content...

Required methods

fn actual_address(&self, _query: ()) -> Result<Address, Self::Error>

Returns actual anchoring address.

GET /{api_prefix}/v1/address/actual

fn following_address(&self, _query: ()) -> Result<Option<Address>, Self::Error>

Returns the following anchoring address if the node is in the transition state.

GET /{api_prefix}/v1/address/following

fn find_transaction(
    &self,
    query: FindTransactionQuery
) -> Result<Option<TransactionProof>, Self::Error>

Returns the latest anchoring transaction if the height is not specified, otherwise, returns the anchoring transaction with the height that is greater or equal to the given one.

GET /{api_prefix}/v1/transaction

fn block_header_proof(
    &self,
    query: HeightQuery
) -> Result<BlockHeaderProof, Self::Error>

A method that provides cryptographic proofs for Exonum blocks including those anchored to Bitcoin blockchain. The proof is an apparent evidence of availability of a certain Exonum block in the blockchain.

GET /{api_prefix}/v1/block_header_proof?height={height}

Loading content...

Implementations on Foreign Types

impl PublicApi for ServiceApiState[src]

type Error = Error

impl PublicApi for TestKitApi[src]

type Error = Error

Loading content...

Implementors

Loading content...