CfxDebugRpcServer

Trait CfxDebugRpcServer 

Source
pub trait CfxDebugRpcServer:
    Sized
    + Send
    + Sync
    + 'static {
    // Required methods
    fn send_transaction<'life0, 'async_trait>(
        &'life0 self,
        tx: TransactionRequest,
        password: Option<String>,
    ) -> Pin<Box<dyn Future<Output = JsonRpcResult<H256>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn accounts<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Vec<RpcAddress>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn new_account<'life0, 'async_trait>(
        &'life0 self,
        password: String,
    ) -> Pin<Box<dyn Future<Output = JsonRpcResult<RpcAddress>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn unlock_account<'life0, 'async_trait>(
        &'life0 self,
        address: RpcAddress,
        password: String,
        duration: Option<U128>,
    ) -> Pin<Box<dyn Future<Output = JsonRpcResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn lock_account<'life0, 'async_trait>(
        &'life0 self,
        address: RpcAddress,
    ) -> Pin<Box<dyn Future<Output = JsonRpcResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn sign(
        &self,
        data: RpcBytes,
        address: RpcAddress,
        password: Option<String>,
    ) -> JsonRpcResult<H520>;
    fn sign_transaction(
        &self,
        tx: TransactionRequest,
        password: Option<String>,
    ) -> JsonRpcResult<String>;
    fn epoch_receipts<'life0, 'async_trait>(
        &'life0 self,
        epoch: BlockHashOrEpochNumber,
        include_eth_receipts: Option<bool>,
    ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<Vec<Vec<RpcReceipt>>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn account_pending_info<'life0, 'async_trait>(
        &'life0 self,
        address: RpcAddress,
    ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<AccountPendingInfo>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn account_pending_transactions<'life0, 'async_trait>(
        &'life0 self,
        address: RpcAddress,
        maybe_start_nonce: Option<U256>,
        maybe_limit: Option<U64>,
    ) -> Pin<Box<dyn Future<Output = JsonRpcResult<AccountPendingTransactions>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description

Server trait implementation for the CfxDebugRpc RPC API.

Required Methods§

Source

fn send_transaction<'life0, 'async_trait>( &'life0 self, tx: TransactionRequest, password: Option<String>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<H256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn accounts<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Vec<RpcAddress>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns accounts list.

Source

fn new_account<'life0, 'async_trait>( &'life0 self, password: String, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<RpcAddress>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create a new account

Source

fn unlock_account<'life0, 'async_trait>( &'life0 self, address: RpcAddress, password: String, duration: Option<U128>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Unlock an account

Source

fn lock_account<'life0, 'async_trait>( &'life0 self, address: RpcAddress, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lock an account

Source

fn sign( &self, data: RpcBytes, address: RpcAddress, password: Option<String>, ) -> JsonRpcResult<H520>

Source

fn sign_transaction( &self, tx: TransactionRequest, password: Option<String>, ) -> JsonRpcResult<String>

Source

fn epoch_receipts<'life0, 'async_trait>( &'life0 self, epoch: BlockHashOrEpochNumber, include_eth_receipts: Option<bool>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<Vec<Vec<RpcReceipt>>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn account_pending_info<'life0, 'async_trait>( &'life0 self, address: RpcAddress, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<AccountPendingInfo>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get transaction pending info by account address

Source

fn account_pending_transactions<'life0, 'async_trait>( &'life0 self, address: RpcAddress, maybe_start_nonce: Option<U256>, maybe_limit: Option<U64>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<AccountPendingTransactions>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get transaction pending info by account address

Provided Methods§

Source

fn into_rpc(self) -> RpcModule<Self>

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§