Hierarchy

  • default

Constructors

Properties

storage: IStorage

Accessors

Methods

  • Logs the user out by flushing the signer and removing credentials.

    Returns Promise<void>

  • Returns an Ethereum provider using the configured signer.

    Parameters

    • options: {
          policy?: string;
          providerInfo?: {
              icon: `data:image/${string}`;
              name: string;
              rdns: string;
          };
      } = {}

      Configuration options for the Ethereum provider.

      • Optional policy?: string
      • Optional providerInfo?: {
            icon: `data:image/${string}`;
            name: string;
            rdns: string;
        }
        • icon: `data:image/${string}`
        • name: string
        • rdns: string

    Returns Provider

    A Provider instance.

    Throws

    If the signer is not an EmbeddedSigner.

  • Configures a session key and returns the session key details.

    Returns SessionKey

    A SessionKey object containing the address and registration status.

  • Configures an embedded signer.

    Parameters

    • chainId: null | number = null

      The chain ID for the embedded signer.

    • shieldAuthentication: null | ShieldAuthentication = null

      Shield authentication details.

    • recoveryPassword: null | string = null

      Recovery password.

    Returns Promise<void>

  • Signs a message.

    Parameters

    • message: string | Uint8Array<ArrayBufferLike>

      Message to sign.

    • Optional options: {
          hashMessage?: boolean;
          arrayifyMessage?: boolean;
      }

      Additional options for signing.

      • Optional hashMessage?: boolean
      • Optional arrayifyMessage?: boolean

    Returns Promise<string>

    The signature.

    Throws

    If no signer is configured.

  • Signs typed data.

    Parameters

    Returns Promise<string>

    The signature.

    Throws

    If no signer is configured.

  • Exports the private key.

    Returns Promise<string>

    The private key.

    Throws

    If no signer is configured.

  • Parameters

    • __namedParameters: {
          recoveryMethod: RecoveryMethod;
          recoveryPassword?: string;
          encryptionSession?: string;
      }
      • recoveryMethod: RecoveryMethod
      • Optional recoveryPassword?: string
      • Optional encryptionSession?: string

    Returns Promise<void>

  • Logs in a user with email and password.

    Parameters

    • __namedParameters: {
          email: string;
          password: string;
          ecosystemGame?: string;
      }
      • email: string
      • password: string
      • Optional ecosystemGame?: string

    Returns Promise<AuthResponse>

    An AuthResponse object containing authentication details.

  • Registers a new guest user.

    Returns Promise<AuthResponse>

    An AuthResponse object containing authentication details.

  • Signs up a new user with email and password.

    Parameters

    • __namedParameters: {
          email: string;
          password: string;
          options?: {
              data: {
                  name: string;
              };
          };
          ecosystemGame?: string;
      }
      • email: string
      • password: string
      • Optional options?: {
            data: {
                name: string;
            };
        }
        • data: {
              name: string;
          }
          • name: string
      • Optional ecosystemGame?: string

    Returns Promise<AuthResponse>

    An AuthResponse object containing authentication details.

  • Links an email and password to an existing account using an authentication token.

    Parameters

    • __namedParameters: {
          email: string;
          password: string;
          authToken: string;
          ecosystemGame?: string;
      }
      • email: string
      • password: string
      • authToken: string
      • Optional ecosystemGame?: string

    Returns Promise<AuthPlayerResponse>

    An AuthPlayerResponse object.

  • Unlinks an email and password from an existing account using an authentication token.

    Parameters

    • __namedParameters: {
          email: string;
          authToken: string;
      }
      • email: string
      • authToken: string

    Returns Promise<AuthPlayerResponse>

    An AuthPlayerResponse object.

  • Requests an email verification link.

    Parameters

    • __namedParameters: {
          email: string;
          redirectUrl: string;
      }
      • email: string
      • redirectUrl: string

    Returns Promise<void>

  • Resets the user's password.

    Parameters

    • __namedParameters: {
          email: string;
          password: string;
          state: string;
      }
      • email: string
      • password: string
      • state: string

    Returns Promise<void>

  • Requests a password reset link.

    Parameters

    • __namedParameters: {
          email: string;
          redirectUrl: string;
      }
      • email: string
      • redirectUrl: string

    Returns Promise<void>

  • Verifies the user's email.

    Parameters

    • __namedParameters: {
          email: string;
          state: string;
      }
      • email: string
      • state: string

    Returns Promise<void>

  • Initializes an OAuth linking process.

    Parameters

    Returns Promise<InitAuthResponse>

    An InitAuthResponse object.

  • Polls for OAuth authentication completion.

    Parameters

    • key: string

      OAuth polling key.

    Returns Promise<AuthResponse>

    An AuthResponse object.

  • Initializes Sign-In with Ethereum (SIWE).

    Parameters

    • __namedParameters: {
          address: string;
          ecosystemGame?: string;
      }
      • address: string
      • Optional ecosystemGame?: string

    Returns Promise<SIWEInitResponse>

    A SIWEInitResponse object.

  • Authenticates using Sign-In with Ethereum (SIWE).

    Parameters

    • __namedParameters: {
          signature: string;
          message: string;
          walletClientType: string;
          connectorType: string;
      }
      • signature: string
      • message: string
      • walletClientType: string
      • connectorType: string

    Returns Promise<AuthResponse>

    An AuthResponse object.

  • Links a wallet using SIWE.

    Parameters

    • __namedParameters: {
          signature: string;
          message: string;
          walletClientType: string;
          connectorType: string;
          authToken: string;
      }
      • signature: string
      • message: string
      • walletClientType: string
      • connectorType: string
      • authToken: string

    Returns Promise<AuthPlayerResponse>

    An AuthPlayerResponse object.

  • Unlinks a wallet.

    Parameters

    • __namedParameters: {
          address: string;
          authToken: string;
      }
      • address: string
      • authToken: string

    Returns Promise<AuthPlayerResponse>

    An AuthPlayerResponse object.

  • Stores authentication credentials.

    Parameters

    • auth: Auth

      Authentication details.

    Returns void

  • Sends a signature transaction intent request.

    Parameters

    • transactionIntentId: string

      Transaction intent ID.

    • signableHash: null | string = null

      User operation hash.

    • signature: null | string = null

      Transaction signature.

    • optimistic: boolean = false

      Whether the request is optimistic.

    Returns Promise<TransactionIntentResponse>

    A TransactionIntentResponse object.

    Throws

    If no signableHash or signature is provided.

  • Sends a transaction signed with a session request.

    Parameters

    • sessionId: string

      Session ID.

    • signature: string

      Session signature.

    • Optional optimistic: boolean

      Whether the request is optimistic.

    Returns Promise<SessionResponse>

    A SessionResponse object.

  • Gets the current access token.

    Returns null | string

    The access token, or null if not available.

  • Validates and refreshes the access token if needed.

    Parameters

    • Optional forceRefresh: boolean

    Returns Promise<void>

Generated using TypeDoc