SDK Reference
SDK Reference
Hooks Reference
Complete reference for all 100+ React hooks in @chainportal/sdk.
Overview
The SDK provides hooks organized by feature and ecosystem. Each hook follows a consistent pattern:
Consistent API across all ecosystems. EVM, Solana, Cosmos, Aptos, SUI, and NEAR hooks all return the same { action, isLoading, error, result } shape — swap ecosystems without rewriting your UI.
Core Hooks (Ecosystem-Agnostic)
Token Hooks
| Hook | Description |
|---|---|
useTokenCreation() | Create tokens on the connected chain |
useTokenManagement(address) | Manage a deployed token (mint, burn, pause) |
useTokenAnalytics(address) | Get analytics for a token |
NFT Hooks
| Hook | Description |
|---|---|
useNftCreation() | Create NFT collections |
useNftManagement(address) | Manage an NFT collection (mint, reveal) |
useNftAnalytics(address) | Get analytics for an NFT collection |
useErc1155Management(address) | Manage ERC1155 multi-token collections |
Utility Hooks
| Hook | Description |
|---|---|
useAirdrop() | Batch distribute tokens |
useTokenLocker() | Lock tokens with time-release |
useLiquidityLocker() | Lock LP tokens |
useLaunchpad() | Create and manage presales |
useStaking() | Create and manage staking pools |
useReferralRegistry() | Register and track referrals |
useBatchMint() | Batch mint NFTs |
useContractVerification() | Verify contracts on explorers |
useMultiChain() | Multi-chain operations |
State Hooks
| Hook | Description |
|---|---|
useUserAssets() | Get all assets for the connected wallet |
useFactoryStatus(chainId) | Check factory contract deployment status |
useFactoryTotals() | Get global creation statistics |
useAllChainClients() | Get RPC clients for all chains |
useMultiChainGas() | Gas estimates across chains |
Ecosystem-Specific Hooks
Each ecosystem has dedicated hooks that handle chain-specific details:
EVM Hooks
Solana Hooks
Cosmos Hooks
Aptos Hooks
SUI Hooks
NEAR Hooks
Factory Status Hooks
Created Assets Hooks
Hook Return Pattern
All hooks follow this consistent pattern: