Trait IndexerRpcServer

Source
pub trait IndexerRpcServer:
    Sized
    + Send
    + Sync
    + 'static {
    // Required methods
    fn get_blobs<'life0, 'async_trait>(
        &'life0 self,
        blober: Pubkey,
        slot: u64,
    ) -> Pin<Box<dyn Future<Output = RpcResult<Option<Vec<Vec<u8>>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_blobs_by_blober<'life0, 'async_trait>(
        &'life0 self,
        blober: BlobsByBlober,
    ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<Vec<u8>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_blobs_by_payer<'life0, 'async_trait>(
        &'life0 self,
        payer: BlobsByPayer,
    ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<Vec<u8>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_proof<'life0, 'async_trait>(
        &'life0 self,
        blober: Pubkey,
        slot: u64,
    ) -> Pin<Box<dyn Future<Output = RpcResult<Option<CompoundProof>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_proof_for_blob<'life0, 'async_trait>(
        &'life0 self,
        blob_address: Pubkey,
    ) -> Pin<Box<dyn Future<Output = RpcResult<Option<CompoundProof>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn add_blobers<'life0, 'async_trait>(
        &'life0 self,
        blobers: HashSet<BloberData>,
    ) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn remove_blobers<'life0, 'async_trait>(
        &'life0 self,
        blobers: HashSet<Pubkey>,
    ) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn subscribe_blob_finalization<'life0, 'async_trait>(
        &'life0 self,
        subscription_sink: PendingSubscriptionSink,
        blobers: HashSet<Pubkey>,
    ) -> Pin<Box<dyn Future<Output = SubscriptionResult> + 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 IndexerRpc RPC API.

Required Methods§

Source

fn get_blobs<'life0, 'async_trait>( &'life0 self, blober: Pubkey, slot: u64, ) -> Pin<Box<dyn Future<Output = RpcResult<Option<Vec<Vec<u8>>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieve a list of blobs for a given slot and blober pubkey. Returns an error if there was a database or RPC failure, and None if the slot has not been completed yet. If the slot is completed, an empty list will be returned.

Source

fn get_blobs_by_blober<'life0, 'async_trait>( &'life0 self, blober: BlobsByBlober, ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<Vec<u8>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieve a list of blobs for a given blober pubkey and time range. Returns an error if there was a database or RPC failure, and an empty list if no blobs were found.

Source

fn get_blobs_by_payer<'life0, 'async_trait>( &'life0 self, payer: BlobsByPayer, ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<Vec<u8>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieve a list of blobs for a given payer pubkey, network ID, and time range. Returns an error if there was a database or RPC failure, and an empty list if no blobs were found.

Source

fn get_proof<'life0, 'async_trait>( &'life0 self, blober: Pubkey, slot: u64, ) -> Pin<Box<dyn Future<Output = RpcResult<Option<CompoundProof>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieve a proof for a given slot and blober pubkey. Returns an error if there was a database or RPC failure, and None if the slot has not been completed yet.

Source

fn get_proof_for_blob<'life0, 'async_trait>( &'life0 self, blob_address: Pubkey, ) -> Pin<Box<dyn Future<Output = RpcResult<Option<CompoundProof>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieve a compound proof that covers a particular blob. Returns an error if there was a database or RPC failure, and None if the blob does not exist.

Source

fn add_blobers<'life0, 'async_trait>( &'life0 self, blobers: HashSet<BloberData>, ) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Add a list of blober PDA addresses to the list of tracked blobers.

Source

fn remove_blobers<'life0, 'async_trait>( &'life0 self, blobers: HashSet<Pubkey>, ) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Remove a list of blober PDA addresses from the list of tracked blobers.

Source

fn subscribe_blob_finalization<'life0, 'async_trait>( &'life0 self, subscription_sink: PendingSubscriptionSink, blobers: HashSet<Pubkey>, ) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Listen to blob finalization events from specified blobers. This will return a stream of slots and blober PDAs that have finalized blobs. The stream will be closed when the RPC server is shut down.

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§