pub trait WalletExt {
// Required methods
fn builder_data(&self) -> impl Future<Output = Result<BuilderData>> + Send;
fn build_transfer(
&self,
asset_id: AssetId,
transfers: &[(Address, u64)],
utxo_manager: &mut dyn UtxoProvider,
builder_data: &BuilderData,
fetch_coins: bool,
) -> impl Future<Output = Result<Transaction>> + Send;
fn build_transaction(
&self,
inputs: Vec<Input>,
outputs: Vec<Output>,
witnesses: Vec<Witness>,
tx_policies: TxPolicies,
) -> impl Future<Output = Result<Transaction>> + Send;
fn send_transaction(
&self,
chain_id: ChainId,
tx: &Transaction,
submit_clients: &[FuelClient],
) -> impl Future<Output = Result<SendResult>> + Send;
fn transfer_many(
&self,
asset_id: AssetId,
transfers: &[(Address, u64)],
utxo_manager: &mut dyn UtxoProvider,
builder_data: &BuilderData,
fetch_coins: bool,
chunk_size: Option<usize>,
) -> impl Future<Output = Result<Vec<FuelTxCoin>>> + Send;
fn transfer_many_and_wait(
&self,
asset_id: AssetId,
transfers: &[(Address, u64)],
utxo_manager: &mut dyn UtxoProvider,
builder_data: &BuilderData,
fetch_coins: bool,
chunk_size: Option<usize>,
) -> impl Future<Output = Result<Vec<FuelTxCoin>>> + Send;
fn await_send_result(
&self,
tx_id: &TxId,
tx: &Transaction,
) -> impl Future<Output = Result<SendResult>> + Send;
}Required Methods§
fn builder_data(&self) -> impl Future<Output = Result<BuilderData>> + Send
fn build_transfer( &self, asset_id: AssetId, transfers: &[(Address, u64)], utxo_manager: &mut dyn UtxoProvider, builder_data: &BuilderData, fetch_coins: bool, ) -> impl Future<Output = Result<Transaction>> + Send
fn build_transaction( &self, inputs: Vec<Input>, outputs: Vec<Output>, witnesses: Vec<Witness>, tx_policies: TxPolicies, ) -> impl Future<Output = Result<Transaction>> + Send
Sourcefn send_transaction(
&self,
chain_id: ChainId,
tx: &Transaction,
submit_clients: &[FuelClient],
) -> impl Future<Output = Result<SendResult>> + Send
fn send_transaction( &self, chain_id: ChainId, tx: &Transaction, submit_clients: &[FuelClient], ) -> impl Future<Output = Result<SendResult>> + Send
Submits tx and awaits its preconfirmation/final status.
submit_clients lets callers fan out submission across several nodes;
the first client to return a valid preconfirmation/final status wins
and its result is returned. When every client errors, the returned
error aggregates each client’s failure message. When a duplicate-tx
error is observed on any client, we fall back to awaiting the status
on the provider’s client. When submit_clients is empty, the
provider’s client is used as the sole submitter.
fn transfer_many( &self, asset_id: AssetId, transfers: &[(Address, u64)], utxo_manager: &mut dyn UtxoProvider, builder_data: &BuilderData, fetch_coins: bool, chunk_size: Option<usize>, ) -> impl Future<Output = Result<Vec<FuelTxCoin>>> + Send
fn transfer_many_and_wait( &self, asset_id: AssetId, transfers: &[(Address, u64)], utxo_manager: &mut dyn UtxoProvider, builder_data: &BuilderData, fetch_coins: bool, chunk_size: Option<usize>, ) -> impl Future<Output = Result<Vec<FuelTxCoin>>> + Send
fn await_send_result( &self, tx_id: &TxId, tx: &Transaction, ) -> impl Future<Output = Result<SendResult>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".