Skip to content

withAccount

Create a wallet client with a custom provider & account.

Usage

example.ts
await mintclub
	.network('ethereum')
	.withAccount('0x...', window.ethereum) 
	.token('MINT')
	.create({
		name: 'Mint Club',
		reserveToken: {
			address: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', // mainnet WETH token address 
			decimals: 18, 
		}, 
		curveData
	})

Return Value

network

Returns the network instance, so you chain functions such as token and nft.

You could also chain methods like withPublicClient and withWalletClient.

Parameters

walletAddress

  • Type: '0x${string}'

The wallet address from the provider

provider (optional)

  • Type: any
  • Default: window.ethereum

Custom wallet provider