miniscript-ql
v0.1.3
Published
GraphQL schema for miniscript-js
Downloads
6
Readme
Miniscript QL
Install
$ npm install --save miniscript-ql
Usage
const { miniscriptQL as ql } = require('miniscript-ql');
const query = `
query($script: String!) {
policy(script: $script, pkType: PUBLIC_KEY) {
miniscript {
script
semantic {
minimumNKeys
}
}
script {
script
}
}
}
`;
const variables = {
script: 'and(pk(022222222222222222222222222222222222222222222222222222222222222222),pk(022222222222222222222222222222222222222222222222222222222222222222))',
};
ql({ query, variables }).then((res) => {
console.log(JSON.stringify(res, null, 2));
});