Trait vapcore_secretstore::SecretStoreChain[][src]

pub trait SecretStoreChain: Send + Sync + 'static {
    fn add_listener(&self, target: Arc<dyn NewBlocksNotify>);
fn is_trusted(&self) -> bool;
fn transact_contract(
        &self,
        contract: Address,
        tx_data: Bytes
    ) -> Result<(), VapKeyError>;
fn read_contract_address(
        &self,
        registry_name: &str,
        address: &ContractAddress
    ) -> Option<Address>;
fn call_contract(
        &self,
        block_id: BlockId,
        contract_address: Address,
        data: Bytes
    ) -> Result<Bytes, String>;
fn block_hash(&self, id: BlockId) -> Option<H256>;
fn block_number(&self, id: BlockId) -> Option<BlockNumber>;
fn retrieve_last_logs(&self, filter: Filter) -> Option<Vec<RawLog>>;
fn get_confirmed_block_hash(&self) -> Option<H256>; }

Blockchain representation for Secret Store

Required methods

fn add_listener(&self, target: Arc<dyn NewBlocksNotify>)[src]

Adds listener for chain’s NewBlocks event

fn is_trusted(&self) -> bool[src]

Check if the underlying chain is in the trusted state

fn transact_contract(
    &self,
    contract: Address,
    tx_data: Bytes
) -> Result<(), VapKeyError>
[src]

Transact contract.

fn read_contract_address(
    &self,
    registry_name: &str,
    address: &ContractAddress
) -> Option<Address>
[src]

Read contract address. If address source is registry, address only returned if current client state is trusted. Address from registry is read from registry from block latest block with REQUEST_CONFIRMATIONS_REQUIRED confirmations.

fn call_contract(
    &self,
    block_id: BlockId,
    contract_address: Address,
    data: Bytes
) -> Result<Bytes, String>
[src]

Call contract in the blockchain

fn block_hash(&self, id: BlockId) -> Option<H256>[src]

Returns blockhash for block id

fn block_number(&self, id: BlockId) -> Option<BlockNumber>[src]

Returns block number for block id

fn retrieve_last_logs(&self, filter: Filter) -> Option<Vec<RawLog>>[src]

Retrieve last blockchain logs for the filter

fn get_confirmed_block_hash(&self) -> Option<H256>[src]

Get hash of the last block with predefined number of confirmations (depends on the chain).

Loading content...

Implementors

Loading content...