Querying
Transaction Status
Wait for transaction confirmation on the blockchain
Transaction Status
After submitting a transaction, use awaitTx to wait for it to appear on-chain. This polls the provider at a configurable interval until the transaction is confirmed or the timeout expires.
Wait for Confirmation
import { , , } from "@evolution-sdk/evolution"
const = ({
: "preprod",
: { : "blockfrost", : "https://cardano-preprod.blockfrost.io/api/v0", : ..! },
: { : "seed", : ..!, : 0 }
})
const = await
.()
.({
: .("addr_test1vrm9x2dgvdau8vckj4duc89m638t8djmluqw5pdrFollw8qd9k63"),
: .(2_000_000n)
})
.()
const = await .()
const = await .()
// Wait for confirmation (poll every 3 seconds)
const = await .(, 3000)
.("Confirmed:", )Parameters
| Parameter | Type | Description |
|---|---|---|
txHash | TransactionHash | Transaction hash to monitor |
checkInterval | number | Polling interval in milliseconds |
timeout | number | Maximum wait time in milliseconds |
On devnet with fast blocks, transactions confirm almost instantly. On mainnet or testnet with 1-second slots, expect 10-20 seconds for the first confirmation.
Next Steps
- UTxOs — Query UTxOs after confirmation
- Your First Transaction — Complete transaction workflow