Skip to main content

Client

Struct Client 

Source
pub struct Client { /* private fields */ }
Expand description

Client for photon-indexer

Solana indexer for general compression

Version: 0.51.2

Implementations§

Source§

impl Client

Source

pub fn new(baseurl: &str) -> Self

Create a new client.

baseurl is the base URL provided to the internal reqwest::Client, and should include a scheme and hostname, as well as port and a path stem if applicable.

Source

pub fn new_with_client(baseurl: &str, client: Client) -> Self

Construct a new client with an existing reqwest::Client, allowing more control over its configuration.

baseurl is the base URL provided to the internal reqwest::Client, and should include a scheme and hostname, as well as port and a path stem if applicable.

Source§

impl Client

Source

pub fn post_get_account_interface(&self) -> PostGetAccountInterface<'_>

Sends a POST request to /getAccountInterface

let response = client.post_get_account_interface()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_compressed_account(&self) -> PostGetCompressedAccount<'_>

Sends a POST request to /getCompressedAccount

let response = client.post_get_compressed_account()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_compressed_account_balance( &self, ) -> PostGetCompressedAccountBalance<'_>

Sends a POST request to /getCompressedAccountBalance

let response = client.post_get_compressed_account_balance()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_compressed_account_proof( &self, ) -> PostGetCompressedAccountProof<'_>

Sends a POST request to /getCompressedAccountProof

let response = client.post_get_compressed_account_proof()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_compressed_account_proof_v2( &self, ) -> PostGetCompressedAccountProofV2<'_>

Sends a POST request to /getCompressedAccountProofV2

let response = client.post_get_compressed_account_proof_v2()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_compressed_account_v2(&self) -> PostGetCompressedAccountV2<'_>

Sends a POST request to /getCompressedAccountV2

let response = client.post_get_compressed_account_v2()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_compressed_accounts_by_owner( &self, ) -> PostGetCompressedAccountsByOwner<'_>

Sends a POST request to /getCompressedAccountsByOwner

let response = client.post_get_compressed_accounts_by_owner()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_compressed_accounts_by_owner_v2( &self, ) -> PostGetCompressedAccountsByOwnerV2<'_>

Sends a POST request to /getCompressedAccountsByOwnerV2

let response = client.post_get_compressed_accounts_by_owner_v2()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_compressed_balance_by_owner( &self, ) -> PostGetCompressedBalanceByOwner<'_>

Sends a POST request to /getCompressedBalanceByOwner

let response = client.post_get_compressed_balance_by_owner()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_compressed_mint_token_holders( &self, ) -> PostGetCompressedMintTokenHolders<'_>

Sends a POST request to /getCompressedMintTokenHolders

let response = client.post_get_compressed_mint_token_holders()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_compressed_token_account_balance( &self, ) -> PostGetCompressedTokenAccountBalance<'_>

Sends a POST request to /getCompressedTokenAccountBalance

let response = client.post_get_compressed_token_account_balance()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_compressed_token_accounts_by_delegate( &self, ) -> PostGetCompressedTokenAccountsByDelegate<'_>

Sends a POST request to /getCompressedTokenAccountsByDelegate

let response = client.post_get_compressed_token_accounts_by_delegate()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_compressed_token_accounts_by_delegate_v2( &self, ) -> PostGetCompressedTokenAccountsByDelegateV2<'_>

Sends a POST request to /getCompressedTokenAccountsByDelegateV2

let response = client.post_get_compressed_token_accounts_by_delegate_v2()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_compressed_token_accounts_by_owner( &self, ) -> PostGetCompressedTokenAccountsByOwner<'_>

Sends a POST request to /getCompressedTokenAccountsByOwner

let response = client.post_get_compressed_token_accounts_by_owner()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_compressed_token_accounts_by_owner_v2( &self, ) -> PostGetCompressedTokenAccountsByOwnerV2<'_>

Sends a POST request to /getCompressedTokenAccountsByOwnerV2

let response = client.post_get_compressed_token_accounts_by_owner_v2()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_compressed_token_balances_by_owner( &self, ) -> PostGetCompressedTokenBalancesByOwner<'_>

Sends a POST request to /getCompressedTokenBalancesByOwner

let response = client.post_get_compressed_token_balances_by_owner()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_compressed_token_balances_by_owner_v2( &self, ) -> PostGetCompressedTokenBalancesByOwnerV2<'_>

Sends a POST request to /getCompressedTokenBalancesByOwnerV2

let response = client.post_get_compressed_token_balances_by_owner_v2()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_compression_signatures_for_account( &self, ) -> PostGetCompressionSignaturesForAccount<'_>

Sends a POST request to /getCompressionSignaturesForAccount

let response = client.post_get_compression_signatures_for_account()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_compression_signatures_for_address( &self, ) -> PostGetCompressionSignaturesForAddress<'_>

Sends a POST request to /getCompressionSignaturesForAddress

let response = client.post_get_compression_signatures_for_address()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_compression_signatures_for_owner( &self, ) -> PostGetCompressionSignaturesForOwner<'_>

