Taquito TypeDocs
    Preparing search index...

    Function isValidPrefixedValue

    • Used to check if a value has one of the allowed prefixes.

      Parameters

      • value: string
      • Optionalprefixes: PrefixV2[]

      Returns boolean

      true if the value has one of the allowed prefixes, false otherwise

      import { isValidPrefixedValue } from '@taquito/utils';
      const value = 'tz1L9r8mWmRPndRhuvMCWESLGSVeFzQ9NAWx'
      const isValid = isValidPrefixedValue(value, [PrefixV2.Ed25519PublicKeyHash])
      console.log(isValid) // true