Trait eth_bridge_rpc::EthBridgeApiServer
source · pub trait EthBridgeApiServer<BlockHash, Hash, Approval, AccountId, AssetKind, AssetId, EthAddress, OffchainRequest, RequestStatus, OutgoingRequestEncoded, DispatchError, NetworkId, BalancePrecision>: Sized + Send + Sync + 'static {
// Required methods
fn get_requests(
&self,
request_hashes: Vec<Hash>,
network_id: Option<NetworkId>,
redirect_finished_load_requests: Option<bool>,
at: Option<BlockHash>
) -> RpcResult<Result<Vec<(OffchainRequest, RequestStatus)>, DispatchError>>;
fn get_approved_requests(
&self,
request_hashes: Vec<Hash>,
network_id: Option<NetworkId>,
at: Option<BlockHash>
) -> RpcResult<Result<Vec<(OutgoingRequestEncoded, Vec<Approval>)>, DispatchError>>;
fn get_approvals(
&self,
request_hashes: Vec<Hash>,
network_id: Option<NetworkId>,
at: Option<BlockHash>
) -> RpcResult<Result<Vec<Vec<Approval>>, DispatchError>>;
fn get_account_requests(
&self,
account_id: AccountId,
status_filter: Option<RequestStatus>,
at: Option<BlockHash>
) -> RpcResult<Result<Vec<(NetworkId, Hash)>, DispatchError>>;
fn get_registered_assets(
&self,
network_id: Option<NetworkId>,
at: Option<BlockHash>
) -> RpcResult<Result<Vec<(AssetKind, (AssetId, BalancePrecision), Option<(EthAddress, BalancePrecision)>)>, DispatchError>>;
// Provided method
fn into_rpc(self) -> RpcModule<Self>
where BlockHash: Send + Sync + 'static + DeserializeOwned,
Hash: Send + Sync + 'static + DeserializeOwned + Serialize,
Approval: Send + Sync + 'static + Serialize,
AccountId: Send + Sync + 'static + DeserializeOwned,
AssetKind: Send + Sync + 'static + Serialize,
AssetId: Send + Sync + 'static + Serialize,
EthAddress: Send + Sync + 'static + Serialize,
OffchainRequest: Send + Sync + 'static + Serialize,
RequestStatus: Send + Sync + 'static + DeserializeOwned + Serialize,
OutgoingRequestEncoded: Send + Sync + 'static + Serialize,
DispatchError: Send + Sync + 'static + Serialize,
NetworkId: Send + Sync + 'static + DeserializeOwned + Serialize,
BalancePrecision: Send + Sync + 'static + Serialize { ... }
}
Expand description
Server trait implementation for the EthBridgeApi
RPC API.
Required Methods§
fn get_requests( &self, request_hashes: Vec<Hash>, network_id: Option<NetworkId>, redirect_finished_load_requests: Option<bool>, at: Option<BlockHash> ) -> RpcResult<Result<Vec<(OffchainRequest, RequestStatus)>, DispatchError>>
fn get_approved_requests( &self, request_hashes: Vec<Hash>, network_id: Option<NetworkId>, at: Option<BlockHash> ) -> RpcResult<Result<Vec<(OutgoingRequestEncoded, Vec<Approval>)>, DispatchError>>
fn get_approvals( &self, request_hashes: Vec<Hash>, network_id: Option<NetworkId>, at: Option<BlockHash> ) -> RpcResult<Result<Vec<Vec<Approval>>, DispatchError>>
fn get_account_requests( &self, account_id: AccountId, status_filter: Option<RequestStatus>, at: Option<BlockHash> ) -> RpcResult<Result<Vec<(NetworkId, Hash)>, DispatchError>>
fn get_registered_assets( &self, network_id: Option<NetworkId>, at: Option<BlockHash> ) -> RpcResult<Result<Vec<(AssetKind, (AssetId, BalancePrecision), Option<(EthAddress, BalancePrecision)>)>, DispatchError>>
Provided Methods§
sourcefn into_rpc(self) -> RpcModule<Self>where
BlockHash: Send + Sync + 'static + DeserializeOwned,
Hash: Send + Sync + 'static + DeserializeOwned + Serialize,
Approval: Send + Sync + 'static + Serialize,
AccountId: Send + Sync + 'static + DeserializeOwned,
AssetKind: Send + Sync + 'static + Serialize,
AssetId: Send + Sync + 'static + Serialize,
EthAddress: Send + Sync + 'static + Serialize,
OffchainRequest: Send + Sync + 'static + Serialize,
RequestStatus: Send + Sync + 'static + DeserializeOwned + Serialize,
OutgoingRequestEncoded: Send + Sync + 'static + Serialize,
DispatchError: Send + Sync + 'static + Serialize,
NetworkId: Send + Sync + 'static + DeserializeOwned + Serialize,
BalancePrecision: Send + Sync + 'static + Serialize,
fn into_rpc(self) -> RpcModule<Self>where BlockHash: Send + Sync + 'static + DeserializeOwned, Hash: Send + Sync + 'static + DeserializeOwned + Serialize, Approval: Send + Sync + 'static + Serialize, AccountId: Send + Sync + 'static + DeserializeOwned, AssetKind: Send + Sync + 'static + Serialize, AssetId: Send + Sync + 'static + Serialize, EthAddress: Send + Sync + 'static + Serialize, OffchainRequest: Send + Sync + 'static + Serialize, RequestStatus: Send + Sync + 'static + DeserializeOwned + Serialize, OutgoingRequestEncoded: Send + Sync + 'static + Serialize, DispatchError: Send + Sync + 'static + Serialize, NetworkId: Send + Sync + 'static + DeserializeOwned + Serialize, BalancePrecision: Send + Sync + 'static + Serialize,
Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule
.