Interface iExchangeSIWBBAuthorizationCodeSuccessResponse<T>

interface iExchangeSIWBBAuthorizationCodeSuccessResponse<T> {
    access_token: string;
    access_token_expires_at?: T;
    address: string;
    attestationsPresentations?: iAttestationsProof<T>[];
    bitbadgesAddress: string;
    chain: SupportedChain;
    otherSignIns?: {
        discord?: {
            discriminator?: string;
            id: string;
            username: string;
        };
        github?: {
            id: string;
            username: string;
        };
        google?: {
            id: string;
            username: string;
        };
        twitter?: {
            id: string;
            username: string;
        };
    };
    ownershipRequirements?: AssetConditionGroup<T>;
    refresh_token?: string;
    refresh_token_expires_at?: T;
    token_type: string;
    verificationResponse?: {
        errorMessage?: string;
        success: boolean;
    };
}

Type Parameters

Hierarchy (view full)

Properties

access_token: string

The access token to use for the SIWBB request.

access_token_expires_at?: T

The time at which the access token expires.

address: string

The user's address

attestationsPresentations?: iAttestationsProof<T>[]

Derived data integrity proofs for any attestations requested.

bitbadgesAddress: string

The converted BitBadges 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 bb1 addresses).

The chain of the address

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

ownershipRequirements?: AssetConditionGroup<T>

The ownership requirements for the user

refresh_token?: string

The refresh token to use for the SIWBB request.

refresh_token_expires_at?: T

The time at which the refresh token expires.

token_type: string

The token type

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

Verification response

Type declaration

  • OptionalerrorMessage?: 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).