@sodax/wallet-sdk-core — wallet connection, signing, and account management for the SODAX cross-chain ecosystem. Hooks read from a single Zustand store; per-chain native SDKs (wagmi, @solana/wallet-adapter, @mysten/dapp-kit-react, …) are wrapped behind a uniform IXService / IXConnector interface.
Features
- Unified wallet connectivity across every supported chain family
- EVM (Sonic hub, Ethereum, Arbitrum, Base, BSC, Optimism, Polygon, Avalanche, HyperEVM, Lightlink, Redbelly, Kaia, Hedera, Robinhood, Monad) — EIP-6963 + WalletConnect
- Solana, Sui, Stellar, ICON, Injective, Bitcoin, NEAR, Stacks, Tron, TON (TonConnect; set
TON.manifestUrlto your app’stonconnect-manifest.json), Zcash (Noir Wallet; deposits also need an address-indexedrpcUrlforZCASH_MAINNETin the SDK config), Cardano (Lace; balances read Koios throughCARDANO.chains[CARDANO_MAINNET].rpcUrlwhen set, otherwise only the connected Lace address’s own balance)
- Single-store state —
useXAccount,useXConnection,useXAccountsall read the same Zustand slice; persisted tolocalStorage - Bridge to
@sodax/sdk—useWalletProviderreturns a typedIXxxWalletProviderready to plug into any SDK call - Headless wallet modal —
useWalletModalstate machine (chainSelect → walletSelect → connecting → success | error), render-agnostic - Batch operations — connect/disconnect every chain a wallet identifier covers, in sequence
- WalletConnect — opt-in for enterprise custody (Fireblocks, etc.) via
config.EVM.walletConnect - Email login (Privy) — opt-in “Email (Privy)” EVM wallet via
config.EVM.privyand@sodax/wallet-sdk-react/privy; needs@privy-io/react-auth3.40+ (an optional peer — partners who skip it install nothing). The wallet is custodied by Privy: no signing while Privy is unreachable, addresses belong to your Privy app, a user who loses their email loses the wallet, and your Privy app is billed per signature. Read the Privy guide before enabling it.
Installation
Peer dependencies
Quick start
Documentation
The full guide lives indocs/. Start with the topic that matches what you’re building.
Chain-not-enabled warnings
useWalletProvider and useXConnectors warn once per chain type when you ask for a chain that is not in SodaxWalletProvider config.chains, then return undefined / []. The warning is a misconfiguration signal, so it is suppressed until SodaxWalletProvider has initialized its chain services — on the very first render enabledChains is still empty for every app, correctly configured or not. If you relied on seeing that warning during mount, it now arrives only once services are up, and only when the chain is genuinely absent from your config.
Solana balance batching
Multi-token Solana balance reads batch the legacy SPL Token and Token-2022 associated-account candidates in requests of at most 100 accounts. Native SOL remains a separate balance request. If any of these RPC requests fails,getBalances rejects instead of reporting zero balances, so callers such as useXBalances surface an error and keep their last good data.
Stellar balance batching
Stellar balance reads load the account from Horizon once pergetBalances call. XLM and every token that wraps a classic asset are read from that response, and a classic asset without a trustline reads as zero without any request (its own issuer reads the maximum, as the asset contract reports). Only custom Soroban tokens are read by simulating balance(), one request each. If the account load or a simulation request fails, getBalances and getBalance reject instead of reporting zero balances. An account that has never been funded reads as zero for XLM and classic assets, while custom Soroban tokens are still simulated, since they can credit an address that has no account.
AI agent docs
AI-readable docs for@sodax/wallet-sdk-react (and the other @sodax/* packages) are shipped via @sodax/skills — a separate npm package bundling Claude-Code SKILL.md files and a long-form knowledge tree.
Recommended: skills CLI — from your project root:
AGENTS.md pointer (fallback for web chats, or when you prefer a devDependency over the CLI):
node_modules/@sodax/skills/AGENTS.md. See docs/ai-integration-guide.md for all install modes and per-tool wiring.
Sub-path exports
Concrete connector / service classes are not exported from the package barrel — they live behind sub-path imports to prevent accidental coupling to internals:@sodax/wallet-sdk-react/privy is the one sub-path that is a feature, not a deep import: it exports privy() for EVM.privy and is the only entry that loads @privy-io/react-auth.
See Connectors for the full list of deep-import sub-paths.
Requirements
- Node.js >= 22.12.0
- React >= 19
- TypeScript
Development
Contributing
Contributions welcome — see the repo Contributing Guide. For onboarding a new chain family, followdocs/ADDING_A_NEW_CHAIN.md.