Skip to main content
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:

# 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:

  1. Environment Variables: Set up proper environment variables for API keys and RPC endpoints
  2. Error Handling: Implement comprehensive error handling
  3. Rate Limiting: Be aware of RPC provider rate limits
  4. Gas Optimization: Consider gas optimization strategies

Next Steps

After installation, continue with:

  1. Prerequisites - Set up your development environment
  2. 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:

  1. Check the GitHub Issues
  2. Join our Discord community
  3. Check the common issues section above for installation problems

Ready to continue? Head to Prerequisites to set up your development environment.