API
@joyid/evm
connect

connect

Connect to JoyID wallet and return a address.

Types

function connect(config?: EvmConfig): Promise<string>
 
interface EvmConfig {
  /**
   * The name of your app
   */
  name?: string
  /**
   * The logo of your app
   */
  logo?: string
  /**
   * The RPC URL of the eth node that your app is using
   */
  rpcURL?: string
  /**
   * The network that your app is using, defaults to Sepolia testnet
   */
  network?: Network
  /**
   * The URL of JoyID app url that your app is integrated with, defaults to https://testnet.joyid.dev
   */
  joyidAppURL?: string
}

Example

async function connectOnClick() {
  const address = await connect()
  console.log(`Connected with address ${address}`)
}