Overview
The ONE SDK (@one_deploy/sdk v1.1.0) is a full-stack Web3 toolkit that ships wallet management, fiat on/off-ramp payments, token swaps, AI-powered trading agents, and on-chain forex -- all behind a single npm package with tree-shakable entry points.
Architecture
+------------------------------------------------------------------+
| Your Application |
+------------------------------------------------------------------+
| React DOM (Web) | React Native | Node |
| - OneProvider | - createCachedEngine | (API) |
| - OneThirdwebProvider | Client | |
| - Smart Wallet widgets | - AI Trading components | |
| - Payment widgets | - Forex components | |
| - NFT Gallery | - Deep link handler | |
+------------------------------------------------------------------+
| @one_deploy/sdk |
| +-----------+ +-----------+ +-----------+ +-----------+ |
| | Hooks | | Providers | | Services | | Utils | |
| | (27+) | | (2) | | (5+) | | | |
| +-----------+ +-----------+ +-----------+ +-----------+ |
| +-----------------------------------------------------------+ |
| | OneEngineClient (91+ methods) | |
| +-----------------------------------------------------------+ |
+------------------------------------------------------------------+
| | |
v v v
ONE Engine API Thirdweb (optional) Supabase (optional)
engine.one23.io wallet / contracts realtime / auth
Feature Matrix
The table below shows which features are available on each platform.
| Feature | Web (React DOM) | React Native | API-only (Node / Edge) |
|---|---|---|---|
| Wallet | |||
| Smart wallet (connect button) | Yes | -- | -- |
| Balance display | Yes | -- | -- |
| Send / Receive widgets | Yes | -- | -- |
| NFT gallery | Yes | -- | -- |
| QR scanning | Yes | -- | -- |
| Payments | |||
| Onramp widget | Yes | -- | -- |
| Offramp widget | Yes | -- | -- |
| Swap widget | Yes | -- | -- |
| Pay widget (unified) | Yes | -- | -- |
| AI Trading | |||
| Chain selector | -- | Yes | -- |
| Tier selector | -- | Yes | -- |
| Cycle selector | -- | Yes | -- |
| Pair selector | -- | Yes | -- |
| Forex | |||
| Pool card | -- | Yes | -- |
| Capital split | -- | Yes | -- |
| Console view | -- | Yes | -- |
| Pair selector | -- | Yes | -- |
| Trade history | -- | Yes | -- |
| Hooks | Yes | Yes | -- |
| OneEngineClient | Yes | Yes | Yes |
| PriceService | Yes | Yes | Yes |
| SupabaseService | Yes | Yes | Yes |
| UsageService | Yes | Yes | Yes |
| forexSimulationEngine | Yes | Yes | Yes |
| botSimulationEngine | Yes | Yes | Yes |
tip
Web widgets (connect button, payment widgets, NFT gallery) are not available in React Native. Use the hooks and OneEngineClient directly to build custom RN UIs.
Hooks Inventory
Provider-based hooks (require OneProvider or OneThirdwebProvider)
| Hook | Purpose |
|---|---|
useOne | Core SDK context -- config, engine client, auth state |
useOneAuth | Email OTP, wallet-signature auth, session management |
useOneWallet | Active wallet address, chain, balances |
useOneOnramp | Fiat onramp quotes, order creation |
useOneSwap | Token swap quotes, execution, route previews |
useOneTrading | AI trading orders, strategies, portfolio |
useOneEngine | Direct access to the OneEngineClient instance |
Standalone hooks (no provider required)
| Hook | Purpose |
|---|---|
useWalletBalance | Fetch native + token balances for any address |
useTokenPrice | Real-time price for a single token |
useTokenPrices | Batch token price lookup |
AI Trading hooks
| Hook | Purpose |
|---|---|
useAIStrategies | List available AI strategies |
useAIStrategy | Fetch a single strategy by ID |
useAIOrders | Query open and historical orders |
useAIPortfolio | Aggregated portfolio metrics |
useAIMarketData | Live market data for supported pairs |
useAITrading | Create, cancel, and manage AI orders |
Forex hooks
| Hook | Purpose |
|---|---|
useForexPools | List all forex liquidity pools |
useForexInvestments | User investment positions |
useForexSimulation | Run pool simulations client-side |
useForexPoolData | Detailed metrics for a single pool |
useForexTrading | Create and manage forex positions |
Services
| Service | Description |
|---|---|
OneEngineClient | Central API client with 91+ methods covering auth, wallet, swap, onramp/offramp, AI trading, forex, contracts, NFTs, billing, staking, bridges, gas, pricing, webhooks, admin, and project management. |
PriceService | Token and fiat price feeds with caching. |
SupabaseService | Thin wrapper around Supabase for realtime subscriptions and row-level auth. |
UsageService | Tracks metered API usage against project quotas. |
forexSimulationEngine | Client-side forex pool simulation (capital allocation modelling). |
botSimulationEngine | Client-side bot back-testing and P&L projection. |
Next Steps
- Create a Project -- register and get your API keys.
- Installation -- add the SDK to your app.
- Provider Setup (Web) -- wrap your React DOM app.
- React Native Setup -- configure RN-specific adapters.
- Authentication -- sign users in with email or wallet.