zokrates-tools
Version:
ZoKrates convenience CL tools and scripts.
27 lines (22 loc) • 775 B
text/typescript
import * as path from 'path'
import * as utils from '../utils'
const script = path.join(__dirname, "..","..","..","scripts","verifier.sh")
exports.command = 'verifier <name> [options]'
exports.desc = "Generates the verifier contract for the project in the running ZoKrates container."
exports.builder = (yargs) => {
return yargs
.positional('name', {
desc: 'Name of the project folder and .code file in the container.',
type: 'string',
alias: "n",
default: undefined
})
}
exports.handler = async function (argv) {
return await verifier(argv)
}
export async function verifier(argv) {
const fname = utils.extractName(argv)
const command = `${script} ${fname}`
await utils.execCmd(command)
}