Data Anchor API
This crate defines the API interfaces used when interacting with the Data Anchor indexer service.
API
The indexer service exposes data via a JSONRPC server.
Here is an overview of the available methods:
get_blobs
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 but no blobs were uploaded, an empty list will be returned.
Signature
async ;
get_blobs_by_blober
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.
Signature
async ;
Parameters:
Which equals to the following options in JSON:
get_blobs_by_payer
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.
Signature
async ;
Parameters:
Which equals to the following options in JSON:
get_proof
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.
Signature
async ;
get_proof_for_blob
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.
Signature
async ;
Usage
To use the indexer API you can either use our pre-built CLI, Rust client, or if calling from any other
language, simply create and send JSONRPC requests.
curl example