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

Custom UI

See headless mode in action

Overview

Headless mode supports three connection methods

Direct Connect

One-line connection to injected wallets

Email Auth

Three-step OTP flow for embedded wallet

WalletConnect URI

Display a custom QR code

Direct Wallet Connection

Connect to installed wallets directly (MetaMask, Phantom, WalletConnect modal, etc) without showing the Aurum modal
import { WalletId } from '@aurum-sdk/types';

const address = await aurum.connect(WalletId.MetaMask);
Email and WalletConnect (using custom QR code) have dedicated methods below and cannot be used with connect(walletId).

Email Authentication

A three-step OTP flow for Coinbase Embedded Wallet
1

Send OTP

Call emailAuthStart(email) with the user’s email address.
2

Collect OTP

Prompt the user to enter the OTP code from their inbox.
3

Verify & Connect

Call emailAuthVerify(flowId, otp) to complete the connection.
// Step 1: Send OTP
const { flowId } = await aurum.emailAuthStart('user@example.com');

// 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

Display your own QR code for WalletConnect-compatible wallets
1

Get Session URI

Call getWalletConnectSession() to generate a connection URI.
2

Display QR Code

Render the URI as a QR code using your preferred library.
3

Wait for Connection

The waitForConnection() promise resolves when the user scans and approves.
const { uri, waitForConnection } = await aurum.getWalletConnectSession();

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

// Wait for user to scan and approve
try {
  const address = await waitForConnection();
} catch (error) {
  console.error(error);
}

Modal Mode

Default modal UX

Widget

Embed the UI inline