waitForTransactionHash

Wait for a transaction to be submitted onchain and return the transaction hash.

Example

import { Engine } from "thirdweb";
const { transactionHash } = await Engine.waitForTransactionHash({
client,
transactionId, // the transaction id returned from enqueueTransaction
});
function waitForTransactionHash(args: {
client: ThirdwebClient;
timeoutInSeconds?: number;
transactionId: string;
}): Promise<{
chain: Readonly;
client: ThirdwebClient;
maxBlocksWaitTime?: number;
readonly transactionHash: `0x${string}`;
}>;

Parameters

The arguments for the transaction.

Type

let args: {
client: ThirdwebClient;
timeoutInSeconds?: number;
transactionId: string;
};

Returns

let returnType: Promise<{
chain: Readonly;
client: ThirdwebClient;
maxBlocksWaitTime?: number;
readonly transactionHash: `0x${string}`;
}>;