Function constructChallengeObjectFromString

  • Constructs a valid JSON challenge object from a valid well-formed EIP-4361 string. Note this doesn't check for validity at all. See the EIP-4361 proposal for more details about exact formatting requirements of the string.

    Type Parameters

    • T extends NumberType

    Parameters

    • challenge: string

      Valid EIP-4361 challenge string

    • convertFunction: ((item) => T)
        • (item): T
        • Parameters

          • item: NumberType

          Returns T

    Returns ChallengeParams<T>

    JSON challenge object with all specified EIP-4361 fields

Generated using TypeDoc