sdk.blockfrost.awaittransactionconfirmation
Home > @blaze-cardano/sdk > Blockfrost > awaitTransactionConfirmation
Blockfrost.awaitTransactionConfirmation() method
This method awaits confirmation of the transaction given as argument. The response is parsed into a boolean, which is then returned. If tx is not confirmed at first and no value for timeout is provided, then false is returned. If tx is not confirmed at first and a value for timeout (in ms) is given, then subsequent checks will be performed at a 20 second interval until timeout is reached.
Signature:
awaitTransactionConfirmation(txId: TransactionId, timeout?: number): Promise<boolean>;
Parameters
| Parameter | Type | Description | 
|---|---|---|
| txId | The hash of a transaction | |
| timeout | number | (Optional) An optional timeout for waiting for confirmation. This value should be greater than average block time of 20000 ms | 
Returns:
Promise<boolean>
A Promise that resolves to a boolean