@sodax/wallet-sdk-react
A comprehensive React Wallet SDK tailored for the Sodax ecosystem that provides unified wallet connectivity across multiple blockchain networks.
Features
Seamless wallet connectivity for all supported wallets in the Sodax network
EVM Wallets: All browser extensions that support EIP-6963 (Hana Wallet, MetaMask, Phantom, etc.) β
Sui Wallets: All browser extension that @mysten/dapp-kit supports (Hana, Sui Wallet, Suiet, etc.) β
Solana Wallets: β
Stellar Wallets: β
Injective Wallets: β
ICON Wallets: β (Hana Wallet and other ICON-compatible extensions)
Address and connection state management
EVM (Arbitrum, Avalanche, Base, BSC, Optimism, Polygon, Sonic, HyperEVM, LightLink) β
Sui β
Solana β
Stellar β
Injective β
ICON β
Installation
Peer Dependencies
This package requires the following peer dependencies:
Quick Start
This example demonstrates:
Setting up the required providers (
QueryClientProviderandSodaxWalletProvider)Using
useXConnectorsto get available wallet connectorsUsing
useXConnectto handle wallet connectionsUsing
useXAccountto display the connected wallet addressA basic UI to display and connect to available wallets
Requirements
Node.js >= 18.0.0
React >= 19
TypeScript
API Reference
Components
SodaxWalletProvider- Main provider component for wallet connectivity
Hooks
Core Wallet Hooks
useXConnectors- Get available wallet connectorsuseXConnect- Connect to a walletuseXAccount- Get account informationuseXDisconnect- Disconnect from a wallet
Chain-Specific Hooks
useEvmSwitchChain- Switch between EVM chains
Balance Hooks
useXBalances- Fetch token balances
Service Hooks
useXService- Access chain-specific service
Types
Core Types
XAccount- Wallet account typeXConnection- Wallet connection typeXConnector- Wallet connector typeXToken- Cross-chain token type
Classes
XConnector
XConnector- Base class for wallet connectorsEvmXConnector- EVM wallet connectorSolanaXConnector- Solana wallet connectorSuiXConnector- Sui wallet connectorStellarXConnector- Stellar wallet connectorInjectiveMetamaskXConnector- Injective MetaMask connectorInjectiveKelprXConnector- Injective Keplr connectorIconXConnector- ICON wallet connector
Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development
License
Support
Last updated