Quick Start

Installation

npm install @tomo-inc/tomo-evm-kit

or

pnpm i @tomo-inc/tomo-evm-kit

Import Styles

import '@tomo-inc/tomo-evm-kit/styles.css';

Use TomoEVMKitProvider

Create a Project and Retrieve clientId

  • Talk to us to create a developer account. Please provide a non-gmail business email address.

  • Create a new project and copy the generated clientId.

  • Use this clientId in your TomoEVMKitProvider.

Setup Provider

Use React, Wagmi and Viem

Use a clientId obtained from the https://dashboard.tomo.inc/. Your application will fetch application data from our backend with clientId

TomoEVMKit integrates multiple wallets, including MetaMask, WalletConnect, and more. Add wallets during configuration using the following example:

Displaying the Modal

To display the modal for wallet connection, you can use the hooks provided by TomoEVMKit. These hooks are based on RainbowKit’s modal system.

Example Code:

Customize Theme

Same as RainbowKit: https://www.rainbowkit.com/docs/theming#customizing-the-built-in-themes.

If you want to put the wallet list before social login, you can set the property socailsFirst to false.

Additional Reference

For more advanced usage, refer to the RainbowKit Documentation. The behavior and integration are similar, making it easy to adapt.

FAQ

  1. How to use with Next.js?

Additionally, manually install core-js-pure.

  1. How to add chains?

For security reasons, Tomo must manually whitelist any new mainnet. You can send us a request, and we will schedule it according to your launch time. Before formally supporting the mainnet, you can use a customized chain to integrate the testnet and continue your development with extension wallets.

Last updated