Icon HelpCircleForumIcon Link

⌘K

Icon HelpCircleForumIcon Link

Icon LinkClass: Provider

@fuel-ts/account .Provider

A provider for connecting to a node

Icon LinkProperties

Icon Linkcache

Optional cache: MemoryCache

Icon LinkDefined in

packages/account/src/providers/provider.ts:391 Icon Link


Icon Linkoperations

operations: Object

Icon LinkType declaration

NameType
dryRun(variables: Exact<{ encodedTransactions: string | string[] ; gasPrice?: InputMaybe<string> ; utxoValidation?: InputMaybe<boolean> }>, options?: unknown) => Promise<GqlDryRunMutation>
estimateGasPrice(variables: Exact<{ blockHorizon: string }>, options?: unknown) => Promise<GqlEstimateGasPriceQuery>
estimatePredicates(variables: Exact<{ encodedTransaction: string }>, options?: unknown) => Promise<GqlEstimatePredicatesQuery>
getBalance(variables: Exact<{ assetId: string ; owner: string }>, options?: unknown) => Promise<GqlGetBalanceQuery>
getBalances(variables: Exact<{ after?: InputMaybe<string> ; before?: InputMaybe<string> ; filter: GqlBalanceFilterInput ; first?: InputMaybe<number> ; last?: InputMaybe<number> }>, options?: unknown) => Promise<GqlGetBalancesQuery>
getBlock(variables?: Exact<{ blockId?: InputMaybe<string> ; height?: InputMaybe<string> }>, options?: unknown) => Promise<GqlGetBlockQuery>
getBlockWithTransactions(variables?: Exact<{ blockHeight?: InputMaybe<string> ; blockId?: InputMaybe<string> }>, options?: unknown) => Promise<GqlGetBlockWithTransactionsQuery>
getBlocks(variables?: Exact<{ after?: InputMaybe<string> ; before?: InputMaybe<string> ; first?: InputMaybe<number> ; last?: InputMaybe<number> }>, options?: unknown) => Promise<GqlGetBlocksQuery>
getChain(variables?: Exact<{ [key: string]: never; }>, options?: unknown) => Promise<GqlGetChainQuery>
getCoin(variables: Exact<{ coinId: string }>, options?: unknown) => Promise<GqlGetCoinQuery>
getCoins(variables: Exact<{ after?: InputMaybe<string> ; before?: InputMaybe<string> ; filter: GqlCoinFilterInput ; first?: InputMaybe<number> ; last?: InputMaybe<number> }>, options?: unknown) => Promise<GqlGetCoinsQuery>
getCoinsToSpend(variables: Exact<{ excludedIds?: InputMaybe<GqlExcludeInput> ; owner: string ; queryPerAsset: GqlSpendQueryElementInput | GqlSpendQueryElementInput[] }>, options?: unknown) => Promise<GqlGetCoinsToSpendQuery>
getContract(variables: Exact<{ contractId: string }>, options?: unknown) => Promise<GqlGetContractQuery>
getContractBalance(variables: Exact<{ asset: string ; contract: string }>, options?: unknown) => Promise<GqlGetContractBalanceQuery>
getLatestGasPrice(variables?: Exact<{ [key: string]: never; }>, options?: unknown) => Promise<GqlGetLatestGasPriceQuery>
getMessageByNonce(variables: Exact<{ nonce: string }>, options?: unknown) => Promise<GqlGetMessageByNonceQuery>
getMessageProof(variables: Exact<{ commitBlockHeight?: InputMaybe<string> ; commitBlockId?: InputMaybe<string> ; nonce: string ; transactionId: string }>, options?: unknown) => Promise<GqlGetMessageProofQuery>
getMessageStatus(variables: Exact<{ nonce: string }>, options?: unknown) => Promise<GqlGetMessageStatusQuery>
getMessages(variables: Exact<{ after?: InputMaybe<string> ; before?: InputMaybe<string> ; first?: InputMaybe<number> ; last?: InputMaybe<number> ; owner: string }>, options?: unknown) => Promise<GqlGetMessagesQuery>
getNodeInfo(variables?: Exact<{ [key: string]: never; }>, options?: unknown) => Promise<GqlGetNodeInfoQuery>
getRelayedTransactionStatus(variables: Exact<{ relayedTransactionId: string }>, options?: unknown) => Promise<GqlGetRelayedTransactionStatusQuery>
getTransaction(variables: Exact<{ transactionId: string }>, options?: unknown) => Promise<GqlGetTransactionQuery>
getTransactionWithReceipts(variables: Exact<{ transactionId: string }>, options?: unknown) => Promise<GqlGetTransactionWithReceiptsQuery>
getTransactions(variables?: Exact<{ after?: InputMaybe<string> ; before?: InputMaybe<string> ; first?: InputMaybe<number> ; last?: InputMaybe<number> }>, options?: unknown) => Promise<GqlGetTransactionsQuery>
getTransactionsByOwner(variables: Exact<{ after?: InputMaybe<string> ; before?: InputMaybe<string> ; first?: InputMaybe<number> ; last?: InputMaybe<number> ; owner: string }>, options?: unknown) => Promise<GqlGetTransactionsByOwnerQuery>
getVersion(variables?: Exact<{ [key: string]: never; }>, options?: unknown) => Promise<GqlGetVersionQuery>
produceBlocks(variables: Exact<{ blocksToProduce: string ; startTimestamp?: InputMaybe<string> }>, options?: unknown) => Promise<GqlProduceBlocksMutation>
statusChange(variables: Exact<{ transactionId: string }>, options?: unknown) => AsyncIterable<GqlStatusChangeSubscription>
submit(variables: Exact<{ encodedTransaction: string }>, options?: unknown) => Promise<GqlSubmitMutation>
submitAndAwait(variables: Exact<{ encodedTransaction: string }>, options?: unknown) => AsyncIterable<GqlSubmitAndAwaitSubscription>

