Function verifyChallenge

  • verifyChallenge always checks three things: 1) originalChallenge was signed correctly by the user, 2) the challenge is still well-formed and valid at the present time, and 3) the user owns all requested assets in their wallet upon verification.

    Type Parameters

    • T extends NumberType

    Parameters

    • chainDriver: undefined | IChainDriver<NumberType>
    • message: string

      The string that represent the original challenge.

    • signature: string

      The result of signing the message, formatted to the chain's specifications

    • Optional options: VerifyChallengeOptions

      Additional checks to perform when verifying the challenge.

    • Optional publicKey: string

      The public key of the user's address. Required for some ChainDrivers, not all.

    Returns Promise<{
        message: string;
        success: boolean;
        verificationData: any;
    }>

    Returns { message: 'success' } object upon success. Throws an error if challenge is invalid.

Generated using TypeDoc