0 (NO_PREFIX_MATCHED), 1 (INVALID_CHECKSUM), 2 (INVALID_LENGTH) or 3 (VALID).
Used to check if a block hash is valid.
import { validateBlock } from '@taquito/utils';const blockHash = 'PtHangz2aRngywmSRGGvrcTyMbbdpWdpFKuS4uMWxg2RaH9i1qx'const validation = validateBlock(blockHash)console.log(validation)// This example return 3 which correspond to VALID Copy
import { validateBlock } from '@taquito/utils';const blockHash = 'PtHangz2aRngywmSRGGvrcTyMbbdpWdpFKuS4uMWxg2RaH9i1qx'const validation = validateBlock(blockHash)console.log(validation)// This example return 3 which correspond to VALID
Description
Used to check if a block hash is valid.
Example