Icon LinkDefined in

packages/account/src/providers/provider.ts:390 Icon Link


Icon Linkoptions

options: ProviderOptions

Icon LinkDefined in

packages/account/src/providers/provider.ts:404 Icon Link


Icon Linkurl

url: string

GraphQL endpoint of the Fuel node

Icon LinkDefined in

packages/account/src/providers/provider.ts:440 Icon Link

Icon LinkMethods

Icon Linkconnect

connect(url, options?): Promise<void>

Updates the URL for the provider and fetches the consensus parameters for the new URL, if needed.

Icon LinkParameters

NameTypeDescription
urlstringThe URL to connect to.
options?ProviderOptions Additional options for the provider.

Icon LinkReturns

Promise<void>

Icon LinkDefined in

packages/account/src/providers/provider.ts:521 Icon Link


Icon LinkdryRun

dryRun(transactionRequestLike, sendTransactionParams?): Promise<CallResult >

Executes a transaction without actually submitting it to the chain.

If the transaction is missing any dependencies, the transaction will be mutated and those dependencies will be added.

Icon LinkParameters

NameTypeDescription
transactionRequestLikeTransactionRequestLike The transaction request object.
sendTransactionParamsProviderCallParams The provider call parameters (optional).

Icon LinkReturns

Promise<CallResult >

A promise that resolves to the call result object.

Icon LinkDefined in

packages/account/src/providers/provider.ts:772 Icon Link


Icon LinkdryRunMultipleTransactions

dryRunMultipleTransactions(transactionRequests, sendTransactionParams?): Promise<CallResult []>

Dry runs multiple transactions.

Icon LinkParameters

NameTypeDescription
transactionRequestsTransactionRequest []Array of transaction request objects.
sendTransactionParamsProviderCallParams The provider call parameters (optional).

Icon LinkReturns

Promise<CallResult []>

A promise that resolves to an array of results for each transaction call.

