Skip to content

connect

Requests the user to connect their wallet to the application.

Usage

example.ts
import { mintclub } from 'mint.club-v2-sdk'
 
const address = await mintclub.wallet.connect(); 
// uses window.ethereum by default
// you can also pass a different provider as an argument
// const okexWallet = await mintclub.wallet.connect(window.okex);

Return Value

Promise<'0x${string}'>

Returns a promise that resolves to a connected address.

Parameters

provider (optional)

  • Type: any
  • Default: window.ethereum

By default, the function will use the window.ethereum object to connect to the wallet. If you want to use a different provider, you can pass it as an argument to the function.