Documentation Index
Fetch the complete documentation index at: https://docs.rhino.fi/llms.txt
Use this file to discover all available pages before exploring further.
You can either create a TON chain adapter from a TonConnectUI instance or from a TON private key:
From wallet
Use this method to use connected wallets.
import { getTonChainAdapter } from '@rhino.fi/sdk/adapters/ton'
const chainAdapter = getTonChainAdapter(
tonConnectUI,
chainConfig,
rpcUrl,
)
From private key
Use this method to pass a private key directly.
import { getTonChainAdapterFromSecretKey } from '@rhino.fi/sdk/adapters/ton'
const chainAdapter = getTonChainAdapterFromSecretKey(
'YOUR_PRIVATE_KEY',
'YOUR_PUBLIC_KEY',
chainConfig,
rpcUrl,
)
As there are no stable public TON RPC endpoints, you will need to provide your own.