getTransaction
A builder function that returns the interaction to get a transaction by id.
Transaction id is a hash of the encoded transaction payload and can be calculated before submitting the transaction to the network. Transaction status represents the state of a transaction in the blockchain. Status can change until it is finalized.
The transaction id provided must be from the current spork.
Consider using 'fcl.tx(id).onceExecuted()' instead of calling this method directly for real-time transaction monitoring.
Import
You can import the entire package and access the function:
_10import * as sdk from "@onflow/sdk"_10_10sdk.getTransaction(id)
Or import directly the specific function:
_10import { getTransaction } from "@onflow/sdk"_10_10getTransaction(id)
Usage
_10import * as fcl from "@onflow/fcl";_10_10const tx = await fcl.send([_10 fcl.getTransaction("9dda5f281897389b99f103a1c6b180eec9dac870de846449a302103ce38453f3")_10]).then(fcl.decode);
Parameters
id
- Type:
string
Returns
InteractionBuilderFn
_10export type InteractionBuilderFn = (_10 ix: Interaction_10) => Interaction | Promise<Interaction>