Skip to content

nijynot/miniscript-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Miniscript JS

Install

$ npm install --save miniscript-js

Usage

const miniscript = require('miniscript-js');

const ms = miniscript.parsePolicy('or(pk(A),pk(B))', 'STRING');
console.log(ms.semantic.minimumNKeys());
// => 2

console.log(ms.script.encode());
// => OP_PUSHBYTES_33 022222222222222222222222222222222222222222222222222222222222222222 OP_CHECKSIGVERIFY OP_PUSHBYTES_33 022222222222222222222222222222222222222222222222222222222222222222 OP_CHECKSIG

License

MIT

About

Native Node.js bindings to Miniscript.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published