Prerequisites for Developing on OP_NET
Before starting development on the OP_NET metaprotocol, ensure your environment meets the following requirements. These tools and dependencies are essential to interact with the OP_NET ecosystem efficiently.
System Requirements
Software
-
Node.js (v22.x) - Not lower or higher
- Required for running JavaScript/TypeScript projects.
- Download the version from Node.js Official Website.
-
Rust (latest version)
- Required for compiling and running specific packages, such as
@btc-vision/op-vm
and@btc-vision/unit-test-framework
. - Installation Steps for Rust:
- Open your terminal.
- Run the following command:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Follow the on-screen instructions.
- Verify installation with:
rustc --version
- Required for compiling and running specific packages, such as
Essential NPM Packages
The OP_NET ecosystem includes the following NPM packages that streamline development:
Important Packages
-
- The official OP_NET JavaScript SDK for interacting with the metaprotocol.
-
- A library for creating and signing transactions within the OP_NET environment.
-
- A Bitcoin library like
bitcoinjs-lib
but specifically designed for OP_NET.
Important NoteDO NOT USE
bitcoinjs-lib
or any other Bitcoin library. Use@btc-vision/bitcoin
, which is specifically designed for OP_NET. - A Bitcoin library like
-
- A virtual machine runtime for OP_NET smart contracts.
- Requires Rust (latest version) for installation and usage.
-
@btc-vision/unit-test-framework
- A testing framework designed for projects utilizing
@btc-vision/op-vm
. - Requires Rust (latest version) for installation and usage.
- A testing framework designed for projects utilizing
Hardware Recommendations
- Processor: Multi-core CPU recommended for faster compilation.
- Memory: Minimum 8 GB RAM for smooth development.
- Storage: At least 10 GB of free disk space for dependencies and project files.
Important Warnings
While it is possible to use JavaScript for developing on OP_NET, it is highly recommended to use TypeScript. TypeScript provides type safety, which helps prevent runtime errors and improves code maintainability. Without TypeScript, developers may encounter unexpected issues and errors in their projects.
To get started with TypeScript:
-
Install TypeScript globally:
npm install -g typescript
-
Verify the installation:
tsc --version
What’s Next?
Once you’ve met these prerequisites, proceed to Setting Up Your Development Environment to start building with OP_NET.
Failure to meet these requirements, especially Node.js v22.x or the latest Rust version, may result in errors during package installation or runtime.