Function createChallenge

  • Creates a challenge that is well-formed according to EIP-4361 - Sign in With Ethereum. Some slight modifications to EIP-4361 for our library include 1) any blockchain's native address, signature, and verification schemes are supported and 2) in resources, one may prefix an asset with 'Asset ID: ' to specify micro-authorizations or role-based access using an on-chain asset.

    Type Parameters

    • T extends NumberType

    Parameters

    • challengeParams: ChallengeParams<T>

      JSON object with the challenge details such as domain, uri, statement, address, etc.

    • Optional options: CreateChallengeOptions

      JSON object speicfying any additional options when creating the challenge

    Returns string

    Well-formed challenge string to be signed by the user, if successsful. Error string is returned upon failure.

Generated using TypeDoc