Prerequisites

  • API Key: Ensure you have an API key with the scopes: wallets.create.

Create a Wallet

import { useWallet } from '@crossmint/client-sdk-react-ui';

const { getOrCreateWallet } = useWallet();

const wallet = await getOrCreateWallet({
    chain: "<your-chain>",
});

Parameters

chain
string
required

The chain to use the wallet on.

signer
Signer

The signer to use the wallet with.

owner
string

The owner of the wallet.

  • email:<email>
  • userId:<userId>
  • phoneNumber:<phoneNumber>
  • twitter:<handle>
  • x:<handle>
options
WalletOptions

The options to use the wallet with.

Returns

wallet
Wallet

The created wallet.