Icon LinkDefined in

packages/account/src/providers/provider.ts:994 Icon Link


Icon LinkestimateGasPrice

estimateGasPrice(blockHorizon): Promise<BN>

Returns the estimate gas price for the given block horizon.

Icon LinkParameters

NameTypeDescription
blockHorizonnumberThe block horizon to estimate gas price for.

Icon LinkReturns

Promise<BN>

A promise that resolves to the estimated gas price.

Icon LinkDefined in

packages/account/src/providers/provider.ts:1770 Icon Link


Icon LinkestimateMultipleTxDependencies

estimateMultipleTxDependencies(transactionRequests): Promise<EstimateTxDependenciesReturns []>

Dry runs multiple transactions and checks for missing dependencies in batches.

Transactions are dry run in batches. After each dry run, transactions requiring further modifications are identified. The method iteratively updates these transactions and performs subsequent dry runs until all dependencies for each transaction are satisfied.

Icon LinkParameters

NameTypeDescription
transactionRequestsTransactionRequest []Array of transaction request objects.

Icon LinkReturns

Promise<EstimateTxDependenciesReturns []>

A promise that resolves to an array of results for each transaction.

Icon LinkDefined in

packages/account/src/providers/provider.ts:913 Icon Link


Icon LinkestimatePredicates

estimatePredicates<T>(transactionRequest): Promise<T>

Verifies whether enough gas is available to complete transaction.

Icon LinkType parameters

NameTypeDescription
Textends TransactionRequest The type of the transaction request object.

Icon LinkParameters

NameTypeDescription
transactionRequestTThe transaction request object.

Icon LinkReturns

Promise<T>

A promise that resolves to the estimated transaction request object.

Icon LinkDefined in

packages/account/src/providers/provider.ts:799 Icon Link


Icon LinkestimateTxDependencies

estimateTxDependencies(transactionRequest): Promise<EstimateTxDependenciesReturns >

Will dryRun a transaction and check for missing dependencies.

If there are missing variable outputs, addVariableOutputs is called on the transaction.

Icon LinkParameters

NameTypeDescription
transactionRequestTransactionRequest The transaction request object.

Icon LinkReturns

Promise<EstimateTxDependenciesReturns >

A promise that resolves to the estimate transaction dependencies.

Icon LinkDefined in

packages/account/src/providers/provider.ts:843 Icon Link


Icon LinkestimateTxGasAndFee

estimateTxGasAndFee(params): Promise<{ gasLimit: BN ; gasPrice: BN ; maxFee: BN ; maxGas: BN ; minFee: BN ; minGas: BN }>

Estimates the transaction gas and fee based on the provided transaction request.

Icon LinkParameters

NameType
paramsObject
params.gasPrice?BN
params.transactionRequestTransactionRequest

Icon LinkReturns

Promise<{ gasLimit: BN ; gasPrice: BN ; maxFee: BN ; maxGas: BN ; minFee: BN ; minGas: BN }>

An object containing the estimated minimum gas, minimum fee, maximum gas, and maximum fee.

Icon LinkDefined in

packages/account/src/providers/provider.ts:1020 Icon Link


Icon LinkfetchChain

fetchChain(): Promise<ChainInfo >

Returns the chain information for the current provider network.

Icon LinkReturns

Promise<ChainInfo >

a promise that resolves to the chain information.

Icon LinkDefined in

packages/account/src/providers/provider.ts:655 Icon Link


Icon LinkfetchChainAndNodeInfo

fetchChainAndNodeInfo(): Promise<{ chain: ChainInfo ; nodeInfo: NodeInfo }>

Return the chain and node information.

Icon LinkReturns

Promise<{ chain: ChainInfo ; nodeInfo: NodeInfo }>

A promise that resolves to the Chain and NodeInfo.

Icon LinkDefined in

packages/account/src/providers/provider.ts:533 Icon Link


Icon LinkfetchNode

fetchNode(): Promise<NodeInfo >

