Interface iBlockinChallenge<T>

interface iBlockinChallenge<T> {
    address: string;
    allowReuseOfBitBadgesSignIn?: boolean;
    chain: SupportedChain;
    cosmosAddress: string;
    message: string;
    options?: VerifyChallengeOptions;
    otherSignIns?: {
        discord?: {
            discriminator?: string;
            id: string;
            username: string;
        };
        github?: {
            id: string;
            username: string;
        };
        google?: {
            id: string;
            username: string;
        };
        twitter?: {
            id: string;
            username: string;
        };
    };
    params: ChallengeParams<T>;
    publicKey?: string;
    secretsPresentations?: iSecretsProof<T>[];
    signature?: string;
    verificationResponse?: {
        errorMessage?: string;
        success: boolean;
    };
}

Type Parameters

Implemented by

Properties

address: string

The user's address

allowReuseOfBitBadgesSignIn?: boolean

Whether to allow reuse of BitBadges sign in

The chain of the address

cosmosAddress: string

The converted Cosmos address of params.address. This can be used as the unique identifier for the user (e.g. avoid duplicate sign ins from equivalent 0x and cosmos1 addresses).

message: string

The corresponding message that was signed to obtain the signature.

options?: VerifyChallengeOptions
otherSignIns?: {
    discord?: {
        discriminator?: string;
        id: string;
        username: string;
    };
    github?: {
        id: string;
        username: string;
    };
    google?: {
        id: string;
        username: string;
    };
    twitter?: {
        id: string;
        username: string;
    };
}

Other sign-ins that were requested

Type declaration

  • Optional discord?: {
        discriminator?: string;
        id: string;
        username: string;
    }
    • Optional discriminator?: string
    • id: string
    • username: string
  • Optional github?: {
        id: string;
        username: string;
    }
    • id: string
    • username: string
  • Optional google?: {
        id: string;
        username: string;
    }
    • id: string
    • username: string
  • Optional twitter?: {
        id: string;
        username: string;
    }
    • id: string
    • username: string
params: ChallengeParams<T>

The converted params for the message

publicKey?: string

Some chains require the public key as well to verify signatures

secretsPresentations?: iSecretsProof<T>[]

Derived data integrity proofs for any secrets requested.

signature?: string

The signature of the message.

verificationResponse?: {
    errorMessage?: string;
    success: boolean;
}

Verification response

Type declaration

  • Optional errorMessage?: string

    Returns the response message returned from verification.

  • success: boolean

    Returns whether the current (message, signature) pair is valid and verified (i.e. signature is valid and any assets are owned).