Installation
Configuration Options
TheAurum instance is initialized with the below config options, broken out into brand, wallets, and telemetry.
- Coinbase CDP: Register at portal.cdp.coinbase.com
- WalletConnect: Register at dashboard.reown.com
Example
Aurum Properties
rpcProvider: AurumRpcProvider
EIP-1193 compatible provider. Works with viem, ethers.js, and other web3 libraries.
Aurum Methods
whenReady(): Promise<void>
Waits for the SDK to finish initializing, including restoring any previous connection, such as after a page refresh.
connect(walletId?: WalletId): Promise<`0x${string}`>
Opens the wallet connection modal. If walletId is specified, it connects directly to that wallet (see more about Headless UX).
WalletId.Email, WalletId.MetaMask, WalletId.Phantom, WalletId.CoinbaseWallet, WalletId.Rabby, WalletId.Brave, WalletId.Ledger, and WalletId.WalletConnect.
Throws error if user closes the modal without connecting.
disconnect(): Promise<void>
Disconnects the currently connected wallet.
isConnected(): Promise<boolean>
Returns whether a wallet is currently connected.
getUserInfo(): Promise<UserInfo | undefined>
Returns info about the connected user, or undefined if not connected.
getChainId(): Promise<string>
Returns the current chain ID.
switchChain(chainId, chain?): Promise<void>
Switches to a different network. If the chain isn’t added to the wallet, it will attempt to add it.
updateBrandConfig(newConfig): void
Updates the brand configuration (theme, font, walletLayout, etc).
updateWalletsConfig(newConfig): void
Updates the wallets configuration (currently only supports exclude).