SDK Quickstart
Install and configure @chainportal/sdk to integrate token and NFT creation into your own dApp.
Overview
The ChainPortal SDK (@chainportal/sdk) provides 100+ React hooks for integrating multi-chain token and NFT operations into your own application.
Installation
Requirements
- React 18+
- Next.js 14+ (recommended) or any React framework
- Wallet libraries for your target ecosystems:
- EVM:
wagmi+viem+@rainbow-me/rainbowkit - Solana:
@solana/wallet-adapter-react - Cosmos:
@cosmos-kit/react - Aptos:
@aptos-labs/wallet-adapter-react - SUI:
@mysten/dapp-kit - NEAR:
@near-wallet-selector/core
- EVM:
Basic Setup
Install dependencies
Run: npm install @chainportal/sdk @chainportal/config — along with wallet libraries for your target ecosystems.
Configure chain settings
Use @chainportal/config to get chain configs and supported networks for your ecosystem.
Use a creation hook
Import useTokenCreation() or useNftCreation() and call the action function from your component.
Handle the result
The hook returns isCreating, error, and result — all you need to build the full UI.
Configure Chain Settings
Use Token Creation Hook
Use NFT Creation Hook
All hooks follow the same pattern: const { action, isLoading, error, result } = useHookName(). Once you learn one hook, the rest feel identical.
Architecture
Next Steps
External Resources
| Resource | URL |
|---|---|
| wagmi Docs | https://wagmi.sh |
| viem Docs | https://viem.sh |
| RainbowKit Docs | https://www.rainbowkit.com/docs |
| @solana/web3.js | https://solana-labs.github.io/solana-web3.js |
| @coral-xyz/anchor | https://www.anchor-lang.com |
| Turborepo Docs | https://turbo.build/repo/docs |
| React 18 Docs | https://react.dev |
| TypeScript Handbook | https://www.typescriptlang.org/docs |