PolySol-JS is a modular transpiler that converts JavaScript/TypeScript source code into an intermediate JSON representation (IR) and then into Solidity smart contracts. Version 1.0.1 is the current stable release. The project is in early stages with no public npm release, only installation via git clone. Its key differentiators are a standardized IR decoupling parsing from code generation, enabling extensibility to other source languages and target blockchains, and an educational focus on transpiler internals. Alternatives like Sol2Ink compile Solidity to Rust, while PolySol-JS targets Solidity from JS/TS.
npm install polysol-js-coreNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to transpile a JS file to Solidity using the modular parser and generator.
Use import syntax or configure Node.js for ESM (type: 'module' in package.json).
Import directly from subpaths like 'polysol-js-core/parser', 'polysol-js-core/generator'.
Run: git clone https://github.com/your-username/polysol-js.git
Upgrade Node.js to v14 or higher.
Check repository roadmap; currently using the IR schema only.
Run 'npm run build' first, then 'npm start' (if scripts are configured).
Install locally: npm install /path/to/polysol-js
Use import syntax or set type: 'module' and use import().
Use import { IRSchema } from 'polysol-js-core/ir'Add "type": "module" to package.json or use .mjs extension.