Type alias VerifyChallengeOptions

VerifyChallengeOptions: {
    balancesSnapshot?: object;
    beforeVerification?: ((params) => Promise<void>);
    earliestIssuedAt?: string;
    expectedChallengeParams?: Partial<ChallengeParams<NumberType>>;
    issuedAtTimeWindowMs?: number;
    skipAssetVerification?: boolean;
    skipSignatureVerification?: boolean;
    skipTimestampVerification?: boolean;
}

Type declaration

  • Optional balancesSnapshot?: object

    For verification of assets, instead of dynamically fetching the assets, you can specify a snapshot of the assets.

    This is useful if you have a snapshot, balances will not change, or you are verifying in an offline manner.

  • Optional beforeVerification?: ((params) => Promise<void>)
      • (params): Promise<void>
      • Optional function to call before verification. This is useful to verify the challenge is valid before proceeding with verification.

        Note you can use expectedChallengeParams to verify values equal as expected.

        This function is useful if you need to implement custom logic other than strict equality). For example, assert that only one of assets A, B, or C are defined and not all three.

        Parameters

        Returns Promise<void>

  • Optional earliestIssuedAt?: string

    The earliest issued At ISO date string that is valid. For example, if you want to verify a challenge that was issued within the last minute, you can specify this to be 1 minute ago.

  • Optional expectedChallengeParams?: Partial<ChallengeParams<NumberType>>

    Optionally define the expected details to check. If the challenge was edited and the details do not match, the challenge will fail verification.

  • Optional issuedAtTimeWindowMs?: number

    If set, we will verify the issuedAt is within this amount of ms ago (i.e. issuedAt >= Date.now() - issuedAtTimeWindowMs)

  • Optional skipAssetVerification?: boolean

    If true, we do not check asset ownership. This is useful if you are verifying a challenge that is expected to be verified at a future time.

  • Optional skipSignatureVerification?: boolean

    If true, we do not check the signature. You can pass in an undefined ChainDriver

  • Optional skipTimestampVerification?: boolean

    If true, we do not check timestamps (expirationDate / notBefore). This is useful if you are verifying a challenge that is expected to be verified at a future time.

Generated using TypeDoc