The client to use. AvalancheCoreClient
The transaction ID. GetTxStatusParameters
The transaction status. GetTxStatusReturnType
avm.getTxStatus is deprecated in AvalancheGo, and AvalancheGo plans to remove it in an upcoming release. Use getTx instead: the transaction is accepted when getTx returns it.
import { createAvalancheCoreClient } from '@avalanche-sdk/client'
import { avalanche } from '@avalanche-sdk/client/chains'
import { getTxStatus } from '@avalanche-sdk/client/methods/xchain'
const client = createAvalancheCoreClient({
chain: avalanche,
transport: {
type: "http",
url: "<url>",
},
})
const status = await getTxStatus(client, {
txID: "2QouvMUbQ6tchBHSJdZ7MoFhsQhHt5KqZQqHdZ7MoFhsQhHt5KqZQ"
})
Get the status of a transaction.