Skip to main content
Apps that want complete control over the wallet connection flow can connect to any wallet, bypassing the Aurum UI’s entirely.

Direct Wallet Connection

Use connect(walletId) to connect directly without showing the modal:
const address = await aurum.connect(WalletId.MetaMask);
Note: WalletId.Email and WalletId.WalletConnect have dedicated methods below and cannot be used with connect(walletId).

Email Auth

Two-step flow for Coinbase Embedded Wallet:

emailAuthStart(email): Promise<{ flowId: string }>

Sends an OTP code to the provided email.

emailAuthVerify(flowId, otp): Promise<{ address: string, email: string, isNewUser: boolean }>

Verifies the OTP and completes connection.
// Step 1: Send OTP
const { flowId } = await aurum.emailAuthStart('[email protected]');

// Step 2: User enters OTP from their email
const otp = await promptUserForOTP();

// Step 3: Verify and connect
const { address, email, isNewUser } = await aurum.emailAuthVerify(flowId, otp);

WalletConnect URI Flow

For custom QR code displays:

getWalletConnectSession(): Promise<{ uri: string, waitForConnection: () => Promise<string> }>

const { uri, waitForConnection } = await aurum.getWalletConnectSession();

// Display your own QR code
renderQRCode(uri);

// Wait for user to scan and approve
const address = await waitForConnection();

Using Hooks

Email Auth

const { emailAuthStart, emailAuthVerify } = useConnect();

// Step 1: Send OTP
const { flowId } = await emailAuthStart('[email protected]');

// Step 2: User enters OTP from their email
const otp = await promptUserForOTP();

// Step 3: Verify and connect
const { address, email, isNewUser } = await emailAuthVerify(flowId, otp);

WalletConnect URI Flow

const { getWalletConnectSession } = useConnect();

const { uri, waitForConnection } = await getWalletConnectSession();

// Display your own QR code
renderQRCode(uri);

// Wait for user to scan and approve
const address = await waitForConnection();
Check out the aurum demo to see the headless UX in action.