Returns the node information for the current provider network.

Icon LinkReturns

Promise<NodeInfo >

a promise that resolves to the node information.

Icon LinkDefined in

packages/account/src/providers/provider.ts:634 Icon Link


Icon LinkgetBalance

getBalance(owner, assetId): Promise<BN>

Returns the balance for the given owner for the given asset ID.

Icon LinkParameters

NameTypeDescription
ownerstring | AbstractAddress The address to get coins for.
assetIdBytesLike The asset ID of coins to get.

Icon LinkReturns

Promise<BN>

A promise that resolves to the balance.

Icon LinkDefined in

packages/account/src/providers/provider.ts:1557 Icon Link


Icon LinkgetBalances

getBalances(owner): Promise<GetBalancesResponse >

Returns balances for the given owner.

Icon LinkParameters

NameTypeDescription
ownerstring | AbstractAddress The address to get coins for.

Icon LinkReturns

Promise<GetBalancesResponse >

A promise that resolves to the balances.

Icon LinkDefined in

packages/account/src/providers/provider.ts:1577 Icon Link


Icon LinkgetBaseAssetId

getBaseAssetId(): string

Returns the base asset ID for the current provider network.

Icon LinkReturns

string

the base asset ID.

Icon LinkDefined in

packages/account/src/providers/provider.ts:682 Icon Link


Icon LinkgetBlock

getBlock(idOrHeight): Promise<null | Block >

Returns block matching the given ID or height.

Icon LinkParameters

NameTypeDescription
idOrHeightstring | numberID or height of the block.

Icon LinkReturns

Promise<null | Block >

A promise that resolves to the block or null.

Icon LinkDefined in

packages/account/src/providers/provider.ts:1391 Icon Link


Icon LinkgetBlockNumber

getBlockNumber(): Promise<BN>

Returns the latest block number.

Icon LinkReturns

Promise<BN>

A promise that resolves to the latest block number.

Icon LinkDefined in

packages/account/src/providers/provider.ts:624 Icon Link


Icon LinkgetBlockWithTransactions

getBlockWithTransactions(idOrHeight): Promise<null | Block & { transactions: Partial<Omit<TransactionScript, "type">> & Partial<Omit<TransactionCreate, "type">> & Partial<Omit<TransactionMint, "type">> & Partial<Omit<TransactionUpgrade, "type">> & Partial<Omit<TransactionUpload, "type">> & { type: TransactionType }[] }>

Returns block matching the given ID or type, including transaction data.

Icon LinkParameters

NameTypeDescription
idOrHeightstring | numberID or height of the block.

Icon LinkReturns

Promise<null | Block & { transactions: Partial<Omit<TransactionScript, "type">> & Partial<Omit<TransactionCreate, "type">> & Partial<Omit<TransactionMint, "type">> & Partial<Omit<TransactionUpgrade, "type">> & Partial<Omit<TransactionUpload, "type">> & { type: TransactionType }[] }>

A promise that resolves to the block.

Icon LinkDefined in

packages/account/src/providers/provider.ts:1449 Icon Link


Icon LinkgetBlocks

getBlocks(params?): Promise<GetBlocksResponse >

Returns all the blocks matching the given parameters.

Icon LinkParameters

NameTypeDescription
params?CursorPaginationArgsThe parameters to query blocks.

Icon LinkReturns

Promise<GetBlocksResponse >

A promise that resolves to the blocks.

Icon LinkDefined in

packages/account/src/providers/provider.ts:1423 Icon Link


Icon LinkgetChain

getChain(): ChainInfo

Returns the cached chainInfo for the current URL.

Icon LinkReturns

ChainInfo

the chain information configuration.

Icon LinkDefined in

packages/account/src/providers/provider.ts:469 Icon Link


Icon LinkgetChainId

getChainId(): number

Returns the chain ID for the current provider network.

Icon LinkReturns

number

A promise that resolves to the chain ID number.

