Interface iSIWBBRequestDoc<T>

interface iSIWBBRequestDoc<T> {
    _docId: string;
    _id?: string;
    allowReuseOfBitBadgesSignIn: boolean;
    clientId: string;
    cosmosAddress: string;
    createdAt: T;
    deletedAt?: T;
    description: string;
    image: string;
    name: string;
    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;
    redirectUri?: string;
    secretsPresentations: iSecretsProof<T>[];
    signature: string;
}

Type Parameters

Hierarchy (view full)

  • Doc
    • iSIWBBRequestDoc

Implemented by

Properties

_docId: string

A unique stringified document ID

_id?: string

A unique document ID (Mongo DB ObjectID)

allowReuseOfBitBadgesSignIn: boolean

Whether or not we should allow reuse of BitBadges sign-in in replacement of the signature

clientId: string

The client ID of the app that requested the signature

cosmosAddress: string

The Cosmos address of the signer

createdAt: T

The timestamp of when the signature was created (milliseconds since epoch)

deletedAt?: T

If deleted, we still store temporarily for a period of time. We use a deletedAt timestamp to determine when to delete.

description: string
image: string
name: string
otherSignIns?: {
    discord?: {
        discriminator?: string;
        id: string;
        username: string;
    };
    github?: {
        id: string;
        username: string;
    };
    google?: {
        id: string;
        username: string;
    };
    twitter?: {
        id: string;
        username: string;
    };
}

Other approved sign-ins at the time of this sign-in

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 sign-in params. These are all the details in the message that was signed.

publicKey?: string

The public key for the signed. Only needed for certain chains (Cosmos).

redirectUri?: string

The redirect URI of the app

secretsPresentations: iSecretsProof<T>[]

If required, you can additionally attach proof of secrets ot the auth flow. These can be used to prove sensitive information to verifiers.

signature: string

The signature of the challenge message