Trait sc_rpc_api::statement::StatementApiServer
source · pub trait StatementApiServer: Sized + Send + Sync + 'static {
// Required methods
fn dump(&self) -> RpcResult<Vec<Bytes>>;
fn broadcasts(
&self,
match_all_topics: Vec<[u8; 32]>
) -> RpcResult<Vec<Bytes>>;
fn posted(
&self,
match_all_topics: Vec<[u8; 32]>,
dest: [u8; 32]
) -> RpcResult<Vec<Bytes>>;
fn posted_clear(
&self,
match_all_topics: Vec<[u8; 32]>,
dest: [u8; 32]
) -> RpcResult<Vec<Bytes>>;
fn submit(&self, encoded: Bytes) -> RpcResult<()>;
fn remove(&self, statement_hash: [u8; 32]) -> RpcResult<()>;
// Provided method
fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description
Server trait implementation for the StatementApi
RPC API.
Required Methods§
sourcefn broadcasts(&self, match_all_topics: Vec<[u8; 32]>) -> RpcResult<Vec<Bytes>>
fn broadcasts(&self, match_all_topics: Vec<[u8; 32]>) -> RpcResult<Vec<Bytes>>
Return the data of all known statements which include all topics and have no DecryptionKey
field.
sourcefn posted(
&self,
match_all_topics: Vec<[u8; 32]>,
dest: [u8; 32]
) -> RpcResult<Vec<Bytes>>
fn posted( &self, match_all_topics: Vec<[u8; 32]>, dest: [u8; 32] ) -> RpcResult<Vec<Bytes>>
Return the data of all known statements whose decryption key is identified as dest
(this
will generally be the public key or a hash thereof for symmetric ciphers, or a hash of the
private key for symmetric ciphers).