XandApi

Trait XandApi 

Source
pub trait XandApi:
    Send
    + Sync
    + 'static {
    type SubmitTransactionStream: Stream<Item = Result<TransactionUpdate, Status>> + Send + 'static;
    type ProposeActionStream: Stream<Item = Result<TransactionUpdate, Status>> + Send + 'static;
    type VoteOnProposalStream: Stream<Item = Result<TransactionUpdate, Status>> + Send + 'static;

Show 23 methods // Required methods fn submit_transaction<'life0, 'async_trait>( &'life0 self, request: Request<UserTransaction>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubmitTransactionStream>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn propose_action<'life0, 'async_trait>( &'life0 self, request: Request<SubmitProposal>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ProposeActionStream>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn vote_on_proposal<'life0, 'async_trait>( &'life0 self, request: Request<VotingTransaction>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::VoteOnProposalStream>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_proposal<'life0, 'async_trait>( &'life0 self, request: Request<GetProposalReq>, ) -> Pin<Box<dyn Future<Output = Result<Response<Proposal>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_all_proposals<'life0, 'async_trait>( &'life0 self, request: Request<GetAllProposalsReq>, ) -> Pin<Box<dyn Future<Output = Result<Response<Proposals>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_trustee<'life0, 'async_trait>( &'life0 self, request: Request<GetTrusteeReq>, ) -> Pin<Box<dyn Future<Output = Result<Response<TrusteeData>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_limited_agent<'life0, 'async_trait>( &'life0 self, request: Request<GetLimitedAgentReq>, ) -> Pin<Box<dyn Future<Output = Result<Response<LimitedAgentData>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_transaction_details<'life0, 'async_trait>( &'life0 self, request: Request<TransactionDetailsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<FetchedTransaction>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_transaction_history<'life0, 'async_trait>( &'life0 self, request: Request<TransactionHistoryRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<TransactionHistory>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_address_balance<'life0, 'async_trait>( &'life0 self, request: Request<AddressBalanceRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<AddressBalance>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_total_issuance<'life0, 'async_trait>( &'life0 self, request: Request<TotalIssuanceRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<TotalIssuanceResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_address_transactions<'life0, 'async_trait>( &'life0 self, request: Request<AddressTransactionHistoryRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<TransactionHistory>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_pending_create_requests<'life0, 'async_trait>( &'life0 self, request: Request<PendingCreateRequestsPagination>, ) -> Pin<Box<dyn Future<Output = Result<Response<PendingCreateRequests>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_pending_redeem_requests<'life0, 'async_trait>( &'life0 self, request: Request<PendingRedeemRequestsPagination>, ) -> Pin<Box<dyn Future<Output = Result<Response<PendingRedeemRequests>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_allowlist<'life0, 'async_trait>( &'life0 self, request: Request<AllowlistRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Allowlist>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_members<'life0, 'async_trait>( &'life0 self, request: Request<MembersRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Members>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_authority_keys<'life0, 'async_trait>( &'life0 self, request: Request<AuthorityKeysRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<AuthorityKeys>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_encryption_key<'life0, 'async_trait>( &'life0 self, request: Request<EncryptionKeyRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<EncryptionKey>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_current_block<'life0, 'async_trait>( &'life0 self, request: Request<GetCurrentBlockReq>, ) -> Pin<Box<dyn Future<Output = Result<Response<Blockstamp>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_validator_emission_rate<'life0, 'async_trait>( &'life0 self, request: Request<GetValidatorEmissionRateReq>, ) -> Pin<Box<dyn Future<Output = Result<Response<ValidatorEmissionRate>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_validator_emission_progress<'life0, 'async_trait>( &'life0 self, request: Request<GetValidatorEmissionProgressReq>, ) -> Pin<Box<dyn Future<Output = Result<Response<ValidatorEmissionProgress>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_pending_create_request_expire_time<'life0, 'async_trait>( &'life0 self, request: Request<GetPendingCreateRequestExpireTimeReq>, ) -> Pin<Box<dyn Future<Output = Result<Response<PendingCreateRequestExpireTime>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn check_health<'life0, 'async_trait>( &'life0 self, request: Request<HealthCheckRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<HealthCheckResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait;
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with XandApiServer.

Required Associated Types§

Source

type SubmitTransactionStream: Stream<Item = Result<TransactionUpdate, Status>> + Send + 'static

Server streaming response type for the SubmitTransaction method.

Source

type ProposeActionStream: Stream<Item = Result<TransactionUpdate, Status>> + Send + 'static

Server streaming response type for the ProposeAction method.

Source

type VoteOnProposalStream: Stream<Item = Result<TransactionUpdate, Status>> + Send + 'static

Server streaming response type for the VoteOnProposal method.

Required Methods§

Source

