Type Alias: VerifyChallengeOptions
Options that can be specified when calling verifyChallenge()
VerifyChallengeOptions =
object
Defined in: packages/bitbadgesjs-sdk/src/blockin/index.ts:70
Options that can be specified when calling verifyChallenge()
Properties
balancesSnapshot?
optionalbalancesSnapshot?:object
Defined in: packages/bitbadgesjs-sdk/src/blockin/index.ts:93
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.
beforeVerification?
optionalbeforeVerification?: (params) =>Promise<void>
Defined in: packages/bitbadgesjs-sdk/src/blockin/index.ts:86
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
params
ChallengeParams<NumberType>
Returns
Promise<void>
earliestIssuedAt?
optionalearliestIssuedAt?:string
Defined in: packages/bitbadgesjs-sdk/src/blockin/index.ts:108
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.
expectedChallengeParams?
optionalexpectedChallengeParams?:Partial<ChallengeParams<NumberType>>
Defined in: packages/bitbadgesjs-sdk/src/blockin/index.ts:75
Optionally define the expected details to check. If the challenge was edited and the details do not match, the challenge will fail verification.
issuedAtTimeWindowMs?
optionalissuedAtTimeWindowMs?:number
Defined in: packages/bitbadgesjs-sdk/src/blockin/index.ts:113
If set, we will verify the issuedAt is within this amount of ms ago (i.e. issuedAt >= Date.now() - issuedAtTimeWindowMs)
skipAssetVerification?
optionalskipAssetVerification?:boolean
Defined in: packages/bitbadgesjs-sdk/src/blockin/index.ts:103
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.
skipSignatureVerification?
optionalskipSignatureVerification?:boolean
Defined in: packages/bitbadgesjs-sdk/src/blockin/index.ts:118
If true, we do not check the signature. You can pass in an undefined ChainDriver
skipTimestampVerification?
optionalskipTimestampVerification?:boolean
Defined in: packages/bitbadgesjs-sdk/src/blockin/index.ts:98
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.