referrerpolicy=no-referrer-when-downgrade

BitswapApiServer

Trait BitswapApiServer 

Source
pub trait BitswapApiServer:
    Sized
    + Send
    + Sync
    + 'static {
    // Required method
    fn bitswap_v1_get(&self, cid: String) -> RpcResult<String>;

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

Server trait implementation for the BitswapApi RPC API.

Required Methods§

Source

fn bitswap_v1_get(&self, cid: String) -> RpcResult<String>

Retrieve indexed transaction data by CID.

Accepts a CIDv1 (base32 multibase-encoded string), extracts the 32-byte hash digest, looks up the indexed transaction, and returns hex-encoded data.

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§

Source§

impl<Block, Client> BitswapApiServer for Bitswap<Block, Client>
where Block: BlockT, Client: BlockBackend<Block> + Send + Sync + 'static,