Vault SDK Overview¶
@arkonix.xyz/arkonix-vault-sdk is a universal React / React Native SDK for ERC-7540 asynchronous vault deposit and redeem operations, plus financial data (NAV, returns, share price, activity, holdings, fees) for Arkonix-deployed vaults. It is built on viem and @tanstack/react-query.
Current documented version: v2.3.0.
The north-star use case: build from an address alone¶
A partner has only a vault address and wants to build their own UI. From that address alone the SDK provides:
- On-chain: vault metadata (asset, share token, decimals, type, TVL), the user's position and pending/claimable request states, and every transaction in the deposit/redeem/cancel lifecycle.
- Off-chain (Arkonix public API): NAV/TVL, share price, returns (7d/30d/90d/all-time), return and TVL history series, share-price event history, per-user transaction activity, asset distribution with weights, and the fee structure.
The recommended flow is: call useVaultFinancials(vaultAddress) to get the shareClassId, then feed that id into every share-class-scoped hook. See Working with Financial Data.
Two consumption modes, one core¶
src/
├── index.ts # Public API surface — everything importable
├── core/ # Standalone, no React required
│ ├── blockchain/ # VaultReader (reads), VaultActions (orchestrated tx flows),
│ │ # VaultTxBuilder (raw calldata)
│ ├── api/ # ArkonixAPIClient (financial data), CentrifugeAPIClient (GraphQL)
│ └── wallet/ # WebWalletAdapter, RNWalletAdapter
├── hooks/ # React hooks wrapping core
├── provider/ # VaultProvider + VaultContext
├── types/ # Public TypeScript types
└── constants/ # ABIs, chains, token addresses
- Hooks mode (recommended for React apps): wrap the vault section of the app (not the whole app) in
VaultProviderand use theuse*hooks. See Getting Started and the Hooks Reference. - Standalone mode (no React): import
VaultReader/VaultActions/VaultTxBuilder/ArkonixAPIClientand pass your own viemPublicClient. No provider needed. Works in Node, vanilla JS, Vue, or any other environment. See the Core Reference and API Clients.
The three data sources¶
| Source | What it provides | Config needed |
|---|---|---|
On-chain (viem PublicClient) |
Metadata, balances, pending/claimable request state, conversions, transactions | chainId + rpcUrl |
| Arkonix backend API (public, no auth) | NAV/TVL, share price, returns, history series, user activity, asset distribution, fees | arkonixAPI.baseUrl |
| Centrifuge GraphQL API | Vault discovery across the ecosystem; legacy holdings (deprecated) | optional centrifugeAPI (has default URL) |
NAV, returns, and share price are not on the vault contract — they come from the Arkonix backend, keyed by vault address or share-class id.
License¶
The SDK is licensed under the Business Source License 1.1 (BUSL-1.1): free for non-production use; production use requires a commercial license. See License & Support.
Where to go next¶
- Getting Started — installation, requirements, React and standalone quickstarts
- Core Concepts — domain model, vault types, the ERC-7540 lifecycle, decimals
- Configuration —
VaultSDKConfig,VaultProvider, supported chains - Wallet Integration —
WalletAdapter, wagmi, React Native - Deposit & Redeem Flows — transaction hooks and full examples
- Working with Financial Data — return semantics, charting, fees, activity
- Reference: Hooks · Core classes · API clients · Types
- Migration & Deprecations
- License & Support