Convenience function for logging in with passkey.

Usage

import { logInWithPasskey } from "@treasure-dev/tdk-core";

// const client = ...

const { user, tdk } = await logInWithPasskey({ client });

Props

client

TreasureConnectClient

apiUri

string | undefined

  • The TDK API URI to use for all HTTP requests.
  • Defaults to "https://tdk-api.treasure.lol".
  • Development environment value is "https://tdk-api.spellcaster.lol".

chainId

number | undefined

  • The chain ID to use for initial connection.
  • Defaults to 42161 (Arbitrum One).

passkeyName

string | undefined

  • Optional name of the passkey to create.
  • Defaults to a generated name

passkeyDomain

string | undefined

  • The domain of the passkey to use for authentication.