Represents the IdentityClient class providing identity-related functionality.

Hierarchy

Constructors

  • Constructs a new instance of the IdentityClient class.

    Parameters

    • signer: Signer

      The signer to use for authentication.

    • Optional authToken: string

      The authentication token to use for offchain drivers.

    Returns IdentityClient

Properties

_honeycomb: Honeycomb
_signer: Signer

Accessors

  • get address(): PublicKey
  • Gets the public key of the current identity.

    Returns PublicKey

  • get authToken(): string
  • Gets the authentication token.

    Returns string

  • get isGuest(): boolean
  • Checks if the identity is a guest identity.

    Returns boolean

  • get signer(): Signer
  • Gets the signer used by the identity module.

    Returns Signer

Methods

  • Authenticates the user and obtains an authentication token.

    Returns Promise<string>

    A promise that resolves with the authentication token.

    Throws

    Error if the user is a guest user.

  • Access to all fetch methods i.e. user, profiles.

    Returns IdentityFetch

    A new IdentityFetch instance.

  • Get the Honeycomb client instance associated with the module.

    Returns Honeycomb

    The Honeycomb client instance.

  • Installs the IdentityModule into the Honeycomb instance.

    Parameters

    • honeycomb: Honeycomb

      The Honeycomb instance to install the module into.

    Returns Honeycomb

    The modified Honeycomb instance with the IdentityModule installed.

  • Loads the delegate authority of this identity for a specific project.

    Parameters

    • Optional projectKey: string | PublicKey

      The project key or address for which to load the delegate authority.

    • Optional commitmentOrConfig: Commitment | GetAccountInfoConfig

      The commitment level or account info config.

    Returns Promise<DelegateAuthorityWithAddress>

    The delegate authority with address information.

  • Loads all profiles for the current user.

    Returns Promise<Profiles>

    A promise that resolves with the loaded profiles.

  • Loads the profile for a given user identity and project.

    Parameters

    • Optional projectKey: PublicKey

      The project key or address.

    • Optional identity: string | PublicKey

      The user's identity key or address.

    • Optional reFetch: boolean

      If true, the profile will be re-fetched.

    • Optional commitmentOrConfig: Commitment | GetAccountInfoConfig

      The commitment level or account info config.

    Returns Promise<IdentityProfile>

    A promise that resolves with the loaded profile.

  • Signs all the provided transactions using the identity's signer.

    Type Parameters

    • T = Transaction | VersionedTransaction

    Parameters

    • transactions: T[]

      An array of transactions to sign.

    Returns Promise<T[]>

    A Promise that resolves to an array of signed transactions.

    Throws

    Error if the identity is a guest identity.

  • Signs the provided message using the identity's signer.

    Parameters

    • message: Uint8Array

      The message to sign as a Uint8Array.

    Returns Promise<Uint8Array>

    A Promise that resolves to the signature as a Uint8Array.

    Throws

    Error if the identity is a guest identity.

  • Signs the provided transaction using the identity's signer.

    Type Parameters

    • T = Transaction | VersionedTransaction

    Parameters

    • transaction: T

      The transaction to sign.

    Returns Promise<T>

    A Promise that resolves to the signed transaction.

    Throws

    Error if the identity is a guest identity.

  • Loads the current user.

    Parameters

    • Optional reFetch: boolean

      If true, the user will be re-fetched and the cache will reset.

    • Optional commitmentOrConfig: Commitment | GetAccountInfoConfig

      The commitment level or account info config.

    Returns Promise<IdentityUser>

    A promise that resolves with the loaded user.

  • Loads the wallet resolver for the current identity.

    Parameters

    • Optional reFetch: boolean

      If true, the wallet resolver will be re-fetched and the cache will reset.

    • Optional commitmentOrConfig: Commitment | GetAccountInfoConfig

      The commitment level or account info config.

    Returns Promise<WalletResolver>

    A promise that resolves with the wallet resolver.

Generated using TypeDoc