Icon LinkDefined in

packages/account/src/providers/provider.ts:670 Icon Link


Icon LinkgetCoins

getCoins(owner, assetId?, paginationArgs?): Promise<GetCoinsResponse >

Returns coins for the given owner.

Icon LinkParameters

NameTypeDescription
ownerstring | AbstractAddress The address to get coins for.
assetId?BytesLike The asset ID of coins to get (optional).
paginationArgs?CursorPaginationArgsPagination arguments (optional).

Icon LinkReturns

Promise<GetCoinsResponse >

A promise that resolves to the coins.

Icon LinkDefined in

packages/account/src/providers/provider.ts:1284 Icon Link


Icon LinkgetContract

getContract(contractId): Promise<null | ContractResult >

Get deployed contract with the given ID.

Icon LinkParameters

NameTypeDescription
contractIdstringID of the contract.

Icon LinkReturns

Promise<null | ContractResult >

A promise that resolves to the contract.

Icon LinkDefined in

packages/account/src/providers/provider.ts:1522 Icon Link


Icon LinkgetContractBalance

getContractBalance(contractId, assetId): Promise<BN>

Returns the balance for the given contract for the given asset ID.

Icon LinkParameters

NameTypeDescription
contractIdstring | AbstractAddress The contract ID to get the balance for.
assetIdBytesLike The asset ID of coins to get.

Icon LinkReturns

Promise<BN>

A promise that resolves to the balance.

Icon LinkDefined in

packages/account/src/providers/provider.ts:1537 Icon Link


Icon LinkgetGasConfig

getGasConfig(): Object

Returns some helpful parameters related to gas fees.

Icon LinkReturns

Object

NameType
gasCostsGasCosts
gasPerByteBN
gasPriceFactorBN
maxGasPerPredicateBN
maxGasPerTxBN

Icon LinkDefined in

packages/account/src/providers/provider.ts:499 Icon Link


Icon LinkgetLatestGasPrice

getLatestGasPrice(): Promise<BN>

Get the latest gas price from the node.

Icon LinkReturns

Promise<BN>

A promise that resolves to the latest gas price.

Icon LinkDefined in

packages/account/src/providers/provider.ts:1759 Icon Link


Icon LinkgetMessageByNonce

getMessageByNonce(nonce): Promise<null | GqlMessage>

Returns Message for given nonce.

Icon LinkParameters

NameTypeDescription
noncestringThe nonce of the message to retrieve.

Icon LinkReturns

Promise<null | GqlMessage>

A promise that resolves to the Message object or null.

Icon LinkDefined in

packages/account/src/providers/provider.ts:1823 Icon Link


Icon LinkgetMessageProof

getMessageProof(transactionId, nonce, commitBlockId?, commitBlockHeight?): Promise<null | MessageProof >

Returns Message Proof for given transaction id and the message id from MessageOut receipt.

Icon LinkParameters

NameTypeDescription
transactionIdstringThe transaction to get message from.
noncestring-
commitBlockId?stringThe commit block id (optional).
commitBlockHeight?BNThe commit block height (optional).

Icon LinkReturns

Promise<null | MessageProof >

A promise that resolves to the message proof.

Icon LinkDefined in

packages/account/src/providers/provider.ts:1649 Icon Link


Icon LinkgetMessageStatus

getMessageStatus(nonce): Promise<MessageStatus >

Returns Message Proof for given transaction id and the message id from MessageOut receipt.

Icon LinkParameters

NameTypeDescription
noncestringThe nonce of the message to get status from.

Icon LinkReturns

Promise<MessageStatus >

A promise that resolves to the message status

Icon LinkDefined in

packages/account/src/providers/provider.ts:1783 Icon Link


Icon LinkgetMessages

getMessages(address, paginationArgs?): Promise<GetMessagesResponse >

Returns message for the given address.

Icon LinkParameters

NameTypeDescription
addressstring | AbstractAddress The address to get message from.
paginationArgs?CursorPaginationArgsPagination arguments (optional).

