Integrate Embedded Wallets with the TON Blockchain
While using the Embedded Wallets Web SDK (formerly Web3Auth) for a non-EVM chain like TON, you can obtain the user's private key from the provider. Using this private key, you can use the corresponding libraries of the blockchain to make blockchain calls like getting the user's account, balance, send transaction, etc. We have highlighted a few methods here to get you started quickly.
note
The SDKs are now branded as MetaMask Embedded Wallet SDKs (formerly Web3Auth Plug and Play SDKs). Package names and APIs remain Web3Auth (for example, Web3Auth React SDK), and code snippets may reference web3auth identifiers.
Installation
- npm
- Yarn
- pnpm
- Bun
npm install --save @web3auth/no-modal @web3auth/auth-adapter @web3auth/base tonweb @orbs-network/ton-access
yarn add @web3auth/no-modal @web3auth/auth-adapter @web3auth/base tonweb @orbs-network/ton-access
pnpm add @web3auth/no-modal @web3auth/auth-adapter @web3auth/base tonweb @orbs-network/ton-access
bun add @web3auth/no-modal @web3auth/auth-adapter @web3auth/base tonweb @orbs-network/ton-access