pub trait StellarProviderTrait: Send + Sync {
// Required methods
fn get_account<'life0, 'life1, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<AccountEntry, ProviderError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn simulate_transaction_envelope<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_envelope: &'life1 TransactionEnvelope,
) -> Pin<Box<dyn Future<Output = Result<SimulateTransactionResponse, ProviderError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn send_transaction_polling<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_envelope: &'life1 TransactionEnvelope,
) -> Pin<Box<dyn Future<Output = Result<SorobanTransactionResponse, ProviderError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_network<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<GetNetworkResponse, ProviderError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_latest_ledger<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<GetLatestLedgerResponse, ProviderError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_envelope: &'life1 TransactionEnvelope,
) -> Pin<Box<dyn Future<Output = Result<Hash, ProviderError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_id: &'life1 Hash,
) -> Pin<Box<dyn Future<Output = Result<GetTransactionResponse, ProviderError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_transactions<'life0, 'async_trait>(
&'life0 self,
request: GetTransactionsRequest,
) -> Pin<Box<dyn Future<Output = Result<GetTransactionsResponse, ProviderError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_ledger_entries<'life0, 'life1, 'async_trait>(
&'life0 self,
keys: &'life1 [LedgerKey],
) -> Pin<Box<dyn Future<Output = Result<GetLedgerEntriesResponse, ProviderError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_events<'life0, 'async_trait>(
&'life0 self,
request: GetEventsRequest,
) -> Pin<Box<dyn Future<Output = Result<GetEventsResponse, ProviderError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn raw_request_dyn<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
id: Option<JsonRpcId>,
) -> Pin<Box<dyn Future<Output = Result<Value, ProviderError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn call_contract<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
contract_address: &'life1 str,
function_name: &'life2 ScSymbol,
args: Vec<ScVal>,
) -> Pin<Box<dyn Future<Output = Result<ScVal, ProviderError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Required Methods§
fn get_account<'life0, 'life1, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<AccountEntry, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn simulate_transaction_envelope<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_envelope: &'life1 TransactionEnvelope,
) -> Pin<Box<dyn Future<Output = Result<SimulateTransactionResponse, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send_transaction_polling<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_envelope: &'life1 TransactionEnvelope,
) -> Pin<Box<dyn Future<Output = Result<SorobanTransactionResponse, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_network<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<GetNetworkResponse, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_latest_ledger<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<GetLatestLedgerResponse, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_envelope: &'life1 TransactionEnvelope,
) -> Pin<Box<dyn Future<Output = Result<Hash, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_id: &'life1 Hash,
) -> Pin<Box<dyn Future<Output = Result<GetTransactionResponse, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_transactions<'life0, 'async_trait>(
&'life0 self,
request: GetTransactionsRequest,
) -> Pin<Box<dyn Future<Output = Result<GetTransactionsResponse, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_ledger_entries<'life0, 'life1, 'async_trait>(
&'life0 self,
keys: &'life1 [LedgerKey],
) -> Pin<Box<dyn Future<Output = Result<GetLedgerEntriesResponse, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_events<'life0, 'async_trait>(
&'life0 self,
request: GetEventsRequest,
) -> Pin<Box<dyn Future<Output = Result<GetEventsResponse, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn raw_request_dyn<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
id: Option<JsonRpcId>,
) -> Pin<Box<dyn Future<Output = Result<Value, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn call_contract<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
contract_address: &'life1 str,
function_name: &'life2 ScSymbol,
args: Vec<ScVal>,
) -> Pin<Box<dyn Future<Output = Result<ScVal, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn call_contract<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
contract_address: &'life1 str,
function_name: &'life2 ScSymbol,
args: Vec<ScVal>,
) -> Pin<Box<dyn Future<Output = Result<ScVal, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Calls a contract function (read-only, via simulation).
This method invokes a Soroban contract function without submitting a transaction. It uses simulation to execute the function and return the result.
§Arguments
contract_address- The contract address in StrKey formatfunction_name- The function name as an ScSymbolargs- Function arguments as ScVal vector
§Returns
The function result as an ScVal, or an error if the call fails