diff --git a/package.json b/package.json index baf9348..6674902 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,8 @@ "ts-node": "^10.9.1", "typescript": "^4.8.3", "wagmi": "^0.6.8", - "web-vitals": "^2.1.4" + "web-vitals": "^2.1.4", + "yargs": "^17.7.1" }, "resolutions": { "react-error-overlay": "6.0.9" diff --git a/src/scripts/generate_input.ts b/src/scripts/generate_input.ts index 08a3f11..5641dc4 100644 --- a/src/scripts/generate_input.ts +++ b/src/scripts/generate_input.ts @@ -18,11 +18,23 @@ import { shaHash, partialSha, sha256Pad } from "../../src/helpers/shaHash"; import { dkimVerify } from "../../src/helpers/dkim"; import * as fs from "fs"; import { stubObject } from "lodash"; +import * as yargs from "yargs"; var Cryo = require("cryo"); const pki = require("node-forge").pki; // const email_file = "monia_email.eml"; // "./test_email.txt", "./twitter_msg.eml", kaylee_phone_number_email_twitter -const email_file = "ethereum_eml.eml"; +const email = yargs + .option("email_file", { + alias: "e", + description: "Path to email file", + type: "string", + default: "test_sendgrid.eml", + }) + .help() + .alias("help", "h").argv; + +const email_file = email.email_file; + export interface ICircuitInputs { modulus?: string[]; signature?: string[]; diff --git a/yarn.lock b/yarn.lock index cbcec56..c12c177 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8364,6 +8364,7 @@ __metadata: typescript: ^4.8.3 wagmi: ^0.6.8 web-vitals: ^2.1.4 + yargs: ^17.7.1 languageName: unknown linkType: soft @@ -21501,6 +21502,21 @@ __metadata: languageName: node linkType: hard +"yargs@npm:^17.7.1": + version: 17.7.1 + resolution: "yargs@npm:17.7.1" + dependencies: + cliui: ^8.0.1 + escalade: ^3.1.1 + get-caller-file: ^2.0.5 + require-directory: ^2.1.1 + string-width: ^4.2.3 + y18n: ^5.0.5 + yargs-parser: ^21.1.1 + checksum: 3d8a43c336a4942bc68080768664aca85c7bd406f018bad362fd255c41c8f4e650277f42fd65d543fce99e084124ddafee7bbfc1a5c6a8fda4cec78609dcf8d4 + languageName: node + linkType: hard + "yauzl@npm:^2.10.0": version: 2.10.0 resolution: "yauzl@npm:2.10.0"