Creates a new Account instance.
The address of the account.
Optional
provider: ProviderA Provider instance (optional).
Optional
connector: FuelConnectorA FuelConnector instance (optional).
Protected
Optional
_connectorThe connector for use with external wallets
Protected
Optional
_providerThe provider used to interact with the network.
Readonly
addressThe address associated with the account.
Adds multiple transfers to a script transaction request.
The script transaction request to add transfers to.
An array of TransferParams
objects representing the transfers to be made.
The updated script transaction request.
Adds a transfer to the given transaction request.
The script transaction request to add transfers to.
The object representing the transfer to be made.
The updated transaction request with the added transfer.
Assembles transactions for consolidating base asset coins into fewer UTXOs.
This method splits the provided coins into batches and creates transaction requests to consolidate them. It calculates the necessary fee and sets up the transactions to be submitted either in parallel (default) or sequentially.
The parameters for assembling base asset consolidation transactions.
An object containing the assembled transactions, the total fee cost, and a callback to submit all transactions.
Transfers multiple amounts of a token to multiple recipients.
An array of TransferParams
objects representing the transfers to be made.
Optional transaction parameters.
A promise that resolves to a TransactionResponse
object representing the transaction result.
Consolidates base asset UTXOs into fewer, larger ones.
Retrieves a limited number of base asset coins (as defined by Provider.RESOURCES_PAGE_SIZE_LIMIT
),
assembles consolidation transactions, and submits them to the network.
Note: This method currently supports only the base asset.
The parameters for coin consolidation, including the asset ID, mode, and output number.
A promise that resolves to the response of the submitted transactions.
A helper that creates a transfer transaction request and returns it.
The address of the destination.
The amount of coins to transfer.
Optional
assetId: BytesLikeThe asset ID of the coins to transfer (optional).
The transaction parameters (optional).
A promise that resolves to the prepared transaction request.
Funds a transaction request by adding the necessary resources.
The type of the TransactionRequest.
The transaction request to fund.
The estimated transaction parameters.
A promise that resolves to the funded transaction request.
Use provider.assembleTx instead Check the migration guide https://docs.fuel.network/guide/assembling-transactions/migration-guide.html for more information.
Generates an array of fake resources based on the provided coins.
An array of FakeResources
objects representing the coins.
An array of Resource
objects with generated properties.
Retrieves all the balances for the account.
A promise that resolves to an array of Coins and their quantities.
Retrieves coins owned by the account.
Optional
assetId: BytesLikeThe asset ID of the coins to retrieve (optional).
Optional
paginationArgs: CursorPaginationArgsA promise that resolves to an array of Coins.
Retrieves messages owned by the account.
Optional
paginationArgs: CursorPaginationArgsA promise that resolves to an array of Messages.
Retrieves resources satisfying the spend query for the account.
Quantities of resources to be obtained.
Optional
resourcesIdsToIgnore: ResourcesIdsToIgnoreIDs of resources to be excluded from the query (optional).
A promise that resolves to an array of Resources.
Returns a transaction cost to enable user to set gasLimit and also reserve balance amounts on the transaction.
The transaction request object.
The transaction cost parameters (optional).
A promise that resolves to the transaction cost object.
Use provider.assembleTx instead Check the migration guide https://docs.fuel.network/guide/assembling-transactions/migration-guide.html for more information.
Prepares a function to submit all transactions either sequentially or in parallel.
The parameters for preparing the submitAll callback.
A callback that, when called, submits all transactions and returns their results and any errors encountered.
Sends a transaction to the network.
The transaction request to be sent.
The provider send transaction parameters (optional).
A promise that resolves to the transaction response.
Signs a transaction from the account via the connector..
The transaction request to sign.
A promise that resolves to the signature of the transaction.
Simulates a transaction.
The transaction request to be simulated.
The estimate transaction params (optional).
A promise that resolves to the call result.
Transfers coins to a destination address.
The address of the destination.
The amount of coins to transfer.
Optional
assetId: BytesLikeThe asset ID of the coins to transfer (optional).
The transaction parameters (optional).
A promise that resolves to the transaction response.
Transfers coins to a contract address.
The address of the contract.
The amount of coins to transfer.
The asset ID of the coins to transfer (optional).
The transaction parameters (optional).
A promise that resolves to the transaction response.
Unlocks the wallet using the provided private key and returns an instance of WalletUnlocked.
The private key used to unlock the wallet.
An instance of WalletUnlocked.
Withdraws an amount of the base asset to the base chain.
Address of the recipient on the base chain.
Amount of base asset.
The transaction parameters (optional).
A promise that resolves to the transaction response.
WalletLocked
provides the functionalities for a locked wallet.