Skip to content

btc-vision/op-vm

Repository files navigation

OP_VM

Rust Bitcoin AssemblyScript TypeScript NodeJS NPM ESLint

code style: prettier

Package: @btc-vision/op-vm

Overview

OP_NET Rust VM, a production-ready virtual machine designed for evaluating smart contracts on the Bitcoin network using Rust and Wasmer. This VM is part of the broader OP_NET initiative, which brings smart contract functionality to Bitcoin.

Security Audit

Verichains

OP-VM has been professionally audited by Verichains, a leading blockchain security firm. The audit confirms that the codebase is secure and ready for mainnet deployment.

For audit reports and details, see the AUDIT directory.

Getting Started

Prerequisites

  • Node.js: Version 24/25+ or higher is required.
  • Rust: You must have Rust installed to compile and develop this project.

Installation

  1. Clone the repository:

    git clone git://github.com/btc-vision/op-vm.git
    cd op-vm
  2. Install dependencies:

    npm install
  3. Build the project:

    To build the project for your platform, run:

    npm run build

    To build in debug mode:

    npm run debug

Usage

Please refer to the source code for detailed insights on how the VM operates. See the unit test framework.

Scripts

  • npm run build: Compiles the Rust code into a release binary.
  • npm run debug: Compiles the Rust code with debug information.
  • npm run cross: Cross-compiles for different platforms.
  • npm test: Runs the Rust test suite.
  • npm run coverage: Generates code coverage report.
  • npm run postinstall: Automatically runs after installation to set up the binary.

Contributing

Contributions are welcome! If you encounter any issues or have suggestions for improvement, feel free to open an issue or submit a pull request. Signed commits are required, and please adhere to the project's code of conduct.

License

This project is licensed under a custom license. For more information, please refer to the LICENSE.md file.

Contact

For more information, visit the OP_NET homepage or reach out via the repository's GitHub page.

About

OP-VM engine powers OPNet smart contract execution.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 5