For the complete documentation index, see llms.txt. This page is also available as Markdown.
EVM Provider
The Tomo Telegram SDK implements the Ethereum provider, allowing seamless integration with existing Ethereum-compatible DApps.
To use the EVM provider in your application, you need to first install the SDK and get the wallet provider:
// get provider constethereum=window.ethereum;
Below are methods that developers can use with our EVM provider.
Wallet Connect
Before using the provider, the user needs to log in to the wallet through the modal by eth_requestAccountsmethod. The isConnected method returns a boolean value indicating whether the wallet is connected or not.
eth_signTransaction method will return a response with a signed transaction. Or you can use eth_sendTransaction it to send the signed transaction directly to the RPC node you specified in the provider. If you specify the chainId in params, the transaction will be sent to that network. Otherwise, it will be sent to the network you switched to using wallet_switchEthereumChain the method.
For users to verify the transaction contents, we only support passing parameters to the SDK and letting the user decide whether to sign the created transaction.
Transfer transaction
Contract call transaction
For example, below is the demo for sending ERC20 tokens: