@zkp2p/contracts-v2 package in your TypeScript/JavaScript project.
Quick Start
Here’s a complete example of setting up contract instances:Module Structure
The package uses subpath exports for clean, tree-shakeable imports:TypeScript Configuration
For optimal TypeScript support, ensure yourtsconfig.json includes:
tsconfig.json
Working with Different Networks
The package supports multiple networks. Import network-specific modules:ESM vs CommonJS
The package supports both ESM and CommonJS:React Native Support
The package includes React Native-specific exports:Next Steps
Contract Addresses
Learn how to access contract addresses
ABIs
Work with contract ABIs
Constants
Use protocol constants
Utilities
Use protocol utilities