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