pub struct BloberClient { /* private fields */ }Implementations§
Source§impl BloberClient
impl BloberClient
Sourcepub fn builder() -> BloberClientBuilder
pub fn builder() -> BloberClientBuilder
Create an instance of BloberClient using the builder syntax
Source§impl BloberClient
impl BloberClient
Sourcepub fn rpc_client(&self) -> Arc<RpcClient>
pub fn rpc_client(&self) -> Arc<RpcClient>
Returns the underlaying RpcClient.
Sourcepub async fn initialize_blober(
&self,
fee_strategy: FeeStrategy,
namespace: &str,
timeout: Option<Duration>,
) -> BloberClientResult<Vec<SuccessfulTransaction<TransactionType>>>
pub async fn initialize_blober( &self, fee_strategy: FeeStrategy, namespace: &str, timeout: Option<Duration>, ) -> BloberClientResult<Vec<SuccessfulTransaction<TransactionType>>>
Initializes a new Blober PDA account.
Sourcepub async fn close_blober(
&self,
fee_strategy: FeeStrategy,
namespace: &str,
timeout: Option<Duration>,
) -> BloberClientResult<Vec<SuccessfulTransaction<TransactionType>>>
pub async fn close_blober( &self, fee_strategy: FeeStrategy, namespace: &str, timeout: Option<Duration>, ) -> BloberClientResult<Vec<SuccessfulTransaction<TransactionType>>>
Closes a Blober PDA account.
Sourcepub async fn upload_blob(
&self,
blob_data: &[u8],
fee_strategy: FeeStrategy,
namespace: &str,
timeout: Option<Duration>,
) -> BloberClientResult<Vec<SuccessfulTransaction<TransactionType>>>
pub async fn upload_blob( &self, blob_data: &[u8], fee_strategy: FeeStrategy, namespace: &str, timeout: Option<Duration>, ) -> BloberClientResult<Vec<SuccessfulTransaction<TransactionType>>>
Uploads a blob of data with the given Blober PDA account.
Under the hood it creates a new data_anchor_blober::state::blob::Blob PDA which stores a
incremental hash of the chunks from the blob data. On completion of the blob upload, the
blob PDA gets closed sending it’s funds back to the BloberClient::payer.
If the blob upload fails, the blob PDA gets discarded and the funds also get sent to the
BloberClient::payer.
Sourcepub async fn discard_blob(
&self,
fee_strategy: FeeStrategy,
blob: Pubkey,
namespace: &str,
timeout: Option<Duration>,
) -> BloberClientResult<Vec<SuccessfulTransaction<TransactionType>>>
pub async fn discard_blob( &self, fee_strategy: FeeStrategy, blob: Pubkey, namespace: &str, timeout: Option<Duration>, ) -> BloberClientResult<Vec<SuccessfulTransaction<TransactionType>>>
Discards a data_anchor_blober::state::blob::Blob PDA account registered with the provided
Blober PDA account.
Sourcepub async fn estimate_fees(
&self,
blob_size: usize,
blober: Pubkey,
priority: Priority,
) -> BloberClientResult<Fee>
pub async fn estimate_fees( &self, blob_size: usize, blober: Pubkey, priority: Priority, ) -> BloberClientResult<Fee>
Estimates fees for uploading a blob of the size blob_size with the given priority.
This whole functions is basically a simulation that doesn’t run anything. Instead of executing transactions,
it just sums the expected fees and number of signatures.
The data_anchor_blober::state::blob::Blob PDA account is always newly created, so for estimating compute fees
we don’t even need the real keypair, any unused pubkey will do.
Sourcepub async fn get_ledger_blobs_from_signatures(
&self,
namespace: &str,
payer_pubkey: Option<Pubkey>,
signatures: Vec<Signature>,
) -> BloberClientResult<Vec<u8>>
pub async fn get_ledger_blobs_from_signatures( &self, namespace: &str, payer_pubkey: Option<Pubkey>, signatures: Vec<Signature>, ) -> BloberClientResult<Vec<u8>>
Returns the raw blob data from the ledger for the given signatures.
Sourcepub async fn get_ledger_blobs(
&self,
slot: u64,
namespace: &str,
payer_pubkey: Option<Pubkey>,
lookback_slots: Option<u64>,
) -> BloberClientResult<Vec<Vec<u8>>>
pub async fn get_ledger_blobs( &self, slot: u64, namespace: &str, payer_pubkey: Option<Pubkey>, lookback_slots: Option<u64>, ) -> BloberClientResult<Vec<Vec<u8>>>
Fetches all blobs finalized in a given slot from the ledger.
Sourcepub async fn get_blobs(
&self,
slot: u64,
namespace: &str,
payer_pubkey: Option<Pubkey>,
) -> BloberClientResult<Vec<Vec<u8>>>
pub async fn get_blobs( &self, slot: u64, namespace: &str, payer_pubkey: Option<Pubkey>, ) -> BloberClientResult<Vec<Vec<u8>>>
Fetches all blobs for a given slot from the IndexerRpcClient.
Sourcepub async fn get_blobs_by_blober(
&self,
blober_blobs: BlobsByBlober,
) -> BloberClientResult<Vec<Vec<u8>>>
pub async fn get_blobs_by_blober( &self, blober_blobs: BlobsByBlober, ) -> BloberClientResult<Vec<Vec<u8>>>
Fetches blobs for a given BlobsByBlober from the IndexerRpcClient.
Sourcepub async fn get_blobs_by_payer(
&self,
payer_blobs: BlobsByPayer,
) -> BloberClientResult<Vec<Vec<u8>>>
pub async fn get_blobs_by_payer( &self, payer_blobs: BlobsByPayer, ) -> BloberClientResult<Vec<Vec<u8>>>
Fetches blobs for a given BlobsByPayer from the IndexerRpcClient.
Sourcepub async fn get_slot_proof(
&self,
slot: u64,
namespace: &str,
payer_pubkey: Option<Pubkey>,
) -> BloberClientResult<CompoundProof>
pub async fn get_slot_proof( &self, slot: u64, namespace: &str, payer_pubkey: Option<Pubkey>, ) -> BloberClientResult<CompoundProof>
Fetches compound proof for a given slot from the IndexerRpcClient.
Sourcepub async fn get_blob_proof(
&self,
blob: Pubkey,
) -> BloberClientResult<Option<CompoundProof>>
pub async fn get_blob_proof( &self, blob: Pubkey, ) -> BloberClientResult<Option<CompoundProof>>
Fetches compound proof for a given blob PDA Pubkey from the IndexerRpcClient.
Sourcepub async fn get_blob_messages(
&self,
slot: u64,
namespace: &str,
payer_pubkey: Option<Pubkey>,
) -> BloberClientResult<Vec<(Pubkey, VersionedMessage)>>
pub async fn get_blob_messages( &self, slot: u64, namespace: &str, payer_pubkey: Option<Pubkey>, ) -> BloberClientResult<Vec<(Pubkey, VersionedMessage)>>
Fetches blob messages for a given slot
Returns a tuple of (Pubkey, VersionedMessage) where the Pubkey is the address of
the data_anchor_blober::state::blob::Blob account and the VersionedMessage is the message
that included the data_anchor_blober::instruction::FinalizeBlob instruction.
Trait Implementations§
Source§impl Clone for BloberClient
impl Clone for BloberClient
Source§fn clone(&self) -> BloberClient
fn clone(&self) -> BloberClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for BloberClient
impl !RefUnwindSafe for BloberClient
impl Send for BloberClient
impl Sync for BloberClient
impl Unpin for BloberClient
impl !UnwindSafe for BloberClient
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more