Function validateOperation

  • Parameters

    • value: string

    Returns ValidationResult

    0 (NO_PREFIX_MATCHED), 1 (INVALID_CHECKSUM), 2 (INVALID_LENGTH) or 3 (VALID).

    Used to check if an operation hash is valid.

    import { validateOperation } from '@taquito/utils';
    const operationHash = 'oo6JPEAy8VuMRGaFuMmLNFFGdJgiaKfnmT1CpHJfKP3Ye5ZahiP'
    const validation = validateOperation(operationHash)
    console.log(validation)
    // This example return 3 which correspond to VALID