Icon LinkReturns

Promise<GetMessagesResponse >

A promise that resolves to the messages.

Icon LinkDefined in

packages/account/src/providers/provider.ts:1604 Icon Link


Icon LinkgetNode

getNode(): NodeInfo

Returns the cached nodeInfo for the current URL.

Icon LinkReturns

NodeInfo

the node information configuration.

Icon LinkDefined in

packages/account/src/providers/provider.ts:485 Icon Link


Icon LinkgetRelayedTransactionStatus

getRelayedTransactionStatus(relayedTransactionId): Promise<null | GqlRelayedTransactionFailed>

Get the relayed transaction for the given transaction ID.

Icon LinkParameters

NameTypeDescription
relayedTransactionIdstringThe relayed transaction ID to get the response for.

Icon LinkReturns

Promise<null | GqlRelayedTransactionFailed>

A promise that resolves to the relayed transaction.

Icon LinkDefined in

packages/account/src/providers/provider.ts:1839 Icon Link


Icon LinkgetResourcesForTransaction

getResourcesForTransaction(owner, transactionRequestLike, quantitiesToContract?): Promise<{ addedSignatures: number ; dryRunStatus?: DryRunStatus ; estimatedPredicates: TransactionRequestInput [] ; gasPrice: BN ; gasUsed: BN ; maxFee: BN ; maxGas: BN ; minFee: BN ; minGas: BN ; missingContractIds: string[] ; outputVariables: number ; receipts: TransactionResultReceipt[] ; requiredQuantities: CoinQuantity [] ; resources: Resource [] ; updateMaxFee?: boolean }>

Get the required quantities and associated resources for a transaction.

Icon LinkParameters

NameTypeDefault valueDescription
ownerstring | AbstractAddress undefinedaddress to add resources from.
transactionRequestLikeTransactionRequestLike undefinedtransaction request to populate resources for.
quantitiesToContractCoinQuantity [][]quantities for the contract (optional).

Icon LinkReturns

Promise<{ addedSignatures: number ; dryRunStatus?: DryRunStatus ; estimatedPredicates: TransactionRequestInput [] ; gasPrice: BN ; gasUsed: BN ; maxFee: BN ; maxGas: BN ; minFee: BN ; minGas: BN ; missingContractIds: string[] ; outputVariables: number ; receipts: TransactionResultReceipt[] ; requiredQuantities: CoinQuantity [] ; resources: Resource [] ; updateMaxFee?: boolean }>

a promise resolving to the required quantities for the transaction.

Icon LinkDefined in

packages/account/src/providers/provider.ts:1242 Icon Link


Icon LinkgetResourcesToSpend

getResourcesToSpend(owner, quantities, excludedIds?): Promise<Resource []>

Returns resources for the given owner satisfying the spend query.

Icon LinkParameters

NameTypeDescription
ownerstring | AbstractAddress The address to get resources for.
quantitiesCoinQuantityLike []The coin quantities to get.
excludedIds?ExcludeResourcesOptionIDs of excluded resources from the selection (optional).

Icon LinkReturns

Promise<Resource []>

A promise that resolves to the resources.

Icon LinkDefined in

packages/account/src/providers/provider.ts:1323 Icon Link


Icon LinkgetTransaction

getTransaction<TTransactionType>(transactionId): Promise<null | Transaction<TTransactionType>>

Get transaction with the given ID.

Icon LinkType parameters

NameType
TTransactionTypevoid

Icon LinkParameters

NameTypeDescription
transactionIdstringID of the transaction.

Icon LinkReturns

Promise<null | Transaction<TTransactionType>>

A promise that resolves to the transaction.

Icon LinkDefined in

packages/account/src/providers/provider.ts:1485 Icon Link


Icon LinkgetTransactionCost

getTransactionCost(transactionRequestLike, transactionCostParams?): Promise<TransactionCost >

