Account requirements
- ECDSA key. The account must have an ECDSA (secp256k1) key. Accounts with an ED25519 key can hold HBAR and HTS tokens but cannot sign EVM transactions, so they cannot act through SODAX. Accounts created by MetaMask or through the JSON-RPC relay use ECDSA by default.
- Hollow accounts send after their first signature. An account auto-created by receiving funds at an EVM address starts hollow: it can receive, but cannot send until its key signs a transaction. The user’s first SODAX transaction from that account completes it.
React apps: @sodax/wallet-sdk-react
The React package wraps each chain family’s native wallet SDK (wagmi for EVM networks, including Hedera) behind a uniform connector interface with a single persisted store.
EVM, alongside any other EVM network you support:
useEvmSwitchChain({ xChainId: ChainKeys.HEDERA_MAINNET }) returns isWrongChain and a handleSwitchChain callback to prompt the switch.
Bridging to SDK calls
useWalletProvider({ xChainId: ChainKeys.HEDERA_MAINNET }) returns a typed IEvmWalletProvider ready to pass into any @sodax/sdk method. The swap and money market calls take it directly.
Showing HBAR balances
Hedera’s JSON-RPC relay reports native HBAR frometh_getBalance in 18-decimal weibars, while the SDK and token config use HBAR’s canonical 8 decimals. Read balances through SODAX (for example useXBalances from @sodax/dapp-kit), which scales Hedera’s native balance down to 8 decimals. A balance read straight from eth_getBalance is 10^10 times larger than the matching SDK amount.
Scripts and backends: EvmWalletProvider
Outside React, construct the provider from @sodax/wallet-sdk-core directly:
EvmWalletDefaults lets you tune behavior per provider: sendTransaction, waitForTransactionReceipt, publicClient, walletClient, and transport.
- Full React reference: @sodax/wallet-sdk-react
- Every chain family’s providers: Setup Wallet Providers