sCrypt Compiler
raw JSON → 0.2.9 verified Fri May 01 auth: no javascript
Command-line compiler for sCrypt, a high-level smart contract language targeting Bitcoin SV. The latest version is 0.2.9. Development is active with periodic releases. Key differentiator: it compiles to Bitcoin Script, enabling on-chain smart contracts with a C-style syntax. No major alternatives exist for Bitcoin SV smart contracts.
Common errors
error Error: Cannot find module 'scryptc' ↓
cause Package not installed or installed locally without -g.
fix
Run
npm install -g scryptc to install globally. Warnings
gotcha Global install (-g) is required to use the scryptc CLI command; local install may not expose the binary. ↓
fix npm install -g scryptc
Install
npm install scryptc yarn add scryptc pnpm add scryptc Imports
- default wrong
const scryptc = require('scryptc')correctimport scryptc from 'scryptc'
Quickstart
npm install -g scryptc
# Create a contract file (e.g., hello.scrypt) with:
contract hello {
public function greet(bytes msg) {
require(Tx.checkPreimage(msg));
}
}
# Compile
scryptc hello.scrypt