Used to check if a protocol hash is valid.
0 = NO_PREFIX_MATCHED, 1 = INVALID_CHECKSUM, 2 = INVALID_LENGTH, 3 = VALID, 4 = PREFIX_NOT_ALLOWED, 5 = INVALID_ENCODING, 6 = OTHER,
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
Used to check if a protocol hash is valid.