Sends a POST request to /getCompressionSignaturesForOwner

let response = client.post_get_compression_signatures_for_owner()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_compression_signatures_for_token_owner( &self, ) -> PostGetCompressionSignaturesForTokenOwner<'_>

Sends a POST request to /getCompressionSignaturesForTokenOwner

let response = client.post_get_compression_signatures_for_token_owner()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_indexer_health(&self) -> PostGetIndexerHealth<'_>

Sends a POST request to /getIndexerHealth

let response = client.post_get_indexer_health()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_indexer_slot(&self) -> PostGetIndexerSlot<'_>

Sends a POST request to /getIndexerSlot

let response = client.post_get_indexer_slot()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_latest_compression_signatures( &self, ) -> PostGetLatestCompressionSignatures<'_>

Sends a POST request to /getLatestCompressionSignatures

let response = client.post_get_latest_compression_signatures()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_latest_non_voting_signatures( &self, ) -> PostGetLatestNonVotingSignatures<'_>

Sends a POST request to /getLatestNonVotingSignatures

let response = client.post_get_latest_non_voting_signatures()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_multiple_account_interfaces( &self, ) -> PostGetMultipleAccountInterfaces<'_>

Sends a POST request to /getMultipleAccountInterfaces

let response = client.post_get_multiple_account_interfaces()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_multiple_compressed_account_proofs( &self, ) -> PostGetMultipleCompressedAccountProofs<'_>

Sends a POST request to /getMultipleCompressedAccountProofs

let response = client.post_get_multiple_compressed_account_proofs()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_multiple_compressed_account_proofs_v2( &self, ) -> PostGetMultipleCompressedAccountProofsV2<'_>

Sends a POST request to /getMultipleCompressedAccountProofsV2

let response = client.post_get_multiple_compressed_account_proofs_v2()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_multiple_compressed_accounts( &self, ) -> PostGetMultipleCompressedAccounts<'_>

Sends a POST request to /getMultipleCompressedAccounts

let response = client.post_get_multiple_compressed_accounts()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_multiple_compressed_accounts_v2( &self, ) -> PostGetMultipleCompressedAccountsV2<'_>

Sends a POST request to /getMultipleCompressedAccountsV2

let response = client.post_get_multiple_compressed_accounts_v2()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_multiple_new_address_proofs( &self, ) -> PostGetMultipleNewAddressProofs<'_>

Sends a POST request to /getMultipleNewAddressProofs

let response = client.post_get_multiple_new_address_proofs()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_multiple_new_address_proofs_v2( &self, ) -> PostGetMultipleNewAddressProofsV2<'_>

Sends a POST request to /getMultipleNewAddressProofsV2

let response = client.post_get_multiple_new_address_proofs_v2()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_queue_elements(&self) -> PostGetQueueElements<'_>

Sends a POST request to /getQueueElements

let response = client.post_get_queue_elements()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_queue_info(&self) -> PostGetQueueInfo<'_>

Sends a POST request to /getQueueInfo

let response = client.post_get_queue_info()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_transaction_with_compression_info( &self, ) -> PostGetTransactionWithCompressionInfo<'_>

Sends a POST request to /getTransactionWithCompressionInfo

let response = client.post_get_transaction_with_compression_info()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_transaction_with_compression_info_v2( &self, ) -> PostGetTransactionWithCompressionInfoV2<'_>

Sends a POST request to /getTransactionWithCompressionInfoV2

let response = client.post_get_transaction_with_compression_info_v2()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_validity_proof(&self) -> PostGetValidityProof<'_>

Sends a POST request to /getValidityProof

let response = client.post_get_validity_proof()
    .body(body)
    .send()
    .await;
Source

pub fn post_get_validity_proof_v2(&self) -> PostGetValidityProofV2<'_>

Sends a POST request to /getValidityProofV2

let response = client.post_get_validity_proof_v2()
    .body(body)
    .send()
    .await;

Trait Implementations§

Source§

impl ClientHooks for &Client

Source§

async fn pre<E>( &self, request: &mut Request, info: &OperationInfo, ) -> Result<(), Error<E>>

Runs prior to the execution of the request. This may be used to modify the request before it is transmitted.
Source§

async fn post<E>( &self, result: &Result<Response, Error>, info: &OperationInfo, ) -> Result<(), Error<E>>

Runs after completion of the request.
Source§

async fn exec( &self, request: Request, info: &OperationInfo, ) -> Result<Response, Error>

Execute the request. Note that for almost any reasonable implementation this will include code equivalent to this: Read more
Source§

impl ClientInfo<()> for Client

Source§

fn api_version() -> &'static str

Get the version of this API. Read more
Source§

fn baseurl(&self) -> &str

Get the base URL to which requests are made.
Source§

fn client(&self) -> &Client

Get the internal reqwest::Client used to make requests.
Source§

fn inner(&self) -> &()

Get the inner value of type T if one is specified.
Source§

impl Clone for Client

Source§

fn clone(&self) -> Client

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Client

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more