warning
Beta version of the the SDK is now publically available!
Installation
TokenOps SDK is available as an npm package and can be installed using your preferred package manager.
Package Manager Installation
npm
npm install tokenops-sdk
yarn
yarn add tokenops-sdk
pnpm
pnpm add tokenops-sdk
Peer Dependencies
TokenOps SDK requires certain peer dependencies depending on which blockchain library you choose to use:
For Viem (Recommended)
# Install viem and required dependencies
npm install viem
# Optional: Install specific chains if needed
npm install viem/chains
For Ethers.js
# Install ethers.js
npm install ethers@^6.0.0
TypeScript Support
TokenOps SDK is written in TypeScript and includes full type definitions.
Environment Requirements
- Node.js: >= 18.0.0
- TypeScript: >= 5.0.0 (for TypeScript projects)
- Supported Networks: Ethereum, Polygon, BSC, Arbitrum, Optimism, and other EVM-compatible chains
Development vs Production
Development Setup
For development, you may want to install additional developer tools:
# Install development dependencies
npm install --save-dev @types/node jest ts-jest
# For testing with local blockchain
npm install --save-dev hardhat anvil
Production Considerations
For production deployments:
- Environment Variables: Set up proper environment variables for API keys and RPC endpoints
- Error Handling: Implement comprehensive error handling
- Rate Limiting: Be aware of RPC provider rate limits
- Gas Optimization: Consider gas optimization strategies
Next Steps
After installation, continue with:
- Prerequisites - Set up your development environment
- Quick Start - Build your first application with TokenOps SDK
Troubleshooting
Common Installation Issues
Issue: Module resolution errors
# Solution: Clear npm cache and reinstall
npm cache clean --force
rm -rf node_modules package-lock.json
npm install
Issue: TypeScript compilation errors
# Solution: Ensure correct TypeScript configuration
npm install --save-dev @types/node
Issue: Viem/Ethers conflicts
- Choose one blockchain library and stick with it
- Don't mix viem and ethers.js in the same project
Getting Help
If you encounter installation issues:
- Check the GitHub Issues
- Join our Discord community
- Check the common issues section above for installation problems
Ready to continue? Head to Prerequisites to set up your development environment.