EVM Provider
import { useTomo, getWalletState } from '@tomo-inc/tomo-web-sdk';
// react
const { providers } = useTomo()
const { ethereumProvider } = providers;
// pure js
const ethereumProvider = window.tomo_ethereumSwitch Chain ID
//interface
switchChain(chainId: string): Promise<void>
getChainId(): number | string
const chainId = '1'
// react
const current = await ethereumProvider.getChainId();
const res = await ethereumProvider.switchChain(chainId);
// pure js
const current = await window.tomo_ethereum.getChainId();
const res = await window.tomo_ethereum.switchChain(chainId);Get the EVM address
Provider Functions
Signing a Message
Send Transaction
Requests
Last updated