Function isValidAddress

    • Validates a Klever address using bech32 decoding

      This function performs full bech32 validation by decoding the address and verifying both the prefix and data length. It's more thorough than the regex-based isKleverAddress() function.

      Parameters

      • address: string

        The address string to validate

      Returns boolean

      True if the address is valid (correct prefix and data length)

      if (isValidAddress('klv1qqqqqqqqqqqqqpgqxwklx...')) {
      console.log('Valid Klever address')
      }

      isKleverAddress for a faster regex-based validation