Function checkPublicKeyFormat

  • Checks that the input matches the proper format for a public key, as given by PUBLIC_KEY_REGEX.

    Parameters

    • publicKey: string

      the string to check

    • Optional nameForErrorMessages: string

      the name of this value, which is used only for error messages (not checked for legality).

    Returns string

    the unmodified input, for easy chaining

    Throws

    TypeError if the format doesn't match

Generated using TypeDoc