Icon HelpCircleForumIcon Link

⌘K

Icon HelpCircleForumIcon Link
Nightly /
TransactionResponse

@fuel-ts/account v0.96.1 • Docs


Icon LinkClass: TransactionResponse

Represents a response for a transaction.

Icon LinkConstructors

Icon Linknew TransactionResponse()

Icon InfoCircle

new TransactionResponse(tx, provider, abis?, submitTxSubscription?): TransactionResponse

Constructor for TransactionResponse.

Icon LinkParameters

• tx: string | TransactionRequest

The transaction ID or TransactionRequest.

• provider: Provider

The provider.

• abis?: JsonAbisFromAllCalls

• submitTxSubscription?: AsyncIterable<GqlSubmitAndAwaitStatusSubscription, any, any>

Icon LinkReturns

TransactionResponse

Icon LinkDefined in

packages/account/src/providers/transaction-response/transaction-response.ts:145 Icon Link

Icon LinkProperties

Icon Linkabis?

Icon InfoCircle

optional abis: JsonAbisFromAllCalls

Icon LinkDefined in

packages/account/src/providers/transaction-response/transaction-response.ts:137 Icon Link


Icon LinkgasUsed

Icon InfoCircle

gasUsed: BN

Gas used on the transaction

Icon LinkDefined in

packages/account/src/providers/transaction-response/transaction-response.ts:132 Icon Link


Icon Linkid

Icon InfoCircle

id: string

Transaction ID

Icon LinkDefined in

packages/account/src/providers/transaction-response/transaction-response.ts:128 Icon Link


Icon Linkprovider

Icon InfoCircle

provider: Provider

Current provider

Icon LinkDefined in

packages/account/src/providers/transaction-response/transaction-response.ts:130 Icon Link

Icon LinkMethods

Icon LinkassembleResult()

Icon InfoCircle

assembleResult<TTransactionType>(contractsAbiMap?): Promise<TransactionResult<TTransactionType>>

Assembles the result of a transaction by retrieving the transaction summary, decoding logs (if available), and handling transaction failure.

This method can be used to obtain the result of a transaction that has just been submitted or one that has already been processed.

Icon LinkType Parameters

• TTransactionType = void

The type of the transaction.

Icon LinkParameters

• contractsAbiMap?: AbiMap

The map of contract ABIs.

Icon LinkReturns

Promise<TransactionResult<TTransactionType>>

  • The assembled transaction result.

Icon LinkThrows

If the transaction status is a failure.

Icon LinkDefined in

packages/account/src/providers/transaction-response/transaction-response.ts:362 Icon Link


Icon LinkdecodeTransaction()

Icon InfoCircle

decodeTransaction<TTransactionType>(transactionWithReceipts): Transaction<TTransactionType>

Decode the raw payload of the transaction.

Icon LinkType Parameters

• TTransactionType = void

Icon LinkParameters

• transactionWithReceipts

The transaction with receipts object.

• transactionWithReceipts.id: string

• transactionWithReceipts.rawPayload: string

• transactionWithReceipts.status?: null | object | object | object | object

Icon LinkReturns

Transaction<TTransactionType>

The decoded transaction.

Icon LinkDefined in

packages/account/src/providers/transaction-response/transaction-response.ts:278 Icon Link


Icon Linkfetch()

Icon InfoCircle

fetch(): Promise<object>

Fetch the transaction with receipts from the provider.

Icon LinkReturns

Promise<object>

Transaction with receipts query result.

Icon Linkid

Icon InfoCircle

id: string

Icon LinkrawPayload

Icon InfoCircle

rawPayload: string

Icon Linkstatus?

Icon InfoCircle

optional status: null | object | object | object | object

Icon LinkDefined in

packages/account/src/providers/transaction-response/transaction-response.ts:247 Icon Link


Icon LinkgetTransactionSummary()

Icon InfoCircle

getTransactionSummary<TTransactionType>(contractsAbiMap?): Promise<TransactionSummary <TTransactionType>>

Retrieves the TransactionSummary. If the gqlTransaction is not set, it will fetch it from the provider

Icon LinkType Parameters

• TTransactionType = void

Icon LinkParameters

• contractsAbiMap?: AbiMap

The contracts ABI map.

Icon LinkReturns

Promise<TransactionSummary <TTransactionType>>

Icon LinkDefined in

packages/account/src/providers/transaction-response/transaction-response.ts:292 Icon Link


Icon Linkwait()

Icon InfoCircle

wait<TTransactionType>(contractsAbiMap?): Promise<TransactionResult<TTransactionType>>

Waits for transaction to complete and returns the result.

Icon LinkType Parameters

• TTransactionType = void

Icon LinkParameters

• contractsAbiMap?: AbiMap

The contracts ABI map.

Icon LinkReturns

Promise<TransactionResult<TTransactionType>>

Icon LinkDefined in

packages/account/src/providers/transaction-response/transaction-response.ts:416 Icon Link


Icon LinkwaitForResult()

Icon InfoCircle

waitForResult<TTransactionType>(contractsAbiMap?): Promise<TransactionResult<TTransactionType>>

Waits for transaction to complete and returns the result.

Icon LinkType Parameters

• TTransactionType = void

Icon LinkParameters

• contractsAbiMap?: AbiMap

Icon LinkReturns

Promise<TransactionResult<TTransactionType>>

The completed transaction result

Icon LinkDefined in

packages/account/src/providers/transaction-response/transaction-response.ts:404 Icon Link


Icon Linkcreate()

Icon InfoCircle

static create(id, provider, abis?): Promise<TransactionResponse >

Async constructor for TransactionResponse. This method can be used to create an instance of TransactionResponse and wait for the transaction to be fetched from the chain, ensuring that the gqlTransaction property is set.

Icon LinkParameters

• id: string

The transaction ID.

• provider: Provider

The provider.

• abis?: JsonAbisFromAllCalls

Icon LinkReturns

Promise<TransactionResponse >

Icon LinkDefined in

packages/account/src/providers/transaction-response/transaction-response.ts:166 Icon Link