fn submit_transaction<'life0, 'async_trait>( &'life0 self, request: Request<UserTransaction>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubmitTransactionStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

For submitting transactions to the network. See the UserTransaction type for details about which transactions may be submitted.

Source

fn propose_action<'life0, 'async_trait>( &'life0 self, request: Request<SubmitProposal>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ProposeActionStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

For proposing administrative transactions to the network. See the AdministrativeTransaction type for details about which transactions may be submitted.

Source

fn vote_on_proposal<'life0, 'async_trait>( &'life0 self, request: Request<VotingTransaction>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::VoteOnProposalStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

For voting on outstanding proposals. See the VotingTransactions type for details about which transactions may be submitted.

Source

fn get_proposal<'life0, 'async_trait>( &'life0 self, request: Request<GetProposalReq>, ) -> Pin<Box<dyn Future<Output = Result<Response<Proposal>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

For querying data on specific Proposal by id

Source

fn get_all_proposals<'life0, 'async_trait>( &'life0 self, request: Request<GetAllProposalsReq>, ) -> Pin<Box<dyn Future<Output = Result<Response<Proposals>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

For querying a list of all non-expired Proposals

Source

fn get_trustee<'life0, 'async_trait>( &'life0 self, request: Request<GetTrusteeReq>, ) -> Pin<Box<dyn Future<Output = Result<Response<TrusteeData>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_limited_agent<'life0, 'async_trait>( &'life0 self, request: Request<GetLimitedAgentReq>, ) -> Pin<Box<dyn Future<Output = Result<Response<LimitedAgentData>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_transaction_details<'life0, 'async_trait>( &'life0 self, request: Request<TransactionDetailsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<FetchedTransaction>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

To request the details (including its status) of a transaction by ID

Source

fn get_transaction_history<'life0, 'async_trait>( &'life0 self, request: Request<TransactionHistoryRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<TransactionHistory>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

For requesting historical transaction data. Only returns transactions which have been finalized on the chain.

TODO – A request with no addresses results in every transaction in the cache being returned, without meaningful order. We need to make changes to the backend.

Source

fn get_address_balance<'life0, 'async_trait>( &'life0 self, request: Request<AddressBalanceRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<AddressBalance>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

For requesting the balance an address has

Source

fn get_total_issuance<'life0, 'async_trait>( &'life0 self, request: Request<TotalIssuanceRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<TotalIssuanceResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

For requesting the total amount of claims on the network

Source

fn get_address_transactions<'life0, 'async_trait>( &'life0 self, request: Request<AddressTransactionHistoryRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<TransactionHistory>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

For requesting transactions that affect a given address

Source

fn get_pending_create_requests<'life0, 'async_trait>( &'life0 self, request: Request<PendingCreateRequestsPagination>, ) -> Pin<Box<dyn Future<Output = Result<Response<PendingCreateRequests>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

For enumerating the currently outstanding create requests

Source

fn get_pending_redeem_requests<'life0, 'async_trait>( &'life0 self, request: Request<PendingRedeemRequestsPagination>, ) -> Pin<Box<dyn Future<Output = Result<Response<PendingRedeemRequests>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

For enumerating the currently outstanding redeem requests

Source

fn get_allowlist<'life0, 'async_trait>( &'life0 self, request: Request<AllowlistRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Allowlist>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

For retrieving the list of allowlisted CIDR blocks.

Source

fn get_members<'life0, 'async_trait>( &'life0 self, request: Request<MembersRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Members>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

For enumerating the current members

Source

fn get_authority_keys<'life0, 'async_trait>( &'life0 self, request: Request<AuthorityKeysRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<AuthorityKeys>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

For enumerating the current authority keys (validators)

Source

fn get_encryption_key<'life0, 'async_trait>( &'life0 self, request: Request<EncryptionKeyRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<EncryptionKey>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

For retrieving the public encryption key of an account on the network

Source

fn get_current_block<'life0, 'async_trait>( &'life0 self, request: Request<GetCurrentBlockReq>, ) -> Pin<Box<dyn Future<Output = Result<Response<Blockstamp>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the most current block and timestamp in a single blockstamp message with a staleness indicator

Source

fn get_validator_emission_rate<'life0, 'async_trait>( &'life0 self, request: Request<GetValidatorEmissionRateReq>, ) -> Pin<Box<dyn Future<Output = Result<Response<ValidatorEmissionRate>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_validator_emission_progress<'life0, 'async_trait>( &'life0 self, request: Request<GetValidatorEmissionProgressReq>, ) -> Pin<Box<dyn Future<Output = Result<Response<ValidatorEmissionProgress>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_pending_create_request_expire_time<'life0, 'async_trait>( &'life0 self, request: Request<GetPendingCreateRequestExpireTimeReq>, ) -> Pin<Box<dyn Future<Output = Result<Response<PendingCreateRequestExpireTime>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn check_health<'life0, 'async_trait>( &'life0 self, request: Request<HealthCheckRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<HealthCheckResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§