Returns a transaction cost to enable user to set gasLimit and also reserve balance amounts on the transaction.

Icon LinkParameters

NameTypeDescription
transactionRequestLikeTransactionRequestLike The transaction request object.
transactionCostParamsTransactionCostParams The transaction cost parameters (optional).

Icon LinkReturns

Promise<TransactionCost >

A promise that resolves to the transaction cost object.

Icon LinkDefined in

packages/account/src/providers/provider.ts:1132 Icon Link


Icon LinkgetTransactionResponse

getTransactionResponse(transactionId): Promise<TransactionResponse >

Get the transaction response for the given transaction ID.

Icon LinkParameters

NameTypeDescription
transactionIdstringThe transaction ID to get the response for.

Icon LinkReturns

Promise<TransactionResponse >

A promise that resolves to the transaction response.

Icon LinkDefined in

packages/account/src/providers/provider.ts:1813 Icon Link


Icon LinkgetTransactions

getTransactions(paginationArgs?): Promise<GetTransactionsResponse >

Retrieves transactions based on the provided pagination arguments.

Icon LinkParameters

NameTypeDescription
paginationArgs?CursorPaginationArgsThe pagination arguments for retrieving transactions.

Icon LinkReturns

Promise<GetTransactionsResponse >

A promise that resolves to an object containing the retrieved transactions and pagination information.

Icon LinkDefined in

packages/account/src/providers/provider.ts:1503 Icon Link


Icon LinkgetVersion

getVersion(): Promise<string>

Returns the version of the connected node.

Icon LinkReturns

Promise<string>

A promise that resolves to the version string.

Icon LinkDefined in

packages/account/src/providers/provider.ts:612 Icon Link


Icon LinkproduceBlocks

produceBlocks(amount, startTime?): Promise<BN>

Lets you produce blocks with custom timestamps and the block number of the last block produced.

Icon LinkParameters

NameTypeDescription
amountnumberThe amount of blocks to produce.
startTime?numberThe UNIX timestamp (milliseconds) to set for the first produced block (optional).

Icon LinkReturns

Promise<BN>

A promise that resolves to the block number of the last produced block.

Icon LinkDefined in

packages/account/src/providers/provider.ts:1798 Icon Link


Icon LinksendTransaction

sendTransaction(transactionRequestLike, sendTransactionParams?): Promise<TransactionResponse >

Submits a transaction to the chain to be executed.

If the transaction is missing any dependencies, the transaction will be mutated and those dependencies will be added.

Icon LinkParameters

NameTypeDescription
transactionRequestLikeTransactionRequestLike The transaction request object.
sendTransactionParamsProviderSendTxParams The provider send transaction parameters (optional).

Icon LinkReturns

Promise<TransactionResponse >

A promise that resolves to the transaction response object.

Icon LinkDefined in

packages/account/src/providers/provider.ts:715 Icon Link


Icon Linksimulate

simulate(transactionRequestLike, estimateTxParams?): Promise<CallResult >

Executes a signed transaction without applying the states changes on the chain.

If the transaction is missing any dependencies, the transaction will be mutated and those dependencies will be added

Icon LinkParameters

NameTypeDescription
transactionRequestLikeTransactionRequestLike The transaction request object.
estimateTxParamsEstimateTransactionParams The estimate transaction params (optional).

Icon LinkReturns

Promise<CallResult >

A promise that resolves to the call result object.

Icon LinkDefined in

packages/account/src/providers/provider.ts:1096 Icon Link


Icon Linkcreate

create(url, options?): Promise<Provider >

Creates a new instance of the Provider class. This is the recommended way to initialize a Provider.

Icon LinkParameters

NameTypeDescription
urlstringGraphQL endpoint of the Fuel node
optionsProviderOptions Additional options for the provider

Icon LinkReturns

Promise<Provider >

A promise that resolves to a Provider instance.

Icon LinkDefined in

packages/account/src/providers/provider.ts:458 Icon Link