From cc8acc83a29ad79a87409ec1a8180526cd900112 Mon Sep 17 00:00:00 2001 From: "ya-wen,jeng" Date: Thu, 21 Jan 2021 09:27:33 +0800 Subject: [PATCH 01/38] remove unused param --- README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.MD b/README.MD index 9ec89f4..aa5df6d 100644 --- a/README.MD +++ b/README.MD @@ -213,7 +213,7 @@ NOTE: `-d` private key could be anyone's private key and `-t` indicates it's tes #### 10. User state transition ``` -npx ts-node cli/index.ts userStateTransition -x 0xb3dD32d090f05Afd6225e6b611bb25C1E87a650B -d userPrivateKey -id Unirep.identity.WyJlOGQ2NGU5OThhM2VmNjAxZThjZTNkNDQwOWQyZjc3MjEwOGJkMGI1NTgwODAzYjY2MDk0YTllZWExMzYxZjA2IiwiODZiYjk5ZGQ4MzA2ZGVkZDgxYTE4MzBiNmVjYmRlZjk5ZmVjYTU3M2RiNjIxMjk5NGMyMmJlMWEwMWZmMTEiLCIzMGE3M2MxMjE4ODQwNjE0MWQwYmI4NWRjZDY5ZjdhMjEzMWM1NWRkNDQzYWNmMGVhZTEwNjI2NzBjNDhmYSJd -n 0 +npx ts-node cli/index.ts userStateTransition -x 0xb3dD32d090f05Afd6225e6b611bb25C1E87a650B -d userPrivateKey -id Unirep.identity.WyJlOGQ2NGU5OThhM2VmNjAxZThjZTNkNDQwOWQyZjc3MjEwOGJkMGI1NTgwODAzYjY2MDk0YTllZWExMzYxZjA2IiwiODZiYjk5ZGQ4MzA2ZGVkZDgxYTE4MzBiNmVjYmRlZjk5ZmVjYTU3M2RiNjIxMjk5NGMyMmJlMWEwMWZmMTEiLCIzMGE3M2MxMjE4ODQwNjE0MWQwYmI4NWRjZDY5ZjdhMjEzMWM1NWRkNDQzYWNmMGVhZTEwNjI2NzBjNDhmYSJd ``` #### 11. User generate reputation proof From 71e6f999ddd99baec95d1b0ecc9b435cb286e1af Mon Sep 17 00:00:00 2001 From: "ya-wen,jeng" Date: Mon, 1 Mar 2021 15:36:28 +0800 Subject: [PATCH 02/38] update from the original repo --- .DS_Store | Bin 0 -> 6148 bytes test/circuits/proveReputation.ts | 4 +-- test/circuits/userStateTransition.ts | 4 +-- test/circuits/verifyEpochKey.ts | 4 +-- test/integration/Integration.ts | 4 +-- test/testss.ts | 44 --------------------------- 6 files changed, 8 insertions(+), 52 deletions(-) create mode 100644 .DS_Store delete mode 100644 test/testss.ts diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 Date: Tue, 2 Mar 2021 15:29:54 +0800 Subject: [PATCH 03/38] optional -mp, -mn, -md, -gp to prove --- README.MD | 2 +- circuits/proveReputation.circom | 39 +- circuits/test/proveReputation_test.circom | 2 +- cli/genReputationProof.ts | 32 +- core/UserState.ts | 10 + package-lock.json | 30941 +++++++++++--------- package.json | 3 +- scripts/buildProveReputationSnark.sh | 2 +- 8 files changed, 17098 insertions(+), 13933 deletions(-) diff --git a/README.MD b/README.MD index aa5df6d..8f85294 100644 --- a/README.MD +++ b/README.MD @@ -220,7 +220,7 @@ npx ts-node cli/index.ts userStateTransition -x 0xb3dD32d090f05Afd6225e6b611bb25 ``` npx ts-node cli/index.ts genReputationProof -x 0xb3dD32d090f05Afd6225e6b611bb25C1E87a650B -id Unirep.identity.WyJlOGQ2NGU5OThhM2VmNjAxZThjZTNkNDQwOWQyZjc3MjEwOGJkMGI1NTgwODAzYjY2MDk0YTllZWExMzYxZjA2IiwiODZiYjk5ZGQ4MzA2ZGVkZDgxYTE4MzBiNmVjYmRlZjk5ZmVjYTU3M2RiNjIxMjk5NGMyMmJlMWEwMWZmMTEiLCIzMGE3M2MxMjE4ODQwNjE0MWQwYmI4NWRjZDY5ZjdhMjEzMWM1NWRkNDQzYWNmMGVhZTEwNjI2NzBjNDhmYSJd -a 1 -mp 0 -mn 10 -gp 0 ``` -- NOTE: `-a` is attester's id, `-mp` is the minimum positive reputation score, i.e, user wants to prove that the attester gave the user a positive reputation score that's larger than the minimum positive reputation score, `-mn` is the maximum negative reputation score, i.e, user wants to prove that the attester gave the user a negative reputation score that's less than the maximum negative reputation score and `-gp` is the pre-image of the graffiti for the reputation +- NOTE: `-a` is attester's id, `-mp` is the minimum positive reputation score, i.e, user wants to prove that the attester gave the user a positive reputation score that's larger than the minimum positive reputation score, `-mn` is the maximum negative reputation score, i.e, user wants to prove that the attester gave the user a negative reputation score that's less than the maximum negative reputation score, `-md` is the minimum difference between positive and negative reputation scores, and `-gp` is the pre-image of the graffiti for the reputation - NOTE: `gp` in this case, `0` being the hash pre-image of `176ff05d9c7c4528b04553217098a71cd076d52623dab894a7f7ee34116ca170` - NOTE: proof will be printed and it should be handed to the receiver of this proof, for example, ``` diff --git a/circuits/proveReputation.circom b/circuits/proveReputation.circom index f4e4dcc..6189511 100644 --- a/circuits/proveReputation.circom +++ b/circuits/proveReputation.circom @@ -5,7 +5,11 @@ include "./incrementalMerkleTree.circom"; include "./modulo.circom"; include "./sparseMerkleTree.circom"; -template ProveReputation(GST_tree_depth, user_state_tree_depth, nullifier_tree_depth, EPOCH_KEY_NONCE_PER_EPOCH) { +function Not(in) { + return 1 + in - (2 * in); +} + +template ProveReputation(GST_tree_depth, user_state_tree_depth, nullifier_tree_depth, EPOCH_KEY_NONCE_PER_EPOCH, MAX_REPUTATION_SCORE_BITS) { signal input epoch; signal private input nonce; @@ -28,14 +32,19 @@ template ProveReputation(GST_tree_depth, user_state_tree_depth, nullifier_tree_d signal private input neg_rep; signal private input graffiti; signal private input UST_path_elements[user_state_tree_depth][1]; + // Adding flexibility to prove mp, mn or graffiti + signal input prove_pos_rep; + signal input prove_neg_rep; + signal input prove_rep_diff; + signal input prove_graffiti; + // Adding flexibility to prove differece of reputations + signal input min_rep_diff; // Condition on repuations to prove signal input min_pos_rep; signal input max_neg_rep; // Graffiti signal input graffiti_pre_image; - var MAX_REPUTATION_SCORE_BITS = 252; - /* 1. Check nonce validity */ var bitsPerNonce = 8; @@ -122,21 +131,39 @@ template ProveReputation(GST_tree_depth, user_state_tree_depth, nullifier_tree_d /* 5. Check conditions on reputations */ + // if prove_pos_rep == TRUE then check GT + // else return TRUE component pos_rep_gt = GreaterThan(MAX_REPUTATION_SCORE_BITS); pos_rep_gt.in[0] <== pos_rep; pos_rep_gt.in[1] <== min_pos_rep; - pos_rep_gt.out === 1; + pos_rep_gt.out * prove_pos_rep + Not(prove_pos_rep) === 1; + component neg_rep_lt = LessThan(MAX_REPUTATION_SCORE_BITS); neg_rep_lt.in[0] <== neg_rep; neg_rep_lt.in[1] <== max_neg_rep; - neg_rep_lt.out === 1; + neg_rep_lt.out * prove_neg_rep + Not(prove_neg_rep) === 1; + + // only valid if pos_rep >= neg_rep + component rep_diff_get = GreaterEqThan(MAX_REPUTATION_SCORE_BITS); + rep_diff_get.in[0] <== pos_rep; + rep_diff_get.in[1] <== neg_rep; + // // check if (pos_rep - neg_rep) > min_rep_diff + component rep_diff_gt = GreaterThan(MAX_REPUTATION_SCORE_BITS); + rep_diff_gt.in[0] <== pos_rep - neg_rep; + rep_diff_gt.in[1] <== min_rep_diff; + rep_diff_get.out * prove_rep_diff + Not(prove_rep_diff) === 1; + rep_diff_gt.out * prove_rep_diff + Not(prove_rep_diff) === 1; /* End of check 5 */ /* 6. Check pre-image of graffiti */ component graffiti_hasher = HashLeftRight(); graffiti_hasher.left <== graffiti_pre_image; graffiti_hasher.right <== 0; - graffiti_hasher.hash === graffiti; + component graffiti_eq = IsEqual(); + graffiti_eq.in[0] <== graffiti_hasher.hash; + graffiti_eq.in[1] <== graffiti; + graffiti_eq.out * prove_graffiti + Not(prove_graffiti) === 1; + /* End of check 6 */ } \ No newline at end of file diff --git a/circuits/test/proveReputation_test.circom b/circuits/test/proveReputation_test.circom index 74dcb2b..0c2ea5e 100644 --- a/circuits/test/proveReputation_test.circom +++ b/circuits/test/proveReputation_test.circom @@ -1,3 +1,3 @@ include "../proveReputation.circom" -component main = ProveReputation(4, 4, 128, 2); \ No newline at end of file +component main = ProveReputation(4, 4, 128, 2, 252); \ No newline at end of file diff --git a/cli/genReputationProof.ts b/cli/genReputationProof.ts index 2796f38..3a6c7ca 100644 --- a/cli/genReputationProof.ts +++ b/cli/genReputationProof.ts @@ -51,7 +51,6 @@ const configureSubparser = (subparsers: any) => { parser.addArgument( ['-mp', '--min-pos-rep'], { - required: true, type: 'int', help: 'The minimum positive score the attester given to the user', } @@ -60,16 +59,22 @@ const configureSubparser = (subparsers: any) => { parser.addArgument( ['-mn', '--max-neg-rep'], { - required: true, type: 'int', help: 'The maximum negative score the attester given to the user', } ) + parser.addArgument( + ['-md', '--min-rep-diff'], + { + type: 'int', + help: 'The difference between positive and negative scores the attester given to the user', + } + ) + parser.addArgument( ['-gp', '--graffiti-preimage'], { - required: true, type: 'string', help: 'The pre-image of the graffiti for the reputation the attester given to the user (in hex representation)', } @@ -96,6 +101,11 @@ const configureSubparser = (subparsers: any) => { const genReputationProof = async (args: any) => { + // Warning is there is no reputation and graffiti to prove + if (!args.min_pos_rep && !args.max_neg_rep && !args.graffiti_preimage) { + console.warn('Warning: no reputation and graffiti to prove') + } + // Unirep contract if (!validateEthAddress(args.contract)) { console.error('Error: invalid Unirep contract address') @@ -130,10 +140,18 @@ const genReputationProof = async (args: any) => { commitment, ) const attesterId = BigInt(add0x(args.attester_id)) - const minPosRep = BigInt(args.min_pos_rep) - const maxNegRep = BigInt(args.max_neg_rep) - const graffitiPreImage = BigInt(add0x(args.graffiti_preimage)) - const circuitInputs = await userState.genProveReputationCircuitInputs(attesterId, minPosRep, maxNegRep, graffitiPreImage) + + // Proving content + const provePosRep = args.min_pos_rep != null ? BigInt(1) : BigInt(0) + const proveNegRep = args.max_neg_rep != null ? BigInt(1) : BigInt(0) + const proveRepDiff = args.min_rep_diff != null ? BigInt(1) : BigInt(0) + const proveGraffiti = args.graffiti_preimage != null ? BigInt(1) : BigInt(0) + const minPosRep = args.min_pos_rep != null ? BigInt(args.min_pos_rep) : BigInt(0) + const maxNegRep = args.max_neg_rep != null ? BigInt(args.max_neg_rep) : BigInt(0) + const minRepDiff = args.min_rep_diff != null ? BigInt(args.min_rep_diff) : BigInt(0) + const graffitiPreImage = args.graffiti_preimage != null ? BigInt(add0x(args.graffiti_preimage)) : BigInt(0) + + const circuitInputs = await userState.genProveReputationCircuitInputs(attesterId, provePosRep, proveNegRep, proveRepDiff, proveGraffiti, minPosRep, maxNegRep, minRepDiff, graffitiPreImage) console.log('Proving reputation...') console.log('----------------------User State----------------------') console.log(userState.toJSON(4)) diff --git a/core/UserState.ts b/core/UserState.ts index a66fe84..270a872 100644 --- a/core/UserState.ts +++ b/core/UserState.ts @@ -450,8 +450,13 @@ class UserState { public genProveReputationCircuitInputs = async ( attesterId: BigInt, + provePosRep: BigInt, + proveNegRep: BigInt, + proveRepDiff: BigInt, + proveGraffiti: BigInt, minPosRep: BigInt, maxNegRep: BigInt, + minRepDiff: BigInt, graffitiPreImage: BigInt, ) => { assert(this.hasSignedUp, "User has not signed up yet") @@ -490,6 +495,11 @@ class UserState { neg_rep: negRep, graffiti: graffiti, UST_path_elements: USTPathElements, + prove_pos_rep: provePosRep, + prove_neg_rep: proveNegRep, + prove_rep_diff: proveRepDiff, + prove_graffiti: proveGraffiti, + min_rep_diff: minRepDiff, min_pos_rep: minPosRep, max_neg_rep: maxNegRep, graffiti_pre_image: graffitiPreImage diff --git a/package-lock.json b/package-lock.json index 6eabb7b..54c34d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -168,9 +168,9 @@ } }, "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", "dev": true }, "yargs": { @@ -214,12 +214,12 @@ "dev": true }, "@ethereum-waffle/chai": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@ethereum-waffle/chai/-/chai-3.0.1.tgz", - "integrity": "sha512-E8u7eGSXEO16Kv3F1cbkmYAobIEUQ1qMNg8uxiUBPLc/LLIKjS8n3NuUmAy/pRpemPzQcNWgNyjeF2OCg/JLWw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@ethereum-waffle/chai/-/chai-3.3.0.tgz", + "integrity": "sha512-KqPH9DdTmfgM6dGa6M7/rUillYdRsUVkIiFLgVdLDvtaALITb6IseGNGRRerG/J6wUeIUQxOJY0ACZRYPCItaQ==", "dev": true, "requires": { - "@ethereum-waffle/provider": "^3.0.1", + "@ethereum-waffle/provider": "^3.3.0", "ethers": "^5.0.0" } }, @@ -240,9 +240,9 @@ } }, "@ethereum-waffle/ens": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@ethereum-waffle/ens/-/ens-3.0.1.tgz", - "integrity": "sha512-nylX5Pi3M5CQkvOMX/5uCO+2i7R7RZg+aCUyVsYP99IafG7/FxxA8OBZZ2L8vpag5QxN2Ed4P3UKGTok9YPKEA==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/@ethereum-waffle/ens/-/ens-3.2.3.tgz", + "integrity": "sha512-OIfguJu4e+NYJHNnNVaFzvNG5WYPntWU1vnQuAFszBFytOeIkv2hAXv8RmRL+cledcvShtP3gmXU3Lvf0o4Sxw==", "dev": true, "requires": { "@ensdomains/ens": "^0.4.4", @@ -261,14 +261,16 @@ } }, "@ethereum-waffle/provider": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@ethereum-waffle/provider/-/provider-3.0.1.tgz", - "integrity": "sha512-IoMFWgglaEmo2LC1/J2JM+uUGhF1YFIr2B+QksL36y1wa+UtpDPvCpnUNTSuVKS6J9t8uz/FhQdROzBdRX/aPg==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@ethereum-waffle/provider/-/provider-3.3.0.tgz", + "integrity": "sha512-JcHGwDz8ciqwDXcZXLzOif8AY2n4fUG5ju0ZQCGRkYiRHHTrbqzwWAtFsEHetWAxCi3VGlSgeN833DGulnQaZg==", "dev": true, "requires": { - "@ethereum-waffle/ens": "^3.0.1", + "@ethereum-waffle/ens": "^3.2.2", "ethers": "^5.0.1", - "ganache-core": "^2.10.2" + "ganache-core": "^2.10.2", + "patch-package": "^6.2.2", + "postinstall-postinstall": "^2.1.0" } }, "@ethersproject/abi": { @@ -2198,6 +2200,12 @@ "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-15.0.0.tgz", "integrity": "sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw==" }, + "@yarnpkg/lockfile": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", + "dev": true + }, "abort-controller": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", @@ -2274,12 +2282,141 @@ "uri-js": "^4.2.2" } }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "ansi-bgblack": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-bgblack/-/ansi-bgblack-0.1.1.tgz", + "integrity": "sha1-poulAHiHcBtqr74/oNrf36juPKI=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-bgblue": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-bgblue/-/ansi-bgblue-0.1.1.tgz", + "integrity": "sha1-Z73ATtybm1J4lp2hlt6j11yMNhM=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-bgcyan": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-bgcyan/-/ansi-bgcyan-0.1.1.tgz", + "integrity": "sha1-WEiUJWAL3p9VBwaN2Wnr/bUP52g=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-bggreen": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-bggreen/-/ansi-bggreen-0.1.1.tgz", + "integrity": "sha1-TjGRJIUplD9DIelr8THRwTgWr0k=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-bgmagenta": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-bgmagenta/-/ansi-bgmagenta-0.1.1.tgz", + "integrity": "sha1-myhDLAduqpmUGGcqPvvhk5HCx6E=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-bgred": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-bgred/-/ansi-bgred-0.1.1.tgz", + "integrity": "sha1-p2+Sg4OCukMpCmwXeEJPmE1vEEE=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-bgwhite": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-bgwhite/-/ansi-bgwhite-0.1.1.tgz", + "integrity": "sha1-ZQRlE3elim7OzQMxmU5IAljhG6g=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-bgyellow": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-bgyellow/-/ansi-bgyellow-0.1.1.tgz", + "integrity": "sha1-w/4usIzUdmSAKeaHTRWgs49h1E8=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-black": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-black/-/ansi-black-0.1.1.tgz", + "integrity": "sha1-9hheiJNgslRaHsUMC/Bj/EMDJFM=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-blue": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-blue/-/ansi-blue-0.1.1.tgz", + "integrity": "sha1-FbgEmQ6S/JyoxUds6PaZd3wh7b8=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-bold": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-bold/-/ansi-bold-0.1.1.tgz", + "integrity": "sha1-PmOVCvWswq4uZw5vZ96xFdGl9QU=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, + "ansi-cyan": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz", + "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-dim": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-dim/-/ansi-dim-0.1.1.tgz", + "integrity": "sha1-QN5MYDqoCG2Oeoa4/5mNXDbu/Ww=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, "ansi-escapes": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", @@ -2289,11 +2426,91 @@ "type-fest": "^0.11.0" } }, + "ansi-gray": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-green": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-green/-/ansi-green-0.1.1.tgz", + "integrity": "sha1-il2al55FjVfEDjNYCzc5C44Q0Pc=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-grey": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-grey/-/ansi-grey-0.1.1.tgz", + "integrity": "sha1-WdmLasK6GfilF5jphT+6eDOaM8E=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-hidden": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-hidden/-/ansi-hidden-0.1.1.tgz", + "integrity": "sha1-7WpMSY0rt8uyidvyqNHcyFZ/rg8=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-inverse": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-inverse/-/ansi-inverse-0.1.1.tgz", + "integrity": "sha1-tq9Fgm/oJr+1KKbHmIV5Q1XM0mk=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-italic": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-italic/-/ansi-italic-0.1.1.tgz", + "integrity": "sha1-EEdDRj9iXBQqA2c5z4XtpoiYbyM=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-magenta": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-magenta/-/ansi-magenta-0.1.1.tgz", + "integrity": "sha1-BjtboW+z8j4c/aKwfAqJ3hHkMK4=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-red": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", + "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" }, + "ansi-reset": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-reset/-/ansi-reset-0.1.1.tgz", + "integrity": "sha1-5+cSksPH3c1NYu9KbHwFmAkRw7c=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-strikethrough": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-strikethrough/-/ansi-strikethrough-0.1.1.tgz", + "integrity": "sha1-2Eh3FAss/wfRyT685pkE9oiF5Wg=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -2302,6 +2519,35 @@ "color-convert": "^1.9.0" } }, + "ansi-underline": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-underline/-/ansi-underline-0.1.1.tgz", + "integrity": "sha1-38kg9Ml7WXfqFi34/7mIMIqqcaQ=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-white": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-white/-/ansi-white-0.1.1.tgz", + "integrity": "sha1-nHe3wZPF7pkuYBHTbsTJIbRXiUQ=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=" + }, + "ansi-yellow": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-yellow/-/ansi-yellow-0.1.1.tgz", + "integrity": "sha1-y5NW8vRscy8OMZnmEClVp32oPB0=", + "requires": { + "ansi-wrap": "0.1.0" + } + }, "anymatch": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", @@ -2326,11 +2572,73 @@ "sprintf-js": "~1.0.2" } }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" + }, + "arr-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz", + "integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=", + "requires": { + "make-iterator": "^1.0.0" + } + }, + "arr-pluck": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/arr-pluck/-/arr-pluck-0.1.0.tgz", + "integrity": "sha1-+K1tcI+HkAiB4jr9gw1SKQp2Z3U=", + "requires": { + "arr-map": "^2.0.0" + } + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, + "array-sort": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-0.1.4.tgz", + "integrity": "sha512-BNcM+RXxndPxiZ2rd76k6nyQLRZr2/B/sdi8pQ+Joafr5AH279L40dfokSUTp8O+AaqYjXWhblBWa2st2nc4fQ==", + "requires": { + "default-compare": "^1.0.0", + "get-value": "^2.0.6", + "kind-of": "^5.0.2" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "arrayify-compact": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/arrayify-compact/-/arrayify-compact-0.2.0.tgz", + "integrity": "sha1-RZFw4VXKErtRRISDnJ1xUHyA7E0=", + "requires": { + "arr-flatten": "^1.0.1" + } + }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -2349,196 +2657,121 @@ "minimalistic-assert": "^1.0.0" } }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==" - }, - "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==" - }, - "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", - "dev": true, + "assemble-core": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/assemble-core/-/assemble-core-0.25.0.tgz", + "integrity": "sha1-ZZF7/K+c1rFNm5HQMaDdmar0OWQ=", "requires": { - "lodash": "^4.17.14" + "assemble-fs": "^0.6.0", + "assemble-render-file": "^0.7.1", + "assemble-streams": "^0.6.0", + "base-task": "^0.6.1", + "define-property": "^0.2.5", + "lazy-cache": "^2.0.1", + "templates": "^0.24.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + } } }, - "async-eventemitter": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz", - "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==", - "dev": true, - "requires": { - "async": "^2.4.0" + "assemble-fs": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/assemble-fs/-/assemble-fs-0.6.0.tgz", + "integrity": "sha1-uky+t0tdG97m1SipZa07fZbe8Og=", + "requires": { + "assemble-handle": "^0.1.2", + "extend-shallow": "^2.0.1", + "is-valid-app": "^0.2.0", + "lazy-cache": "^2.0.1", + "stream-combiner": "^0.2.2", + "through2": "^2.0.1", + "vinyl-fs": "^2.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } } }, - "async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "await-lock": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/await-lock/-/await-lock-1.2.1.tgz", - "integrity": "sha512-l4920ZIFwIFGpNDeGDnKi/b2t03BuSRV8gMuP94KMvb4kuF+1RLBafQOrOXFYLCc46k/zUgStj78tJTY+gqnaA==" - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" - }, - "aws4": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", - "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==" - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "base-x": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", - "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", + "assemble-handle": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/assemble-handle/-/assemble-handle-0.1.4.tgz", + "integrity": "sha1-6De1uyPnXJsFJX2AfhYvaSzOIW4=", "requires": { - "safe-buffer": "^5.0.1" + "through2": "^2.0.3" } }, - "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" - }, - "base64url": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", - "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==" - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "requires": { - "tweetnacl": "^0.14.3" + "assemble-loader": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/assemble-loader/-/assemble-loader-0.6.1.tgz", + "integrity": "sha1-0GmqZBhOFzKEP+HsGAghI1dpVdg=", + "requires": { + "extend-shallow": "^2.0.1", + "file-contents": "^0.2.4", + "fs-exists-sync": "^0.1.0", + "has-glob": "^0.1.1", + "is-registered": "^0.1.5", + "is-valid-glob": "^0.3.0", + "is-valid-instance": "^0.1.0", + "isobject": "^2.1.0", + "lazy-cache": "^2.0.1", + "load-templates": "^0.11.3" }, "dependencies": { - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-valid-instance": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-valid-instance/-/is-valid-instance-0.1.0.tgz", + "integrity": "sha1-etXGo4ht/ffZzHgEnO/yFxqZB7M=", + "requires": { + "isobject": "^2.1.0", + "pascalcase": "^0.1.1" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } } } }, - "bech32": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", - "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" - }, - "big-integer": { - "version": "1.6.48", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz", - "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==" - }, - "bignumber.js": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", - "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==" - }, - "binary-extensions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", - "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", - "dev": true - }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "requires": { - "file-uri-to-path": "1.0.0" - } - }, - "bip66": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", - "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "blake-hash": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/blake-hash/-/blake-hash-1.1.1.tgz", - "integrity": "sha512-V93H+FEJuXXZi1eEsMtbcBFP9oL5Ept7SLw3cbXYlPC3nocm9Fr4m18ZhbhdJrZVS9J/Z0oNE4L3oDZvmorHNA==", - "requires": { - "bindings": "^1.2.1", - "inherits": "^2.0.3", - "nan": "^2.2.1" - } - }, - "blake2b": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/blake2b/-/blake2b-2.1.3.tgz", - "integrity": "sha512-pkDss4xFVbMb4270aCyGD3qLv92314Et+FsKzilCLxDz5DuZ2/1g3w4nmBbu6nKApPspnjG7JcwTjGZnduB1yg==", - "requires": { - "blake2b-wasm": "^1.1.0", - "nanoassert": "^1.0.0" - } - }, - "blake2b-wasm": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/blake2b-wasm/-/blake2b-wasm-1.1.7.tgz", - "integrity": "sha512-oFIHvXhlz/DUgF0kq5B1CqxIDjIJwh9iDeUUGQUcvgiGz7Wdw03McEO7CfLBy7QKGdsydcMCgO9jFNBAFCtFcA==", - "requires": { - "nanoassert": "^1.0.0" - } - }, - "blakejs": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz", - "integrity": "sha1-ad+S75U6qIylGjLfarHFShVfx6U=" - }, - "bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" - }, - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - }, - "body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "assemble-render-file": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/assemble-render-file/-/assemble-render-file-0.7.2.tgz", + "integrity": "sha1-g6qV9e131ctK6oq8dPIkoVRVccY=", "requires": { - "bytes": "3.1.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" + "debug": "^2.2.0", + "is-valid-app": "^0.1.2", + "lazy-cache": "^2.0.1", + "mixin-deep": "^1.1.3", + "through2": "^2.0.1" }, "dependencies": { "debug": { @@ -2549,1854 +2782,2175 @@ "ms": "2.0.0" } }, - "http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "is-valid-app": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/is-valid-app/-/is-valid-app-0.1.2.tgz", + "integrity": "sha1-L2fLs7r2TWWccNBD/JETm1qLlZA=", "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" + "debug": "^2.2.0", + "is-registered": "^0.1.5", + "is-valid-instance": "^0.1.0", + "lazy-cache": "^2.0.1" } }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "is-valid-instance": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-valid-instance/-/is-valid-instance-0.1.0.tgz", + "integrity": "sha1-etXGo4ht/ffZzHgEnO/yFxqZB7M=", + "requires": { + "isobject": "^2.1.0", + "pascalcase": "^0.1.1" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "assemble-streams": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/assemble-streams/-/assemble-streams-0.6.0.tgz", + "integrity": "sha1-kOkhaoNpltJoNwvtrHG7MdjJq18=", + "requires": { + "assemble-handle": "^0.1.2", + "is-registered": "^0.1.4", + "is-valid-instance": "^0.1.0", + "lazy-cache": "^2.0.1", + "match-file": "^0.2.0", + "src-stream": "^0.1.1", + "through2": "^2.0.1" + }, + "dependencies": { + "is-valid-instance": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-valid-instance/-/is-valid-instance-0.1.0.tgz", + "integrity": "sha1-etXGo4ht/ffZzHgEnO/yFxqZB7M=", + "requires": { + "isobject": "^2.1.0", + "pascalcase": "^0.1.1" + } }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, - "raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" + "isarray": "1.0.0" } } } }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==" + }, + "assign-deep": { + "version": "0.4.8", + "resolved": "https://registry.npmjs.org/assign-deep/-/assign-deep-0.4.8.tgz", + "integrity": "sha512-uxqXJCnNZDEjPnsaLKVzmh/ST5+Pqoz0wi06HDfHKx1ASNpSbbvz2qW2Gl8ZyHwr5jnm11X2S5eMQaP1lMZmCg==", "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "assign-symbols": "^0.1.1", + "is-primitive": "^2.0.0", + "kind-of": "^5.0.2" + }, + "dependencies": { + "assign-symbols": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-0.1.1.tgz", + "integrity": "sha1-ywJZRO9OyKNpPwhunhEsdOOg/tk=" + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } } }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==" + }, + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", "dev": true, "requires": { - "fill-range": "^7.0.1" + "lodash": "^4.17.14" } }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true + "async-array-reduce": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/async-array-reduce/-/async-array-reduce-0.2.1.tgz", + "integrity": "sha1-yL4BCitc0A3qlsgRFgNGk9/dgtE=" }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "async-done": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz", + "integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==", "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "end-of-stream": "^1.1.0", + "once": "^1.3.2", + "process-nextick-args": "^2.0.0", + "stream-exhaust": "^1.0.1" } }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==" + }, + "async-each-series": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/async-each-series/-/async-each-series-1.1.0.tgz", + "integrity": "sha1-9C/YFV048hpbjqB8KOBj7RcAsTg=" + }, + "async-eventemitter": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz", + "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==", + "dev": true, "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" + "async": "^2.4.0" } }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "async-helpers": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/async-helpers/-/async-helpers-0.3.17.tgz", + "integrity": "sha512-LfgCyvmK6ZiC7pyqOgli2zfkWL4HYbEb+HXvGgdmqVBgsOOtQz5rSF8Ii/H/1cNNtrfj1KsdZE/lUMeIY3Qcwg==", "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" + "co": "^4.6.0", + "kind-of": "^6.0.0" } }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - } + "async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" }, - "browserify-sign": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.0.tgz", - "integrity": "sha512-hEZC1KEeYuoHRqhGhTy6gWrpJA3ZDjFWv0DE61643ZnOXAKJb3u7yWcrU0mMc9SwAqK1n7myPGndkp0dFG7NFA==", + "async-settle": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-0.2.1.tgz", + "integrity": "sha1-dnRi1XOACNx16sQkYiNSjyE3E5Y=", "requires": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.5.2", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" + "async-done": "^0.4.0" }, "dependencies": { - "bn.js": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.2.tgz", - "integrity": "sha512-40rZaf3bUNKTVYu9sIeeEGOg7g14Yvnj9kH7b50EiwX0Q7A6umbvfI5tvHaOERH0XigqKkfLkFQxzb4e6CIXnA==" + "async-done": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/async-done/-/async-done-0.4.0.tgz", + "integrity": "sha1-q4BT9fYikPi/xY83zZtzBwszB7k=", + "requires": { + "end-of-stream": "^0.1.4", + "next-tick": "^0.2.2", + "once": "^1.3.0", + "stream-exhaust": "^1.0.0" + } + }, + "end-of-stream": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz", + "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=", + "requires": { + "once": "~1.3.0" + }, + "dependencies": { + "once": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", + "requires": { + "wrappy": "1" + } + } + } + }, + "next-tick": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-0.2.2.tgz", + "integrity": "sha1-ddpKkn7liH45BliABltzNkE7MQ0=" } } }, - "bs58": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", - "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", - "dev": true, - "requires": { - "base-x": "^3.0.2" - } + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, - "bs58check": { + "atob": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", - "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", - "dev": true, - "requires": { - "bs58": "^4.0.0", - "create-hash": "^1.1.0", - "safe-buffer": "^5.1.2" - } - }, - "buffer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", - "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", "dev": true }, - "buffer-to-arraybuffer": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", - "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=" - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" - }, - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" - }, - "chai": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", - "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", - "requires": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", - "pathval": "^1.1.0", - "type-detect": "^4.0.5" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } + "await-lock": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/await-lock/-/await-lock-1.2.1.tgz", + "integrity": "sha512-l4920ZIFwIFGpNDeGDnKi/b2t03BuSRV8gMuP94KMvb4kuF+1RLBafQOrOXFYLCc46k/zUgStj78tJTY+gqnaA==" }, - "chardet": { + "aws-sign2": { "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" - }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=" + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" }, - "checkpoint-store": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/checkpoint-store/-/checkpoint-store-1.1.0.tgz", - "integrity": "sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY=", - "dev": true, - "requires": { - "functional-red-black-tree": "^1.0.1" - } + "aws4": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", + "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==" }, - "chokidar": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz", - "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==", - "dev": true, + "bach": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/bach/-/bach-0.5.0.tgz", + "integrity": "sha1-P/pqN0F3PrwNJL5f2kvF6FtbHaE=", "requires": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "fsevents": "~2.1.2", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" + "async-done": "^1.1.1", + "async-settle": "^0.2.1", + "lodash.filter": "^4.1.0", + "lodash.flatten": "^4.0.0", + "lodash.foreach": "^4.0.0", + "lodash.initial": "^4.0.1", + "lodash.last": "^3.0.0", + "lodash.map": "^4.1.0", + "now-and-later": "0.0.6" } }, - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" - }, - "ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "dev": true + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, - "cids": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", - "integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==", - "requires": { - "buffer": "^5.5.0", - "class-is": "^1.1.0", - "multibase": "~0.6.0", - "multicodec": "^1.0.0", - "multihashes": "~0.4.15" + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" }, "dependencies": { - "multicodec": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.3.tgz", - "integrity": "sha512-8G4JKbHWSe/39Xx2uiI+/b/S6mGgimzwEN4TOCokFUIfofg1T8eHny88ht9eWImD2dng+EEQRsApXxA5ubhU4g==", + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "buffer": "^5.6.0", - "varint": "^5.0.0" + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "circom": { - "version": "0.5.35", - "resolved": "https://registry.npmjs.org/circom/-/circom-0.5.35.tgz", - "integrity": "sha512-fUjYTyU75TrA54IPqHt+3VyRWVL82jdbiW68NC9CdtwVrXID+G2cED4XPlsVIKuGI8NFl1LzapELv6DRjS363w==", + "base-argv": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/base-argv/-/base-argv-0.4.5.tgz", + "integrity": "sha1-BalXHNwnaUDeGW/8h07uuJnLED0=", "requires": { - "chai": "^4.2.0", - "circom_runtime": "0.1.9", - "fastfile": "0.0.18", - "ffiasm": "0.1.1", - "ffjavascript": "0.2.22", - "ffwasm": "0.0.7", - "fnv-plus": "^1.3.1", - "r1csfile": "0.0.16", - "tmp-promise": "^2.0.2", - "wasmbuilder": "0.0.10" + "arr-diff": "^2.0.0", + "arr-union": "^3.1.0", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "expand-args": "^0.4.1", + "extend-shallow": "^2.0.1", + "lazy-cache": "^1.0.3" }, "dependencies": { - "circom_runtime": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/circom_runtime/-/circom_runtime-0.1.9.tgz", - "integrity": "sha512-eh34quaGpeEWXthnhmC9zpoBL/5zJ0mGDbPT/plb/xVmFaKxJDcLuCr2sma5s3il8AYlEIb/nbqytojyI3TWDQ==", + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "requires": { - "ffjavascript": "0.2.10", - "fnv-plus": "^1.3.1" - }, - "dependencies": { - "ffjavascript": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.10.tgz", - "integrity": "sha512-GQI6gHYYG5/iD4Kt3VzezzK7fARJzP0zkc82V/+JAdjfeKBXhDSo5rpKFuK3cDcrdW0Fu2emuYNMEAuFqhEQvQ==", - "requires": { - "big-integer": "^1.6.48", - "wasmcurves": "0.0.5", - "worker-threads": "^1.0.0" - } - } + "arr-flatten": "^1.0.1" } }, - "fastfile": { - "version": "0.0.18", - "resolved": "https://registry.npmjs.org/fastfile/-/fastfile-0.0.18.tgz", - "integrity": "sha512-q03PTKc+wptis4WmuFOwPNQx2p5myFUrl/dMgRlW9mymc1Egyc14JPHgiGnWK+sJ0+dBl2Vwtfh5GfSQltYOpw==" + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } }, - "ffjavascript": { - "version": "0.2.22", - "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.22.tgz", - "integrity": "sha512-EsVqap2Txm17bKW0z/jXCX3M7rQ++nQUAJY8alWDpyhjRj90xjl6GLeVSKZQ8rOFDQ/SFFXcEB8w9X8Boxid+w==", + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "big-integer": "^1.6.48", - "wasmcurves": "0.0.12", - "worker-threads": "^1.0.0" - }, - "dependencies": { - "wasmcurves": { - "version": "0.0.12", - "resolved": "https://registry.npmjs.org/wasmcurves/-/wasmcurves-0.0.12.tgz", - "integrity": "sha512-1Jl9mkatyHSNj80ILjf85SZUNuZQBCkTjJlhzqHnZQXUmIimCIWkugaVaYNjozLs1Gun4h/keZe1MBeBN0sRpg==", - "requires": { - "big-integer": "^1.6.42", - "blakejs": "^1.1.0" - } - } + "is-descriptor": "^0.1.0" } }, - "r1csfile": { - "version": "0.0.16", - "resolved": "https://registry.npmjs.org/r1csfile/-/r1csfile-0.0.16.tgz", - "integrity": "sha512-A2jRVWzGgmXeG2lVAc0H4suJmzt50it5UvBnycJgBCpMXM3tH/M6RguP7nvs6suY/yYnkN6jX6iTScSiDUF3FA==", + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "@iden3/bigarray": "0.0.2", - "fastfile": "0.0.18", - "ffjavascript": "0.2.22" + "is-extendable": "^0.1.0" } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, - "circom_runtime": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/circom_runtime/-/circom_runtime-0.1.4.tgz", - "integrity": "sha512-sQWeEBD3o2jIdrKPf3VDu7DNfP+NfscYO/pxi73FE0qQW8TXTfwno8Grdl++h6OKWbzvWJdG5jQvS+WGKjpMOg==", - "requires": { - "ffjavascript": "0.2.10", - "fnv-plus": "^1.3.1" - } - }, - "circomlib": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/circomlib/-/circomlib-0.2.4.tgz", - "integrity": "sha512-5x1/kn+7MJaakdGdKRCDMSCVsioyhFgWYCf2dbbd9xMmnZkMFjJpKzsE0UxncprFjyU2A8sVB1eb5Gj0pMaQBg==", - "requires": { - "blake-hash": "^1.1.0", - "blake2b": "^2.1.3", - "circom": "0.5.21", - "ffjavascript": "0.1.0" + "base-cli": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/base-cli/-/base-cli-0.5.0.tgz", + "integrity": "sha1-U+Zdjg9bKKoRBo/sjdTpXXLvPOg=", + "requires": { + "base-argv": "^0.4.2", + "base-config": "^0.5.2" + } + }, + "base-cli-process": { + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/base-cli-process/-/base-cli-process-0.1.19.tgz", + "integrity": "sha1-Mg08gVTfcQltSBgY52/m1+R5NjY=", + "requires": { + "arr-union": "^3.1.0", + "arrayify-compact": "^0.2.0", + "base-cli": "^0.5.0", + "base-cli-schema": "^0.1.19", + "base-config-process": "^0.1.9", + "base-cwd": "^0.3.4", + "base-option": "^0.8.4", + "base-pkg": "^0.2.4", + "debug": "^2.6.2", + "export-files": "^2.1.1", + "fs-exists-sync": "^0.1.0", + "is-valid-app": "^0.2.1", + "kind-of": "^3.1.0", + "lazy-cache": "^2.0.2", + "log-utils": "^0.2.1", + "merge-deep": "^3.0.0", + "mixin-deep": "^1.2.0", + "object.pick": "^1.2.0", + "pad-right": "^0.2.2", + "union-value": "^1.0.0" }, "dependencies": { - "circom": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/circom/-/circom-0.5.21.tgz", - "integrity": "sha512-Om90wztN6Y4Gg5ks4n+iTKU/5bR1gkPyRPzEi5gtu0brbSqnKfAnYWp8d/U28h2353rj476I1KNArg/QVNzBaw==", + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { - "chai": "^4.2.0", - "circom_runtime": "0.1.4", - "fastfile": "0.0.12", - "ffiasm": "0.1.1", - "ffjavascript": "0.2.10", - "ffwasm": "0.0.7", - "fnv-plus": "^1.3.1", - "r1csfile": "0.0.14", - "tmp-promise": "^2.0.2", - "wasmbuilder": "0.0.10" - }, - "dependencies": { - "ffjavascript": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.10.tgz", - "integrity": "sha512-GQI6gHYYG5/iD4Kt3VzezzK7fARJzP0zkc82V/+JAdjfeKBXhDSo5rpKFuK3cDcrdW0Fu2emuYNMEAuFqhEQvQ==", - "requires": { - "big-integer": "^1.6.48", - "wasmcurves": "0.0.5", - "worker-threads": "^1.0.0" - } - } + "ms": "2.0.0" } }, - "ffjavascript": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.1.0.tgz", - "integrity": "sha512-dmKlUasSfvUcxBm8nCSKl2x7EFJsXA7OVP8XLFA03T2+6mAc3IiVLC2ambEVOcMOhyhl0vJfVZjM9f9d38D1rw==", + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "big-integer": "^1.6.48" + "is-buffer": "^1.1.5" } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, - "class-is": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", - "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==" - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cli-width": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", - "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==" - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, + "base-cli-schema": { + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/base-cli-schema/-/base-cli-schema-0.1.19.tgz", + "integrity": "sha1-gfQYL0zwu4NnHxF2PknLBbkugkE=", "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" + "arr-flatten": "^1.0.1", + "array-unique": "^0.2.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "export-files": "^2.1.1", + "extend-shallow": "^2.0.1", + "falsey": "^0.3.0", + "fs-exists-sync": "^0.1.0", + "has-glob": "^0.1.1", + "has-value": "^0.3.1", + "kind-of": "^3.0.3", + "lazy-cache": "^2.0.1", + "map-schema": "^0.2.3", + "merge-deep": "^3.0.0", + "mixin-deep": "^1.1.3", + "resolve": "^1.1.7", + "tableize-object": "^0.1.0" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "ms": "2.0.0" } }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "ansi-regex": "^4.1.0" + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, - "clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "base-compose": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/base-compose/-/base-compose-0.2.1.tgz", + "integrity": "sha1-reSal/WiRIvVa8s0C090aMb74tc=", "requires": { - "mimic-response": "^1.0.0" + "copy-task": "^0.1.0", + "lazy-cache": "^2.0.1", + "mixin-deep": "^1.1.3" } }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "base-config": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/base-config/-/base-config-0.5.2.tgz", + "integrity": "sha1-q2A8AdExWL4uYux3/7Ix4o9Ijh8=", "requires": { - "color-name": "1.1.3" + "isobject": "^2.0.0", + "lazy-cache": "^1.0.3", + "map-config": "^0.5.0", + "resolve-dir": "^0.1.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + } } }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "command-exists": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", - "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "config": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/config/-/config-3.3.1.tgz", - "integrity": "sha512-+2/KaaaAzdwUBE3jgZON11L1ggLLhpf2FsGrfqYFHZW22ySGv/HqYIXrBwKKvn+XZh1UBUjHwAcrfsSkSygT+Q==", - "requires": { - "json5": "^2.1.1" - } - }, - "content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "base-config-process": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/base-config-process/-/base-config-process-0.1.9.tgz", + "integrity": "sha1-imOmGYnuY1UMyM/cP2wCdf2gtG4=", "requires": { - "safe-buffer": "5.1.2" + "base-config": "^0.5.2", + "base-config-schema": "^0.1.18", + "base-cwd": "^0.3.4", + "base-option": "^0.8.4", + "debug": "^2.2.0", + "export-files": "^2.1.1", + "is-valid-app": "^0.2.0", + "lazy-cache": "^2.0.1", + "micromatch": "^2.3.10", + "mixin-deep": "^1.1.3" }, "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "requires": { + "is-extglob": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "requires": { + "is-extglob": "^1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "requires": { + "remove-trailing-separator": "^1.0.1" + } } } }, - "content-hash": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/content-hash/-/content-hash-2.5.2.tgz", - "integrity": "sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==", - "requires": { - "cids": "^0.7.1", - "multicodec": "^0.5.5", - "multihashes": "^0.4.15" - } - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" - }, - "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" - }, - "cookiejar": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", - "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==" - }, - "core-js-pure": { - "version": "3.6.5", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.5.tgz", - "integrity": "sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA==", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "requires": { - "object-assign": "^4", - "vary": "^1" - } - }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "base-config-schema": { + "version": "0.1.24", + "resolved": "https://registry.npmjs.org/base-config-schema/-/base-config-schema-0.1.24.tgz", + "integrity": "sha1-T74UvsVtwa7ef+3QaSjpGfhyH6k=", + "requires": { + "arr-flatten": "^1.0.3", + "array-unique": "^0.3.2", + "base-pkg": "^0.2.4", + "camel-case": "^3.0.0", + "debug": "^2.6.6", + "define-property": "^1.0.0", + "export-files": "^2.1.1", + "extend-shallow": "^2.0.1", + "has-glob": "^1.0.0", + "has-value": "^0.3.1", + "inflection": "^1.12.0", + "kind-of": "^3.2.0", + "lazy-cache": "^2.0.2", + "load-templates": "^1.0.2", + "map-schema": "^0.2.4", + "matched": "^0.4.4", + "mixin-deep": "^1.2.0", + "resolve": "^1.3.3" }, "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, - "cycle": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", - "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=" - }, - "d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", - "requires": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "requires": { - "ms": "^2.1.1" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" - }, - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "requires": { - "mimic-response": "^1.0.0" - } - }, - "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "requires": { - "type-detect": "^4.0.0" - } - }, - "deep-equal": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-0.2.2.tgz", - "integrity": "sha1-hLdFiW80xoTpjyzg5Cq69Du6AX0=" - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" - }, - "defer-to-connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==" - }, - "deferred-leveldown": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", - "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==", - "dev": true, - "requires": { - "abstract-leveldown": "~2.6.0" - } - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - }, - "dependencies": { - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - } - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" - }, - "des.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", - "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "diff-sequences": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-24.9.0.tgz", - "integrity": "sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew==" - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "requires": { - "esutils": "^2.0.2" - } - }, - "dom-walk": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", - "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==" - }, - "drbg.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", - "integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=", - "requires": { - "browserify-aes": "^1.0.6", - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4" - } - }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" - }, - "ejs": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.5.tgz", - "integrity": "sha512-dldq3ZfFtgVTJMLjOe+/3sROTzALlL9E34V4/sDtUd/KlBSS0s6U1/+WPE1B4sj9CXHJpL1M6rhNJnc9Wbal9w==", - "requires": { - "jake": "^10.6.1" - } - }, - "elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" - }, - "encoding-down": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/encoding-down/-/encoding-down-5.0.4.tgz", - "integrity": "sha512-8CIZLDcSKxgzT+zX8ZVfgNbu8Md2wq/iqa1Y7zyVR18QBEAc0Nmzuvj/N5ykSKpfGzjM8qxbaFntLPwnVoUhZw==", - "dev": true, - "requires": { - "abstract-leveldown": "^5.0.0", - "inherits": "^2.0.3", - "level-codec": "^9.0.0", - "level-errors": "^2.0.0", - "xtend": "^4.0.1" - }, - "dependencies": { - "abstract-leveldown": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz", - "integrity": "sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A==", - "dev": true, + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=" + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=" + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { - "xtend": "~4.0.0" + "ms": "2.0.0" } }, - "level-codec": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-9.0.2.tgz", - "integrity": "sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ==", - "dev": true, + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "buffer": "^5.6.0" + "is-descriptor": "^1.0.0" } }, - "level-errors": { + "extend-shallow": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", - "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==", - "dev": true, + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "errno": "~0.1.1" + "is-extendable": "^0.1.0" } }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - } - } - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "requires": { - "once": "^1.4.0" - } - }, - "enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "requires": { - "ansi-colors": "^4.1.1" - } - }, - "env-paths": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.0.tgz", - "integrity": "sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==", - "dev": true - }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", - "dev": true, - "requires": { - "prr": "~1.0.1" + "file-contents": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/file-contents/-/file-contents-1.0.1.tgz", + "integrity": "sha1-ryW7/T00RjhPrYBmSdiAi8/uHsg=", + "requires": { + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "is-buffer": "^1.1.4", + "kind-of": "^3.1.0", + "lazy-cache": "^2.0.2", + "strip-bom-buffer": "^0.1.1", + "strip-bom-string": "^0.1.2", + "through2": "^2.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + } + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "has-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-glob/-/has-glob-1.0.0.tgz", + "integrity": "sha1-mqqe7b/7G6OZCnsAEPtnjuAIEgc=", + "requires": { + "is-glob": "^3.0.0" + } + }, + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "^6.0.0" + }, + "dependencies": { + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" + } + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "^6.0.0" + }, + "dependencies": { + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" + } + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" + } + } + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "requires": { + "is-extglob": "^2.1.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + }, + "load-templates": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/load-templates/-/load-templates-1.0.2.tgz", + "integrity": "sha1-CfOOlcjvS/t4W9f8qOv9MrIwvIc=", + "requires": { + "extend-shallow": "^2.0.1", + "file-contents": "^1.0.0", + "glob-parent": "^3.1.0", + "is-glob": "^3.1.0", + "kind-of": "^3.1.0", + "lazy-cache": "^2.0.2", + "matched": "^0.4.4", + "vinyl": "^2.0.1" + } + }, + "matched": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/matched/-/matched-0.4.4.tgz", + "integrity": "sha1-Vte36xgDPwz5vFLrIJD6x9weifo=", + "requires": { + "arr-union": "^3.1.0", + "async-array-reduce": "^0.2.0", + "extend-shallow": "^2.0.1", + "fs-exists-sync": "^0.1.0", + "glob": "^7.0.5", + "has-glob": "^0.1.1", + "is-valid-glob": "^0.3.0", + "lazy-cache": "^2.0.1", + "resolve-dir": "^0.1.0" + }, + "dependencies": { + "has-glob": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/has-glob/-/has-glob-0.1.1.tgz", + "integrity": "sha1-omHEwqbGZ+DHe3AKfyl8Oe86pYk=", + "requires": { + "is-glob": "^2.0.1" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "requires": { + "is-extglob": "^1.0.0" + } + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "replace-ext": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", + "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==" + }, + "vinyl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", + "integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==", + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + } } }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, + "base-cwd": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/base-cwd/-/base-cwd-0.3.4.tgz", + "integrity": "sha1-TQCrY1CgRuGtSrnCMm2heUs+TwE=", "requires": { - "is-arrayish": "^0.2.1" + "empty-dir": "^0.2.0", + "find-pkg": "^0.1.2", + "is-valid-app": "^0.2.0" } }, - "es-abstract": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", - "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" + "base-data": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/base-data/-/base-data-0.6.2.tgz", + "integrity": "sha512-wH2ViG6CUO2AaeHSEt6fJTyQAk5gl0oY456DoSC5h8mnHrWUbvdctMCuF53CXgBmi0oalZQppKNH0iamG5+uqw==", + "requires": { + "arr-flatten": "^1.1.0", + "cache-base": "^1.0.0", + "extend-shallow": "^2.0.1", + "get-value": "^2.0.6", + "has-glob": "^1.0.0", + "has-value": "^1.0.0", + "is-registered": "^0.1.5", + "is-valid-app": "^0.3.0", + "kind-of": "^5.0.0", + "lazy-cache": "^2.0.2", + "merge-value": "^1.0.0", + "mixin-deep": "^1.2.0", + "read-file": "^0.2.0", + "resolve-glob": "^1.0.0", + "set-value": "^2.0.0", + "union-value": "^1.0.0" }, "dependencies": { - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "has-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-glob/-/has-glob-1.0.0.tgz", + "integrity": "sha1-mqqe7b/7G6OZCnsAEPtnjuAIEgc=", + "requires": { + "is-glob": "^3.0.0" + } + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "requires": { + "is-extglob": "^2.1.0" + } + }, + "is-valid-app": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-valid-app/-/is-valid-app-0.3.0.tgz", + "integrity": "sha1-eBBrdR88oyOF+0VJK/KUF7WZPIA=", + "requires": { + "debug": "^2.6.3", + "is-registered": "^0.1.5", + "is-valid-instance": "^0.3.0", + "lazy-cache": "^2.0.2" + } + }, + "is-valid-instance": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-valid-instance/-/is-valid-instance-0.3.0.tgz", + "integrity": "sha1-9KxzAjxNTYubw7PsPmZjBRbijp4=", + "requires": { + "isobject": "^3.0.0", + "pascalcase": "^0.1.1" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "es5-ext": { - "version": "0.10.53", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", - "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", - "requires": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.3", - "next-tick": "~1.0.0" - } - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "base-engines": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/base-engines/-/base-engines-0.2.1.tgz", + "integrity": "sha1-aXgAyoq4iKM3iXONv6zLgYoqWns=", "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "requires": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "eslint": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", - "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", - "requires": { - "@babel/code-frame": "^7.0.0", - "ajv": "^6.9.1", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "eslint-scope": "^4.0.3", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^5.0.1", - "esquery": "^1.0.1", - "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.7.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "inquirer": "^6.2.2", - "js-yaml": "^3.13.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.11", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^5.5.1", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", - "table": "^5.2.3", - "text-table": "^0.2.0" + "debug": "^2.2.0", + "define-property": "^0.2.5", + "engine-cache": "^0.19.0", + "is-valid-app": "^0.1.2", + "lazy-cache": "^2.0.1" }, "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-valid-app": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/is-valid-app/-/is-valid-app-0.1.2.tgz", + "integrity": "sha1-L2fLs7r2TWWccNBD/JETm1qLlZA=", + "requires": { + "debug": "^2.2.0", + "is-registered": "^0.1.5", + "is-valid-instance": "^0.1.0", + "lazy-cache": "^2.0.1" + } + }, + "is-valid-instance": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-valid-instance/-/is-valid-instance-0.1.0.tgz", + "integrity": "sha1-etXGo4ht/ffZzHgEnO/yFxqZB7M=", + "requires": { + "isobject": "^2.1.0", + "pascalcase": "^0.1.1" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, - "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", - "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" - }, - "espree": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", - "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", - "requires": { - "acorn": "^6.0.7", - "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" - }, - "esquery": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", - "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "base-env": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/base-env/-/base-env-0.3.1.tgz", + "integrity": "sha512-/HxC8QV1m/bWqvjcu4WZl4Um1HRpTAjuY31uiFUEukXsXge4WIvNvGKG/gCs2PrpBFPCybowA406V/ivdPknpQ==", "requires": { - "estraverse": "^5.1.0" + "base-namespace": "^0.2.0", + "contains-path": "^0.1.0", + "debug": "^2.2.0", + "extend-shallow": "^2.0.1", + "fs-exists-sync": "^0.1.0", + "global-modules": "^0.2.2", + "is-absolute": "^0.2.5", + "is-valid-app": "^0.1.0", + "is-valid-instance": "^0.1.0", + "kind-of": "^3.0.3", + "os-homedir": "^1.0.1", + "resolve-file": "^0.3.0" }, "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" + "cwd": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/cwd/-/cwd-0.10.0.tgz", + "integrity": "sha1-FyQAaUBXwioTsM8WFix+S3p/5Wc=", + "requires": { + "find-pkg": "^0.1.2", + "fs-exists-sync": "^0.1.0" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-valid-app": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/is-valid-app/-/is-valid-app-0.1.2.tgz", + "integrity": "sha1-L2fLs7r2TWWccNBD/JETm1qLlZA=", + "requires": { + "debug": "^2.2.0", + "is-registered": "^0.1.5", + "is-valid-instance": "^0.1.0", + "lazy-cache": "^2.0.1" + } + }, + "is-valid-instance": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-valid-instance/-/is-valid-instance-0.1.0.tgz", + "integrity": "sha1-etXGo4ht/ffZzHgEnO/yFxqZB7M=", + "requires": { + "isobject": "^2.1.0", + "pascalcase": "^0.1.1" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "resolve-file": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/resolve-file/-/resolve-file-0.3.0.tgz", + "integrity": "sha1-EeH7RkVm06fFAMt+lIHo8LAKFO8=", + "requires": { + "cwd": "^0.10.0", + "expand-tilde": "^2.0.2", + "extend-shallow": "^2.0.1", + "fs-exists-sync": "^0.1.0", + "homedir-polyfill": "^1.0.1", + "lazy-cache": "^2.0.2", + "resolve": "^1.2.0" + } } } }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "requires": { - "estraverse": "^5.2.0" + "base-generators": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/base-generators/-/base-generators-0.4.6.tgz", + "integrity": "sha1-4amTYh5bRCr44MgRMVoyb5h8nqY=", + "requires": { + "async-each-series": "^1.1.0", + "base-compose": "^0.2.1", + "base-cwd": "^0.3.1", + "base-data": "^0.6.0", + "base-env": "^0.3.0", + "base-option": "^0.8.4", + "base-pkg": "^0.2.4", + "base-plugins": "^0.4.13", + "base-task": "^0.6.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "global-modules": "^0.2.2", + "is-valid-app": "^0.2.0", + "is-valid-instance": "^0.2.0", + "kind-of": "^3.0.3", + "lazy-cache": "^2.0.1", + "mixin-deep": "^1.1.3" }, "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" - }, - "eth-ens-namehash": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", - "integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=", + "base-helpers": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/base-helpers/-/base-helpers-0.1.1.tgz", + "integrity": "sha1-2k4eKy+ACOzc6T8R79223gYzP7M=", "requires": { - "idna-uts46-hx": "^2.3.1", - "js-sha3": "^0.5.7" + "debug": "^2.2.0", + "define-property": "^0.2.5", + "is-valid-app": "^0.1.0", + "lazy-cache": "^2.0.1", + "load-helpers": "^0.2.11" }, "dependencies": { - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-valid-app": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/is-valid-app/-/is-valid-app-0.1.2.tgz", + "integrity": "sha1-L2fLs7r2TWWccNBD/JETm1qLlZA=", + "requires": { + "debug": "^2.2.0", + "is-registered": "^0.1.5", + "is-valid-instance": "^0.1.0", + "lazy-cache": "^2.0.1" + } + }, + "is-valid-instance": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-valid-instance/-/is-valid-instance-0.1.0.tgz", + "integrity": "sha1-etXGo4ht/ffZzHgEnO/yFxqZB7M=", + "requires": { + "isobject": "^2.1.0", + "pascalcase": "^0.1.1" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, - "eth-lib": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", - "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "base-namespace": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/base-namespace/-/base-namespace-0.2.0.tgz", + "integrity": "sha1-RLLLumZ1Y8xE5trrTv5AO7CrPaA=", "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" + "is-valid-app": "^0.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "is-valid-app": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/is-valid-app/-/is-valid-app-0.1.2.tgz", + "integrity": "sha1-L2fLs7r2TWWccNBD/JETm1qLlZA=", + "requires": { + "debug": "^2.2.0", + "is-registered": "^0.1.5", + "is-valid-instance": "^0.1.0", + "lazy-cache": "^2.0.1" + } + }, + "is-valid-instance": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-valid-instance/-/is-valid-instance-0.1.0.tgz", + "integrity": "sha1-etXGo4ht/ffZzHgEnO/yFxqZB7M=", + "requires": { + "isobject": "^2.1.0", + "pascalcase": "^0.1.1" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } } }, - "eth-sig-util": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-2.5.3.tgz", - "integrity": "sha512-KpXbCKmmBUNUTGh9MRKmNkIPietfhzBqqYqysDavLseIiMUGl95k6UcPEkALAZlj41e9E6yioYXc1PC333RKqw==", - "dev": true, + "base-option": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/base-option/-/base-option-0.8.4.tgz", + "integrity": "sha1-EUF/qSRPInpNU3tNKRcjRieH1cc=", "requires": { - "buffer": "^5.2.1", - "elliptic": "^6.4.0", - "ethereumjs-abi": "0.6.5", - "ethereumjs-util": "^5.1.1", - "tweetnacl": "^1.0.0", - "tweetnacl-util": "^0.15.0" + "define-property": "^0.2.5", + "get-value": "^2.0.6", + "is-valid-app": "^0.2.0", + "isobject": "^2.1.0", + "lazy-cache": "^2.0.1", + "mixin-deep": "^1.1.3", + "option-cache": "^3.4.0", + "set-value": "^0.3.3" }, "dependencies": { - "ethereumjs-abi": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz", - "integrity": "sha1-WmN+8Wq0NHP6cqKa2QhxQFs/UkE=", - "dev": true, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "bn.js": "^4.10.0", - "ethereumjs-util": "^4.3.0" - }, - "dependencies": { - "ethereumjs-util": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-4.5.1.tgz", - "integrity": "sha512-WrckOZ7uBnei4+AKimpuF1B3Fv25OmoRgmYCpGsP7u8PFxXAmAgiJSYT2kRWnt6fVIlKaQlZvuwXp7PIrmn3/w==", - "dev": true, - "requires": { - "bn.js": "^4.8.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "rlp": "^2.0.0" - } - } + "is-descriptor": "^0.1.0" } }, - "ethereumjs-util": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", - "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", - "dev": true, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "^0.1.3", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1" + "is-extendable": "^0.1.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + }, + "set-value": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.3.3.tgz", + "integrity": "sha1-uBIjaBY4oQiP2IpDW4qdMtro2bo=", + "requires": { + "extend-shallow": "^2.0.1", + "isobject": "^2.0.0", + "to-object-path": "^0.2.0" + } + }, + "to-object-path": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.2.0.tgz", + "integrity": "sha1-FjThtSqIugDjlJYZ/ACB3Jo7B8o=", + "requires": { + "arr-flatten": "^1.0.1", + "is-arguments": "^1.0.2" } } } }, - "ethashjs": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/ethashjs/-/ethashjs-0.0.8.tgz", - "integrity": "sha512-/MSbf/r2/Ld8o0l15AymjOTlPqpN8Cr4ByUEA9GtR4x0yAh3TdtDzEg29zMjXCNPI7u6E5fOQdj/Cf9Tc7oVNw==", - "dev": true, + "base-pkg": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/base-pkg/-/base-pkg-0.2.5.tgz", + "integrity": "sha512-/POxajlgBhVsknwLXnqnbp//bAMh7SkDgHF+z/uoYnFqk46e05c3MxSEmn5vFCB8g4rHHKxAPLKrU/4Yb3vUdA==", "requires": { - "async": "^2.1.2", - "buffer-xor": "^2.0.1", - "ethereumjs-util": "^7.0.2", - "miller-rabin": "^4.0.0" + "cache-base": "^1.0.0", + "debug": "^2.6.8", + "define-property": "^1.0.0", + "expand-pkg": "^0.1.8", + "extend-shallow": "^2.0.1", + "is-valid-app": "^0.3.0", + "log-utils": "^0.2.1", + "pkg-store": "^0.2.2" }, "dependencies": { - "bn.js": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", - "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==", - "dev": true + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } }, - "buffer-xor": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-2.0.2.tgz", - "integrity": "sha512-eHslX0bin3GB+Lx2p7lEYRShRewuNZL3fUl4qlVJGGiwoPGftmt8JQgk2Y9Ji5/01TnVDo33E5b5O3vUB1HdqQ==", - "dev": true, + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "safe-buffer": "^5.1.1" + "is-descriptor": "^1.0.0" } }, - "ethereumjs-util": { - "version": "7.0.7", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.0.7.tgz", - "integrity": "sha512-vU5rtZBlZsgkTw3o6PDKyB8li2EgLavnAbsKcfsH2YhHH1Le+PP8vEiMnAnvgc1B6uMoaM5GDCrVztBw0Q5K9g==", - "dev": true, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "@types/bn.js": "^4.11.3", - "bn.js": "^5.1.2", - "create-hash": "^1.1.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.4" + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "is-valid-app": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-valid-app/-/is-valid-app-0.3.0.tgz", + "integrity": "sha1-eBBrdR88oyOF+0VJK/KUF7WZPIA=", + "requires": { + "debug": "^2.6.3", + "is-registered": "^0.1.5", + "is-valid-instance": "^0.3.0", + "lazy-cache": "^2.0.2" + } + }, + "is-valid-instance": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-valid-instance/-/is-valid-instance-0.3.0.tgz", + "integrity": "sha1-9KxzAjxNTYubw7PsPmZjBRbijp4=", + "requires": { + "isobject": "^3.0.0", + "pascalcase": "^0.1.1" } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, - "ethereum-bloom-filters": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.7.tgz", - "integrity": "sha512-cDcJJSJ9GMAcURiAWO3DxIEhTL/uWqlQnvgKpuYQzYPrt/izuGU+1ntQmHt0IRq6ADoSYHFnB+aCEFIldjhkMQ==", + "base-plugins": { + "version": "0.4.13", + "resolved": "https://registry.npmjs.org/base-plugins/-/base-plugins-0.4.13.tgz", + "integrity": "sha1-kd8XjcN/hoQt6ihteeSPuGtarD0=", "requires": { - "js-sha3": "^0.8.0" + "define-property": "^0.2.5", + "is-registered": "^0.1.5", + "isobject": "^2.1.0" }, "dependencies": { - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } } } }, - "ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", - "dev": true, + "base-questions": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/base-questions/-/base-questions-0.7.4.tgz", + "integrity": "sha1-9k+EgmHtbIKPSYPXgS9A0wN4IUY=", "requires": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" + "base-store": "^0.4.4", + "clone-deep": "^0.2.4", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "is-valid-app": "^0.2.0", + "isobject": "^2.1.0", + "lazy-cache": "^2.0.1", + "mixin-deep": "^1.1.3", + "question-store": "^0.11.0" }, "dependencies": { - "keccak": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz", - "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", - "dev": true, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0" + "ms": "2.0.0" } }, - "secp256k1": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", - "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", - "dev": true, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "elliptic": "^6.5.2", - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0" + "is-descriptor": "^0.1.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, - "ethereum-waffle": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ethereum-waffle/-/ethereum-waffle-3.0.1.tgz", - "integrity": "sha512-FAAiN0VqNF9+yCPLPW9Rtq77dHcx9XwTGDe8s0nko34MeWKRX3EH258zwvmA29IhDmNMsRz7em6a7Zaw4g8hPw==", - "dev": true, - "requires": { - "@ethereum-waffle/chai": "^3.0.1", - "@ethereum-waffle/compiler": "^3.0.1", - "@ethereum-waffle/mock-contract": "^3.0.1", - "@ethereum-waffle/provider": "^3.0.1", - "ethers": "^5.0.1" - } - }, - "ethereumjs-abi": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", - "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", - "dev": true, - "requires": { - "bn.js": "^4.11.8", - "ethereumjs-util": "^6.0.0" - } - }, - "ethereumjs-account": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-3.0.0.tgz", - "integrity": "sha512-WP6BdscjiiPkQfF9PVfMcwx/rDvfZTjFKY0Uwc09zSQr9JfIVH87dYIJu0gNhBhpmovV4yq295fdllS925fnBA==", - "dev": true, + "base-routes": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/base-routes/-/base-routes-0.2.2.tgz", + "integrity": "sha1-CmFNFy1JBF2Mk4dxP4YN88QFNB4=", "requires": { - "ethereumjs-util": "^6.0.0", - "rlp": "^2.2.1", - "safe-buffer": "^5.1.1" + "debug": "^2.2.0", + "en-route": "^0.7.5", + "is-valid-app": "^0.2.0", + "lazy-cache": "^2.0.1", + "template-error": "^0.1.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } } }, - "ethereumjs-block": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz", - "integrity": "sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg==", - "dev": true, - "requires": { - "async": "^2.0.1", - "ethereumjs-common": "^1.5.0", - "ethereumjs-tx": "^2.1.1", - "ethereumjs-util": "^5.0.0", - "merkle-patricia-tree": "^2.1.2" + "base-runtimes": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/base-runtimes/-/base-runtimes-0.2.0.tgz", + "integrity": "sha1-GI4+ZoJMyxWYsyh7TqW5NaG4UEU=", + "requires": { + "extend-shallow": "^2.0.1", + "is-valid-app": "^0.2.0", + "lazy-cache": "^2.0.1", + "log-utils": "^0.1.4", + "micromatch": "^2.3.10", + "time-diff": "^0.3.1" }, "dependencies": { - "ethereumjs-util": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", - "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", - "dev": true, + "ansi-colors": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-0.1.0.tgz", + "integrity": "sha1-M0rDbNPq1wjeXGnhmpjRhkImtD8=", + "requires": { + "ansi-bgblack": "^0.1.1", + "ansi-bgblue": "^0.1.1", + "ansi-bgcyan": "^0.1.1", + "ansi-bggreen": "^0.1.1", + "ansi-bgmagenta": "^0.1.1", + "ansi-bgred": "^0.1.1", + "ansi-bgwhite": "^0.1.1", + "ansi-bgyellow": "^0.1.1", + "ansi-black": "^0.1.1", + "ansi-blue": "^0.1.1", + "ansi-bold": "^0.1.1", + "ansi-cyan": "^0.1.1", + "ansi-dim": "^0.1.1", + "ansi-gray": "^0.1.1", + "ansi-green": "^0.1.1", + "ansi-grey": "^0.1.1", + "ansi-hidden": "^0.1.1", + "ansi-inverse": "^0.1.1", + "ansi-italic": "^0.1.1", + "ansi-magenta": "^0.1.1", + "ansi-red": "^0.1.1", + "ansi-reset": "^0.1.1", + "ansi-strikethrough": "^0.1.1", + "ansi-underline": "^0.1.1", + "ansi-white": "^0.1.1", + "ansi-yellow": "^0.1.1", + "lazy-cache": "^0.2.4" + }, + "dependencies": { + "lazy-cache": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", + "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=" + } + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "^0.1.3", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1" + "arr-flatten": "^1.0.1" } }, - "isarray": { + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "requires": { + "is-extglob": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-extglob": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" }, - "merkle-patricia-tree": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz", - "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==", - "dev": true, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "requires": { - "async": "^1.4.2", - "ethereumjs-util": "^5.0.0", - "level-ws": "0.0.0", - "levelup": "^1.2.1", - "memdown": "^1.0.0", - "readable-stream": "^2.0.0", - "rlp": "^2.0.0", - "semaphore": ">=1.0.1" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - } + "is-extglob": "^1.0.0" } }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } + "is-buffer": "^1.1.5" } }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, + "log-utils": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/log-utils/-/log-utils-0.1.5.tgz", + "integrity": "sha1-3g84+Vf0zW69Xctoddijua4HT3c=", "requires": { - "safe-buffer": "~5.1.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } + "ansi-colors": "^0.1.0", + "error-symbol": "^0.1.0", + "info-symbol": "^0.1.0", + "log-ok": "^0.1.1", + "success-symbol": "^0.1.0", + "time-stamp": "^1.0.1", + "warning-symbol": "^0.1.0" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "requires": { + "remove-trailing-separator": "^1.0.1" } } } }, - "ethereumjs-blockchain": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/ethereumjs-blockchain/-/ethereumjs-blockchain-4.0.4.tgz", - "integrity": "sha512-zCxaRMUOzzjvX78DTGiKjA+4h2/sF0OYL1QuPux0DHpyq8XiNoF5GYHtb++GUxVlMsMfZV7AVyzbtgcRdIcEPQ==", - "dev": true, + "base-store": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/base-store/-/base-store-0.4.4.tgz", + "integrity": "sha1-JY32uKYu4G/xUADJSdD9fCi68mY=", "requires": { - "async": "^2.6.1", - "ethashjs": "~0.0.7", - "ethereumjs-block": "~2.2.2", - "ethereumjs-common": "^1.5.0", - "ethereumjs-util": "^6.1.0", - "flow-stoplight": "^1.0.0", - "level-mem": "^3.0.1", - "lru-cache": "^5.1.1", - "rlp": "^2.2.2", - "semaphore": "^1.1.0" - } - }, - "ethereumjs-common": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.1.tgz", - "integrity": "sha512-aVUPRLgmXORGXXEVkFYgPhr9TGtpBY2tGhZ9Uh0A3lIUzUDr1x6kQx33SbjPUkLkX3eniPQnIL/2psjkjrOfcQ==" - }, - "ethereumjs-tx": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", - "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", - "requires": { - "ethereumjs-common": "^1.5.0", - "ethereumjs-util": "^6.0.0" - } - }, - "ethereumjs-util": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz", - "integrity": "sha512-vb0XN9J2QGdZGIEKG2vXM+kUdEivUfU6Wmi5y0cg+LRhDYKnXIZ/Lz7XjFbHRR9VIKq2lVGLzGBkA++y2nOdOQ==", - "requires": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "ethjs-util": "0.1.6", - "keccak": "^2.0.0", - "rlp": "^2.2.3", - "secp256k1": "^3.0.1" - } - }, - "ethers": { - "version": "5.0.19", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.0.19.tgz", - "integrity": "sha512-0AZnUgZh98q888WAd1oI3aLeI+iyDtrupjANVtPPS7O63lVopkR/No8A1NqSkgl/rU+b2iuu2mUZor6GD4RG2w==", - "requires": { - "@ethersproject/abi": "5.0.7", - "@ethersproject/abstract-provider": "5.0.5", - "@ethersproject/abstract-signer": "5.0.7", - "@ethersproject/address": "5.0.5", - "@ethersproject/base64": "5.0.4", - "@ethersproject/basex": "5.0.4", - "@ethersproject/bignumber": "5.0.8", - "@ethersproject/bytes": "5.0.5", - "@ethersproject/constants": "5.0.5", - "@ethersproject/contracts": "5.0.5", - "@ethersproject/hash": "5.0.6", - "@ethersproject/hdnode": "5.0.5", - "@ethersproject/json-wallets": "5.0.7", - "@ethersproject/keccak256": "5.0.4", - "@ethersproject/logger": "5.0.6", - "@ethersproject/networks": "5.0.4", - "@ethersproject/pbkdf2": "5.0.4", - "@ethersproject/properties": "5.0.4", - "@ethersproject/providers": "5.0.14", - "@ethersproject/random": "5.0.4", - "@ethersproject/rlp": "5.0.4", - "@ethersproject/sha2": "5.0.4", - "@ethersproject/signing-key": "5.0.5", - "@ethersproject/solidity": "5.0.5", - "@ethersproject/strings": "5.0.5", - "@ethersproject/transactions": "5.0.6", - "@ethersproject/units": "5.0.6", - "@ethersproject/wallet": "5.0.7", - "@ethersproject/web": "5.0.9", - "@ethersproject/wordlists": "5.0.5" + "data-store": "^0.16.0", + "debug": "^2.2.0", + "extend-shallow": "^2.0.1", + "is-registered": "^0.1.4", + "is-valid-instance": "^0.1.0", + "lazy-cache": "^2.0.1", + "project-name": "^0.2.5" }, "dependencies": { - "@ethersproject/abi": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.7.tgz", - "integrity": "sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw==", - "requires": { - "@ethersproject/address": "^5.0.4", - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/hash": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/strings": "^5.0.4" - } - }, - "@ethersproject/address": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.5.tgz", - "integrity": "sha512-DpkQ6rwk9jTefrRsJzEm6nhRiJd9pvhn1xN0rw5N/jswXG5r7BLk/GVA0mMAVWAsYfvi2xSc5L41FMox43RYEA==", + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/rlp": "^5.0.3", - "bn.js": "^4.4.0" + "ms": "2.0.0" } }, - "@ethersproject/bignumber": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.8.tgz", - "integrity": "sha512-KXFVAFKS1jdTXYN8BE5Oj+ZfPMh28iRdFeNGBVT6cUFdtiPVqeXqc0ggvBqA3A1VoFFGgM7oAeaagA393aORHA==", + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", - "bn.js": "^4.4.0" + "is-extendable": "^0.1.0" } }, - "@ethersproject/bytes": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.5.tgz", - "integrity": "sha512-IEj9HpZB+ACS6cZ+QQMTqmu/cnUK2fYNE6ms/PVxjoBjoxc6HCraLpam1KuRvreMy0i523PLmjN8OYeikRdcUQ==", + "is-valid-instance": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-valid-instance/-/is-valid-instance-0.1.0.tgz", + "integrity": "sha1-etXGo4ht/ffZzHgEnO/yFxqZB7M=", "requires": { - "@ethersproject/logger": "^5.0.5" + "isobject": "^2.1.0", + "pascalcase": "^0.1.1" } }, - "@ethersproject/constants": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.5.tgz", - "integrity": "sha512-foaQVmxp2+ik9FrLUCtVrLZCj4M3Ibgkqvh+Xw/vFRSerkjVSYePApaVE5essxhoSlF1U9oXfWY09QI2AXtgKA==", - "requires": { - "@ethersproject/bignumber": "^5.0.7" - } + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, - "@ethersproject/hash": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.6.tgz", - "integrity": "sha512-Gvh57v6BWhwnud6l7tMfQm32PRQ2DYx2WaAAQmAxAfYvmzUkpQCBstnGeNMXIL8/2wdkvcB2u+WZRWaZtsFuUQ==", + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", "requires": { - "@ethersproject/abstract-signer": "^5.0.6", - "@ethersproject/address": "^5.0.5", - "@ethersproject/bignumber": "^5.0.8", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.4", - "@ethersproject/strings": "^5.0.4" + "isarray": "1.0.0" } }, - "@ethersproject/keccak256": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.4.tgz", - "integrity": "sha512-GNpiOUm9PGUxFNqOxYKDQBM0u68bG9XC9iOulEQ8I0tOx/4qUpgVzvgXL6ugxr0RY554Gz/NQsVqknqPzUcxpQ==", + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "base-task": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/base-task/-/base-task-0.6.2.tgz", + "integrity": "sha1-Rn1guuBzezuJab/1f6RElJiZgcA=", + "requires": { + "composer": "^0.13.0", + "is-valid-app": "^0.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "js-sha3": "0.5.7" + "ms": "2.0.0" } }, - "@ethersproject/logger": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.6.tgz", - "integrity": "sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==" - }, - "@ethersproject/properties": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.4.tgz", - "integrity": "sha512-UdyX3GqBxFt15B0uSESdDNmhvEbK3ACdDXl2soshoPcneXuTswHDeA0LoPlnaZzhbgk4p6jqb4GMms5C26Qu6A==", + "is-valid-app": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/is-valid-app/-/is-valid-app-0.1.2.tgz", + "integrity": "sha1-L2fLs7r2TWWccNBD/JETm1qLlZA=", "requires": { - "@ethersproject/logger": "^5.0.5" + "debug": "^2.2.0", + "is-registered": "^0.1.5", + "is-valid-instance": "^0.1.0", + "lazy-cache": "^2.0.1" } }, - "@ethersproject/rlp": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.4.tgz", - "integrity": "sha512-5qrrZad7VTjofxSsm7Zg/7Dr4ZOln4S2CqiDdOuTv6MBKnXj0CiBojXyuDy52M8O3wxH0CyE924hXWTDV1PQWQ==", + "is-valid-instance": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-valid-instance/-/is-valid-instance-0.1.0.tgz", + "integrity": "sha1-etXGo4ht/ffZzHgEnO/yFxqZB7M=", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5" + "isobject": "^2.1.0", + "pascalcase": "^0.1.1" } }, - "@ethersproject/signing-key": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.5.tgz", - "integrity": "sha512-Z1wY7JC1HVO4CvQWY2TyTTuAr8xK3bJijZw1a9G92JEmKdv1j255R/0YLBBcFTl2J65LUjtXynNJ2GbArPGi5g==", - "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "elliptic": "6.5.3" - } + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, - "@ethersproject/strings": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.5.tgz", - "integrity": "sha512-JED6WaIV00xM/gvj8vSnd+0VWtDYdidTmavFRCTQakqfz+4tDo6Jz5LHgG+dd45h7ah7ykCHW0C7ZXWEDROCXQ==", + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/logger": "^5.0.5" + "isarray": "1.0.0" } }, - "@ethersproject/transactions": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.6.tgz", - "integrity": "sha512-htsFhOD+NMBxx676A8ehSuwVV49iqpSB+CkjPZ02tpNew0K6p8g0CZ46Z1ZP946gIHAU80xQ0NACHYrjIUaCFA==", - "requires": { - "@ethersproject/address": "^5.0.4", - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/rlp": "^5.0.3", - "@ethersproject/signing-key": "^5.0.4" - } - } - } - }, - "ethjs-unit": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", - "integrity": "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=", - "requires": { - "bn.js": "4.11.6", - "number-to-bn": "1.7.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, - "ethjs-util": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", - "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "base-x": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", + "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", "requires": { - "is-hex-prefixed": "1.0.0", - "strip-hex-prefix": "1.0.0" + "safe-buffer": "^5.0.1" } }, - "event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", - "dev": true + "base64-js": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" }, - "eventemitter3": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", - "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } + "base64url": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", + "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==" }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "tweetnacl": "^0.14.3" }, "dependencies": { - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "requires": { - "pump": "^3.0.0" - } + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" } } }, - "express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" + }, + "big-integer": { + "version": "1.6.48", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz", + "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==" + }, + "bignumber.js": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", + "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==" + }, + "binary-extensions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", + "dev": true + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", "requires": { - "accepts": "~1.3.7", - "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", + "file-uri-to-path": "1.0.0" + } + }, + "bip66": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", + "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "blake-hash": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/blake-hash/-/blake-hash-1.1.1.tgz", + "integrity": "sha512-V93H+FEJuXXZi1eEsMtbcBFP9oL5Ept7SLw3cbXYlPC3nocm9Fr4m18ZhbhdJrZVS9J/Z0oNE4L3oDZvmorHNA==", + "requires": { + "bindings": "^1.2.1", + "inherits": "^2.0.3", + "nan": "^2.2.1" + } + }, + "blake2b": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/blake2b/-/blake2b-2.1.3.tgz", + "integrity": "sha512-pkDss4xFVbMb4270aCyGD3qLv92314Et+FsKzilCLxDz5DuZ2/1g3w4nmBbu6nKApPspnjG7JcwTjGZnduB1yg==", + "requires": { + "blake2b-wasm": "^1.1.0", + "nanoassert": "^1.0.0" + } + }, + "blake2b-wasm": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/blake2b-wasm/-/blake2b-wasm-1.1.7.tgz", + "integrity": "sha512-oFIHvXhlz/DUgF0kq5B1CqxIDjIJwh9iDeUUGQUcvgiGz7Wdw03McEO7CfLBy7QKGdsydcMCgO9jFNBAFCtFcA==", + "requires": { + "nanoassert": "^1.0.0" + } + }, + "blakejs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz", + "integrity": "sha1-ad+S75U6qIylGjLfarHFShVfx6U=" + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + }, + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + }, + "body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "requires": { + "bytes": "3.1.0", "content-type": "~1.0.4", - "cookie": "0.4.0", - "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.1.2", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", "qs": "6.7.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" + "raw-body": "2.4.0", + "type-is": "~1.6.17" }, "dependencies": { "debug": { @@ -4407,6 +4961,23 @@ "ms": "2.0.0" } }, + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -4417,9872 +4988,9798 @@ "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } } } }, - "ext": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", - "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "requires": { - "type": "^2.0.0" - }, - "dependencies": { - "type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz", - "integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==" - } + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "extend": { + "braces": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" + "fill-range": "^7.0.1" } }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" }, - "eyes": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", - "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=" + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true }, - "fake-merkle-patricia-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz", - "integrity": "sha1-S4w6z7Ugr635hgsfFM2M40As3dM=", - "dev": true, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "requires": { - "checkpoint-store": "^1.1.0" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } }, - "fastfile": { - "version": "0.0.12", - "resolved": "https://registry.npmjs.org/fastfile/-/fastfile-0.0.12.tgz", - "integrity": "sha512-0EZo2y5eW8X0oiDDRvcnufjVxlM96CQL5hvmRQtbRABWlCkH73IHwkzl0qOSdxtchaMr+0TSB7GVqaVEixRr1Q==" + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + } }, - "ffiasm": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ffiasm/-/ffiasm-0.1.1.tgz", - "integrity": "sha512-irMMHiR9JJ7BVBrAhtliUawxVdPYSdyl81taUYJ4C1mJ0iw2ueThE/qtr0J8B83tsIY8HJvh0lg5F+6ClK4xpA==", + "browserify-sign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.0.tgz", + "integrity": "sha512-hEZC1KEeYuoHRqhGhTy6gWrpJA3ZDjFWv0DE61643ZnOXAKJb3u7yWcrU0mMc9SwAqK1n7myPGndkp0dFG7NFA==", "requires": { - "big-integer": "^1.6.48", - "ejs": "^3.0.1", - "yargs": "^15.3.1" + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.2", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" }, "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" - }, - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - } - }, - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } + "bn.js": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.2.tgz", + "integrity": "sha512-40rZaf3bUNKTVYu9sIeeEGOg7g14Yvnj9kH7b50EiwX0Q7A6umbvfI5tvHaOERH0XigqKkfLkFQxzb4e6CIXnA==" } } }, - "ffjavascript": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.10.tgz", - "integrity": "sha512-GQI6gHYYG5/iD4Kt3VzezzK7fARJzP0zkc82V/+JAdjfeKBXhDSo5rpKFuK3cDcrdW0Fu2emuYNMEAuFqhEQvQ==", + "bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", + "dev": true, "requires": { - "big-integer": "^1.6.48", - "wasmcurves": "0.0.5", - "worker-threads": "^1.0.0" + "base-x": "^3.0.2" } }, - "ffwasm": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ffwasm/-/ffwasm-0.0.7.tgz", - "integrity": "sha512-17cTLzv7HHAKqZbX8MvHxjSrR0yDdn1sh4TVsTbAvO9e6klhFicnyoVXc/sCuViV/M8g65sCmVrAmoPCZp1YkQ==", + "bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "dev": true, "requires": { - "big-integer": "^1.6.48", - "wasmbuilder": "0.0.10" + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" } }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "buffer": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", + "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", "requires": { - "escape-string-regexp": "^1.0.5" + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" } }, - "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", - "requires": { - "flat-cache": "^2.0.1" - } + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + "buffer-to-arraybuffer": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", + "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=" }, - "filelist": { + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + }, + "cache-base": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.1.tgz", - "integrity": "sha512-8zSK6Nu0DQIC08mUC46sWGXi+q3GGpKydAG36k+JDba6VRpkevvOWUW5a/PhShij4+vHT9M+ghgG7eM+a9JDUQ==", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "requires": { - "minimatch": "^3.0.4" + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" } }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "requires": { - "to-regex-range": "^5.0.1" + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" } }, - "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, + "camel-case": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", + "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", "requires": { - "locate-path": "^2.0.0" + "no-case": "^2.2.0", + "upper-case": "^1.1.1" } }, - "flat": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", - "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", - "dev": true, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "chai": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", + "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", "requires": { - "is-buffer": "~2.0.3" + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.0", + "type-detect": "^4.0.5" } }, - "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" - }, - "dependencies": { - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "requires": { - "glob": "^7.1.3" - } - } + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, - "flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==" - }, - "flow-stoplight": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/flow-stoplight/-/flow-stoplight-1.0.0.tgz", - "integrity": "sha1-SiksW8/4s5+mzAyxqFPYbyfu/3s=", - "dev": true - }, - "fnv-plus": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/fnv-plus/-/fnv-plus-1.3.1.tgz", - "integrity": "sha512-Gz1EvfOneuFfk4yG458dJ3TLJ7gV19q3OM/vVvvHf7eT02Hm1DleB4edsia6ahbKgAYxO9gvyQ1ioWZR+a00Yw==" + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" }, - "follow-redirects": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", - "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==", - "dev": true + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=" }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + "checkpoint-store": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/checkpoint-store/-/checkpoint-store-1.1.0.tgz", + "integrity": "sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY=", + "dev": true, + "requires": { + "functional-red-black-tree": "^1.0.1" + } }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "chokidar": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz", + "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==", + "dev": true, "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" } }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" }, - "fp-ts": { - "version": "1.19.3", - "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.3.tgz", - "integrity": "sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==", + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", "dev": true }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" - }, - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, + "cids": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", + "integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==", "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "buffer": "^5.5.0", + "class-is": "^1.1.0", + "multibase": "~0.6.0", + "multicodec": "^1.0.0", + "multihashes": "~0.4.15" + }, + "dependencies": { + "multicodec": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.3.tgz", + "integrity": "sha512-8G4JKbHWSe/39Xx2uiI+/b/S6mGgimzwEN4TOCokFUIfofg1T8eHny88ht9eWImD2dng+EEQRsApXxA5ubhU4g==", + "requires": { + "buffer": "^5.6.0", + "varint": "^5.0.0" + } + } } }, - "fs-minipass": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", - "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "requires": { - "minipass": "^2.6.0" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" - }, - "ganache-core": { - "version": "2.10.2", - "resolved": "https://registry.npmjs.org/ganache-core/-/ganache-core-2.10.2.tgz", - "integrity": "sha512-4XEO0VsqQ1+OW7Za5fQs9/Kk7o8M0T1sRfFSF8h9NeJ2ABaqMO5waqxf567ZMcSkRKaTjUucBSz83xNfZv1HDg==", - "dev": true, + "circom": { + "version": "0.5.35", + "resolved": "https://registry.npmjs.org/circom/-/circom-0.5.35.tgz", + "integrity": "sha512-fUjYTyU75TrA54IPqHt+3VyRWVL82jdbiW68NC9CdtwVrXID+G2cED4XPlsVIKuGI8NFl1LzapELv6DRjS363w==", "requires": { - "abstract-leveldown": "3.0.0", - "async": "2.6.2", - "bip39": "2.5.0", - "cachedown": "1.0.0", - "clone": "2.1.2", - "debug": "3.2.6", - "encoding-down": "5.0.4", - "eth-sig-util": "2.3.0", - "ethereumjs-abi": "0.6.7", - "ethereumjs-account": "3.0.0", - "ethereumjs-block": "2.2.2", - "ethereumjs-common": "1.5.0", - "ethereumjs-tx": "2.1.2", - "ethereumjs-util": "6.2.0", - "ethereumjs-vm": "4.1.3", - "ethereumjs-wallet": "0.6.3", - "heap": "0.2.6", - "level-sublevel": "6.6.4", - "levelup": "3.1.1", - "lodash": "4.17.14", - "merkle-patricia-tree": "2.3.2", - "seedrandom": "3.0.1", - "source-map-support": "0.5.12", - "tmp": "0.1.0", - "web3": "1.2.4", - "web3-provider-engine": "14.2.1", - "websocket": "1.0.29" + "chai": "^4.2.0", + "circom_runtime": "0.1.9", + "fastfile": "0.0.18", + "ffiasm": "0.1.1", + "ffjavascript": "0.2.22", + "ffwasm": "0.0.7", + "fnv-plus": "^1.3.1", + "r1csfile": "0.0.16", + "tmp-promise": "^2.0.2", + "wasmbuilder": "0.0.10" }, "dependencies": { - "@babel/code-frame": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", - "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", - "requires": { - "@babel/highlight": "^7.8.3" - } - }, - "@babel/core": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.8.3.tgz", - "integrity": "sha512-4XFkf8AwyrEG7Ziu3L2L0Cv+WyY47Tcsp70JFmpftbAA1K7YL/sgE9jh9HyNj08Y/U50ItUchpN0w6HxAoX1rA==", - "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.8.3", - "@babel/helpers": "^7.8.3", - "@babel/parser": "^7.8.3", - "@babel/template": "^7.8.3", - "@babel/traverse": "^7.8.3", - "@babel/types": "^7.8.3", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.1", - "json5": "^2.1.0", - "lodash": "^4.17.13", - "resolve": "^1.3.2", - "semver": "^5.4.1", - "source-map": "^0.5.0" + "circom_runtime": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/circom_runtime/-/circom_runtime-0.1.9.tgz", + "integrity": "sha512-eh34quaGpeEWXthnhmC9zpoBL/5zJ0mGDbPT/plb/xVmFaKxJDcLuCr2sma5s3il8AYlEIb/nbqytojyI3TWDQ==", + "requires": { + "ffjavascript": "0.2.10", + "fnv-plus": "^1.3.1" }, "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "requires": { - "ms": "^2.1.1" - } - }, - "json5": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.1.tgz", - "integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==", + "ffjavascript": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.10.tgz", + "integrity": "sha512-GQI6gHYYG5/iD4Kt3VzezzK7fARJzP0zkc82V/+JAdjfeKBXhDSo5rpKFuK3cDcrdW0Fu2emuYNMEAuFqhEQvQ==", "requires": { - "minimist": "^1.2.0" + "big-integer": "^1.6.48", + "wasmcurves": "0.0.5", + "worker-threads": "^1.0.0" } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" } } }, - "@babel/generator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.3.tgz", - "integrity": "sha512-WjoPk8hRpDRqqzRpvaR8/gDUPkrnOOeuT2m8cNICJtZH6mwaCo3v0OKMI7Y6SM1pBtyijnLtAL0HDi41pf41ug==", + "fastfile": { + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/fastfile/-/fastfile-0.0.18.tgz", + "integrity": "sha512-q03PTKc+wptis4WmuFOwPNQx2p5myFUrl/dMgRlW9mymc1Egyc14JPHgiGnWK+sJ0+dBl2Vwtfh5GfSQltYOpw==" + }, + "ffjavascript": { + "version": "0.2.22", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.22.tgz", + "integrity": "sha512-EsVqap2Txm17bKW0z/jXCX3M7rQ++nQUAJY8alWDpyhjRj90xjl6GLeVSKZQ8rOFDQ/SFFXcEB8w9X8Boxid+w==", "requires": { - "@babel/types": "^7.8.3", - "jsesc": "^2.5.1", - "lodash": "^4.17.13", - "source-map": "^0.5.0" + "big-integer": "^1.6.48", + "wasmcurves": "0.0.12", + "worker-threads": "^1.0.0" }, "dependencies": { - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + "wasmcurves": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/wasmcurves/-/wasmcurves-0.0.12.tgz", + "integrity": "sha512-1Jl9mkatyHSNj80ILjf85SZUNuZQBCkTjJlhzqHnZQXUmIimCIWkugaVaYNjozLs1Gun4h/keZe1MBeBN0sRpg==", + "requires": { + "big-integer": "^1.6.42", + "blakejs": "^1.1.0" + } } } }, - "@babel/helper-function-name": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", - "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", - "requires": { - "@babel/helper-get-function-arity": "^7.8.3", - "@babel/template": "^7.8.3", - "@babel/types": "^7.8.3" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", - "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", - "requires": { - "@babel/types": "^7.8.3" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", - "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", - "requires": { - "@babel/types": "^7.8.3" - } - }, - "@babel/helpers": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.8.3.tgz", - "integrity": "sha512-LmU3q9Pah/XyZU89QvBgGt+BCsTPoQa+73RxAQh8fb8qkDyIfeQnmgs+hvzhTCKTzqOyk7JTkS3MS1S8Mq5yrQ==", + "r1csfile": { + "version": "0.0.16", + "resolved": "https://registry.npmjs.org/r1csfile/-/r1csfile-0.0.16.tgz", + "integrity": "sha512-A2jRVWzGgmXeG2lVAc0H4suJmzt50it5UvBnycJgBCpMXM3tH/M6RguP7nvs6suY/yYnkN6jX6iTScSiDUF3FA==", "requires": { - "@babel/template": "^7.8.3", - "@babel/traverse": "^7.8.3", - "@babel/types": "^7.8.3" + "@iden3/bigarray": "0.0.2", + "fastfile": "0.0.18", + "ffjavascript": "0.2.22" } - }, - "@babel/highlight": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", - "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + } + } + }, + "circom_runtime": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/circom_runtime/-/circom_runtime-0.1.4.tgz", + "integrity": "sha512-sQWeEBD3o2jIdrKPf3VDu7DNfP+NfscYO/pxi73FE0qQW8TXTfwno8Grdl++h6OKWbzvWJdG5jQvS+WGKjpMOg==", + "requires": { + "ffjavascript": "0.2.10", + "fnv-plus": "^1.3.1" + } + }, + "circomlib": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/circomlib/-/circomlib-0.2.4.tgz", + "integrity": "sha512-5x1/kn+7MJaakdGdKRCDMSCVsioyhFgWYCf2dbbd9xMmnZkMFjJpKzsE0UxncprFjyU2A8sVB1eb5Gj0pMaQBg==", + "requires": { + "blake-hash": "^1.1.0", + "blake2b": "^2.1.3", + "circom": "0.5.21", + "ffjavascript": "0.1.0" + }, + "dependencies": { + "circom": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/circom/-/circom-0.5.21.tgz", + "integrity": "sha512-Om90wztN6Y4Gg5ks4n+iTKU/5bR1gkPyRPzEi5gtu0brbSqnKfAnYWp8d/U28h2353rj476I1KNArg/QVNzBaw==", "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" + "chai": "^4.2.0", + "circom_runtime": "0.1.4", + "fastfile": "0.0.12", + "ffiasm": "0.1.1", + "ffjavascript": "0.2.10", + "ffwasm": "0.0.7", + "fnv-plus": "^1.3.1", + "r1csfile": "0.0.14", + "tmp-promise": "^2.0.2", + "wasmbuilder": "0.0.10" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "ffjavascript": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.10.tgz", + "integrity": "sha512-GQI6gHYYG5/iD4Kt3VzezzK7fARJzP0zkc82V/+JAdjfeKBXhDSo5rpKFuK3cDcrdW0Fu2emuYNMEAuFqhEQvQ==", "requires": { - "has-flag": "^3.0.0" + "big-integer": "^1.6.48", + "wasmcurves": "0.0.5", + "worker-threads": "^1.0.0" } } } }, - "@babel/parser": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.3.tgz", - "integrity": "sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ==" - }, - "@babel/runtime": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.3.tgz", - "integrity": "sha512-fVHx1rzEmwB130VTkLnxR+HmxcTjGzH12LYQcFFoBwakMd3aOMD4OsRN7tGG/UOYE2ektgFrS8uACAoRk1CY0w==", + "ffjavascript": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.1.0.tgz", + "integrity": "sha512-dmKlUasSfvUcxBm8nCSKl2x7EFJsXA7OVP8XLFA03T2+6mAc3IiVLC2ambEVOcMOhyhl0vJfVZjM9f9d38D1rw==", "requires": { - "regenerator-runtime": "^0.13.2" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", - "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==" - } + "big-integer": "^1.6.48" } - }, - "@babel/template": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz", - "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==", + } + } + }, + "class-is": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", + "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==" + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/parser": "^7.8.3", - "@babel/types": "^7.8.3" + "is-descriptor": "^0.1.0" } + } + } + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==" + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true }, - "@babel/traverse": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.3.tgz", - "integrity": "sha512-we+a2lti+eEImHmEXp7bM9cTxGzxPmBiVJlLVD+FuuQMeeO7RaDbutbgeheDkw+Xe3mCfJHnGOWLswT74m2IPg==", + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.8.3", - "@babel/helper-function-name": "^7.8.3", - "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/parser": "^7.8.3", - "@babel/types": "^7.8.3", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.13" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "requires": { - "ms": "^2.1.1" - } - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" - } + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" } }, - "@babel/types": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", - "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - }, - "dependencies": { - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" - } + "ansi-regex": "^4.1.0" + } + } + } + }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=" + }, + "clone-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=" + }, + "clone-deep": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-0.2.4.tgz", + "integrity": "sha1-TnPdCen7lxzDhnDF3O2cGJZIHMY=", + "requires": { + "for-own": "^0.1.3", + "is-plain-object": "^2.0.1", + "kind-of": "^3.0.2", + "lazy-cache": "^1.0.3", + "shallow-clone": "^0.1.2" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" } }, - "@istanbuljs/load-nyc-config": { + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + } + } + }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "requires": { + "mimic-response": "^1.0.0" + } + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=" + }, + "cloneable-readable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", + "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", + "requires": { + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" + }, + "dependencies": { + "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.0.0.tgz", - "integrity": "sha512-ZR0rq/f/E4f4XcgnDvtMWXCUJpi8eO0rssVhmztsZqLIEFA9UUP9zmpE0VxlM+kv/E1ul2I876Fwil2ayptDVg==", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "requires": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==" - } + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, - "@istanbuljs/schema": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz", - "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==" + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, - "@samverschueren/stream-to-observable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz", - "integrity": "sha512-MI4Xx6LHs4Webyvi6EbspgyAb4D2Q2VtnCQ1blOJcoLS6mVa8lNN2rkIy1CVxfTUpoyIbCTkXES1rLXztFD1lg==", + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { - "any-observable": "^0.3.0" + "safe-buffer": "~5.1.0" } + } + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "command-exists": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", + "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", + "dev": true + }, + "common-config": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/common-config/-/common-config-0.1.1.tgz", + "integrity": "sha512-mDp+nqoFbYsHKZfjg8OSb0CYfdPkuoGTMCVKy4ceYHR0EACTLV/qG8Q4cih2c/0IleQ7SISiqWqLMLXXZnJ2FA==", + "requires": { + "composer": "^0.13.0", + "data-store": "^0.16.1", + "get-value": "^2.0.6", + "lazy-cache": "^2.0.1", + "log-utils": "^0.2.0", + "object.pick": "^1.1.2", + "omit-empty": "^0.4.1", + "question-cache": "^0.4.0", + "set-value": "^3.0.1", + "strip-color": "^0.1.0", + "tableize-object": "^0.1.0", + "text-table": "^0.2.0", + "yargs-parser": "^2.4.0" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" }, - "@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==" + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" }, - "@szmarczak/http-timer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { - "defer-to-connect": "^1.0.1" + "ms": "2.0.0" } }, - "@types/bignumber.js": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@types/bignumber.js/-/bignumber.js-5.0.0.tgz", - "integrity": "sha512-0DH7aPGCClywOFaxxjE6UwpN2kQYe9LwuDQMv+zYA97j5GkOMo8e66LYT+a8JYU7jfmUFRZLa9KycxHDsKXJCA==", + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "bignumber.js": "*" + "is-descriptor": "^0.1.0" } }, - "@types/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "@types/node": "*" + "is-extendable": "^0.1.0" } }, - "@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + } }, - "@types/node": { - "version": "13.5.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.5.2.tgz", - "integrity": "sha512-Fr6a47c84PRLfd7M7u3/hEknyUdQrrBA6VoPmkze0tcflhU5UnpWEX2kn12ktA/lb+MNHSqFlSiPHIHsaErTPA==" + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" }, - "@types/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, - "@types/web3": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/web3/-/web3-1.2.2.tgz", - "integrity": "sha512-eFiYJKggNrOl0nsD+9cMh2MLk4zVBfXfGnVeRFbpiZzBE20eet4KLA3fXcjSuHaBn0RnQzwLAGdgzgzdet4C0A==", + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", "requires": { - "web3": "*" + "isarray": "1.0.0" } }, - "@web3-js/scrypt-shim": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@web3-js/scrypt-shim/-/scrypt-shim-0.1.0.tgz", - "integrity": "sha512-ZtZeWCc/s0nMcdx/+rZwY1EcuRdemOK9ag21ty9UsHkFxsNb/AaoucUz0iPuyGe0Ku+PFuRmWZG7Z7462p9xPw==", - "requires": { - "scryptsy": "^2.1.0", - "semver": "^6.3.0" - }, - "dependencies": { - "scryptsy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz", - "integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==" - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - } - } + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, - "@web3-js/websocket": { - "version": "1.0.30", - "resolved": "https://registry.npmjs.org/@web3-js/websocket/-/websocket-1.0.30.tgz", - "integrity": "sha512-fDwrD47MiDrzcJdSeTLF75aCcxVVt8B1N74rA+vh2XCAvFy4tEWJjtnUtj2QG7/zlQ6g9cQ88bZFBxwd9/FmtA==", + "question-cache": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/question-cache/-/question-cache-0.4.0.tgz", + "integrity": "sha1-4rmTf8X7fcYPu58QXx+iVLM96n0=", "requires": { + "arr-flatten": "^1.0.1", + "arr-union": "^3.1.0", + "async": "1.5.2", "debug": "^2.2.0", - "es5-ext": "^0.10.50", - "nan": "^2.14.0", - "typedarray-to-buffer": "^3.1.5", - "yaeti": "^0.0.6" + "define-property": "^0.2.5", + "get-value": "^2.0.5", + "has-value": "^0.3.1", + "inquirer2": "^0.1.1", + "is-answer": "^0.1.0", + "isobject": "^2.0.0", + "lazy-cache": "^1.0.3", + "mixin-deep": "^1.1.3", + "omit-empty": "^0.3.6", + "option-cache": "^3.3.5", + "os-homedir": "^1.0.1", + "project-name": "^0.2.4", + "set-value": "^0.3.3", + "to-choices": "^0.2.0", + "use": "^1.1.2" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + }, + "omit-empty": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/omit-empty/-/omit-empty-0.3.6.tgz", + "integrity": "sha1-bThAXyqmHJEetQT+aIBcVm2FwxY=", "requires": { - "ms": "2.0.0" + "has-values": "^0.1.4", + "is-date-object": "^1.0.1", + "isobject": "^2.0.0", + "reduce-object": "^0.1.3" } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" + "set-value": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.3.3.tgz", + "integrity": "sha1-uBIjaBY4oQiP2IpDW4qdMtro2bo=", + "requires": { + "extend-shallow": "^2.0.1", + "isobject": "^2.0.0", + "to-object-path": "^0.2.0" + } } } }, - "@webassemblyjs/ast": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.8.5.tgz", - "integrity": "sha512-aJMfngIZ65+t71C3y2nBBg5FFG0Okt9m0XEgWZ7Ywgn1oMAT8cNwx00Uv1cQyHtidq0Xn94R4TAywO+LCQ+ZAQ==", + "set-value": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-3.0.2.tgz", + "integrity": "sha512-npjkVoz+ank0zjlV9F47Fdbjfj/PfXyVhZvGALWsyIYU/qrMzpi6avjKW3/7KeSU2Df3I46BrN1xOI1+6vW0hA==", "requires": { - "@webassemblyjs/helper-module-context": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/wast-parser": "1.8.5" + "is-plain-object": "^2.0.4" } }, - "@webassemblyjs/floating-point-hex-parser": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.8.5.tgz", - "integrity": "sha512-9p+79WHru1oqBh9ewP9zW95E3XAo+90oth7S5Re3eQnECGq59ly1Ri5tsIipKGpiStHsUYmY3zMLqtk3gTcOtQ==" - }, - "@webassemblyjs/helper-api-error": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.8.5.tgz", - "integrity": "sha512-Za/tnzsvnqdaSPOUXHyKJ2XI7PDX64kWtURyGiJJZKVEdFOsdKUCPTNEVFZq3zJ2R0G5wc2PZ5gvdTRFgm81zA==" - }, - "@webassemblyjs/helper-buffer": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.8.5.tgz", - "integrity": "sha512-Ri2R8nOS0U6G49Q86goFIPNgjyl6+oE1abW1pS84BuhP1Qcr5JqMwRFT3Ah3ADDDYGEgGs1iyb1DGX+kAi/c/Q==" - }, - "@webassemblyjs/helper-code-frame": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.8.5.tgz", - "integrity": "sha512-VQAadSubZIhNpH46IR3yWO4kZZjMxN1opDrzePLdVKAZ+DFjkGD/rf4v1jap744uPVU6yjL/smZbRIIJTOUnKQ==", + "to-object-path": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.2.0.tgz", + "integrity": "sha1-FjThtSqIugDjlJYZ/ACB3Jo7B8o=", "requires": { - "@webassemblyjs/wast-printer": "1.8.5" + "arr-flatten": "^1.0.1", + "is-arguments": "^1.0.2" } }, - "@webassemblyjs/helper-fsm": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.8.5.tgz", - "integrity": "sha512-kRuX/saORcg8se/ft6Q2UbRpZwP4y7YrWsLXPbbmtepKr22i8Z4O3V5QE9DbZK908dh5Xya4Un57SDIKwB9eow==" - }, - "@webassemblyjs/helper-module-context": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.8.5.tgz", - "integrity": "sha512-/O1B236mN7UNEU4t9X7Pj38i4VoU8CcMHyy3l2cV/kIF4U5KoHXDVqcDuOs1ltkac90IM4vZdHc52t1x8Yfs3g==", + "use": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/use/-/use-1.1.2.tgz", + "integrity": "sha1-bjgy/rholXNJSsanrLX++zd7LNE=", "requires": { - "@webassemblyjs/ast": "1.8.5", - "mamacro": "^0.0.3" + "define-property": "^0.2.5", + "isobject": "^2.0.0" } }, - "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.8.5.tgz", - "integrity": "sha512-Cu4YMYG3Ddl72CbmpjU/wbP6SACcOPVbHN1dI4VJNJVgFwaKf1ppeFJrwydOG3NDHxVGuCfPlLZNyEdIYlQ6QQ==" - }, - "@webassemblyjs/helper-wasm-section": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.8.5.tgz", - "integrity": "sha512-VV083zwR+VTrIWWtgIUpqfvVdK4ff38loRmrdDBgBT8ADXYsEZ5mPQ4Nde90N3UYatHdYoDIFb7oHzMncI02tA==", + "yargs-parser": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-buffer": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/wasm-gen": "1.8.5" + "camelcase": "^3.0.0", + "lodash.assign": "^4.0.6" } - }, - "@webassemblyjs/ieee754": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.8.5.tgz", - "integrity": "sha512-aaCvQYrvKbY/n6wKHb/ylAJr27GglahUO89CcGXMItrOBqRarUMxWLJgxm9PJNuKULwN5n1csT9bYoMeZOGF3g==", + } + } + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" + }, + "composer": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/composer/-/composer-0.13.0.tgz", + "integrity": "sha1-HbyxXxmpBt7uSanD0TfmVLvG0OI=", + "requires": { + "array-unique": "^0.2.1", + "bach": "^0.5.0", + "co": "^4.6.0", + "component-emitter": "^1.2.1", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "is-generator": "^1.0.3", + "is-glob": "^2.0.1", + "isobject": "^2.1.0", + "lazy-cache": "^2.0.1", + "micromatch": "^2.3.8", + "nanoseconds": "^0.1.0" + }, + "dependencies": { + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "requires": { - "@xtuc/ieee754": "^1.2.0" + "arr-flatten": "^1.0.1" } }, - "@webassemblyjs/leb128": { + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" + }, + "braces": { "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.8.5.tgz", - "integrity": "sha512-plYUuUwleLIziknvlP8VpTgO4kqNaH57Y3JnNa6DLpu/sGcP6hbVdfdX5aHAV716pQBKrfuU26BJK29qY37J7A==", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", "requires": { - "@xtuc/long": "4.2.2" + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" } }, - "@webassemblyjs/utf8": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.8.5.tgz", - "integrity": "sha512-U7zgftmQriw37tfD934UNInokz6yTmn29inT2cAetAsaU9YeVCveWEwhKL1Mg4yS7q//NGdzy79nlXh3bT8Kjw==" - }, - "@webassemblyjs/wasm-edit": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.8.5.tgz", - "integrity": "sha512-A41EMy8MWw5yvqj7MQzkDjU29K7UJq1VrX2vWLzfpRHt3ISftOXqrtojn7nlPsZ9Ijhp5NwuODuycSvfAO/26Q==", - "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-buffer": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/helper-wasm-section": "1.8.5", - "@webassemblyjs/wasm-gen": "1.8.5", - "@webassemblyjs/wasm-opt": "1.8.5", - "@webassemblyjs/wasm-parser": "1.8.5", - "@webassemblyjs/wast-printer": "1.8.5" - } - }, - "@webassemblyjs/wasm-gen": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.8.5.tgz", - "integrity": "sha512-BCZBT0LURC0CXDzj5FXSc2FPTsxwp3nWcqXQdOZE4U7h7i8FqtFK5Egia6f9raQLpEKT1VL7zr4r3+QX6zArWg==", - "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/ieee754": "1.8.5", - "@webassemblyjs/leb128": "1.8.5", - "@webassemblyjs/utf8": "1.8.5" - } - }, - "@webassemblyjs/wasm-opt": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.8.5.tgz", - "integrity": "sha512-HKo2mO/Uh9A6ojzu7cjslGaHaUU14LdLbGEKqTR7PBKwT6LdPtLLh9fPY33rmr5wcOMrsWDbbdCHq4hQUdd37Q==", - "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-buffer": "1.8.5", - "@webassemblyjs/wasm-gen": "1.8.5", - "@webassemblyjs/wasm-parser": "1.8.5" - } - }, - "@webassemblyjs/wasm-parser": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.8.5.tgz", - "integrity": "sha512-pi0SYE9T6tfcMkthwcgCpL0cM9nRYr6/6fjgDtL6q/ZqKHdMWvxitRi5JcZ7RI4SNJJYnYNaWy5UUrHQy998lw==", - "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-api-error": "1.8.5", - "@webassemblyjs/helper-wasm-bytecode": "1.8.5", - "@webassemblyjs/ieee754": "1.8.5", - "@webassemblyjs/leb128": "1.8.5", - "@webassemblyjs/utf8": "1.8.5" - } - }, - "@webassemblyjs/wast-parser": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.8.5.tgz", - "integrity": "sha512-daXC1FyKWHF1i11obK086QRlsMsY4+tIOKgBqI1lxAnkp9xe9YMcgOxm9kLe+ttjs5aWV2KKE1TWJCN57/Btsg==", - "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/floating-point-hex-parser": "1.8.5", - "@webassemblyjs/helper-api-error": "1.8.5", - "@webassemblyjs/helper-code-frame": "1.8.5", - "@webassemblyjs/helper-fsm": "1.8.5", - "@xtuc/long": "4.2.2" - } - }, - "@webassemblyjs/wast-printer": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.8.5.tgz", - "integrity": "sha512-w0U0pD4EhlnvRyeJzBqaVSJAo9w/ce7/WPogeXLzGkO6hzhr4GnQIZ4W4uUt5b9ooAaXPtnXlj0gzsXEOUNYMg==", - "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/wast-parser": "1.8.5", - "@xtuc/long": "4.2.2" - } - }, - "@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==" - }, - "@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" - }, - "abstract-leveldown": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-3.0.0.tgz", - "integrity": "sha512-KUWx9UWGQD12zsmLNj64/pndaz4iJh/Pj7nopgkfDG6RlCcbMZvT6+9l7dchK4idog2Is8VdC/PvNbFuFmalIQ==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - }, - "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", - "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - } - }, - "acorn": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", - "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==" - }, - "acorn-jsx": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz", - "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==" - }, - "aes-js": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", - "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==", - "dev": true, - "optional": true - }, - "aggregate-error": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", - "integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==", - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "dependencies": { - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==" - } - } - }, - "ajv": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.11.0.tgz", - "integrity": "sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-errors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", - "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==" - }, - "ajv-keywords": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz", - "integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==" - }, - "ansi-colors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", - "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", - "dev": true, - "requires": { - "ansi-wrap": "^0.1.0" - } - }, - "ansi-escapes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.0.tgz", - "integrity": "sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==", - "requires": { - "type-fest": "^0.8.1" - } - }, - "ansi-gray": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", - "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", - "dev": true, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "ansi-wrap": "0.1.0" + "is-descriptor": "^0.1.0" } }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "ansi-wrap": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", - "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", - "dev": true - }, - "any-observable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/any-observable/-/any-observable-0.3.0.tgz", - "integrity": "sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog==" - }, - "any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=" - }, - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" + "is-posix-bracket": "^0.1.0" } }, - "append-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", - "integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=", - "dev": true, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "buffer-equal": "^1.0.0" + "is-extendable": "^0.1.0" } }, - "append-transform": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", - "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", "requires": { - "default-require-extensions": "^3.0.0" + "is-extglob": "^1.0.0" } }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, - "archy": { + "is-extglob": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=" - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" - }, - "arr-filter": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz", - "integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=", - "dev": true, - "requires": { - "make-iterator": "^1.0.0" - } - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" - }, - "arr-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz", - "integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=", - "dev": true, - "requires": { - "make-iterator": "^1.0.0" - } - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" - }, - "array-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", - "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", - "dev": true - }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" - }, - "array-includes": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz", - "integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==", - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0", - "is-string": "^1.0.5" - } + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" }, - "array-initial": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", - "integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U=", - "dev": true, - "requires": { - "array-slice": "^1.0.0", - "is-number": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - } - } - }, - "array-last": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/array-last/-/array-last-1.3.0.tgz", - "integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==", - "dev": true, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "requires": { - "is-number": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - } + "is-extglob": "^1.0.0" } }, - "array-slice": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", - "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", - "dev": true - }, - "array-sort": { + "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz", - "integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==", - "dev": true, - "requires": { - "default-compare": "^1.0.0", - "get-value": "^2.0.6", - "kind-of": "^5.0.2" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" - }, - "array.prototype.flat": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz", - "integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==", - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - } - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, - "assert": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", - "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", "requires": { - "object-assign": "^4.1.1", - "util": "0.10.3" + "isarray": "1.0.0" } }, - "assert-match": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/assert-match/-/assert-match-1.1.1.tgz", - "integrity": "sha512-c0QY2kpYVrH/jis6cCq9Mnt4/bIdGALDh1N8HY9ZARZedsMs5LSbgywxkjd5A1uNVLN0L8evANxBPxKiabVoZw==", + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "assert": "^1.4.1", - "babel-runtime": "^6.23.0", - "es-to-primitive": "^1.1.1", - "lodash.merge": "^4.6.0" + "is-buffer": "^1.1.5" } }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" - }, - "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==" - }, - "async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", - "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", - "requires": { - "lodash": "^4.17.11" + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" } }, - "async-done": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz", - "integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==", - "dev": true, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.2", - "process-nextick-args": "^2.0.0", - "stream-exhaust": "^1.0.1" + "remove-trailing-separator": "^1.0.1" } - }, - "async-each": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", - "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==" - }, - "async-eventemitter": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz", - "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==", - "dev": true, + } + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "config": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/config/-/config-3.3.1.tgz", + "integrity": "sha512-+2/KaaaAzdwUBE3jgZON11L1ggLLhpf2FsGrfqYFHZW22ySGv/HqYIXrBwKKvn+XZh1UBUjHwAcrfsSkSygT+Q==", + "requires": { + "json5": "^2.1.1" + } + }, + "contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=" + }, + "content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "requires": { + "safe-buffer": "5.1.2" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "content-hash": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/content-hash/-/content-hash-2.5.2.tgz", + "integrity": "sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==", + "requires": { + "cids": "^0.7.1", + "multicodec": "^0.5.5", + "multihashes": "^0.4.15" + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "requires": { + "safe-buffer": "~5.1.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "cookiejar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==" + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" + }, + "copy-task": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/copy-task/-/copy-task-0.1.0.tgz", + "integrity": "sha1-TDT+muVPKq9gntMvhbj3l6H0arY=" + }, + "core-js-pure": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.5.tgz", + "integrity": "sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA==", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, + "create-ecdh": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "cwd": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/cwd/-/cwd-0.9.1.tgz", + "integrity": "sha1-QeEKfhq4M9xZwuyoOBTH3ne1pP0=", + "requires": { + "find-pkg": "^0.1.0" + } + }, + "cycle": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", + "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=" + }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "data-store": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/data-store/-/data-store-0.16.1.tgz", + "integrity": "sha1-5pwDpcrBXR/zPwJUyWeDZT5ogwQ=", + "requires": { + "cache-base": "^0.8.4", + "clone-deep": "^0.2.4", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "graceful-fs": "^4.1.4", + "has-own-deep": "^0.1.4", + "lazy-cache": "^2.0.1", + "mkdirp": "^0.5.1", + "project-name": "^0.2.5", + "resolve-dir": "^0.1.0", + "rimraf": "^2.5.3", + "union-value": "^0.2.3" + }, + "dependencies": { + "cache-base": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-0.8.5.tgz", + "integrity": "sha1-YM6zUEAh7O7HAR/TOEt/TpVym/o=", "requires": { - "async": "^2.4.0" + "collection-visit": "^0.2.1", + "component-emitter": "^1.2.1", + "get-value": "^2.0.5", + "has-value": "^0.3.1", + "isobject": "^3.0.0", + "lazy-cache": "^2.0.1", + "set-value": "^0.4.2", + "to-object-path": "^0.3.0", + "union-value": "^0.2.3", + "unset-value": "^0.1.1" } }, - "async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" - }, - "async-settle": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz", - "integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs=", - "dev": true, + "collection-visit": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-0.2.3.tgz", + "integrity": "sha1-L2JIPK7MlfCDuaRUo+6eYTmteVc=", "requires": { - "async-done": "^1.2.2" + "lazy-cache": "^2.0.1", + "map-visit": "^0.1.5", + "object-visit": "^0.3.4" } }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" - }, - "aws4": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz", - "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==" + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "dev": true, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" + "is-descriptor": "^0.1.0" } }, - "babel-core": { - "version": "6.26.3", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", - "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", - "dev": true, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.1", - "debug": "^2.6.9", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.8", - "slash": "^1.0.0", - "source-map": "^0.5.7" + "is-extendable": "^0.1.0" + } + }, + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", "requires": { - "ms": "2.0.0" + "isarray": "1.0.0" } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true } } }, - "babel-generator": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", - "dev": true, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "map-visit": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-0.1.5.tgz", + "integrity": "sha1-2+Q5J85VJbgN/BVzpE1oxR8mgWs=", "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" + "lazy-cache": "^2.0.1", + "object-visit": "^0.3.4" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "object-visit": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-0.3.4.tgz", + "integrity": "sha1-rhXPhvCy/dVRdxY2RIRSxUw9qCk=", + "requires": { + "isobject": "^2.0.0" }, "dependencies": { - "jsesc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } } } }, - "babel-helper-builder-binary-assignment-operator-visitor": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", - "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", - "dev": true, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", "requires": { - "babel-helper-explode-assignable-expression": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" } }, - "babel-helper-call-delegate": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", - "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", - "dev": true, + "union-value": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-0.2.4.tgz", + "integrity": "sha1-c3UVJ4ZnkFfns3qmdug0aPwCdPA=", "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" } }, - "babel-helper-define-map": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", - "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", - "dev": true, + "unset-value": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-0.1.2.tgz", + "integrity": "sha1-UGgQuGfyfCpabpsEgzYx9t5Y0xA=", "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" + "has-value": "^0.3.1", + "isobject": "^3.0.0" } - }, - "babel-helper-explode-assignable-expression": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", - "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", + } + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "requires": { + "ms": "^2.1.1" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "requires": { + "mimic-response": "^1.0.0" + } + }, + "deep-bind": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/deep-bind/-/deep-bind-0.3.0.tgz", + "integrity": "sha1-lcMd2Eoc0bOBEZosQu25DbSFvDM=", + "requires": { + "mixin-deep": "^1.1.3" + } + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "requires": { + "type-detect": "^4.0.0" + } + }, + "deep-equal": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-0.2.2.tgz", + "integrity": "sha1-hLdFiW80xoTpjyzg5Cq69Du6AX0=" + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + }, + "default-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz", + "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==", + "requires": { + "kind-of": "^5.0.2" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "defaults-deep": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/defaults-deep/-/defaults-deep-0.2.4.tgz", + "integrity": "sha512-V6BtqzcMvn0EPOy7f+SfMhfmTawq+7UQdt9yZH0EBK89+IHo5f+Hse/qzTorAXOBrQpxpwb6cB/8OgtaMrT+Fg==", + "requires": { + "for-own": "^0.1.3", + "is-extendable": "^0.1.1", + "lazy-cache": "^0.2.3" + }, + "dependencies": { + "lazy-cache": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", + "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=" + } + } + }, + "defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==" + }, + "deferred-leveldown": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", + "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==", + "dev": true, + "requires": { + "abstract-leveldown": "~2.6.0" + } + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + }, + "dependencies": { + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + } + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "kind-of": "^6.0.0" } }, - "babel-helper-function-name": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", - "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "kind-of": "^6.0.0" } }, - "babel-helper-get-function-arity": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", - "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } - }, - "babel-helper-hoist-variables": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", - "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", - "dev": true, + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "delimiter-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/delimiter-regex/-/delimiter-regex-2.0.0.tgz", + "integrity": "sha1-DQ9vYdmRVZH9Qwh6jpWF0+IRWnU=", + "requires": { + "extend-shallow": "^1.1.2", + "isobject": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "kind-of": "^1.1.0" } }, - "babel-helper-optimise-call-expression": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", - "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, - "babel-helper-regex": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", - "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", - "dev": true, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", "requires": { - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" + "isarray": "1.0.0" } }, - "babel-helper-remap-async-to-generator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", - "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", - "dev": true, + "kind-of": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=" + } + } + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "diff-sequences": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-24.9.0.tgz", + "integrity": "sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew==" + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "requires": { + "esutils": "^2.0.2" + } + }, + "dom-walk": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", + "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==" + }, + "drbg.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", + "integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=", + "requires": { + "browserify-aes": "^1.0.6", + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4" + } + }, + "duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==" + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" + }, + "duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, - "babel-helper-replace-supers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", - "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", - "dev": true, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { - "babel-helper-optimise-call-expression": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "safe-buffer": "~5.1.0" } - }, - "babel-helpers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", - "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", - "dev": true, + } + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "ejs": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.5.tgz", + "integrity": "sha512-dldq3ZfFtgVTJMLjOe+/3sROTzALlL9E34V4/sDtUd/KlBSS0s6U1/+WPE1B4sj9CXHJpL1M6rhNJnc9Wbal9w==", + "requires": { + "jake": "^10.6.1" + } + }, + "elliptic": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + }, + "empty-dir": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/empty-dir/-/empty-dir-0.2.1.tgz", + "integrity": "sha1-gJ7kih60rRy1EMJXLWb9DthNAas=", + "requires": { + "fs-exists-sync": "^0.1.0" + } + }, + "en-route": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/en-route/-/en-route-0.7.5.tgz", + "integrity": "sha1-6CMOc4NsXpXGdX4EQtPBExJL3Zg=", + "requires": { + "arr-flatten": "^1.0.1", + "debug": "^2.2.0", + "extend-shallow": "^2.0.1", + "kind-of": "^3.0.2", + "lazy-cache": "^1.0.3", + "path-to-regexp": "^1.2.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "ms": "2.0.0" } }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", - "dev": true, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "babel-runtime": "^6.22.0" + "is-extendable": "^0.1.0" } }, - "babel-plugin-check-es2015-constants": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", - "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", - "dev": true, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "babel-runtime": "^6.22.0" + "is-buffer": "^1.1.5" } }, - "babel-plugin-syntax-async-functions": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", - "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=", - "dev": true - }, - "babel-plugin-syntax-exponentiation-operator": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", - "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", - "dev": true - }, - "babel-plugin-syntax-trailing-function-commas": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", - "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=", - "dev": true + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" }, - "babel-plugin-transform-async-to-generator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", - "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", - "dev": true, - "requires": { - "babel-helper-remap-async-to-generator": "^6.24.1", - "babel-plugin-syntax-async-functions": "^6.8.0", - "babel-runtime": "^6.22.0" - } + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, - "babel-plugin-transform-es2015-arrow-functions": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", - "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", - "dev": true, + "path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", "requires": { - "babel-runtime": "^6.22.0" + "isarray": "0.0.1" } - }, - "babel-plugin-transform-es2015-block-scoped-functions": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", - "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", + } + } + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "encoding-down": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/encoding-down/-/encoding-down-5.0.4.tgz", + "integrity": "sha512-8CIZLDcSKxgzT+zX8ZVfgNbu8Md2wq/iqa1Y7zyVR18QBEAc0Nmzuvj/N5ykSKpfGzjM8qxbaFntLPwnVoUhZw==", + "dev": true, + "requires": { + "abstract-leveldown": "^5.0.0", + "inherits": "^2.0.3", + "level-codec": "^9.0.0", + "level-errors": "^2.0.0", + "xtend": "^4.0.1" + }, + "dependencies": { + "abstract-leveldown": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz", + "integrity": "sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A==", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "xtend": "~4.0.0" } }, - "babel-plugin-transform-es2015-block-scoping": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", - "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", + "level-codec": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-9.0.2.tgz", + "integrity": "sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ==", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" + "buffer": "^5.6.0" } }, - "babel-plugin-transform-es2015-classes": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", - "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", + "level-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", + "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==", "dev": true, "requires": { - "babel-helper-define-map": "^6.24.1", - "babel-helper-function-name": "^6.24.1", - "babel-helper-optimise-call-expression": "^6.24.1", - "babel-helper-replace-supers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "errno": "~0.1.1" } }, - "babel-plugin-transform-es2015-computed-properties": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", - "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", - "dev": true, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + } + } + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "requires": { + "once": "^1.4.0" + } + }, + "engine": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/engine/-/engine-0.1.12.tgz", + "integrity": "sha1-+H6MkLuAzT9YWXrFaVk+5G2idC0=", + "requires": { + "assign-deep": "^0.4.3", + "collection-visit": "^0.2.0", + "get-value": "^1.2.1", + "kind-of": "^2.0.1", + "lazy-cache": "^0.2.3", + "object.omit": "^2.0.0", + "set-value": "^0.2.0" + }, + "dependencies": { + "collection-visit": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-0.2.3.tgz", + "integrity": "sha1-L2JIPK7MlfCDuaRUo+6eYTmteVc=", "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "lazy-cache": "^2.0.1", + "map-visit": "^0.1.5", + "object-visit": "^0.3.4" + }, + "dependencies": { + "lazy-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", + "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", + "requires": { + "set-getter": "^0.1.0" + } + } } }, - "babel-plugin-transform-es2015-destructuring": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", - "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", - "dev": true, + "get-value": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-1.3.1.tgz", + "integrity": "sha1-isfvTyA4I5KyZGVI+bmtLcbIlkI=", "requires": { - "babel-runtime": "^6.22.0" + "arr-flatten": "^1.0.1", + "is-extendable": "^0.1.1", + "lazy-cache": "^0.2.4", + "noncharacters": "^1.1.0" } }, - "babel-plugin-transform-es2015-duplicate-keys": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", - "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, - "babel-plugin-transform-es2015-for-of": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", - "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, - "babel-plugin-transform-es2015-function-name": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", - "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", - "dev": true, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "isarray": "1.0.0" } }, - "babel-plugin-transform-es2015-literals": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", - "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", - "dev": true, + "kind-of": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz", + "integrity": "sha1-AY7HpM5+OobLkUG+UZ0kyPqpgbU=", "requires": { - "babel-runtime": "^6.22.0" + "is-buffer": "^1.0.2" } }, - "babel-plugin-transform-es2015-modules-amd": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", - "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", - "dev": true, - "requires": { - "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } + "lazy-cache": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", + "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=" }, - "babel-plugin-transform-es2015-modules-commonjs": { - "version": "6.26.2", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", - "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", - "dev": true, + "map-visit": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-0.1.5.tgz", + "integrity": "sha1-2+Q5J85VJbgN/BVzpE1oxR8mgWs=", "requires": { - "babel-plugin-transform-strict-mode": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-types": "^6.26.0" + "lazy-cache": "^2.0.1", + "object-visit": "^0.3.4" + }, + "dependencies": { + "lazy-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", + "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", + "requires": { + "set-getter": "^0.1.0" + } + } } }, - "babel-plugin-transform-es2015-modules-systemjs": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", - "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", - "dev": true, + "object-visit": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-0.3.4.tgz", + "integrity": "sha1-rhXPhvCy/dVRdxY2RIRSxUw9qCk=", "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "isobject": "^2.0.0" } }, - "babel-plugin-transform-es2015-modules-umd": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", - "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", - "dev": true, + "set-value": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.2.0.tgz", + "integrity": "sha1-c7CmglwVjGoWqCu9yVd1vyqCX6s=", "requires": { - "babel-plugin-transform-es2015-modules-amd": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "isobject": "^1.0.0", + "noncharacters": "^1.1.0" + }, + "dependencies": { + "isobject": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-1.0.2.tgz", + "integrity": "sha1-8Pm4zpLdVA+gdAiC44NaLgIux4o=" + } } - }, - "babel-plugin-transform-es2015-object-super": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", - "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", - "dev": true, + } + } + }, + "engine-base": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/engine-base/-/engine-base-0.1.3.tgz", + "integrity": "sha1-1ZycxS591t0rSa579ftEmU9wFqU=", + "requires": { + "component-emitter": "^1.2.1", + "delimiter-regex": "^2.0.0", + "engine": "^0.1.12", + "engine-utils": "^0.1.1", + "lazy-cache": "^2.0.2", + "mixin-deep": "^1.1.3", + "object.omit": "^2.0.1", + "object.pick": "^1.2.0" + } + }, + "engine-cache": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/engine-cache/-/engine-cache-0.19.4.tgz", + "integrity": "sha1-giSWb732pl54Dsed+HtrLLgjlbI=", + "requires": { + "async-helpers": "^0.3.9", + "extend-shallow": "^2.0.1", + "helper-cache": "^0.7.2", + "isobject": "^3.0.0", + "lazy-cache": "^2.0.2", + "mixin-deep": "^1.1.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "babel-helper-replace-supers": "^6.24.1", - "babel-runtime": "^6.22.0" + "is-extendable": "^0.1.0" } - }, - "babel-plugin-transform-es2015-parameters": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", - "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", - "dev": true, - "requires": { - "babel-helper-call-delegate": "^6.24.1", - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-shorthand-properties": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", - "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-spread": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", - "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", + } + } + }, + "engine-utils": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/engine-utils/-/engine-utils-0.1.1.tgz", + "integrity": "sha1-rd9HCN2FoFoyF6l3l+q4oBPE+A4=" + }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, + "env-paths": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.0.tgz", + "integrity": "sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==", + "dev": true + }, + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "dev": true, + "requires": { + "prr": "~1.0.1" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "error-symbol": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/error-symbol/-/error-symbol-0.1.0.tgz", + "integrity": "sha1-Ck2uN9YA0VopukU9jvkg8YRDM/Y=" + }, + "es-abstract": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", + "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + }, + "dependencies": { + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + } + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "es5-ext": { + "version": "0.10.53", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.3", + "next-tick": "~1.0.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "eslint": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", + "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.9.1", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^4.0.3", + "eslint-utils": "^1.3.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^5.0.1", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.7.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^6.2.2", + "js-yaml": "^3.13.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.11", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^5.5.1", + "strip-ansi": "^4.0.0", + "strip-json-comments": "^2.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" + }, + "espree": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "requires": { + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "esquery": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", + "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" + } + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "eth-ens-namehash": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", + "integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=", + "requires": { + "idna-uts46-hx": "^2.3.1", + "js-sha3": "^0.5.7" + }, + "dependencies": { + "js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + } + } + }, + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, + "eth-sig-util": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-2.5.3.tgz", + "integrity": "sha512-KpXbCKmmBUNUTGh9MRKmNkIPietfhzBqqYqysDavLseIiMUGl95k6UcPEkALAZlj41e9E6yioYXc1PC333RKqw==", + "dev": true, + "requires": { + "buffer": "^5.2.1", + "elliptic": "^6.4.0", + "ethereumjs-abi": "0.6.5", + "ethereumjs-util": "^5.1.1", + "tweetnacl": "^1.0.0", + "tweetnacl-util": "^0.15.0" + }, + "dependencies": { + "ethereumjs-abi": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz", + "integrity": "sha1-WmN+8Wq0NHP6cqKa2QhxQFs/UkE=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "bn.js": "^4.10.0", + "ethereumjs-util": "^4.3.0" + }, + "dependencies": { + "ethereumjs-util": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-4.5.1.tgz", + "integrity": "sha512-WrckOZ7uBnei4+AKimpuF1B3Fv25OmoRgmYCpGsP7u8PFxXAmAgiJSYT2kRWnt6fVIlKaQlZvuwXp7PIrmn3/w==", + "dev": true, + "requires": { + "bn.js": "^4.8.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "rlp": "^2.0.0" + } + } } }, - "babel-plugin-transform-es2015-sticky-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", - "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", "dev": true, "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" } + } + } + }, + "ethashjs": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/ethashjs/-/ethashjs-0.0.8.tgz", + "integrity": "sha512-/MSbf/r2/Ld8o0l15AymjOTlPqpN8Cr4ByUEA9GtR4x0yAh3TdtDzEg29zMjXCNPI7u6E5fOQdj/Cf9Tc7oVNw==", + "dev": true, + "requires": { + "async": "^2.1.2", + "buffer-xor": "^2.0.1", + "ethereumjs-util": "^7.0.2", + "miller-rabin": "^4.0.0" + }, + "dependencies": { + "bn.js": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", + "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==", + "dev": true }, - "babel-plugin-transform-es2015-template-literals": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", - "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", + "buffer-xor": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-2.0.2.tgz", + "integrity": "sha512-eHslX0bin3GB+Lx2p7lEYRShRewuNZL3fUl4qlVJGGiwoPGftmt8JQgk2Y9Ji5/01TnVDo33E5b5O3vUB1HdqQ==", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "safe-buffer": "^5.1.1" } }, - "babel-plugin-transform-es2015-typeof-symbol": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", - "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", + "ethereumjs-util": { + "version": "7.0.7", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.0.7.tgz", + "integrity": "sha512-vU5rtZBlZsgkTw3o6PDKyB8li2EgLavnAbsKcfsH2YhHH1Le+PP8vEiMnAnvgc1B6uMoaM5GDCrVztBw0Q5K9g==", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "@types/bn.js": "^4.11.3", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.4" } - }, - "babel-plugin-transform-es2015-unicode-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", - "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", + } + } + }, + "ethereum-bloom-filters": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.7.tgz", + "integrity": "sha512-cDcJJSJ9GMAcURiAWO3DxIEhTL/uWqlQnvgKpuYQzYPrt/izuGU+1ntQmHt0IRq6ADoSYHFnB+aCEFIldjhkMQ==", + "requires": { + "js-sha3": "^0.8.0" + }, + "dependencies": { + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + } + } + }, + "ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "requires": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + }, + "dependencies": { + "keccak": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz", + "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", "dev": true, "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "regexpu-core": "^2.0.0" + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" } }, - "babel-plugin-transform-exponentiation-operator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", - "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", + "secp256k1": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", + "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", "dev": true, "requires": { - "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", - "babel-plugin-syntax-exponentiation-operator": "^6.8.0", - "babel-runtime": "^6.22.0" + "elliptic": "^6.5.2", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" } - }, - "babel-plugin-transform-regenerator": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", - "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", + } + } + }, + "ethereum-waffle": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ethereum-waffle/-/ethereum-waffle-3.0.1.tgz", + "integrity": "sha512-FAAiN0VqNF9+yCPLPW9Rtq77dHcx9XwTGDe8s0nko34MeWKRX3EH258zwvmA29IhDmNMsRz7em6a7Zaw4g8hPw==", + "dev": true, + "requires": { + "@ethereum-waffle/chai": "^3.0.1", + "@ethereum-waffle/compiler": "^3.0.1", + "@ethereum-waffle/mock-contract": "^3.0.1", + "@ethereum-waffle/provider": "^3.0.1", + "ethers": "^5.0.1" + } + }, + "ethereumjs-abi": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", + "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", + "dev": true, + "requires": { + "bn.js": "^4.11.8", + "ethereumjs-util": "^6.0.0" + } + }, + "ethereumjs-account": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-3.0.0.tgz", + "integrity": "sha512-WP6BdscjiiPkQfF9PVfMcwx/rDvfZTjFKY0Uwc09zSQr9JfIVH87dYIJu0gNhBhpmovV4yq295fdllS925fnBA==", + "dev": true, + "requires": { + "ethereumjs-util": "^6.0.0", + "rlp": "^2.2.1", + "safe-buffer": "^5.1.1" + } + }, + "ethereumjs-block": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz", + "integrity": "sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg==", + "dev": true, + "requires": { + "async": "^2.0.1", + "ethereumjs-common": "^1.5.0", + "ethereumjs-tx": "^2.1.1", + "ethereumjs-util": "^5.0.0", + "merkle-patricia-tree": "^2.1.2" + }, + "dependencies": { + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", "dev": true, "requires": { - "regenerator-transform": "^0.10.0" + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" } }, - "babel-plugin-transform-strict-mode": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", - "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true }, - "babel-preset-env": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.7.0.tgz", - "integrity": "sha512-9OR2afuKDneX2/q2EurSftUYM0xGu4O2D9adAhVfADDhrYDaxXV0rBbevVYoY9n6nyX1PmQW/0jtpJvUNr9CHg==", + "merkle-patricia-tree": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz", + "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==", "dev": true, "requires": { - "babel-plugin-check-es2015-constants": "^6.22.0", - "babel-plugin-syntax-trailing-function-commas": "^6.22.0", - "babel-plugin-transform-async-to-generator": "^6.22.0", - "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoping": "^6.23.0", - "babel-plugin-transform-es2015-classes": "^6.23.0", - "babel-plugin-transform-es2015-computed-properties": "^6.22.0", - "babel-plugin-transform-es2015-destructuring": "^6.23.0", - "babel-plugin-transform-es2015-duplicate-keys": "^6.22.0", - "babel-plugin-transform-es2015-for-of": "^6.23.0", - "babel-plugin-transform-es2015-function-name": "^6.22.0", - "babel-plugin-transform-es2015-literals": "^6.22.0", - "babel-plugin-transform-es2015-modules-amd": "^6.22.0", - "babel-plugin-transform-es2015-modules-commonjs": "^6.23.0", - "babel-plugin-transform-es2015-modules-systemjs": "^6.23.0", - "babel-plugin-transform-es2015-modules-umd": "^6.23.0", - "babel-plugin-transform-es2015-object-super": "^6.22.0", - "babel-plugin-transform-es2015-parameters": "^6.23.0", - "babel-plugin-transform-es2015-shorthand-properties": "^6.22.0", - "babel-plugin-transform-es2015-spread": "^6.22.0", - "babel-plugin-transform-es2015-sticky-regex": "^6.22.0", - "babel-plugin-transform-es2015-template-literals": "^6.22.0", - "babel-plugin-transform-es2015-typeof-symbol": "^6.23.0", - "babel-plugin-transform-es2015-unicode-regex": "^6.22.0", - "babel-plugin-transform-exponentiation-operator": "^6.22.0", - "babel-plugin-transform-regenerator": "^6.22.0", - "browserslist": "^3.2.6", - "invariant": "^2.2.2", - "semver": "^5.3.0" + "async": "^1.4.2", + "ethereumjs-util": "^5.0.0", + "level-ws": "0.0.0", + "levelup": "^1.2.1", + "memdown": "^1.0.0", + "readable-stream": "^2.0.0", + "rlp": "^2.0.0", + "semaphore": ">=1.0.1" }, "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", "dev": true } } }, - "babel-register": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", - "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "dev": true, "requires": { - "babel-core": "^6.26.0", - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "home-or-tmp": "^2.0.0", - "lodash": "^4.17.4", - "mkdirp": "^0.5.1", - "source-map-support": "^0.4.15" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" }, "dependencies": { - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true - }, - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "dev": true, - "requires": { - "source-map": "^0.5.6" - } } } }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" + "safe-buffer": "~5.1.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + } + } + }, + "ethereumjs-blockchain": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/ethereumjs-blockchain/-/ethereumjs-blockchain-4.0.4.tgz", + "integrity": "sha512-zCxaRMUOzzjvX78DTGiKjA+4h2/sF0OYL1QuPux0DHpyq8XiNoF5GYHtb++GUxVlMsMfZV7AVyzbtgcRdIcEPQ==", + "dev": true, + "requires": { + "async": "^2.6.1", + "ethashjs": "~0.0.7", + "ethereumjs-block": "~2.2.2", + "ethereumjs-common": "^1.5.0", + "ethereumjs-util": "^6.1.0", + "flow-stoplight": "^1.0.0", + "level-mem": "^3.0.1", + "lru-cache": "^5.1.1", + "rlp": "^2.2.2", + "semaphore": "^1.1.0" + } + }, + "ethereumjs-common": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.1.tgz", + "integrity": "sha512-aVUPRLgmXORGXXEVkFYgPhr9TGtpBY2tGhZ9Uh0A3lIUzUDr1x6kQx33SbjPUkLkX3eniPQnIL/2psjkjrOfcQ==" + }, + "ethereumjs-tx": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", + "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", + "requires": { + "ethereumjs-common": "^1.5.0", + "ethereumjs-util": "^6.0.0" + } + }, + "ethereumjs-util": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz", + "integrity": "sha512-vb0XN9J2QGdZGIEKG2vXM+kUdEivUfU6Wmi5y0cg+LRhDYKnXIZ/Lz7XjFbHRR9VIKq2lVGLzGBkA++y2nOdOQ==", + "requires": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "ethjs-util": "0.1.6", + "keccak": "^2.0.0", + "rlp": "^2.2.3", + "secp256k1": "^3.0.1" + } + }, + "ethers": { + "version": "5.0.19", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.0.19.tgz", + "integrity": "sha512-0AZnUgZh98q888WAd1oI3aLeI+iyDtrupjANVtPPS7O63lVopkR/No8A1NqSkgl/rU+b2iuu2mUZor6GD4RG2w==", + "requires": { + "@ethersproject/abi": "5.0.7", + "@ethersproject/abstract-provider": "5.0.5", + "@ethersproject/abstract-signer": "5.0.7", + "@ethersproject/address": "5.0.5", + "@ethersproject/base64": "5.0.4", + "@ethersproject/basex": "5.0.4", + "@ethersproject/bignumber": "5.0.8", + "@ethersproject/bytes": "5.0.5", + "@ethersproject/constants": "5.0.5", + "@ethersproject/contracts": "5.0.5", + "@ethersproject/hash": "5.0.6", + "@ethersproject/hdnode": "5.0.5", + "@ethersproject/json-wallets": "5.0.7", + "@ethersproject/keccak256": "5.0.4", + "@ethersproject/logger": "5.0.6", + "@ethersproject/networks": "5.0.4", + "@ethersproject/pbkdf2": "5.0.4", + "@ethersproject/properties": "5.0.4", + "@ethersproject/providers": "5.0.14", + "@ethersproject/random": "5.0.4", + "@ethersproject/rlp": "5.0.4", + "@ethersproject/sha2": "5.0.4", + "@ethersproject/signing-key": "5.0.5", + "@ethersproject/solidity": "5.0.5", + "@ethersproject/strings": "5.0.5", + "@ethersproject/transactions": "5.0.6", + "@ethersproject/units": "5.0.6", + "@ethersproject/wallet": "5.0.7", + "@ethersproject/web": "5.0.9", + "@ethersproject/wordlists": "5.0.5" + }, + "dependencies": { + "@ethersproject/abi": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.7.tgz", + "integrity": "sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw==", + "requires": { + "@ethersproject/address": "^5.0.4", + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/constants": "^5.0.4", + "@ethersproject/hash": "^5.0.4", + "@ethersproject/keccak256": "^5.0.3", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.3", + "@ethersproject/strings": "^5.0.4" } }, - "babel-template": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", - "dev": true, + "@ethersproject/address": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.5.tgz", + "integrity": "sha512-DpkQ6rwk9jTefrRsJzEm6nhRiJd9pvhn1xN0rw5N/jswXG5r7BLk/GVA0mMAVWAsYfvi2xSc5L41FMox43RYEA==", "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/keccak256": "^5.0.3", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/rlp": "^5.0.3", + "bn.js": "^4.4.0" } }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", - "dev": true, + "@ethersproject/bignumber": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.8.tgz", + "integrity": "sha512-KXFVAFKS1jdTXYN8BE5Oj+ZfPMh28iRdFeNGBVT6cUFdtiPVqeXqc0ggvBqA3A1VoFFGgM7oAeaagA393aORHA==", "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/logger": "^5.0.5", + "bn.js": "^4.4.0" + } + }, + "@ethersproject/bytes": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.5.tgz", + "integrity": "sha512-IEj9HpZB+ACS6cZ+QQMTqmu/cnUK2fYNE6ms/PVxjoBjoxc6HCraLpam1KuRvreMy0i523PLmjN8OYeikRdcUQ==", + "requires": { + "@ethersproject/logger": "^5.0.5" + } + }, + "@ethersproject/constants": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.5.tgz", + "integrity": "sha512-foaQVmxp2+ik9FrLUCtVrLZCj4M3Ibgkqvh+Xw/vFRSerkjVSYePApaVE5essxhoSlF1U9oXfWY09QI2AXtgKA==", + "requires": { + "@ethersproject/bignumber": "^5.0.7" + } + }, + "@ethersproject/hash": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.6.tgz", + "integrity": "sha512-Gvh57v6BWhwnud6l7tMfQm32PRQ2DYx2WaAAQmAxAfYvmzUkpQCBstnGeNMXIL8/2wdkvcB2u+WZRWaZtsFuUQ==", + "requires": { + "@ethersproject/abstract-signer": "^5.0.6", + "@ethersproject/address": "^5.0.5", + "@ethersproject/bignumber": "^5.0.8", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/keccak256": "^5.0.3", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.4", + "@ethersproject/strings": "^5.0.4" } }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", - "dev": true, + "@ethersproject/keccak256": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.4.tgz", + "integrity": "sha512-GNpiOUm9PGUxFNqOxYKDQBM0u68bG9XC9iOulEQ8I0tOx/4qUpgVzvgXL6ugxr0RY554Gz/NQsVqknqPzUcxpQ==", "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" + "@ethersproject/bytes": "^5.0.4", + "js-sha3": "0.5.7" } }, - "babelify": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/babelify/-/babelify-7.3.0.tgz", - "integrity": "sha1-qlau3nBn/XvVSWZu4W3ChQh+iOU=", - "dev": true, + "@ethersproject/logger": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.6.tgz", + "integrity": "sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==" + }, + "@ethersproject/properties": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.4.tgz", + "integrity": "sha512-UdyX3GqBxFt15B0uSESdDNmhvEbK3ACdDXl2soshoPcneXuTswHDeA0LoPlnaZzhbgk4p6jqb4GMms5C26Qu6A==", "requires": { - "babel-core": "^6.0.14", - "object-assign": "^4.0.0" + "@ethersproject/logger": "^5.0.5" } }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true + "@ethersproject/rlp": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.4.tgz", + "integrity": "sha512-5qrrZad7VTjofxSsm7Zg/7Dr4ZOln4S2CqiDdOuTv6MBKnXj0CiBojXyuDy52M8O3wxH0CyE924hXWTDV1PQWQ==", + "requires": { + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/logger": "^5.0.5" + } }, - "bach": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz", - "integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA=", - "dev": true, + "@ethersproject/signing-key": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.5.tgz", + "integrity": "sha512-Z1wY7JC1HVO4CvQWY2TyTTuAr8xK3bJijZw1a9G92JEmKdv1j255R/0YLBBcFTl2J65LUjtXynNJ2GbArPGi5g==", "requires": { - "arr-filter": "^1.1.1", - "arr-flatten": "^1.0.1", - "arr-map": "^2.0.0", - "array-each": "^1.0.0", - "array-initial": "^1.0.0", - "array-last": "^1.1.1", - "async-done": "^1.2.2", - "async-settle": "^1.0.0", - "now-and-later": "^2.0.0" + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.3", + "elliptic": "6.5.3" } }, - "backoff": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/backoff/-/backoff-2.5.0.tgz", - "integrity": "sha1-9hbtqdPktmuMp/ynn2lXIsX44m8=", - "dev": true, + "@ethersproject/strings": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.5.tgz", + "integrity": "sha512-JED6WaIV00xM/gvj8vSnd+0VWtDYdidTmavFRCTQakqfz+4tDo6Jz5LHgG+dd45h7ah7ykCHW0C7ZXWEDROCXQ==", "requires": { - "precond": "0.2" + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/constants": "^5.0.4", + "@ethersproject/logger": "^5.0.5" } }, - "balanced-match": { + "@ethersproject/transactions": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.6.tgz", + "integrity": "sha512-htsFhOD+NMBxx676A8ehSuwVV49iqpSB+CkjPZ02tpNew0K6p8g0CZ46Z1ZP946gIHAU80xQ0NACHYrjIUaCFA==", + "requires": { + "@ethersproject/address": "^5.0.4", + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/constants": "^5.0.4", + "@ethersproject/keccak256": "^5.0.3", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.3", + "@ethersproject/rlp": "^5.0.3", + "@ethersproject/signing-key": "^5.0.4" + } + } + } + }, + "ethjs-unit": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", + "integrity": "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=", + "requires": { + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + } + } + }, + "ethjs-util": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "requires": { + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" + } + }, + "event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "dev": true + }, + "eventemitter3": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "dependencies": { + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "requires": { + "pump": "^3.0.0" + } + } + } + }, + "exit-hook": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", + "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=" + }, + "expand-args": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/expand-args/-/expand-args-0.4.3.tgz", + "integrity": "sha1-OoZiJBxYF1fIzTf7d2d6xgL/nZg=", + "requires": { + "expand-object": "^0.4.2", + "kind-of": "^3.0.3", + "lazy-cache": "^2.0.1", + "minimist": "^1.2.0", + "mixin-deep": "^1.1.3", + "omit-empty": "^0.4.1", + "set-value": "^0.3.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } + "isarray": "1.0.0" } }, - "base-x": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.7.tgz", - "integrity": "sha512-zAKJGuQPihXW22fkrfOclUUZXM2g92z5GzlSMHxhO6r6Qj+Nm0ccaGNBzDZojzwOMkpjAv4J0fOv1U4go+a4iw==", - "dev": true, - "optional": true, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "safe-buffer": "^5.0.1" + "is-buffer": "^1.1.5" } }, - "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" + "set-value": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.3.3.tgz", + "integrity": "sha1-uBIjaBY4oQiP2IpDW4qdMtro2bo=", + "requires": { + "extend-shallow": "^2.0.1", + "isobject": "^2.0.0", + "to-object-path": "^0.2.0" + } }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "to-object-path": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.2.0.tgz", + "integrity": "sha1-FjThtSqIugDjlJYZ/ACB3Jo7B8o=", "requires": { - "tweetnacl": "^0.14.3" - }, - "dependencies": { - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" - } + "arr-flatten": "^1.0.1", + "is-arguments": "^1.0.2" + } + } + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" } }, - "big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" - }, - "bignumber.js": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", - "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==" - }, - "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==" - }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, "requires": { - "file-uri-to-path": "1.0.0" + "is-descriptor": "^0.1.0" } }, - "bip39": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/bip39/-/bip39-2.5.0.tgz", - "integrity": "sha512-xwIx/8JKoT2+IPJpFEfXoWdYwP7UVAoUxxLNfGCfVowaJE7yg1Y5B1BVPqlUNsBq5/nGwmFkwRJ8xDW4sX8OdA==", + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "create-hash": "^1.1.0", - "pbkdf2": "^3.0.9", - "randombytes": "^2.0.1", - "safe-buffer": "^5.0.1", - "unorm": "^1.3.3" + "is-extendable": "^0.1.0" } }, - "bip66": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", - "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "expand-object": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/expand-object/-/expand-object-0.4.2.tgz", + "integrity": "sha1-t/J+9pwv3MYrD5OQwMtHvAa7Buo=", + "requires": { + "get-stdin": "^5.0.1", + "is-number": "^2.1.0", + "minimist": "^1.2.0", + "set-value": "^0.3.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "safe-buffer": "^5.0.1" + "is-extendable": "^0.1.0" } }, - "bl": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", - "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" + "kind-of": "^3.0.2" } }, - "bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" - }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, - "body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", "requires": { - "bytes": "3.1.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } + "isarray": "1.0.0" } }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "is-buffer": "^1.1.5" } }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "set-value": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.3.3.tgz", + "integrity": "sha1-uBIjaBY4oQiP2IpDW4qdMtro2bo=", "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - } + "isobject": "^2.0.0", + "to-object-path": "^0.2.0" } }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + "to-object-path": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.2.0.tgz", + "integrity": "sha1-FjThtSqIugDjlJYZ/ACB3Jo7B8o=", + "requires": { + "arr-flatten": "^1.0.1", + "is-arguments": "^1.0.2" + } + } + } + }, + "expand-pkg": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/expand-pkg/-/expand-pkg-0.1.9.tgz", + "integrity": "sha512-Qqtqzx/e8tODrDr0H8HtO7+nftN0wH9bsk3948KpKBZLrc86Cm3/8mRKJmDfNSDWWcuKsilMmFlKPhYx5gHYuA==", + "requires": { + "component-emitter": "^1.2.1", + "debug": "^2.4.1", + "defaults-deep": "^0.2.4", + "export-files": "^2.1.1", + "get-value": "^2.0.6", + "kind-of": "^3.1.0", + "lazy-cache": "^2.0.2", + "load-pkg": "^3.0.1", + "mixin-deep": "^1.1.3", + "normalize-pkg": "^0.3.20", + "omit-empty": "^0.4.1", + "parse-author": "^1.0.0", + "parse-git-config": "^1.1.1", + "repo-utils": "^0.3.7" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==" + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, - "browserfs": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/browserfs/-/browserfs-1.4.3.tgz", - "integrity": "sha512-tz8HClVrzTJshcyIu8frE15cjqjcBIu15Bezxsvl/i+6f59iNCN3kznlWjz0FEb3DlnDx3gW5szxeT6D1x0s0w==", + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "async": "^2.1.4", - "pako": "^1.0.4" + "is-buffer": "^1.1.5" } }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "requires": { + "fill-range": "^2.1.0" + }, + "dependencies": { + "fill-range": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" } }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" + "kind-of": "^3.0.2" } }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" + "isarray": "1.0.0" } }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "export-files": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/export-files/-/export-files-2.1.1.tgz", + "integrity": "sha1-u/ZFdAU6CeTrmOX0NQHVcrLDzn8=", + "requires": { + "lazy-cache": "^1.0.3" + }, + "dependencies": { + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + } + } + }, + "express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "requires": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" + "ms": "2.0.0" } }, - "browserify-sha3": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/browserify-sha3/-/browserify-sha3-0.0.4.tgz", - "integrity": "sha1-CGxHuMgjFsnUcCLCYYWVRXbdjiY=", - "dev": true, - "requires": { - "js-sha3": "^0.6.1", - "safe-buffer": "^5.1.1" - } + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, - "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" - } + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "ext": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "requires": { + "type": "^2.0.0" + }, + "dependencies": { + "type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz", + "integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==" + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "requires": { - "pako": "~1.0.5" + "is-plain-object": "^2.0.4" } - }, - "browserslist": { - "version": "3.2.8", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz", - "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", + } + } + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000844", - "electron-to-chromium": "^1.3.47" + "is-descriptor": "^1.0.0" } }, - "bs58": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", - "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, - "optional": true, "requires": { - "base-x": "^3.0.2" + "is-extendable": "^0.1.0" } }, - "bs58check": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", - "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, - "optional": true, - "requires": { - "bs58": "^4.0.0", - "create-hash": "^1.1.0", - "safe-buffer": "^5.1.2" - } - }, - "buffer": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.4.3.tgz", - "integrity": "sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A==", - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, - "buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", "requires": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" + "kind-of": "^6.0.0" } }, - "buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" - }, - "buffer-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", - "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", - "dev": true - }, - "buffer-fill": { + "is-data-descriptor": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" - }, - "buffer-to-arraybuffer": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", - "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=" - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" - }, - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" - }, - "bytewise": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/bytewise/-/bytewise-1.1.0.tgz", - "integrity": "sha1-HRPL/3F65xWAlKqIGzXQgbOHJT4=", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "bytewise-core": "^1.2.2", - "typewise": "^1.0.3" + "kind-of": "^6.0.0" } }, - "bytewise-core": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/bytewise-core/-/bytewise-core-1.2.3.tgz", - "integrity": "sha1-P7QQx+kVWOsasiqCg0V3qmvWHUI=", + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { - "typewise-core": "^1.2" - } - }, - "cacache": { - "version": "13.0.1", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-13.0.1.tgz", - "integrity": "sha512-5ZvAxd05HDDU+y9BVvcqYu2LLXmPnQ0hW62h32g4xBTgL/MppR4/04NHfj/ycM2y6lmTnbw6HVi+1eN0Psba6w==", - "requires": { - "chownr": "^1.1.2", - "figgy-pudding": "^3.5.1", - "fs-minipass": "^2.0.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.2", - "infer-owner": "^1.0.4", - "lru-cache": "^5.1.1", - "minipass": "^3.0.0", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.2", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "p-map": "^3.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^2.7.1", - "ssri": "^7.0.0", - "unique-filename": "^1.1.1" - }, - "dependencies": { - "fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "requires": { - "minipass": "^3.0.0" - } - }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "requires": { - "yallist": "^3.0.2" - }, - "dependencies": { - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" - } - } - }, - "minipass": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.1.tgz", - "integrity": "sha512-UFqVihv6PQgwj8/yTGvl9kPz7xIAY+R5z6XYjRInD3Gk3qx6QGSD6zEcpeG4Dy/lQnv1J6zv8ejV90hyYIKf3w==", - "requires": { - "yallist": "^4.0.0" - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - } - }, - "p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "requires": { - "aggregate-error": "^3.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - } + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=" + }, + "fake-merkle-patricia-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz", + "integrity": "sha1-S4w6z7Ugr635hgsfFM2M40As3dM=", + "dev": true, + "requires": { + "checkpoint-store": "^1.1.0" + } + }, + "falsey": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/falsey/-/falsey-0.3.2.tgz", + "integrity": "sha512-lxEuefF5MBIVDmE6XeqCdM4BWk1+vYmGZtkbKZ/VFcg6uBBw6fXNEbWmxCjDdQlFc9hy450nkiWwM3VAW6G1qg==", + "requires": { + "kind-of": "^5.0.2" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + }, + "fastfile": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/fastfile/-/fastfile-0.0.12.tgz", + "integrity": "sha512-0EZo2y5eW8X0oiDDRvcnufjVxlM96CQL5hvmRQtbRABWlCkH73IHwkzl0qOSdxtchaMr+0TSB7GVqaVEixRr1Q==" + }, + "ffiasm": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ffiasm/-/ffiasm-0.1.1.tgz", + "integrity": "sha512-irMMHiR9JJ7BVBrAhtliUawxVdPYSdyl81taUYJ4C1mJ0iw2ueThE/qtr0J8B83tsIY8HJvh0lg5F+6ClK4xpA==", + "requires": { + "big-integer": "^1.6.48", + "ejs": "^3.0.1", + "yargs": "^15.3.1" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" } }, - "cacheable-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", - "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", "requires": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" - }, - "dependencies": { - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "requires": { - "pump": "^3.0.0" - } - }, - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" - } + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" } }, - "cachedown": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cachedown/-/cachedown-1.0.0.tgz", - "integrity": "sha1-1D8DbkUQaWsxJG19sx6/D3rDLRU=", - "dev": true, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "requires": { - "abstract-leveldown": "^2.4.1", - "lru-cache": "^3.2.0" - }, - "dependencies": { - "abstract-leveldown": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", - "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - } + "color-name": "~1.1.4" } }, - "caching-transform": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", - "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "requires": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" - }, - "dependencies": { - "make-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.0.tgz", - "integrity": "sha512-grNJDhb8b1Jm1qeqW5R/O63wUo4UXo2v2HMic6YT9i/HBlF93S8jkMgH7yugvY9ABDShH4VZMn8I+U8+fCNegw==", - "requires": { - "semver": "^6.0.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - } + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" } }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" - }, - "camelcase": { + "is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, - "caniuse-lite": { - "version": "1.0.30001023", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001023.tgz", - "integrity": "sha512-C5TDMiYG11EOhVOA62W1p3UsJ2z4DsHtMBQtjzp3ZsUglcQn62WOUgW0y795c7A5uZ+GCEIvzkMatLIlAsbNTA==", - "dev": true + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "p-limit": "^2.2.0" } }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" }, - "checkpoint-store": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/checkpoint-store/-/checkpoint-store-1.1.0.tgz", - "integrity": "sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY=", - "dev": true, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", "requires": { - "functional-red-black-tree": "^1.0.1" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" } }, - "chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", - "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - }, - "dependencies": { - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" - } + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" } }, - "chownr": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.3.tgz", - "integrity": "sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw==" - }, - "chrome-trace-event": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz", - "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==", + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "requires": { - "tslib": "^1.9.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" } }, - "ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" } }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "ffjavascript": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.10.tgz", + "integrity": "sha512-GQI6gHYYG5/iD4Kt3VzezzK7fARJzP0zkc82V/+JAdjfeKBXhDSo5rpKFuK3cDcrdW0Fu2emuYNMEAuFqhEQvQ==", + "requires": { + "big-integer": "^1.6.48", + "wasmcurves": "0.0.5", + "worker-threads": "^1.0.0" + } + }, + "ffwasm": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ffwasm/-/ffwasm-0.0.7.tgz", + "integrity": "sha512-17cTLzv7HHAKqZbX8MvHxjSrR0yDdn1sh4TVsTbAvO9e6klhFicnyoVXc/sCuViV/M8g65sCmVrAmoPCZp1YkQ==", + "requires": { + "big-integer": "^1.6.48", + "wasmbuilder": "0.0.10" + } + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-contents": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/file-contents/-/file-contents-0.2.4.tgz", + "integrity": "sha1-BQb3uO/2KvpFrkXaTfnp1H30U8s=", + "requires": { + "extend-shallow": "^2.0.0", + "file-stat": "^0.1.0", + "graceful-fs": "^4.1.2", + "is-buffer": "^1.1.0", + "is-utf8": "^0.2.0", + "lazy-cache": "^0.2.3", + "through2": "^2.0.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - } + "is-extendable": "^0.1.0" } }, - "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, - "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "lazy-cache": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", + "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=" + } + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "requires": { + "flat-cache": "^2.0.1" + } + }, + "file-is-binary": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-is-binary/-/file-is-binary-1.0.0.tgz", + "integrity": "sha1-XkGAbRvK5FjI/sMv484SLbu8Q1Y=", + "requires": { + "is-binary-buffer": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "file-name": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/file-name/-/file-name-0.1.0.tgz", + "integrity": "sha1-ErEi8SD5w028F2wauBpUis7W3vc=" + }, + "file-stat": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/file-stat/-/file-stat-0.1.3.tgz", + "integrity": "sha1-0PGWHX0QcykoEgpuaVVHHCpbVBE=", + "requires": { + "graceful-fs": "^4.1.2", + "lazy-cache": "^0.2.3", + "through2": "^2.0.0" + }, + "dependencies": { + "lazy-cache": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", + "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=" + } + } + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, + "filelist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.1.tgz", + "integrity": "sha512-8zSK6Nu0DQIC08mUC46sWGXi+q3GGpKydAG36k+JDba6VRpkevvOWUW5a/PhShij4+vHT9M+ghgG7eM+a9JDUQ==", + "requires": { + "minimatch": "^3.0.4" + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=" + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { - "restore-cursor": "^3.1.0" + "ms": "2.0.0" } }, - "cli-truncate": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-0.2.1.tgz", - "integrity": "sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ=", + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "find-file-up": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/find-file-up/-/find-file-up-0.1.3.tgz", + "integrity": "sha1-z2gJG8+fMApA2kEbN9pczlovvqA=", + "requires": { + "fs-exists-sync": "^0.1.0", + "resolve-dir": "^0.1.0" + } + }, + "find-pkg": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/find-pkg/-/find-pkg-0.1.2.tgz", + "integrity": "sha1-G9wiwG42NlUy4qJIBGhUuXiNpVc=", + "requires": { + "find-file-up": "^0.1.2" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "find-yarn-workspace-root": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-1.2.1.tgz", + "integrity": "sha512-dVtfb0WuQG+8Ag2uWkbG79hOUzEsRrhBzgfn86g2sJPkzmcpGdghbNTfUKGTxymFrY/tLIodDzLoW9nOJ4FY8Q==", + "dev": true, + "requires": { + "fs-extra": "^4.0.3", + "micromatch": "^3.1.4" + }, + "dependencies": { + "fs-extra": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "dev": true, "requires": { - "slice-ansi": "0.0.4", - "string-width": "^1.0.1" - }, - "dependencies": { - "slice-ansi": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", - "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=" - } + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + } + } + }, + "first-chunk-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", + "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=" + }, + "flat": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", + "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", + "dev": true, + "requires": { + "is-buffer": "~2.0.3" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + }, + "dependencies": { + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==" + }, + "flow-stoplight": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/flow-stoplight/-/flow-stoplight-1.0.0.tgz", + "integrity": "sha1-SiksW8/4s5+mzAyxqFPYbyfu/3s=", + "dev": true + }, + "fnv-plus": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/fnv-plus/-/fnv-plus-1.3.1.tgz", + "integrity": "sha512-Gz1EvfOneuFfk4yG458dJ3TLJ7gV19q3OM/vVvvHf7eT02Hm1DleB4edsia6ahbKgAYxO9gvyQ1ioWZR+a00Yw==" + }, + "follow-redirects": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", + "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==", + "dev": true + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "requires": { + "for-in": "^1.0.1" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, + "fp-ts": { + "version": "1.19.3", + "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.3.tgz", + "integrity": "sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "fs-exists-sync": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz", + "integrity": "sha1-mC1ok6+RjnLQjeyehnP/K1qNat0=" + }, + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "requires": { + "minipass": "^2.6.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" + }, + "ganache-core": { + "version": "2.13.2", + "resolved": "https://registry.npmjs.org/ganache-core/-/ganache-core-2.13.2.tgz", + "integrity": "sha512-tIF5cR+ANQz0+3pHWxHjIwHqFXcVo0Mb+kcsNhglNFALcYo49aQpnS9dqHartqPfMFjiHh/qFoD3mYK0d/qGgw==", + "dev": true, + "requires": { + "abstract-leveldown": "3.0.0", + "async": "2.6.2", + "bip39": "2.5.0", + "cachedown": "1.0.0", + "clone": "2.1.2", + "debug": "3.2.6", + "encoding-down": "5.0.4", + "eth-sig-util": "3.0.0", + "ethereumjs-abi": "0.6.8", + "ethereumjs-account": "3.0.0", + "ethereumjs-block": "2.2.2", + "ethereumjs-common": "1.5.0", + "ethereumjs-tx": "2.1.2", + "ethereumjs-util": "6.2.1", + "ethereumjs-vm": "4.2.0", + "ethereumjs-wallet": "0.6.5", + "heap": "0.2.6", + "keccak": "3.0.1", + "level-sublevel": "6.6.4", + "levelup": "3.1.1", + "lodash": "4.17.20", + "lru-cache": "5.1.1", + "merkle-patricia-tree": "3.0.0", + "patch-package": "6.2.2", + "seedrandom": "3.0.1", + "source-map-support": "0.5.12", + "tmp": "0.1.0", + "web3": "1.2.11", + "web3-provider-engine": "14.2.1", + "websocket": "1.0.32" + }, + "dependencies": { + "@ethersproject/abi": { + "version": "5.0.0-beta.153", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.0-beta.153.tgz", + "integrity": "sha512-aXweZ1Z7vMNzJdLpR1CZUAIgnwjrZeUSvN9syCwlBaEBUFJmFY+HHnfuTI5vIhVs/mRkfJVrbEyl51JZQqyjAg==", "dev": true, + "optional": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "dev": true - }, - "clone-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", - "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", - "dev": true - }, - "clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", - "requires": { - "mimic-response": "^1.0.0" + "@ethersproject/address": ">=5.0.0-beta.128", + "@ethersproject/bignumber": ">=5.0.0-beta.130", + "@ethersproject/bytes": ">=5.0.0-beta.129", + "@ethersproject/constants": ">=5.0.0-beta.128", + "@ethersproject/hash": ">=5.0.0-beta.128", + "@ethersproject/keccak256": ">=5.0.0-beta.127", + "@ethersproject/logger": ">=5.0.0-beta.129", + "@ethersproject/properties": ">=5.0.0-beta.131", + "@ethersproject/strings": ">=5.0.0-beta.130" } }, - "clone-stats": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", - "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", - "dev": true - }, - "cloneable-readable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", - "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", + "@ethersproject/abstract-provider": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.0.8.tgz", + "integrity": "sha512-fqJXkewcGdi8LogKMgRyzc/Ls2js07yor7+g9KfPs09uPOcQLg7cc34JN+lk34HH9gg2HU0DIA5797ZR8znkfw==", "dev": true, + "optional": true, "requires": { - "inherits": "^2.0.1", - "process-nextick-args": "^2.0.0", - "readable-stream": "^2.3.5" + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/networks": "^5.0.7", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/transactions": "^5.0.9", + "@ethersproject/web": "^5.0.12" } }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "coinstring": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/coinstring/-/coinstring-2.3.0.tgz", - "integrity": "sha1-zbYzY6lhUCQEolr7gsLibV/2J6Q=", + "@ethersproject/abstract-signer": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.0.10.tgz", + "integrity": "sha512-irx7kH7FDAeW7QChDPW19WsxqeB1d3XLyOLSXm0bfPqL1SS07LXWltBJUBUxqC03ORpAOcM3JQj57DU8JnVY2g==", "dev": true, "optional": true, "requires": { - "bs58": "^2.0.1", - "create-hash": "^1.1.1" - }, - "dependencies": { - "bs58": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-2.0.1.tgz", - "integrity": "sha1-VZCNWPGYKrogCPob7Y+RmYopv40=", - "dev": true, - "optional": true - } + "@ethersproject/abstract-provider": "^5.0.8", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7" } }, - "collection-map": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz", - "integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw=", + "@ethersproject/address": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.9.tgz", + "integrity": "sha512-gKkmbZDMyGbVjr8nA5P0md1GgESqSGH7ILIrDidPdNXBl4adqbuA3OAuZx/O2oGpL6PtJ9BDa0kHheZ1ToHU3w==", "dev": true, + "optional": true, "requires": { - "arr-map": "^2.0.2", - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - } - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "dev": true - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "command-exists": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.8.tgz", - "integrity": "sha512-PM54PkseWbiiD/mMsbvW351/u+dafwTJ0ye2qB60G1aGQP9j3xK2gmMDc+R34L3nDtx4qMCitXT75mkbkGJDLw==" - }, - "commander": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", - "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", - "requires": { - "graceful-readlink": ">= 1.0.0" - } - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" - }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/rlp": "^5.0.7" } }, - "console-browserify": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", - "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==" - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" - }, - "contains-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", - "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=" - }, - "content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "@ethersproject/base64": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.0.7.tgz", + "integrity": "sha512-S5oh5DVfCo06xwJXT8fQC68mvJfgScTl2AXvbYMsHNfIBTDb084Wx4iA9MNlEReOv6HulkS+gyrUM/j3514rSw==", + "dev": true, + "optional": true, "requires": { - "safe-buffer": "5.1.2" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } + "@ethersproject/bytes": "^5.0.9" } }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" - }, - "convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "@ethersproject/bignumber": { + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.13.tgz", + "integrity": "sha512-b89bX5li6aK492yuPP5mPgRVgIxxBP7ksaBtKX5QQBsrZTpNOjf/MR4CjcUrAw8g+RQuD6kap9lPjFgY4U1/5A==", + "dev": true, + "optional": true, "requires": { - "safe-buffer": "~5.1.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "bn.js": "^4.4.0" } }, - "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" - }, - "cookiejar": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", - "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==" - }, - "copy-concurrently": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", - "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "@ethersproject/bytes": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.9.tgz", + "integrity": "sha512-k+17ZViDtAugC0s7HM6rdsTWEdIYII4RPCDkPEuxKc6i40Bs+m6tjRAtCECX06wKZnrEoR9pjOJRXHJ/VLoOcA==", + "dev": true, + "optional": true, "requires": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" - }, - "dependencies": { - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - } - } + "@ethersproject/logger": "^5.0.8" } }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" - }, - "copy-props": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.4.tgz", - "integrity": "sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A==", + "@ethersproject/constants": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.8.tgz", + "integrity": "sha512-sCc73pFBsl59eDfoQR5OCEZCRv5b0iywadunti6MQIr5lt3XpwxK1Iuzd8XSFO02N9jUifvuZRrt0cY0+NBgTg==", "dev": true, + "optional": true, "requires": { - "each-props": "^1.3.0", - "is-plain-object": "^2.0.1" + "@ethersproject/bignumber": "^5.0.13" } }, - "core-js": { - "version": "2.6.11", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", - "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==" - }, - "core-js-pure": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.4.tgz", - "integrity": "sha512-epIhRLkXdgv32xIUFaaAry2wdxZYBi6bgM7cB136dzzXXa+dFyRLTZeLUJxnd8ShrmyVXBub63n2NHo2JAt8Cw==", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "@ethersproject/hash": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.10.tgz", + "integrity": "sha512-Tf0bvs6YFhw28LuHnhlDWyr0xfcDxSXdwM4TcskeBbmXVSKLv3bJQEEEBFUcRX0fJuslR3gCVySEaSh7vuMx5w==", + "dev": true, + "optional": true, "requires": { - "object-assign": "^4", - "vary": "^1" - } - }, - "cosmiconfig": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", - "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", - "requires": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.1.0", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.7.2" - }, - "dependencies": { - "parse-json": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", - "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==", - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1", - "lines-and-columns": "^1.1.6" - } - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" - } + "@ethersproject/abstract-signer": "^5.0.10", + "@ethersproject/address": "^5.0.9", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/strings": "^5.0.8" } }, - "coveralls": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.9.tgz", - "integrity": "sha512-nNBg3B1+4iDox5A5zqHKzUTiwl2ey4k2o0NEcVZYvl+GOSJdKBj4AJGKLv6h3SvWch7tABHePAQOSZWM9E2hMg==", + "@ethersproject/keccak256": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.7.tgz", + "integrity": "sha512-zpUBmofWvx9PGfc7IICobgFQSgNmTOGTGLUxSYqZzY/T+b4y/2o5eqf/GGmD7qnTGzKQ42YlLNo+LeDP2qe55g==", + "dev": true, + "optional": true, "requires": { - "js-yaml": "^3.13.1", - "lcov-parse": "^1.0.0", - "log-driver": "^1.2.7", - "minimist": "^1.2.0", - "request": "^2.88.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - } + "@ethersproject/bytes": "^5.0.9", + "js-sha3": "0.5.7" } }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "@ethersproject/logger": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.8.tgz", + "integrity": "sha512-SkJCTaVTnaZ3/ieLF5pVftxGEFX56pTH+f2Slrpv7cU0TNpUZNib84QQdukd++sWUp/S7j5t5NW+WegbXd4U/A==", + "dev": true, + "optional": true + }, + "@ethersproject/networks": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.0.7.tgz", + "integrity": "sha512-dI14QATndIcUgcCBL1c5vUr/YsI5cCHLN81rF7PU+yS7Xgp2/Rzbr9+YqpC6NBXHFUASjh6GpKqsVMpufAL0BQ==", + "dev": true, + "optional": true, "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" + "@ethersproject/logger": "^5.0.8" } }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "@ethersproject/properties": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.7.tgz", + "integrity": "sha512-812H1Rus2vjw0zbasfDI1GLNPDsoyX1pYqiCgaR1BuyKxUTbwcH1B+214l6VGe1v+F6iEVb7WjIwMjKhb4EUsg==", + "dev": true, + "optional": true, "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" + "@ethersproject/logger": "^5.0.8" } }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "@ethersproject/rlp": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.7.tgz", + "integrity": "sha512-ulUTVEuV7PT4jJTPpfhRHK57tkLEDEY9XSYJtrSNHOqdwMvH0z7BM2AKIMq4LVDlnu4YZASdKrkFGEIO712V9w==", + "dev": true, + "optional": true, "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8" } }, - "cross-env": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-6.0.3.tgz", - "integrity": "sha512-+KqxF6LCvfhWvADcDPqo64yVIB31gv/jQulX2NGzKS/g3GEVz6/pt4wjHFtFWsHMddebWD/sDthJemzM4MaAag==", + "@ethersproject/signing-key": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.8.tgz", + "integrity": "sha512-YKxQM45eDa6WAD+s3QZPdm1uW1MutzVuyoepdRRVmMJ8qkk7iOiIhUkZwqKLNxKzEJijt/82ycuOREc9WBNAKg==", + "dev": true, + "optional": true, "requires": { - "cross-spawn": "^7.0.0" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "elliptic": "6.5.3" } }, - "cross-fetch": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-2.2.3.tgz", - "integrity": "sha512-PrWWNH3yL2NYIb/7WF/5vFG3DCQiXDOVf8k3ijatbrtnwNuhMWLC7YF7uqf53tbTFDzHIUD8oITw4Bxt8ST3Nw==", + "@ethersproject/strings": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.8.tgz", + "integrity": "sha512-5IsdXf8tMY8QuHl8vTLnk9ehXDDm6x9FB9S9Og5IA1GYhLe5ZewydXSjlJlsqU2t9HRbfv97OJZV/pX8DVA/Hw==", "dev": true, + "optional": true, "requires": { - "node-fetch": "2.1.2", - "whatwg-fetch": "2.0.4" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/logger": "^5.0.8" } }, - "cross-spawn": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.1.tgz", - "integrity": "sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==", + "@ethersproject/transactions": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.9.tgz", + "integrity": "sha512-0Fu1yhdFBkrbMjenEr+39tmDxuHmaw0pe9Jb18XuKoItj7Z3p7+UzdHLr2S/okvHDHYPbZE5gtANDdQ3ZL1nBA==", + "dev": true, + "optional": true, "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "dependencies": { - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "requires": { - "isexe": "^2.0.0" - } - } + "@ethersproject/address": "^5.0.9", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/rlp": "^5.0.7", + "@ethersproject/signing-key": "^5.0.8" } }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "@ethersproject/web": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.0.12.tgz", + "integrity": "sha512-gVxS5iW0bgidZ76kr7LsTxj4uzN5XpCLzvZrLp8TP+4YgxHfCeetFyQkRPgBEAJdNrexdSBayvyJvzGvOq0O8g==", + "dev": true, + "optional": true, "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" + "@ethersproject/base64": "^5.0.7", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/strings": "^5.0.8" } }, - "cyclist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", - "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=" + "@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "dev": true, + "optional": true }, - "d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "dev": true, + "optional": true, "requires": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" + "defer-to-connect": "^1.0.1" } }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "dev": true, "requires": { - "assert-plus": "^1.0.0" + "@types/node": "*" } }, - "date-fns": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz", - "integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==" + "@types/node": { + "version": "14.14.20", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.20.tgz", + "integrity": "sha512-Y93R97Ouif9JEOWPIUyU+eyIdyRqQR0I8Ez1dzku4hDx34NWh4HbtIc3WNzwB1Y9ULvNGeu5B8h8bVL5cAk4/A==", + "dev": true }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "@types/pbkdf2": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", + "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", + "dev": true, "requires": { - "ms": "^2.1.1" + "@types/node": "*" } }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" - }, - "decompress": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.0.tgz", - "integrity": "sha1-eu3YVCflqS2s/lVnSnxQXpbQH50=", - "requires": { - "decompress-tar": "^4.0.0", - "decompress-tarbz2": "^4.0.0", - "decompress-targz": "^4.0.0", - "decompress-unzip": "^4.0.1", - "graceful-fs": "^4.1.10", - "make-dir": "^1.0.0", - "pify": "^2.3.0", - "strip-dirs": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - } + "@types/secp256k1": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.1.tgz", + "integrity": "sha512-+ZjSA8ELlOp8SlKi0YLB2tz9d5iPNEmOBd+8Rz21wTMdaXQIa9b6TEnD6l5qKOCypE7FSyPyck12qZJxSDNoog==", + "dev": true, + "requires": { + "@types/node": "*" } }, - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "@yarnpkg/lockfile": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", + "dev": true + }, + "abstract-leveldown": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-3.0.0.tgz", + "integrity": "sha512-KUWx9UWGQD12zsmLNj64/pndaz4iJh/Pj7nopgkfDG6RlCcbMZvT6+9l7dchK4idog2Is8VdC/PvNbFuFmalIQ==", + "dev": true, "requires": { - "mimic-response": "^1.0.0" + "xtend": "~4.0.0" } }, - "decompress-tar": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", - "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "dev": true, + "optional": true, "requires": { - "file-type": "^5.2.0", - "is-stream": "^1.1.0", - "tar-stream": "^1.5.2" + "mime-types": "~2.1.24", + "negotiator": "0.6.2" } }, - "decompress-tarbz2": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", - "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", - "requires": { - "decompress-tar": "^4.1.0", - "file-type": "^6.1.0", - "is-stream": "^1.1.0", - "seek-bzip": "^1.0.5", - "unbzip2-stream": "^1.0.9" - }, - "dependencies": { - "file-type": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", - "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==" - } - } + "aes-js": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", + "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==", + "dev": true, + "optional": true }, - "decompress-targz": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", - "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, "requires": { - "decompress-tar": "^4.1.1", - "file-type": "^5.2.0", - "is-stream": "^1.1.0" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" } }, - "decompress-unzip": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", - "integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=", + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, "requires": { - "file-type": "^3.8.0", - "get-stream": "^2.2.0", - "pify": "^2.3.0", - "yauzl": "^2.4.2" - }, - "dependencies": { - "file-type": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", - "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=" - }, - "get-stream": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", - "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", - "requires": { - "object-assign": "^4.0.1", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - } + "color-convert": "^1.9.0" } }, - "dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=" + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true }, - "deep-equal": { + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-flatten": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", - "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "dev": true, + "optional": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", "dev": true, "requires": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" - }, - "dependencies": { - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - } + "safer-buffer": "~2.1.0" + } + }, + "asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "dev": true, + "optional": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" } }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true }, - "default-compare": { + "assign-symbols": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz", - "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", + "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", "dev": true, "requires": { - "kind-of": "^5.0.2" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } + "lodash": "^4.17.11" } }, - "default-require-extensions": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", - "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", + "async-eventemitter": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz", + "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==", + "dev": true, "requires": { - "strip-bom": "^4.0.0" - }, - "dependencies": { - "strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==" - } + "async": "^2.4.0" } }, - "default-resolution": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/default-resolution/-/default-resolution-2.0.0.tgz", - "integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ=", + "async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", "dev": true }, - "defer-to-connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==" + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true }, - "deferred-leveldown": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", - "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==", + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "dev": true, "requires": { - "abstract-leveldown": "~2.6.0" + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" }, "dependencies": { - "abstract-leveldown": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz", - "integrity": "sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA==", + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "xtend": "~4.0.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true } } }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "requires": { - "object-keys": "^1.0.12" - }, - "dependencies": { - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" - } - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "babel-core": { + "version": "6.26.3", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", + "dev": true, "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" }, "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "requires": { - "kind-of": "^6.0.0" + "ms": "2.0.0" } }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "requires": { - "kind-of": "^6.0.0" - } + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true } } }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", - "dev": true - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" - }, - "des.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", - "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" - }, - "detect-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=" - }, - "detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "babel-generator": { + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", "dev": true, "requires": { - "repeating": "^2.0.0" - } - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==" - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "requires": { - "esutils": "^2.0.2" + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" + }, + "dependencies": { + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + } } }, - "dom-walk": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz", - "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=" - }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==" - }, - "dotignore": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/dotignore/-/dotignore-0.1.2.tgz", - "integrity": "sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw==", + "babel-helper-builder-binary-assignment-operator-visitor": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", + "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", "dev": true, "requires": { - "minimatch": "^3.0.4" + "babel-helper-explode-assignable-expression": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, - "drbg.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", - "integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=", + "babel-helper-call-delegate": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", + "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", + "dev": true, "requires": { - "browserify-aes": "^1.0.6", - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4" + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" - }, - "duplexify": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", - "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "babel-helper-define-map": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", + "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", + "dev": true, "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" } }, - "each-props": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz", - "integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==", + "babel-helper-explode-assignable-expression": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", + "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", "dev": true, "requires": { - "is-plain-object": "^2.0.1", - "object.defaults": "^1.1.0" + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "babel-helper-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", + "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", + "dev": true, "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" - }, - "electron-to-chromium": { - "version": "1.3.341", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.341.tgz", - "integrity": "sha512-iezlV55/tan1rvdvt7yg7VHRSkt+sKfzQ16wTDqTbQqtl4+pSUkKPXpQHDvEt0c7gKcUHHwUbffOgXz6bn096g==", - "dev": true - }, - "elegant-spinner": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", - "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=" - }, - "elliptic": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", - "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", + "babel-helper-get-function-arity": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", + "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", + "dev": true, "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=" - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" - }, - "encoding": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", - "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "babel-helper-hoist-variables": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", + "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", "dev": true, "requires": { - "iconv-lite": "~0.4.13" + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, - "encoding-down": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/encoding-down/-/encoding-down-5.0.4.tgz", - "integrity": "sha512-8CIZLDcSKxgzT+zX8ZVfgNbu8Md2wq/iqa1Y7zyVR18QBEAc0Nmzuvj/N5ykSKpfGzjM8qxbaFntLPwnVoUhZw==", + "babel-helper-optimise-call-expression": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", + "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", "dev": true, "requires": { - "abstract-leveldown": "^5.0.0", - "inherits": "^2.0.3", - "level-codec": "^9.0.0", - "level-errors": "^2.0.0", - "xtend": "^4.0.1" - }, - "dependencies": { - "abstract-leveldown": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz", - "integrity": "sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - } + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "babel-helper-regex": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", + "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", + "dev": true, "requires": { - "once": "^1.4.0" + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" } }, - "enhanced-resolve": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.1.tgz", - "integrity": "sha512-98p2zE+rL7/g/DzMHMTF4zZlCgeVdJ7yr6xzEpJRYwFYrGi9ANdn5DnJURg6RpBkyk60XYDnWIv51VfIhfNGuA==", + "babel-helper-remap-async-to-generator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", + "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", + "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.5.0", - "tapable": "^1.0.0" - }, - "dependencies": { - "memory-fs": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", - "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - } + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "babel-helper-replace-supers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", + "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", + "dev": true, "requires": { - "prr": "~1.0.1" + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true, "requires": { - "is-arrayish": "^0.2.1" + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" } }, - "es-abstract": { - "version": "1.17.4", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.4.tgz", - "integrity": "sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ==", + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" - }, - "dependencies": { - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" - } + "babel-runtime": "^6.22.0" } }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "babel-plugin-check-es2015-constants": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", + "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", + "dev": true, "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "babel-runtime": "^6.22.0" } }, - "es5-ext": { - "version": "0.10.53", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", - "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", + "babel-plugin-syntax-async-functions": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", + "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=", + "dev": true + }, + "babel-plugin-syntax-exponentiation-operator": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", + "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", + "dev": true + }, + "babel-plugin-syntax-trailing-function-commas": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", + "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=", + "dev": true + }, + "babel-plugin-transform-async-to-generator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", + "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", + "dev": true, "requires": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.3", - "next-tick": "~1.0.0" + "babel-helper-remap-async-to-generator": "^6.24.1", + "babel-plugin-syntax-async-functions": "^6.8.0", + "babel-runtime": "^6.22.0" } }, - "es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==" + "babel-plugin-transform-es2015-arrow-functions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", + "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "babel-plugin-transform-es2015-block-scoped-functions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", + "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", + "dev": true, "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" + "babel-runtime": "^6.22.0" } }, - "es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "babel-plugin-transform-es2015-block-scoping": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", + "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", + "dev": true, "requires": { - "d": "^1.0.1", - "ext": "^1.1.2" + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" } }, - "es6-weak-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", - "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "babel-plugin-transform-es2015-classes": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", + "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", "dev": true, "requires": { - "d": "1", - "es5-ext": "^0.10.46", - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.1" + "babel-helper-define-map": "^6.24.1", + "babel-helper-function-name": "^6.24.1", + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-helper-replace-supers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "eslint": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", - "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "babel-plugin-transform-es2015-computed-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", + "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", + "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "ajv": "^6.10.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^1.4.3", - "eslint-visitor-keys": "^1.1.0", - "espree": "^6.1.2", - "esquery": "^1.0.1", - "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "inquirer": "^7.0.0", - "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.14", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.3", - "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^6.1.2", - "strip-ansi": "^5.2.0", - "strip-json-comments": "^3.0.1", - "table": "^5.2.3", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "requires": { - "ms": "^2.1.1" - } - }, - "glob-parent": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", - "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", - "requires": { - "is-glob": "^4.0.1" - } - }, - "globals": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz", - "integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==", - "requires": { - "type-fest": "^0.8.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - } - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - } + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" } }, - "eslint-config-standard": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-14.1.0.tgz", - "integrity": "sha512-EF6XkrrGVbvv8hL/kYa/m6vnvmUT+K82pJJc4JJVMM6+Qgqh0pnwprSxdduDLB9p/7bIxD+YV5O0wfb8lmcPbA==" + "babel-plugin-transform-es2015-destructuring": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", + "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } }, - "eslint-import-resolver-node": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz", - "integrity": "sha512-b8crLDo0M5RSe5YG8Pu2DYBj71tSB6OvXkfzwbJU2w7y8P4/yo0MyF8jU26IEuEuHF2K5/gcAJE3LhQGqBBbVg==", + "babel-plugin-transform-es2015-duplicate-keys": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", + "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", + "dev": true, "requires": { - "debug": "^2.6.9", - "resolve": "^1.13.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, - "eslint-module-utils": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.5.2.tgz", - "integrity": "sha512-LGScZ/JSlqGKiT8OC+cYRxseMjyqt6QO54nl281CK93unD89ijSeRV6An8Ci/2nvWVKe8K/Tqdm75RQoIOCr+Q==", + "babel-plugin-transform-es2015-for-of": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", + "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", + "dev": true, "requires": { - "debug": "^2.6.9", - "pkg-dir": "^2.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } + "babel-runtime": "^6.22.0" } }, - "eslint-plugin-es": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.0.tgz", - "integrity": "sha512-6/Jb/J/ZvSebydwbBJO1R9E5ky7YeElfK56Veh7e4QGFHCXoIXGH9HhVz+ibJLM3XJ1XjP+T7rKBLUa/Y7eIng==", + "babel-plugin-transform-es2015-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", + "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", + "dev": true, "requires": { - "eslint-utils": "^2.0.0", - "regexpp": "^3.0.0" - }, - "dependencies": { - "eslint-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz", - "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==", - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, - "regexpp": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz", - "integrity": "sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g==" - } + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, - "eslint-plugin-import": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.0.tgz", - "integrity": "sha512-NK42oA0mUc8Ngn4kONOPsPB1XhbUvNHqF+g307dPV28aknPoiNnKLFd9em4nkswwepdF5ouieqv5Th/63U7YJQ==", + "babel-plugin-transform-es2015-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", + "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", + "dev": true, "requires": { - "array-includes": "^3.0.3", - "array.prototype.flat": "^1.2.1", - "contains-path": "^0.1.0", - "debug": "^2.6.9", - "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.2", - "eslint-module-utils": "^2.4.1", - "has": "^1.0.3", - "minimatch": "^3.0.4", - "object.values": "^1.1.0", - "read-pkg-up": "^2.0.0", - "resolve": "^1.12.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", - "requires": { - "esutils": "^2.0.2", - "isarray": "^1.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "requires": { - "locate-path": "^2.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "requires": { - "pify": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" - } + "babel-runtime": "^6.22.0" } }, - "eslint-plugin-node": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.0.0.tgz", - "integrity": "sha512-chUs/NVID+sknFiJzxoN9lM7uKSOEta8GC8365hw1nDfwIPIjjpRSwwPvQanWv8dt/pDe9EV4anmVSwdiSndNg==", + "babel-plugin-transform-es2015-modules-amd": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", + "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", + "dev": true, "requires": { - "eslint-plugin-es": "^3.0.0", - "eslint-utils": "^2.0.0", - "ignore": "^5.1.1", - "minimatch": "^3.0.4", - "resolve": "^1.10.1", - "semver": "^6.1.0" - }, - "dependencies": { - "eslint-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz", - "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==", - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, - "ignore": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", - "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==" - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - } + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" } }, - "eslint-plugin-promise": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz", - "integrity": "sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw==" + "babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.26.2", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", + "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", + "dev": true, + "requires": { + "babel-plugin-transform-strict-mode": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-types": "^6.26.0" + } }, - "eslint-plugin-standard": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.1.tgz", - "integrity": "sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ==" + "babel-plugin-transform-es2015-modules-systemjs": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", + "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } }, - "eslint-scope": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", - "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "babel-plugin-transform-es2015-modules-umd": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", + "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", + "dev": true, "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" } }, - "eslint-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", - "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "babel-plugin-transform-es2015-object-super": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", + "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", + "dev": true, "requires": { - "eslint-visitor-keys": "^1.1.0" + "babel-helper-replace-supers": "^6.24.1", + "babel-runtime": "^6.22.0" } }, - "eslint-visitor-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", - "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==" + "babel-plugin-transform-es2015-parameters": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", + "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", + "dev": true, + "requires": { + "babel-helper-call-delegate": "^6.24.1", + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } }, - "espree": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz", - "integrity": "sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==", + "babel-plugin-transform-es2015-shorthand-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", + "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", + "dev": true, "requires": { - "acorn": "^7.1.0", - "acorn-jsx": "^5.1.0", - "eslint-visitor-keys": "^1.1.0" + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + "babel-plugin-transform-es2015-spread": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", + "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } }, - "esquery": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", - "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "babel-plugin-transform-es2015-sticky-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", + "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", + "dev": true, "requires": { - "estraverse": "^4.0.0" + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "babel-plugin-transform-es2015-template-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", + "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", + "dev": true, "requires": { - "estraverse": "^4.1.0" + "babel-runtime": "^6.22.0" } }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" + "babel-plugin-transform-es2015-typeof-symbol": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", + "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" + "babel-plugin-transform-es2015-unicode-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", + "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", + "dev": true, + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "regexpu-core": "^2.0.0" + } }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + "babel-plugin-transform-exponentiation-operator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", + "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", + "dev": true, + "requires": { + "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", + "babel-plugin-syntax-exponentiation-operator": "^6.8.0", + "babel-runtime": "^6.22.0" + } }, - "eth-block-tracker": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-3.0.1.tgz", - "integrity": "sha512-WUVxWLuhMmsfenfZvFO5sbl1qFY2IqUlw/FPVmjjdElpqLsZtSG+wPe9Dz7W/sB6e80HgFKknOmKk2eNlznHug==", + "babel-plugin-transform-regenerator": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", + "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", "dev": true, "requires": { - "eth-query": "^2.1.0", - "ethereumjs-tx": "^1.3.3", - "ethereumjs-util": "^5.1.3", - "ethjs-util": "^0.1.3", - "json-rpc-engine": "^3.6.0", - "pify": "^2.3.0", - "tape": "^4.6.3" + "regenerator-transform": "^0.10.0" + } + }, + "babel-plugin-transform-strict-mode": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", + "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-preset-env": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.7.0.tgz", + "integrity": "sha512-9OR2afuKDneX2/q2EurSftUYM0xGu4O2D9adAhVfADDhrYDaxXV0rBbevVYoY9n6nyX1PmQW/0jtpJvUNr9CHg==", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "^6.22.0", + "babel-plugin-syntax-trailing-function-commas": "^6.22.0", + "babel-plugin-transform-async-to-generator": "^6.22.0", + "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoping": "^6.23.0", + "babel-plugin-transform-es2015-classes": "^6.23.0", + "babel-plugin-transform-es2015-computed-properties": "^6.22.0", + "babel-plugin-transform-es2015-destructuring": "^6.23.0", + "babel-plugin-transform-es2015-duplicate-keys": "^6.22.0", + "babel-plugin-transform-es2015-for-of": "^6.23.0", + "babel-plugin-transform-es2015-function-name": "^6.22.0", + "babel-plugin-transform-es2015-literals": "^6.22.0", + "babel-plugin-transform-es2015-modules-amd": "^6.22.0", + "babel-plugin-transform-es2015-modules-commonjs": "^6.23.0", + "babel-plugin-transform-es2015-modules-systemjs": "^6.23.0", + "babel-plugin-transform-es2015-modules-umd": "^6.23.0", + "babel-plugin-transform-es2015-object-super": "^6.22.0", + "babel-plugin-transform-es2015-parameters": "^6.23.0", + "babel-plugin-transform-es2015-shorthand-properties": "^6.22.0", + "babel-plugin-transform-es2015-spread": "^6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "^6.22.0", + "babel-plugin-transform-es2015-template-literals": "^6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "^6.23.0", + "babel-plugin-transform-es2015-unicode-regex": "^6.22.0", + "babel-plugin-transform-exponentiation-operator": "^6.22.0", + "babel-plugin-transform-regenerator": "^6.22.0", + "browserslist": "^3.2.6", + "invariant": "^2.2.2", + "semver": "^5.3.0" }, "dependencies": { - "ethereumjs-tx": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", - "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", - "dev": true, - "requires": { - "ethereum-common": "^0.0.18", - "ethereumjs-util": "^5.0.0" - } - }, - "ethereumjs-util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", - "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", - "dev": true, - "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "ethjs-util": "^0.1.3", - "keccak": "^1.0.2", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1", - "secp256k1": "^3.0.1" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true } } }, - "eth-ens-namehash": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", - "integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=", + "babel-register": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "dev": true, "requires": { - "idna-uts46-hx": "^2.3.1", - "js-sha3": "^0.5.7" + "babel-core": "^6.26.0", + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "home-or-tmp": "^2.0.0", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.15" }, "dependencies": { - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dev": true, + "requires": { + "source-map": "^0.5.6" + } } } }, - "eth-json-rpc-infura": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/eth-json-rpc-infura/-/eth-json-rpc-infura-3.2.1.tgz", - "integrity": "sha512-W7zR4DZvyTn23Bxc0EWsq4XGDdD63+XPUCEhV2zQvQGavDVC4ZpFDK4k99qN7bd7/fjj37+rxmuBOBeIqCA5Mw==", + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "cross-fetch": "^2.1.1", - "eth-json-rpc-middleware": "^1.5.0", - "json-rpc-engine": "^3.4.0", - "json-rpc-error": "^2.0.0" + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" } }, - "eth-json-rpc-middleware": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/eth-json-rpc-middleware/-/eth-json-rpc-middleware-1.6.0.tgz", - "integrity": "sha512-tDVCTlrUvdqHKqivYMjtFZsdD7TtpNLBCfKAcOpaVs7orBMS/A8HWro6dIzNtTZIR05FAbJ3bioFOnZpuCew9Q==", + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", "dev": true, "requires": { - "async": "^2.5.0", - "eth-query": "^2.1.2", - "eth-tx-summary": "^3.1.2", - "ethereumjs-block": "^1.6.0", - "ethereumjs-tx": "^1.3.3", - "ethereumjs-util": "^5.1.2", - "ethereumjs-vm": "^2.1.0", - "fetch-ponyfill": "^4.0.0", - "json-rpc-engine": "^3.6.0", - "json-rpc-error": "^2.0.0", - "json-stable-stringify": "^1.0.1", - "promise-to-callback": "^1.0.0", - "tape": "^4.6.3" + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" }, "dependencies": { - "ethereum-common": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.2.0.tgz", - "integrity": "sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA==", - "dev": true - }, - "ethereumjs-account": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz", - "integrity": "sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA==", - "dev": true, - "requires": { - "ethereumjs-util": "^5.0.0", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1" - } - }, - "ethereumjs-block": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz", - "integrity": "sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg==", - "dev": true, - "requires": { - "async": "^2.0.1", - "ethereum-common": "0.2.0", - "ethereumjs-tx": "^1.2.2", - "ethereumjs-util": "^5.0.0", - "merkle-patricia-tree": "^2.1.2" - } - }, - "ethereumjs-tx": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", - "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", - "dev": true, - "requires": { - "ethereum-common": "^0.0.18", - "ethereumjs-util": "^5.0.0" - }, - "dependencies": { - "ethereum-common": { - "version": "0.0.18", - "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", - "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=", - "dev": true - } - } - }, - "ethereumjs-util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", - "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "ethjs-util": "^0.1.3", - "keccak": "^1.0.2", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1", - "secp256k1": "^3.0.1" + "ms": "2.0.0" } }, - "ethereumjs-vm": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz", - "integrity": "sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw==", - "dev": true, - "requires": { - "async": "^2.1.2", - "async-eventemitter": "^0.2.2", - "ethereumjs-account": "^2.0.3", - "ethereumjs-block": "~2.2.0", - "ethereumjs-common": "^1.1.0", - "ethereumjs-util": "^6.0.0", - "fake-merkle-patricia-tree": "^1.0.1", - "functional-red-black-tree": "^1.0.1", - "merkle-patricia-tree": "^2.3.2", - "rustbn.js": "~0.2.0", - "safe-buffer": "^5.1.1" - }, - "dependencies": { - "ethereumjs-block": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz", - "integrity": "sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg==", - "dev": true, - "requires": { - "async": "^2.0.1", - "ethereumjs-common": "^1.5.0", - "ethereumjs-tx": "^2.1.1", - "ethereumjs-util": "^5.0.0", - "merkle-patricia-tree": "^2.1.2" - }, - "dependencies": { - "ethereumjs-util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", - "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", - "dev": true, - "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "ethjs-util": "^0.1.3", - "keccak": "^1.0.2", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1", - "secp256k1": "^3.0.1" - } - }, - "keccak": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", - "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", - "dev": true, - "requires": { - "bindings": "^1.2.1", - "inherits": "^2.0.3", - "nan": "^2.2.1", - "safe-buffer": "^5.1.0" - } - } - } - }, - "ethereumjs-tx": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", - "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", - "dev": true, - "requires": { - "ethereumjs-common": "^1.5.0", - "ethereumjs-util": "^6.0.0" - } - }, - "ethereumjs-util": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz", - "integrity": "sha512-vb0XN9J2QGdZGIEKG2vXM+kUdEivUfU6Wmi5y0cg+LRhDYKnXIZ/Lz7XjFbHRR9VIKq2lVGLzGBkA++y2nOdOQ==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "ethjs-util": "0.1.6", - "keccak": "^2.0.0", - "rlp": "^2.2.3", - "secp256k1": "^3.0.1" - } - }, - "keccak": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-2.1.0.tgz", - "integrity": "sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q==", - "dev": true, - "requires": { - "bindings": "^1.5.0", - "inherits": "^2.0.4", - "nan": "^2.14.0", - "safe-buffer": "^5.2.0" - } - } - } + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true }, - "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true } } }, - "eth-lib": { - "version": "0.1.29", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", - "integrity": "sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==", + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true, "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "nano-json-stream-parser": "^0.1.2", - "servify": "^0.1.12", - "ws": "^3.0.0", - "xhr-request-promise": "^0.1.2" + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + }, + "dependencies": { + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + } } }, - "eth-query": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/eth-query/-/eth-query-2.1.2.tgz", - "integrity": "sha1-1nQdkAAQa1FRDHLbktY2VFam2l4=", + "babelify": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/babelify/-/babelify-7.3.0.tgz", + "integrity": "sha1-qlau3nBn/XvVSWZu4W3ChQh+iOU=", "dev": true, "requires": { - "json-rpc-random-id": "^1.0.0", - "xtend": "^4.0.1" + "babel-core": "^6.0.14", + "object-assign": "^4.0.0" } }, - "eth-sig-util": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-2.3.0.tgz", - "integrity": "sha512-ugD1AvaggvKaZDgnS19W5qOfepjGc7qHrt7TrAaL54gJw9SHvgIXJ3r2xOMW30RWJZNP+1GlTOy5oye7yXA4xA==", + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "backoff": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/backoff/-/backoff-2.5.0.tgz", + "integrity": "sha1-9hbtqdPktmuMp/ynn2lXIsX44m8=", "dev": true, "requires": { - "buffer": "^5.2.1", - "elliptic": "^6.4.0", - "ethereumjs-abi": "0.6.5", - "ethereumjs-util": "^5.1.1", - "tweetnacl": "^1.0.0", - "tweetnacl-util": "^0.15.0" + "precond": "0.2" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" }, "dependencies": { - "ethereumjs-abi": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz", - "integrity": "sha1-WmN+8Wq0NHP6cqKa2QhxQFs/UkE=", - "dev": true, - "requires": { - "bn.js": "^4.10.0", - "ethereumjs-util": "^4.3.0" - }, - "dependencies": { - "ethereumjs-util": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-4.5.0.tgz", - "integrity": "sha1-PpQosxfuvaPXJg2FT93alUsfG8Y=", - "dev": true, - "requires": { - "bn.js": "^4.8.0", - "create-hash": "^1.1.2", - "keccakjs": "^0.2.0", - "rlp": "^2.0.0", - "secp256k1": "^3.0.1" - } - } - } - }, - "ethereumjs-util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", - "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "ethjs-util": "^0.1.3", - "keccak": "^1.0.2", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1", - "secp256k1": "^3.0.1" + "is-descriptor": "^1.0.0" } } } }, - "eth-tx-summary": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/eth-tx-summary/-/eth-tx-summary-3.2.4.tgz", - "integrity": "sha512-NtlDnaVZah146Rm8HMRUNMgIwG/ED4jiqk0TME9zFheMl1jOp6jL1m0NKGjJwehXQ6ZKCPr16MTr+qspKpEXNg==", + "base-x": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", + "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", "dev": true, "requires": { - "async": "^2.1.2", - "clone": "^2.0.0", - "concat-stream": "^1.5.1", - "end-of-stream": "^1.1.0", - "eth-query": "^2.0.2", - "ethereumjs-block": "^1.4.1", - "ethereumjs-tx": "^1.1.1", - "ethereumjs-util": "^5.0.1", - "ethereumjs-vm": "^2.6.0", - "through2": "^2.0.3" + "safe-buffer": "^5.0.1" + } + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" }, "dependencies": { - "ethereum-common": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.2.0.tgz", - "integrity": "sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA==", - "dev": true - }, - "ethereumjs-account": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz", - "integrity": "sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA==", - "dev": true, - "requires": { - "ethereumjs-util": "^5.0.0", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1" - } - }, - "ethereumjs-block": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz", - "integrity": "sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg==", - "dev": true, - "requires": { - "async": "^2.0.1", - "ethereum-common": "0.2.0", - "ethereumjs-tx": "^1.2.2", - "ethereumjs-util": "^5.0.0", - "merkle-patricia-tree": "^2.1.2" - } - }, - "ethereumjs-tx": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", - "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", - "dev": true, - "requires": { - "ethereum-common": "^0.0.18", - "ethereumjs-util": "^5.0.0" - }, - "dependencies": { - "ethereum-common": { - "version": "0.0.18", - "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", - "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=", - "dev": true - } - } - }, - "ethereumjs-util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", - "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", - "dev": true, - "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "ethjs-util": "^0.1.3", - "keccak": "^1.0.2", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1", - "secp256k1": "^3.0.1" - } - }, - "ethereumjs-vm": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz", - "integrity": "sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw==", - "dev": true, - "requires": { - "async": "^2.1.2", - "async-eventemitter": "^0.2.2", - "ethereumjs-account": "^2.0.3", - "ethereumjs-block": "~2.2.0", - "ethereumjs-common": "^1.1.0", - "ethereumjs-util": "^6.0.0", - "fake-merkle-patricia-tree": "^1.0.1", - "functional-red-black-tree": "^1.0.1", - "merkle-patricia-tree": "^2.3.2", - "rustbn.js": "~0.2.0", - "safe-buffer": "^5.1.1" - }, - "dependencies": { - "ethereumjs-block": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz", - "integrity": "sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg==", - "dev": true, - "requires": { - "async": "^2.0.1", - "ethereumjs-common": "^1.5.0", - "ethereumjs-tx": "^2.1.1", - "ethereumjs-util": "^5.0.0", - "merkle-patricia-tree": "^2.1.2" - }, - "dependencies": { - "ethereumjs-util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", - "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", - "dev": true, - "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "ethjs-util": "^0.1.3", - "keccak": "^1.0.2", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1", - "secp256k1": "^3.0.1" - } - }, - "keccak": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", - "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", - "dev": true, - "requires": { - "bindings": "^1.2.1", - "inherits": "^2.0.3", - "nan": "^2.2.1", - "safe-buffer": "^5.1.0" - } - } - } - }, - "ethereumjs-tx": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", - "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", - "dev": true, - "requires": { - "ethereumjs-common": "^1.5.0", - "ethereumjs-util": "^6.0.0" - } - }, - "ethereumjs-util": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz", - "integrity": "sha512-vb0XN9J2QGdZGIEKG2vXM+kUdEivUfU6Wmi5y0cg+LRhDYKnXIZ/Lz7XjFbHRR9VIKq2lVGLzGBkA++y2nOdOQ==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "ethjs-util": "0.1.6", - "keccak": "^2.0.0", - "rlp": "^2.2.3", - "secp256k1": "^3.0.1" - } - }, - "keccak": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-2.1.0.tgz", - "integrity": "sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q==", - "dev": true, - "requires": { - "bindings": "^1.5.0", - "inherits": "^2.0.4", - "nan": "^2.14.0", - "safe-buffer": "^5.2.0" - } - } - } - }, - "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", "dev": true } } }, - "ethashjs": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ethashjs/-/ethashjs-0.0.7.tgz", - "integrity": "sha1-ML/kGWcmaQoMWdO4Jy5w1NDDS64=", + "bignumber.js": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", + "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==", + "dev": true, + "optional": true + }, + "bip39": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/bip39/-/bip39-2.5.0.tgz", + "integrity": "sha512-xwIx/8JKoT2+IPJpFEfXoWdYwP7UVAoUxxLNfGCfVowaJE7yg1Y5B1BVPqlUNsBq5/nGwmFkwRJ8xDW4sX8OdA==", "dev": true, "requires": { - "async": "^1.4.2", - "buffer-xor": "^1.0.3", - "ethereumjs-util": "^4.0.1", - "miller-rabin": "^4.0.0" + "create-hash": "^1.1.0", + "pbkdf2": "^3.0.9", + "randombytes": "^2.0.1", + "safe-buffer": "^5.0.1", + "unorm": "^1.3.3" + } + }, + "blakejs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz", + "integrity": "sha1-ad+S75U6qIylGjLfarHFShVfx6U=", + "dev": true + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true, + "optional": true + }, + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + }, + "body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "dev": true, + "optional": true, + "requires": { + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" }, "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true, + "optional": true }, - "ethereumjs-util": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-4.5.0.tgz", - "integrity": "sha1-PpQosxfuvaPXJg2FT93alUsfG8Y=", + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", "dev": true, - "requires": { - "bn.js": "^4.8.0", - "create-hash": "^1.1.2", - "keccakjs": "^0.2.0", - "rlp": "^2.0.0", - "secp256k1": "^3.0.1" - } + "optional": true } } }, - "ethereum-bloom-filters": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.6.tgz", - "integrity": "sha512-dE9CGNzgOOsdh7msZirvv8qjHtnHpvBlKe2647kM8v+yeF71IRso55jpojemvHV+jMjr48irPWxMRaHuOWzAFA==", + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "requires": { - "js-sha3": "^0.8.0" - }, - "dependencies": { - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" - } + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "ethereum-common": { - "version": "0.0.18", - "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", - "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=", + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", "dev": true }, - "ethereumjs-abi": { - "version": "0.6.7", - "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.7.tgz", - "integrity": "sha512-EMLOA8ICO5yAaXDhjVEfYjsJIXYutY8ufTE93eEKwsVtp2usQreKwsDTJ9zvam3omYqNuffr8IONIqb2uUslGQ==", + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "dev": true, "requires": { - "bn.js": "^4.11.8", - "ethereumjs-util": "^6.0.0" + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, - "ethereumjs-account": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-3.0.0.tgz", - "integrity": "sha512-WP6BdscjiiPkQfF9PVfMcwx/rDvfZTjFKY0Uwc09zSQr9JfIVH87dYIJu0gNhBhpmovV4yq295fdllS925fnBA==", + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", "dev": true, + "optional": true, "requires": { - "ethereumjs-util": "^6.0.0", - "rlp": "^2.2.1", - "safe-buffer": "^5.1.1" + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" } }, - "ethereumjs-block": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz", - "integrity": "sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg==", + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", "dev": true, + "optional": true, "requires": { - "async": "^2.0.1", - "ethereumjs-common": "^1.5.0", - "ethereumjs-tx": "^2.1.1", - "ethereumjs-util": "^5.0.0", - "merkle-patricia-tree": "^2.1.2" + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "dev": true, + "optional": true, + "requires": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" }, "dependencies": { - "ethereumjs-util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", - "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", + "bn.js": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", + "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==", "dev": true, - "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "ethjs-util": "^0.1.3", - "keccak": "^1.0.2", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1", - "secp256k1": "^3.0.1" - } + "optional": true } } }, - "ethereumjs-blockchain": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/ethereumjs-blockchain/-/ethereumjs-blockchain-4.0.3.tgz", - "integrity": "sha512-0nJWbyA+Gu0ZKZr/cywMtB/77aS/4lOVsIKbgUN2sFQYscXO5rPbUfrEe7G2Zhjp86/a0VqLllemDSTHvx3vZA==", + "browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", "dev": true, + "optional": true, "requires": { - "async": "^2.6.1", - "ethashjs": "~0.0.7", - "ethereumjs-block": "~2.2.2", - "ethereumjs-common": "^1.5.0", - "ethereumjs-util": "~6.1.0", - "flow-stoplight": "^1.0.0", - "level-mem": "^3.0.1", - "lru-cache": "^5.1.1", - "rlp": "^2.2.2", - "semaphore": "^1.1.0" + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" }, "dependencies": { - "ethereumjs-util": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz", - "integrity": "sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q==", + "bn.js": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", + "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==", "dev": true, - "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "ethjs-util": "0.1.6", - "keccak": "^1.0.2", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1", - "secp256k1": "^3.0.1" - } + "optional": true }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, + "optional": true, "requires": { - "yallist": "^3.0.2" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" } } } }, - "ethereumjs-common": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.0.tgz", - "integrity": "sha512-SZOjgK1356hIY7MRj3/ma5qtfr/4B5BL+G4rP/XSMYr2z1H5el4RX5GReYCKmQmYI/nSBmRnwrZ17IfHuG0viQ==" + "browserslist": { + "version": "3.2.8", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz", + "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000844", + "electron-to-chromium": "^1.3.47" + } }, - "ethereumjs-tx": { + "bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", + "dev": true, + "requires": { + "base-x": "^3.0.2" + } + }, + "bs58check": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", - "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "dev": true, "requires": { - "ethereumjs-common": "^1.5.0", - "ethereumjs-util": "^6.0.0" + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" } }, - "ethereumjs-util": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz", - "integrity": "sha512-vb0XN9J2QGdZGIEKG2vXM+kUdEivUfU6Wmi5y0cg+LRhDYKnXIZ/Lz7XjFbHRR9VIKq2lVGLzGBkA++y2nOdOQ==", + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, "requires": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "ethjs-util": "0.1.6", - "keccak": "^2.0.0", - "rlp": "^2.2.3", - "secp256k1": "^3.0.1" - }, - "dependencies": { - "keccak": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-2.1.0.tgz", - "integrity": "sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q==", - "requires": { - "bindings": "^1.5.0", - "inherits": "^2.0.4", - "nan": "^2.14.0", - "safe-buffer": "^5.2.0" - } - }, - "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "buffer-to-arraybuffer": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", + "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=", + "dev": true, + "optional": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "bufferutil": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.3.tgz", + "integrity": "sha512-yEYTwGndELGvfXsImMBLop58eaGW+YdONi1fNjTINSY98tmMmFijBG6WXgdkfuLNt4imzQNtIE+eBp1PVpMCSw==", + "dev": true, + "requires": { + "node-gyp-build": "^4.2.0" + } + }, + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "dev": true, + "optional": true + }, + "bytewise": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/bytewise/-/bytewise-1.1.0.tgz", + "integrity": "sha1-HRPL/3F65xWAlKqIGzXQgbOHJT4=", + "dev": true, + "requires": { + "bytewise-core": "^1.2.2", + "typewise": "^1.0.3" + } + }, + "bytewise-core": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/bytewise-core/-/bytewise-core-1.2.3.tgz", + "integrity": "sha1-P7QQx+kVWOsasiqCg0V3qmvWHUI=", + "dev": true, + "requires": { + "typewise-core": "^1.2" + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "dev": true, + "optional": true, + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" + }, + "dependencies": { + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true, + "optional": true } } }, - "ethereumjs-vm": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-4.1.3.tgz", - "integrity": "sha512-RTrD0y7My4O6Qr1P2ZIsMfD6RzL6kU/RhBZ0a5XrPzAeR61crBS7or66ohDrvxDI/rDBxMi+6SnsELih6fzalw==", + "cachedown": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cachedown/-/cachedown-1.0.0.tgz", + "integrity": "sha1-1D8DbkUQaWsxJG19sx6/D3rDLRU=", "dev": true, "requires": { - "async": "^2.1.2", - "async-eventemitter": "^0.2.2", - "core-js-pure": "^3.0.1", - "ethereumjs-account": "^3.0.0", - "ethereumjs-block": "^2.2.2", - "ethereumjs-blockchain": "^4.0.3", - "ethereumjs-common": "^1.5.0", - "ethereumjs-tx": "^2.1.2", - "ethereumjs-util": "^6.2.0", - "fake-merkle-patricia-tree": "^1.0.1", - "functional-red-black-tree": "^1.0.1", - "merkle-patricia-tree": "^2.3.2", - "rustbn.js": "~0.2.0", - "safe-buffer": "^5.1.1", - "util.promisify": "^1.0.0" + "abstract-leveldown": "^2.4.1", + "lru-cache": "^3.2.0" }, "dependencies": { - "ethereumjs-util": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz", - "integrity": "sha512-vb0XN9J2QGdZGIEKG2vXM+kUdEivUfU6Wmi5y0cg+LRhDYKnXIZ/Lz7XjFbHRR9VIKq2lVGLzGBkA++y2nOdOQ==", + "abstract-leveldown": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", + "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", "dev": true, "requires": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "ethjs-util": "0.1.6", - "keccak": "^2.0.0", - "rlp": "^2.2.3", - "secp256k1": "^3.0.1" + "xtend": "~4.0.0" } }, - "keccak": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-2.1.0.tgz", - "integrity": "sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q==", + "lru-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-3.2.0.tgz", + "integrity": "sha1-cXibO39Tmb7IVl3aOKow0qCX7+4=", "dev": true, "requires": { - "bindings": "^1.5.0", - "inherits": "^2.0.4", - "nan": "^2.14.0", - "safe-buffer": "^5.2.0" + "pseudomap": "^1.0.1" } - }, - "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", - "dev": true } } }, - "ethereumjs-wallet": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-0.6.3.tgz", - "integrity": "sha512-qiXPiZOsStem+Dj/CQHbn5qex+FVkuPmGH7SvSnA9F3tdRDt8dLMyvIj3+U05QzVZNPYh4HXEdnzoYI4dZkr9w==", + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, - "optional": true, "requires": { - "aes-js": "^3.1.1", - "bs58check": "^2.1.2", - "ethereumjs-util": "^6.0.0", - "hdkey": "^1.1.0", - "randombytes": "^2.0.6", - "safe-buffer": "^5.1.2", - "scrypt.js": "^0.3.0", - "utf8": "^3.0.0", - "uuid": "^3.3.2" + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" } }, - "ethers": { - "version": "4.0.0-beta.3", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.0-beta.3.tgz", - "integrity": "sha512-YYPogooSknTwvHg3+Mv71gM/3Wcrx+ZpCzarBj3mqs9njjRkrOo2/eufzhHloOCo3JSoNI4TQJJ6yU5ABm3Uog==", - "requires": { - "aes-js": "3.0.0", - "bn.js": "^4.4.0", - "elliptic": "6.3.3", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.3", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - }, - "dependencies": { - "aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" - }, - "scrypt-js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", - "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==" - }, - "setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" - }, - "uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" - } - } + "caniuse-lite": { + "version": "1.0.30001174", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001174.tgz", + "integrity": "sha512-tqClL/4ThQq6cfFXH3oJL4rifFBeM6gTkphjao5kgwMaW9yn0tKgQLAEfKzDwj6HQWCB/aWo8kTFlSvIN8geEA==", + "dev": true }, - "ethjs-unit": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", - "integrity": "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=", + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, "requires": { - "bn.js": "4.11.6", - "number-to-bn": "1.7.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" - } + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, - "ethjs-util": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", - "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "checkpoint-store": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/checkpoint-store/-/checkpoint-store-1.1.0.tgz", + "integrity": "sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY=", + "dev": true, "requires": { - "is-hex-prefixed": "1.0.0", - "strip-hex-prefix": "1.0.0" + "functional-red-black-tree": "^1.0.1" } }, - "eventemitter3": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", - "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true, + "optional": true }, - "events": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.1.0.tgz", - "integrity": "sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg==" + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "cids": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", + "integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==", + "dev": true, + "optional": true, "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "execa": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-3.4.0.tgz", - "integrity": "sha512-r9vdGQk4bmCuK1yKQu1KTwcT2zwfWdbdaXfCtAh+5nU/4fSX+JAb7vZGvI5naJrQlvONrEB20jeruESI69530g==", - "requires": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "p-finally": "^2.0.0", - "signal-exit": "^3.0.2", - "strip-final-newline": "^2.0.0" + "buffer": "^5.5.0", + "class-is": "^1.1.0", + "multibase": "~0.6.0", + "multicodec": "^1.0.0", + "multihashes": "~0.4.15" }, "dependencies": { - "get-stream": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", - "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", + "multicodec": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", + "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", + "dev": true, + "optional": true, "requires": { - "pump": "^3.0.0" + "buffer": "^5.6.0", + "varint": "^5.0.0" } - }, - "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" - }, - "p-finally": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz", - "integrity": "sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==" } } }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, "requires": { - "debug": "^2.3.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "class-is": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", + "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==", + "dev": true, + "optional": true + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "isobject": "^3.0.0", + "static-extend": "^0.1.1" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, "requires": { "is-descriptor": "^0.1.0" } }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, "requires": { - "is-extendable": "^0.1.0" + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true } } }, - "expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, + "optional": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, "requires": { - "homedir-polyfill": "^1.0.1" + "color-name": "1.1.3" } }, - "express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, "requires": { - "accepts": "~1.3.7", - "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", - "content-type": "~1.0.4", - "cookie": "0.4.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.1.2", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" + "delayed-stream": "~1.0.0" + } + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "5.1.2" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "optional": true } } }, - "ext": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", - "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "content-hash": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/content-hash/-/content-hash-2.5.2.tgz", + "integrity": "sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==", + "dev": true, + "optional": true, "requires": { - "type": "^2.0.0" - }, - "dependencies": { - "type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz", - "integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==" - } + "cids": "^0.7.1", + "multicodec": "^0.5.5", + "multihashes": "^0.4.15" } }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true, + "optional": true }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" + "safe-buffer": "~5.1.1" }, "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "requires": { - "is-plain-object": "^2.0.4" - } + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true } } }, - "external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", + "dev": true, + "optional": true + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "dev": true, + "optional": true + }, + "cookiejar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==", + "dev": true, + "optional": true + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", + "dev": true + }, + "core-js-pure": { + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.8.2.tgz", + "integrity": "sha512-v6zfIQqL/pzTVAbZvYUozsxNfxcFb6Ks3ZfEbuneJl3FW9Jb8F6vLWB6f+qTmAu72msUdyb84V8d/yBFf7FNnw==", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, + "optional": true, "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, - "dependencies": { - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "requires": { - "os-tmpdir": "~1.0.2" - } - } + "object-assign": "^4", + "vary": "^1" } }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "dev": true, + "optional": true, "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" } }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } }, - "fake-merkle-patricia-tree": { + "cross-fetch": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-2.2.3.tgz", + "integrity": "sha512-PrWWNH3yL2NYIb/7WF/5vFG3DCQiXDOVf8k3ijatbrtnwNuhMWLC7YF7uqf53tbTFDzHIUD8oITw4Bxt8ST3Nw==", + "dev": true, + "requires": { + "node-fetch": "2.1.2", + "whatwg-fetch": "2.0.4" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "optional": true, + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "d": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz", - "integrity": "sha1-S4w6z7Ugr635hgsfFM2M40As3dM=", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", "dev": true, "requires": { - "checkpoint-store": "^1.1.0" + "es5-ext": "^0.10.50", + "type": "^1.0.1" } }, - "fancy-log": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz", - "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==", + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "dev": true, "requires": { - "ansi-gray": "^0.1.1", - "color-support": "^1.1.3", - "parse-node-version": "^1.0.0", - "time-stamp": "^1.0.0" + "assert-plus": "^1.0.0" } }, - "fast-deep-equal": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==" + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "optional": true, + "requires": { + "mimic-response": "^1.0.0" + } }, - "fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "deep-equal": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "dev": true, "requires": { - "pend": "~1.2.0" + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.1", + "is-regex": "^1.0.4", + "object-is": "^1.0.1", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.2.0" } }, - "fetch-ponyfill": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/fetch-ponyfill/-/fetch-ponyfill-4.1.0.tgz", - "integrity": "sha1-rjzl9zLGReq4fkroeTQUcJsjmJM=", + "defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", + "dev": true, + "optional": true + }, + "deferred-leveldown": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-4.0.2.tgz", + "integrity": "sha512-5fMC8ek8alH16QiV0lTCis610D1Zt1+LA4MS4d63JgS32lrCjTFDUFz2ao09/j2I4Bqb5jL4FZYwu7Jz0XO1ww==", "dev": true, "requires": { - "node-fetch": "~1.7.1" + "abstract-leveldown": "~5.0.0", + "inherits": "^2.0.3" }, "dependencies": { - "node-fetch": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", - "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "abstract-leveldown": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz", + "integrity": "sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A==", "dev": true, "requires": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" + "xtend": "~4.0.0" } } } }, - "figgy-pudding": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", - "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==" - }, - "figures": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.1.0.tgz", - "integrity": "sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==", + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, "requires": { - "escape-string-regexp": "^1.0.5" + "object-keys": "^1.0.12" } }, - "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, "requires": { - "flat-cache": "^2.0.1" + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" } }, - "file-type": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", - "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=" - }, - "file-uri-to-path": { + "defined": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" - }, - "filesize": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz", - "integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==" + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", + "dev": true }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - } - } + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true }, - "finalhandler": { + "depd": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true, + "optional": true }, - "find-cache-dir": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.2.0.tgz", - "integrity": "sha512-1JKclkYYsf1q9WIJKLZa9S9muC+08RIjzAlLrK4QcYLJMS6mk9yombQ9qf+zJ7H9LS800k0s44L4sDq9VYzqyg==", + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "dev": true, + "optional": true, "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.0", - "pkg-dir": "^4.1.0" - }, - "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "requires": { - "p-locate": "^4.1.0" - } - }, - "make-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.0.tgz", - "integrity": "sha512-grNJDhb8b1Jm1qeqW5R/O63wUo4UXo2v2HMic6YT9i/HBlF93S8jkMgH7yugvY9ABDShH4VZMn8I+U8+fCNegw==", - "requires": { - "semver": "^6.0.0" - } - }, - "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "requires": { - "find-up": "^4.0.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - } + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true, + "optional": true + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "^2.0.0" } }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "dev": true, + "optional": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" } }, - "findup-sync": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", - "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", + "dom-walk": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", + "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==", + "dev": true + }, + "dotignore": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/dotignore/-/dotignore-0.1.2.tgz", + "integrity": "sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw==", + "dev": true, "requires": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" + "minimatch": "^3.0.4" } }, - "fined": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", - "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true, + "optional": true + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", "dev": true, "requires": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^2.0.3", - "object.defaults": "^1.1.0", - "object.pick": "^1.2.0", - "parse-filepath": "^1.0.1" + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" } }, - "flagged-respawn": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", - "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true, + "optional": true + }, + "electron-to-chromium": { + "version": "1.3.636", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.636.tgz", + "integrity": "sha512-Adcvng33sd3gTjNIDNXGD1G4H6qCImIy2euUJAQHtLNplEKU5WEz5KRJxupRNIIT8sD5oFZLTKBWAf12Bsz24A==", "dev": true }, - "flat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", + "elliptic": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "dev": true, + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true, + "optional": true + }, + "encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, "requires": { - "is-buffer": "~2.0.3" + "iconv-lite": "^0.6.2" }, "dependencies": { - "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==" + "iconv-lite": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz", + "integrity": "sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } } } }, - "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "encoding-down": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/encoding-down/-/encoding-down-5.0.4.tgz", + "integrity": "sha512-8CIZLDcSKxgzT+zX8ZVfgNbu8Md2wq/iqa1Y7zyVR18QBEAc0Nmzuvj/N5ykSKpfGzjM8qxbaFntLPwnVoUhZw==", + "dev": true, "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" + "abstract-leveldown": "^5.0.0", + "inherits": "^2.0.3", + "level-codec": "^9.0.0", + "level-errors": "^2.0.0", + "xtend": "^4.0.1" }, "dependencies": { - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "abstract-leveldown": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz", + "integrity": "sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A==", + "dev": true, "requires": { - "glob": "^7.1.3" + "xtend": "~4.0.0" } } } }, - "flatted": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", - "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==" - }, - "flow-stoplight": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/flow-stoplight/-/flow-stoplight-1.0.0.tgz", - "integrity": "sha1-SiksW8/4s5+mzAyxqFPYbyfu/3s=", - "dev": true - }, - "flush-write-stream": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", - "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" + "once": "^1.4.0" } }, - "for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "errno": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", "dev": true, "requires": { - "is-callable": "^1.1.3" + "prr": "~1.0.1" } }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" - }, - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "es-abstract": { + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", "dev": true, "requires": { - "for-in": "^1.0.1" + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" } }, - "foreground-child": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", - "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, "requires": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" } }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "es5-ext": { + "version": "0.10.53", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", + "dev": true, "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.3", + "next-tick": "~1.0.0" } }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, "requires": { - "map-cache": "^0.2.2" + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" } }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dev": true, "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" + "d": "^1.0.1", + "ext": "^1.1.2" } }, - "fromentries": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.2.0.tgz", - "integrity": "sha512-33X7H/wdfO99GdRLLgkjUrD4geAFdq/Uv0kl3HD4da6HDixd2GUg8Mw7dahLCV9r/EARkmtYBB6Tch4EEokFTQ==" + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true, + "optional": true }, - "fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true }, - "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true, + "optional": true }, - "fs-minipass": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", - "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "eth-block-tracker": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-3.0.1.tgz", + "integrity": "sha512-WUVxWLuhMmsfenfZvFO5sbl1qFY2IqUlw/FPVmjjdElpqLsZtSG+wPe9Dz7W/sB6e80HgFKknOmKk2eNlznHug==", + "dev": true, "requires": { - "minipass": "^2.6.0" + "eth-query": "^2.1.0", + "ethereumjs-tx": "^1.3.3", + "ethereumjs-util": "^5.1.3", + "ethjs-util": "^0.1.3", + "json-rpc-engine": "^3.6.0", + "pify": "^2.3.0", + "tape": "^4.6.3" + }, + "dependencies": { + "ethereumjs-tx": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", + "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", + "dev": true, + "requires": { + "ethereum-common": "^0.0.18", + "ethereumjs-util": "^5.0.0" + } + }, + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dev": true, + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } } }, - "fs-mkdirp-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", - "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=", + "eth-ens-namehash": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", + "integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=", "dev": true, + "optional": true, "requires": { - "graceful-fs": "^4.1.11", - "through2": "^2.0.3" + "idna-uts46-hx": "^2.3.1", + "js-sha3": "^0.5.7" } }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "eth-json-rpc-infura": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/eth-json-rpc-infura/-/eth-json-rpc-infura-3.2.1.tgz", + "integrity": "sha512-W7zR4DZvyTn23Bxc0EWsq4XGDdD63+XPUCEhV2zQvQGavDVC4ZpFDK4k99qN7bd7/fjj37+rxmuBOBeIqCA5Mw==", + "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" + "cross-fetch": "^2.1.1", + "eth-json-rpc-middleware": "^1.5.0", + "json-rpc-engine": "^3.4.0", + "json-rpc-error": "^2.0.0" } }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.11.tgz", - "integrity": "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==", - "optional": true, + "eth-json-rpc-middleware": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/eth-json-rpc-middleware/-/eth-json-rpc-middleware-1.6.0.tgz", + "integrity": "sha512-tDVCTlrUvdqHKqivYMjtFZsdD7TtpNLBCfKAcOpaVs7orBMS/A8HWro6dIzNtTZIR05FAbJ3bioFOnZpuCew9Q==", + "dev": true, "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1", - "node-pre-gyp": "*" + "async": "^2.5.0", + "eth-query": "^2.1.2", + "eth-tx-summary": "^3.1.2", + "ethereumjs-block": "^1.6.0", + "ethereumjs-tx": "^1.3.3", + "ethereumjs-util": "^5.1.2", + "ethereumjs-vm": "^2.1.0", + "fetch-ponyfill": "^4.0.0", + "json-rpc-engine": "^3.6.0", + "json-rpc-error": "^2.0.0", + "json-stable-stringify": "^1.0.1", + "promise-to-callback": "^1.0.0", + "tape": "^4.6.3" }, "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.3", - "bundled": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "debug": { - "version": "3.2.6", - "bundled": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.7", - "bundled": true, - "optional": true, + "abstract-leveldown": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz", + "integrity": "sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA==", + "dev": true, "requires": { - "minipass": "^2.6.0" + "xtend": "~4.0.0" } }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "optional": true, + "deferred-leveldown": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", + "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==", + "dev": true, "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" + "abstract-leveldown": "~2.6.0" } }, - "glob": { - "version": "7.1.6", - "bundled": true, - "optional": true, + "ethereumjs-account": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz", + "integrity": "sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA==", + "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "ethereumjs-util": "^5.0.0", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" } }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "optional": true, + "ethereumjs-block": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz", + "integrity": "sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg==", + "dev": true, "requires": { - "safer-buffer": ">= 2.1.2 < 3" + "async": "^2.0.1", + "ethereum-common": "0.2.0", + "ethereumjs-tx": "^1.2.2", + "ethereumjs-util": "^5.0.0", + "merkle-patricia-tree": "^2.1.2" + }, + "dependencies": { + "ethereum-common": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.2.0.tgz", + "integrity": "sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA==", + "dev": true + } } }, - "ignore-walk": { - "version": "3.0.3", - "bundled": true, - "optional": true, + "ethereumjs-tx": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", + "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", + "dev": true, "requires": { - "minimatch": "^3.0.4" + "ethereum-common": "^0.0.18", + "ethereumjs-util": "^5.0.0" } }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "optional": true, + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dev": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" } }, - "inherits": { - "version": "2.0.4", - "bundled": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "optional": true, + "ethereumjs-vm": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz", + "integrity": "sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw==", + "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "async": "^2.1.2", + "async-eventemitter": "^0.2.2", + "ethereumjs-account": "^2.0.3", + "ethereumjs-block": "~2.2.0", + "ethereumjs-common": "^1.1.0", + "ethereumjs-util": "^6.0.0", + "fake-merkle-patricia-tree": "^1.0.1", + "functional-red-black-tree": "^1.0.1", + "merkle-patricia-tree": "^2.3.2", + "rustbn.js": "~0.2.0", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "ethereumjs-block": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz", + "integrity": "sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg==", + "dev": true, + "requires": { + "async": "^2.0.1", + "ethereumjs-common": "^1.5.0", + "ethereumjs-tx": "^2.1.1", + "ethereumjs-util": "^5.0.0", + "merkle-patricia-tree": "^2.1.2" + }, + "dependencies": { + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dev": true, + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + } + } + }, + "ethereumjs-tx": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", + "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", + "dev": true, + "requires": { + "ethereumjs-common": "^1.5.0", + "ethereumjs-util": "^6.0.0" + } + }, + "ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "dev": true, + "requires": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + } + } } }, "isarray": { - "version": "1.0.0", - "bundled": true, - "optional": true + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "optional": true, + "level-codec": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz", + "integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ==", + "dev": true + }, + "level-errors": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.0.5.tgz", + "integrity": "sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig==", + "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "errno": "~0.1.1" } }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "optional": true - }, - "minipass": { - "version": "2.9.0", - "bundled": true, - "optional": true, + "level-iterator-stream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz", + "integrity": "sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0=", + "dev": true, "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" + "inherits": "^2.0.1", + "level-errors": "^1.0.3", + "readable-stream": "^1.0.33", + "xtend": "^4.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + } } }, - "minizlib": { - "version": "1.3.3", - "bundled": true, - "optional": true, + "level-ws": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz", + "integrity": "sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos=", + "dev": true, "requires": { - "minipass": "^2.9.0" + "readable-stream": "~1.0.15", + "xtend": "~2.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "xtend": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", + "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", + "dev": true, + "requires": { + "object-keys": "~0.4.0" + } + } } }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "optional": true, + "levelup": { + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz", + "integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==", + "dev": true, "requires": { - "minimist": "0.0.8" + "deferred-leveldown": "~1.2.1", + "level-codec": "~7.0.0", + "level-errors": "~1.0.3", + "level-iterator-stream": "~1.3.0", + "prr": "~1.0.1", + "semver": "~5.4.1", + "xtend": "~4.0.0" } }, - "ms": { - "version": "2.1.2", - "bundled": true, - "optional": true + "ltgt": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", + "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=", + "dev": true }, - "needle": { - "version": "2.4.0", - "bundled": true, - "optional": true, + "memdown": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/memdown/-/memdown-1.4.1.tgz", + "integrity": "sha1-tOThkhdGZP+65BNhqlAPMRnv4hU=", + "dev": true, "requires": { - "debug": "^3.2.6", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" + "abstract-leveldown": "~2.7.1", + "functional-red-black-tree": "^1.0.1", + "immediate": "^3.2.3", + "inherits": "~2.0.1", + "ltgt": "~2.2.0", + "safe-buffer": "~5.1.1" + }, + "dependencies": { + "abstract-leveldown": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", + "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", + "dev": true, + "requires": { + "xtend": "~4.0.0" + } + } } }, - "node-pre-gyp": { - "version": "0.14.0", - "bundled": true, - "optional": true, + "merkle-patricia-tree": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz", + "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==", + "dev": true, "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4.4.2" + "async": "^1.4.2", + "ethereumjs-util": "^5.0.0", + "level-ws": "0.0.0", + "levelup": "^1.2.1", + "memdown": "^1.0.0", + "readable-stream": "^2.0.0", + "rlp": "^2.0.0", + "semaphore": ">=1.0.1" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + } } }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } + "object-keys": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", + "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", + "dev": true }, - "npm-bundled": { - "version": "1.1.1", - "bundled": true, - "optional": true, - "requires": { - "npm-normalize-package-bin": "^1.0.1" - } + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true }, - "npm-normalize-package-bin": { - "version": "1.0.1", - "bundled": true, - "optional": true + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "dev": true }, - "npm-packlist": { - "version": "1.4.7", - "bundled": true, - "optional": true, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "eth-lib": { + "version": "0.1.29", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", + "integrity": "sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==", + "dev": true, + "optional": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "nano-json-stream-parser": "^0.1.2", + "servify": "^0.1.12", + "ws": "^3.0.0", + "xhr-request-promise": "^0.1.2" + } + }, + "eth-query": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/eth-query/-/eth-query-2.1.2.tgz", + "integrity": "sha1-1nQdkAAQa1FRDHLbktY2VFam2l4=", + "dev": true, + "requires": { + "json-rpc-random-id": "^1.0.0", + "xtend": "^4.0.1" + } + }, + "eth-sig-util": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-3.0.0.tgz", + "integrity": "sha512-4eFkMOhpGbTxBQ3AMzVf0haUX2uTur7DpWiHzWyTURa28BVJJtOkcb9Ok5TV0YvEPG61DODPW7ZUATbJTslioQ==", + "dev": true, + "requires": { + "buffer": "^5.2.1", + "elliptic": "^6.4.0", + "ethereumjs-abi": "0.6.5", + "ethereumjs-util": "^5.1.1", + "tweetnacl": "^1.0.0", + "tweetnacl-util": "^0.15.0" + }, + "dependencies": { + "ethereumjs-abi": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz", + "integrity": "sha1-WmN+8Wq0NHP6cqKa2QhxQFs/UkE=", + "dev": true, "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" + "bn.js": "^4.10.0", + "ethereumjs-util": "^4.3.0" + }, + "dependencies": { + "ethereumjs-util": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-4.5.1.tgz", + "integrity": "sha512-WrckOZ7uBnei4+AKimpuF1B3Fv25OmoRgmYCpGsP7u8PFxXAmAgiJSYT2kRWnt6fVIlKaQlZvuwXp7PIrmn3/w==", + "dev": true, + "requires": { + "bn.js": "^4.8.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "rlp": "^2.0.0" + } + } } }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "optional": true, + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dev": true, "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "optional": true, + } + } + }, + "eth-tx-summary": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/eth-tx-summary/-/eth-tx-summary-3.2.4.tgz", + "integrity": "sha512-NtlDnaVZah146Rm8HMRUNMgIwG/ED4jiqk0TME9zFheMl1jOp6jL1m0NKGjJwehXQ6ZKCPr16MTr+qspKpEXNg==", + "dev": true, + "requires": { + "async": "^2.1.2", + "clone": "^2.0.0", + "concat-stream": "^1.5.1", + "end-of-stream": "^1.1.0", + "eth-query": "^2.0.2", + "ethereumjs-block": "^1.4.1", + "ethereumjs-tx": "^1.1.1", + "ethereumjs-util": "^5.0.1", + "ethereumjs-vm": "^2.6.0", + "through2": "^2.0.3" + }, + "dependencies": { + "abstract-leveldown": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz", + "integrity": "sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA==", + "dev": true, "requires": { - "wrappy": "1" + "xtend": "~4.0.0" } }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "optional": true, + "deferred-leveldown": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", + "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==", + "dev": true, "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" + "abstract-leveldown": "~2.6.0" } }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.1", - "bundled": true, - "optional": true + "ethereumjs-account": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz", + "integrity": "sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA==", + "dev": true, + "requires": { + "ethereumjs-util": "^5.0.0", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } }, - "rc": { - "version": "1.2.8", - "bundled": true, - "optional": true, + "ethereumjs-block": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz", + "integrity": "sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg==", + "dev": true, "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" + "async": "^2.0.1", + "ethereum-common": "0.2.0", + "ethereumjs-tx": "^1.2.2", + "ethereumjs-util": "^5.0.0", + "merkle-patricia-tree": "^2.1.2" }, "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "optional": true + "ethereum-common": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.2.0.tgz", + "integrity": "sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA==", + "dev": true } } }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "optional": true, + "ethereumjs-tx": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", + "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", + "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "ethereum-common": "^0.0.18", + "ethereumjs-util": "^5.0.0" } }, - "rimraf": { - "version": "2.7.1", - "bundled": true, - "optional": true, + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dev": true, "requires": { - "glob": "^7.1.3" + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" } }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "optional": true - }, - "semver": { - "version": "5.7.1", - "bundled": true, - "optional": true + "ethereumjs-vm": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz", + "integrity": "sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw==", + "dev": true, + "requires": { + "async": "^2.1.2", + "async-eventemitter": "^0.2.2", + "ethereumjs-account": "^2.0.3", + "ethereumjs-block": "~2.2.0", + "ethereumjs-common": "^1.1.0", + "ethereumjs-util": "^6.0.0", + "fake-merkle-patricia-tree": "^1.0.1", + "functional-red-black-tree": "^1.0.1", + "merkle-patricia-tree": "^2.3.2", + "rustbn.js": "~0.2.0", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "ethereumjs-block": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz", + "integrity": "sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg==", + "dev": true, + "requires": { + "async": "^2.0.1", + "ethereumjs-common": "^1.5.0", + "ethereumjs-tx": "^2.1.1", + "ethereumjs-util": "^5.0.0", + "merkle-patricia-tree": "^2.1.2" + }, + "dependencies": { + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dev": true, + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + } + } + }, + "ethereumjs-tx": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", + "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", + "dev": true, + "requires": { + "ethereumjs-common": "^1.5.0", + "ethereumjs-util": "^6.0.0" + } + }, + "ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "dev": true, + "requires": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + } + } + } }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "optional": true + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "optional": true + "level-codec": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz", + "integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ==", + "dev": true }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "optional": true, + "level-errors": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.0.5.tgz", + "integrity": "sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig==", + "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "errno": "~0.1.1" } }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "optional": true, + "level-iterator-stream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz", + "integrity": "sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0=", + "dev": true, "requires": { - "safe-buffer": "~5.1.0" + "inherits": "^2.0.1", + "level-errors": "^1.0.3", + "readable-stream": "^1.0.33", + "xtend": "^4.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + } } }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "optional": true, + "level-ws": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz", + "integrity": "sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos=", + "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "readable-stream": "~1.0.15", + "xtend": "~2.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "xtend": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", + "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", + "dev": true, + "requires": { + "object-keys": "~0.4.0" + } + } } }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "optional": true - }, - "tar": { - "version": "4.4.13", - "bundled": true, - "optional": true, + "levelup": { + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz", + "integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==", + "dev": true, "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.8.6", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" + "deferred-leveldown": "~1.2.1", + "level-codec": "~7.0.0", + "level-errors": "~1.0.3", + "level-iterator-stream": "~1.3.0", + "prr": "~1.0.1", + "semver": "~5.4.1", + "xtend": "~4.0.0" } }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "optional": true + "ltgt": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", + "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=", + "dev": true }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "optional": true, + "memdown": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/memdown/-/memdown-1.4.1.tgz", + "integrity": "sha1-tOThkhdGZP+65BNhqlAPMRnv4hU=", + "dev": true, "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "yallist": { - "version": "3.1.1", - "bundled": true, - "optional": true - } - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" - }, - "generic-pool": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/generic-pool/-/generic-pool-2.0.4.tgz", - "integrity": "sha1-+XGN7agvoSXtXEPjQcmiFadm2aM=" - }, - "gensync": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", - "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==" - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "get-own-enumerable-property-symbols": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", - "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==" - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "requires": { - "pump": "^3.0.0" - } - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "abstract-leveldown": "~2.7.1", + "functional-red-black-tree": "^1.0.1", + "immediate": "^3.2.3", + "inherits": "~2.0.1", + "ltgt": "~2.2.0", + "safe-buffer": "~5.1.1" + }, + "dependencies": { + "abstract-leveldown": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", + "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", + "dev": true, + "requires": { + "xtend": "~4.0.0" + } + } + } + }, + "merkle-patricia-tree": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz", + "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==", + "dev": true, + "requires": { + "async": "^1.4.2", + "ethereumjs-util": "^5.0.0", + "level-ws": "0.0.0", + "levelup": "^1.2.1", + "memdown": "^1.0.0", + "readable-stream": "^2.0.0", + "rlp": "^2.0.0", + "semaphore": ">=1.0.1" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + } + } + }, + "object-keys": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", + "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", + "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "dev": true + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } } }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "ethashjs": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/ethashjs/-/ethashjs-0.0.8.tgz", + "integrity": "sha512-/MSbf/r2/Ld8o0l15AymjOTlPqpN8Cr4ByUEA9GtR4x0yAh3TdtDzEg29zMjXCNPI7u6E5fOQdj/Cf9Tc7oVNw==", + "dev": true, "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" + "async": "^2.1.2", + "buffer-xor": "^2.0.1", + "ethereumjs-util": "^7.0.2", + "miller-rabin": "^4.0.0" }, "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "bn.js": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", + "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==", + "dev": true + }, + "buffer-xor": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-2.0.2.tgz", + "integrity": "sha512-eHslX0bin3GB+Lx2p7lEYRShRewuNZL3fUl4qlVJGGiwoPGftmt8JQgk2Y9Ji5/01TnVDo33E5b5O3vUB1HdqQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.1" + } + }, + "ethereumjs-util": { + "version": "7.0.7", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.0.7.tgz", + "integrity": "sha512-vU5rtZBlZsgkTw3o6PDKyB8li2EgLavnAbsKcfsH2YhHH1Le+PP8vEiMnAnvgc1B6uMoaM5GDCrVztBw0Q5K9g==", + "dev": true, "requires": { - "is-extglob": "^2.1.0" + "@types/bn.js": "^4.11.3", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.4" } } } }, - "glob-stream": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", - "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=", - "dev": true, - "requires": { - "extend": "^3.0.0", - "glob": "^7.1.1", - "glob-parent": "^3.1.0", - "is-negated-glob": "^1.0.0", - "ordered-read-streams": "^1.0.0", - "pumpify": "^1.3.5", - "readable-stream": "^2.1.5", - "remove-trailing-separator": "^1.0.1", - "to-absolute-glob": "^2.0.0", - "unique-stream": "^2.0.2" - } - }, - "glob-watcher": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.3.tgz", - "integrity": "sha512-8tWsULNEPHKQ2MR4zXuzSmqbdyV5PtwwCaWSGQ1WwHsJ07ilNeN1JB8ntxhckbnpSHaf9dXFUHzIWvm1I13dsg==", + "ethereum-bloom-filters": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.7.tgz", + "integrity": "sha512-cDcJJSJ9GMAcURiAWO3DxIEhTL/uWqlQnvgKpuYQzYPrt/izuGU+1ntQmHt0IRq6ADoSYHFnB+aCEFIldjhkMQ==", "dev": true, + "optional": true, "requires": { - "anymatch": "^2.0.0", - "async-done": "^1.2.0", - "chokidar": "^2.0.0", - "is-negated-glob": "^1.0.0", - "just-debounce": "^1.0.0", - "object.defaults": "^1.1.0" - } - }, - "global": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", - "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", - "requires": { - "min-document": "^2.19.0", - "process": "~0.5.1" + "js-sha3": "^0.8.0" + }, + "dependencies": { + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true, + "optional": true + } } }, - "global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - } + "ethereum-common": { + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", + "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=", + "dev": true }, - "global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, "requires": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" } }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true - }, - "glogg": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz", - "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==", + "ethereumjs-abi": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", + "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", "dev": true, "requires": { - "sparkles": "^1.0.0" + "bn.js": "^4.11.8", + "ethereumjs-util": "^6.0.0" } }, - "got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "ethereumjs-account": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-3.0.0.tgz", + "integrity": "sha512-WP6BdscjiiPkQfF9PVfMcwx/rDvfZTjFKY0Uwc09zSQr9JfIVH87dYIJu0gNhBhpmovV4yq295fdllS925fnBA==", + "dev": true, "requires": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" + "ethereumjs-util": "^6.0.0", + "rlp": "^2.2.1", + "safe-buffer": "^5.1.1" } }, - "graceful-fs": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", - "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==" - }, - "graceful-readlink": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", - "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=" - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==" - }, - "gulp": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz", - "integrity": "sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==", + "ethereumjs-block": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz", + "integrity": "sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg==", "dev": true, "requires": { - "glob-watcher": "^5.0.3", - "gulp-cli": "^2.2.0", - "undertaker": "^1.2.1", - "vinyl-fs": "^3.0.0" + "async": "^2.0.1", + "ethereumjs-common": "^1.5.0", + "ethereumjs-tx": "^2.1.1", + "ethereumjs-util": "^5.0.0", + "merkle-patricia-tree": "^2.1.2" }, "dependencies": { - "gulp-cli": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.2.0.tgz", - "integrity": "sha512-rGs3bVYHdyJpLqR0TUBnlcZ1O5O++Zs4bA0ajm+zr3WFCfiSLjGwoCBqFs18wzN+ZxahT9DkOK5nDf26iDsWjA==", + "abstract-leveldown": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz", + "integrity": "sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA==", "dev": true, "requires": { - "ansi-colors": "^1.0.1", - "archy": "^1.0.0", - "array-sort": "^1.0.0", - "color-support": "^1.1.3", - "concat-stream": "^1.6.0", - "copy-props": "^2.0.1", - "fancy-log": "^1.3.2", - "gulplog": "^1.0.0", - "interpret": "^1.1.0", - "isobject": "^3.0.1", - "liftoff": "^3.1.0", - "matchdep": "^2.0.0", - "mute-stdout": "^1.0.0", - "pretty-hrtime": "^1.0.0", - "replace-homedir": "^1.0.0", - "semver-greatest-satisfied-range": "^1.1.0", - "v8flags": "^3.0.1", - "yargs": "^7.1.0" + "xtend": "~4.0.0" + } + }, + "deferred-leveldown": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", + "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==", + "dev": true, + "requires": { + "abstract-leveldown": "~2.6.0" + } + }, + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dev": true, + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "level-codec": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz", + "integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ==", + "dev": true + }, + "level-errors": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.0.5.tgz", + "integrity": "sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig==", + "dev": true, + "requires": { + "errno": "~0.1.1" + } + }, + "level-iterator-stream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz", + "integrity": "sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "level-errors": "^1.0.3", + "readable-stream": "^1.0.33", + "xtend": "^4.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + } + } + }, + "level-ws": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz", + "integrity": "sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos=", + "dev": true, + "requires": { + "readable-stream": "~1.0.15", + "xtend": "~2.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "xtend": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", + "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", + "dev": true, + "requires": { + "object-keys": "~0.4.0" + } + } + } + }, + "levelup": { + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz", + "integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==", + "dev": true, + "requires": { + "deferred-leveldown": "~1.2.1", + "level-codec": "~7.0.0", + "level-errors": "~1.0.3", + "level-iterator-stream": "~1.3.0", + "prr": "~1.0.1", + "semver": "~5.4.1", + "xtend": "~4.0.0" + } + }, + "ltgt": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", + "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=", + "dev": true + }, + "memdown": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/memdown/-/memdown-1.4.1.tgz", + "integrity": "sha1-tOThkhdGZP+65BNhqlAPMRnv4hU=", + "dev": true, + "requires": { + "abstract-leveldown": "~2.7.1", + "functional-red-black-tree": "^1.0.1", + "immediate": "^3.2.3", + "inherits": "~2.0.1", + "ltgt": "~2.2.0", + "safe-buffer": "~5.1.1" + }, + "dependencies": { + "abstract-leveldown": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", + "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", + "dev": true, + "requires": { + "xtend": "~4.0.0" + } + } } - } - } - }, - "gulplog": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", - "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", - "dev": true, - "requires": { - "glogg": "^1.0.0" - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" - }, - "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", - "requires": { - "ajv": "^6.5.5", - "har-schema": "^2.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "has-symbol-support-x": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", - "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==" - }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" - }, - "has-to-string-tag-x": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", - "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", - "requires": { - "has-symbol-support-x": "^1.4.1" - } - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + }, + "merkle-patricia-tree": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz", + "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==", + "dev": true, "requires": { - "is-buffer": "^1.1.5" + "async": "^1.4.2", + "ethereumjs-util": "^5.0.0", + "level-ws": "0.0.0", + "levelup": "^1.2.1", + "memdown": "^1.0.0", + "readable-stream": "^2.0.0", + "rlp": "^2.0.0", + "semaphore": ">=1.0.1" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + } } + }, + "object-keys": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", + "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", + "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "dev": true + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true } } }, - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "hasha": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.1.0.tgz", - "integrity": "sha512-OFPDWmzPN1l7atOV1TgBVmNtBxaIysToK6Ve9DK+vT6pYuklw/nPNT+HJbZi0KDcI6vWB+9tgvZ5YD7fA3CXcA==", - "requires": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - }, - "dependencies": { - "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" - } - } - }, - "hdkey": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/hdkey/-/hdkey-1.1.1.tgz", - "integrity": "sha512-DvHZ5OuavsfWs5yfVJZestsnc3wzPvLWNk6c2nRUfo6X+OtxypGt20vDDf7Ba+MJzjL3KS1og2nw2eBbLCOUTA==", + "ethereumjs-blockchain": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/ethereumjs-blockchain/-/ethereumjs-blockchain-4.0.4.tgz", + "integrity": "sha512-zCxaRMUOzzjvX78DTGiKjA+4h2/sF0OYL1QuPux0DHpyq8XiNoF5GYHtb++GUxVlMsMfZV7AVyzbtgcRdIcEPQ==", "dev": true, - "optional": true, "requires": { - "coinstring": "^2.0.0", - "safe-buffer": "^5.1.1", - "secp256k1": "^3.0.1" + "async": "^2.6.1", + "ethashjs": "~0.0.7", + "ethereumjs-block": "~2.2.2", + "ethereumjs-common": "^1.5.0", + "ethereumjs-util": "^6.1.0", + "flow-stoplight": "^1.0.0", + "level-mem": "^3.0.1", + "lru-cache": "^5.1.1", + "rlp": "^2.2.2", + "semaphore": "^1.1.0" } }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" - }, - "heap": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/heap/-/heap-0.2.6.tgz", - "integrity": "sha1-CH4fELBGky/IWU3Z5tN4r8nR5aw=", + "ethereumjs-common": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.0.tgz", + "integrity": "sha512-SZOjgK1356hIY7MRj3/ma5qtfr/4B5BL+G4rP/XSMYr2z1H5el4RX5GReYCKmQmYI/nSBmRnwrZ17IfHuG0viQ==", "dev": true }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "home-or-tmp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", - "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "ethereumjs-tx": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", + "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", "dev": true, "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.1" - } - }, - "homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "requires": { - "parse-passwd": "^1.0.0" + "ethereumjs-common": "^1.5.0", + "ethereumjs-util": "^6.0.0" } }, - "hosted-git-info": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", - "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==" - }, - "html-escaper": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.0.tgz", - "integrity": "sha512-a4u9BeERWGu/S8JiWEAQcdrg9v4QArtP9keViQjGMdff20fBdd8waotXaNmODqBe6uZ3Nafi7K/ho4gCQHV3Ig==" - }, - "http-cache-semantics": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.0.3.tgz", - "integrity": "sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew==" - }, - "http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "dev": true, "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - } + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" } }, - "http-https": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", - "integrity": "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=" - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "ethereumjs-vm": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-4.2.0.tgz", + "integrity": "sha512-X6qqZbsY33p5FTuZqCnQ4+lo957iUJMM6Mpa6bL4UW0dxM6WmDSHuI4j/zOp1E2TDKImBGCJA9QPfc08PaNubA==", + "dev": true, "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" - }, - "human-signals": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", - "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==" - }, - "humanize": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/humanize/-/humanize-0.0.9.tgz", - "integrity": "sha1-GZT/rs3+nEQe0r2sdFK3u0yeQaQ=" - }, - "husky": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/husky/-/husky-4.0.10.tgz", - "integrity": "sha512-Ptm4k2DqOwxeK/kzu5RaJmNRoGvESrgDXObFcZ8aJZcyXyMBHhM2FqZj6zYKdetadmP3wCwxEHCBuB9xGlRp8A==", - "requires": { - "chalk": "^3.0.0", - "ci-info": "^2.0.0", - "cosmiconfig": "^6.0.0", - "opencollective-postinstall": "^2.0.2", - "pkg-dir": "^4.2.0", - "please-upgrade-node": "^3.2.0", - "slash": "^3.0.0", - "which-pm-runs": "^1.0.0" + "async": "^2.1.2", + "async-eventemitter": "^0.2.2", + "core-js-pure": "^3.0.1", + "ethereumjs-account": "^3.0.0", + "ethereumjs-block": "^2.2.2", + "ethereumjs-blockchain": "^4.0.3", + "ethereumjs-common": "^1.5.0", + "ethereumjs-tx": "^2.1.2", + "ethereumjs-util": "^6.2.0", + "fake-merkle-patricia-tree": "^1.0.1", + "functional-red-black-tree": "^1.0.1", + "merkle-patricia-tree": "^2.3.2", + "rustbn.js": "~0.2.0", + "safe-buffer": "^5.1.1", + "util.promisify": "^1.0.0" }, "dependencies": { - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "abstract-leveldown": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz", + "integrity": "sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA==", + "dev": true, "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" + "xtend": "~4.0.0" } }, - "chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "deferred-leveldown": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", + "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==", + "dev": true, "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "abstract-leveldown": "~2.6.0" } }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "level-codec": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz", + "integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ==", + "dev": true }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "level-errors": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.0.5.tgz", + "integrity": "sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig==", + "dev": true, "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "errno": "~0.1.1" } }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "level-iterator-stream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz", + "integrity": "sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0=", + "dev": true, "requires": { - "p-locate": "^4.1.0" + "inherits": "^2.0.1", + "level-errors": "^1.0.3", + "readable-stream": "^1.0.33", + "xtend": "^4.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + } } }, - "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", + "level-ws": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz", + "integrity": "sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos=", + "dev": true, "requires": { - "p-try": "^2.0.0" + "readable-stream": "~1.0.15", + "xtend": "~2.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "xtend": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", + "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", + "dev": true, + "requires": { + "object-keys": "~0.4.0" + } + } } }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "levelup": { + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz", + "integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==", + "dev": true, "requires": { - "p-limit": "^2.2.0" + "deferred-leveldown": "~1.2.1", + "level-codec": "~7.0.0", + "level-errors": "~1.0.3", + "level-iterator-stream": "~1.3.0", + "prr": "~1.0.1", + "semver": "~5.4.1", + "xtend": "~4.0.0" } }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + "ltgt": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", + "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=", + "dev": true }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "memdown": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/memdown/-/memdown-1.4.1.tgz", + "integrity": "sha1-tOThkhdGZP+65BNhqlAPMRnv4hU=", + "dev": true, "requires": { - "find-up": "^4.0.0" + "abstract-leveldown": "~2.7.1", + "functional-red-black-tree": "^1.0.1", + "immediate": "^3.2.3", + "inherits": "~2.0.1", + "ltgt": "~2.2.0", + "safe-buffer": "~5.1.1" + }, + "dependencies": { + "abstract-leveldown": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", + "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", + "dev": true, + "requires": { + "xtend": "~4.0.0" + } + } } }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "merkle-patricia-tree": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz", + "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==", + "dev": true, "requires": { - "has-flag": "^4.0.0" + "async": "^1.4.2", + "ethereumjs-util": "^5.0.0", + "level-ws": "0.0.0", + "levelup": "^1.2.1", + "memdown": "^1.0.0", + "readable-stream": "^2.0.0", + "rlp": "^2.0.0", + "semaphore": ">=1.0.1" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dev": true, + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + } } + }, + "object-keys": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", + "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", + "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "dev": true + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true } } }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "ethereumjs-wallet": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-0.6.5.tgz", + "integrity": "sha512-MDwjwB9VQVnpp/Dc1XzA6J1a3wgHQ4hSvA1uWNatdpOrtCbPVuQSKSyRnjLvS0a+KKMw2pvQ9Ybqpb3+eW8oNA==", + "dev": true, + "optional": true, "requires": { - "safer-buffer": ">= 2.1.2 < 3" + "aes-js": "^3.1.1", + "bs58check": "^2.1.2", + "ethereum-cryptography": "^0.1.3", + "ethereumjs-util": "^6.0.0", + "randombytes": "^2.0.6", + "safe-buffer": "^5.1.2", + "scryptsy": "^1.2.1", + "utf8": "^3.0.0", + "uuid": "^3.3.2" } }, - "idna-uts46-hx": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", - "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", + "ethjs-unit": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", + "integrity": "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=", + "dev": true, + "optional": true, "requires": { - "punycode": "2.1.0" + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" }, "dependencies": { - "punycode": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", - "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=" + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", + "dev": true, + "optional": true } } }, - "ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" - }, - "iferr": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" - }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" - }, - "immediate": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.2.3.tgz", - "integrity": "sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw=" - }, - "import-fresh": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", - "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "import-local": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", - "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", + "ethjs-util": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "dev": true, "requires": { - "pkg-dir": "^3.0.0", - "resolve-cwd": "^2.0.0" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "requires": { - "find-up": "^3.0.0" - } - } + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" } }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + "eventemitter3": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", + "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", + "dev": true, + "optional": true }, - "indent-string": { + "events": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=" - }, - "infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==" + "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz", + "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==", + "dev": true }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" } }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" - }, - "inquirer": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.4.tgz", - "integrity": "sha512-Bu5Td5+j11sCkqfqmUTiwv+tWisMtP0L7Q8WrqA2C/BbBhy1YTdFrvjjlrKq8oagA/tLQBski2Gcx/Sqyi2qSQ==", + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, "requires": { - "ansi-escapes": "^4.2.1", - "chalk": "^2.4.2", - "cli-cursor": "^3.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.15", - "mute-stream": "0.0.8", - "run-async": "^2.2.0", - "rxjs": "^6.5.3", - "string-width": "^4.1.0", - "strip-ansi": "^5.1.0", - "through": "^2.3.6" + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "requires": { - "color-convert": "^1.9.0" + "ms": "2.0.0" } }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "is-descriptor": "^0.1.0" } }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" - }, - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" + "kind-of": "^3.0.2" }, "dependencies": { - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, "requires": { - "ansi-regex": "^5.0.0" + "is-buffer": "^1.1.5" } } } }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "kind-of": "^3.0.2" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } } } }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "interpret": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", - "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==" - }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, - "ipaddr.js": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", - "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" - }, - "is-absolute": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", - "dev": true, - "requires": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-arguments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", - "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", - "dev": true - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - }, - "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==" - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" } - } - } - }, - "is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==" - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, "kind-of": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" - }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", "dev": true, + "optional": true, "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-fn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fn/-/is-fn-1.0.0.tgz", - "integrity": "sha1-lUPV3nvPWwiiLsiiC65uKG1RDYw=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-function": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.1.tgz", - "integrity": "sha1-Es+5i2W1fdPRk6MSH19uL0N2ArU=" - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-hex-prefixed": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", - "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" - }, - "is-natural-number": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", - "integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=" - }, - "is-negated-glob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", - "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=", - "dev": true - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "requires": { - "kind-of": "^3.0.2" + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" }, "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "optional": true, "requires": { - "is-buffer": "^1.1.5" + "ms": "2.0.0" } - } - } - }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" - }, - "is-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", - "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=" - }, - "is-observable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-1.1.0.tgz", - "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==", - "requires": { - "symbol-observable": "^1.1.0" - } - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "requires": { - "isobject": "^3.0.1" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true, + "optional": true + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", + "dev": true, + "optional": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "optional": true + } } }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" - }, - "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "ext": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "dev": true, "requires": { - "has": "^1.0.3" + "type": "^2.0.0" + }, + "dependencies": { + "type": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.1.0.tgz", + "integrity": "sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA==", + "dev": true + } } }, - "is-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", - "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=" + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true }, - "is-relative": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "dev": true, "requires": { - "is-unc-path": "^1.0.0" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" } }, - "is-retry-allowed": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", - "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - }, - "is-string": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", - "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==" - }, - "is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, "requires": { - "has-symbols": "^1.0.1" + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + } } }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true }, - "is-unc-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "fake-merkle-patricia-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz", + "integrity": "sha1-S4w6z7Ugr635hgsfFM2M40As3dM=", "dev": true, "requires": { - "unc-path-regex": "^0.1.2" + "checkpoint-store": "^1.1.0" } }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "is-valid-glob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", - "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=", + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" - }, - "is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=" - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "istanbul-lib-coverage": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", - "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==" - }, - "istanbul-lib-hook": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", - "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", + "fetch-ponyfill": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/fetch-ponyfill/-/fetch-ponyfill-4.1.0.tgz", + "integrity": "sha1-rjzl9zLGReq4fkroeTQUcJsjmJM=", + "dev": true, "requires": { - "append-transform": "^2.0.0" - } - }, - "istanbul-lib-instrument": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.0.tgz", - "integrity": "sha512-Nm4wVHdo7ZXSG30KjZ2Wl5SU/Bw7bDx1PdaiIFzEStdjs0H12mOTncn1GVYuqQSaZxpg87VGBRsVRPGD2cD1AQ==", - "requires": { - "@babel/core": "^7.7.5", - "@babel/parser": "^7.7.5", - "@babel/template": "^7.7.4", - "@babel/traverse": "^7.7.4", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" + "node-fetch": "~1.7.1" }, "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "dev": true, + "requires": { + "encoding": "^0.1.11", + "is-stream": "^1.0.1" + } } } }, - "istanbul-lib-processinfo": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", - "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", - "requires": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.0", - "istanbul-lib-coverage": "^3.0.0-alpha.1", - "make-dir": "^3.0.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^3.3.3" + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "optional": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" }, "dependencies": { - "make-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.0.tgz", - "integrity": "sha512-grNJDhb8b1Jm1qeqW5R/O63wUo4UXo2v2HMic6YT9i/HBlF93S8jkMgH7yugvY9ABDShH4VZMn8I+U8+fCNegw==", - "requires": { - "semver": "^6.0.0" - } - }, - "p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "requires": { - "aggregate-error": "^3.0.0" - } - }, - "rimraf": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.1.tgz", - "integrity": "sha512-IQ4ikL8SjBiEDZfk+DFVwqRK8md24RWMEJkdSlgNLkyyAImcjf8SWvU1qFMDOb4igBClbTQ/ugPqXcRwdFTxZw==", + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "optional": true, "requires": { - "glob": "^7.1.3" + "ms": "2.0.0" } }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true, + "optional": true } } }, - "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "find-yarn-workspace-root": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-1.2.1.tgz", + "integrity": "sha512-dVtfb0WuQG+8Ag2uWkbG79hOUzEsRrhBzgfn86g2sJPkzmcpGdghbNTfUKGTxymFrY/tLIodDzLoW9nOJ4FY8Q==", + "dev": true, "requires": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" + "fs-extra": "^4.0.3", + "micromatch": "^3.1.4" }, "dependencies": { - "has-flag": { + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } }, - "make-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.0.tgz", - "integrity": "sha512-grNJDhb8b1Jm1qeqW5R/O63wUo4UXo2v2HMic6YT9i/HBlF93S8jkMgH7yugvY9ABDShH4VZMn8I+U8+fCNegw==", + "fs-extra": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "dev": true, "requires": { - "semver": "^6.0.0" + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" } }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, "requires": { - "has-flag": "^4.0.0" + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } } - } - } - }, - "istanbul-lib-source-maps": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", - "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, "requires": { - "ms": "^2.1.1" + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" } } } }, - "istanbul-reports": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.0.tgz", - "integrity": "sha512-2osTcC8zcOSUkImzN2EWQta3Vdi4WjjKw99P2yWx5mLnigAM0Rd5uYFn1cf2i/Ois45GkNjaoTqc5CxgMSX80A==", + "flow-stoplight": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/flow-stoplight/-/flow-stoplight-1.0.0.tgz", + "integrity": "sha1-SiksW8/4s5+mzAyxqFPYbyfu/3s=", + "dev": true + }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, "requires": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" + "is-callable": "^1.1.3" } }, - "isurl": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", - "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, "requires": { - "has-to-string-tag-x": "^1.2.0", - "is-object": "^1.0.1" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" } }, - "jest-worker": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz", - "integrity": "sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==", + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", + "dev": true, + "optional": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, "requires": { - "merge-stream": "^2.0.0", - "supports-color": "^6.1.0" - }, - "dependencies": { - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } + "map-cache": "^0.2.2" } }, - "js-scrypt": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/js-scrypt/-/js-scrypt-0.2.0.tgz", - "integrity": "sha1-emK3AbRhbnCtDN5URiequ5nX/jk=", + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true, + "optional": true + }, + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, "requires": { - "generic-pool": "~2.0.4" + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" } }, - "js-sha3": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.6.1.tgz", - "integrity": "sha1-W4n3enR3Z5h39YxKB1JAk0sflcA=", + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "get-intrinsic": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.2.tgz", + "integrity": "sha512-aeX0vrFm21ILl3+JpFFRNe9aUvp6VFZb2/CTbgLb8j75kOhvoNYjt9d8KA/tJG4gSo8nzEDedRl0h7vDmBYRVg==", + "dev": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" } }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "optional": true, + "requires": { + "pump": "^3.0.0" + } }, - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", "dev": true }, - "json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } }, - "json-rpc-engine": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-3.8.0.tgz", - "integrity": "sha512-6QNcvm2gFuuK4TKU1uwfH0Qd/cOSb9c1lls0gbnIhciktIUQJwz6NQNAW4B1KiGPenv7IKu97V222Yo1bNhGuA==", + "global": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", + "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", "dev": true, "requires": { - "async": "^2.0.1", - "babel-preset-env": "^1.7.0", - "babelify": "^7.3.0", - "json-rpc-error": "^2.0.0", - "promise-to-callback": "^1.0.0", - "safe-event-emitter": "^1.0.1" + "min-document": "^2.19.0", + "process": "^0.11.10" } }, - "json-rpc-error": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/json-rpc-error/-/json-rpc-error-2.0.0.tgz", - "integrity": "sha1-p6+cICg4tekFxyUOVH8a/3cligI=", + "got": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", "dev": true, + "optional": true, "requires": { - "inherits": "^2.0.1" + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" + }, + "dependencies": { + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "optional": true, + "requires": { + "pump": "^3.0.0" + } + } } }, - "json-rpc-random-id": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz", - "integrity": "sha1-uknZat7RRE27jaPSA3SKy7zeyMg=", + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", "dev": true }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "dev": true, "requires": { - "jsonify": "~0.0.0" + "ajv": "^6.12.3", + "har-schema": "^2.0.0" } }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + } + } }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "requires": { - "graceful-fs": "^4.1.6" - } + "has-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", + "dev": true, + "optional": true }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", "dev": true }, - "jsprim": { + "has-to-string-tag-x": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "dev": true, + "optional": true, "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" + "has-symbol-support-x": "^1.4.1" } }, - "just-debounce": { + "has-value": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.0.0.tgz", - "integrity": "sha1-h/zPrv/AtozRnVX2cilD+SnqNeo=", - "dev": true - }, - "keccak": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", - "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "dev": true, "requires": { - "bindings": "^1.2.1", - "inherits": "^2.0.3", - "nan": "^2.2.1", - "safe-buffer": "^5.1.0" + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" } }, - "keccakjs": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/keccakjs/-/keccakjs-0.2.3.tgz", - "integrity": "sha512-BjLkNDcfaZ6l8HBG9tH0tpmDv3sS2mA7FNQxFHpCdzP3Gb2MVruXBSuoM66SnVxKJpAr5dKGdkHD+bDokt8fTg==", + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "dev": true, "requires": { - "browserify-sha3": "^0.0.4", - "sha3": "^1.2.2" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } } }, - "keyv": { + "hash-base": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", - "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dev": true, "requires": { - "json-buffer": "3.0.0" + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } } }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" - }, - "klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, "requires": { - "graceful-fs": "^4.1.9" + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" } }, - "last-run": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz", - "integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls=", + "heap": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/heap/-/heap-0.2.6.tgz", + "integrity": "sha1-CH4fELBGky/IWU3Z5tN4r8nR5aw=", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", "dev": true, "requires": { - "default-resolution": "^2.0.0", - "es6-weak-map": "^2.0.1" + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" } }, - "lazystream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", - "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", "dev": true, "requires": { - "readable-stream": "^2.0.5" + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" } }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "dev": true, + "optional": true + }, + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", "dev": true, + "optional": true, "requires": { - "invert-kv": "^1.0.0" + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true, + "optional": true + } } }, - "lcov-parse": { + "http-https": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", - "integrity": "sha1-6w1GtUER68VhrLTECO+TY73I9+A=" + "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", + "integrity": "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=", + "dev": true, + "optional": true }, - "lead": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", - "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=", + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "dev": true, "requires": { - "flush-write-stream": "^1.0.2" + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" } }, - "level-codec": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-9.0.1.tgz", - "integrity": "sha512-ajFP0kJ+nyq4i6kptSM+mAvJKLOg1X5FiFPtLG9M5gCEZyBmgDi3FkDrvlMkEzrUn1cWxtvVmrvoS4ASyO/q+Q==", - "dev": true - }, - "level-concat-iterator": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz", - "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==" - }, - "level-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", - "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==", + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, + "optional": true, "requires": { - "errno": "~0.1.1" + "safer-buffer": ">= 2.1.2 < 3" } }, - "level-iterator-stream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz", - "integrity": "sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0=", + "idna-uts46-hx": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", + "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", "dev": true, + "optional": true, "requires": { - "inherits": "^2.0.1", - "level-errors": "^1.0.3", - "readable-stream": "^1.0.33", - "xtend": "^4.0.0" + "punycode": "2.1.0" }, "dependencies": { - "level-errors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.1.2.tgz", - "integrity": "sha512-Sw/IJwWbPKF5Ai4Wz60B52yj0zYeqzObLh8k1Tk88jVmD51cJSKWSYpRyhVIvFzZdvsPqlH5wfhp/yxdsaQH4w==", - "dev": true, - "requires": { - "errno": "~0.1.1" - } - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "punycode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", + "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=", "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } + "optional": true } } }, - "level-mem": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/level-mem/-/level-mem-3.0.1.tgz", - "integrity": "sha512-LbtfK9+3Ug1UmvvhR2DqLqXiPW1OJ5jEh0a3m9ZgAipiwpSxGj/qaVVy54RG5vAQN1nCuXqjvprCuKSCxcJHBg==", + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true + }, + "immediate": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.2.3.tgz", + "integrity": "sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { - "level-packager": "~4.0.0", - "memdown": "~3.0.0" - }, - "dependencies": { - "abstract-leveldown": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz", - "integrity": "sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - }, - "memdown": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/memdown/-/memdown-3.0.0.tgz", - "integrity": "sha512-tbV02LfZMWLcHcq4tw++NuqMO+FZX8tNJEiD2aNRm48ZZusVg5N8NART+dmBkepJVye986oixErf7jfXboMGMA==", - "dev": true, - "requires": { - "abstract-leveldown": "~5.0.0", - "functional-red-black-tree": "~1.0.1", - "immediate": "~3.2.3", - "inherits": "~2.0.1", - "ltgt": "~2.2.0", - "safe-buffer": "~5.1.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } + "once": "^1.3.0", + "wrappy": "1" } }, - "level-packager": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/level-packager/-/level-packager-4.0.1.tgz", - "integrity": "sha512-svCRKfYLn9/4CoFfi+d8krOtrp6RoX8+xm0Na5cgXMqSyRru0AnDYdLl+YI8u1FyS6gGZ94ILLZDE5dh2but3Q==", + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "dev": true, "requires": { - "encoding-down": "~5.0.0", - "levelup": "^3.0.0" + "loose-envify": "^1.0.0" } }, - "level-post": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/level-post/-/level-post-1.0.7.tgz", - "integrity": "sha512-PWYqG4Q00asOrLhX7BejSajByB4EmG2GaKHfj3h5UmmZ2duciXLPGYWIjBzLECFWUGOZWlm5B20h/n3Gs3HKew==", + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true, + "optional": true + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { - "ltgt": "^2.1.2" + "kind-of": "^6.0.0" } }, - "level-sublevel": { - "version": "6.6.4", - "resolved": "https://registry.npmjs.org/level-sublevel/-/level-sublevel-6.6.4.tgz", - "integrity": "sha512-pcCrTUOiO48+Kp6F1+UAzF/OtWqLcQVTVF39HLdZ3RO8XBoXt+XVPKZO1vVr1aUoxHZA9OtD2e1v7G+3S5KFDA==", + "is-arguments": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz", + "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==", "dev": true, "requires": { - "bytewise": "~1.1.0", - "level-codec": "^9.0.0", - "level-errors": "^2.0.0", - "level-iterator-stream": "^2.0.3", - "ltgt": "~2.1.1", - "pull-defer": "^0.2.2", - "pull-level": "^2.0.3", - "pull-stream": "^3.6.8", - "typewiselite": "~1.0.0", - "xtend": "~4.0.0" - }, - "dependencies": { - "level-iterator-stream": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-2.0.3.tgz", - "integrity": "sha512-I6Heg70nfF+e5Y3/qfthJFexhRw/Gi3bIymCoXAlijZdAcLaPuWSJs3KXyTYf23ID6g0o2QF62Yh+grOXY3Rig==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.5", - "xtend": "^4.0.0" - } - }, - "ltgt": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.1.3.tgz", - "integrity": "sha1-EIUaBtmWS5cReEQcI8nlJpjuzjQ=", - "dev": true - } + "call-bind": "^1.0.0" } }, - "level-supports": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz", - "integrity": "sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==", - "requires": { - "xtend": "^4.0.2" - } + "is-callable": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", + "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==", + "dev": true }, - "level-ws": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz", - "integrity": "sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos=", + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", "dev": true, "requires": { - "readable-stream": "~1.0.15", - "xtend": "~2.1.1" - }, - "dependencies": { - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "xtend": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", - "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", - "dev": true, - "requires": { - "object-keys": "~0.4.0" - } - } + "ci-info": "^2.0.0" } }, - "levelup": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-3.1.1.tgz", - "integrity": "sha512-9N10xRkUU4dShSRRFTBdNaBxofz+PGaIZO962ckboJZiNmLuhVT6FZ6ZKAsICKfUBO76ySaYU6fJWX/jnj3Lcg==", + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "deferred-leveldown": "~4.0.0", - "level-errors": "~2.0.0", - "level-iterator-stream": "~3.0.0", - "xtend": "~4.0.0" - }, - "dependencies": { - "abstract-leveldown": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz", - "integrity": "sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - }, - "deferred-leveldown": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-4.0.2.tgz", - "integrity": "sha512-5fMC8ek8alH16QiV0lTCis610D1Zt1+LA4MS4d63JgS32lrCjTFDUFz2ao09/j2I4Bqb5jL4FZYwu7Jz0XO1ww==", - "dev": true, - "requires": { - "abstract-leveldown": "~5.0.0", - "inherits": "^2.0.3" - } - }, - "level-iterator-stream": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-3.0.1.tgz", - "integrity": "sha512-nEIQvxEED9yRThxvOrq8Aqziy4EGzrxSZK+QzEFAVuJvQ8glfyZ96GB6BoI4sBbLfjMXm2w4vu3Tkcm9obcY0g==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "xtend": "^4.0.0" - } - } + "kind-of": "^6.0.0" } }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, - "liftoff": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz", - "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==", + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "requires": { - "extend": "^3.0.0", - "findup-sync": "^3.0.0", - "fined": "^1.0.1", - "flagged-respawn": "^1.0.0", - "is-plain-object": "^2.0.4", - "object.map": "^1.0.0", - "rechoir": "^0.6.2", - "resolve": "^1.1.7" + "is-plain-object": "^2.0.4" } }, - "lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" - }, - "lint-staged": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.0.0.tgz", - "integrity": "sha512-/MrZOLMnljjMHakxlRd1Z5Kr8wWWlrWFasye7HaTv5tx56icwzT/STRty8flMKsyzBGTfTa9QszNVPsDS/yOug==", - "requires": { - "chalk": "^3.0.0", - "commander": "^4.0.1", - "cosmiconfig": "^6.0.0", - "debug": "^4.1.1", - "dedent": "^0.7.0", - "execa": "^3.4.0", - "listr": "^0.14.3", - "log-symbols": "^3.0.0", - "micromatch": "^4.0.2", - "normalize-path": "^3.0.0", - "please-upgrade-node": "^3.2.0", - "stringify-object": "^3.3.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "requires": { - "fill-range": "^7.0.1" - } - }, - "chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "commander": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.0.tgz", - "integrity": "sha512-NIQrwvv9V39FHgGFm36+U9SMQzbiHvU79k+iADraJTpmrFFfx7Ds0IvDoAdZsDrknlkRk14OYoWXb57uTh7/sw==" - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "requires": { - "ms": "^2.1.1" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" - }, - "micromatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", - "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", - "requires": { - "braces": "^3.0.1", - "picomatch": "^2.0.5" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "requires": { - "has-flag": "^4.0.0" - } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "requires": { - "is-number": "^7.0.0" - } - } - } + "is-finite": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", + "dev": true }, - "listr": { - "version": "0.14.3", - "resolved": "https://registry.npmjs.org/listr/-/listr-0.14.3.tgz", - "integrity": "sha512-RmAl7su35BFd/xoMamRjpIE4j3v+L28o8CT5YhAXQJm1fD+1l9ngXY8JAQRJ+tFK2i5njvi0iRUKV09vPwA0iA==", - "requires": { - "@samverschueren/stream-to-observable": "^0.3.0", - "is-observable": "^1.1.0", - "is-promise": "^2.1.0", - "is-stream": "^1.1.0", - "listr-silent-renderer": "^1.1.1", - "listr-update-renderer": "^0.5.0", - "listr-verbose-renderer": "^0.5.0", - "p-map": "^2.0.0", - "rxjs": "^6.3.3" - } + "is-fn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fn/-/is-fn-1.0.0.tgz", + "integrity": "sha1-lUPV3nvPWwiiLsiiC65uKG1RDYw=", + "dev": true }, - "listr-silent-renderer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz", - "integrity": "sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4=" + "is-function": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", + "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==", + "dev": true + }, + "is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=", + "dev": true + }, + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "dev": true + }, + "is-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", + "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", + "dev": true, + "optional": true + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true, + "optional": true }, - "listr-update-renderer": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.5.0.tgz", - "integrity": "sha512-tKRsZpKz8GSGqoI/+caPmfrypiaq+OQCbd+CovEC24uk1h952lVj5sC7SqyFUm+OaJ5HN/a1YLt5cit2FMNsFA==", + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, "requires": { - "chalk": "^1.1.3", - "cli-truncate": "^0.2.1", - "elegant-spinner": "^1.0.1", - "figures": "^1.7.0", - "indent-string": "^3.0.0", - "log-symbols": "^1.0.2", - "log-update": "^2.3.0", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - } - }, - "log-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", - "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", - "requires": { - "chalk": "^1.0.0" - } - } + "isobject": "^3.0.1" } }, - "listr-verbose-renderer": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/listr-verbose-renderer/-/listr-verbose-renderer-0.5.0.tgz", - "integrity": "sha512-04PDPqSlsqIOaaaGZ+41vq5FejI9auqTInicFRndCBgE3bXG8D6W1I+mWhk+1nqbHmyhla/6BUrd5OSiHwKRXw==", + "is-regex": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", + "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", + "dev": true, "requires": { - "chalk": "^2.4.1", - "cli-cursor": "^2.1.0", - "date-fns": "^1.27.2", - "figures": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - } + "has-symbols": "^1.0.1" } }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "is-retry-allowed": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", + "dev": true, + "optional": true + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } + "has-symbols": "^1.0.1" } }, - "loader-runner": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", - "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==" + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true }, - "loader-utils": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", - "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^2.0.0", - "json5": "^1.0.1" - }, - "dependencies": { - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "requires": { - "minimist": "^1.2.0" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - } - } + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true }, - "locate-path": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "isurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "dev": true, + "optional": true, "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "dependencies": { - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - } + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" } }, - "lodash": { - "version": "4.17.14", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.14.tgz", - "integrity": "sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw==" - }, - "lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=" + "js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=", + "dev": true, + "optional": true }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true }, - "log-driver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", - "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==" + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true }, - "log-symbols": { + "json-buffer": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", - "requires": { - "chalk": "^2.4.2" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - } - } + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true, + "optional": true }, - "log-update": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-2.3.0.tgz", - "integrity": "sha1-iDKP19HOeTiykoN0bwsbwSayRwg=", + "json-rpc-engine": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-3.8.0.tgz", + "integrity": "sha512-6QNcvm2gFuuK4TKU1uwfH0Qd/cOSb9c1lls0gbnIhciktIUQJwz6NQNAW4B1KiGPenv7IKu97V222Yo1bNhGuA==", + "dev": true, "requires": { - "ansi-escapes": "^3.0.0", - "cli-cursor": "^2.0.0", - "wrap-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==" - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "wrap-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-3.0.1.tgz", - "integrity": "sha1-KIoE2H7aXChuBg3+jxNc6NAH+Lo=", - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0" - } - } + "async": "^2.0.1", + "babel-preset-env": "^1.7.0", + "babelify": "^7.3.0", + "json-rpc-error": "^2.0.0", + "promise-to-callback": "^1.0.0", + "safe-event-emitter": "^1.0.1" } }, - "looper": { + "json-rpc-error": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/looper/-/looper-2.0.0.tgz", - "integrity": "sha1-Zs0Md0rz1P7axTeU90LbVtqPCew=", - "dev": true - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "resolved": "https://registry.npmjs.org/json-rpc-error/-/json-rpc-error-2.0.0.tgz", + "integrity": "sha1-p6+cICg4tekFxyUOVH8a/3cligI=", "dev": true, "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" + "inherits": "^2.0.1" } }, - "lowercase-keys": { + "json-rpc-random-id": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" - }, - "lru-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-3.2.0.tgz", - "integrity": "sha1-cXibO39Tmb7IVl3aOKow0qCX7+4=", - "dev": true, - "requires": { - "pseudomap": "^1.0.1" - } + "resolved": "https://registry.npmjs.org/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz", + "integrity": "sha1-uknZat7RRE27jaPSA3SKy7zeyMg=", + "dev": true }, - "ltgt": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", - "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=" + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true }, - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - } - } + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, - "make-iterator": { + "json-stable-stringify": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", - "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", "dev": true, "requires": { - "kind-of": "^6.0.2" + "jsonify": "~0.0.0" } }, - "mamacro": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", - "integrity": "sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA==" + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, "requires": { - "p-defer": "^1.0.0" + "graceful-fs": "^4.1.6" } }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, "requires": { - "object-visit": "^1.0.0" + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" } }, - "matchdep": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz", - "integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4=", + "keccak": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz", + "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", "dev": true, "requires": { - "findup-sync": "^2.0.0", - "micromatch": "^3.0.4", - "resolve": "^1.4.0", - "stack-trace": "0.0.10" - }, - "dependencies": { - "findup-sync": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", - "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", - "dev": true, - "requires": { - "detect-file": "^1.0.0", - "is-glob": "^3.1.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" - } - }, - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + } + }, + "keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "dev": true, + "optional": true, "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" + "json-buffer": "3.0.0" } }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", + "klaw-sync": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", + "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", + "dev": true, "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" + "graceful-fs": "^4.1.11" } }, - "memdown": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/memdown/-/memdown-5.1.0.tgz", - "integrity": "sha512-B3J+UizMRAlEArDjWHTMmadet+UKwHd3UjMgGBkZcKAxAYVPS9o0Yeiha4qvz7iGiL2Sb3igUft6p7nbFWctpw==", + "level-codec": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-9.0.2.tgz", + "integrity": "sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ==", + "dev": true, "requires": { - "abstract-leveldown": "~6.2.1", - "functional-red-black-tree": "~1.0.1", - "immediate": "~3.2.3", - "inherits": "~2.0.1", - "ltgt": "~2.2.0", - "safe-buffer": "~5.2.0" - }, - "dependencies": { - "abstract-leveldown": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.2.tgz", - "integrity": "sha512-/a+Iwj0rn//CX0EJOasNyZJd2o8xur8Ce9C57Sznti/Ilt/cb6Qd8/k98A4ZOklXgTG+iAYYUs1OTG0s1eH+zQ==", - "requires": { - "level-concat-iterator": "~2.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - } + "buffer": "^5.6.0" } }, - "memory-fs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", - "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "level-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", + "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==", + "dev": true, "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" + "errno": "~0.1.1" } }, - "memorystream": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=" - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" - }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + "level-iterator-stream": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-2.0.3.tgz", + "integrity": "sha512-I6Heg70nfF+e5Y3/qfthJFexhRw/Gi3bIymCoXAlijZdAcLaPuWSJs3KXyTYf23ID6g0o2QF62Yh+grOXY3Rig==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.5", + "xtend": "^4.0.0" + } }, - "merkle-patricia-tree": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz", - "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==", + "level-mem": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/level-mem/-/level-mem-3.0.1.tgz", + "integrity": "sha512-LbtfK9+3Ug1UmvvhR2DqLqXiPW1OJ5jEh0a3m9ZgAipiwpSxGj/qaVVy54RG5vAQN1nCuXqjvprCuKSCxcJHBg==", "dev": true, "requires": { - "async": "^1.4.2", - "ethereumjs-util": "^5.0.0", - "level-ws": "0.0.0", - "levelup": "^1.2.1", - "memdown": "^1.0.0", - "readable-stream": "^2.0.0", - "rlp": "^2.0.0", - "semaphore": ">=1.0.1" + "level-packager": "~4.0.0", + "memdown": "~3.0.0" }, "dependencies": { "abstract-leveldown": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", - "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz", + "integrity": "sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A==", "dev": true, "requires": { "xtend": "~4.0.0" } }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "ethereumjs-util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", - "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", - "dev": true, - "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "ethjs-util": "^0.1.3", - "keccak": "^1.0.2", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1", - "secp256k1": "^3.0.1" - } - }, - "level-codec": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz", - "integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ==", + "ltgt": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", + "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=", "dev": true }, - "level-errors": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.0.5.tgz", - "integrity": "sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig==", - "dev": true, - "requires": { - "errno": "~0.1.1" - } - }, - "levelup": { - "version": "1.3.9", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz", - "integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==", - "dev": true, - "requires": { - "deferred-leveldown": "~1.2.1", - "level-codec": "~7.0.0", - "level-errors": "~1.0.3", - "level-iterator-stream": "~1.3.0", - "prr": "~1.0.1", - "semver": "~5.4.1", - "xtend": "~4.0.0" - } - }, "memdown": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/memdown/-/memdown-1.4.1.tgz", - "integrity": "sha1-tOThkhdGZP+65BNhqlAPMRnv4hU=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/memdown/-/memdown-3.0.0.tgz", + "integrity": "sha512-tbV02LfZMWLcHcq4tw++NuqMO+FZX8tNJEiD2aNRm48ZZusVg5N8NART+dmBkepJVye986oixErf7jfXboMGMA==", "dev": true, "requires": { - "abstract-leveldown": "~2.7.1", - "functional-red-black-tree": "^1.0.1", - "immediate": "^3.2.3", + "abstract-leveldown": "~5.0.0", + "functional-red-black-tree": "~1.0.1", + "immediate": "~3.2.3", "inherits": "~2.0.1", "ltgt": "~2.2.0", "safe-buffer": "~5.1.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } } }, - "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true } } }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "miller-rabin": { + "level-packager": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" - }, - "mime-db": { - "version": "1.43.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", - "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==" - }, - "mime-types": { - "version": "2.1.26", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", - "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", - "requires": { - "mime-db": "1.43.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" - }, - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" - }, - "min-document": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", - "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", - "requires": { - "dom-walk": "^0.1.0" - } - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "resolved": "https://registry.npmjs.org/level-packager/-/level-packager-4.0.1.tgz", + "integrity": "sha512-svCRKfYLn9/4CoFfi+d8krOtrp6RoX8+xm0Na5cgXMqSyRru0AnDYdLl+YI8u1FyS6gGZ94ILLZDE5dh2but3Q==", + "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "encoding-down": "~5.0.0", + "levelup": "^3.0.0" } }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - }, - "minipass": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", - "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "level-post": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/level-post/-/level-post-1.0.7.tgz", + "integrity": "sha512-PWYqG4Q00asOrLhX7BejSajByB4EmG2GaKHfj3h5UmmZ2duciXLPGYWIjBzLECFWUGOZWlm5B20h/n3Gs3HKew==", + "dev": true, "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" + "ltgt": "^2.1.2" } }, - "minipass-collect": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", - "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", + "level-sublevel": { + "version": "6.6.4", + "resolved": "https://registry.npmjs.org/level-sublevel/-/level-sublevel-6.6.4.tgz", + "integrity": "sha512-pcCrTUOiO48+Kp6F1+UAzF/OtWqLcQVTVF39HLdZ3RO8XBoXt+XVPKZO1vVr1aUoxHZA9OtD2e1v7G+3S5KFDA==", + "dev": true, "requires": { - "minipass": "^3.0.0" - }, - "dependencies": { - "minipass": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.1.tgz", - "integrity": "sha512-UFqVihv6PQgwj8/yTGvl9kPz7xIAY+R5z6XYjRInD3Gk3qx6QGSD6zEcpeG4Dy/lQnv1J6zv8ejV90hyYIKf3w==", - "requires": { - "yallist": "^4.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - } + "bytewise": "~1.1.0", + "level-codec": "^9.0.0", + "level-errors": "^2.0.0", + "level-iterator-stream": "^2.0.3", + "ltgt": "~2.1.1", + "pull-defer": "^0.2.2", + "pull-level": "^2.0.3", + "pull-stream": "^3.6.8", + "typewiselite": "~1.0.0", + "xtend": "~4.0.0" } }, - "minipass-flush": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", - "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "level-ws": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-1.0.0.tgz", + "integrity": "sha512-RXEfCmkd6WWFlArh3X8ONvQPm8jNpfA0s/36M4QzLqrLEIt1iJE9WBHLZ5vZJK6haMjJPJGJCQWfjMNnRcq/9Q==", + "dev": true, "requires": { - "minipass": "^3.0.0" - }, - "dependencies": { - "minipass": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.1.tgz", - "integrity": "sha512-UFqVihv6PQgwj8/yTGvl9kPz7xIAY+R5z6XYjRInD3Gk3qx6QGSD6zEcpeG4Dy/lQnv1J6zv8ejV90hyYIKf3w==", - "requires": { - "yallist": "^4.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - } + "inherits": "^2.0.3", + "readable-stream": "^2.2.8", + "xtend": "^4.0.1" } }, - "minipass-pipeline": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.2.tgz", - "integrity": "sha512-3JS5A2DKhD2g0Gg8x3yamO0pj7YeKGwVlDS90pF++kxptwx/F+B//roxf9SqYil5tQo65bijy+dAuAFZmYOouA==", + "levelup": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/levelup/-/levelup-3.1.1.tgz", + "integrity": "sha512-9N10xRkUU4dShSRRFTBdNaBxofz+PGaIZO962ckboJZiNmLuhVT6FZ6ZKAsICKfUBO76ySaYU6fJWX/jnj3Lcg==", + "dev": true, "requires": { - "minipass": "^3.0.0" + "deferred-leveldown": "~4.0.0", + "level-errors": "~2.0.0", + "level-iterator-stream": "~3.0.0", + "xtend": "~4.0.0" }, "dependencies": { - "minipass": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.1.tgz", - "integrity": "sha512-UFqVihv6PQgwj8/yTGvl9kPz7xIAY+R5z6XYjRInD3Gk3qx6QGSD6zEcpeG4Dy/lQnv1J6zv8ejV90hyYIKf3w==", + "level-iterator-stream": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-3.0.1.tgz", + "integrity": "sha512-nEIQvxEED9yRThxvOrq8Aqziy4EGzrxSZK+QzEFAVuJvQ8glfyZ96GB6BoI4sBbLfjMXm2w4vu3Tkcm9obcY0g==", + "dev": true, "requires": { - "yallist": "^4.0.0" + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "xtend": "^4.0.0" } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } } }, - "minizlib": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", - "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "looper": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/looper/-/looper-2.0.0.tgz", + "integrity": "sha1-Zs0Md0rz1P7axTeU90LbVtqPCew=", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, "requires": { - "minipass": "^2.9.0" + "js-tokens": "^3.0.0 || ^4.0.0" } }, - "mississippi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", - "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true, + "optional": true + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^3.0.0", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" + "yallist": "^3.0.2" } }, - "mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "ltgt": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.1.3.tgz", + "integrity": "sha1-EIUaBtmWS5cReEQcI8nlJpjuzjQ=", + "dev": true + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "requires": { - "is-plain-object": "^2.0.4" - } - } + "object-visit": "^1.0.0" } }, - "mkdirp": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.3.tgz", - "integrity": "sha512-6uCP4Qc0sWsgMLy1EOqqS/3rjDHOEnsStVr/4vtAIK2Y5i2kA7lFFejYrpIyiN9w0pYf4ckeCYT9f1r1P9KX5g==" - }, - "mkdirp-promise": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", - "integrity": "sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=", + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, "requires": { - "mkdirp": "*" + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, - "mocha": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.0.0.tgz", - "integrity": "sha512-CirsOPbO3jU86YKjjMzFLcXIb5YiGLUrjrXFHoJ3e2z9vWiaZVCZQ2+gtRGMPWF+nFhN6AWwLM/juzAQ6KRkbA==", - "requires": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "chokidar": "3.3.0", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "2.2.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "ms": "2.1.1", - "node-environment-flags": "1.0.6", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.0", - "yargs-parser": "13.1.1", - "yargs-unparser": "1.6.0" - }, - "dependencies": { - "ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==" - }, - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "binary-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", - "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==" - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "requires": { - "fill-range": "^7.0.1" - } - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "dependencies": { - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "chokidar": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", - "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", - "requires": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "fsevents": "~2.1.1", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.2.0" - } - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "requires": { - "locate-path": "^3.0.0" - } - }, - "fsevents": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz", - "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==", - "optional": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", - "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", - "requires": { - "is-glob": "^4.0.1" - } - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "requires": { - "chalk": "^2.0.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" - }, - "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - }, - "readdirp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", - "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", - "requires": { - "picomatch": "^2.0.4" - } - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" - }, - "supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "requires": { - "has-flag": "^3.0.0" - } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "requires": { - "is-number": "^7.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" - }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" - }, - "yargs": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", - "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true, + "optional": true + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true, + "optional": true + }, + "merkle-patricia-tree": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-3.0.0.tgz", + "integrity": "sha512-soRaMuNf/ILmw3KWbybaCjhx86EYeBbD8ph0edQCTed0JN/rxDt1EBN52Ajre3VyGo+91f8+/rfPIRQnnGMqmQ==", + "dev": true, + "requires": { + "async": "^2.6.1", + "ethereumjs-util": "^5.2.0", + "level-mem": "^3.0.1", + "level-ws": "^1.0.0", + "readable-stream": "^3.0.6", + "rlp": "^2.0.0", + "semaphore": ">=1.0.1" + }, + "dependencies": { + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dev": true, "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.1" + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" } }, - "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" } } } }, - "mocha-lcov-reporter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/mocha-lcov-reporter/-/mocha-lcov-reporter-1.3.0.tgz", - "integrity": "sha1-Rpve9PivyaEWBW8HnfYYLQr7A4Q=" + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true, + "optional": true }, - "mock-fs": { - "version": "4.10.4", - "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.10.4.tgz", - "integrity": "sha512-gDfZDLaPIvtOusbusLinfx6YSe2YpQsDT8qdP41P47dQ/NQggtkHukz7hwqgt8QvMBmAv+Z6DGmXPyb5BWX2nQ==" + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "optional": true + }, + "mime-db": { + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz", + "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==", + "dev": true + }, + "mime-types": { + "version": "2.1.28", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz", + "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==", + "dev": true, + "requires": { + "mime-db": "1.45.0" + } + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true, + "optional": true + }, + "min-document": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", + "dev": true, + "requires": { + "dom-walk": "^0.1.0" + } }, - "move-concurrently": { + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "minimalistic-crypto-utils": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", - "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, "requires": { - "aproba": "^1.1.1", - "copy-concurrently": "^1.0.0", - "fs-write-stream-atomic": "^1.0.8", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.3" + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "minizlib": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.9.0" }, "dependencies": { - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "dev": true, + "optional": true, "requires": { - "minimist": "0.0.8" + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" } } } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + } }, - "mute-stdout": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz", - "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==", + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "mkdirp-promise": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", + "integrity": "sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=", + "dev": true, + "optional": true, + "requires": { + "mkdirp": "*" + } + }, + "mock-fs": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.13.0.tgz", + "integrity": "sha512-DD0vOdofJdoaRNtnWcrXe6RQbpHkPPmtqGq14uRX0F8ZKJ5nv89CVTYl/BZdppDxBDaV0hl75htg3abpEWlPZA==", + "dev": true, + "optional": true + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, - "mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" + "multibase": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.1.tgz", + "integrity": "sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==", + "dev": true, + "optional": true, + "requires": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + }, + "multicodec": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.7.tgz", + "integrity": "sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==", + "dev": true, + "optional": true, + "requires": { + "varint": "^5.0.0" + } }, - "nan": { - "version": "2.13.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", - "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==" + "multihashes": { + "version": "0.4.21", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz", + "integrity": "sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==", + "dev": true, + "optional": true, + "requires": { + "buffer": "^5.5.0", + "multibase": "^0.7.0", + "varint": "^5.0.0" + }, + "dependencies": { + "multibase": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz", + "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==", + "dev": true, + "optional": true, + "requires": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + } + } }, "nano-json-stream-parser": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", - "integrity": "sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=" + "integrity": "sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=", + "dev": true, + "optional": true }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, "requires": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", @@ -14297,46 +14794,30 @@ "to-regex": "^3.0.1" } }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" - }, "negotiator": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" - }, - "neo-async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", - "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==" + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "dev": true, + "optional": true }, "next-tick": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true }, - "node-environment-flags": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", - "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", - "requires": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } + "node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", + "dev": true }, "node-fetch": { "version": "2.1.2", @@ -14344,149 +14825,25 @@ "integrity": "sha1-q4hOjn5X44qUR1POxwb3iNF2i7U=", "dev": true }, - "node-libs-browser": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", - "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", - "requires": { - "assert": "^1.1.1", - "browserify-zlib": "^0.2.0", - "buffer": "^4.3.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.1", - "events": "^3.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", - "path-browserify": "0.0.1", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", - "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.11.0", - "vm-browserify": "^1.0.1" - }, - "dependencies": { - "buffer": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", - "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "requires": { - "safe-buffer": "~5.2.0" - } - }, - "util": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", - "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", - "requires": { - "inherits": "2.0.3" - } - } - } - }, - "node-preload": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", - "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", - "requires": { - "process-on-spawn": "^1.0.0" - } - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "normalize-url": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", - "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==" - }, - "now-and-later": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", - "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", - "dev": true, - "requires": { - "once": "^1.3.2" - } - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "requires": { - "path-key": "^3.0.0" - } + "node-gyp-build": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz", + "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==", + "dev": true }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + "normalize-url": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", + "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", + "dev": true, + "optional": true }, "number-to-bn": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", + "dev": true, + "optional": true, "requires": { "bn.js": "4.11.6", "strip-hex-prefix": "1.0.0" @@ -14495,260 +14852,29 @@ "bn.js": { "version": "4.11.6", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" - } - } - }, - "nyc": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.0.0.tgz", - "integrity": "sha512-qcLBlNCKMDVuKb7d1fpxjPR8sHeMVX0CHarXAVzrVWoFrigCkYR8xcrjfXSPi5HXM7EU78L6ywO7w1c5rZNCNg==", - "requires": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.0", - "js-yaml": "^3.13.1", - "make-dir": "^3.0.0", - "node-preload": "^0.2.0", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "uuid": "^3.3.3", - "yargs": "^15.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" - }, - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" - }, - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "requires": { - "p-locate": "^4.1.0" - } - }, - "make-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.0.tgz", - "integrity": "sha512-grNJDhb8b1Jm1qeqW5R/O63wUo4UXo2v2HMic6YT9i/HBlF93S8jkMgH7yugvY9ABDShH4VZMn8I+U8+fCNegw==", - "requires": { - "semver": "^6.0.0" - } - }, - "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "requires": { - "aggregate-error": "^3.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==" - }, - "rimraf": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.1.tgz", - "integrity": "sha512-IQ4ikL8SjBiEDZfk+DFVwqRK8md24RWMEJkdSlgNLkyyAImcjf8SWvU1qFMDOb4igBClbTQ/ugPqXcRwdFTxZw==", - "requires": { - "glob": "^7.1.3" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" - }, - "yargs": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.1.0.tgz", - "integrity": "sha512-T39FNN1b6hCW4SOIk1XyTOWxtXdcen0t+XYrysQmChzSipvhBO8Bj0nK1ozAasdk24dNWuMZvr4k24nz+8HHLg==", - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^16.1.0" - } - }, - "yargs-parser": { - "version": "16.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-16.1.0.tgz", - "integrity": "sha512-H/V41UNZQPkUMIT5h5hiwg4QKIY1RPvoBV4XcjUbRM8Bk2oKqqyZ0DIEbTFZB0XjbtSPG8SAa/0DxCQmiRgzKg==", - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", + "dev": true, + "optional": true } } }, "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true }, "object-copy": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, "requires": { "copy-descriptor": "^0.1.0", "define-property": "^0.2.5", @@ -14759,14 +14885,59 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, "requires": { "is-descriptor": "^0.1.0" } }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -14774,112 +14945,74 @@ } }, "object-inspect": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", - "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==" + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", + "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", + "dev": true }, "object-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.0.2.tgz", - "integrity": "sha512-Epah+btZd5wrrfjkJZq1AOB9O6OxUQto45hzFd7lXGrpHPGE0W1k+426yrZV+k6NJOzLNNW/nVsmZdIWsAqoOQ==", - "dev": true + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.4.tgz", + "integrity": "sha512-1ZvAZ4wlF7IyPVOcE1Omikt7UpaFlOQq0HlSti+ZvDH3UiD2brwGMwDbyV43jao2bKJ+4+WdPJHSd7kgzKYVqg==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + } }, "object-keys": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", - "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true }, "object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, "requires": { "isobject": "^3.0.0" } }, "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - }, - "dependencies": { - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" - } - } - }, - "object.defaults": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", - "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", "dev": true, "requires": { - "array-each": "^1.0.1", - "array-slice": "^1.0.0", - "for-own": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "object.getownpropertydescriptors": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", - "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", - "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" } }, - "object.map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", - "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", + "object.getownpropertydescriptors": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.1.tgz", + "integrity": "sha512-6DtXgZ/lIZ9hqx4GtZETobXLR/ZLaa0aqV0kzbn80Rf8Z2e/XFnhA0I7p07N2wH8bBBltr2xQPi6sbKWAY2Eng==", "dev": true, "requires": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1" } }, "object.pick": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "requires": { - "isobject": "^3.0.1" - } - }, - "object.reduce": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz", - "integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60=", "dev": true, "requires": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - } - }, - "object.values": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", - "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", - "has": "^1.0.3" + "isobject": "^3.0.1" } }, "oboe": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.4.tgz", "integrity": "sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY=", + "dev": true, + "optional": true, "requires": { "http-https": "^1.0.0" } @@ -14888,6 +15021,8 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "optional": true, "requires": { "ee-first": "1.1.1" } @@ -14896,293 +15031,192 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", - "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "opencollective-postinstall": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz", - "integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==" - }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, - "ordered-read-streams": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", - "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=", "dev": true, "requires": { - "readable-stream": "^2.0.1" + "wrappy": "1" } }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" - }, "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, - "requires": { - "lcid": "^1.0.0" - } - }, "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true }, "p-cancelable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==" - }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=" - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" - }, - "p-is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", - "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==" - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-map": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", - "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==" + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "dev": true, + "optional": true }, "p-timeout": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", + "dev": true, + "optional": true, "requires": { "p-finally": "^1.0.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" - }, - "package-hash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", - "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", - "requires": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - } - }, - "pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" - }, - "parallel-transform": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", - "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", - "requires": { - "cyclist": "^1.0.1", - "inherits": "^2.0.3", - "readable-stream": "^2.1.5" - } - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "requires": { - "callsites": "^3.0.0" + }, + "dependencies": { + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true, + "optional": true + } } }, "parse-asn1": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz", - "integrity": "sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "dev": true, + "optional": true, "requires": { - "asn1.js": "^4.0.0", + "asn1.js": "^5.2.0", "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", "evp_bytestokey": "^1.0.0", "pbkdf2": "^3.0.3", "safe-buffer": "^5.1.1" } }, - "parse-filepath": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", - "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", - "dev": true, - "requires": { - "is-absolute": "^1.0.0", - "map-cache": "^0.2.0", - "path-root": "^0.1.1" - } - }, "parse-headers": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.3.tgz", - "integrity": "sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA==" - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "requires": { - "error-ex": "^1.2.0" - } - }, - "parse-node-version": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", - "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "integrity": "sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA==", "dev": true }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=" - }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true, + "optional": true }, "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" - }, - "path-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", - "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==" - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "patch-package": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-6.2.2.tgz", + "integrity": "sha512-YqScVYkVcClUY0v8fF0kWOjDYopzIM8e3bj/RU1DPeEF14+dCGm6UeOYm4jvCyxqIEQ5/eJzmbWfDWnUleFNMg==", "dev": true, "requires": { - "pinkie-promise": "^2.0.0" + "@yarnpkg/lockfile": "^1.1.0", + "chalk": "^2.4.2", + "cross-spawn": "^6.0.5", + "find-yarn-workspace-root": "^1.2.1", + "fs-extra": "^7.0.1", + "is-ci": "^2.0.0", + "klaw-sync": "^6.0.0", + "minimist": "^1.2.0", + "rimraf": "^2.6.3", + "semver": "^5.6.0", + "slash": "^2.0.0", + "tmp": "^0.0.33" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } } }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true }, "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" - }, - "path-root": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", - "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", - "dev": true, - "requires": { - "path-root-regex": "^0.1.0" - } - }, - "path-root-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", - "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } + "optional": true }, "pbkdf2": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", - "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", + "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", + "dev": true, "requires": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", @@ -15191,89 +15225,17 @@ "sha.js": "^2.4.8" } }, - "pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" - }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, - "picomatch": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.1.tgz", - "integrity": "sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA==" - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "requires": { - "find-up": "^2.1.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "requires": { - "locate-path": "^2.0.0" - } - } - } - }, - "please-upgrade-node": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", - "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", - "requires": { - "semver-compare": "^1.0.0" - } - }, - "portfinder": { - "version": "1.0.25", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.25.tgz", - "integrity": "sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg==", - "requires": { - "async": "^2.6.2", - "debug": "^3.1.1", - "mkdirp": "^0.5.1" - }, - "dependencies": { - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - } - } - } + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true }, "precond": { "version": "0.2.3", @@ -15281,26 +15243,12 @@ "integrity": "sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw=", "dev": true }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" - }, "prepend-http": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" - }, - "prettier": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", - "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==" - }, - "pretty-hrtime": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", - "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", - "dev": true + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true, + "optional": true }, "private": { "version": "0.1.8", @@ -15309,32 +15257,16 @@ "dev": true }, "process": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", - "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, - "process-on-spawn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", - "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", - "requires": { - "fromentries": "^1.2.0" - } - }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" - }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true }, "promise-to-callback": { "version": "1.0.0", @@ -15347,18 +15279,21 @@ } }, "proxy-addr": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", - "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", + "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", + "dev": true, + "optional": true, "requires": { "forwarded": "~0.1.2", - "ipaddr.js": "1.9.0" + "ipaddr.js": "1.9.1" } }, "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true }, "pseudomap": { "version": "1.0.2", @@ -15367,14 +15302,17 @@ "dev": true }, "psl": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.7.0.tgz", - "integrity": "sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ==" + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true }, "public-encrypt": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, + "optional": true, "requires": { "bn.js": "^4.1.0", "browserify-rsa": "^4.0.0", @@ -15446,66 +15384,42 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "optional": true, "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, - "pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", - "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - }, - "dependencies": { - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - } - } - }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true }, "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true }, "query-string": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "dev": true, + "optional": true, "requires": { "decode-uri-component": "^0.2.0", "object-assign": "^4.1.0", "strict-uri-encode": "^1.0.0" } }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" - }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, "requires": { "safe-buffer": "^5.1.0" } @@ -15514,6 +15428,8 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "optional": true, "requires": { "randombytes": "^2.0.5", "safe-buffer": "^5.1.0" @@ -15522,12 +15438,16 @@ "range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true, + "optional": true }, "raw-body": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "dev": true, + "optional": true, "requires": { "bytes": "3.1.0", "http-errors": "1.7.2", @@ -15535,31 +15455,11 @@ "unpipe": "1.0.0" } }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, "readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -15570,55 +15470,25 @@ "util-deprecate": "~1.0.1" }, "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true } } }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, - "requires": { - "resolve": "^1.1.6" - } - }, "regenerate": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", - "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", "dev": true }, "regenerator-runtime": { "version": "0.11.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true }, "regenerator-transform": { "version": "0.10.1", @@ -15635,6 +15505,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, "requires": { "extend-shallow": "^3.0.2", "safe-regex": "^1.1.0" @@ -15648,13 +15519,29 @@ "requires": { "define-properties": "^1.1.3", "es-abstract": "^1.17.0-next.1" + }, + "dependencies": { + "es-abstract": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", + "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + } } }, - "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==" - }, "regexpu-core": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", @@ -15679,51 +15566,27 @@ "dev": true, "requires": { "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } } }, - "release-zalgo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", - "requires": { - "es6-error": "^4.0.1" - } - }, - "remove-bom-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", - "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5", - "is-utf8": "^0.2.1" - } - }, - "remove-bom-stream": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", - "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=", - "dev": true, - "requires": { - "remove-bom-buffer": "^3.0.0", - "safe-buffer": "^5.1.0", - "through2": "^2.0.3" - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" - }, "repeat-element": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==" + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true }, "repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true }, "repeating": { "version": "2.0.1", @@ -15734,27 +15597,11 @@ "is-finite": "^1.0.0" } }, - "replace-ext": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", - "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", - "dev": true - }, - "replace-homedir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz", - "integrity": "sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw=", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1", - "is-absolute": "^1.0.0", - "remove-trailing-separator": "^1.1.0" - } - }, "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "dev": true, "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -15763,7 +15610,7 @@ "extend": "~3.0.2", "forever-agent": "~0.6.1", "form-data": "~2.3.2", - "har-validator": "~5.1.0", + "har-validator": "~5.1.3", "http-signature": "~1.2.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", @@ -15773,102 +15620,27 @@ "performance-now": "^2.1.0", "qs": "~6.5.2", "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", + "tough-cookie": "~2.5.0", "tunnel-agent": "^0.6.0", "uuid": "^3.3.2" - }, - "dependencies": { - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" - } - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "resolve": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.14.2.tgz", - "integrity": "sha512-EjlOBLBO1kxsUxsKjLt7TAECyKW6fOh1VRkykQkKGzcBbjjPIxBqGh0jf7GJ3k/f5mxMqW3htMD3WdTUVtW8HQ==", - "requires": { - "path-parse": "^1.0.6" - } - }, - "resolve-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", - "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", - "requires": { - "resolve-from": "^3.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" - } - } - }, - "resolve-dir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", - "requires": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" - }, - "resolve-options": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", - "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=", - "dev": true, - "requires": { - "value-or-function": "^3.0.0" } }, "resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true }, "responselike": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "optional": true, "requires": { "lowercase-keys": "^1.0.0" } }, - "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "requires": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - } - }, "resumer": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", @@ -15881,12 +15653,14 @@ "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true }, "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, "requires": { "glob": "^7.1.3" } @@ -15895,53 +15669,32 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, "requires": { "hash-base": "^3.0.0", "inherits": "^2.0.1" } }, "rlp": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.4.tgz", - "integrity": "sha512-fdq2yYCWpAQBhwkZv+Z8o/Z4sPmYm1CUq6P7n6lVTOdb949CnqA0sndXal5C1NleSVSZm6q5F3iEbauyVln/iw==", + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.6.tgz", + "integrity": "sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg==", + "dev": true, "requires": { "bn.js": "^4.11.1" } }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "requires": { - "is-promise": "^2.1.0" - } - }, - "run-queue": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", - "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", - "requires": { - "aproba": "^1.1.1" - } - }, "rustbn.js": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz", "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==", "dev": true }, - "rxjs": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz", - "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==", - "requires": { - "tslib": "^1.9.0" - } - }, "safe-buffer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true }, "safe-event-emitter": { "version": "1.0.1", @@ -15956,6 +15709,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, "requires": { "ret": "~0.1.10" } @@ -15963,42 +15717,14 @@ "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "schema-utils": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.4.tgz", - "integrity": "sha512-VNjcaUxVnEeun6B2fiiUDjXXBtD4ZSH7pdbfIu1pOFwgptDPLMo/z9jr4sUfsjFVPqDCEin/F7IYlq7/E6yDbQ==", - "requires": { - "ajv": "^6.10.2", - "ajv-keywords": "^3.4.1" - } - }, - "scrypt": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/scrypt/-/scrypt-6.0.3.tgz", - "integrity": "sha1-BOAUpWgrU/pQwtXM4WfXGcBthw0=", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.0.8" - } + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true }, "scrypt-js": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz", - "integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=" - }, - "scrypt.js": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/scrypt.js/-/scrypt.js-0.3.0.tgz", - "integrity": "sha512-42LTc1nyFsyv/o0gcHtDztrn+aqpkaCNt5Qh7ATBZfhEZU7IC/0oT/qbBH+uRNoAPvs2fwiOId68FDEoSRA8/A==", - "dev": true, - "optional": true, - "requires": { - "scrypt": "^6.0.2", - "scryptsy": "^1.2.1" - } + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", + "dev": true }, "scryptsy": { "version": "1.2.1", @@ -16011,25 +15737,14 @@ } }, "secp256k1": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.8.0.tgz", - "integrity": "sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", + "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", + "dev": true, "requires": { - "bindings": "^1.5.0", - "bip66": "^1.1.5", - "bn.js": "^4.11.8", - "create-hash": "^1.2.0", - "drbg.js": "^1.0.1", "elliptic": "^6.5.2", - "nan": "^2.14.0", - "safe-buffer": "^5.1.2" - }, - "dependencies": { - "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" - } + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" } }, "seedrandom": { @@ -16038,43 +15753,18 @@ "integrity": "sha512-1/02Y/rUeU1CJBAGLebiC5Lbo5FnB22gQbIFFYTLkwvp1xdABZJH1sn4ZT1MzXmPpzv+Rf/Lu2NcsLJiK4rcDg==", "dev": true }, - "seek-bzip": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.5.tgz", - "integrity": "sha1-z+kXyz0nS8/6x5J1ivUxc+sfq9w=", - "requires": { - "commander": "~2.8.1" - } - }, "semaphore": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/semaphore/-/semaphore-1.1.0.tgz", "integrity": "sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA==", "dev": true }, - "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" - }, - "semver-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=" - }, - "semver-greatest-satisfied-range": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz", - "integrity": "sha1-E+jCZYq5aRywzXEJMkAoDTb3els=", - "dev": true, - "requires": { - "sver-compat": "^1.5.0" - } - }, "send": { "version": "0.17.1", "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "dev": true, + "optional": true, "requires": { "debug": "2.6.9", "depd": "~1.1.2", @@ -16095,6 +15785,8 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "optional": true, "requires": { "ms": "2.0.0" }, @@ -16102,26 +15794,27 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true, + "optional": true } } }, "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true, + "optional": true } } }, - "serialize-javascript": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", - "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==" - }, "serve-static": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "dev": true, + "optional": true, "requires": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", @@ -16133,6 +15826,8 @@ "version": "0.1.12", "resolved": "https://registry.npmjs.org/servify/-/servify-0.1.12.tgz", "integrity": "sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==", + "dev": true, + "optional": true, "requires": { "body-parser": "^1.16.0", "cors": "^2.8.1", @@ -16141,11 +15836,6 @@ "xhr": "^2.3.3" } }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, "set-immediate-shim": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", @@ -16156,6 +15846,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, "requires": { "extend-shallow": "^2.0.1", "is-extendable": "^0.1.1", @@ -16167,108 +15858,66 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, "requires": { "is-extendable": "^0.1.0" } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true } } }, "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true }, "setprototypeof": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", + "dev": true, + "optional": true }, "sha.js": { "version": "2.4.11", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" } }, - "sha3": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/sha3/-/sha3-1.2.6.tgz", - "integrity": "sha512-KgLGmJGrmNB4JWVsAV11Yk6KbvsAiygWJc7t5IebWva/0NukNrjJqhtKhzy3Eiv2AKuGvhZZt7dt1mDo7HkoiQ==", - "dev": true, - "requires": { - "nan": "2.13.2" - } - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - }, "simple-concat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", - "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "dev": true, + "optional": true }, "simple-get": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "dev": true, + "optional": true, "requires": { "decompress-response": "^3.3.0", "once": "^1.3.1", "simple-concat": "^1.0.0" } }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true - }, - "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", - "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - } - } - }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, "requires": { "base": "^0.11.1", "debug": "^2.2.0", @@ -16284,6 +15933,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "requires": { "ms": "2.0.0" } @@ -16292,6 +15942,7 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, "requires": { "is-descriptor": "^0.1.0" } @@ -16300,19 +15951,85 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" } }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, @@ -16320,6 +16037,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, "requires": { "define-property": "^1.0.0", "isobject": "^3.0.0", @@ -16330,35 +16048,10 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, "requires": { "is-descriptor": "^1.0.0" } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } } } }, @@ -16366,94 +16059,39 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, "requires": { "kind-of": "^3.2.0" }, "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } } } }, - "solc": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.6.1.tgz", - "integrity": "sha512-iKqNYps2p++x8L9sBg7JeAJb7EmW8VJ/2asAzwlLYcUhj86AzuWLe94UTSQHv1SSCCj/x6lya8twvXkZtlTbIQ==", - "requires": { - "command-exists": "^1.2.8", - "commander": "3.0.2", - "fs-extra": "^0.30.0", - "js-sha3": "0.8.0", - "memorystream": "^0.3.1", - "require-from-string": "^2.0.0", - "semver": "^5.5.0", - "tmp": "0.0.33" - }, - "dependencies": { - "commander": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", - "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==" - }, - "fs-extra": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", - "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "path-is-absolute": "^1.0.0", - "rimraf": "^2.2.8" - } - }, - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "requires": { - "os-tmpdir": "~1.0.2" - } - } - } - }, - "source-list-map": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", - "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==" - }, "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true }, "source-map-resolve": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "dev": true, "requires": { "atob": "^2.1.2", "decode-uri-component": "^0.2.0", @@ -16466,111 +16104,40 @@ "version": "0.5.12", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", + "dev": true, "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "source-map-url": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" - }, - "sparkles": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", - "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", "dev": true }, - "spawn-wrap": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", - "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", - "requires": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" - }, - "dependencies": { - "make-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.0.tgz", - "integrity": "sha512-grNJDhb8b1Jm1qeqW5R/O63wUo4UXo2v2HMic6YT9i/HBlF93S8jkMgH7yugvY9ABDShH4VZMn8I+U8+fCNegw==", - "requires": { - "semver": "^6.0.0" - } - }, - "rimraf": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.1.tgz", - "integrity": "sha512-IQ4ikL8SjBiEDZfk+DFVwqRK8md24RWMEJkdSlgNLkyyAImcjf8SWvU1qFMDOb4igBClbTQ/ugPqXcRwdFTxZw==", - "requires": { - "glob": "^7.1.3" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==" - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==" - }, "split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, "requires": { "extend-shallow": "^3.0.0" } }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" - }, "sshpk": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dev": true, "requires": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -16586,44 +16153,16 @@ "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" - } - } - }, - "ssri": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-7.1.0.tgz", - "integrity": "sha512-77/WrDZUWocK0mvA5NTRQyveUf+wsrIc6vyrxpS8tVvYBcX215QbafrJR3KtkpskIzoFLqqNuuYQvxaMjXJ/0g==", - "requires": { - "figgy-pudding": "^3.5.1", - "minipass": "^3.1.1" - }, - "dependencies": { - "minipass": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.1.tgz", - "integrity": "sha512-UFqVihv6PQgwj8/yTGvl9kPz7xIAY+R5z6XYjRInD3Gk3qx6QGSD6zEcpeG4Dy/lQnv1J6zv8ejV90hyYIKf3w==", - "requires": { - "yallist": "^4.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true } } }, - "stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", - "dev": true - }, "static-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, "requires": { "define-property": "^0.2.5", "object-copy": "^0.1.0" @@ -16633,57 +16172,82 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, "requires": { "is-descriptor": "^0.1.0" } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true } } }, "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" - }, - "stream-browserify": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", - "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", - "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, - "stream-each": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", - "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", - "requires": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" - } - }, - "stream-exhaust": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz", - "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==", - "dev": true - }, - "stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "stream-shift": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", - "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true, + "optional": true }, "stream-to-pull-stream": { "version": "1.7.3", @@ -16706,134 +16270,85 @@ "strict-uri-encode": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string.prototype.trim": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.1.tgz", - "integrity": "sha512-MjGFEeqixw47dAMFMtgUro/I0+wNqZB5GKXGt1fFr24u3TzDXCPu7J9Buppzoe3r/LqkSDLDDJzE15RGWDGAVw==", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1" - } - }, - "string.prototype.trimleft": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz", - "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==", - "requires": { - "define-properties": "^1.1.3", - "function-bind": "^1.1.1" - } - }, - "string.prototype.trimright": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz", - "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==", - "requires": { - "define-properties": "^1.1.3", - "function-bind": "^1.1.1" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true + "optional": true }, - "stringify-object": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", - "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==", + "string.prototype.trim": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.3.tgz", + "integrity": "sha512-16IL9pIBA5asNOSukPfxX2W68BaBvxyiRK16H3RA/lWW9BDosh+w7f+LhomPHpXJ82QEe7w7/rY/S1CV97raLg==", + "dev": true, "requires": { - "get-own-enumerable-property-symbols": "^3.0.0", - "is-obj": "^1.0.1", - "is-regexp": "^1.0.0" + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1" } }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "string.prototype.trimend": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz", + "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==", + "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" } }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "string.prototype.trimstart": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz", + "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==", "dev": true, "requires": { - "is-utf8": "^0.2.0" + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" } }, - "strip-dirs": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", - "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, "requires": { - "is-natural-number": "^4.0.1" + "safe-buffer": "~5.1.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } } }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" - }, - "strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" - }, "strip-hex-prefix": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", + "dev": true, "requires": { "is-hex-prefixed": "1.0.0" } }, - "strip-json-comments": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", - "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==" - }, "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - }, - "sver-compat": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz", - "integrity": "sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg=", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { - "es6-iterator": "^2.0.1", - "es6-symbol": "^3.1.1" + "has-flag": "^3.0.0" } }, "swarm-js": { - "version": "0.1.39", - "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.39.tgz", - "integrity": "sha512-QLMqL2rzF6n5s50BptyD6Oi0R1aWlJC5Y17SRIVXRj6OR1DRIPM7nepvrxxkjA1zNzFz6mUOMjfeqeDaWB7OOg==", + "version": "0.1.40", + "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.40.tgz", + "integrity": "sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA==", + "dev": true, + "optional": true, "requires": { "bluebird": "^3.5.0", "buffer": "^5.0.5", - "decompress": "^4.0.0", "eth-lib": "^0.1.26", "fs-extra": "^4.0.2", "got": "^7.1.0", @@ -16842,18 +16357,34 @@ "mock-fs": "^4.1.0", "setimmediate": "^1.0.5", "tar": "^4.0.2", - "xhr-request-promise": "^0.1.2" + "xhr-request": "^1.0.1" }, "dependencies": { + "fs-extra": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "dev": true, + "optional": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, "get-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true, + "optional": true }, "got": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", + "dev": true, + "optional": true, "requires": { "decompress-response": "^3.2.0", "duplexer3": "^0.1.4", @@ -16871,86 +16402,43 @@ "url-to-options": "^1.0.1" } }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true, + "optional": true + }, "p-cancelable": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", - "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==" + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", + "dev": true, + "optional": true }, "prepend-http": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true, + "optional": true }, "url-parse-lax": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "optional": true, "requires": { "prepend-http": "^1.0.1" } } } }, - "symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==" - }, - "table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", - "requires": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "tapable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", - "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==" - }, "tape": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/tape/-/tape-4.13.0.tgz", - "integrity": "sha512-J/hvA+GJnuWJ0Sj8Z0dmu3JgMNU+MmusvkCT7+SN4/2TklW18FNCp/UuHIEhPZwHfy4sXfKYgC7kypKg4umbOw==", + "version": "4.13.3", + "resolved": "https://registry.npmjs.org/tape/-/tape-4.13.3.tgz", + "integrity": "sha512-0/Y20PwRIUkQcTCSi4AASs+OANZZwqPKaipGCEwp10dQMipVvSZwUUCi01Y/OklIGyHKFhIcjock+DKnBfLAFw==", "dev": true, "requires": { "deep-equal": "~1.1.1", @@ -16962,19 +16450,51 @@ "has": "~1.0.3", "inherits": "~2.0.4", "is-regex": "~1.0.5", - "minimist": "~1.2.0", + "minimist": "~1.2.5", "object-inspect": "~1.7.0", - "resolve": "~1.14.2", + "resolve": "~1.17.0", "resumer": "~0.0.0", "string.prototype.trim": "~1.2.1", "through": "~2.3.8" }, "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", "dev": true + }, + "resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } } } }, @@ -16982,6 +16502,8 @@ "version": "4.4.13", "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", + "dev": true, + "optional": true, "requires": { "chownr": "^1.1.1", "fs-minipass": "^1.2.5", @@ -16992,137 +16514,51 @@ "yallist": "^3.0.3" }, "dependencies": { - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "dev": true, + "optional": true, "requires": { - "minimist": "^1.2.5" + "minipass": "^2.6.0" } - } - } - }, - "tar-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", - "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", - "requires": { - "bl": "^1.0.0", - "buffer-alloc": "^1.2.0", - "end-of-stream": "^1.0.0", - "fs-constants": "^1.0.0", - "readable-stream": "^2.3.0", - "to-buffer": "^1.1.1", - "xtend": "^4.0.0" - } - }, - "temp": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/temp/-/temp-0.9.1.tgz", - "integrity": "sha512-WMuOgiua1xb5R56lE0eH6ivpVmg/lq2OHm4+LtT/xtEtPQ+sz6N3bBM6WZ5FvO1lO4IKIOb43qnhoc4qxP5OeA==", - "requires": { - "rimraf": "~2.6.2" - }, - "dependencies": { - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + }, + "minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "dev": true, + "optional": true, "requires": { - "glob": "^7.1.3" + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" } } } }, - "terser": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.6.3.tgz", - "integrity": "sha512-Lw+ieAXmY69d09IIc/yqeBqXpEQIpDGZqT34ui1QWXIUpR2RjbqEkT8X7Lgex19hslSqcWM5iMN2kM11eMsESQ==", - "requires": { - "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" - }, - "dependencies": { - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" - } - } - }, - "terser-webpack-plugin": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-2.3.2.tgz", - "integrity": "sha512-SmvB/6gtEPv+CJ88MH5zDOsZdKXPS/Uzv2//e90+wM1IHFUhsguPKEILgzqrM1nQ4acRXN/SV4Obr55SXC+0oA==", - "requires": { - "cacache": "^13.0.1", - "find-cache-dir": "^3.2.0", - "jest-worker": "^24.9.0", - "schema-utils": "^2.6.1", - "serialize-javascript": "^2.1.2", - "source-map": "^0.6.1", - "terser": "^4.4.3", - "webpack-sources": "^1.4.3" - } - }, - "test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "requires": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" - }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true }, "through2": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, "requires": { "readable-stream": "~2.3.6", "xtend": "~4.0.1" } }, - "through2-filter": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", - "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", - "dev": true, - "requires": { - "through2": "~2.0.0", - "xtend": "~4.0.0" - } - }, - "time-stamp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", - "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", - "dev": true - }, "timed-out": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" - }, - "timers-browserify": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.11.tgz", - "integrity": "sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ==", - "requires": { - "setimmediate": "^1.0.4" - } + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "dev": true, + "optional": true }, "tmp": { "version": "0.1.0", @@ -17133,44 +16569,26 @@ "rimraf": "^2.6.3" } }, - "to-absolute-glob": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", - "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", - "dev": true, - "requires": { - "is-absolute": "^1.0.0", - "is-negated-glob": "^1.0.0" - } - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" - }, - "to-buffer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", - "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" - }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", - "dev": true - }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, "requires": { "kind-of": "^3.0.2" }, "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -17180,12 +16598,15 @@ "to-readable-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==" + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "dev": true, + "optional": true }, "to-regex": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, "requires": { "define-property": "^2.0.2", "extend-shallow": "^3.0.2", @@ -17193,43 +16614,21 @@ "safe-regex": "^1.1.0" } }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "to-through": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", - "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=", - "dev": true, - "requires": { - "through2": "^2.0.3" - } - }, "toidentifier": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", + "dev": true, + "optional": true }, "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - } + "psl": "^1.1.28", + "punycode": "^2.1.1" } }, "trim-right": { @@ -17238,58 +16637,39 @@ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", "dev": true }, - "tslib": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", - "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" - }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" - }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, "requires": { "safe-buffer": "^5.0.1" } }, "tweetnacl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.2.tgz", - "integrity": "sha512-+8aPRjmXgf1VqvyxSlBUzKzeYqVS9Ai8vZ28g+mL7dNQl1jlUTCMDZnvNQdAS1xTywMkIXwJsfipsR/6s2+syw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", "dev": true }, "tweetnacl-util": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.0.tgz", - "integrity": "sha1-RXbBzuXi1j0gf+5S8boCgZSAvHU=", + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", + "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==", "dev": true }, "type": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true }, "type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "optional": true, "requires": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -17298,12 +16678,14 @@ "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true }, "typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, "requires": { "is-typedarray": "^1.0.0" } @@ -17332,92 +16714,42 @@ "ultron": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" - }, - "unbzip2-stream": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.3.3.tgz", - "integrity": "sha512-fUlAF7U9Ah1Q6EieQ4x4zLNejrRvDWUYmxXUpN3uziFYCHapjWFaCAnreY9bGgxzaMCFAPPpYNng57CypwJVhg==", - "requires": { - "buffer": "^5.2.1", - "through": "^2.3.8" - } - }, - "unc-path-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", - "dev": true + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", + "dev": true, + "optional": true }, "underscore": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", - "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" - }, - "undertaker": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.2.1.tgz", - "integrity": "sha512-71WxIzDkgYk9ZS+spIB8iZXchFhAdEo2YU8xYqBYJ39DIUIqziK78ftm26eecoIY49X0J2MLhG4hr18Yp6/CMA==", + "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==", "dev": true, - "requires": { - "arr-flatten": "^1.0.1", - "arr-map": "^2.0.0", - "bach": "^1.0.0", - "collection-map": "^1.0.0", - "es6-weak-map": "^2.0.1", - "last-run": "^1.1.0", - "object.defaults": "^1.0.0", - "object.reduce": "^1.0.0", - "undertaker-registry": "^1.0.0" - } - }, - "undertaker-registry": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz", - "integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA=", - "dev": true + "optional": true }, "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, "requires": { "arr-union": "^3.1.0", "get-value": "^2.0.6", "is-extendable": "^0.1.1", "set-value": "^2.0.1" - } - }, - "unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", - "requires": { - "unique-slug": "^2.0.0" - } - }, - "unique-slug": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", - "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", - "requires": { - "imurmurhash": "^0.1.4" - } - }, - "unique-stream": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", - "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", - "dev": true, - "requires": { - "json-stable-stringify-without-jsonify": "^1.0.1", - "through2-filter": "^3.0.0" + }, + "dependencies": { + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + } } }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true }, "unorm": { "version": "1.6.0", @@ -17428,12 +16760,15 @@ "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true, + "optional": true }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, "requires": { "has-value": "^0.3.1", "isobject": "^3.0.0" @@ -17443,6 +16778,7 @@ "version": "0.3.1", "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, "requires": { "get-value": "^2.0.3", "has-values": "^0.1.4", @@ -17453,6 +16789,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, "requires": { "isarray": "1.0.0" } @@ -17461,1423 +16798,905 @@ }, "has-values": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - } - } - }, - "upath": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", - "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==" - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "requires": { - "punycode": "^2.1.0" - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" - } - } - }, - "url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", - "requires": { - "prepend-http": "^2.0.0" - } - }, - "url-set-query": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", - "integrity": "sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=" - }, - "url-to-options": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", - "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=" - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" - }, - "utf8": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", - "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==" - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "requires": { - "inherits": "2.0.1" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" - } - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "util.promisify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.1.tgz", - "integrity": "sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.2", - "has-symbols": "^1.0.1", - "object.getownpropertydescriptors": "^2.1.0" - } - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" - }, - "v8-compile-cache": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", - "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==" - }, - "v8flags": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.3.tgz", - "integrity": "sha512-amh9CCg3ZxkzQ48Mhcb8iX7xpAfYJgePHxWMQCBWECpOSqJUXgY26ncA61UTV0BkPqfhcy6mzwCIoP4ygxpW8w==", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "value-or-function": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", - "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", - "dev": true - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "vinyl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", - "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", - "dev": true, - "requires": { - "clone": "^2.1.1", - "clone-buffer": "^1.0.0", - "clone-stats": "^1.0.0", - "cloneable-readable": "^1.0.0", - "remove-trailing-separator": "^1.0.1", - "replace-ext": "^1.0.0" - } - }, - "vinyl-fs": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", - "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", - "dev": true, - "requires": { - "fs-mkdirp-stream": "^1.0.0", - "glob-stream": "^6.1.0", - "graceful-fs": "^4.0.0", - "is-valid-glob": "^1.0.0", - "lazystream": "^1.0.0", - "lead": "^1.0.0", - "object.assign": "^4.0.4", - "pumpify": "^1.3.5", - "readable-stream": "^2.3.3", - "remove-bom-buffer": "^3.0.0", - "remove-bom-stream": "^1.2.0", - "resolve-options": "^1.1.0", - "through2": "^2.0.0", - "to-through": "^2.0.0", - "value-or-function": "^3.0.0", - "vinyl": "^2.0.0", - "vinyl-sourcemap": "^1.1.0" - } - }, - "vinyl-sourcemap": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", - "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=", - "dev": true, - "requires": { - "append-buffer": "^1.0.2", - "convert-source-map": "^1.5.0", - "graceful-fs": "^4.1.6", - "normalize-path": "^2.1.1", - "now-and-later": "^2.0.0", - "remove-bom-buffer": "^3.0.0", - "vinyl": "^2.0.0" - } - }, - "vm-browserify": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", - "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==" - }, - "watchpack": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", - "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", - "requires": { - "chokidar": "^2.0.2", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0" - } - }, - "web3": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.4.tgz", - "integrity": "sha512-xPXGe+w0x0t88Wj+s/dmAdASr3O9wmA9mpZRtixGZxmBexAF0MjfqYM+MS4tVl5s11hMTN3AZb8cDD4VLfC57A==", - "requires": { - "@types/node": "^12.6.1", - "web3-bzz": "1.2.4", - "web3-core": "1.2.4", - "web3-eth": "1.2.4", - "web3-eth-personal": "1.2.4", - "web3-net": "1.2.4", - "web3-shh": "1.2.4", - "web3-utils": "1.2.4" - }, - "dependencies": { - "@types/node": { - "version": "12.19.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.1.tgz", - "integrity": "sha512-/xaVmBBjOGh55WCqumLAHXU9VhjGtmyTGqJzFBXRWZzByOXI5JAJNx9xPVGEsNizrNwcec92fQMj458MWfjN1A==" - } - } - }, - "web3-bzz": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.4.tgz", - "integrity": "sha512-MqhAo/+0iQSMBtt3/QI1rU83uvF08sYq8r25+OUZ+4VtihnYsmkkca+rdU0QbRyrXY2/yGIpI46PFdh0khD53A==", - "requires": { - "@types/node": "^10.12.18", - "got": "9.6.0", - "swarm-js": "0.1.39", - "underscore": "1.9.1" - }, - "dependencies": { - "@types/node": { - "version": "10.17.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.14.tgz", - "integrity": "sha512-G0UmX5uKEmW+ZAhmZ6PLTQ5eu/VPaT+d/tdLd5IFsKRPcbe6lPxocBtcYBFSaLaCW8O60AX90e91Nsp8lVHCNw==" - } - } - }, - "web3-core": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.4.tgz", - "integrity": "sha512-CHc27sMuET2cs1IKrkz7xzmTdMfZpYswe7f0HcuyneTwS1yTlTnHyqjAaTy0ZygAb/x4iaVox+Gvr4oSAqSI+A==", - "requires": { - "@types/bignumber.js": "^5.0.0", - "@types/bn.js": "^4.11.4", - "@types/node": "^12.6.1", - "web3-core-helpers": "1.2.4", - "web3-core-method": "1.2.4", - "web3-core-requestmanager": "1.2.4", - "web3-utils": "1.2.4" - }, - "dependencies": { - "@types/node": { - "version": "12.12.26", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.26.tgz", - "integrity": "sha512-UmUm94/QZvU5xLcUlNR8hA7Ac+fGpO1EG/a8bcWVz0P0LqtxFmun9Y2bbtuckwGboWJIT70DoWq1r3hb56n3DA==" - } - } - }, - "web3-core-helpers": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.4.tgz", - "integrity": "sha512-U7wbsK8IbZvF3B7S+QMSNP0tni/6VipnJkB0tZVEpHEIV2WWeBHYmZDnULWcsS/x/jn9yKhJlXIxWGsEAMkjiw==", - "requires": { - "underscore": "1.9.1", - "web3-eth-iban": "1.2.4", - "web3-utils": "1.2.4" - } - }, - "web3-core-method": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.4.tgz", - "integrity": "sha512-8p9kpL7di2qOVPWgcM08kb+yKom0rxRCMv6m/K+H+yLSxev9TgMbCgMSbPWAHlyiF3SJHw7APFKahK5Z+8XT5A==", - "requires": { - "underscore": "1.9.1", - "web3-core-helpers": "1.2.4", - "web3-core-promievent": "1.2.4", - "web3-core-subscriptions": "1.2.4", - "web3-utils": "1.2.4" - } - }, - "web3-core-promievent": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.4.tgz", - "integrity": "sha512-gEUlm27DewUsfUgC3T8AxkKi8Ecx+e+ZCaunB7X4Qk3i9F4C+5PSMGguolrShZ7Zb6717k79Y86f3A00O0VAZw==", - "requires": { - "any-promise": "1.3.0", - "eventemitter3": "3.1.2" - } - }, - "web3-core-requestmanager": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.4.tgz", - "integrity": "sha512-eZJDjyNTDtmSmzd3S488nR/SMJtNnn/GuwxnMh3AzYCqG3ZMfOylqTad2eYJPvc2PM5/Gj1wAMQcRpwOjjLuPg==", - "requires": { - "underscore": "1.9.1", - "web3-core-helpers": "1.2.4", - "web3-providers-http": "1.2.4", - "web3-providers-ipc": "1.2.4", - "web3-providers-ws": "1.2.4" - } - }, - "web3-core-subscriptions": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.4.tgz", - "integrity": "sha512-3D607J2M8ymY9V+/WZq4MLlBulwCkwEjjC2U+cXqgVO1rCyVqbxZNCmHyNYHjDDCxSEbks9Ju5xqJxDSxnyXEw==", - "requires": { - "eventemitter3": "3.1.2", - "underscore": "1.9.1", - "web3-core-helpers": "1.2.4" - } - }, - "web3-eth": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.4.tgz", - "integrity": "sha512-+j+kbfmZsbc3+KJpvHM16j1xRFHe2jBAniMo1BHKc3lho6A8Sn9Buyut6odubguX2AxoRArCdIDCkT9hjUERpA==", - "requires": { - "underscore": "1.9.1", - "web3-core": "1.2.4", - "web3-core-helpers": "1.2.4", - "web3-core-method": "1.2.4", - "web3-core-subscriptions": "1.2.4", - "web3-eth-abi": "1.2.4", - "web3-eth-accounts": "1.2.4", - "web3-eth-contract": "1.2.4", - "web3-eth-ens": "1.2.4", - "web3-eth-iban": "1.2.4", - "web3-eth-personal": "1.2.4", - "web3-net": "1.2.4", - "web3-utils": "1.2.4" - } - }, - "web3-eth-abi": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.4.tgz", - "integrity": "sha512-8eLIY4xZKoU3DSVu1pORluAw9Ru0/v4CGdw5so31nn+7fR8zgHMgwbFe0aOqWQ5VU42PzMMXeIJwt4AEi2buFg==", - "requires": { - "ethers": "4.0.0-beta.3", - "underscore": "1.9.1", - "web3-utils": "1.2.4" - }, - "dependencies": { - "@types/node": { - "version": "10.17.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.14.tgz", - "integrity": "sha512-G0UmX5uKEmW+ZAhmZ6PLTQ5eu/VPaT+d/tdLd5IFsKRPcbe6lPxocBtcYBFSaLaCW8O60AX90e91Nsp8lVHCNw==" - }, - "aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" - }, - "elliptic": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz", - "integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "inherits": "^2.0.1" - } - }, - "ethers": { - "version": "4.0.0-beta.3", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.0-beta.3.tgz", - "integrity": "sha512-YYPogooSknTwvHg3+Mv71gM/3Wcrx+ZpCzarBj3mqs9njjRkrOo2/eufzhHloOCo3JSoNI4TQJJ6yU5ABm3Uog==", - "requires": { - "@types/node": "^10.3.2", - "aes-js": "3.0.0", - "bn.js": "^4.4.0", - "elliptic": "6.3.3", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.3", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - } - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" - }, - "setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" - }, - "uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" - } - } - }, - "web3-eth-accounts": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.4.tgz", - "integrity": "sha512-04LzT/UtWmRFmi4hHRewP5Zz43fWhuHiK5XimP86sUQodk/ByOkXQ3RoXyGXFMNoRxdcAeRNxSfA2DpIBc9xUw==", - "requires": { - "@web3-js/scrypt-shim": "^0.1.0", - "any-promise": "1.3.0", - "crypto-browserify": "3.12.0", - "eth-lib": "0.2.7", - "ethereumjs-common": "^1.3.2", - "ethereumjs-tx": "^2.1.1", - "underscore": "1.9.1", - "uuid": "3.3.2", - "web3-core": "1.2.4", - "web3-core-helpers": "1.2.4", - "web3-core-method": "1.2.4", - "web3-utils": "1.2.4" - }, - "dependencies": { - "eth-lib": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", - "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true } } }, - "web3-eth-contract": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.4.tgz", - "integrity": "sha512-b/9zC0qjVetEYnzRA1oZ8gF1OSSUkwSYi5LGr4GeckLkzXP7osEnp9lkO/AQcE4GpG+l+STnKPnASXJGZPgBRQ==", + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, "requires": { - "@types/bn.js": "^4.11.4", - "underscore": "1.9.1", - "web3-core": "1.2.4", - "web3-core-helpers": "1.2.4", - "web3-core-method": "1.2.4", - "web3-core-promievent": "1.2.4", - "web3-core-subscriptions": "1.2.4", - "web3-eth-abi": "1.2.4", - "web3-utils": "1.2.4" + "punycode": "^2.1.0" } }, - "web3-eth-ens": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.4.tgz", - "integrity": "sha512-g8+JxnZlhdsCzCS38Zm6R/ngXhXzvc3h7bXlxgKU4coTzLLoMpgOAEz71GxyIJinWTFbLXk/WjNY0dazi9NwVw==", + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, + "optional": true, "requires": { - "eth-ens-namehash": "2.0.8", - "underscore": "1.9.1", - "web3-core": "1.2.4", - "web3-core-helpers": "1.2.4", - "web3-core-promievent": "1.2.4", - "web3-eth-abi": "1.2.4", - "web3-eth-contract": "1.2.4", - "web3-utils": "1.2.4" + "prepend-http": "^2.0.0" } }, - "web3-eth-iban": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.4.tgz", - "integrity": "sha512-D9HIyctru/FLRpXakRwmwdjb5bWU2O6UE/3AXvRm6DCOf2e+7Ve11qQrPtaubHfpdW3KWjDKvlxV9iaFv/oTMQ==", + "url-set-query": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", + "integrity": "sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=", + "dev": true, + "optional": true + }, + "url-to-options": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", + "dev": true, + "optional": true + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "utf-8-validate": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.4.tgz", + "integrity": "sha512-MEF05cPSq3AwJ2C7B7sHAA6i53vONoZbMGX8My5auEVm6W+dJ2Jd/TZPyGJ5CH42V2XtbI5FD28HeHeqlPzZ3Q==", + "dev": true, "requires": { - "bn.js": "4.11.8", - "web3-utils": "1.2.4" + "node-gyp-build": "^4.2.0" } }, - "web3-eth-personal": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.4.tgz", - "integrity": "sha512-5Russ7ZECwHaZXcN3DLuLS7390Vzgrzepl4D87SD6Sn1DHsCZtvfdPIYwoTmKNp69LG3mORl7U23Ga5YxqkICw==", - "requires": { - "@types/node": "^12.6.1", - "web3-core": "1.2.4", - "web3-core-helpers": "1.2.4", - "web3-core-method": "1.2.4", - "web3-net": "1.2.4", - "web3-utils": "1.2.4" - }, - "dependencies": { - "@types/node": { - "version": "12.12.26", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.26.tgz", - "integrity": "sha512-UmUm94/QZvU5xLcUlNR8hA7Ac+fGpO1EG/a8bcWVz0P0LqtxFmun9Y2bbtuckwGboWJIT70DoWq1r3hb56n3DA==" - } - } + "utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", + "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", + "dev": true, + "optional": true }, - "web3-net": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.4.tgz", - "integrity": "sha512-wKOsqhyXWPSYTGbp7ofVvni17yfRptpqoUdp3SC8RAhDmGkX6irsiT9pON79m6b3HUHfLoBilFQyt/fTUZOf7A==", + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "util.promisify": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.1.1.tgz", + "integrity": "sha512-/s3UsZUrIfa6xDhr7zZhnE9SLQ5RIXyYfiVnMMyMDzOc8WhWN4Nbh36H842OyurKbCDAesZOJaVyvmSl6fhGQw==", + "dev": true, "requires": { - "web3-core": "1.2.4", - "web3-core-method": "1.2.4", - "web3-utils": "1.2.4" + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "for-each": "^0.3.3", + "has-symbols": "^1.0.1", + "object.getownpropertydescriptors": "^2.1.1" } }, - "web3-provider-engine": { - "version": "14.2.1", - "resolved": "https://registry.npmjs.org/web3-provider-engine/-/web3-provider-engine-14.2.1.tgz", - "integrity": "sha512-iSv31h2qXkr9vrL6UZDm4leZMc32SjWJFGOp/D92JXfcEboCqraZyuExDkpxKw8ziTufXieNM7LSXNHzszYdJw==", + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", "dev": true, - "requires": { - "async": "^2.5.0", - "backoff": "^2.5.0", - "clone": "^2.0.0", - "cross-fetch": "^2.1.0", - "eth-block-tracker": "^3.0.0", - "eth-json-rpc-infura": "^3.1.0", - "eth-sig-util": "^1.4.2", - "ethereumjs-block": "^1.2.2", - "ethereumjs-tx": "^1.2.0", - "ethereumjs-util": "^5.1.5", - "ethereumjs-vm": "^2.3.4", - "json-rpc-error": "^2.0.0", - "json-stable-stringify": "^1.0.1", - "promise-to-callback": "^1.0.0", - "readable-stream": "^2.2.9", - "request": "^2.85.0", - "semaphore": "^1.0.3", - "ws": "^5.1.1", - "xhr": "^2.2.0", - "xtend": "^4.0.1" - }, - "dependencies": { - "eth-sig-util": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz", - "integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=", - "dev": true, - "requires": { - "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git", - "ethereumjs-util": "^5.1.1" - } - }, - "ethereum-common": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.2.0.tgz", - "integrity": "sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA==", - "dev": true - }, - "ethereumjs-abi": { - "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#1cfbb13862f90f0b391d8a699544d5fe4dfb8c7b", - "from": "git+https://github.com/ethereumjs/ethereumjs-abi.git", - "dev": true, - "requires": { - "bn.js": "^4.11.8", - "ethereumjs-util": "^6.0.0" - }, - "dependencies": { - "ethereumjs-util": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz", - "integrity": "sha512-vb0XN9J2QGdZGIEKG2vXM+kUdEivUfU6Wmi5y0cg+LRhDYKnXIZ/Lz7XjFbHRR9VIKq2lVGLzGBkA++y2nOdOQ==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "ethjs-util": "0.1.6", - "keccak": "^2.0.0", - "rlp": "^2.2.3", - "secp256k1": "^3.0.1" - } - } - } - }, - "ethereumjs-account": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz", - "integrity": "sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA==", - "dev": true, - "requires": { - "ethereumjs-util": "^5.0.0", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1" - } - }, - "ethereumjs-block": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz", - "integrity": "sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg==", - "dev": true, - "requires": { - "async": "^2.0.1", - "ethereum-common": "0.2.0", - "ethereumjs-tx": "^1.2.2", - "ethereumjs-util": "^5.0.0", - "merkle-patricia-tree": "^2.1.2" - } - }, - "ethereumjs-tx": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", - "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", - "dev": true, - "requires": { - "ethereum-common": "^0.0.18", - "ethereumjs-util": "^5.0.0" - }, - "dependencies": { - "ethereum-common": { - "version": "0.0.18", - "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", - "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=", - "dev": true - } - } - }, - "ethereumjs-util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", - "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", - "dev": true, - "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "ethjs-util": "^0.1.3", - "keccak": "^1.0.2", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1", - "secp256k1": "^3.0.1" - }, - "dependencies": { - "keccak": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", - "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", - "dev": true, - "requires": { - "bindings": "^1.2.1", - "inherits": "^2.0.3", - "nan": "^2.2.1", - "safe-buffer": "^5.1.0" - } - } - } - }, - "ethereumjs-vm": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz", - "integrity": "sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw==", - "dev": true, - "requires": { - "async": "^2.1.2", - "async-eventemitter": "^0.2.2", - "ethereumjs-account": "^2.0.3", - "ethereumjs-block": "~2.2.0", - "ethereumjs-common": "^1.1.0", - "ethereumjs-util": "^6.0.0", - "fake-merkle-patricia-tree": "^1.0.1", - "functional-red-black-tree": "^1.0.1", - "merkle-patricia-tree": "^2.3.2", - "rustbn.js": "~0.2.0", - "safe-buffer": "^5.1.1" - }, - "dependencies": { - "ethereumjs-block": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz", - "integrity": "sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg==", - "dev": true, - "requires": { - "async": "^2.0.1", - "ethereumjs-common": "^1.5.0", - "ethereumjs-tx": "^2.1.1", - "ethereumjs-util": "^5.0.0", - "merkle-patricia-tree": "^2.1.2" - }, - "dependencies": { - "ethereumjs-util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", - "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", - "dev": true, - "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "ethjs-util": "^0.1.3", - "keccak": "^1.0.2", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1", - "secp256k1": "^3.0.1" - } - }, - "keccak": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", - "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", - "dev": true, - "requires": { - "bindings": "^1.2.1", - "inherits": "^2.0.3", - "nan": "^2.2.1", - "safe-buffer": "^5.1.0" - } - } - } - }, - "ethereumjs-tx": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", - "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", - "dev": true, - "requires": { - "ethereumjs-common": "^1.5.0", - "ethereumjs-util": "^6.0.0" - } - }, - "ethereumjs-util": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz", - "integrity": "sha512-vb0XN9J2QGdZGIEKG2vXM+kUdEivUfU6Wmi5y0cg+LRhDYKnXIZ/Lz7XjFbHRR9VIKq2lVGLzGBkA++y2nOdOQ==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "ethjs-util": "0.1.6", - "keccak": "^2.0.0", - "rlp": "^2.2.3", - "secp256k1": "^3.0.1" - } - } - } - }, - "keccak": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-2.1.0.tgz", - "integrity": "sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q==", + "optional": true + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + }, + "varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", + "dev": true, + "optional": true + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true, + "optional": true + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "web3": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.11.tgz", + "integrity": "sha512-mjQ8HeU41G6hgOYm1pmeH0mRAeNKJGnJEUzDMoerkpw7QUQT4exVREgF1MYPvL/z6vAshOXei25LE/t/Bxl8yQ==", + "dev": true, + "optional": true, + "requires": { + "web3-bzz": "1.2.11", + "web3-core": "1.2.11", + "web3-eth": "1.2.11", + "web3-eth-personal": "1.2.11", + "web3-net": "1.2.11", + "web3-shh": "1.2.11", + "web3-utils": "1.2.11" + } + }, + "web3-bzz": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.11.tgz", + "integrity": "sha512-XGpWUEElGypBjeFyUhTkiPXFbDVD6Nr/S5jznE3t8cWUA0FxRf1n3n/NuIZeb0H9RkN2Ctd/jNma/k8XGa3YKg==", + "dev": true, + "optional": true, + "requires": { + "@types/node": "^12.12.6", + "got": "9.6.0", + "swarm-js": "^0.1.40", + "underscore": "1.9.1" + }, + "dependencies": { + "@types/node": { + "version": "12.19.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.12.tgz", + "integrity": "sha512-UwfL2uIU9arX/+/PRcIkT08/iBadGN2z6ExOROA2Dh5mAuWTBj6iJbQX4nekiV5H8cTrEG569LeX+HRco9Cbxw==", "dev": true, - "requires": { - "bindings": "^1.5.0", - "inherits": "^2.0.4", - "nan": "^2.14.0", - "safe-buffer": "^5.2.0" - } - }, - "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", - "dev": true - }, - "ws": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", - "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", + "optional": true + } + } + }, + "web3-core": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.11.tgz", + "integrity": "sha512-CN7MEYOY5ryo5iVleIWRE3a3cZqVaLlIbIzDPsvQRUfzYnvzZQRZBm9Mq+ttDi2STOOzc1MKylspz/o3yq/LjQ==", + "dev": true, + "optional": true, + "requires": { + "@types/bn.js": "^4.11.5", + "@types/node": "^12.12.6", + "bignumber.js": "^9.0.0", + "web3-core-helpers": "1.2.11", + "web3-core-method": "1.2.11", + "web3-core-requestmanager": "1.2.11", + "web3-utils": "1.2.11" + }, + "dependencies": { + "@types/node": { + "version": "12.19.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.12.tgz", + "integrity": "sha512-UwfL2uIU9arX/+/PRcIkT08/iBadGN2z6ExOROA2Dh5mAuWTBj6iJbQX4nekiV5H8cTrEG569LeX+HRco9Cbxw==", "dev": true, - "requires": { - "async-limiter": "~1.0.0" - } + "optional": true } } }, - "web3-providers-http": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.4.tgz", - "integrity": "sha512-dzVCkRrR/cqlIrcrWNiPt9gyt0AZTE0J+MfAu9rR6CyIgtnm1wFUVVGaxYRxuTGQRO4Dlo49gtoGwaGcyxqiTw==", + "web3-core-helpers": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.11.tgz", + "integrity": "sha512-PEPoAoZd5ME7UfbnCZBdzIerpe74GEvlwT4AjOmHeCVZoIFk7EqvOZDejJHt+feJA6kMVTdd0xzRNN295UhC1A==", + "dev": true, + "optional": true, "requires": { - "web3-core-helpers": "1.2.4", - "xhr2-cookies": "1.1.0" + "underscore": "1.9.1", + "web3-eth-iban": "1.2.11", + "web3-utils": "1.2.11" } }, - "web3-providers-ipc": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.4.tgz", - "integrity": "sha512-8J3Dguffin51gckTaNrO3oMBo7g+j0UNk6hXmdmQMMNEtrYqw4ctT6t06YOf9GgtOMjSAc1YEh3LPrvgIsR7og==", + "web3-core-method": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.11.tgz", + "integrity": "sha512-ff0q76Cde94HAxLDZ6DbdmKniYCQVtvuaYh+rtOUMB6kssa5FX0q3vPmixi7NPooFnbKmmZCM6NvXg4IreTPIw==", + "dev": true, + "optional": true, "requires": { - "oboe": "2.1.4", + "@ethersproject/transactions": "^5.0.0-beta.135", "underscore": "1.9.1", - "web3-core-helpers": "1.2.4" + "web3-core-helpers": "1.2.11", + "web3-core-promievent": "1.2.11", + "web3-core-subscriptions": "1.2.11", + "web3-utils": "1.2.11" } }, - "web3-providers-ws": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.4.tgz", - "integrity": "sha512-F/vQpDzeK+++oeeNROl1IVTufFCwCR2hpWe5yRXN0ApLwHqXrMI7UwQNdJ9iyibcWjJf/ECbauEEQ8CHgE+MYQ==", + "web3-core-promievent": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.11.tgz", + "integrity": "sha512-il4McoDa/Ox9Agh4kyfQ8Ak/9ABYpnF8poBLL33R/EnxLsJOGQG2nZhkJa3I067hocrPSjEdlPt/0bHXsln4qA==", + "dev": true, + "optional": true, + "requires": { + "eventemitter3": "4.0.4" + } + }, + "web3-core-requestmanager": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.11.tgz", + "integrity": "sha512-oFhBtLfOiIbmfl6T6gYjjj9igOvtyxJ+fjS+byRxiwFJyJ5BQOz4/9/17gWR1Cq74paTlI7vDGxYfuvfE/mKvA==", + "dev": true, + "optional": true, "requires": { - "@web3-js/websocket": "^1.0.29", "underscore": "1.9.1", - "web3-core-helpers": "1.2.4" + "web3-core-helpers": "1.2.11", + "web3-providers-http": "1.2.11", + "web3-providers-ipc": "1.2.11", + "web3-providers-ws": "1.2.11" } }, - "web3-shh": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.4.tgz", - "integrity": "sha512-z+9SCw0dE+69Z/Hv8809XDbLj7lTfEv9Sgu8eKEIdGntZf4v7ewj5rzN5bZZSz8aCvfK7Y6ovz1PBAu4QzS4IQ==", + "web3-core-subscriptions": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.11.tgz", + "integrity": "sha512-qEF/OVqkCvQ7MPs1JylIZCZkin0aKK9lDxpAtQ1F8niEDGFqn7DT8E/vzbIa0GsOjL2fZjDhWJsaW+BSoAW1gg==", + "dev": true, + "optional": true, "requires": { - "web3-core": "1.2.4", - "web3-core-method": "1.2.4", - "web3-core-subscriptions": "1.2.4", - "web3-net": "1.2.4" + "eventemitter3": "4.0.4", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.11" } }, - "web3-utils": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.4.tgz", - "integrity": "sha512-+S86Ip+jqfIPQWvw2N/xBQq5JNqCO0dyvukGdJm8fEWHZbckT4WxSpHbx+9KLEWY4H4x9pUwnoRkK87pYyHfgQ==", + "web3-eth": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.11.tgz", + "integrity": "sha512-REvxW1wJ58AgHPcXPJOL49d1K/dPmuw4LjPLBPStOVkQjzDTVmJEIsiLwn2YeuNDd4pfakBwT8L3bz1G1/wVsQ==", + "dev": true, + "optional": true, "requires": { - "bn.js": "4.11.8", - "eth-lib": "0.2.7", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", "underscore": "1.9.1", - "utf8": "3.0.0" + "web3-core": "1.2.11", + "web3-core-helpers": "1.2.11", + "web3-core-method": "1.2.11", + "web3-core-subscriptions": "1.2.11", + "web3-eth-abi": "1.2.11", + "web3-eth-accounts": "1.2.11", + "web3-eth-contract": "1.2.11", + "web3-eth-ens": "1.2.11", + "web3-eth-iban": "1.2.11", + "web3-eth-personal": "1.2.11", + "web3-net": "1.2.11", + "web3-utils": "1.2.11" + } + }, + "web3-eth-abi": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.11.tgz", + "integrity": "sha512-PkRYc0+MjuLSgg03QVWqWlQivJqRwKItKtEpRUaxUAeLE7i/uU39gmzm2keHGcQXo3POXAbOnMqkDvOep89Crg==", + "dev": true, + "optional": true, + "requires": { + "@ethersproject/abi": "5.0.0-beta.153", + "underscore": "1.9.1", + "web3-utils": "1.2.11" + } + }, + "web3-eth-accounts": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.11.tgz", + "integrity": "sha512-6FwPqEpCfKIh3nSSGeo3uBm2iFSnFJDfwL3oS9pyegRBXNsGRVpgiW63yhNzL0796StsvjHWwQnQHsZNxWAkGw==", + "dev": true, + "optional": true, + "requires": { + "crypto-browserify": "3.12.0", + "eth-lib": "0.2.8", + "ethereumjs-common": "^1.3.2", + "ethereumjs-tx": "^2.1.1", + "scrypt-js": "^3.0.1", + "underscore": "1.9.1", + "uuid": "3.3.2", + "web3-core": "1.2.11", + "web3-core-helpers": "1.2.11", + "web3-core-method": "1.2.11", + "web3-utils": "1.2.11" }, "dependencies": { "eth-lib": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", - "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "dev": true, + "optional": true, "requires": { "bn.js": "^4.11.6", "elliptic": "^6.4.0", "xhr-request-promise": "^0.1.2" } + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true, + "optional": true } } }, - "webpack": { - "version": "4.41.5", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.41.5.tgz", - "integrity": "sha512-wp0Co4vpyumnp3KlkmpM5LWuzvZYayDwM2n17EHFr4qxBBbRokC7DJawPJC7TfSFZ9HZ6GsdH40EBj4UV0nmpw==", - "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-module-context": "1.8.5", - "@webassemblyjs/wasm-edit": "1.8.5", - "@webassemblyjs/wasm-parser": "1.8.5", - "acorn": "^6.2.1", - "ajv": "^6.10.2", - "ajv-keywords": "^3.4.1", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^4.1.0", - "eslint-scope": "^4.0.3", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^2.4.0", - "loader-utils": "^1.2.3", - "memory-fs": "^0.4.1", - "micromatch": "^3.1.10", - "mkdirp": "^0.5.1", - "neo-async": "^2.6.1", - "node-libs-browser": "^2.2.1", - "schema-utils": "^1.0.0", - "tapable": "^1.1.3", - "terser-webpack-plugin": "^1.4.3", - "watchpack": "^1.6.0", - "webpack-sources": "^1.4.1" - }, - "dependencies": { - "acorn": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz", - "integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw==" - }, - "cacache": { - "version": "12.0.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz", - "integrity": "sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==", - "requires": { - "bluebird": "^3.5.5", - "chownr": "^1.1.1", - "figgy-pudding": "^3.5.1", - "glob": "^7.1.4", - "graceful-fs": "^4.1.15", - "infer-owner": "^1.0.3", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.3", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" - } - }, - "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", - "requires": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "requires": { - "yallist": "^3.0.2" - } - }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - } - }, - "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "requires": { - "find-up": "^3.0.0" - } - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - }, - "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", - "requires": { - "figgy-pudding": "^3.5.1" - } - }, - "terser-webpack-plugin": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz", - "integrity": "sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA==", - "requires": { - "cacache": "^12.0.2", - "find-cache-dir": "^2.1.0", - "is-wsl": "^1.1.0", - "schema-utils": "^1.0.0", - "serialize-javascript": "^2.1.2", - "source-map": "^0.6.1", - "terser": "^4.1.2", - "webpack-sources": "^1.4.0", - "worker-farm": "^1.7.0" - } - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" - } + "web3-eth-contract": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.11.tgz", + "integrity": "sha512-MzYuI/Rq2o6gn7vCGcnQgco63isPNK5lMAan2E51AJLknjSLnOxwNY3gM8BcKoy4Z+v5Dv00a03Xuk78JowFow==", + "dev": true, + "optional": true, + "requires": { + "@types/bn.js": "^4.11.5", + "underscore": "1.9.1", + "web3-core": "1.2.11", + "web3-core-helpers": "1.2.11", + "web3-core-method": "1.2.11", + "web3-core-promievent": "1.2.11", + "web3-core-subscriptions": "1.2.11", + "web3-eth-abi": "1.2.11", + "web3-utils": "1.2.11" } }, - "webpack-bundle-size-analyzer": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/webpack-bundle-size-analyzer/-/webpack-bundle-size-analyzer-3.1.0.tgz", - "integrity": "sha512-8WlTT6uuCxZgZYNnCB0pRGukWRGH+Owg+HsqQUe1Zexakdno1eDYO+lE7ihBo9G0aCCZCJa8JWjYr9eLYfZrBA==", + "web3-eth-ens": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.11.tgz", + "integrity": "sha512-dbW7dXP6HqT1EAPvnniZVnmw6TmQEKF6/1KgAxbo8iBBYrVTMDGFQUUnZ+C4VETGrwwaqtX4L9d/FrQhZ6SUiA==", + "dev": true, + "optional": true, + "requires": { + "content-hash": "^2.5.2", + "eth-ens-namehash": "2.0.8", + "underscore": "1.9.1", + "web3-core": "1.2.11", + "web3-core-helpers": "1.2.11", + "web3-core-promievent": "1.2.11", + "web3-eth-abi": "1.2.11", + "web3-eth-contract": "1.2.11", + "web3-utils": "1.2.11" + } + }, + "web3-eth-iban": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.11.tgz", + "integrity": "sha512-ozuVlZ5jwFC2hJY4+fH9pIcuH1xP0HEFhtWsR69u9uDIANHLPQQtWYmdj7xQ3p2YT4bQLq/axKhZi7EZVetmxQ==", + "dev": true, + "optional": true, "requires": { - "commander": "^2.19.0", - "filesize": "^3.6.1", - "humanize": "0.0.9" + "bn.js": "^4.11.9", + "web3-utils": "1.2.11" + } + }, + "web3-eth-personal": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.11.tgz", + "integrity": "sha512-42IzUtKq9iHZ8K9VN0vAI50iSU9tOA1V7XU2BhF/tb7We2iKBVdkley2fg26TxlOcKNEHm7o6HRtiiFsVK4Ifw==", + "dev": true, + "optional": true, + "requires": { + "@types/node": "^12.12.6", + "web3-core": "1.2.11", + "web3-core-helpers": "1.2.11", + "web3-core-method": "1.2.11", + "web3-net": "1.2.11", + "web3-utils": "1.2.11" }, "dependencies": { - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + "@types/node": { + "version": "12.19.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.12.tgz", + "integrity": "sha512-UwfL2uIU9arX/+/PRcIkT08/iBadGN2z6ExOROA2Dh5mAuWTBj6iJbQX4nekiV5H8cTrEG569LeX+HRco9Cbxw==", + "dev": true, + "optional": true } } }, - "webpack-cli": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.10.tgz", - "integrity": "sha512-u1dgND9+MXaEt74sJR4PR7qkPxXUSQ0RXYq8x1L6Jg1MYVEmGPrH6Ah6C4arD4r0J1P5HKjRqpab36k0eIzPqg==", - "requires": { - "chalk": "2.4.2", - "cross-spawn": "6.0.5", - "enhanced-resolve": "4.1.0", - "findup-sync": "3.0.0", - "global-modules": "2.0.0", - "import-local": "2.0.0", - "interpret": "1.2.0", - "loader-utils": "1.2.3", - "supports-color": "6.1.0", - "v8-compile-cache": "2.0.3", - "yargs": "13.2.4" + "web3-net": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.11.tgz", + "integrity": "sha512-sjrSDj0pTfZouR5BSTItCuZ5K/oZPVdVciPQ6981PPPIwJJkCMeVjD7I4zO3qDPCnBjBSbWvVnLdwqUBPtHxyg==", + "dev": true, + "optional": true, + "requires": { + "web3-core": "1.2.11", + "web3-core-method": "1.2.11", + "web3-utils": "1.2.11" + } + }, + "web3-provider-engine": { + "version": "14.2.1", + "resolved": "https://registry.npmjs.org/web3-provider-engine/-/web3-provider-engine-14.2.1.tgz", + "integrity": "sha512-iSv31h2qXkr9vrL6UZDm4leZMc32SjWJFGOp/D92JXfcEboCqraZyuExDkpxKw8ziTufXieNM7LSXNHzszYdJw==", + "dev": true, + "requires": { + "async": "^2.5.0", + "backoff": "^2.5.0", + "clone": "^2.0.0", + "cross-fetch": "^2.1.0", + "eth-block-tracker": "^3.0.0", + "eth-json-rpc-infura": "^3.1.0", + "eth-sig-util": "^1.4.2", + "ethereumjs-block": "^1.2.2", + "ethereumjs-tx": "^1.2.0", + "ethereumjs-util": "^5.1.5", + "ethereumjs-vm": "^2.3.4", + "json-rpc-error": "^2.0.0", + "json-stable-stringify": "^1.0.1", + "promise-to-callback": "^1.0.0", + "readable-stream": "^2.2.9", + "request": "^2.85.0", + "semaphore": "^1.0.3", + "ws": "^5.1.1", + "xhr": "^2.2.0", + "xtend": "^4.0.1" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + "abstract-leveldown": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz", + "integrity": "sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA==", + "dev": true, + "requires": { + "xtend": "~4.0.0" + } }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "deferred-leveldown": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", + "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==", + "dev": true, "requires": { - "color-convert": "^1.9.0" + "abstract-leveldown": "~2.6.0" } }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + "eth-sig-util": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz", + "integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=", + "dev": true, + "requires": { + "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git", + "ethereumjs-util": "^5.1.1" + } }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "ethereumjs-abi": { + "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#1a27c59c15ab1e95ee8e5c4ed6ad814c49cc439e", + "from": "git+https://github.com/ethereumjs/ethereumjs-abi.git", + "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "bn.js": "^4.11.8", + "ethereumjs-util": "^6.0.0" }, "dependencies": { - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "dev": true, "requires": { - "has-flag": "^3.0.0" + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" } } } }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" - }, - "enhanced-resolve": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", - "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", - "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.4.0", - "tapable": "^1.0.0" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "ethereumjs-account": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz", + "integrity": "sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA==", + "dev": true, "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "ethereumjs-util": "^5.0.0", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" } }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "ethereumjs-block": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz", + "integrity": "sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg==", + "dev": true, "requires": { - "locate-path": "^3.0.0" + "async": "^2.0.1", + "ethereum-common": "0.2.0", + "ethereumjs-tx": "^1.2.2", + "ethereumjs-util": "^5.0.0", + "merkle-patricia-tree": "^2.1.2" + }, + "dependencies": { + "ethereum-common": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.2.0.tgz", + "integrity": "sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA==", + "dev": true + } } }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" - }, - "global-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", - "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "ethereumjs-tx": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", + "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", + "dev": true, "requires": { - "global-prefix": "^3.0.0" + "ethereum-common": "^0.0.18", + "ethereumjs-util": "^5.0.0" } }, - "global-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", - "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dev": true, "requires": { - "ini": "^1.3.5", - "kind-of": "^6.0.2", - "which": "^1.3.1" + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" } }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==" - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "ethereumjs-vm": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz", + "integrity": "sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw==", + "dev": true, "requires": { - "invert-kv": "^2.0.0" + "async": "^2.1.2", + "async-eventemitter": "^0.2.2", + "ethereumjs-account": "^2.0.3", + "ethereumjs-block": "~2.2.0", + "ethereumjs-common": "^1.1.0", + "ethereumjs-util": "^6.0.0", + "fake-merkle-patricia-tree": "^1.0.1", + "functional-red-black-tree": "^1.0.1", + "merkle-patricia-tree": "^2.3.2", + "rustbn.js": "~0.2.0", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "ethereumjs-block": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz", + "integrity": "sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg==", + "dev": true, + "requires": { + "async": "^2.0.1", + "ethereumjs-common": "^1.5.0", + "ethereumjs-tx": "^2.1.1", + "ethereumjs-util": "^5.0.0", + "merkle-patricia-tree": "^2.1.2" + }, + "dependencies": { + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dev": true, + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + } + } + }, + "ethereumjs-tx": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", + "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", + "dev": true, + "requires": { + "ethereumjs-common": "^1.5.0", + "ethereumjs-util": "^6.0.0" + } + }, + "ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "dev": true, + "requires": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + } + } } }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "requires": { - "path-key": "^2.0.0" - } + "level-codec": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz", + "integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ==", + "dev": true }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "level-errors": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.0.5.tgz", + "integrity": "sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig==", + "dev": true, "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" + "errno": "~0.1.1" } }, - "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", + "level-iterator-stream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz", + "integrity": "sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0=", + "dev": true, "requires": { - "p-try": "^2.0.0" + "inherits": "^2.0.1", + "level-errors": "^1.0.3", + "readable-stream": "^1.0.33", + "xtend": "^4.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + } } }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "level-ws": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz", + "integrity": "sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos=", + "dev": true, "requires": { - "p-limit": "^2.0.0" + "readable-stream": "~1.0.15", + "xtend": "~2.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "xtend": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", + "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", + "dev": true, + "requires": { + "object-keys": "~0.4.0" + } + } } }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "levelup": { + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz", + "integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==", + "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "deferred-leveldown": "~1.2.1", + "level-codec": "~7.0.0", + "level-errors": "~1.0.3", + "level-iterator-stream": "~1.3.0", + "prr": "~1.0.1", + "semver": "~5.4.1", + "xtend": "~4.0.0" } }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } + "ltgt": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", + "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=", + "dev": true }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "memdown": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/memdown/-/memdown-1.4.1.tgz", + "integrity": "sha1-tOThkhdGZP+65BNhqlAPMRnv4hU=", + "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "abstract-leveldown": "~2.7.1", + "functional-red-black-tree": "^1.0.1", + "immediate": "^3.2.3", + "inherits": "~2.0.1", + "ltgt": "~2.2.0", + "safe-buffer": "~5.1.1" + }, + "dependencies": { + "abstract-leveldown": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", + "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", + "dev": true, + "requires": { + "xtend": "~4.0.0" + } + } } }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "merkle-patricia-tree": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz", + "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==", + "dev": true, "requires": { - "has-flag": "^3.0.0" + "async": "^1.4.2", + "ethereumjs-util": "^5.0.0", + "level-ws": "0.0.0", + "levelup": "^1.2.1", + "memdown": "^1.0.0", + "readable-stream": "^2.0.0", + "rlp": "^2.0.0", + "semaphore": ">=1.0.1" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + } } }, - "v8-compile-cache": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz", - "integrity": "sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w==" - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + "object-keys": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", + "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", + "dev": true }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "dev": true }, - "yargs": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.4.tgz", - "integrity": "sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg==", - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "os-locale": "^3.1.0", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.0" - } + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true }, - "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "ws": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", + "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", + "dev": true, "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" + "async-limiter": "~1.0.0" } } } }, - "webpack-sources": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", - "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "web3-providers-http": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.11.tgz", + "integrity": "sha512-psh4hYGb1+ijWywfwpB2cvvOIMISlR44F/rJtYkRmQ5jMvG4FOCPlQJPiHQZo+2cc3HbktvvSJzIhkWQJdmvrA==", + "dev": true, + "optional": true, + "requires": { + "web3-core-helpers": "1.2.11", + "xhr2-cookies": "1.1.0" + } + }, + "web3-providers-ipc": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.11.tgz", + "integrity": "sha512-yhc7Y/k8hBV/KlELxynWjJDzmgDEDjIjBzXK+e0rHBsYEhdCNdIH5Psa456c+l0qTEU2YzycF8VAjYpWfPnBpQ==", + "dev": true, + "optional": true, + "requires": { + "oboe": "2.1.4", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.11" + } + }, + "web3-providers-ws": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.11.tgz", + "integrity": "sha512-ZxnjIY1Er8Ty+cE4migzr43zA/+72AF1myzsLaU5eVgdsfV7Jqx7Dix1hbevNZDKFlSoEyq/3j/jYalh3So1Zg==", + "dev": true, + "optional": true, + "requires": { + "eventemitter3": "4.0.4", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.11", + "websocket": "^1.0.31" + } + }, + "web3-shh": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.11.tgz", + "integrity": "sha512-B3OrO3oG1L+bv3E1sTwCx66injW1A8hhwpknDUbV+sw3fehFazA06z9SGXUefuFI1kVs4q2vRi0n4oCcI4dZDg==", + "dev": true, + "optional": true, + "requires": { + "web3-core": "1.2.11", + "web3-core-method": "1.2.11", + "web3-core-subscriptions": "1.2.11", + "web3-net": "1.2.11" + } + }, + "web3-utils": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.11.tgz", + "integrity": "sha512-3Tq09izhD+ThqHEaWYX4VOT7dNPdZiO+c/1QMA0s5X2lDFKK/xHJb7cyTRRVzN2LvlHbR7baS1tmQhSua51TcQ==", + "dev": true, + "optional": true, "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" + "bn.js": "^4.11.9", + "eth-lib": "0.2.8", + "ethereum-bloom-filters": "^1.0.6", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "underscore": "1.9.1", + "utf8": "3.0.0" + }, + "dependencies": { + "eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "dev": true, + "optional": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + } } }, "websocket": { - "version": "1.0.29", - "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.29.tgz", - "integrity": "sha512-WhU8jKXC8sTh6ocLSqpZRlOKMNYGwUvjA5+XcIgIk/G3JCaDfkZUr0zA19sVSxJ0TEvm0i5IBzr54RZC4vzW7g==", + "version": "1.0.32", + "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.32.tgz", + "integrity": "sha512-i4yhcllSP4wrpoPMU2N0TQ/q0O94LRG/eUQjEAamRltjQ1oT1PFFKOG4i877OlJgCG8rw6LrrowJp+TYCEWF7Q==", "dev": true, "requires": { + "bufferutil": "^4.0.1", "debug": "^2.2.0", - "gulp": "^4.0.2", - "nan": "^2.11.0", + "es5-ext": "^0.10.50", "typedarray-to-buffer": "^3.1.5", + "utf-8-validate": "^5.0.2", "yaeti": "^0.0.6" }, "dependencies": { @@ -18904,440 +17723,423 @@ "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==", "dev": true }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "ws": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", + "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", + "dev": true, + "optional": true, + "requires": { + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "optional": true + } + } + }, + "xhr": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.6.0.tgz", + "integrity": "sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA==", + "dev": true, + "requires": { + "global": "~4.4.0", + "is-function": "^1.0.1", + "parse-headers": "^2.0.0", + "xtend": "^4.0.0" + } + }, + "xhr-request": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz", + "integrity": "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==", + "dev": true, + "optional": true, + "requires": { + "buffer-to-arraybuffer": "^0.0.5", + "object-assign": "^4.1.1", + "query-string": "^5.0.1", + "simple-get": "^2.7.0", + "timed-out": "^4.0.1", + "url-set-query": "^1.0.0", + "xhr": "^2.0.4" + } + }, + "xhr-request-promise": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz", + "integrity": "sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg==", + "dev": true, + "optional": true, + "requires": { + "xhr-request": "^1.1.0" + } + }, + "xhr2-cookies": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz", + "integrity": "sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg=", + "dev": true, + "optional": true, + "requires": { + "cookiejar": "^2.1.1" + } + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, + "yaeti": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", + "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=", + "dev": true + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=" + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "get-stdin": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", + "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=" + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" + }, + "get-view": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/get-view/-/get-view-0.1.3.tgz", + "integrity": "sha1-NmCsBYuhPfl0nKvKpry5bUGqDqA=", + "requires": { + "isobject": "^3.0.0", + "match-file": "^0.2.1" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "git-config-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/git-config-path/-/git-config-path-1.0.1.tgz", + "integrity": "sha1-bTP37WPbDQ4RgTFQO6s6ykfVRmQ=", + "requires": { + "extend-shallow": "^2.0.1", + "fs-exists-sync": "^0.1.0", + "homedir-polyfill": "^1.0.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "git-repo-name": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/git-repo-name/-/git-repo-name-0.6.0.tgz", + "integrity": "sha1-rwmIRlaqU37GJccIcAgXXNYSKP8=", + "requires": { + "cwd": "^0.9.1", + "file-name": "^0.1.0", + "lazy-cache": "^1.0.4", + "remote-origin-url": "^0.5.1" + }, + "dependencies": { + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + } + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "requires": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + }, + "dependencies": { + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "requires": { - "isexe": "^2.0.0" + "is-glob": "^2.0.0" } }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true - }, - "which-pm-runs": { + "is-extglob": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", - "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=" + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" - }, - "worker-farm": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", - "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "requires": { - "errno": "~0.1.7" + "is-extglob": "^1.0.0" } - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, + } + } + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "glob-stream": { + "version": "5.3.5", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-5.3.5.tgz", + "integrity": "sha1-pVZlqajM3EGRWofHAeMtTgFvrSI=", + "requires": { + "extend": "^3.0.0", + "glob": "^5.0.3", + "glob-parent": "^3.0.0", + "micromatch": "^2.3.7", + "ordered-read-streams": "^0.3.0", + "through2": "^0.6.0", + "to-absolute-glob": "^0.1.1", + "unique-stream": "^2.0.2" + }, + "dependencies": { + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "arr-flatten": "^1.0.1" } }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" }, - "write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", "requires": { - "mkdirp": "^0.5.1" - }, - "dependencies": { - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - } - } + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" } }, - "write-file-atomic": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.1.tgz", - "integrity": "sha512-JPStrIyyVJ6oCSz/691fAjFtefZ6q+fP6tm+OS4Qw6o+TGQxNp1ziY2PgS+X/m0V8OWhZiO/m4xSj+Pr4RrZvw==", + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", "requires": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" + "is-posix-bracket": "^0.1.0" } }, - "ws": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", - "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", "requires": { - "async-limiter": "~1.0.0", - "safe-buffer": "~5.1.0", - "ultron": "~1.1.0" + "is-extglob": "^1.0.0" }, "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" } } }, - "xhr": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.5.0.tgz", - "integrity": "sha512-4nlO/14t3BNUZRXIXfXe+3N6w3s1KoxcJUUURctd64BLRe67E4gRwp4PjywtDY72fXpZ1y6Ch0VZQRY/gMPzzQ==", - "requires": { - "global": "~4.3.0", - "is-function": "^1.0.1", - "parse-headers": "^2.0.0", - "xtend": "^4.0.0" - } - }, - "xhr-request": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz", - "integrity": "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==", - "requires": { - "buffer-to-arraybuffer": "^0.0.5", - "object-assign": "^4.1.1", - "query-string": "^5.0.1", - "simple-get": "^2.7.0", - "timed-out": "^4.0.1", - "url-set-query": "^1.0.0", - "xhr": "^2.0.4" - } - }, - "xhr-request-promise": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.2.tgz", - "integrity": "sha1-NDxE0e53JrhkgGloLQ+EDIO0Jh0=", + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", "requires": { - "xhr-request": "^1.0.1" + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, - "xhr2-cookies": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz", - "integrity": "sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg=", + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "requires": { - "cookiejar": "^2.1.1" + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" } }, - "xmlhttprequest": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", - "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=" - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - }, - "yaeti": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", - "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=" - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" - }, - "yaml": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.7.2.tgz", - "integrity": "sha512-qXROVp90sb83XtAoqE8bP9RwAkTTZbugRUTm5YeFCBfNRPEp2YzTeqWiz7m5OORHzEvrA/qcGS8hp/E+MMROYw==", - "requires": { - "@babel/runtime": "^7.6.3" - } + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, - "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", - "dev": true, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.0" + "is-extglob": "^2.1.0" } }, - "yargs-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", - "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", - "dev": true, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "camelcase": "^3.0.0" + "is-buffer": "^1.1.5" } }, - "yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", - "requires": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "requires": { - "locate-path": "^3.0.0" - } - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" - }, - "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" - }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" - }, - "yargs": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", - "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.1" - } + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" }, - "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" + "is-extglob": "^1.0.0" } } } }, - "yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", "requires": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" } + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" } } }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" - }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=" - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, "global": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", @@ -19347,6 +18149,45 @@ "process": "~0.5.1" } }, + "global-modules": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz", + "integrity": "sha1-6lo77ULG1s6ZWk+KEmm12uIjgo0=", + "requires": { + "global-prefix": "^0.1.4", + "is-windows": "^0.2.0" + }, + "dependencies": { + "global-prefix": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz", + "integrity": "sha1-jTvGuNo8qBEqFg2NSW/wRiv+948=", + "requires": { + "homedir-polyfill": "^1.0.0", + "ini": "^1.3.4", + "is-windows": "^0.2.0", + "which": "^1.2.12" + } + }, + "is-windows": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz", + "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw=" + } + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -19357,12 +18198,119 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" }, + "gray-matter": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-3.1.1.tgz", + "integrity": "sha512-nZ1qjLmayEv0/wt3sHig7I0s3/sJO0dkAaKYQ5YAOApUtYEOonXSFdWvL1khvnZMTvov4UufkqlFsilPnejEXA==", + "requires": { + "extend-shallow": "^2.0.1", + "js-yaml": "^3.10.0", + "kind-of": "^5.0.2", + "strip-bom-string": "^1.0.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + }, + "strip-bom-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", + "integrity": "sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI=" + } + } + }, + "group-array": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/group-array/-/group-array-0.3.4.tgz", + "integrity": "sha512-YAmNsgsi1uQ7Ai3T4FFkMoskqbLEUPRajAmrn8FclwZQQnV98NLrNWjQ3n2+i1pANxdO3n6wsNEkKq5XrYy0Ow==", + "requires": { + "arr-flatten": "^1.0.1", + "for-own": "^0.1.4", + "get-value": "^2.0.6", + "kind-of": "^3.1.0", + "split-string": "^1.0.1", + "union-value": "^1.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + }, + "split-string": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-1.0.1.tgz", + "integrity": "sha1-vLqz9BUqzuOg1qskecDSh5w9s84=", + "requires": { + "extend-shallow": "^2.0.1" + } + } + } + }, "growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true }, + "gulp-choose-files": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/gulp-choose-files/-/gulp-choose-files-0.1.3.tgz", + "integrity": "sha1-hrFfBjAHOrZz1XJb7sY+qhSFUPk=", + "requires": { + "extend-shallow": "^2.0.1", + "question-cache": "^0.5.1", + "through2": "^2.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "gulp-sourcemaps": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz", + "integrity": "sha1-uG/zSdgBzrVuHZ59x7vLS33uYAw=", + "requires": { + "convert-source-map": "^1.1.1", + "graceful-fs": "^4.1.2", + "strip-bom": "^2.0.0", + "through2": "^2.0.0", + "vinyl": "^1.0.0" + } + }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -19494,16 +18442,58 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, "requires": { "function-bind": "^1.1.1" } }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "requires": { + "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + } + } + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, + "has-glob": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/has-glob/-/has-glob-0.1.1.tgz", + "integrity": "sha1-omHEwqbGZ+DHe3AKfyl8Oe86pYk=", + "requires": { + "is-glob": "^2.0.1" + }, + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "requires": { + "is-extglob": "^1.0.0" + } + } + } + }, + "has-own-deep": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-own-deep/-/has-own-deep-0.1.4.tgz", + "integrity": "sha1-kesM2ieAgxWPgEKigxZDTpr+eHY=" + }, "has-symbol-support-x": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", @@ -19512,8 +18502,7 @@ "has-symbols": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "dev": true + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" }, "has-to-string-tag-x": { "version": "1.4.1", @@ -19523,6 +18512,58 @@ "has-symbol-support-x": "^1.4.1" } }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "hash-base": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", @@ -19548,6 +18589,31 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, + "helper-cache": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/helper-cache/-/helper-cache-0.7.2.tgz", + "integrity": "sha1-AkVixLS4sqsqtTHQC+FuxJZRi5A=", + "requires": { + "extend-shallow": "^2.0.1", + "lazy-cache": "^0.2.3", + "lodash.bind": "^3.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "lazy-cache": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", + "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=" + } + } + }, "hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -19558,6 +18624,14 @@ "minimalistic-crypto-utils": "^1.0.1" } }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "requires": { + "parse-passwd": "^1.0.0" + } + }, "hosted-git-info": { "version": "2.8.8", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", @@ -19658,6 +18732,11 @@ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" }, + "inflection": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.12.0.tgz", + "integrity": "sha1-ogCTVlbW9fa8TcdQLhrstwMihBY=" + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -19667,11 +18746,21 @@ "wrappy": "1" } }, + "info-symbol": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/info-symbol/-/info-symbol-0.1.0.tgz", + "integrity": "sha1-J4QdcoZ920JCzWEtecEGM4gcang=" + }, "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, "inquirer": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", @@ -19697,18 +18786,169 @@ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==" }, - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "inquirer2": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/inquirer2/-/inquirer2-0.1.1.tgz", + "integrity": "sha1-vFQkqBQ1fEHmXi6Vf+U2ruqb8fY=", + "requires": { + "ansi-escapes": "^1.1.1", + "ansi-regex": "^2.0.0", + "arr-flatten": "^1.0.1", + "arr-pluck": "^0.1.0", + "array-unique": "^0.2.1", + "chalk": "^1.1.1", + "cli-cursor": "^1.0.2", + "cli-width": "^1.1.0", + "extend-shallow": "^2.0.1", + "figures": "^1.4.0", + "is-number": "^2.1.0", + "is-plain-object": "^2.0.1", + "lazy-cache": "^1.0.3", + "lodash.where": "^3.1.0", + "readline2": "^1.0.1", + "run-async": "^0.1.0", + "rx-lite": "^4.0.7", + "strip-color": "^0.1.0", + "through2": "^2.0.0" + }, + "dependencies": { + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=" + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "requires": { + "restore-cursor": "^1.0.1" + } + }, + "cli-width": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-1.1.1.tgz", + "integrity": "sha1-pNKT72frt7iNSk1CwMzwDE0eNm0=" + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "requires": { + "kind-of": "^3.0.2" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + }, + "onetime": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "requires": { + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" + } + }, + "run-async": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz", + "integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=", + "requires": { + "once": "^1.3.0" + } }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^2.0.0" } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" } } }, @@ -19737,12 +18977,91 @@ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" }, + "is-absolute": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz", + "integrity": "sha1-IN5p89uULvLYe5wto28XIjWxtes=", + "requires": { + "is-relative": "^0.2.1", + "is-windows": "^0.2.0" + }, + "dependencies": { + "is-windows": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz", + "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw=" + } + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-answer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-answer/-/is-answer-0.1.1.tgz", + "integrity": "sha1-zBwvGG+FzyZQIgveNZ2GIYfUnLY=", + "requires": { + "has-values": "^0.1.4", + "is-primitive": "^2.0.0", + "omit-empty": "^0.4.1" + }, + "dependencies": { + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + } + } + }, + "is-arguments": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz", + "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==", + "requires": { + "call-bind": "^1.0.0" + } + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, + "is-binary-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-binary-buffer/-/is-binary-buffer-1.0.0.tgz", + "integrity": "sha1-vGAxKQtly/eZudlQK1D9U3VSQAc=", + "requires": { + "is-buffer": "^1.1.5" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + } + } + }, "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -19764,17 +19083,88 @@ "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==", "dev": true }, + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, + "requires": { + "ci-info": "^2.0.0" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "is-date-object": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==" + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "is-docker": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz", + "integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==", "dev": true }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=" + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "requires": { + "is-primitive": "^2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, "is-fullwidth-code-point": { "version": "2.0.0", @@ -19786,6 +19176,11 @@ "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==" }, + "is-generator": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-generator/-/is-generator-1.0.3.tgz", + "integrity": "sha1-wUwhBX7TbjKNuANHlmxpP4hjifM=" + }, "is-glob": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", @@ -19822,62 +19217,205 @@ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "requires": { + "isobject": "^3.0.1" + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=" + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" + }, "is-regex": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", "dev": true, "requires": { - "has-symbols": "^1.0.1" + "has-symbols": "^1.0.1" + } + }, + "is-registered": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/is-registered/-/is-registered-0.1.5.tgz", + "integrity": "sha1-HTRpd0GdZl4qxshAE1NWheb3b38=", + "requires": { + "define-property": "^0.2.5", + "isobject": "^2.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "is-relative": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz", + "integrity": "sha1-0n9MfVFtF1+2ENuEu+7yPDvJeqU=", + "requires": { + "is-unc-path": "^0.1.1" + } + }, + "is-retry-allowed": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "is-unc-path": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.2.tgz", + "integrity": "sha1-arBTpyVzwQJQ/0FqOBTDUXivObk=", + "requires": { + "unc-path-regex": "^0.1.0" + } + }, + "is-url": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", + "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + }, + "is-valid-app": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-valid-app/-/is-valid-app-0.2.1.tgz", + "integrity": "sha1-Zc8ZW71xvXdssWGZHGhCSNZd/4k=", + "requires": { + "debug": "^2.2.0", + "is-registered": "^0.1.5", + "is-valid-instance": "^0.2.0", + "lazy-cache": "^2.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "is-valid-glob": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-0.3.0.tgz", + "integrity": "sha1-1LVcafUYhvm2XHDWwmItN+KfSP4=" + }, + "is-valid-instance": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-valid-instance/-/is-valid-instance-0.2.0.tgz", + "integrity": "sha1-4an/EQa4y64AB+pqIPidVGoqWg8=", + "requires": { + "isobject": "^2.1.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } } }, - "is-retry-allowed": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", - "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" + "is-whitespace": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-whitespace/-/is-whitespace-0.3.0.tgz", + "integrity": "sha1-Fjnssb4DauxppUy7QBz77XEUq38=" }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" }, - "is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", "dev": true, "requires": { - "has-symbols": "^1.0.1" + "is-docker": "^2.0.0" } }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "is-url": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", - "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==", - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", @@ -20023,6 +19561,11 @@ "json-buffer": "3.0.1" } }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" + }, "klaw": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", @@ -20032,6 +19575,104 @@ "graceful-fs": "^4.1.9" } }, + "klaw-sync": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", + "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11" + } + }, + "layouts": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/layouts/-/layouts-0.11.0.tgz", + "integrity": "sha1-xiDos8uI/IxJLbRTin3VQKTffyI=", + "requires": { + "delimiter-regex": "^1.3.1", + "falsey": "^0.3.0", + "get-view": "^0.1.1", + "lazy-cache": "^1.0.3" + }, + "dependencies": { + "delimiter-regex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/delimiter-regex/-/delimiter-regex-1.3.1.tgz", + "integrity": "sha1-Y4XK4UAE28DBzY3//+uGPVGZnv8=", + "requires": { + "extend-shallow": "^1.1.2" + } + }, + "extend-shallow": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "requires": { + "kind-of": "^1.1.0" + } + }, + "kind-of": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=" + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + } + } + }, + "lazy-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", + "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", + "requires": { + "set-getter": "^0.1.0" + } + }, + "lazystream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "requires": { + "readable-stream": "^2.0.5" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, "lcid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", @@ -20370,28 +20011,14 @@ "wrap-ansi": "^2.0.0" } }, - "elliptic": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", - "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, "ethers": { - "version": "4.0.47", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.47.tgz", - "integrity": "sha512-hssRYhngV4hiDNeZmVU/k5/E8xmLG8UpcNUzg6mb7lqhgpFPH/t7nuv20RjRrEf0gblzvi2XwR5Te+V3ZFc9pQ==", + "version": "4.0.48", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.48.tgz", + "integrity": "sha512-sZD5K8H28dOrcidzx9f8KYh8083n5BexIO3+SbE4jK83L85FxtpXZBCQdXb8gkg+7sBqomcLhhkU7UHL+F7I2g==", "requires": { "aes-js": "3.0.0", "bn.js": "^4.4.0", - "elliptic": "6.5.2", + "elliptic": "6.5.3", "hash.js": "1.1.3", "js-sha3": "0.5.7", "scrypt-js": "2.0.4", @@ -20435,11 +20062,6 @@ "number-is-nan": "^1.0.0" } }, - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" - }, "lcid": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", @@ -20580,6 +20202,44 @@ } } }, + "load-helpers": { + "version": "0.2.11", + "resolved": "https://registry.npmjs.org/load-helpers/-/load-helpers-0.2.11.tgz", + "integrity": "sha1-9L2LIYQ1wFLl4536dxMinVcepCM=", + "requires": { + "extend-shallow": "^2.0.1", + "is-valid-glob": "^0.3.0", + "lazy-cache": "^2.0.1", + "matched": "^0.4.1", + "resolve-dir": "^0.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "matched": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/matched/-/matched-0.4.4.tgz", + "integrity": "sha1-Vte36xgDPwz5vFLrIJD6x9weifo=", + "requires": { + "arr-union": "^3.1.0", + "async-array-reduce": "^0.2.0", + "extend-shallow": "^2.0.1", + "fs-exists-sync": "^0.1.0", + "glob": "^7.0.5", + "has-glob": "^0.1.1", + "is-valid-glob": "^0.3.0", + "lazy-cache": "^2.0.1", + "resolve-dir": "^0.1.0" + } + } + } + }, "load-json-file": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", @@ -20591,36 +20251,296 @@ "pify": "^2.0.0", "pinkie-promise": "^2.0.0", "strip-bom": "^2.0.0" + } + }, + "load-pkg": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/load-pkg/-/load-pkg-3.0.1.tgz", + "integrity": "sha1-kjCzfsBOVpADBgvFiVHj7VCNWU8=", + "requires": { + "find-pkg": "^0.1.0" + } + }, + "load-templates": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/load-templates/-/load-templates-0.11.4.tgz", + "integrity": "sha1-zyk977a1hg/1uMRJ2qHAx7tyjek=", + "requires": { + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "glob-parent": "^2.0.0", + "has-glob": "^0.1.1", + "is-valid-glob": "^0.3.0", + "lazy-cache": "^2.0.1", + "matched": "^0.4.1", + "to-file": "^0.2.0" }, "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "requires": { + "is-glob": "^2.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "requires": { + "is-extglob": "^1.0.0" + } + }, + "matched": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/matched/-/matched-0.4.4.tgz", + "integrity": "sha1-Vte36xgDPwz5vFLrIJD6x9weifo=", + "requires": { + "arr-union": "^3.1.0", + "async-array-reduce": "^0.2.0", + "extend-shallow": "^2.0.1", + "fs-exists-sync": "^0.1.0", + "glob": "^7.0.5", + "has-glob": "^0.1.1", + "is-valid-glob": "^0.3.0", + "lazy-cache": "^2.0.1", + "resolve-dir": "^0.1.0" + } } } }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + }, + "lodash._arrayfilter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._arrayfilter/-/lodash._arrayfilter-3.0.0.tgz", + "integrity": "sha1-LevhHuxp5dzG9LhhNxKKSPFSQjc=" + }, + "lodash._basecallback": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/lodash._basecallback/-/lodash._basecallback-3.3.1.tgz", + "integrity": "sha1-t7K7Q9whYEJKIczybFfkQ3cqjic=", + "requires": { + "lodash._baseisequal": "^3.0.0", + "lodash._bindcallback": "^3.0.0", + "lodash.isarray": "^3.0.0", + "lodash.pairs": "^3.0.0" + } + }, + "lodash._baseeach": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash._baseeach/-/lodash._baseeach-3.0.4.tgz", + "integrity": "sha1-z4cGVyyhROjZ11InyZDamC+TKvM=", + "requires": { + "lodash.keys": "^3.0.0" + } + }, + "lodash._basefilter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._basefilter/-/lodash._basefilter-3.0.0.tgz", + "integrity": "sha1-S3ZAPfDihtA9Xg9yle00QeEB0SE=", + "requires": { + "lodash._baseeach": "^3.0.0" + } + }, + "lodash._baseisequal": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/lodash._baseisequal/-/lodash._baseisequal-3.0.7.tgz", + "integrity": "sha1-2AJfdjOdKTQnZ9zIh85cuVpbUfE=", + "requires": { + "lodash.isarray": "^3.0.0", + "lodash.istypedarray": "^3.0.0", + "lodash.keys": "^3.0.0" + } + }, + "lodash._baseismatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lodash._baseismatch/-/lodash._baseismatch-3.1.3.tgz", + "integrity": "sha1-Byj8SO+hFpnT1fLXMEnyqxPED9U=", + "requires": { + "lodash._baseisequal": "^3.0.0" + } + }, + "lodash._basematches": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash._basematches/-/lodash._basematches-3.2.0.tgz", + "integrity": "sha1-9H4D8H7CB4SrCWjQy2y1l+IQEVg=", + "requires": { + "lodash._baseismatch": "^3.0.0", + "lodash.pairs": "^3.0.0" + } + }, + "lodash._bindcallback": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz", + "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=" + }, + "lodash._createwrapper": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash._createwrapper/-/lodash._createwrapper-3.2.0.tgz", + "integrity": "sha1-30U+ZkFjIXuJWkVAZa8cR6DqPE0=", + "requires": { + "lodash._root": "^3.0.0" + } + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=" + }, + "lodash._replaceholders": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._replaceholders/-/lodash._replaceholders-3.0.0.tgz", + "integrity": "sha1-iru3EmxDH37XRPe6rznwi8m9nVg=" + }, + "lodash._root": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", + "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=" + }, + "lodash.assign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=" + }, + "lodash.bind": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-3.1.0.tgz", + "integrity": "sha1-+V9IY419i7tYVPkIJmUnmZ+/pLs=", + "requires": { + "lodash._createwrapper": "^3.0.0", + "lodash._replaceholders": "^3.0.0", + "lodash.restparam": "^3.0.0" + } + }, + "lodash.filter": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz", + "integrity": "sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=" + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" + }, + "lodash.foreach": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz", + "integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=" + }, + "lodash.initial": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.initial/-/lodash.initial-4.1.1.tgz", + "integrity": "sha1-5T9kiRJl3cQE6YbSwo93vtlDWRo=" + }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=" + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=" + }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + }, + "lodash.istypedarray": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/lodash.istypedarray/-/lodash.istypedarray-3.0.6.tgz", + "integrity": "sha1-yaR3SYYHUB2OhJTSg7h8OSgc72I=" + }, + "lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "requires": { + "lodash._getnative": "^3.0.0", + "lodash.isarguments": "^3.0.0", + "lodash.isarray": "^3.0.0" + } + }, + "lodash.last": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash.last/-/lodash.last-3.0.0.tgz", + "integrity": "sha1-JC9mMRLdTG5jcoxgo8kJ0b2tvUw=" + }, + "lodash.map": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", + "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=" + }, + "lodash.pairs": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash.pairs/-/lodash.pairs-3.0.1.tgz", + "integrity": "sha1-u+CNV4bu6qCaFckevw3LfSvjJqk=", "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "lodash.keys": "^3.0.0" } }, - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + "lodash.restparam": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", + "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=" }, - "lodash.assign": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", - "dev": true + "lodash.where": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.where/-/lodash.where-3.1.0.tgz", + "integrity": "sha1-LnhLnJM2jV11qu4zLOF2Ai8rlVM=", + "requires": { + "lodash._arrayfilter": "^3.0.0", + "lodash._basecallback": "^3.0.0", + "lodash._basefilter": "^3.0.0", + "lodash._basematches": "^3.0.0", + "lodash.isarray": "^3.0.0" + } + }, + "log-ok": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/log-ok/-/log-ok-0.1.1.tgz", + "integrity": "sha1-vqPdNqzQuKckDXhza1uXxlREozQ=", + "requires": { + "ansi-green": "^0.1.1", + "success-symbol": "^0.1.0" + } }, "log-symbols": { "version": "3.0.0", @@ -20631,11 +20551,71 @@ "chalk": "^2.4.2" } }, + "log-utils": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/log-utils/-/log-utils-0.2.1.tgz", + "integrity": "sha1-pMIXoN2aUFFdm5ICBgkas9TgMc8=", + "requires": { + "ansi-colors": "^0.2.0", + "error-symbol": "^0.1.0", + "info-symbol": "^0.1.0", + "log-ok": "^0.1.1", + "success-symbol": "^0.1.0", + "time-stamp": "^1.0.1", + "warning-symbol": "^0.1.0" + }, + "dependencies": { + "ansi-colors": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-0.2.0.tgz", + "integrity": "sha1-csMd4qDZoszQysMMyYI+6y9kNLU=", + "requires": { + "ansi-bgblack": "^0.1.1", + "ansi-bgblue": "^0.1.1", + "ansi-bgcyan": "^0.1.1", + "ansi-bggreen": "^0.1.1", + "ansi-bgmagenta": "^0.1.1", + "ansi-bgred": "^0.1.1", + "ansi-bgwhite": "^0.1.1", + "ansi-bgyellow": "^0.1.1", + "ansi-black": "^0.1.1", + "ansi-blue": "^0.1.1", + "ansi-bold": "^0.1.1", + "ansi-cyan": "^0.1.1", + "ansi-dim": "^0.1.1", + "ansi-gray": "^0.1.1", + "ansi-green": "^0.1.1", + "ansi-grey": "^0.1.1", + "ansi-hidden": "^0.1.1", + "ansi-inverse": "^0.1.1", + "ansi-italic": "^0.1.1", + "ansi-magenta": "^0.1.1", + "ansi-red": "^0.1.1", + "ansi-reset": "^0.1.1", + "ansi-strikethrough": "^0.1.1", + "ansi-underline": "^0.1.1", + "ansi-white": "^0.1.1", + "ansi-yellow": "^0.1.1", + "lazy-cache": "^2.0.1" + } + } + } + }, "logplease": { "version": "1.2.15", "resolved": "https://registry.npmjs.org/logplease/-/logplease-1.2.15.tgz", "integrity": "sha512-jLlHnlsPSJjpwUfcNyUxXCl33AYg2cHhIf9QhGL2T4iPT0XPB+xP1LRKFPgIg1M/sg9kAJvy94w9CzBNrfnstA==" }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" + }, + "lower-case": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=" + }, "lowercase-keys": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", @@ -20672,124 +20652,482 @@ "path": "^0.12.7" } }, - "maci-crypto": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/maci-crypto/-/maci-crypto-0.2.1.tgz", - "integrity": "sha512-P/8utpNfRiUQVDF8HcIXdV0RkOJWzB2LKaaroYSeioUTZITSzoU+MSjnRkEMMVSatmlyTB+xx4JhDs6wQPHnhA==", + "maci-crypto": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/maci-crypto/-/maci-crypto-0.2.1.tgz", + "integrity": "sha512-P/8utpNfRiUQVDF8HcIXdV0RkOJWzB2LKaaroYSeioUTZITSzoU+MSjnRkEMMVSatmlyTB+xx4JhDs6wQPHnhA==", + "requires": { + "circomlib": "git+https://github.com/iden3/circomlib.git#01da5f90dbbefeed5d78cec3b87303244338b920", + "ethers": "^4.0.45", + "ffjavascript": "0.1.0" + }, + "dependencies": { + "circom": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/circom/-/circom-0.5.21.tgz", + "integrity": "sha512-Om90wztN6Y4Gg5ks4n+iTKU/5bR1gkPyRPzEi5gtu0brbSqnKfAnYWp8d/U28h2353rj476I1KNArg/QVNzBaw==", + "requires": { + "chai": "^4.2.0", + "circom_runtime": "0.1.4", + "fastfile": "0.0.12", + "ffiasm": "0.1.1", + "ffjavascript": "0.2.10", + "ffwasm": "0.0.7", + "fnv-plus": "^1.3.1", + "r1csfile": "0.0.14", + "tmp-promise": "^2.0.2", + "wasmbuilder": "0.0.10" + }, + "dependencies": { + "ffjavascript": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.10.tgz", + "integrity": "sha512-GQI6gHYYG5/iD4Kt3VzezzK7fARJzP0zkc82V/+JAdjfeKBXhDSo5rpKFuK3cDcrdW0Fu2emuYNMEAuFqhEQvQ==", + "requires": { + "big-integer": "^1.6.48", + "wasmcurves": "0.0.5", + "worker-threads": "^1.0.0" + } + } + } + }, + "circomlib": { + "version": "git+https://github.com/iden3/circomlib.git#01da5f90dbbefeed5d78cec3b87303244338b920", + "from": "git+https://github.com/iden3/circomlib.git#01da5f90dbbefeed5d78cec3b87303244338b920", + "requires": { + "blake-hash": "^1.1.0", + "blake2b": "^2.1.3", + "circom": "0.5.21", + "ffjavascript": "0.1.0", + "web3": "^1.2.6" + } + }, + "ethers": { + "version": "4.0.48", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.48.tgz", + "integrity": "sha512-sZD5K8H28dOrcidzx9f8KYh8083n5BexIO3+SbE4jK83L85FxtpXZBCQdXb8gkg+7sBqomcLhhkU7UHL+F7I2g==", + "requires": { + "aes-js": "3.0.0", + "bn.js": "^4.4.0", + "elliptic": "6.5.3", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.4", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + } + }, + "ffjavascript": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.1.0.tgz", + "integrity": "sha512-dmKlUasSfvUcxBm8nCSKl2x7EFJsXA7OVP8XLFA03T2+6mAc3IiVLC2ambEVOcMOhyhl0vJfVZjM9f9d38D1rw==", + "requires": { + "big-integer": "^1.6.48" + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + }, + "scrypt-js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==" + }, + "setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" + }, + "uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" + } + } + }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "requires": { + "kind-of": "^6.0.2" + } + }, + "map-age-cleaner": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", + "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "requires": { + "p-defer": "^1.0.0" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-config": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/map-config/-/map-config-0.5.0.tgz", + "integrity": "sha1-FwJgfiZ696NwyKnQxiumUk/rb+U=", + "requires": { + "array-unique": "^0.2.1", + "async": "^1.5.2" + }, + "dependencies": { + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + } + } + }, + "map-schema": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/map-schema/-/map-schema-0.2.4.tgz", + "integrity": "sha1-wZVRg0/DwHoEWXt6WvtEpHWvlbQ=", + "requires": { + "arr-union": "^3.1.0", + "collection-visit": "^0.2.3", + "component-emitter": "^1.2.1", + "debug": "^2.6.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "get-value": "^2.0.6", + "is-primitive": "^2.0.0", + "kind-of": "^3.1.0", + "lazy-cache": "^2.0.2", + "log-utils": "^0.2.1", + "longest": "^1.0.1", + "mixin-deep": "^1.1.3", + "object.omit": "^2.0.1", + "object.pick": "^1.2.0", + "omit-empty": "^0.4.1", + "pad-right": "^0.2.2", + "set-value": "^0.4.0", + "sort-object-arrays": "^0.1.1", + "union-value": "^0.2.3" + }, + "dependencies": { + "collection-visit": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-0.2.3.tgz", + "integrity": "sha1-L2JIPK7MlfCDuaRUo+6eYTmteVc=", + "requires": { + "lazy-cache": "^2.0.1", + "map-visit": "^0.1.5", + "object-visit": "^0.3.4" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + }, + "map-visit": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-0.1.5.tgz", + "integrity": "sha1-2+Q5J85VJbgN/BVzpE1oxR8mgWs=", + "requires": { + "lazy-cache": "^2.0.1", + "object-visit": "^0.3.4" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "object-visit": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-0.3.4.tgz", + "integrity": "sha1-rhXPhvCy/dVRdxY2RIRSxUw9qCk=", + "requires": { + "isobject": "^2.0.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + }, + "union-value": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-0.2.4.tgz", + "integrity": "sha1-c3UVJ4ZnkFfns3qmdug0aPwCdPA=", + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + } + } + } + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "requires": { + "object-visit": "^1.0.0" + } + }, + "match-file": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/match-file/-/match-file-0.2.2.tgz", + "integrity": "sha1-Jua88bOQpmH2Em+visUB4z7M+uk=", "requires": { - "circomlib": "git+https://github.com/iden3/circomlib.git#01da5f90dbbefeed5d78cec3b87303244338b920", - "ethers": "^4.0.45", - "ffjavascript": "0.1.0" + "is-glob": "^3.1.0", + "isobject": "^3.0.0", + "micromatch": "^2.3.11" }, "dependencies": { - "circom": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/circom/-/circom-0.5.21.tgz", - "integrity": "sha512-Om90wztN6Y4Gg5ks4n+iTKU/5bR1gkPyRPzEi5gtu0brbSqnKfAnYWp8d/U28h2353rj476I1KNArg/QVNzBaw==", + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "requires": { - "chai": "^4.2.0", - "circom_runtime": "0.1.4", - "fastfile": "0.0.12", - "ffiasm": "0.1.1", - "ffjavascript": "0.2.10", - "ffwasm": "0.0.7", - "fnv-plus": "^1.3.1", - "r1csfile": "0.0.14", - "tmp-promise": "^2.0.2", - "wasmbuilder": "0.0.10" + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "requires": { + "is-extglob": "^1.0.0" }, "dependencies": { - "ffjavascript": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.10.tgz", - "integrity": "sha512-GQI6gHYYG5/iD4Kt3VzezzK7fARJzP0zkc82V/+JAdjfeKBXhDSo5rpKFuK3cDcrdW0Fu2emuYNMEAuFqhEQvQ==", - "requires": { - "big-integer": "^1.6.48", - "wasmcurves": "0.0.5", - "worker-threads": "^1.0.0" - } + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" } } }, - "circomlib": { - "version": "git+https://github.com/iden3/circomlib.git#01da5f90dbbefeed5d78cec3b87303244338b920", - "from": "git+https://github.com/iden3/circomlib.git#01da5f90dbbefeed5d78cec3b87303244338b920", + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "requires": { - "blake-hash": "^1.1.0", - "blake2b": "^2.1.3", - "circom": "0.5.21", - "ffjavascript": "0.1.0", - "web3": "^1.2.6" + "is-extglob": "^2.1.0" } }, - "ethers": { - "version": "4.0.48", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.48.tgz", - "integrity": "sha512-sZD5K8H28dOrcidzx9f8KYh8083n5BexIO3+SbE4jK83L85FxtpXZBCQdXb8gkg+7sBqomcLhhkU7UHL+F7I2g==", + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "aes-js": "3.0.0", - "bn.js": "^4.4.0", - "elliptic": "6.5.3", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.4", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" + "is-buffer": "^1.1.5" } }, - "ffjavascript": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.1.0.tgz", - "integrity": "sha512-dmKlUasSfvUcxBm8nCSKl2x7EFJsXA7OVP8XLFA03T2+6mAc3IiVLC2ambEVOcMOhyhl0vJfVZjM9f9d38D1rw==", - "requires": { - "big-integer": "^1.6.48" + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + }, + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "requires": { + "is-extglob": "^1.0.0" + } + } } }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "matched": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/matched/-/matched-1.0.2.tgz", + "integrity": "sha512-7ivM1jFZVTOOS77QsR+TtYHH0ecdLclMkqbf5qiJdX2RorqfhsL65QHySPZgDE0ZjHoh+mQUNHTanNXIlzXd0Q==", + "requires": { + "arr-union": "^3.1.0", + "async-array-reduce": "^0.2.1", + "glob": "^7.1.2", + "has-glob": "^1.0.0", + "is-valid-glob": "^1.0.0", + "resolve-dir": "^1.0.0" + }, + "dependencies": { + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" } }, - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + "has-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-glob/-/has-glob-1.0.0.tgz", + "integrity": "sha1-mqqe7b/7G6OZCnsAEPtnjuAIEgc=", + "requires": { + "is-glob": "^3.0.0" + } }, - "scrypt-js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", - "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==" + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "requires": { + "is-extglob": "^2.1.0" + } }, - "setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" + "is-valid-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", + "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=" }, - "uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } } } }, - "make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "requires": { - "p-defer": "^1.0.0" - } + "math-random": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", + "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==" }, "md5.js": { "version": "1.3.5", @@ -20843,34 +21181,122 @@ "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", "dev": true, "requires": { - "xtend": "~4.0.0" + "xtend": "~4.0.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + } + } + }, + "memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=", + "dev": true + }, + "merge-deep": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/merge-deep/-/merge-deep-3.0.3.tgz", + "integrity": "sha512-qtmzAS6t6grwEkNrunqTBdn0qKwFgNWvlxUbAV8es9M7Ot1EbyApytCnvE0jALPa46ZpKDUo527kKiaWplmlFA==", + "requires": { + "arr-union": "^3.1.0", + "clone-deep": "^0.2.4", + "kind-of": "^3.0.2" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "merge-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", + "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", + "requires": { + "readable-stream": "^2.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "merge-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/merge-value/-/merge-value-1.0.0.tgz", + "integrity": "sha512-fJMmvat4NeKz63Uv9iHWcPDjCWcCkoiRoajRTEO8hlhUC6rwaHg0QCF9hBOTjZmm4JuglPckPSTtcuJL5kp0TQ==", + "requires": { + "get-value": "^2.0.6", + "is-extendable": "^1.0.0", + "mixin-deep": "^1.2.0", + "set-value": "^2.0.0" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "^2.0.4" } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true } } }, - "memorystream": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=", - "dev": true - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" - }, "merkle-patricia-tree": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-3.0.0.tgz", @@ -20971,6 +21397,117 @@ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "dependencies": { + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + } + } + }, "miller-rabin": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", @@ -21056,6 +21593,41 @@ "minipass": "^2.9.0" } }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mixin-object": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz", + "integrity": "sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=", + "requires": { + "for-in": "^0.1.3", + "is-extendable": "^0.1.1" + }, + "dependencies": { + "for-in": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.8.tgz", + "integrity": "sha1-2Hc5COMSVhCZUrH9ubP6hn0ndeE=" + } + } + }, "mkdirp": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", @@ -21309,6 +21881,30 @@ "resolved": "https://registry.npmjs.org/nanoassert/-/nanoassert-1.1.0.tgz", "integrity": "sha1-TzFS4JVA/eKMdvRLGbvNHVpCR40=" }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "nanoseconds": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/nanoseconds/-/nanoseconds-0.1.0.tgz", + "integrity": "sha1-aew5/NAOd6s6ct4KQzQoJM15Izo=" + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -21334,6 +21930,14 @@ "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, + "no-case": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", + "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", + "requires": { + "lower-case": "^1.1.1" + } + }, "node-addon-api": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", @@ -21359,9 +21963,9 @@ } }, "node-fetch": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", - "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", "dev": true }, "node-gyp-build": { @@ -21370,6 +21974,11 @@ "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==", "dev": true }, + "noncharacters": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/noncharacters/-/noncharacters-1.1.0.tgz", + "integrity": "sha1-rzPfMP1Q7TxTzSAiWPJa2pC1QNI=" + }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -21396,6 +22005,67 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, + "normalize-pkg": { + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/normalize-pkg/-/normalize-pkg-0.3.20.tgz", + "integrity": "sha1-Luc3FJUXhQ2c7/WmI0r174nFFag=", + "requires": { + "arr-union": "^3.1.0", + "array-unique": "^0.3.2", + "component-emitter": "^1.2.1", + "export-files": "^2.1.1", + "extend-shallow": "^2.0.1", + "fs-exists-sync": "^0.1.0", + "get-value": "^2.0.6", + "kind-of": "^3.0.4", + "lazy-cache": "^2.0.1", + "map-schema": "^0.2.3", + "minimist": "^1.2.0", + "mixin-deep": "^1.1.3", + "omit-empty": "^0.4.1", + "parse-git-config": "^1.0.2", + "repo-utils": "^0.3.6", + "semver": "^5.3.0", + "stringify-author": "^0.1.3", + "write-json": "^0.2.2" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "now-and-later": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-0.0.6.tgz", + "integrity": "sha1-GKFNw/xJXcBs++Ao8AvhbdrE+uo=", + "requires": { + "once": "^1.3.0" + } + }, "npm-run-path": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", @@ -21435,6 +22105,39 @@ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "object-inspect": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", @@ -21447,6 +22150,14 @@ "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", "dev": true }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "requires": { + "isobject": "^3.0.0" + } + }, "object.assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.1.tgz", @@ -21497,6 +22208,23 @@ "es-abstract": "^1.17.0-next.1" } }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "requires": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "requires": { + "isobject": "^3.0.1" + } + }, "oboe": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.4.tgz", @@ -21505,6 +22233,36 @@ "http-https": "^1.0.0" } }, + "omit-empty": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/omit-empty/-/omit-empty-0.4.1.tgz", + "integrity": "sha1-KUo3gvLLIMdJfEEitiN8ncwMY6s=", + "requires": { + "has-values": "^0.1.4", + "kind-of": "^3.0.3", + "reduce-object": "^0.1.3" + }, + "dependencies": { + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -21536,6 +22294,16 @@ } } }, + "open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "dev": true, + "requires": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + } + }, "optimist": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", @@ -21552,6 +22320,84 @@ } } }, + "option-cache": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/option-cache/-/option-cache-3.5.0.tgz", + "integrity": "sha1-y3ZRVboqhhwRCf8m4qIOqgZhKys=", + "requires": { + "arr-flatten": "^1.0.3", + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^0.3.1", + "kind-of": "^3.2.2", + "lazy-cache": "^2.0.2", + "set-value": "^0.4.3", + "to-object-path": "^0.3.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, "optionator": { "version": "0.8.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", @@ -21565,6 +22411,54 @@ "word-wrap": "~1.2.3" } }, + "ordered-read-streams": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz", + "integrity": "sha1-cTfmmzKYuzQiR6G77jiByA4v14s=", + "requires": { + "is-stream": "^1.0.1", + "readable-stream": "^2.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, "os-locale": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", @@ -21613,6 +22507,19 @@ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true }, + "pad-right": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/pad-right/-/pad-right-0.2.2.tgz", + "integrity": "sha1-b7ySQEXSRPKiokRQMGDTv8YAl3Q=", + "requires": { + "repeat-string": "^1.5.2" + } + }, + "paginationator": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/paginationator/-/paginationator-0.1.4.tgz", + "integrity": "sha1-hHht04UKrh8Ru7kRsMHghRtTgQY=" + }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -21634,6 +22541,63 @@ "safe-buffer": "^5.1.1" } }, + "parse-author": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-author/-/parse-author-1.0.0.tgz", + "integrity": "sha1-XsFZAGKXe9nLOWLpFzuHWGQ39d8=" + }, + "parse-git-config": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/parse-git-config/-/parse-git-config-1.1.1.tgz", + "integrity": "sha1-06mYQxcTL1c5hxK7pDjhKVkN34w=", + "requires": { + "extend-shallow": "^2.0.1", + "fs-exists-sync": "^0.1.0", + "git-config-path": "^1.0.1", + "ini": "^1.3.4" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "parse-github-url": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/parse-github-url/-/parse-github-url-0.3.2.tgz", + "integrity": "sha1-du8B6/4LHpwPSTZylSzGpM2csmA=" + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "requires": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + }, + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "requires": { + "is-extglob": "^1.0.0" + } + } + } + }, "parse-headers": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.3.tgz", @@ -21648,11 +22612,80 @@ "error-ex": "^1.2.0" } }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=" + }, + "parser-front-matter": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/parser-front-matter/-/parser-front-matter-1.6.4.tgz", + "integrity": "sha512-eqtUnI5+COkf1CQOYo8FmykN5Zs+5Yr60f/7GcPgQDZEEjdE/VZ4WMaMo9g37foof8h64t/TH2Uvk2Sq0fDy/g==", + "requires": { + "extend-shallow": "^2.0.1", + "file-is-binary": "^1.0.0", + "gray-matter": "^3.0.2", + "isobject": "^3.0.1", + "lazy-cache": "^2.0.2", + "mixin-deep": "^1.2.0", + "trim-leading-lines": "^0.1.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" + }, + "patch-package": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-6.4.0.tgz", + "integrity": "sha512-KePc85SXRoN//6T4uSDvWpH05xfyH+VGbtzgeNNsGgallox5l4UKWFHCd26SCfAI9ob9DB7MZqsxMjGMweIY+A==", + "dev": true, + "requires": { + "@yarnpkg/lockfile": "^1.1.0", + "chalk": "^2.4.2", + "cross-spawn": "^6.0.5", + "find-yarn-workspace-root": "^1.2.1", + "fs-extra": "^7.0.1", + "is-ci": "^2.0.0", + "klaw-sync": "^6.0.0", + "minimist": "^1.2.0", + "open": "^7.4.2", + "rimraf": "^2.6.3", + "semver": "^5.6.0", + "slash": "^2.0.0", + "tmp": "^0.0.33" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + } + } + }, "path": { "version": "0.12.7", "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", @@ -21675,6 +22708,11 @@ "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", "dev": true }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" + }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -21714,14 +22752,6 @@ "graceful-fs": "^4.1.2", "pify": "^2.0.0", "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } } }, "pathval": { @@ -21752,6 +22782,12 @@ "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", "dev": true }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, "pinkie": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", @@ -21767,11 +22803,208 @@ "pinkie": "^2.0.0" } }, + "pkg-store": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/pkg-store/-/pkg-store-0.2.2.tgz", + "integrity": "sha1-sfXA+GIKWf1mWGrMXiVvTCw3oNg=", + "requires": { + "cache-base": "^0.8.2", + "kind-of": "^3.0.2", + "lazy-cache": "^1.0.3", + "union-value": "^0.2.3", + "write-json": "^0.2.2" + }, + "dependencies": { + "cache-base": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-0.8.5.tgz", + "integrity": "sha1-YM6zUEAh7O7HAR/TOEt/TpVym/o=", + "requires": { + "collection-visit": "^0.2.1", + "component-emitter": "^1.2.1", + "get-value": "^2.0.5", + "has-value": "^0.3.1", + "isobject": "^3.0.0", + "lazy-cache": "^2.0.1", + "set-value": "^0.4.2", + "to-object-path": "^0.3.0", + "union-value": "^0.2.3", + "unset-value": "^0.1.1" + }, + "dependencies": { + "lazy-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", + "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", + "requires": { + "set-getter": "^0.1.0" + } + } + } + }, + "collection-visit": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-0.2.3.tgz", + "integrity": "sha1-L2JIPK7MlfCDuaRUo+6eYTmteVc=", + "requires": { + "lazy-cache": "^2.0.1", + "map-visit": "^0.1.5", + "object-visit": "^0.3.4" + }, + "dependencies": { + "lazy-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", + "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", + "requires": { + "set-getter": "^0.1.0" + } + } + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + }, + "map-visit": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-0.1.5.tgz", + "integrity": "sha1-2+Q5J85VJbgN/BVzpE1oxR8mgWs=", + "requires": { + "lazy-cache": "^2.0.1", + "object-visit": "^0.3.4" + }, + "dependencies": { + "lazy-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", + "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", + "requires": { + "set-getter": "^0.1.0" + } + } + } + }, + "object-visit": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-0.3.4.tgz", + "integrity": "sha1-rhXPhvCy/dVRdxY2RIRSxUw9qCk=", + "requires": { + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + }, + "union-value": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-0.2.4.tgz", + "integrity": "sha1-c3UVJ4ZnkFfns3qmdug0aPwCdPA=", + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + } + }, + "unset-value": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-0.1.2.tgz", + "integrity": "sha1-UGgQuGfyfCpabpsEgzYx9t5Y0xA=", + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + } + } + } + }, "pkginfo": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.1.tgz", "integrity": "sha1-tUGO8EOd5UJfxJlQQtztFPsqhP8=" }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "postinstall-postinstall": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz", + "integrity": "sha512-7hQX6ZlZXIoRiWNrbMQaLzUUfH+sSx39u8EJ9HYuDc1kLo9IXKWjM5RSquZN1ad5GnH8CGFM78fsAAQi3OKEEQ==", + "dev": true + }, "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", @@ -21782,6 +23015,11 @@ "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" + }, "pretty-format": { "version": "24.9.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", @@ -21800,6 +23038,38 @@ } } }, + "pretty-time": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/pretty-time/-/pretty-time-0.2.0.tgz", + "integrity": "sha1-ejvexAScYgzXxCt/NCt01W5z104=", + "requires": { + "is-number": "^2.0.2", + "nanoseconds": "^0.1.0" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "requires": { + "kind-of": "^3.0.2" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "process": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", @@ -21808,14 +23078,23 @@ "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" }, + "project-name": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/project-name/-/project-name-0.2.6.tgz", + "integrity": "sha1-Pk94H+HulLB4apuuU1BjdsN5r2k=", + "requires": { + "find-pkg": "^0.1.2", + "git-repo-name": "^0.6.0", + "minimist": "^1.2.0" + } + }, "prompt": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/prompt/-/prompt-1.0.0.tgz", @@ -21906,6 +23185,156 @@ "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", "dev": true }, + "question-cache": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/question-cache/-/question-cache-0.5.1.tgz", + "integrity": "sha1-C8JzKRdTQXB99azTHvLd9nApFo0=", + "requires": { + "arr-flatten": "^1.0.1", + "arr-union": "^3.1.0", + "async-each-series": "^1.1.0", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "get-value": "^2.0.6", + "has-value": "^0.3.1", + "inquirer2": "^0.1.1", + "is-answer": "^0.1.0", + "isobject": "^2.1.0", + "lazy-cache": "^2.0.1", + "mixin-deep": "^1.1.3", + "omit-empty": "^0.4.1", + "option-cache": "^3.4.0", + "os-homedir": "^1.0.1", + "project-name": "^0.2.5", + "set-value": "^0.3.3", + "to-choices": "^0.2.0", + "use": "^2.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "set-value": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.3.3.tgz", + "integrity": "sha1-uBIjaBY4oQiP2IpDW4qdMtro2bo=", + "requires": { + "extend-shallow": "^2.0.1", + "isobject": "^2.0.0", + "to-object-path": "^0.2.0" + } + }, + "to-object-path": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.2.0.tgz", + "integrity": "sha1-FjThtSqIugDjlJYZ/ACB3Jo7B8o=", + "requires": { + "arr-flatten": "^1.0.1", + "is-arguments": "^1.0.2" + } + }, + "use": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/use/-/use-2.0.2.tgz", + "integrity": "sha1-riig1y+TvyJCKhii43mZMRLeyOg=", + "requires": { + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "lazy-cache": "^2.0.2" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + } + } + }, + "question-store": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/question-store/-/question-store-0.11.1.tgz", + "integrity": "sha1-gf1NRF9NWtwqYiPCUj+nEj4E/X0=", + "requires": { + "common-config": "^0.1.0", + "data-store": "^0.16.1", + "debug": "^2.2.0", + "is-answer": "^0.1.0", + "lazy-cache": "^2.0.1", + "project-name": "^0.2.6", + "question-cache": "^0.5.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, "r1csfile": { "version": "0.0.14", "resolved": "https://registry.npmjs.org/r1csfile/-/r1csfile-0.0.14.tgz", @@ -21941,6 +23370,23 @@ } } }, + "randomatic": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", + "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", + "requires": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==" + } + } + }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -21988,6 +23434,11 @@ "mute-stream": "~0.0.4" } }, + "read-file": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/read-file/-/read-file-0.2.0.tgz", + "integrity": "sha1-cMa6+IQux9FUD5gf0Oau1Mgb1UU=" + }, "read-pkg": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", @@ -22049,6 +23500,31 @@ "picomatch": "^2.2.1" } }, + "readline2": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz", + "integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "mute-stream": "0.0.5" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "mute-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz", + "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=" + } + } + }, "rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", @@ -22057,11 +23533,130 @@ "resolve": "^1.1.6" } }, + "reduce-object": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/reduce-object/-/reduce-object-0.1.3.tgz", + "integrity": "sha1-1UnUCmwpNvpOPpt4yonJMxRZQhg=", + "requires": { + "for-own": "^0.1.1" + } + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "requires": { + "is-equal-shallow": "^0.1.3" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, "regexpp": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==" }, + "relative": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/relative/-/relative-3.0.2.tgz", + "integrity": "sha1-Dc2OxUpdNaPBXhBFA9ZTdbWlNn8=", + "requires": { + "isobject": "^2.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "remote-origin-url": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/remote-origin-url/-/remote-origin-url-0.5.3.tgz", + "integrity": "sha512-crQ7Xk1m/F2IiwBx5oTqk/c0hjoumrEz+a36+ZoVupskQRE/q7pAwHKsTNeiZ31sbSTELvVlVv4h1W0Xo5szKg==", + "requires": { + "parse-git-config": "^1.1.1" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==" + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=" + }, + "repo-utils": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/repo-utils/-/repo-utils-0.3.7.tgz", + "integrity": "sha1-SrZq80DLEfp+XPgFgekr6Xwb964=", + "requires": { + "extend-shallow": "^2.0.1", + "get-value": "^2.0.6", + "git-config-path": "^1.0.1", + "is-absolute": "^0.2.6", + "kind-of": "^3.0.4", + "lazy-cache": "^2.0.1", + "mixin-deep": "^1.1.3", + "omit-empty": "^0.4.1", + "parse-author": "^1.0.0", + "parse-git-config": "^1.0.2", + "parse-github-url": "^0.3.2", + "project-name": "^0.2.6" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -22120,11 +23715,116 @@ "path-parse": "^1.0.6" } }, + "resolve-dir": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz", + "integrity": "sha1-shklmlYC+sXFxJatiUpujMQwJh4=", + "requires": { + "expand-tilde": "^1.2.2", + "global-modules": "^0.2.3" + }, + "dependencies": { + "expand-tilde": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz", + "integrity": "sha1-C4HrqJflo9MdHD0QL48BRB5VlEk=", + "requires": { + "os-homedir": "^1.0.1" + } + } + } + }, + "resolve-file": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/resolve-file/-/resolve-file-0.2.2.tgz", + "integrity": "sha1-FNvsWhnThPXW3GSin9ZigV0xdpY=", + "requires": { + "cwd": "^0.10.0", + "expand-tilde": "^2.0.1", + "extend-shallow": "^2.0.1", + "fs-exists-sync": "^0.1.0", + "global-modules": "^0.2.3", + "homedir-polyfill": "^1.0.0", + "lazy-cache": "^2.0.1", + "resolve": "^1.1.7" + }, + "dependencies": { + "cwd": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/cwd/-/cwd-0.10.0.tgz", + "integrity": "sha1-FyQAaUBXwioTsM8WFix+S3p/5Wc=", + "requires": { + "find-pkg": "^0.1.2", + "fs-exists-sync": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" }, + "resolve-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-glob/-/resolve-glob-1.0.0.tgz", + "integrity": "sha512-wSW9pVGJRs89k0wEXhM7C6+va9998NsDhgc0Y+6Nv8hrHsu0hUS7Ug10J1EiVtU6N2tKlSNvx9wLihL8Ao22Lg==", + "requires": { + "extend-shallow": "^2.0.1", + "is-valid-glob": "^1.0.0", + "matched": "^1.0.2", + "relative": "^3.0.2", + "resolve-dir": "^1.0.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "is-valid-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", + "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=" + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + } + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, "responselike": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", @@ -22142,11 +23842,58 @@ "signal-exit": "^3.0.2" } }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "rethrow": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/rethrow/-/rethrow-0.2.3.tgz", + "integrity": "sha1-xVKPGQ6J7HU1iJRSob5omWtfZhY=", + "requires": { + "ansi-bgred": "^0.1.1", + "ansi-red": "^0.1.1", + "ansi-yellow": "^0.1.1", + "extend-shallow": "^1.1.4", + "lazy-cache": "^0.2.3", + "right-align": "^0.1.3" + }, + "dependencies": { + "extend-shallow": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "requires": { + "kind-of": "^1.1.0" + } + }, + "kind-of": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=" + }, + "lazy-cache": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", + "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=" + } + } + }, "revalidator": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/revalidator/-/revalidator-0.1.8.tgz", "integrity": "sha1-/s5hv6DBtSoga9axgZgYS91SOjs=" }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "requires": { + "align-text": "^0.1.1" + } + }, "rimraf": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", @@ -22183,6 +23930,11 @@ "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==", "dev": true }, + "rx-lite": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=" + }, "rxjs": { "version": "6.6.3", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", @@ -22196,6 +23948,15 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -22503,6 +24264,35 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, + "set-getter": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.0.tgz", + "integrity": "sha1-12nBgsnVpR9AkUXy+6guXoboA3Y=", + "requires": { + "to-object-path": "^0.3.0" + } + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -22522,6 +24312,37 @@ "safe-buffer": "^5.0.1" } }, + "shallow-clone": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-0.1.2.tgz", + "integrity": "sha1-WQnodLp3EG1zrEFM/sH/yofZcGA=", + "requires": { + "is-extendable": "^0.1.1", + "kind-of": "^2.0.1", + "lazy-cache": "^0.2.3", + "mixin-object": "^2.0.1" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "kind-of": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz", + "integrity": "sha1-AY7HpM5+OobLkUG+UZ0kyPqpgbU=", + "requires": { + "is-buffer": "^1.0.2" + } + }, + "lazy-cache": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", + "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=" + } + } + }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -22581,6 +24402,140 @@ "is-fullwidth-code-point": "^2.0.0" } }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "snarkjs": { "version": "0.3.23", "resolved": "https://registry.npmjs.org/snarkjs/-/snarkjs-0.3.23.tgz", @@ -22701,12 +24656,48 @@ } } }, + "sort-object-arrays": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/sort-object-arrays/-/sort-object-arrays-0.1.1.tgz", + "integrity": "sha1-mfVc8gWkkd3h9S8Jajaiawm0gy8=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "dev": true, + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, "source-map-support": { "version": "0.5.19", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", @@ -22717,6 +24708,12 @@ "source-map": "^0.6.0" } }, + "source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "dev": true + }, "spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", @@ -22744,16 +24741,76 @@ } }, "spdx-license-ids": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", + "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==", "dev": true }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "requires": { + "extend-shallow": "^3.0.0" + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, + "src-stream": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/src-stream/-/src-stream-0.1.1.tgz", + "integrity": "sha1-2T9G0oGjcAKB7A8wszoDFDiUpoE=", + "requires": { + "duplexify": "^3.4.2", + "merge-stream": "^0.1.8", + "through2": "^2.0.0" + }, + "dependencies": { + "merge-stream": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-0.1.8.tgz", + "integrity": "sha1-SKB7O0oSHXSj7b/c20sIrb8CQLE=", + "requires": { + "through2": "^0.6.1" + }, + "dependencies": { + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + } + } + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + } + } + }, "sshpk": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", @@ -22799,11 +24856,49 @@ } } }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, + "stream-combiner": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.2.2.tgz", + "integrity": "sha1-rsjLrBd7Vrb0+kec7YwZEs7lKFg=", + "requires": { + "duplexer": "~0.1.1", + "through": "~2.3.4" + } + }, + "stream-exhaust": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz", + "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==" + }, + "stream-shift": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" + }, "strict-uri-encode": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", @@ -22902,6 +24997,11 @@ "safe-buffer": "~5.2.0" } }, + "stringify-author": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/stringify-author/-/stringify-author-0.1.3.tgz", + "integrity": "sha1-1YHgLOC1XNo8lT5irdIR+uSw72Y=" + }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -22914,11 +25014,45 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, "requires": { "is-utf8": "^0.2.0" } }, + "strip-bom-buffer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/strip-bom-buffer/-/strip-bom-buffer-0.1.1.tgz", + "integrity": "sha1-yj3cSRnBP5/d8wsd/xAKmDUki00=", + "requires": { + "is-buffer": "^1.1.0", + "is-utf8": "^0.2.0" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + } + } + }, + "strip-bom-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz", + "integrity": "sha1-5xRDmFd9Uaa+0PoZlPoF9D/ZiO4=", + "requires": { + "first-chunk-stream": "^1.0.0", + "strip-bom": "^2.0.0" + } + }, + "strip-bom-string": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-0.1.2.tgz", + "integrity": "sha1-nG5yCjE7qYNliVGEBcz7iKX0G5w=" + }, + "strip-color": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/strip-color/-/strip-color-0.1.0.tgz", + "integrity": "sha1-EG9l09PmotlAHKwOsM6LinArT3s=" + }, "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", @@ -22937,6 +25071,11 @@ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" }, + "success-symbol": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/success-symbol/-/success-symbol-0.1.0.tgz", + "integrity": "sha1-JAIuSG878c3KCUKDt2nEctO3KJc=" + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -23081,7 +25220,30 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^4.1.0" + } + } + } + }, + "tableize-object": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/tableize-object/-/tableize-object-0.1.0.tgz", + "integrity": "sha1-fCngEzsn1ItWuedtOijSQd8bOiQ=", + "requires": { + "isobject": "^2.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" } } } @@ -23100,6 +25262,155 @@ "yallist": "^3.0.3" } }, + "template-error": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/template-error/-/template-error-0.1.2.tgz", + "integrity": "sha1-GMn2ANkPLz37oIM+N/fLb0E1QtQ=", + "requires": { + "engine": "^0.1.5", + "kind-of": "^2.0.1", + "lazy-cache": "^0.2.3", + "rethrow": "^0.2.3" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "kind-of": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz", + "integrity": "sha1-AY7HpM5+OobLkUG+UZ0kyPqpgbU=", + "requires": { + "is-buffer": "^1.0.2" + } + }, + "lazy-cache": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", + "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=" + } + } + }, + "templates": { + "version": "0.24.3", + "resolved": "https://registry.npmjs.org/templates/-/templates-0.24.3.tgz", + "integrity": "sha1-i6uicOGlcnR022hXX4Ic4bT+TQU=", + "requires": { + "array-sort": "^0.1.2", + "async-each": "^1.0.0", + "base": "^0.11.1", + "base-data": "^0.6.0", + "base-engines": "^0.2.0", + "base-helpers": "^0.1.1", + "base-option": "^0.8.3", + "base-plugins": "^0.4.13", + "base-routes": "^0.2.1", + "debug": "^2.2.0", + "deep-bind": "^0.3.0", + "define-property": "^0.2.5", + "engine-base": "^0.1.2", + "export-files": "^2.1.1", + "extend-shallow": "^2.0.1", + "falsey": "^0.3.0", + "get-value": "^2.0.6", + "get-view": "^0.1.1", + "group-array": "^0.3.0", + "has-glob": "^0.1.1", + "has-value": "^0.3.1", + "inflection": "^1.10.0", + "is-valid-app": "^0.2.0", + "layouts": "^0.11.0", + "lazy-cache": "^2.0.1", + "match-file": "^0.2.0", + "mixin-deep": "^1.1.3", + "paginationator": "^0.1.3", + "pascalcase": "^0.1.1", + "set-value": "^0.3.3", + "template-error": "^0.1.2", + "vinyl-item": "^0.1.0", + "vinyl-view": "^0.1.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "set-value": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.3.3.tgz", + "integrity": "sha1-uBIjaBY4oQiP2IpDW4qdMtro2bo=", + "requires": { + "extend-shallow": "^2.0.1", + "isobject": "^2.0.0", + "to-object-path": "^0.2.0" + } + }, + "to-object-path": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.2.0.tgz", + "integrity": "sha1-FjThtSqIugDjlJYZ/ACB3Jo7B8o=", + "requires": { + "arr-flatten": "^1.0.1", + "is-arguments": "^1.0.2" + } + } + } + }, "testrpc": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/testrpc/-/testrpc-0.0.1.tgz", @@ -23116,6 +25427,170 @@ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + } + } + }, + "through2-filter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-2.0.0.tgz", + "integrity": "sha1-YLxVoNrLdghdsfna6Zq0P4PWIuw=", + "requires": { + "through2": "~2.0.0", + "xtend": "~4.0.0" + }, + "dependencies": { + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + } + } + }, + "time-diff": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/time-diff/-/time-diff-0.3.1.tgz", + "integrity": "sha1-Jej7c07qnmy15LA5TwWBC5yHwtg=", + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^2.1.0", + "log-utils": "^0.1.0", + "pretty-time": "^0.2.0" + }, + "dependencies": { + "ansi-colors": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-0.1.0.tgz", + "integrity": "sha1-M0rDbNPq1wjeXGnhmpjRhkImtD8=", + "requires": { + "ansi-bgblack": "^0.1.1", + "ansi-bgblue": "^0.1.1", + "ansi-bgcyan": "^0.1.1", + "ansi-bggreen": "^0.1.1", + "ansi-bgmagenta": "^0.1.1", + "ansi-bgred": "^0.1.1", + "ansi-bgwhite": "^0.1.1", + "ansi-bgyellow": "^0.1.1", + "ansi-black": "^0.1.1", + "ansi-blue": "^0.1.1", + "ansi-bold": "^0.1.1", + "ansi-cyan": "^0.1.1", + "ansi-dim": "^0.1.1", + "ansi-gray": "^0.1.1", + "ansi-green": "^0.1.1", + "ansi-grey": "^0.1.1", + "ansi-hidden": "^0.1.1", + "ansi-inverse": "^0.1.1", + "ansi-italic": "^0.1.1", + "ansi-magenta": "^0.1.1", + "ansi-red": "^0.1.1", + "ansi-reset": "^0.1.1", + "ansi-strikethrough": "^0.1.1", + "ansi-underline": "^0.1.1", + "ansi-white": "^0.1.1", + "ansi-yellow": "^0.1.1", + "lazy-cache": "^0.2.4" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "requires": { + "kind-of": "^3.0.2" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + }, + "lazy-cache": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", + "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=" + }, + "log-utils": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/log-utils/-/log-utils-0.1.5.tgz", + "integrity": "sha1-3g84+Vf0zW69Xctoddijua4HT3c=", + "requires": { + "ansi-colors": "^0.1.0", + "error-symbol": "^0.1.0", + "info-symbol": "^0.1.0", + "log-ok": "^0.1.1", + "success-symbol": "^0.1.0", + "time-stamp": "^1.0.1", + "warning-symbol": "^0.1.0" + } + } + } + }, + "time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=" + }, "timed-out": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", @@ -23147,11 +25622,140 @@ } } }, + "to-absolute-glob": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz", + "integrity": "sha1-HN+kcqnvUMI57maZm2YsoOs5k38=", + "requires": { + "extend-shallow": "^2.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "to-choices": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/to-choices/-/to-choices-0.2.0.tgz", + "integrity": "sha1-IufnWgfWl9fkzsvVaxvwPBVlTXM=", + "requires": { + "ansi-gray": "^0.1.1", + "mixin-deep": "^1.1.3" + } + }, + "to-file": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/to-file/-/to-file-0.2.0.tgz", + "integrity": "sha1-I2xsCIBl5XDe+9Fc9LTlZb5G6pM=", + "requires": { + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "file-contents": "^0.2.4", + "glob-parent": "^2.0.0", + "is-valid-glob": "^0.3.0", + "isobject": "^2.1.0", + "lazy-cache": "^2.0.1", + "vinyl": "^1.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "requires": { + "is-glob": "^2.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "requires": { + "is-extglob": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "to-readable-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==" }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -23182,6 +25786,14 @@ } } }, + "trim-leading-lines": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/trim-leading-lines/-/trim-leading-lines-0.1.1.tgz", + "integrity": "sha1-DnysPoMELc+Vp07TaWbxd0TVwWk=", + "requires": { + "is-whitespace": "^0.3.0" + } + }, "true-case-path": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-2.2.1.tgz", @@ -23291,11 +25903,52 @@ "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=" + }, "underscore": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "unique-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", + "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", + "requires": { + "json-stable-stringify-without-jsonify": "^1.0.1", + "through2-filter": "^3.0.0" + }, + "dependencies": { + "through2-filter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", + "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", + "requires": { + "through2": "~2.0.0", + "xtend": "~4.0.0" + } + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + } + } + }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -23306,6 +25959,125 @@ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + } + } + }, + "update": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/update/-/update-0.7.4.tgz", + "integrity": "sha1-saCRwRo+KK4xui7vWLcRuCzpixQ=", + "requires": { + "arr-union": "^3.1.0", + "assemble-core": "^0.25.0", + "assemble-loader": "^0.6.1", + "base-cli-process": "^0.1.18", + "base-config-process": "^0.1.9", + "base-generators": "^0.4.5", + "base-questions": "^0.7.3", + "base-runtimes": "^0.2.0", + "base-store": "^0.4.4", + "common-config": "^0.1.0", + "data-store": "^0.16.1", + "export-files": "^2.1.1", + "extend-shallow": "^2.0.1", + "find-pkg": "^0.1.2", + "fs-exists-sync": "^0.1.0", + "global-modules": "^0.2.2", + "gulp-choose-files": "^0.1.3", + "is-valid-app": "^0.2.0", + "isobject": "^2.1.0", + "lazy-cache": "^2.0.1", + "log-utils": "^0.2.1", + "parser-front-matter": "^1.4.1", + "resolve-dir": "^0.1.0", + "resolve-file": "^0.2.0", + "set-blocking": "^2.0.0", + "strip-color": "^0.1.0", + "text-table": "^0.2.0", + "through2": "^2.0.1", + "yargs-parser": "^2.4.1" + }, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + }, + "yargs-parser": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", + "requires": { + "camelcase": "^3.0.0", + "lodash.assign": "^4.0.6" + } + } + } + }, + "upper-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", + "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=" + }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", @@ -23314,6 +26086,12 @@ "punycode": "^2.1.0" } }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, "url": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", @@ -23350,6 +26128,12 @@ "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=" }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, "utf8": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", @@ -23417,6 +26201,11 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" }, + "vali-date": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz", + "integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY=" + }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -23447,6 +26236,308 @@ "extsprintf": "^1.2.0" } }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "requires": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + } + }, + "vinyl-fs": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-2.4.4.tgz", + "integrity": "sha1-vm/zJwy1Xf19MGNkDegfJddTIjk=", + "requires": { + "duplexify": "^3.2.0", + "glob-stream": "^5.3.2", + "graceful-fs": "^4.0.0", + "gulp-sourcemaps": "1.6.0", + "is-valid-glob": "^0.3.0", + "lazystream": "^1.0.0", + "lodash.isequal": "^4.0.0", + "merge-stream": "^1.0.0", + "mkdirp": "^0.5.0", + "object-assign": "^4.0.0", + "readable-stream": "^2.0.4", + "strip-bom": "^2.0.0", + "strip-bom-stream": "^1.0.0", + "through2": "^2.0.0", + "through2-filter": "^2.0.0", + "vali-date": "^1.0.0", + "vinyl": "^1.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "vinyl-item": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/vinyl-item/-/vinyl-item-0.1.0.tgz", + "integrity": "sha1-8ngTyBFC66ScpYSd5PQvb6Dl4Jg=", + "requires": { + "base": "^0.8.1", + "base-option": "^0.8.2", + "base-plugins": "^0.4.12", + "clone": "^1.0.2", + "clone-stats": "^1.0.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "isobject": "^2.1.0", + "lazy-cache": "^2.0.1", + "vinyl": "^1.1.1" + }, + "dependencies": { + "base": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/base/-/base-0.8.1.tgz", + "integrity": "sha1-aQC7MA8sdZbJnz2DurhyLYGLdI8=", + "requires": { + "arr-union": "^3.1.0", + "cache-base": "^0.8.2", + "class-utils": "^0.3.2", + "component-emitter": "^1.2.0", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "lazy-cache": "^1.0.3", + "mixin-deep": "^1.1.3" + }, + "dependencies": { + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + } + } + }, + "cache-base": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-0.8.5.tgz", + "integrity": "sha1-YM6zUEAh7O7HAR/TOEt/TpVym/o=", + "requires": { + "collection-visit": "^0.2.1", + "component-emitter": "^1.2.1", + "get-value": "^2.0.5", + "has-value": "^0.3.1", + "isobject": "^3.0.0", + "lazy-cache": "^2.0.1", + "set-value": "^0.4.2", + "to-object-path": "^0.3.0", + "union-value": "^0.2.3", + "unset-value": "^0.1.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=" + }, + "collection-visit": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-0.2.3.tgz", + "integrity": "sha1-L2JIPK7MlfCDuaRUo+6eYTmteVc=", + "requires": { + "lazy-cache": "^2.0.1", + "map-visit": "^0.1.5", + "object-visit": "^0.3.4" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + }, + "map-visit": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-0.1.5.tgz", + "integrity": "sha1-2+Q5J85VJbgN/BVzpE1oxR8mgWs=", + "requires": { + "lazy-cache": "^2.0.1", + "object-visit": "^0.3.4" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "object-visit": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-0.3.4.tgz", + "integrity": "sha1-rhXPhvCy/dVRdxY2RIRSxUw9qCk=", + "requires": { + "isobject": "^2.0.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + }, + "union-value": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-0.2.4.tgz", + "integrity": "sha1-c3UVJ4ZnkFfns3qmdug0aPwCdPA=", + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + } + }, + "unset-value": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-0.1.2.tgz", + "integrity": "sha1-UGgQuGfyfCpabpsEgzYx9t5Y0xA=", + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + } + } + }, + "vinyl-view": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/vinyl-view/-/vinyl-view-0.1.2.tgz", + "integrity": "sha1-CaxtfIASEr8JJr2dQQb0XmxPyXc=", + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "engine-base": "^0.1.2", + "isobject": "^2.1.0", + "lazy-cache": "^2.0.1", + "mixin-deep": "^1.1.3", + "vinyl-item": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "warning-symbol": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/warning-symbol/-/warning-symbol-0.1.0.tgz", + "integrity": "sha1-uzHdEbeg+dZ6su2V9Fe2WCW7rSE=" + }, "wasmbuilder": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/wasmbuilder/-/wasmbuilder-0.0.10.tgz", @@ -24051,6 +27142,24 @@ "mkdirp": "^0.5.1" } }, + "write-json": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/write-json/-/write-json-0.2.2.tgz", + "integrity": "sha1-+k4VKennY6T5LwfZhBMX49JI2vM=", + "requires": { + "write": "^0.2.1" + }, + "dependencies": { + "write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "requires": { + "mkdirp": "^0.5.1" + } + } + } + }, "ws": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz", diff --git a/package.json b/package.json index 2e9e6cd..f84d025 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "prompt-async": "^0.9.9", "shelljs": "^0.8.3", "snarkjs": "^0.3.23", - "typescript": "^3.9.7" + "typescript": "^3.9.7", + "update": "^0.7.4" } } diff --git a/scripts/buildProveReputationSnark.sh b/scripts/buildProveReputationSnark.sh index 0219a66..10b7bb1 100755 --- a/scripts/buildProveReputationSnark.sh +++ b/scripts/buildProveReputationSnark.sh @@ -6,7 +6,7 @@ cd "$(dirname "$0")" cd .. mkdir -p build -NODE_OPTIONS=--max-old-space-size=8192 npx ts-node scripts/buildSnarks.ts -i circuits/test/proveReputation_test.circom -j build/proveReputationCircuit.r1cs -w build/proveReputation.wasm -y build/proveReputation.sym -p build/proveReputationPk.json -v build/proveReputationVk.json -s build/ReputationVerifier.sol -vs ReputationVerifier -pr build/proveReputation.params +NODE_OPTIONS=--max-old-space-size=8192 npx ts-node scripts/buildSnarks.ts -i circuits/test/proveReputation_test.circom -j build/proveReputationCircuit.r1cs -w build/proveReputation.wasm -y build/proveReputation.sym -p build/proveReputationPk.json -v build/proveReputationVk.json -s build/ReputationVerifier.sol -vs ReputationVerifier -pr build/proveReputation.params -r echo 'Copying ReputationVerifier.sol to contracts/' cp ./build/ReputationVerifier.sol ./contracts/ \ No newline at end of file From b4bbb3b5b7f9b98ccbb3cf467b1e089dd494fc2e Mon Sep 17 00:00:00 2001 From: "ya-wen,jeng" Date: Wed, 3 Mar 2021 11:12:07 +0800 Subject: [PATCH 04/38] update verifyReputation and Unirep.sol to prove -md --- cli/genReputationProof.ts | 2 +- cli/test/testAllCommands.ts | 4 +++- cli/verifyReputationProof.ts | 36 ++++++++++++++++++++++++++---------- contracts/Unirep.sol | 19 ++----------------- 4 files changed, 32 insertions(+), 29 deletions(-) diff --git a/cli/genReputationProof.ts b/cli/genReputationProof.ts index 3a6c7ca..36653ba 100644 --- a/cli/genReputationProof.ts +++ b/cli/genReputationProof.ts @@ -146,9 +146,9 @@ const genReputationProof = async (args: any) => { const proveNegRep = args.max_neg_rep != null ? BigInt(1) : BigInt(0) const proveRepDiff = args.min_rep_diff != null ? BigInt(1) : BigInt(0) const proveGraffiti = args.graffiti_preimage != null ? BigInt(1) : BigInt(0) + const minRepDiff = args.min_rep_diff != null ? BigInt(args.min_rep_diff) : BigInt(0) const minPosRep = args.min_pos_rep != null ? BigInt(args.min_pos_rep) : BigInt(0) const maxNegRep = args.max_neg_rep != null ? BigInt(args.max_neg_rep) : BigInt(0) - const minRepDiff = args.min_rep_diff != null ? BigInt(args.min_rep_diff) : BigInt(0) const graffitiPreImage = args.graffiti_preimage != null ? BigInt(add0x(args.graffiti_preimage)) : BigInt(0) const circuitInputs = await userState.genProveReputationCircuitInputs(attesterId, provePosRep, proveNegRep, proveRepDiff, proveGraffiti, minPosRep, maxNegRep, minRepDiff, graffitiPreImage) diff --git a/cli/test/testAllCommands.ts b/cli/test/testAllCommands.ts index 3c96ef1..2919cd8 100644 --- a/cli/test/testAllCommands.ts +++ b/cli/test/testAllCommands.ts @@ -35,7 +35,7 @@ describe('test all CLI subcommands', function() { const attesterId = 1 let epk, epkProof const posRep = 10, negRep = 8, graffitiPreimage = 0, graffiti = hashOne(BigInt(graffitiPreimage)) - const minPosRep = 0, maxNegRep = 10 + const minPosRep = 0, maxNegRep = 10, minRepDiff = 1 let userRepProof before(async() => { @@ -242,6 +242,7 @@ describe('test all CLI subcommands', function() { ` -a ${attesterId} ` + ` -mp ${minPosRep} ` + ` -mn ${maxNegRep} ` + + ` -md ${minRepDiff}` + ` -gp ${graffitiPreimage} ` const output = exec(command).stdout.trim() @@ -261,6 +262,7 @@ describe('test all CLI subcommands', function() { ` -a ${attesterId} ` + ` -mp ${minPosRep} ` + ` -mn ${maxNegRep} ` + + ` -md ${minRepDiff}` + ` -gp ${graffitiPreimage} ` + ` -pf ${userRepProof} ` diff --git a/cli/verifyReputationProof.ts b/cli/verifyReputationProof.ts index e1b783d..5e9e641 100644 --- a/cli/verifyReputationProof.ts +++ b/cli/verifyReputationProof.ts @@ -51,7 +51,6 @@ const configureSubparser = (subparsers: any) => { parser.addArgument( ['-mp', '--min-pos-rep'], { - required: true, type: 'int', help: 'The minimum positive score the attester given to the user', } @@ -60,16 +59,22 @@ const configureSubparser = (subparsers: any) => { parser.addArgument( ['-mn', '--max-neg-rep'], { - required: true, type: 'int', help: 'The maximum negative score the attester given to the user', } ) + parser.addArgument( + ['-md', '--min-rep-diff'], + { + type: 'int', + help: 'The difference between positive and negative scores the attester given to the user', + } + ) + parser.addArgument( ['-gp', '--graffiti-preimage'], { - required: true, type: 'string', help: 'The pre-image of the graffiti for the reputation the attester given to the user (in hex representation)', } @@ -139,9 +144,14 @@ const verifyReputationProof = async (args: any) => { const currentEpoch = unirepState.currentEpoch const epoch = args.epoch ? Number(args.epoch) : currentEpoch const attesterId = BigInt(add0x(args.attester_id)) - const minPosRep = args.min_pos_rep - const maxNegRep = args.max_neg_rep - const graffitiPreImage = BigInt(add0x(args.graffiti_preimage)) + const provePosRep = args.min_pos_rep != null ? BigInt(1) : BigInt(0) + const proveNegRep = args.max_neg_rep != null ? BigInt(1) : BigInt(0) + const proveRepDiff = args.min_rep_diff != null ? BigInt(1) : BigInt(0) + const proveGraffiti = args.graffiti_preimage != null ? BigInt(1) : BigInt(0) + const minRepDiff = args.min_rep_diff != null ? BigInt(args.min_rep_diff) : BigInt(0) + const minPosRep = args.min_pos_rep != null ? BigInt(args.min_pos_rep) : BigInt(0) + const maxNegRep = args.max_neg_rep != null ? BigInt(args.max_neg_rep) : BigInt(0) + const graffitiPreImage = args.graffiti_preimage != null ? BigInt(add0x(args.graffiti_preimage)) : BigInt(0) const decodedProof = base64url.decode(args.proof.slice(reputationProofPrefix.length)) const proof = JSON.parse(decodedProof) @@ -149,15 +159,21 @@ const verifyReputationProof = async (args: any) => { const GSTreeRoot = unirepState.genGSTree(epoch).root const nullifierTree = await unirepState.genNullifierTree() const nullifierTreeRoot = nullifierTree.getRootHash() - const isProofValid = await unirepContract.verifyReputation( - epoch, + const publicInput = [epoch, GSTreeRoot, nullifierTreeRoot, attesterId, + provePosRep, + proveNegRep, + proveRepDiff, + proveGraffiti, + minRepDiff, minPosRep, maxNegRep, - graffitiPreImage, - proof, + graffitiPreImage] + const isProofValid = await unirepContract.verifyReputation( + publicInput, + proof ) if (!isProofValid) { console.error('Error: invalid reputation proof') diff --git a/contracts/Unirep.sol b/contracts/Unirep.sol index b6a949c..984f952 100644 --- a/contracts/Unirep.sol +++ b/contracts/Unirep.sol @@ -425,14 +425,8 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { } function verifyReputation( - uint256 _epoch, - uint256 _globalStateTree, - uint256 _nullifierTreeRoot, - uint256 _attesterId, - uint256 _min_pos_rep, - uint256 _max_neg_rep, - uint256 _graffiti_pre_image, - uint256[8] calldata _proof) external view returns (bool) { + uint256[] memory publicSignals, + uint256[8] memory _proof) public view returns (bool) { // User prove his reputation by an attester: // 1. User exists in GST // 2. It is the latest state user transition to @@ -440,15 +434,6 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { // 4. negative reputation is less than `_max_neg_rep` // 5. hash of graffiti pre-image matches - uint256[] memory publicSignals = new uint256[](7); - publicSignals[0] = _epoch; - publicSignals[1] = _globalStateTree; - publicSignals[2] = _nullifierTreeRoot; - publicSignals[3] = _attesterId; - publicSignals[4] = _min_pos_rep; - publicSignals[5] = _max_neg_rep; - publicSignals[6] = _graffiti_pre_image; - // Ensure that each public input is within range of the snark scalar // field. // TODO: consider having more granular revert reasons From 9fd29ac0b7d4c7fea79e0cd21f41a096ac278b47 Mon Sep 17 00:00:00 2001 From: "ya-wen,jeng" Date: Thu, 4 Mar 2021 16:05:11 +0800 Subject: [PATCH 05/38] upvote downvote cli --- .DS_Store | Bin 6148 -> 8196 bytes cli/.DS_Store | Bin 0 -> 8196 bytes cli/index.ts | 10 ++ cli/test/testAllCommands.ts | 74 ++++++-- cli/vote.ts | 289 ++++++++++++++++++++++++++++++++ core/UserState.ts | 2 +- test/integration/Integration.ts | 19 ++- 7 files changed, 372 insertions(+), 22 deletions(-) create mode 100644 cli/.DS_Store create mode 100644 cli/vote.ts diff --git a/.DS_Store b/.DS_Store index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..8113852b3e2d341e015a7e34784d3b2ca2b78a39 100644 GIT binary patch literal 8196 zcmeHM&2AGh5FV##n-wjz0*PLb_QI`1{Zl0lNFk($9*_`0Z~)Y1v!PkouB&82R6|#q75RdAhTS%f?`hM zan3WTWP7edD&UD;QH$D?QvWcX(RLk<0mp!2z%k$$a18tl4B*V>RJq{XH>0j}3^)e< zO9uG+;3KoFSvfIMJ{>3|1b{4~TN3Js0|et+S+jCtq(EWQL=VbBl?^eJfn(ffb;z2P z6C(|rl!247PgXWUQSx-)d{HM=Gt!lg0mr~B101`1h}wII+M{gzuG>MZ1B~(u^%XDF z)nAgt#3BVWfPPHjVVu*vKcm@}JAp2B@|x;aL9>FJg9v`K#j@NX6fILV@l7RrlD%N5V7c&pyaW>*iJX)7J{>#g2%Zar$H-N4qL zXdO@Mt>9_Y86K_Oc%YNC6(yaXfTOSjl^4&VB-F#Y9wcF3>@>}QJm_d`V>H^?-`ezd z_x8q{{^;%w>U+EU8t< zpnnG_E$u43ratqSw?Nq9l(n!@uy7HMw`LaS(PKJ*wFW(etfFk>pCoIQMJ&S~<}?yc z3p0~-%4(Ov8s<-F!78s)R&SNrE$}^e=CW!TB(|EI!jSI#2dOSO1}+l=3&zw5KPGg_gAhnpCgF}!R pBnTAa1`@77th%xAJM(0I8AV3M$)+;eJWLRCKt?lcj^~-f3;-`E4{!hg diff --git a/cli/.DS_Store b/cli/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..9e0fdcd05962fa1a115f17cf7186bb6796820a7b GIT binary patch literal 8196 zcmeHM&2G~`5S~o~wN(`gl#&aQFWjoCKT#zPNFlU`h)YFUH~?y$#%(OQb`(1eAq3^l z6TpF2;5m2z#ItaMZ+5qlXFs1OEd9cxH34E_v>&QPUa*3_KR#&?$ycaEv>w4q4H1 zq@;qAP;e4@W}!0_A!i59k?JHWN}AR%U>KNYfOB`7T;%KtdFlK;I&K6}1EYMP9;2@P zlm$JaTN4P6I#eg0PAQ}VYG1qon6U6AV_|`snC}F3x)ksmgFKYDpF!CY)dnJ>elFre z25}p+w4r@WE!u~lE_{sPYl0e~uisXreHA}4Hde4Q54yW!OHXm#2P+}`*@M*xpOZXW zh0~0!yV}+>=~owiF!#!rt1W%YSX$PW4&a3kA9$TL$xkRPCix7>z5JZoOABaThevPn zRzSRSX?+{>@N6f*^{P=fY{t?~T@A>I4wp)U!RGe*s^|<|n-k6B_7MvGsl#z)Fmq5%*eXrf`s>5NAva-f9`+&`c9$LS z^vXemDTaYrV_;4#xWxJY?&a_QXN?xKUcRKF040F sQbN$kbR1Hq%9x6lBPDSM { // Subcommand: attest configureSubparserForAttest(subparsers) + // Subcommand: upvote + configureSubparserForvote(subparsers) + // Subcommand: epochTransition configureSubparserForEpochTransition(subparsers) @@ -118,6 +126,8 @@ const main = async () => { await verifyEpochKeyProof(args) } else if (args.subcommand === 'attest') { await attest(args) + } else if (args.subcommand === 'vote') { + await vote(args) } else if (args.subcommand === 'epochTransition') { await epochTransition(args) } else if (args.subcommand === 'userStateTransition') { diff --git a/cli/test/testAllCommands.ts b/cli/test/testAllCommands.ts index 2919cd8..96f49c9 100644 --- a/cli/test/testAllCommands.ts +++ b/cli/test/testAllCommands.ts @@ -31,7 +31,7 @@ describe('test all CLI subcommands', function() { let unirepContract: ethers.Contract let unirepState: UnirepState - let userIdentity, userIdentityCommitment + let userIdentity1, userIdentityCommitment1, userIdentity2, userIdentityCommitment2 const attesterId = 1 let epk, epkProof const posRep = 10, negRep = 8, graffitiPreimage = 0, graffiti = hashOne(BigInt(graffitiPreimage)) @@ -87,7 +87,7 @@ describe('test all CLI subcommands', function() { }) describe('genUserIdentity CLI subcommand', () => { - it('should generate an identity for user', async () => { + it('should generate an identity for user 1', async () => { const command = `npx ts-node cli/index.ts genUnirepIdentity` const output = exec(command).stdout.trim() @@ -106,16 +106,53 @@ describe('test all CLI subcommands', function() { const _userIdentityCommitment = genIdentityCommitment(_userIdentity) expect(serializedIdentityCommitment).equal(_userIdentityCommitment.toString(16)) - userIdentity = encodedIdentity - userIdentityCommitment = encodedIdentityCommitment + userIdentity1 = encodedIdentity + userIdentityCommitment1 = encodedIdentityCommitment + }) + it('should generate an identity for user 2', async () => { + const command = `npx ts-node cli/index.ts genUnirepIdentity` + + const output = exec(command).stdout.trim() + + console.log(command) + console.log(output) + + const idRegMatch = output.match(/^(Unirep.identity.[a-zA-Z0-9\-\_]+)\n/) + const encodedIdentity = idRegMatch[1] + const serializedIdentity = base64url.decode(encodedIdentity.slice(identityPrefix.length)) + const _userIdentity = unSerialiseIdentity(serializedIdentity) + + const commitmentRegMatch = output.match(/(Unirep.identityCommitment.[a-zA-Z0-9\-\_]+)$/) + const encodedIdentityCommitment = commitmentRegMatch[1] + const serializedIdentityCommitment = base64url.decode(encodedIdentityCommitment.slice(identityCommitmentPrefix.length)) + const _userIdentityCommitment = genIdentityCommitment(_userIdentity) + expect(serializedIdentityCommitment).equal(_userIdentityCommitment.toString(16)) + + userIdentity2 = encodedIdentity + userIdentityCommitment2 = encodedIdentityCommitment }) }) describe('userSignup CLI subcommand', () => { - it('should sign user up', async () => { + it('should sign user 1 up', async () => { + const command = `npx ts-node cli/index.ts userSignup` + + ` -x ${unirepContract.address} ` + + ` -c ${userIdentityCommitment1} ` + + ` -d ${userPrivKey} ` + + const output = exec(command).stdout.trim() + + console.log(command) + console.log(output) + + const signUpRegMatch = output.match(/Sign up epoch: 1/) + expect(signUpRegMatch).not.equal(null) + }) + + it('should sign user 2 up', async () => { const command = `npx ts-node cli/index.ts userSignup` + ` -x ${unirepContract.address} ` + - ` -c ${userIdentityCommitment} ` + + ` -c ${userIdentityCommitment2} ` + ` -d ${userPrivKey} ` const output = exec(command).stdout.trim() @@ -148,7 +185,7 @@ describe('test all CLI subcommands', function() { it('should generate epoch key proof', async () => { const command = `npx ts-node cli/index.ts genEpochKeyAndProof` + ` -x ${unirepContract.address} ` + - ` -id ${userIdentity} ` + + ` -id ${userIdentity1} ` + ` -n ${epochKeyNonce} ` const output = exec(command).stdout.trim() @@ -180,14 +217,15 @@ describe('test all CLI subcommands', function() { }) }) - describe('attest CLI subcommand', () => { - it('should attest to user', async () => { - const command = `npx ts-node cli/index.ts attest` + + describe('upvote CLI subcommand', () => { + it('should upvote to user', async () => { + const command = `npx ts-node cli/index.ts vote` + ` -x ${unirepContract.address} ` + ` -d ${attesterPrivKey} ` + ` -epk ${epk} ` + - ` -pr ${posRep} ` + - ` -nr ${negRep} ` + + ` -id ${userIdentity2}` + + ` -n ${epochKeyNonce}` + + ` -uv ${posRep} ` + ` -gf ${graffiti.toString(16)} ` const output = exec(command).stdout.trim() @@ -222,7 +260,7 @@ describe('test all CLI subcommands', function() { const command = `npx ts-node cli/index.ts userStateTransition` + ` -x ${unirepContract.address} ` + ` -d ${userPrivKey} ` + - ` -id ${userIdentity} ` + ` -id ${userIdentity1} ` const output = exec(command).stdout.trim() @@ -238,11 +276,11 @@ describe('test all CLI subcommands', function() { it('should generate user reputation proof', async () => { const command = `npx ts-node cli/index.ts genReputationProof` + ` -x ${unirepContract.address} ` + - ` -id ${userIdentity} ` + + ` -id ${userIdentity1} ` + ` -a ${attesterId} ` + - ` -mp ${minPosRep} ` + + // ` -mp ${minPosRep} ` + ` -mn ${maxNegRep} ` + - ` -md ${minRepDiff}` + + // ` -md ${minRepDiff}` + ` -gp ${graffitiPreimage} ` const output = exec(command).stdout.trim() @@ -260,9 +298,9 @@ describe('test all CLI subcommands', function() { const command = `npx ts-node cli/index.ts verifyReputationProof` + ` -x ${unirepContract.address} ` + ` -a ${attesterId} ` + - ` -mp ${minPosRep} ` + + // ` -mp ${minPosRep} ` + ` -mn ${maxNegRep} ` + - ` -md ${minRepDiff}` + + // ` -md ${minRepDiff}` + ` -gp ${graffitiPreimage} ` + ` -pf ${userRepProof} ` diff --git a/cli/vote.ts b/cli/vote.ts new file mode 100644 index 0000000..2ffdebe --- /dev/null +++ b/cli/vote.ts @@ -0,0 +1,289 @@ +import base64url from 'base64url' +import { ethers as hardhatEthers } from 'hardhat' +import { ethers } from 'ethers' +import { genIdentityCommitment, unSerialiseIdentity } from 'libsemaphore' +import { stringifyBigInts } from 'maci-crypto' + +import { + promptPwd, + validateEthSk, + validateEthAddress, + checkDeployerProviderConnection, + contractExists, +} from './utils' + +import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' + +import { genEpochKey } from '../test/utils' +import { genUserStateFromContract } from '../core' +import { formatProofForVerifierContract, genVerifyEpochKeyProofAndPublicSignals, verifyEPKProof } from '../test/circuits/utils' + +import { add0x } from '../crypto/SMT' +import { Attestation } from '../core' + +import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" +import { epkProofPrefix, identityPrefix } from './prefix' + +const configureSubparser = (subparsers: any) => { + const parser = subparsers.addParser( + 'vote', + { addHelp: true }, + ) + + parser.addArgument( + ['-e', '--eth-provider'], + { + action: 'store', + type: 'string', + help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, + } + ) + + parser.addArgument( + ['-epk', '--epoch-key'], + { + required: true, + type: 'string', + help: 'The user\'s epoch key to attest to (in hex representation)', + } + ) + + parser.addArgument( + ['-id', '--identity'], + { + required: true, + type: 'string', + help: 'The (serialized) user\'s identity', + } + ) + + parser.addArgument( + ['-n', '--epoch-key-nonce'], + { + required: true, + type: 'int', + help: 'The epoch key nonce', + } + ) + + parser.addArgument( + ['-uv', '--upvote-value'], + { + type: 'int', + help: 'Score of positive reputation to give to the user and substract from attester\'s epoch key', + } + ) + + parser.addArgument( + ['-dv', '--downvote-value'], + { + type: 'int', + help: 'Score of negative reputation to give to the user and substract from attester\'s epoch key', + } + ) + + parser.addArgument( + ['-gf', '--graffiti'], + { + action: 'store', + type: 'string', + help: 'Graffiti for the reputation given to the user (in hex representation)', + } + ) + + parser.addArgument( + ['-x', '--contract'], + { + required: true, + type: 'string', + help: 'The Unirep contract address', + } + ) + + const privkeyGroup = parser.addMutuallyExclusiveGroup({ required: true }) + + privkeyGroup.addArgument( + ['-dp', '--prompt-for-eth-privkey'], + { + action: 'storeTrue', + help: 'Whether to prompt for the user\'s Ethereum private key and ignore -d / --eth-privkey', + } + ) + + privkeyGroup.addArgument( + ['-d', '--eth-privkey'], + { + action: 'store', + type: 'string', + help: 'The deployer\'s Ethereum private key', + } + ) +} + +const vote = async (args: any) => { + + // Unirep contract + if (!validateEthAddress(args.contract)) { + console.error('Error: invalid Unirep contract address') + return + } + + // Should input upvote or downvote value + if(!args.upvote_value && !args.downvote_value){ + console.error('Error: either upvote value or downvote value is required') + return + } + + // Upvote and downvote cannot be at the same time + if(args.upvote_value && args.downvote_value){ + console.error('Error: upvote and downvote cannot be at the same time') + return + } + const unirepAddress = args.contract + + // Ethereum provider + const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER + + let ethSk + // The deployer's Ethereum private key + // The user may either enter it as a command-line option or via the + // standard input + if (args.prompt_for_eth_privkey) { + ethSk = await promptPwd('Your Ethereum private key') + } else { + ethSk = args.eth_privkey + } + + if (!validateEthSk(ethSk)) { + console.error('Error: invalid Ethereum private key') + return + } + + if (! (await checkDeployerProviderConnection(ethSk, ethProvider))) { + console.error('Error: unable to connect to the Ethereum provider at', ethProvider) + return + } + + const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) + const wallet = new ethers.Wallet(ethSk, provider) + + if (! await contractExists(provider, unirepAddress)) { + console.error('Error: there is no contract deployed at the specified address') + return + } + + const unirepContract = new ethers.Contract( + unirepAddress, + Unirep.abi, + wallet, + ) + const startBlock = (args.start_block) ? args.start_block : DEFAULT_START_BLOCK + const attestingFee = await unirepContract.attestingFee() + const ethAddr = ethers.utils.computeAddress(args.eth_privkey) + const attesterId = await unirepContract.attesters(ethAddr) + if (attesterId.toNumber() == 0) { + console.error('Error: attester has not registered yet') + return + } + + // Validate epoch key nonce + const epkNonce = args.epoch_key_nonce + const numEpochKeyNoncePerEpoch = await unirepContract.numEpochKeyNoncePerEpoch() + if (epkNonce >= numEpochKeyNoncePerEpoch) { + console.error('Error: epoch key nonce must be less than max epoch key nonce') + return + } + + // Gen epoch key + const encodedIdentity = args.identity.slice(identityPrefix.length) + const decodedIdentity = base64url.decode(encodedIdentity) + const id = unSerialiseIdentity(decodedIdentity) + const commitment = genIdentityCommitment(id) + const currentEpoch = (await unirepContract.currentEpoch()).toNumber() + const treeDepths = await unirepContract.treeDepths() + const epochTreeDepth = treeDepths.epochTreeDepth + const epk = genEpochKey(id.identityNullifier, currentEpoch, epkNonce, epochTreeDepth).toString(16) + + // Gen epoch key proof + const userState = await genUserStateFromContract( + provider, + unirepAddress, + startBlock, + id, + commitment, + ) + const circuitInputs = await userState.genVerifyEpochKeyCircuitInputs(epkNonce) + console.log('Proving epoch key...') + console.log('----------------------User State----------------------') + console.log(userState.toJSON(4)) + console.log('------------------------------------------------------') + console.log('----------------------Circuit inputs----------------------') + console.log(circuitInputs) + console.log('----------------------------------------------------------') + const results = await genVerifyEpochKeyProofAndPublicSignals(stringifyBigInts(circuitInputs)) + + // TODO: Not sure if this validation is necessary + const isValid = await verifyEPKProof(results['proof'], results['publicSignals']) + if(!isValid) { + console.error('Error: epoch key proof generated is not valid!') + return + } + + const formattedProof = formatProofForVerifierContract(results["proof"]) + const encodedProof = base64url.encode(JSON.stringify(formattedProof)) + console.log(`Epoch key of epoch ${currentEpoch} and nonce ${epkNonce}: ${epk}`) + console.log(epkProofPrefix + encodedProof) + + // downvote user + const graffiti = args.graffiti ? BigInt(add0x(args.graffiti)) : BigInt(0) + const overwriteGraffiti = args.graffiti ? true : false + const upvoteValue = args.upvote_value != null ? BigInt(args.upvote_value) : BigInt(0) + const downvoteValue = args.downvote_value != null ? BigInt(args.downvote_value) : BigInt(0) + const attestation = new Attestation( + BigInt(attesterId), + BigInt(0), + upvoteValue + downvoteValue, + graffiti, + overwriteGraffiti, + ) + + // upvote or downvote to epoch key + const attestationToEpochKey = new Attestation( + BigInt(attesterId), + upvoteValue, + downvoteValue, + graffiti, + overwriteGraffiti, + ) + + console.log(`Attesting to epoch key ${epk} with pos rep ${BigInt(0)}, neg rep ${upvoteValue + downvoteValue} and graffiti ${graffiti.toString(16)} (overwrite graffit: ${overwriteGraffiti})`) + console.log(`Attesting to epoch key ${args.epoch_key} with pos rep ${upvoteValue}, neg rep ${downvoteValue} and graffiti ${graffiti.toString(16)} (overwrite graffit: ${overwriteGraffiti})`) + let tx1 + let tx2 + try { + tx1 = await unirepContract.submitAttestation( + attestation, + epk, + { value: attestingFee, gasLimit: 1000000 } + ) + tx2 = await unirepContract.submitAttestation( + attestationToEpochKey, + BigInt(add0x(args.epoch_key)), + { value: attestingFee, gasLimit: 1000000 } + ) + } catch(e) { + console.error('Error: the transaction failed') + if (e.message) { + console.error(e.message) + } + return + } + + console.log('Transaction hash:', tx1.hash) + console.log('Transaction hash:', tx2.hash) +} + +export { + vote, + configureSubparser, +} \ No newline at end of file diff --git a/core/UserState.ts b/core/UserState.ts index 270a872..d50a99a 100644 --- a/core/UserState.ts +++ b/core/UserState.ts @@ -285,8 +285,8 @@ class UserState { attestation.graffiti, attestation.overwriteGraffiti ) + return stateLeaves } - return stateLeaves } // If no matching state leaf, insert new one const newLeaf: IUserStateLeaf = { diff --git a/test/integration/Integration.ts b/test/integration/Integration.ts index 6c063f4..065768c 100644 --- a/test/integration/Integration.ts +++ b/test/integration/Integration.ts @@ -597,11 +597,16 @@ describe('Integration', function () { it('First user prove his reputation', async () => { const attesterId = attesters[0].id // Prove reputation received from first attester + const provePosRep = BigInt(1) + const proveNegRep = BigInt(1) + const proveRepDiff = BigInt(1) + const proveGraffiti = BigInt(1) const minPosRep = BigInt(1) const maxNegRep = BigInt(10) + const minRepDiff = BigInt(1) const graffitiPreImage = graffitiPreImageMap[0][attesterId.toString()] console.log(`Proving reputation from attester ${attesterId} with minPosRep ${minPosRep}, maxNegRep ${maxNegRep} and graffitiPreimage ${graffitiPreImage}`) - const circuitInputs = await users[0].genProveReputationCircuitInputs(attesterId, minPosRep, maxNegRep, graffitiPreImage) + const circuitInputs = await users[0].genProveReputationCircuitInputs(attesterId, provePosRep, proveNegRep, proveRepDiff, proveGraffiti, minPosRep, maxNegRep, minRepDiff, graffitiPreImage) const startTime = new Date().getTime() const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) const endTime = new Date().getTime() @@ -613,14 +618,22 @@ describe('Integration', function () { const GSTreeRoot = unirepState.genGSTree(currentEpoch.toNumber()).root const nullifierTree = await unirepState.genNullifierTree() const nullifierTreeRoot = nullifierTree.getRootHash() - const isProofValid = await unirepContract.verifyReputation( + const publicInput = [ users[0].latestTransitionedEpoch, GSTreeRoot, nullifierTreeRoot, attesterId, + provePosRep, + proveNegRep, + proveRepDiff, + proveGraffiti, + minRepDiff, minPosRep, maxNegRep, - graffitiPreImage, + graffitiPreImage + ] + const isProofValid = await unirepContract.verifyReputation( + publicInput, formatProofForVerifierContract(results['proof']), ) expect(isProofValid, 'Verify reputation on-chain failed').to.be.true From ae90ab0bad80c34a93007debc7f7c7b842e234a9 Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Fri, 5 Mar 2021 16:24:02 +0800 Subject: [PATCH 06/38] post and comment on smart contract --- cli/verifyEpochKeyProof.ts | 9 +-- cli/vote.ts | 2 +- contracts/Unirep.sol | 110 +++++++++++++++++++++++---------- contracts/UnirepParameters.sol | 1 + 4 files changed, 86 insertions(+), 36 deletions(-) diff --git a/cli/verifyEpochKeyProof.ts b/cli/verifyEpochKeyProof.ts index 78c1180..6d0ecea 100644 --- a/cli/verifyEpochKeyProof.ts +++ b/cli/verifyEpochKeyProof.ts @@ -99,6 +99,9 @@ const verifyEpochKeyProof = async (args: any) => { const epk = BigInt(add0x(args.epoch_key)) const decodedProof = base64url.decode(args.proof.slice(epkProofPrefix.length)) const proof = JSON.parse(decodedProof) + const publicSignals = [GSTRoot, currentEpoch, epk] + console.log(publicSignals) + console.log(proof) const unirepContract = new ethers.Contract( unirepAddress, @@ -106,10 +109,8 @@ const verifyEpochKeyProof = async (args: any) => { provider, ) const isProofValid = await unirepContract.verifyEpochKeyValidity( - GSTRoot, - currentEpoch, - epk, - proof, + publicSignals, + proof ) if (!isProofValid) { console.error('Error: invalid epoch key proof') diff --git a/cli/vote.ts b/cli/vote.ts index 2ffdebe..65c7b01 100644 --- a/cli/vote.ts +++ b/cli/vote.ts @@ -263,7 +263,7 @@ const vote = async (args: any) => { try { tx1 = await unirepContract.submitAttestation( attestation, - epk, + BigInt(add0x(epk)), { value: attestingFee, gasLimit: 1000000 } ) tx2 = await unirepContract.submitAttestation( diff --git a/contracts/Unirep.sol b/contracts/Unirep.sol index 984f952..4fd39d1 100644 --- a/contracts/Unirep.sol +++ b/contracts/Unirep.sol @@ -97,6 +97,18 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { uint256 _hashedLeaf ); + event PostSubmitted( + uint256 indexed _postId, + uint256 indexed _epochKey, + string _content, + ProofsRelated proof + ); + + event CommentSubmitted( + uint256 indexed _postId, + string _content + ); + event AttestationSubmitted( uint256 indexed _epoch, uint256 indexed _epochKey, @@ -225,6 +237,35 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { nextAttesterId ++; } + function publishPost(uint256 postId, uint256 epochKey, string calldata content, uint256[] calldata _publicSignals, uint256[8] calldata _proof) external { + ProofsRelated memory proof; + // Unpack the snark proof + ( + proof.publicSignals, + proof.a, + proof.b, + proof.c + ) = unpackProof(_publicSignals, _proof); + + // Verify the proof + proof.isValid = epkValidityVerifier.verifyProof(proof.a, proof.b, proof.c, proof.publicSignals); + require(proof.isValid); + + emit PostSubmitted( + postId, + epochKey, + content, + proof + ); + } + + function publishComment(uint256 postId, string calldata content) external { + emit CommentSubmitted( + postId, + content + ); + } + function submitAttestation(Attestation calldata attestation, uint256 epochKey) external payable { require(attesters[msg.sender] > 0, "Unirep: attester has not signed up yet"); require(attesters[msg.sender] == attestation.attesterId, "Unirep: mismatched attesterId"); @@ -332,41 +373,43 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { } function verifyEpochKeyValidity( - uint256 _globalStateTree, - uint256 _epoch, - uint256 _epochKey, - uint256[8] calldata _proof) external view returns (bool) { + // uint256 _globalStateTree, + // uint256 _epoch, + // uint256 _epochKey, + uint256[] memory _publicSignals, + uint256[8] memory _proof) public view returns (bool) { // Before attesting to a given epoch key, an attester must verify validity of the epoch key: // 1. user has signed up // 2. nonce is no greater than numEpochKeyNoncePerEpoch // 3. user has transitioned to the epoch(by proving membership in the globalStateTree of that epoch) // 4. epoch key is correctly computed - uint256[] memory publicSignals = new uint256[](3); - publicSignals[0] = _globalStateTree; - publicSignals[1] = _epoch; - publicSignals[2] = _epochKey; + // uint256[] memory _publicSignals = new uint256[](3); + // _publicSignals[0] = _globalStateTree; + // _publicSignals[1] = _epoch; + // _publicSignals[2] = _epochKey; // Ensure that each public input is within range of the snark scalar // field. // TODO: consider having more granular revert reasons - for (uint8 i = 0; i < publicSignals.length; i++) { + for (uint8 i = 0; i < _publicSignals.length; i++) { require( - publicSignals[i] < SNARK_SCALAR_FIELD, + _publicSignals[i] < SNARK_SCALAR_FIELD, "Unirep: each public signal must be lt the snark scalar field" ); } ProofsRelated memory proof; // Unpack the snark proof - ( + ( + proof.publicSignals, proof.a, proof.b, proof.c - ) = unpackProof(_proof); + ) = unpackProof(_publicSignals, _proof); // Verify the proof - proof.isValid = epkValidityVerifier.verifyProof(proof.a, proof.b, proof.c, publicSignals); + proof.isValid = epkValidityVerifier.verifyProof(proof.a, proof.b, proof.c, proof.publicSignals); return proof.isValid; } @@ -388,25 +431,25 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { require(_attestationNullifiers.length == numAttestationsPerEpoch, "Unirep: invalid number of nullifiers"); require(_epkNullifiers.length == numEpochKeyNoncePerEpoch, "Unirep: invalid number of epk nullifiers"); - uint256[] memory publicSignals = new uint256[](5 + numAttestationsPerEpoch + numEpochKeyNoncePerEpoch); - publicSignals[0] = _newGlobalStateTreeLeaf; + uint256[] memory _publicSignals = new uint256[](5 + numAttestationsPerEpoch + numEpochKeyNoncePerEpoch); + _publicSignals[0] = _newGlobalStateTreeLeaf; for (uint8 i = 0; i < numAttestationsPerEpoch; i++) { - publicSignals[i + 1] = _attestationNullifiers[i]; + _publicSignals[i + 1] = _attestationNullifiers[i]; } for (uint8 i = 0; i < numEpochKeyNoncePerEpoch; i++) { - publicSignals[i + 1 + numAttestationsPerEpoch] = _epkNullifiers[i]; + _publicSignals[i + 1 + numAttestationsPerEpoch] = _epkNullifiers[i]; } - publicSignals[2 + numAttestationsPerEpoch + numEpochKeyNoncePerEpoch - 1] = _transitionFromEpoch; - publicSignals[3 + numAttestationsPerEpoch + numEpochKeyNoncePerEpoch - 1] = _fromGlobalStateTree; - publicSignals[4 + numAttestationsPerEpoch + numEpochKeyNoncePerEpoch - 1] = _fromEpochTree; - publicSignals[5 + numAttestationsPerEpoch + numEpochKeyNoncePerEpoch - 1] = _fromNullifierTreeRoot; + _publicSignals[2 + numAttestationsPerEpoch + numEpochKeyNoncePerEpoch - 1] = _transitionFromEpoch; + _publicSignals[3 + numAttestationsPerEpoch + numEpochKeyNoncePerEpoch - 1] = _fromGlobalStateTree; + _publicSignals[4 + numAttestationsPerEpoch + numEpochKeyNoncePerEpoch - 1] = _fromEpochTree; + _publicSignals[5 + numAttestationsPerEpoch + numEpochKeyNoncePerEpoch - 1] = _fromNullifierTreeRoot; // Ensure that each public input is within range of the snark scalar // field. // TODO: consider having more granular revert reasons - for (uint8 i = 0; i < publicSignals.length; i++) { + for (uint8 i = 0; i < _publicSignals.length; i++) { require( - publicSignals[i] < SNARK_SCALAR_FIELD, + _publicSignals[i] < SNARK_SCALAR_FIELD, "Unirep: each public signal must be lt the snark scalar field" ); } @@ -414,19 +457,20 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { ProofsRelated memory proof; // Unpack the snark proof ( + proof.publicSignals, proof.a, proof.b, proof.c - ) = unpackProof(_proof); + ) = unpackProof(_publicSignals, _proof); // Verify the proof - proof.isValid = userStateTransitionVerifier.verifyProof(proof.a, proof.b, proof.c, publicSignals); + proof.isValid = userStateTransitionVerifier.verifyProof(proof.a, proof.b, proof.c, proof.publicSignals); return proof.isValid; } function verifyReputation( - uint256[] memory publicSignals, - uint256[8] memory _proof) public view returns (bool) { + uint256[] calldata _publicSignals, + uint256[8] calldata _proof) external view returns (bool) { // User prove his reputation by an attester: // 1. User exists in GST // 2. It is the latest state user transition to @@ -437,9 +481,9 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { // Ensure that each public input is within range of the snark scalar // field. // TODO: consider having more granular revert reasons - for (uint8 i = 0; i < publicSignals.length; i++) { + for (uint8 i = 0; i < _publicSignals.length; i++) { require( - publicSignals[i] < SNARK_SCALAR_FIELD, + _publicSignals[i] < SNARK_SCALAR_FIELD, "Unirep: each public signal must be lt the snark scalar field" ); } @@ -447,13 +491,14 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { ProofsRelated memory proof; // Unpack the snark proof ( + proof.publicSignals, proof.a, proof.b, proof.c - ) = unpackProof(_proof); + ) = unpackProof(_publicSignals, _proof); // Verify the proof - proof.isValid = reputationVerifier.verifyProof(proof.a, proof.b, proof.c, publicSignals); + proof.isValid = reputationVerifier.verifyProof(proof.a, proof.b, proof.c, proof.publicSignals); return proof.isValid; } @@ -470,14 +515,17 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { * and c array values that the zk-SNARK verifier's verifyProof accepts. */ function unpackProof( + uint256[] memory _publicSignals, uint256[8] memory _proof ) public pure returns ( + uint256[] memory, uint256[2] memory, uint256[2][2] memory, uint256[2] memory ) { return ( + _publicSignals, [_proof[0], _proof[1]], [ [_proof[2], _proof[3]], diff --git a/contracts/UnirepParameters.sol b/contracts/UnirepParameters.sol index df448b7..ec8adee 100644 --- a/contracts/UnirepParameters.sol +++ b/contracts/UnirepParameters.sol @@ -16,6 +16,7 @@ contract UnirepParameters { } struct ProofsRelated { + uint256[] publicSignals; uint256[2] a; uint256[2][2] b; uint256[2] c; From 00b6e442db0cc012b141cba33fc0994dd9b0a25b Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Mon, 8 Mar 2021 15:46:35 +0800 Subject: [PATCH 07/38] leaveComment, publishPost, listAllPost functions --- cli/defaults.ts | 2 + cli/index.ts | 32 +++++- cli/leaveComment.ts | 170 ++++++++++++++++++++++++++++++++ cli/listAllPosts.ts | 87 +++++++++++++++++ cli/publishPost.ts | 190 ++++++++++++++++++++++++++++++++++++ cli/test/testAllCommands.ts | 58 +++++++++++ contracts/Unirep.sol | 2 +- 7 files changed, 539 insertions(+), 2 deletions(-) create mode 100644 cli/leaveComment.ts create mode 100644 cli/listAllPosts.ts create mode 100644 cli/publishPost.ts diff --git a/cli/defaults.ts b/cli/defaults.ts index 1337ac5..1fe81a4 100644 --- a/cli/defaults.ts +++ b/cli/defaults.ts @@ -7,6 +7,7 @@ const DEFAULT_NUM_ATTESTATIONS_PER_EPOCH_KEY = numAttestationsPerEpochKey const DEFAULT_EPOCH_LENGTH = epochLength const DEFAULT_ATTESTING_FEE = attestingFee const DEFAULT_TREE_DEPTHS_CONFIG = 'circuit' +const DEFAULT_MAX_POST_ID = 2**10 export { DEFAULT_ETH_PROVIDER, @@ -16,4 +17,5 @@ export { DEFAULT_EPOCH_LENGTH, DEFAULT_ATTESTING_FEE, DEFAULT_TREE_DEPTHS_CONFIG, + DEFAULT_MAX_POST_ID } \ No newline at end of file diff --git a/cli/index.ts b/cli/index.ts index 2c3fff4..e9116a4 100644 --- a/cli/index.ts +++ b/cli/index.ts @@ -32,6 +32,21 @@ import { configureSubparser as configureSubparserForVerifyEpochKeyProof, } from './verifyEpochKeyProof' +import { + publishPost, + configureSubparser as configureSubparserForPublishPost, +} from './publishPost' + +import { + listAllPosts, + configureSubparser as configureSubparserForListAllPosts, +} from './listAllPosts' + +import { + leaveComment, + configureSubparser as configureSubparserForleaveComment, +} from './leaveComment' + import { attest, configureSubparser as configureSubparserForAttest, @@ -91,10 +106,19 @@ const main = async () => { // Subcommand: verifyEpochKeyProof configureSubparserForVerifyEpochKeyProof(subparsers) + // Subcommand: publishPost + configureSubparserForPublishPost(subparsers) + + // Subcommand: listAllPosts + configureSubparserForListAllPosts(subparsers) + + // Subcommand: leaveComment + configureSubparserForleaveComment(subparsers) + // Subcommand: attest configureSubparserForAttest(subparsers) - // Subcommand: upvote + // Subcommand: vote configureSubparserForvote(subparsers) // Subcommand: epochTransition @@ -124,6 +148,12 @@ const main = async () => { await genEpochKeyAndProof(args) } else if (args.subcommand === 'verifyEpochKeyProof') { await verifyEpochKeyProof(args) + } else if (args.subcommand === 'publishPost') { + await publishPost(args) + } else if (args.subcommand === 'listAllPosts') { + await listAllPosts(args) + } else if (args.subcommand === 'leaveComment') { + await leaveComment(args) } else if (args.subcommand === 'attest') { await attest(args) } else if (args.subcommand === 'vote') { diff --git a/cli/leaveComment.ts b/cli/leaveComment.ts new file mode 100644 index 0000000..353b3d2 --- /dev/null +++ b/cli/leaveComment.ts @@ -0,0 +1,170 @@ +import base64url from 'base64url' +import { ethers as hardhatEthers } from 'hardhat' +import { ethers } from 'ethers' + +import { + promptPwd, + validateEthSk, + validateEthAddress, + checkDeployerProviderConnection, + contractExists, +} from './utils' + +import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK, DEFAULT_MAX_POST_ID } from './defaults' + +import { add0x } from '../crypto/SMT' +import { genUnirepStateFromContract } from '../core' + +import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" +import { epkProofPrefix } from './prefix' + +const configureSubparser = (subparsers: any) => { + const parser = subparsers.addParser( + 'leaveComment', + { addHelp: true }, + ) + + parser.addArgument( + ['-e', '--eth-provider'], + { + action: 'store', + type: 'string', + help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, + } + ) + + parser.addArgument( + ['-tx', '--text'], + { + required: true, + type: 'string', + help: 'The text written in the post', + } + ) + + parser.addArgument( + ['-pid', '--post-id'], + { + required: true, + type: 'string', + help: 'The post id where the comment replies to (in decimal representation)', + } + ) + + // verify identity + // parser.addArgument( + // ['-c', '--identity-commitment'], + // { + // required: true, + // type: 'string', + // help: 'The user\'s identity commitment (in hex representation)', + // } + // ) + + parser.addArgument( + ['-x', '--contract'], + { + required: true, + type: 'string', + help: 'The Unirep contract address', + } + ) + + const privkeyGroup = parser.addMutuallyExclusiveGroup({ required: true }) + + privkeyGroup.addArgument( + ['-dp', '--prompt-for-eth-privkey'], + { + action: 'storeTrue', + help: 'Whether to prompt for the user\'s Ethereum private key and ignore -d / --eth-privkey', + } + ) + + privkeyGroup.addArgument( + ['-d', '--eth-privkey'], + { + action: 'store', + type: 'string', + help: 'The deployer\'s Ethereum private key', + } + ) +} + +const leaveComment = async (args: any) => { + + // Unirep contract + if (!validateEthAddress(args.contract)) { + console.error('Error: invalid Unirep contract address') + return + } + + const unirepAddress = args.contract + + // Ethereum provider + const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER + + let ethSk + // The deployer's Ethereum private key + // The user may either enter it as a command-line option or via the + // standard input + if (args.prompt_for_eth_privkey) { + ethSk = await promptPwd('Your Ethereum private key') + } else { + ethSk = args.eth_privkey + } + + if (!validateEthSk(ethSk)) { + console.error('Error: invalid Ethereum private key') + return + } + + if (! (await checkDeployerProviderConnection(ethSk, ethProvider))) { + console.error('Error: unable to connect to the Ethereum provider at', ethProvider) + return + } + + const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) + const wallet = new ethers.Wallet(ethSk, provider) + + if (! await contractExists(provider, unirepAddress)) { + console.error('Error: there is no contract deployed at the specified address') + return + } + + const startBlock = (args.start_block) ? args.start_block : DEFAULT_START_BLOCK + const unirepState = await genUnirepStateFromContract( + provider, + unirepAddress, + startBlock, + ) + + const unirepContract = new ethers.Contract( + unirepAddress, + Unirep.abi, + wallet, + ) + + let tx + try { + tx = await unirepContract.leaveComment( + BigInt(args.post_id), + args.text, + { gasLimit: 1000000 } + ) + + } catch(e) { + console.error('Error: the transaction failed') + if (e.message) { + console.error(e.message) + } + return + } + + const receipt = await tx.wait() + console.log('Transaction hash:', tx.hash) +} + +export { + leaveComment, + configureSubparser, +} \ No newline at end of file diff --git a/cli/listAllPosts.ts b/cli/listAllPosts.ts new file mode 100644 index 0000000..607dc0f --- /dev/null +++ b/cli/listAllPosts.ts @@ -0,0 +1,87 @@ +import base64url from 'base64url' +import { ethers as hardhatEthers } from 'hardhat' +import { ethers } from 'ethers' + +import { + validateEthAddress, + contractExists, +} from './utils' + +import { DEFAULT_ETH_PROVIDER } from './defaults' + +import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" + +const configureSubparser = (subparsers: any) => { + const parser = subparsers.addParser( + 'listAllPosts', + { addHelp: true }, + ) + + parser.addArgument( + ['-e', '--eth-provider'], + { + action: 'store', + type: 'string', + help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, + } + ) + + parser.addArgument( + ['-x', '--contract'], + { + required: true, + type: 'string', + help: 'The Unirep contract address', + } + ) +} + +const listAllPosts = async (args: any) => { + + // Unirep contract + if (!validateEthAddress(args.contract)) { + console.error('Error: invalid Unirep contract address') + return + } + + const unirepAddress = args.contract + + // Ethereum provider + const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER + + const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) + + if (! await contractExists(provider, unirepAddress)) { + console.error('Error: there is no contract deployed at the specified address') + return + } + + const unirepContract = new ethers.Contract( + unirepAddress, + Unirep.abi, + provider + ) + + let postEvents + try { + const postFilter = unirepContract.filters.PostSubmitted() + postEvents = await unirepContract.queryFilter(postFilter) + } catch(e) { + console.error('Error: the transaction failed') + if (e.message) { + console.error(e.message) + } + return + } + + for (let i = 0; i < postEvents.length; i++) { + console.log('Post ', postEvents[i].args._postId.toString()) + console.log('Epoch key ', postEvents[i].args._epochKey.toString()) + console.log('Content ', postEvents[i].args._content) + } +} + +export { + listAllPosts, + configureSubparser, +} \ No newline at end of file diff --git a/cli/publishPost.ts b/cli/publishPost.ts new file mode 100644 index 0000000..fd4b9b6 --- /dev/null +++ b/cli/publishPost.ts @@ -0,0 +1,190 @@ +import base64url from 'base64url' +import { ethers as hardhatEthers } from 'hardhat' +import { ethers } from 'ethers' + +import { + promptPwd, + validateEthSk, + validateEthAddress, + checkDeployerProviderConnection, + contractExists, +} from './utils' + +import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK, DEFAULT_MAX_POST_ID } from './defaults' + +import { add0x } from '../crypto/SMT' +import { genUnirepStateFromContract } from '../core' + +import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" +import { epkProofPrefix } from './prefix' + +const configureSubparser = (subparsers: any) => { + const parser = subparsers.addParser( + 'publishPost', + { addHelp: true }, + ) + + parser.addArgument( + ['-e', '--eth-provider'], + { + action: 'store', + type: 'string', + help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, + } + ) + + parser.addArgument( + ['-tx', '--text'], + { + required: true, + type: 'string', + help: 'The text written in the post', + } + ) + + parser.addArgument( + ['-epk', '--epoch-key'], + { + required: true, + type: 'string', + help: 'The user\'s epoch key to attest to (in hex representation)', + } + ) + + parser.addArgument( + ['-pf', '--proof'], + { + required: true, + type: 'string', + help: 'The snark proof of the user\'s epoch key ', + } + ) + + // verify identity + // parser.addArgument( + // ['-c', '--identity-commitment'], + // { + // required: true, + // type: 'string', + // help: 'The user\'s identity commitment (in hex representation)', + // } + // ) + + parser.addArgument( + ['-x', '--contract'], + { + required: true, + type: 'string', + help: 'The Unirep contract address', + } + ) + + const privkeyGroup = parser.addMutuallyExclusiveGroup({ required: true }) + + privkeyGroup.addArgument( + ['-dp', '--prompt-for-eth-privkey'], + { + action: 'storeTrue', + help: 'Whether to prompt for the user\'s Ethereum private key and ignore -d / --eth-privkey', + } + ) + + privkeyGroup.addArgument( + ['-d', '--eth-privkey'], + { + action: 'store', + type: 'string', + help: 'The deployer\'s Ethereum private key', + } + ) +} + +const publishPost = async (args: any) => { + + // Unirep contract + if (!validateEthAddress(args.contract)) { + console.error('Error: invalid Unirep contract address') + return + } + + const unirepAddress = args.contract + + // Ethereum provider + const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER + + let ethSk + // The deployer's Ethereum private key + // The user may either enter it as a command-line option or via the + // standard input + if (args.prompt_for_eth_privkey) { + ethSk = await promptPwd('Your Ethereum private key') + } else { + ethSk = args.eth_privkey + } + + if (!validateEthSk(ethSk)) { + console.error('Error: invalid Ethereum private key') + return + } + + if (! (await checkDeployerProviderConnection(ethSk, ethProvider))) { + console.error('Error: unable to connect to the Ethereum provider at', ethProvider) + return + } + + const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) + const wallet = new ethers.Wallet(ethSk, provider) + + if (! await contractExists(provider, unirepAddress)) { + console.error('Error: there is no contract deployed at the specified address') + return + } + + const startBlock = (args.start_block) ? args.start_block : DEFAULT_START_BLOCK + const unirepState = await genUnirepStateFromContract( + provider, + unirepAddress, + startBlock, + ) + + const postId = BigInt(Math.floor(Math.random() * (DEFAULT_MAX_POST_ID) )) + const currentEpoch = unirepState.currentEpoch + const GSTRoot = unirepState.genGSTree(currentEpoch).root + const epk = BigInt(add0x(args.epoch_key)) + const decodedProof = base64url.decode(args.proof.slice(epkProofPrefix.length)) + const proof = JSON.parse(decodedProof) + const publicSignals = [GSTRoot, currentEpoch, epk] + + const unirepContract = new ethers.Contract( + unirepAddress, + Unirep.abi, + wallet, + ) + + let tx + try { + tx = await unirepContract.publishPost( + postId, + epk, + args.text, + publicSignals, + proof, + { gasLimit: 1000000 } + ) + + } catch(e) { + console.error('Error: the transaction failed') + if (e.message) { + console.error(e.message) + } + return + } + + console.log('Post ID:', postId.toString()) + console.log('Transaction hash:', tx.hash) +} + +export { + publishPost, + configureSubparser, +} \ No newline at end of file diff --git a/cli/test/testAllCommands.ts b/cli/test/testAllCommands.ts index 96f49c9..86bcd23 100644 --- a/cli/test/testAllCommands.ts +++ b/cli/test/testAllCommands.ts @@ -23,6 +23,7 @@ describe('test all CLI subcommands', function() { let attesterAddr let userPrivKey let userAddr + let postID const startBlock = 0 const attestingFee = ethers.BigNumber.from(10).pow(18) @@ -34,6 +35,8 @@ describe('test all CLI subcommands', function() { let userIdentity1, userIdentityCommitment1, userIdentity2, userIdentityCommitment2 const attesterId = 1 let epk, epkProof + const text = "postText" + const text2 = "commentText" const posRep = 10, negRep = 8, graffitiPreimage = 0, graffiti = hashOne(BigInt(graffitiPreimage)) const minPosRep = 0, maxNegRep = 10, minRepDiff = 1 let userRepProof @@ -217,6 +220,61 @@ describe('test all CLI subcommands', function() { }) }) + describe('publishPost CLI subcommand', () => { + it('should publish a post', async () => { + const command = `npx ts-node cli/index.ts publishPost` + + ` -x ${unirepContract.address} ` + + ` -epk ${epk} ` + + ` -pf ${epkProof} ` + + ` -tx ${text}` + + ` -d ${userPrivKey}` + + const output = exec(command).stdout.trim() + + console.log(command) + console.log(output) + + const idRegMatch = output.match(/Post ID: ([0-9]+)/) + postID = idRegMatch[1] + console.log('regmatch', postID) + const postRegMatch = output.match(/Transaction hash: 0x[a-fA-F0-9]{64}/) + expect(postRegMatch).not.equal(null) + }) + }) + + describe('listAllPosts CLI subcommand', () => { + it('should list all posts', async () => { + const command = `npx ts-node cli/index.ts listAllPosts` + + ` -x ${unirepContract.address} ` + + const output = exec(command).stdout.trim() + + console.log(command) + console.log(output) + + const postRegMatch = output.match(/Post/) + expect(postRegMatch).not.equal(null) + }) + }) + + describe('leaveComment CLI subcommand', () => { + it('should leave a comment', async () => { + const command = `npx ts-node cli/index.ts leaveComment` + + ` -x ${unirepContract.address} ` + + ` -pid ${postID} ` + + ` -tx ${text2}` + + ` -d ${userPrivKey}` + + const output = exec(command).stdout.trim() + + console.log(command) + console.log(output) + + const commentRegMatch = output.match(/Transaction hash: 0x[a-fA-F0-9]{64}/) + expect(commentRegMatch).not.equal(null) + }) + }) + describe('upvote CLI subcommand', () => { it('should upvote to user', async () => { const command = `npx ts-node cli/index.ts vote` + diff --git a/contracts/Unirep.sol b/contracts/Unirep.sol index 4fd39d1..50f643c 100644 --- a/contracts/Unirep.sol +++ b/contracts/Unirep.sol @@ -259,7 +259,7 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { ); } - function publishComment(uint256 postId, string calldata content) external { + function leaveComment(uint256 postId, string calldata content) external { emit CommentSubmitted( postId, content From ade2c63649f4628b03b8c18596ba9f53ce92dbd2 Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Mon, 15 Mar 2021 15:31:29 +0800 Subject: [PATCH 08/38] mongoose: post --- cli/publishPost.ts | 18 +- config/database.ts | 5 + database/connect.ts | 25 + database/models/post.ts | 16 + package-lock.json | 2356 +++++++++++++++++++++------------------ package.json | 3 +- 6 files changed, 1352 insertions(+), 1071 deletions(-) create mode 100644 config/database.ts create mode 100644 database/connect.ts create mode 100644 database/models/post.ts diff --git a/cli/publishPost.ts b/cli/publishPost.ts index fd4b9b6..e4a9427 100644 --- a/cli/publishPost.ts +++ b/cli/publishPost.ts @@ -11,6 +11,7 @@ import { } from './utils' import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK, DEFAULT_MAX_POST_ID } from './defaults' +import { dbUri } from '../config/database'; import { add0x } from '../crypto/SMT' import { genUnirepStateFromContract } from '../core' @@ -18,6 +19,9 @@ import { genUnirepStateFromContract } from '../core' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import { epkProofPrefix } from './prefix' +import Post, { IPost } from "../database/models/post"; +import mongoose from 'mongoose' + const configureSubparser = (subparsers: any) => { const parser = subparsers.addParser( 'publishPost', @@ -154,6 +158,14 @@ const publishPost = async (args: any) => { const decodedProof = base64url.decode(args.proof.slice(epkProofPrefix.length)) const proof = JSON.parse(decodedProof) const publicSignals = [GSTRoot, currentEpoch, epk] + + const db = await mongoose.connect(dbUri) + + const newpost: IPost = new Post({ + content: args.text, + epochKey: args.epoch_key, + epkProof: args.proof + }); const unirepContract = new ethers.Contract( unirepAddress, @@ -164,13 +176,14 @@ const publishPost = async (args: any) => { let tx try { tx = await unirepContract.publishPost( - postId, + BigInt(add0x(newpost._id.toString())), epk, args.text, publicSignals, proof, { gasLimit: 1000000 } ) + const res: IPost = await newpost.save() } catch(e) { console.error('Error: the transaction failed') @@ -179,7 +192,8 @@ const publishPost = async (args: any) => { } return } - + + db.disconnect(); console.log('Post ID:', postId.toString()) console.log('Transaction hash:', tx.hash) } diff --git a/config/database.ts b/config/database.ts new file mode 100644 index 0000000..4c4469b --- /dev/null +++ b/config/database.ts @@ -0,0 +1,5 @@ +const dbUri = 'mongodb://127.0.0.1:27017/test' + +export { + dbUri +} \ No newline at end of file diff --git a/database/connect.ts b/database/connect.ts new file mode 100644 index 0000000..6e76bcd --- /dev/null +++ b/database/connect.ts @@ -0,0 +1,25 @@ +import mongoose from "mongoose"; + +type TInput = { + db: string; +} +export default ({db}: TInput) => { + + const connect = () => { + mongoose + .connect( + db, + { useNewUrlParser: true } + ) + .then(() => { + return console.info(`Successfully connected to ${db}`); + }) + .catch(error => { + console.error('Error connecting to database: ', error); + return process.exit(1); + }); + }; + connect(); + + mongoose.connection.on('disconnected', connect); +}; \ No newline at end of file diff --git a/database/models/post.ts b/database/models/post.ts new file mode 100644 index 0000000..b54904d --- /dev/null +++ b/database/models/post.ts @@ -0,0 +1,16 @@ +import * as mongoose from 'mongoose'; +import { Schema, Document } from 'mongoose'; + +export interface IPost extends Document { + content: string + epochKey: string + epkProof: string + } + + const PostSchema: Schema = new Schema({ + content: { type: String }, + epochKey: { type: String, required: true }, + epkProof: { type: String, required: true } + }); + + export default mongoose.model('Post', PostSchema); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 54c34d9..d5793e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -224,19 +224,22 @@ } }, "@ethereum-waffle/compiler": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@ethereum-waffle/compiler/-/compiler-3.0.1.tgz", - "integrity": "sha512-jCn2KWO05ScuXRIfEgCw/Ck2fPM/jSpq7+8juwKqwmzzR8DuGeCl/5b3cIA1XkGPBRnMtVugRubEorFznAynuw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@ethereum-waffle/compiler/-/compiler-3.3.0.tgz", + "integrity": "sha512-q5Nd0vlLeEYKszdJUNvIIuP2vj/tFkWt1LCvsIcFHIzxyIoLeaCFNzJI0UQ/s298svfPY59SyL7dKNcQWwbaWQ==", "dev": true, "requires": { "@resolver-engine/imports": "^0.3.3", "@resolver-engine/imports-fs": "^0.3.3", + "@typechain/ethers-v5": "^2.0.0", "@types/mkdirp": "^0.5.2", "@types/node-fetch": "^2.5.5", "ethers": "^5.0.1", "mkdirp": "^0.5.1", "node-fetch": "^2.6.0", - "solc": "^0.6.3" + "solc": "^0.6.3", + "ts-generator": "^0.1.1", + "typechain": "^3.0.0" } }, "@ethereum-waffle/ens": { @@ -251,9 +254,9 @@ } }, "@ethereum-waffle/mock-contract": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@ethereum-waffle/mock-contract/-/mock-contract-3.0.1.tgz", - "integrity": "sha512-rtdq/N6gM75KE+u3K9+N+NFtk1hy39SSoNjmJmr3PwJmWmXhJnOEDdU5N567ViRBdMNiQNnZfdKtu/b1pbL5JA==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@ethereum-waffle/mock-contract/-/mock-contract-3.2.2.tgz", + "integrity": "sha512-H60Cc5C7sYNU4LuPMSKDh8YIaN9/fkwEjznY78CEbOosO+lMlFYdA+5VZjeDGDuYKfsBqsocQdkj1CRyoi1KNw==", "dev": true, "requires": { "@ethersproject/abi": "^5.0.1", @@ -291,159 +294,93 @@ } }, "@ethersproject/abstract-provider": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.0.5.tgz", - "integrity": "sha512-i/CjElAkzV7vQBAeoz+IpjGfcFYEP9eD7j3fzZ0fzTq03DO7PPnR+xkEZ1IoDXGwDS+55aLM1xvLDwB/Lx6IOQ==", - "requires": { - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/networks": "^5.0.3", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/transactions": "^5.0.5", - "@ethersproject/web": "^5.0.6" + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.0.10.tgz", + "integrity": "sha512-OSReY5iz94iIaPlRvLiJP8YVIvQLx4aUvMMnHWSaA/vTU8QHZmgNlt4OBdYV1+aFY8Xl+VRYiWBHq72ZDKXXCQ==", + "requires": { + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/networks": "^5.0.7", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/transactions": "^5.0.9", + "@ethersproject/web": "^5.0.12" }, "dependencies": { - "@ethersproject/address": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.5.tgz", - "integrity": "sha512-DpkQ6rwk9jTefrRsJzEm6nhRiJd9pvhn1xN0rw5N/jswXG5r7BLk/GVA0mMAVWAsYfvi2xSc5L41FMox43RYEA==", - "requires": { - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/rlp": "^5.0.3", - "bn.js": "^4.4.0" - } - }, "@ethersproject/bignumber": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.8.tgz", - "integrity": "sha512-KXFVAFKS1jdTXYN8BE5Oj+ZfPMh28iRdFeNGBVT6cUFdtiPVqeXqc0ggvBqA3A1VoFFGgM7oAeaagA393aORHA==", + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.15.tgz", + "integrity": "sha512-MTADqnyacvdRwtKh7o9ujwNDSM1SDJjYDMYAzjIgjoi9rh6TY4suMbhCa3i2vh3SUXiXSICyTI8ui+NPdrZ9Lw==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", "bn.js": "^4.4.0" } }, "@ethersproject/bytes": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.5.tgz", - "integrity": "sha512-IEj9HpZB+ACS6cZ+QQMTqmu/cnUK2fYNE6ms/PVxjoBjoxc6HCraLpam1KuRvreMy0i523PLmjN8OYeikRdcUQ==", - "requires": { - "@ethersproject/logger": "^5.0.5" - } - }, - "@ethersproject/constants": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.5.tgz", - "integrity": "sha512-foaQVmxp2+ik9FrLUCtVrLZCj4M3Ibgkqvh+Xw/vFRSerkjVSYePApaVE5essxhoSlF1U9oXfWY09QI2AXtgKA==", - "requires": { - "@ethersproject/bignumber": "^5.0.7" - } - }, - "@ethersproject/keccak256": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.4.tgz", - "integrity": "sha512-GNpiOUm9PGUxFNqOxYKDQBM0u68bG9XC9iOulEQ8I0tOx/4qUpgVzvgXL6ugxr0RY554Gz/NQsVqknqPzUcxpQ==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.11.tgz", + "integrity": "sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "js-sha3": "0.5.7" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/logger": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.6.tgz", - "integrity": "sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==" + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.10.tgz", + "integrity": "sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw==" }, "@ethersproject/properties": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.4.tgz", - "integrity": "sha512-UdyX3GqBxFt15B0uSESdDNmhvEbK3ACdDXl2soshoPcneXuTswHDeA0LoPlnaZzhbgk4p6jqb4GMms5C26Qu6A==", - "requires": { - "@ethersproject/logger": "^5.0.5" - } - }, - "@ethersproject/rlp": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.4.tgz", - "integrity": "sha512-5qrrZad7VTjofxSsm7Zg/7Dr4ZOln4S2CqiDdOuTv6MBKnXj0CiBojXyuDy52M8O3wxH0CyE924hXWTDV1PQWQ==", - "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5" - } - }, - "@ethersproject/signing-key": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.5.tgz", - "integrity": "sha512-Z1wY7JC1HVO4CvQWY2TyTTuAr8xK3bJijZw1a9G92JEmKdv1j255R/0YLBBcFTl2J65LUjtXynNJ2GbArPGi5g==", - "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "elliptic": "6.5.3" - } - }, - "@ethersproject/transactions": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.6.tgz", - "integrity": "sha512-htsFhOD+NMBxx676A8ehSuwVV49iqpSB+CkjPZ02tpNew0K6p8g0CZ46Z1ZP946gIHAU80xQ0NACHYrjIUaCFA==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.9.tgz", + "integrity": "sha512-ZCjzbHYTw+rF1Pn8FDCEmx3gQttwIHcm/6Xee8g/M3Ga3SfW4tccNMbs5zqnBH0E4RoOPaeNgyg1O68TaF0tlg==", "requires": { - "@ethersproject/address": "^5.0.4", - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/rlp": "^5.0.3", - "@ethersproject/signing-key": "^5.0.4" + "@ethersproject/logger": "^5.0.8" } } } }, "@ethersproject/abstract-signer": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.0.7.tgz", - "integrity": "sha512-8W8gy/QutEL60EoMEpvxZ8MFAEWs/JvH5nmZ6xeLXoZvmBCasGmxqHdYjo2cxg0nevkPkq9SeenSsBBZSCx+SQ==", - "requires": { - "@ethersproject/abstract-provider": "^5.0.4", - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3" + "version": "5.0.14", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.0.14.tgz", + "integrity": "sha512-JztBwVO7o5OHLh2vyjordlS4/1EjRyaECtc8vPdXTF1i4dXN+J0coeRoPN6ZFbBvi/YbaB6br2fvqhst1VQD/g==", + "requires": { + "@ethersproject/abstract-provider": "^5.0.8", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7" }, "dependencies": { "@ethersproject/bignumber": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.8.tgz", - "integrity": "sha512-KXFVAFKS1jdTXYN8BE5Oj+ZfPMh28iRdFeNGBVT6cUFdtiPVqeXqc0ggvBqA3A1VoFFGgM7oAeaagA393aORHA==", + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.15.tgz", + "integrity": "sha512-MTADqnyacvdRwtKh7o9ujwNDSM1SDJjYDMYAzjIgjoi9rh6TY4suMbhCa3i2vh3SUXiXSICyTI8ui+NPdrZ9Lw==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", "bn.js": "^4.4.0" } }, "@ethersproject/bytes": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.5.tgz", - "integrity": "sha512-IEj9HpZB+ACS6cZ+QQMTqmu/cnUK2fYNE6ms/PVxjoBjoxc6HCraLpam1KuRvreMy0i523PLmjN8OYeikRdcUQ==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.11.tgz", + "integrity": "sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/logger": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.6.tgz", - "integrity": "sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==" + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.10.tgz", + "integrity": "sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw==" }, "@ethersproject/properties": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.4.tgz", - "integrity": "sha512-UdyX3GqBxFt15B0uSESdDNmhvEbK3ACdDXl2soshoPcneXuTswHDeA0LoPlnaZzhbgk4p6jqb4GMms5C26Qu6A==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.9.tgz", + "integrity": "sha512-ZCjzbHYTw+rF1Pn8FDCEmx3gQttwIHcm/6Xee8g/M3Ga3SfW4tccNMbs5zqnBH0E4RoOPaeNgyg1O68TaF0tlg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } } } @@ -462,56 +399,56 @@ } }, "@ethersproject/base64": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.0.4.tgz", - "integrity": "sha512-4KRykQ7BQMeOXfvio1YITwHjxwBzh92UoXIdzxDE1p53CK28bbHPdsPNYo0wl0El7lJAMpT2SOdL0hhbWRnyIA==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.0.9.tgz", + "integrity": "sha512-37RBz5LEZ9SlTNGiWCYFttnIN9J7qVs9Xo2EbqGqDH5LfW9EIji66S+YDMpXVo1zWDax1FkEldAoatxHK2gfgA==", "requires": { - "@ethersproject/bytes": "^5.0.4" + "@ethersproject/bytes": "^5.0.9" }, "dependencies": { "@ethersproject/bytes": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.5.tgz", - "integrity": "sha512-IEj9HpZB+ACS6cZ+QQMTqmu/cnUK2fYNE6ms/PVxjoBjoxc6HCraLpam1KuRvreMy0i523PLmjN8OYeikRdcUQ==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.11.tgz", + "integrity": "sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/logger": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.6.tgz", - "integrity": "sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==" + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.10.tgz", + "integrity": "sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw==" } } }, "@ethersproject/basex": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.0.4.tgz", - "integrity": "sha512-ixIr/kKiAoSzOnSc777AGIOAhKai5Ivqr4HO/Gz+YG+xkfv6kqD6AW4ga9vM20Wwb0QBhh3LoRWTu4V1K+x9Ew==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.0.9.tgz", + "integrity": "sha512-FANswl1IN3PS0eltQxH2aM2+utPrkLUVG4XVFi6SafRG9EpAqXCgycxC8PU90mPGhigYTpg9cnTB5mCZ6ejQjw==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/properties": "^5.0.3" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/properties": "^5.0.7" }, "dependencies": { "@ethersproject/bytes": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.5.tgz", - "integrity": "sha512-IEj9HpZB+ACS6cZ+QQMTqmu/cnUK2fYNE6ms/PVxjoBjoxc6HCraLpam1KuRvreMy0i523PLmjN8OYeikRdcUQ==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.11.tgz", + "integrity": "sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/logger": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.6.tgz", - "integrity": "sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==" + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.10.tgz", + "integrity": "sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw==" }, "@ethersproject/properties": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.4.tgz", - "integrity": "sha512-UdyX3GqBxFt15B0uSESdDNmhvEbK3ACdDXl2soshoPcneXuTswHDeA0LoPlnaZzhbgk4p6jqb4GMms5C26Qu6A==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.9.tgz", + "integrity": "sha512-ZCjzbHYTw+rF1Pn8FDCEmx3gQttwIHcm/6Xee8g/M3Ga3SfW4tccNMbs5zqnBH0E4RoOPaeNgyg1O68TaF0tlg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } } } @@ -544,130 +481,129 @@ } }, "@ethersproject/contracts": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.0.5.tgz", - "integrity": "sha512-tFI255lFbmbqMkgnuyhDWHl3yWqttPlReplYuVvDCT/SuvBjLR4ad2uipBlh1fh5X1ipK9ettAoV4S0HKim4Kw==", - "requires": { - "@ethersproject/abi": "^5.0.5", - "@ethersproject/abstract-provider": "^5.0.4", - "@ethersproject/abstract-signer": "^5.0.4", - "@ethersproject/address": "^5.0.4", - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3" + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.0.12.tgz", + "integrity": "sha512-srijy31idjz8bE+gL1I6IRj2H4I9dUwfQ+QroLrIgNdGArqY8y2iFUKa3QTy+JBX26fJsdYiCQi1kKkaNpnMpQ==", + "requires": { + "@ethersproject/abi": "^5.0.10", + "@ethersproject/abstract-provider": "^5.0.8", + "@ethersproject/abstract-signer": "^5.0.10", + "@ethersproject/address": "^5.0.9", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7" }, "dependencies": { "@ethersproject/abi": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.7.tgz", - "integrity": "sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw==", + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.13.tgz", + "integrity": "sha512-2coOH3D7ra1lwamKEH0HVc+Jbcsw5yfeCgmY8ekhCDualEiyyovD2qDcMBBcY3+kjoLHVTmo7ost6MNClxdOrg==", "requires": { - "@ethersproject/address": "^5.0.4", - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/hash": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/strings": "^5.0.4" + "@ethersproject/address": "^5.0.9", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/hash": "^5.0.10", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/strings": "^5.0.8" } }, "@ethersproject/address": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.5.tgz", - "integrity": "sha512-DpkQ6rwk9jTefrRsJzEm6nhRiJd9pvhn1xN0rw5N/jswXG5r7BLk/GVA0mMAVWAsYfvi2xSc5L41FMox43RYEA==", - "requires": { - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/rlp": "^5.0.3", - "bn.js": "^4.4.0" + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.11.tgz", + "integrity": "sha512-Et4GBdD8/tsBGjCEOKee9upN29qjL5kbRcmJifb4Penmiuh9GARXL2/xpXvEp5EW+EIW/rfCHFJrkYBgoQFQBw==", + "requires": { + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/rlp": "^5.0.7" } }, "@ethersproject/bignumber": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.8.tgz", - "integrity": "sha512-KXFVAFKS1jdTXYN8BE5Oj+ZfPMh28iRdFeNGBVT6cUFdtiPVqeXqc0ggvBqA3A1VoFFGgM7oAeaagA393aORHA==", + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.15.tgz", + "integrity": "sha512-MTADqnyacvdRwtKh7o9ujwNDSM1SDJjYDMYAzjIgjoi9rh6TY4suMbhCa3i2vh3SUXiXSICyTI8ui+NPdrZ9Lw==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", "bn.js": "^4.4.0" } }, "@ethersproject/bytes": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.5.tgz", - "integrity": "sha512-IEj9HpZB+ACS6cZ+QQMTqmu/cnUK2fYNE6ms/PVxjoBjoxc6HCraLpam1KuRvreMy0i523PLmjN8OYeikRdcUQ==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.11.tgz", + "integrity": "sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/constants": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.5.tgz", - "integrity": "sha512-foaQVmxp2+ik9FrLUCtVrLZCj4M3Ibgkqvh+Xw/vFRSerkjVSYePApaVE5essxhoSlF1U9oXfWY09QI2AXtgKA==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.10.tgz", + "integrity": "sha512-OSo8jxkHLDXieCy8bgOFR7lMfgPxEzKvSDdP+WAWHCDM8+orwch0B6wzkTmiQFgryAtIctrBt5glAdJikZ3hGw==", "requires": { - "@ethersproject/bignumber": "^5.0.7" + "@ethersproject/bignumber": "^5.0.13" } }, "@ethersproject/hash": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.6.tgz", - "integrity": "sha512-Gvh57v6BWhwnud6l7tMfQm32PRQ2DYx2WaAAQmAxAfYvmzUkpQCBstnGeNMXIL8/2wdkvcB2u+WZRWaZtsFuUQ==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.12.tgz", + "integrity": "sha512-kn4QN+fhNFbUgX3XZTZUaQixi0oyfIEY+hfW+KtkHu+rq7dV76oAIvaLEEynu1/4npOL38E4X4YI42gGZk+C0Q==", "requires": { - "@ethersproject/abstract-signer": "^5.0.6", - "@ethersproject/address": "^5.0.5", - "@ethersproject/bignumber": "^5.0.8", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.4", - "@ethersproject/strings": "^5.0.4" + "@ethersproject/abstract-signer": "^5.0.10", + "@ethersproject/address": "^5.0.9", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/strings": "^5.0.8" } }, "@ethersproject/keccak256": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.4.tgz", - "integrity": "sha512-GNpiOUm9PGUxFNqOxYKDQBM0u68bG9XC9iOulEQ8I0tOx/4qUpgVzvgXL6ugxr0RY554Gz/NQsVqknqPzUcxpQ==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.9.tgz", + "integrity": "sha512-zhdUTj6RGtCJSgU+bDrWF6cGbvW453LoIC1DSNWrTlXzC7WuH4a+EiPrgc7/kNoRxerKuA/cxYlI8GwNtVtDlw==", "requires": { - "@ethersproject/bytes": "^5.0.4", + "@ethersproject/bytes": "^5.0.9", "js-sha3": "0.5.7" } }, "@ethersproject/logger": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.6.tgz", - "integrity": "sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==" + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.10.tgz", + "integrity": "sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw==" }, "@ethersproject/properties": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.4.tgz", - "integrity": "sha512-UdyX3GqBxFt15B0uSESdDNmhvEbK3ACdDXl2soshoPcneXuTswHDeA0LoPlnaZzhbgk4p6jqb4GMms5C26Qu6A==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.9.tgz", + "integrity": "sha512-ZCjzbHYTw+rF1Pn8FDCEmx3gQttwIHcm/6Xee8g/M3Ga3SfW4tccNMbs5zqnBH0E4RoOPaeNgyg1O68TaF0tlg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/rlp": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.4.tgz", - "integrity": "sha512-5qrrZad7VTjofxSsm7Zg/7Dr4ZOln4S2CqiDdOuTv6MBKnXj0CiBojXyuDy52M8O3wxH0CyE924hXWTDV1PQWQ==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.9.tgz", + "integrity": "sha512-ns1U7ZMVeruUW6JXc4om+1w3w4ynHN/0fpwmeNTsAjwGKoF8SAUgue6ylKpHKWSti2idx7jDxbn8hNNFHk67CA==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/strings": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.5.tgz", - "integrity": "sha512-JED6WaIV00xM/gvj8vSnd+0VWtDYdidTmavFRCTQakqfz+4tDo6Jz5LHgG+dd45h7ah7ykCHW0C7ZXWEDROCXQ==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.10.tgz", + "integrity": "sha512-KAeoS1tZ9/5ECXiIZA6S6hywbD0so2VmuW+Wfyo5EDXeyZ6Na1nxTPhTnW7voQmjbeYJffCrOc0qLFJeylyg7w==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/logger": "^5.0.5" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/logger": "^5.0.8" } } } @@ -684,258 +620,183 @@ } }, "@ethersproject/hdnode": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.0.5.tgz", - "integrity": "sha512-Ho4HZaK+KijE5adayvjAGusWMnT0mgwGa5hGMBofBOgX9nqiKf6Wxx68SXBGI1/L3rmKo6mlAjxUd8gefs0teQ==", - "requires": { - "@ethersproject/abstract-signer": "^5.0.4", - "@ethersproject/basex": "^5.0.3", - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/pbkdf2": "^5.0.3", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/sha2": "^5.0.3", - "@ethersproject/signing-key": "^5.0.4", - "@ethersproject/strings": "^5.0.4", - "@ethersproject/transactions": "^5.0.5", - "@ethersproject/wordlists": "^5.0.4" + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.0.10.tgz", + "integrity": "sha512-ZLwMtIcXK7xz2lSITDCl40W04CtRq4K9NwBxhCzdzPdaz6XnoJMwGz2YMVLg+8ksseq+RYtTwIIXtlK6vyvQyg==", + "requires": { + "@ethersproject/abstract-signer": "^5.0.10", + "@ethersproject/basex": "^5.0.7", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/pbkdf2": "^5.0.7", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/sha2": "^5.0.7", + "@ethersproject/signing-key": "^5.0.8", + "@ethersproject/strings": "^5.0.8", + "@ethersproject/transactions": "^5.0.9", + "@ethersproject/wordlists": "^5.0.8" }, "dependencies": { - "@ethersproject/address": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.5.tgz", - "integrity": "sha512-DpkQ6rwk9jTefrRsJzEm6nhRiJd9pvhn1xN0rw5N/jswXG5r7BLk/GVA0mMAVWAsYfvi2xSc5L41FMox43RYEA==", - "requires": { - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/rlp": "^5.0.3", - "bn.js": "^4.4.0" - } - }, "@ethersproject/bignumber": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.8.tgz", - "integrity": "sha512-KXFVAFKS1jdTXYN8BE5Oj+ZfPMh28iRdFeNGBVT6cUFdtiPVqeXqc0ggvBqA3A1VoFFGgM7oAeaagA393aORHA==", + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.15.tgz", + "integrity": "sha512-MTADqnyacvdRwtKh7o9ujwNDSM1SDJjYDMYAzjIgjoi9rh6TY4suMbhCa3i2vh3SUXiXSICyTI8ui+NPdrZ9Lw==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", "bn.js": "^4.4.0" } }, "@ethersproject/bytes": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.5.tgz", - "integrity": "sha512-IEj9HpZB+ACS6cZ+QQMTqmu/cnUK2fYNE6ms/PVxjoBjoxc6HCraLpam1KuRvreMy0i523PLmjN8OYeikRdcUQ==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.11.tgz", + "integrity": "sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/constants": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.5.tgz", - "integrity": "sha512-foaQVmxp2+ik9FrLUCtVrLZCj4M3Ibgkqvh+Xw/vFRSerkjVSYePApaVE5essxhoSlF1U9oXfWY09QI2AXtgKA==", - "requires": { - "@ethersproject/bignumber": "^5.0.7" - } - }, - "@ethersproject/keccak256": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.4.tgz", - "integrity": "sha512-GNpiOUm9PGUxFNqOxYKDQBM0u68bG9XC9iOulEQ8I0tOx/4qUpgVzvgXL6ugxr0RY554Gz/NQsVqknqPzUcxpQ==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.10.tgz", + "integrity": "sha512-OSo8jxkHLDXieCy8bgOFR7lMfgPxEzKvSDdP+WAWHCDM8+orwch0B6wzkTmiQFgryAtIctrBt5glAdJikZ3hGw==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "js-sha3": "0.5.7" + "@ethersproject/bignumber": "^5.0.13" } }, "@ethersproject/logger": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.6.tgz", - "integrity": "sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==" + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.10.tgz", + "integrity": "sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw==" }, "@ethersproject/properties": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.4.tgz", - "integrity": "sha512-UdyX3GqBxFt15B0uSESdDNmhvEbK3ACdDXl2soshoPcneXuTswHDeA0LoPlnaZzhbgk4p6jqb4GMms5C26Qu6A==", - "requires": { - "@ethersproject/logger": "^5.0.5" - } - }, - "@ethersproject/rlp": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.4.tgz", - "integrity": "sha512-5qrrZad7VTjofxSsm7Zg/7Dr4ZOln4S2CqiDdOuTv6MBKnXj0CiBojXyuDy52M8O3wxH0CyE924hXWTDV1PQWQ==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.9.tgz", + "integrity": "sha512-ZCjzbHYTw+rF1Pn8FDCEmx3gQttwIHcm/6Xee8g/M3Ga3SfW4tccNMbs5zqnBH0E4RoOPaeNgyg1O68TaF0tlg==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/signing-key": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.5.tgz", - "integrity": "sha512-Z1wY7JC1HVO4CvQWY2TyTTuAr8xK3bJijZw1a9G92JEmKdv1j255R/0YLBBcFTl2J65LUjtXynNJ2GbArPGi5g==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.11.tgz", + "integrity": "sha512-Jfcru/BGwdkXhLxT+8WCZtFy7LL0TPFZw05FAb5asxB/MyVsEfNdNxGDtjVE9zXfmRSPe/EusXYY4K7wcygOyQ==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "elliptic": "6.5.3" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "elliptic": "6.5.4" } }, "@ethersproject/strings": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.5.tgz", - "integrity": "sha512-JED6WaIV00xM/gvj8vSnd+0VWtDYdidTmavFRCTQakqfz+4tDo6Jz5LHgG+dd45h7ah7ykCHW0C7ZXWEDROCXQ==", - "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/logger": "^5.0.5" - } - }, - "@ethersproject/transactions": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.6.tgz", - "integrity": "sha512-htsFhOD+NMBxx676A8ehSuwVV49iqpSB+CkjPZ02tpNew0K6p8g0CZ46Z1ZP946gIHAU80xQ0NACHYrjIUaCFA==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.10.tgz", + "integrity": "sha512-KAeoS1tZ9/5ECXiIZA6S6hywbD0so2VmuW+Wfyo5EDXeyZ6Na1nxTPhTnW7voQmjbeYJffCrOc0qLFJeylyg7w==", "requires": { - "@ethersproject/address": "^5.0.4", - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/rlp": "^5.0.3", - "@ethersproject/signing-key": "^5.0.4" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/logger": "^5.0.8" } } } }, "@ethersproject/json-wallets": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.0.7.tgz", - "integrity": "sha512-dgOn9JtGgjT28mDXs4LYY2rT4CzS6bG/rxoYuPq3TLHIf6nmvBcr33Fee6RrM/y8UAx4gyIkf6wb2cXsOctvQQ==", - "requires": { - "@ethersproject/abstract-signer": "^5.0.4", - "@ethersproject/address": "^5.0.4", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/hdnode": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/pbkdf2": "^5.0.3", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/random": "^5.0.3", - "@ethersproject/strings": "^5.0.4", - "@ethersproject/transactions": "^5.0.5", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.0.12.tgz", + "integrity": "sha512-nac553zGZnOewpjlqbfy7WBl8m3y7qudzRsI2dCxrediYtPIVIs9f6Pbnou8vDmmp8X4/U4W788d+Ma88o+Gbg==", + "requires": { + "@ethersproject/abstract-signer": "^5.0.10", + "@ethersproject/address": "^5.0.9", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/hdnode": "^5.0.8", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/pbkdf2": "^5.0.7", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/random": "^5.0.7", + "@ethersproject/strings": "^5.0.8", + "@ethersproject/transactions": "^5.0.9", "aes-js": "3.0.0", "scrypt-js": "3.0.1" }, "dependencies": { "@ethersproject/address": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.5.tgz", - "integrity": "sha512-DpkQ6rwk9jTefrRsJzEm6nhRiJd9pvhn1xN0rw5N/jswXG5r7BLk/GVA0mMAVWAsYfvi2xSc5L41FMox43RYEA==", - "requires": { - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/rlp": "^5.0.3", - "bn.js": "^4.4.0" + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.11.tgz", + "integrity": "sha512-Et4GBdD8/tsBGjCEOKee9upN29qjL5kbRcmJifb4Penmiuh9GARXL2/xpXvEp5EW+EIW/rfCHFJrkYBgoQFQBw==", + "requires": { + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/rlp": "^5.0.7" } }, "@ethersproject/bignumber": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.8.tgz", - "integrity": "sha512-KXFVAFKS1jdTXYN8BE5Oj+ZfPMh28iRdFeNGBVT6cUFdtiPVqeXqc0ggvBqA3A1VoFFGgM7oAeaagA393aORHA==", + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.15.tgz", + "integrity": "sha512-MTADqnyacvdRwtKh7o9ujwNDSM1SDJjYDMYAzjIgjoi9rh6TY4suMbhCa3i2vh3SUXiXSICyTI8ui+NPdrZ9Lw==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", "bn.js": "^4.4.0" } }, "@ethersproject/bytes": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.5.tgz", - "integrity": "sha512-IEj9HpZB+ACS6cZ+QQMTqmu/cnUK2fYNE6ms/PVxjoBjoxc6HCraLpam1KuRvreMy0i523PLmjN8OYeikRdcUQ==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.11.tgz", + "integrity": "sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/constants": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.5.tgz", - "integrity": "sha512-foaQVmxp2+ik9FrLUCtVrLZCj4M3Ibgkqvh+Xw/vFRSerkjVSYePApaVE5essxhoSlF1U9oXfWY09QI2AXtgKA==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.10.tgz", + "integrity": "sha512-OSo8jxkHLDXieCy8bgOFR7lMfgPxEzKvSDdP+WAWHCDM8+orwch0B6wzkTmiQFgryAtIctrBt5glAdJikZ3hGw==", "requires": { - "@ethersproject/bignumber": "^5.0.7" + "@ethersproject/bignumber": "^5.0.13" } }, "@ethersproject/keccak256": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.4.tgz", - "integrity": "sha512-GNpiOUm9PGUxFNqOxYKDQBM0u68bG9XC9iOulEQ8I0tOx/4qUpgVzvgXL6ugxr0RY554Gz/NQsVqknqPzUcxpQ==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.9.tgz", + "integrity": "sha512-zhdUTj6RGtCJSgU+bDrWF6cGbvW453LoIC1DSNWrTlXzC7WuH4a+EiPrgc7/kNoRxerKuA/cxYlI8GwNtVtDlw==", "requires": { - "@ethersproject/bytes": "^5.0.4", + "@ethersproject/bytes": "^5.0.9", "js-sha3": "0.5.7" } }, "@ethersproject/logger": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.6.tgz", - "integrity": "sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==" + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.10.tgz", + "integrity": "sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw==" }, "@ethersproject/properties": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.4.tgz", - "integrity": "sha512-UdyX3GqBxFt15B0uSESdDNmhvEbK3ACdDXl2soshoPcneXuTswHDeA0LoPlnaZzhbgk4p6jqb4GMms5C26Qu6A==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.9.tgz", + "integrity": "sha512-ZCjzbHYTw+rF1Pn8FDCEmx3gQttwIHcm/6Xee8g/M3Ga3SfW4tccNMbs5zqnBH0E4RoOPaeNgyg1O68TaF0tlg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/rlp": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.4.tgz", - "integrity": "sha512-5qrrZad7VTjofxSsm7Zg/7Dr4ZOln4S2CqiDdOuTv6MBKnXj0CiBojXyuDy52M8O3wxH0CyE924hXWTDV1PQWQ==", - "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5" - } - }, - "@ethersproject/signing-key": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.5.tgz", - "integrity": "sha512-Z1wY7JC1HVO4CvQWY2TyTTuAr8xK3bJijZw1a9G92JEmKdv1j255R/0YLBBcFTl2J65LUjtXynNJ2GbArPGi5g==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.9.tgz", + "integrity": "sha512-ns1U7ZMVeruUW6JXc4om+1w3w4ynHN/0fpwmeNTsAjwGKoF8SAUgue6ylKpHKWSti2idx7jDxbn8hNNFHk67CA==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "elliptic": "6.5.3" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/strings": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.5.tgz", - "integrity": "sha512-JED6WaIV00xM/gvj8vSnd+0VWtDYdidTmavFRCTQakqfz+4tDo6Jz5LHgG+dd45h7ah7ykCHW0C7ZXWEDROCXQ==", - "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/logger": "^5.0.5" - } - }, - "@ethersproject/transactions": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.6.tgz", - "integrity": "sha512-htsFhOD+NMBxx676A8ehSuwVV49iqpSB+CkjPZ02tpNew0K6p8g0CZ46Z1ZP946gIHAU80xQ0NACHYrjIUaCFA==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.10.tgz", + "integrity": "sha512-KAeoS1tZ9/5ECXiIZA6S6hywbD0so2VmuW+Wfyo5EDXeyZ6Na1nxTPhTnW7voQmjbeYJffCrOc0qLFJeylyg7w==", "requires": { - "@ethersproject/address": "^5.0.4", - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/rlp": "^5.0.3", - "@ethersproject/signing-key": "^5.0.4" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/logger": "^5.0.8" } } } @@ -962,41 +823,41 @@ "integrity": "sha512-NQe3O1/Nwkcp6bto6hsTvrcCeR/cOGK+RhOMn0Zi2FND6gdWsf1g+5ie8gQ1REqDX4MTGP/Y131dZas985ls/g==" }, "@ethersproject/networks": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.0.4.tgz", - "integrity": "sha512-/wHDTRms5mpJ09BoDrbNdFWINzONe05wZRgohCXvEv39rrH/Gd/yAnct8wC0RsW3tmFOgjgQxuBvypIxuUynTw==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.0.9.tgz", + "integrity": "sha512-L8+VCQwArBLGkxZb/5Ns/OH/OxP38AcaveXIxhUTq+VWpXYjrObG3E7RDQIKkUx1S1IcQl/UWTz5w4DK0UitJg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" }, "dependencies": { "@ethersproject/logger": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.6.tgz", - "integrity": "sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==" + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.10.tgz", + "integrity": "sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw==" } } }, "@ethersproject/pbkdf2": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.0.4.tgz", - "integrity": "sha512-9jVBjHXQKfr9+3bkCg01a8Cd1H9e+7Kw3ZMIvAxD0lZtuzrXsJxm1hVwY9KA+PRUvgS/9tTP4viXQYwLAax7zg==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.0.9.tgz", + "integrity": "sha512-ItE/wQ/WVw/ajEHPUVgfu0aEvksPgOQc+278bke8sGKnGO3ppjmqp0MHh17tHc1EBTzJbSms5aLIqc56qZ/oiA==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/sha2": "^5.0.3" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/sha2": "^5.0.7" }, "dependencies": { "@ethersproject/bytes": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.5.tgz", - "integrity": "sha512-IEj9HpZB+ACS6cZ+QQMTqmu/cnUK2fYNE6ms/PVxjoBjoxc6HCraLpam1KuRvreMy0i523PLmjN8OYeikRdcUQ==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.11.tgz", + "integrity": "sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/logger": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.6.tgz", - "integrity": "sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==" + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.10.tgz", + "integrity": "sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw==" } } }, @@ -1009,151 +870,123 @@ } }, "@ethersproject/providers": { - "version": "5.0.14", - "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.0.14.tgz", - "integrity": "sha512-K9QRRkkHWyprm3g4L8U9aPx5uyivznL4RYemkN2shCQumyGqFJ5SO+OtQrgebVm0JpGwFAUGugnhRUh49sjErw==", - "requires": { - "@ethersproject/abstract-provider": "^5.0.4", - "@ethersproject/abstract-signer": "^5.0.4", - "@ethersproject/address": "^5.0.4", - "@ethersproject/basex": "^5.0.3", - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/hash": "^5.0.4", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/networks": "^5.0.3", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/random": "^5.0.3", - "@ethersproject/rlp": "^5.0.3", - "@ethersproject/sha2": "^5.0.3", - "@ethersproject/strings": "^5.0.4", - "@ethersproject/transactions": "^5.0.5", - "@ethersproject/web": "^5.0.6", + "version": "5.0.24", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.0.24.tgz", + "integrity": "sha512-M4Iw1r4gGJkt7ZUa++iREuviKL/DIpmIMsaUlVlXtV+ZrUXeN8xQ3zOTrbz7R4h9W9oljBZM7i4D3Kn1krJ30A==", + "requires": { + "@ethersproject/abstract-provider": "^5.0.8", + "@ethersproject/abstract-signer": "^5.0.10", + "@ethersproject/address": "^5.0.9", + "@ethersproject/basex": "^5.0.7", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/hash": "^5.0.10", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/networks": "^5.0.7", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/random": "^5.0.7", + "@ethersproject/rlp": "^5.0.7", + "@ethersproject/sha2": "^5.0.7", + "@ethersproject/strings": "^5.0.8", + "@ethersproject/transactions": "^5.0.9", + "@ethersproject/web": "^5.0.12", "bech32": "1.1.4", "ws": "7.2.3" }, "dependencies": { "@ethersproject/address": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.5.tgz", - "integrity": "sha512-DpkQ6rwk9jTefrRsJzEm6nhRiJd9pvhn1xN0rw5N/jswXG5r7BLk/GVA0mMAVWAsYfvi2xSc5L41FMox43RYEA==", - "requires": { - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/rlp": "^5.0.3", - "bn.js": "^4.4.0" + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.11.tgz", + "integrity": "sha512-Et4GBdD8/tsBGjCEOKee9upN29qjL5kbRcmJifb4Penmiuh9GARXL2/xpXvEp5EW+EIW/rfCHFJrkYBgoQFQBw==", + "requires": { + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/rlp": "^5.0.7" } }, "@ethersproject/bignumber": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.8.tgz", - "integrity": "sha512-KXFVAFKS1jdTXYN8BE5Oj+ZfPMh28iRdFeNGBVT6cUFdtiPVqeXqc0ggvBqA3A1VoFFGgM7oAeaagA393aORHA==", + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.15.tgz", + "integrity": "sha512-MTADqnyacvdRwtKh7o9ujwNDSM1SDJjYDMYAzjIgjoi9rh6TY4suMbhCa3i2vh3SUXiXSICyTI8ui+NPdrZ9Lw==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", "bn.js": "^4.4.0" } }, "@ethersproject/bytes": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.5.tgz", - "integrity": "sha512-IEj9HpZB+ACS6cZ+QQMTqmu/cnUK2fYNE6ms/PVxjoBjoxc6HCraLpam1KuRvreMy0i523PLmjN8OYeikRdcUQ==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.11.tgz", + "integrity": "sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/constants": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.5.tgz", - "integrity": "sha512-foaQVmxp2+ik9FrLUCtVrLZCj4M3Ibgkqvh+Xw/vFRSerkjVSYePApaVE5essxhoSlF1U9oXfWY09QI2AXtgKA==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.10.tgz", + "integrity": "sha512-OSo8jxkHLDXieCy8bgOFR7lMfgPxEzKvSDdP+WAWHCDM8+orwch0B6wzkTmiQFgryAtIctrBt5glAdJikZ3hGw==", "requires": { - "@ethersproject/bignumber": "^5.0.7" + "@ethersproject/bignumber": "^5.0.13" } }, "@ethersproject/hash": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.6.tgz", - "integrity": "sha512-Gvh57v6BWhwnud6l7tMfQm32PRQ2DYx2WaAAQmAxAfYvmzUkpQCBstnGeNMXIL8/2wdkvcB2u+WZRWaZtsFuUQ==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.12.tgz", + "integrity": "sha512-kn4QN+fhNFbUgX3XZTZUaQixi0oyfIEY+hfW+KtkHu+rq7dV76oAIvaLEEynu1/4npOL38E4X4YI42gGZk+C0Q==", "requires": { - "@ethersproject/abstract-signer": "^5.0.6", - "@ethersproject/address": "^5.0.5", - "@ethersproject/bignumber": "^5.0.8", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.4", - "@ethersproject/strings": "^5.0.4" + "@ethersproject/abstract-signer": "^5.0.10", + "@ethersproject/address": "^5.0.9", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/strings": "^5.0.8" } }, "@ethersproject/keccak256": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.4.tgz", - "integrity": "sha512-GNpiOUm9PGUxFNqOxYKDQBM0u68bG9XC9iOulEQ8I0tOx/4qUpgVzvgXL6ugxr0RY554Gz/NQsVqknqPzUcxpQ==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.9.tgz", + "integrity": "sha512-zhdUTj6RGtCJSgU+bDrWF6cGbvW453LoIC1DSNWrTlXzC7WuH4a+EiPrgc7/kNoRxerKuA/cxYlI8GwNtVtDlw==", "requires": { - "@ethersproject/bytes": "^5.0.4", + "@ethersproject/bytes": "^5.0.9", "js-sha3": "0.5.7" } }, "@ethersproject/logger": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.6.tgz", - "integrity": "sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==" + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.10.tgz", + "integrity": "sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw==" }, "@ethersproject/properties": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.4.tgz", - "integrity": "sha512-UdyX3GqBxFt15B0uSESdDNmhvEbK3ACdDXl2soshoPcneXuTswHDeA0LoPlnaZzhbgk4p6jqb4GMms5C26Qu6A==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.9.tgz", + "integrity": "sha512-ZCjzbHYTw+rF1Pn8FDCEmx3gQttwIHcm/6Xee8g/M3Ga3SfW4tccNMbs5zqnBH0E4RoOPaeNgyg1O68TaF0tlg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/rlp": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.4.tgz", - "integrity": "sha512-5qrrZad7VTjofxSsm7Zg/7Dr4ZOln4S2CqiDdOuTv6MBKnXj0CiBojXyuDy52M8O3wxH0CyE924hXWTDV1PQWQ==", - "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5" - } - }, - "@ethersproject/signing-key": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.5.tgz", - "integrity": "sha512-Z1wY7JC1HVO4CvQWY2TyTTuAr8xK3bJijZw1a9G92JEmKdv1j255R/0YLBBcFTl2J65LUjtXynNJ2GbArPGi5g==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.9.tgz", + "integrity": "sha512-ns1U7ZMVeruUW6JXc4om+1w3w4ynHN/0fpwmeNTsAjwGKoF8SAUgue6ylKpHKWSti2idx7jDxbn8hNNFHk67CA==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "elliptic": "6.5.3" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/strings": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.5.tgz", - "integrity": "sha512-JED6WaIV00xM/gvj8vSnd+0VWtDYdidTmavFRCTQakqfz+4tDo6Jz5LHgG+dd45h7ah7ykCHW0C7ZXWEDROCXQ==", - "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/logger": "^5.0.5" - } - }, - "@ethersproject/transactions": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.6.tgz", - "integrity": "sha512-htsFhOD+NMBxx676A8ehSuwVV49iqpSB+CkjPZ02tpNew0K6p8g0CZ46Z1ZP946gIHAU80xQ0NACHYrjIUaCFA==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.10.tgz", + "integrity": "sha512-KAeoS1tZ9/5ECXiIZA6S6hywbD0so2VmuW+Wfyo5EDXeyZ6Na1nxTPhTnW7voQmjbeYJffCrOc0qLFJeylyg7w==", "requires": { - "@ethersproject/address": "^5.0.4", - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/rlp": "^5.0.3", - "@ethersproject/signing-key": "^5.0.4" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/logger": "^5.0.8" } }, "ws": { @@ -1164,26 +997,26 @@ } }, "@ethersproject/random": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.0.4.tgz", - "integrity": "sha512-AIZJhqs6Ba4/+U3lOjt3QZbP6b/kuuGLJUYFUonAgWmkTHwqsCwYnFvnHKQSUuHbXHvErp7WFXFlztx+yMn3kQ==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.0.9.tgz", + "integrity": "sha512-DANG8THsKqFbJOantrxumtG6gyETNE54VfbsWa+SQAT8WKpDo9W/X5Zhh73KuhClaey1UI32uVmISZeq/Zxn1A==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8" }, "dependencies": { "@ethersproject/bytes": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.5.tgz", - "integrity": "sha512-IEj9HpZB+ACS6cZ+QQMTqmu/cnUK2fYNE6ms/PVxjoBjoxc6HCraLpam1KuRvreMy0i523PLmjN8OYeikRdcUQ==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.11.tgz", + "integrity": "sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/logger": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.6.tgz", - "integrity": "sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==" + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.10.tgz", + "integrity": "sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw==" } } }, @@ -1197,27 +1030,27 @@ } }, "@ethersproject/sha2": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.0.4.tgz", - "integrity": "sha512-0yFhf1mspxAfWdXXoPtK94adUeu1R7/FzAa+DfEiZTc76sz/vHXf0LSIazoR3znYKFny6haBxME+usbvvEcF3A==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.0.9.tgz", + "integrity": "sha512-5FH4s47gM7N1fFAYQ1+m7aX0SbLg0Xr+6tvqndmNqc382/qBIbzXiGlUookrsjlPb6gLNurnTssCXjNM72J6lQ==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", "hash.js": "1.1.3" }, "dependencies": { "@ethersproject/bytes": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.5.tgz", - "integrity": "sha512-IEj9HpZB+ACS6cZ+QQMTqmu/cnUK2fYNE6ms/PVxjoBjoxc6HCraLpam1KuRvreMy0i523PLmjN8OYeikRdcUQ==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.11.tgz", + "integrity": "sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/logger": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.6.tgz", - "integrity": "sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==" + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.10.tgz", + "integrity": "sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw==" }, "hash.js": { "version": "1.1.3", @@ -1230,464 +1063,517 @@ } } }, - "@ethersproject/signing-key": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.2.tgz", - "integrity": "sha512-kgpCdtgoLoKXJTwJPw3ggRW7EO93YCQ98zY8hBpIb4OK3FxFCR3UUjlrGEwjMnLHDjFrxpKCeJagGWf477RyMQ==", + "@ethersproject/solidity": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.0.10.tgz", + "integrity": "sha512-8OG3HLqynWXDA6mVIHuHfF/ojTTwBahON7hc9GAKCqglzXCkVA3OpyxOJXPzjHClRIAUUiU7r9oy9Z/nsjtT/g==", + "requires": { + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/sha2": "^5.0.7", + "@ethersproject/strings": "^5.0.8" + }, + "dependencies": { + "@ethersproject/bignumber": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.15.tgz", + "integrity": "sha512-MTADqnyacvdRwtKh7o9ujwNDSM1SDJjYDMYAzjIgjoi9rh6TY4suMbhCa3i2vh3SUXiXSICyTI8ui+NPdrZ9Lw==", + "requires": { + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "bn.js": "^4.4.0" + } + }, + "@ethersproject/bytes": { + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.11.tgz", + "integrity": "sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg==", + "requires": { + "@ethersproject/logger": "^5.0.8" + } + }, + "@ethersproject/constants": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.10.tgz", + "integrity": "sha512-OSo8jxkHLDXieCy8bgOFR7lMfgPxEzKvSDdP+WAWHCDM8+orwch0B6wzkTmiQFgryAtIctrBt5glAdJikZ3hGw==", + "requires": { + "@ethersproject/bignumber": "^5.0.13" + } + }, + "@ethersproject/keccak256": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.9.tgz", + "integrity": "sha512-zhdUTj6RGtCJSgU+bDrWF6cGbvW453LoIC1DSNWrTlXzC7WuH4a+EiPrgc7/kNoRxerKuA/cxYlI8GwNtVtDlw==", + "requires": { + "@ethersproject/bytes": "^5.0.9", + "js-sha3": "0.5.7" + } + }, + "@ethersproject/logger": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.10.tgz", + "integrity": "sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw==" + }, + "@ethersproject/strings": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.10.tgz", + "integrity": "sha512-KAeoS1tZ9/5ECXiIZA6S6hywbD0so2VmuW+Wfyo5EDXeyZ6Na1nxTPhTnW7voQmjbeYJffCrOc0qLFJeylyg7w==", + "requires": { + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/logger": "^5.0.8" + } + } + } + }, + "@ethersproject/strings": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.1.tgz", + "integrity": "sha512-N8LxdHGBT7GZdogkEOV5xKXYTz5PNHuNzcxLNPYfH3kpvWSyXshZBgAz8YE1a8sMZagGj+Ic6d3mHijdCTSkGA==", "requires": { "@ethersproject/bytes": "^5.0.0", - "@ethersproject/logger": "^5.0.0", - "@ethersproject/properties": "^5.0.0", - "elliptic": "6.5.3" + "@ethersproject/constants": "^5.0.0", + "@ethersproject/logger": "^5.0.0" } }, - "@ethersproject/solidity": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.0.5.tgz", - "integrity": "sha512-DMFQ0ouXmNVoKWbGEUFGi8Urli4SJip9jXafQyFHWPRr5oJUqDVkNfwcyC37k+mhBG93k7qrYXCH2xJnGEOxHg==", - "requires": { - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/sha2": "^5.0.3", - "@ethersproject/strings": "^5.0.4" + "@ethersproject/transactions": { + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.11.tgz", + "integrity": "sha512-ftsRvR9+gQp7L63F6+XmstvsZ4w8GtWvQB08e/zB+oB86Fnhq8+i/tkgpJplSHC8I/qgiCisva+M3u2GVhDFPA==", + "requires": { + "@ethersproject/address": "^5.0.9", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/rlp": "^5.0.7", + "@ethersproject/signing-key": "^5.0.8" }, "dependencies": { + "@ethersproject/address": { + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.11.tgz", + "integrity": "sha512-Et4GBdD8/tsBGjCEOKee9upN29qjL5kbRcmJifb4Penmiuh9GARXL2/xpXvEp5EW+EIW/rfCHFJrkYBgoQFQBw==", + "requires": { + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/rlp": "^5.0.7" + } + }, "@ethersproject/bignumber": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.8.tgz", - "integrity": "sha512-KXFVAFKS1jdTXYN8BE5Oj+ZfPMh28iRdFeNGBVT6cUFdtiPVqeXqc0ggvBqA3A1VoFFGgM7oAeaagA393aORHA==", + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.15.tgz", + "integrity": "sha512-MTADqnyacvdRwtKh7o9ujwNDSM1SDJjYDMYAzjIgjoi9rh6TY4suMbhCa3i2vh3SUXiXSICyTI8ui+NPdrZ9Lw==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", "bn.js": "^4.4.0" } }, "@ethersproject/bytes": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.5.tgz", - "integrity": "sha512-IEj9HpZB+ACS6cZ+QQMTqmu/cnUK2fYNE6ms/PVxjoBjoxc6HCraLpam1KuRvreMy0i523PLmjN8OYeikRdcUQ==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.11.tgz", + "integrity": "sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/constants": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.5.tgz", - "integrity": "sha512-foaQVmxp2+ik9FrLUCtVrLZCj4M3Ibgkqvh+Xw/vFRSerkjVSYePApaVE5essxhoSlF1U9oXfWY09QI2AXtgKA==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.10.tgz", + "integrity": "sha512-OSo8jxkHLDXieCy8bgOFR7lMfgPxEzKvSDdP+WAWHCDM8+orwch0B6wzkTmiQFgryAtIctrBt5glAdJikZ3hGw==", + "requires": { + "@ethersproject/bignumber": "^5.0.13" + } + }, + "@ethersproject/keccak256": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.9.tgz", + "integrity": "sha512-zhdUTj6RGtCJSgU+bDrWF6cGbvW453LoIC1DSNWrTlXzC7WuH4a+EiPrgc7/kNoRxerKuA/cxYlI8GwNtVtDlw==", + "requires": { + "@ethersproject/bytes": "^5.0.9", + "js-sha3": "0.5.7" + } + }, + "@ethersproject/logger": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.10.tgz", + "integrity": "sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw==" + }, + "@ethersproject/properties": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.9.tgz", + "integrity": "sha512-ZCjzbHYTw+rF1Pn8FDCEmx3gQttwIHcm/6Xee8g/M3Ga3SfW4tccNMbs5zqnBH0E4RoOPaeNgyg1O68TaF0tlg==", "requires": { - "@ethersproject/bignumber": "^5.0.7" + "@ethersproject/logger": "^5.0.8" } }, - "@ethersproject/keccak256": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.4.tgz", - "integrity": "sha512-GNpiOUm9PGUxFNqOxYKDQBM0u68bG9XC9iOulEQ8I0tOx/4qUpgVzvgXL6ugxr0RY554Gz/NQsVqknqPzUcxpQ==", + "@ethersproject/rlp": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.9.tgz", + "integrity": "sha512-ns1U7ZMVeruUW6JXc4om+1w3w4ynHN/0fpwmeNTsAjwGKoF8SAUgue6ylKpHKWSti2idx7jDxbn8hNNFHk67CA==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "js-sha3": "0.5.7" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8" } }, - "@ethersproject/logger": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.6.tgz", - "integrity": "sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==" - }, - "@ethersproject/strings": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.5.tgz", - "integrity": "sha512-JED6WaIV00xM/gvj8vSnd+0VWtDYdidTmavFRCTQakqfz+4tDo6Jz5LHgG+dd45h7ah7ykCHW0C7ZXWEDROCXQ==", + "@ethersproject/signing-key": { + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.11.tgz", + "integrity": "sha512-Jfcru/BGwdkXhLxT+8WCZtFy7LL0TPFZw05FAb5asxB/MyVsEfNdNxGDtjVE9zXfmRSPe/EusXYY4K7wcygOyQ==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/logger": "^5.0.5" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "elliptic": "6.5.4" } } } }, - "@ethersproject/strings": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.1.tgz", - "integrity": "sha512-N8LxdHGBT7GZdogkEOV5xKXYTz5PNHuNzcxLNPYfH3kpvWSyXshZBgAz8YE1a8sMZagGj+Ic6d3mHijdCTSkGA==", - "requires": { - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/constants": "^5.0.0", - "@ethersproject/logger": "^5.0.0" - } - }, - "@ethersproject/transactions": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.1.tgz", - "integrity": "sha512-IGc6/5hri3PrqR/ZCj89osDiq3Lt0CSrycn6vlRl8SjpBKYDdcT+Ru5xkeC7YcsnqcdBmTL+jyR3SLudU+x2Kw==", - "requires": { - "@ethersproject/address": "^5.0.0", - "@ethersproject/bignumber": "^5.0.0", - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/constants": "^5.0.0", - "@ethersproject/keccak256": "^5.0.0", - "@ethersproject/logger": "^5.0.0", - "@ethersproject/properties": "^5.0.0", - "@ethersproject/rlp": "^5.0.0", - "@ethersproject/signing-key": "^5.0.0" - } - }, "@ethersproject/units": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.0.6.tgz", - "integrity": "sha512-tsJuy4mipppdmooukRfhXt8fGx9nxvfvG6Xdy0RDm7LzHsjghjwQ69m2bCpId6SDSR1Uq1cQ9irPiUBSyWolUA==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.0.11.tgz", + "integrity": "sha512-nOSPmcCWyB/dwoBRhhTtPGCsTbiXqmc7Q0Adwvafc432AC7hy3Fj3IFZtnSXsbtJ/GdHCIUIoA8gtvxSsFuBJg==", "requires": { - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/logger": "^5.0.5" + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/logger": "^5.0.8" }, "dependencies": { "@ethersproject/bignumber": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.8.tgz", - "integrity": "sha512-KXFVAFKS1jdTXYN8BE5Oj+ZfPMh28iRdFeNGBVT6cUFdtiPVqeXqc0ggvBqA3A1VoFFGgM7oAeaagA393aORHA==", + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.15.tgz", + "integrity": "sha512-MTADqnyacvdRwtKh7o9ujwNDSM1SDJjYDMYAzjIgjoi9rh6TY4suMbhCa3i2vh3SUXiXSICyTI8ui+NPdrZ9Lw==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", "bn.js": "^4.4.0" } }, "@ethersproject/bytes": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.5.tgz", - "integrity": "sha512-IEj9HpZB+ACS6cZ+QQMTqmu/cnUK2fYNE6ms/PVxjoBjoxc6HCraLpam1KuRvreMy0i523PLmjN8OYeikRdcUQ==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.11.tgz", + "integrity": "sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/constants": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.5.tgz", - "integrity": "sha512-foaQVmxp2+ik9FrLUCtVrLZCj4M3Ibgkqvh+Xw/vFRSerkjVSYePApaVE5essxhoSlF1U9oXfWY09QI2AXtgKA==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.10.tgz", + "integrity": "sha512-OSo8jxkHLDXieCy8bgOFR7lMfgPxEzKvSDdP+WAWHCDM8+orwch0B6wzkTmiQFgryAtIctrBt5glAdJikZ3hGw==", "requires": { - "@ethersproject/bignumber": "^5.0.7" + "@ethersproject/bignumber": "^5.0.13" } }, "@ethersproject/logger": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.6.tgz", - "integrity": "sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==" + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.10.tgz", + "integrity": "sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw==" } } }, "@ethersproject/wallet": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.0.7.tgz", - "integrity": "sha512-n2GX1+2Tc0qV8dguUcLkjNugINKvZY7u/5fEsn0skW9rz5+jHTR5IKMV6jSfXA+WjQT8UCNMvkI3CNcdhaPbTQ==", - "requires": { - "@ethersproject/abstract-provider": "^5.0.4", - "@ethersproject/abstract-signer": "^5.0.4", - "@ethersproject/address": "^5.0.4", - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/hash": "^5.0.4", - "@ethersproject/hdnode": "^5.0.4", - "@ethersproject/json-wallets": "^5.0.6", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/random": "^5.0.3", - "@ethersproject/signing-key": "^5.0.4", - "@ethersproject/transactions": "^5.0.5", - "@ethersproject/wordlists": "^5.0.4" + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.0.12.tgz", + "integrity": "sha512-rboJebGf47/KPZrKZQdYg9BAYuXbc/OwcUyML1K1f2jnJeo1ObWV11U1PAWTjTbhhSy6/Fg+34GO2yMb5Dt1Rw==", + "requires": { + "@ethersproject/abstract-provider": "^5.0.8", + "@ethersproject/abstract-signer": "^5.0.10", + "@ethersproject/address": "^5.0.9", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/hash": "^5.0.10", + "@ethersproject/hdnode": "^5.0.8", + "@ethersproject/json-wallets": "^5.0.10", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/random": "^5.0.7", + "@ethersproject/signing-key": "^5.0.8", + "@ethersproject/transactions": "^5.0.9", + "@ethersproject/wordlists": "^5.0.8" }, "dependencies": { "@ethersproject/address": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.5.tgz", - "integrity": "sha512-DpkQ6rwk9jTefrRsJzEm6nhRiJd9pvhn1xN0rw5N/jswXG5r7BLk/GVA0mMAVWAsYfvi2xSc5L41FMox43RYEA==", - "requires": { - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/rlp": "^5.0.3", - "bn.js": "^4.4.0" + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.11.tgz", + "integrity": "sha512-Et4GBdD8/tsBGjCEOKee9upN29qjL5kbRcmJifb4Penmiuh9GARXL2/xpXvEp5EW+EIW/rfCHFJrkYBgoQFQBw==", + "requires": { + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/rlp": "^5.0.7" } }, "@ethersproject/bignumber": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.8.tgz", - "integrity": "sha512-KXFVAFKS1jdTXYN8BE5Oj+ZfPMh28iRdFeNGBVT6cUFdtiPVqeXqc0ggvBqA3A1VoFFGgM7oAeaagA393aORHA==", + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.15.tgz", + "integrity": "sha512-MTADqnyacvdRwtKh7o9ujwNDSM1SDJjYDMYAzjIgjoi9rh6TY4suMbhCa3i2vh3SUXiXSICyTI8ui+NPdrZ9Lw==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", "bn.js": "^4.4.0" } }, "@ethersproject/bytes": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.5.tgz", - "integrity": "sha512-IEj9HpZB+ACS6cZ+QQMTqmu/cnUK2fYNE6ms/PVxjoBjoxc6HCraLpam1KuRvreMy0i523PLmjN8OYeikRdcUQ==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.11.tgz", + "integrity": "sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/constants": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.5.tgz", - "integrity": "sha512-foaQVmxp2+ik9FrLUCtVrLZCj4M3Ibgkqvh+Xw/vFRSerkjVSYePApaVE5essxhoSlF1U9oXfWY09QI2AXtgKA==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.10.tgz", + "integrity": "sha512-OSo8jxkHLDXieCy8bgOFR7lMfgPxEzKvSDdP+WAWHCDM8+orwch0B6wzkTmiQFgryAtIctrBt5glAdJikZ3hGw==", "requires": { - "@ethersproject/bignumber": "^5.0.7" + "@ethersproject/bignumber": "^5.0.13" } }, "@ethersproject/hash": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.6.tgz", - "integrity": "sha512-Gvh57v6BWhwnud6l7tMfQm32PRQ2DYx2WaAAQmAxAfYvmzUkpQCBstnGeNMXIL8/2wdkvcB2u+WZRWaZtsFuUQ==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.12.tgz", + "integrity": "sha512-kn4QN+fhNFbUgX3XZTZUaQixi0oyfIEY+hfW+KtkHu+rq7dV76oAIvaLEEynu1/4npOL38E4X4YI42gGZk+C0Q==", "requires": { - "@ethersproject/abstract-signer": "^5.0.6", - "@ethersproject/address": "^5.0.5", - "@ethersproject/bignumber": "^5.0.8", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.4", - "@ethersproject/strings": "^5.0.4" + "@ethersproject/abstract-signer": "^5.0.10", + "@ethersproject/address": "^5.0.9", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/strings": "^5.0.8" } }, "@ethersproject/keccak256": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.4.tgz", - "integrity": "sha512-GNpiOUm9PGUxFNqOxYKDQBM0u68bG9XC9iOulEQ8I0tOx/4qUpgVzvgXL6ugxr0RY554Gz/NQsVqknqPzUcxpQ==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.9.tgz", + "integrity": "sha512-zhdUTj6RGtCJSgU+bDrWF6cGbvW453LoIC1DSNWrTlXzC7WuH4a+EiPrgc7/kNoRxerKuA/cxYlI8GwNtVtDlw==", "requires": { - "@ethersproject/bytes": "^5.0.4", + "@ethersproject/bytes": "^5.0.9", "js-sha3": "0.5.7" } }, "@ethersproject/logger": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.6.tgz", - "integrity": "sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==" + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.10.tgz", + "integrity": "sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw==" }, "@ethersproject/properties": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.4.tgz", - "integrity": "sha512-UdyX3GqBxFt15B0uSESdDNmhvEbK3ACdDXl2soshoPcneXuTswHDeA0LoPlnaZzhbgk4p6jqb4GMms5C26Qu6A==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.9.tgz", + "integrity": "sha512-ZCjzbHYTw+rF1Pn8FDCEmx3gQttwIHcm/6Xee8g/M3Ga3SfW4tccNMbs5zqnBH0E4RoOPaeNgyg1O68TaF0tlg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/rlp": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.4.tgz", - "integrity": "sha512-5qrrZad7VTjofxSsm7Zg/7Dr4ZOln4S2CqiDdOuTv6MBKnXj0CiBojXyuDy52M8O3wxH0CyE924hXWTDV1PQWQ==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.9.tgz", + "integrity": "sha512-ns1U7ZMVeruUW6JXc4om+1w3w4ynHN/0fpwmeNTsAjwGKoF8SAUgue6ylKpHKWSti2idx7jDxbn8hNNFHk67CA==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/signing-key": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.5.tgz", - "integrity": "sha512-Z1wY7JC1HVO4CvQWY2TyTTuAr8xK3bJijZw1a9G92JEmKdv1j255R/0YLBBcFTl2J65LUjtXynNJ2GbArPGi5g==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.11.tgz", + "integrity": "sha512-Jfcru/BGwdkXhLxT+8WCZtFy7LL0TPFZw05FAb5asxB/MyVsEfNdNxGDtjVE9zXfmRSPe/EusXYY4K7wcygOyQ==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "elliptic": "6.5.3" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "elliptic": "6.5.4" } }, "@ethersproject/strings": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.5.tgz", - "integrity": "sha512-JED6WaIV00xM/gvj8vSnd+0VWtDYdidTmavFRCTQakqfz+4tDo6Jz5LHgG+dd45h7ah7ykCHW0C7ZXWEDROCXQ==", - "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/logger": "^5.0.5" - } - }, - "@ethersproject/transactions": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.6.tgz", - "integrity": "sha512-htsFhOD+NMBxx676A8ehSuwVV49iqpSB+CkjPZ02tpNew0K6p8g0CZ46Z1ZP946gIHAU80xQ0NACHYrjIUaCFA==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.10.tgz", + "integrity": "sha512-KAeoS1tZ9/5ECXiIZA6S6hywbD0so2VmuW+Wfyo5EDXeyZ6Na1nxTPhTnW7voQmjbeYJffCrOc0qLFJeylyg7w==", "requires": { - "@ethersproject/address": "^5.0.4", - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/rlp": "^5.0.3", - "@ethersproject/signing-key": "^5.0.4" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/logger": "^5.0.8" } } } }, "@ethersproject/web": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.0.9.tgz", - "integrity": "sha512-//QNlv1MSkOII1hv3+HQwWoiVFS+BMVGI0KYeUww4cyrEktnx1QIez5bTSab9s9fWTFaWKNmQNBwMbxAqPuYDw==", - "requires": { - "@ethersproject/base64": "^5.0.3", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/strings": "^5.0.4" + "version": "5.0.14", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.0.14.tgz", + "integrity": "sha512-QpTgplslwZ0Sp9oKNLoRuS6TKxnkwfaEk3gr7zd7XLF8XBsYejsrQO/03fNfnMx/TAT/RR6WEw/mbOwpRSeVRA==", + "requires": { + "@ethersproject/base64": "^5.0.7", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/strings": "^5.0.8" }, "dependencies": { "@ethersproject/bignumber": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.8.tgz", - "integrity": "sha512-KXFVAFKS1jdTXYN8BE5Oj+ZfPMh28iRdFeNGBVT6cUFdtiPVqeXqc0ggvBqA3A1VoFFGgM7oAeaagA393aORHA==", + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.15.tgz", + "integrity": "sha512-MTADqnyacvdRwtKh7o9ujwNDSM1SDJjYDMYAzjIgjoi9rh6TY4suMbhCa3i2vh3SUXiXSICyTI8ui+NPdrZ9Lw==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", "bn.js": "^4.4.0" } }, "@ethersproject/bytes": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.5.tgz", - "integrity": "sha512-IEj9HpZB+ACS6cZ+QQMTqmu/cnUK2fYNE6ms/PVxjoBjoxc6HCraLpam1KuRvreMy0i523PLmjN8OYeikRdcUQ==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.11.tgz", + "integrity": "sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/constants": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.5.tgz", - "integrity": "sha512-foaQVmxp2+ik9FrLUCtVrLZCj4M3Ibgkqvh+Xw/vFRSerkjVSYePApaVE5essxhoSlF1U9oXfWY09QI2AXtgKA==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.10.tgz", + "integrity": "sha512-OSo8jxkHLDXieCy8bgOFR7lMfgPxEzKvSDdP+WAWHCDM8+orwch0B6wzkTmiQFgryAtIctrBt5glAdJikZ3hGw==", "requires": { - "@ethersproject/bignumber": "^5.0.7" + "@ethersproject/bignumber": "^5.0.13" } }, "@ethersproject/logger": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.6.tgz", - "integrity": "sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==" + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.10.tgz", + "integrity": "sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw==" }, "@ethersproject/properties": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.4.tgz", - "integrity": "sha512-UdyX3GqBxFt15B0uSESdDNmhvEbK3ACdDXl2soshoPcneXuTswHDeA0LoPlnaZzhbgk4p6jqb4GMms5C26Qu6A==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.9.tgz", + "integrity": "sha512-ZCjzbHYTw+rF1Pn8FDCEmx3gQttwIHcm/6Xee8g/M3Ga3SfW4tccNMbs5zqnBH0E4RoOPaeNgyg1O68TaF0tlg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/strings": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.5.tgz", - "integrity": "sha512-JED6WaIV00xM/gvj8vSnd+0VWtDYdidTmavFRCTQakqfz+4tDo6Jz5LHgG+dd45h7ah7ykCHW0C7ZXWEDROCXQ==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.10.tgz", + "integrity": "sha512-KAeoS1tZ9/5ECXiIZA6S6hywbD0so2VmuW+Wfyo5EDXeyZ6Na1nxTPhTnW7voQmjbeYJffCrOc0qLFJeylyg7w==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/logger": "^5.0.5" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/logger": "^5.0.8" } } } }, "@ethersproject/wordlists": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.0.5.tgz", - "integrity": "sha512-XA3ycFltVrCTQt04w5nHu3Xq5Z6HjqWsXaAYQHFdqtugyUsIumaO9S5MOwFFuUYTNkZUoT3jCRa/OBS+K4tLfA==", - "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/hash": "^5.0.4", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/strings": "^5.0.4" + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.0.10.tgz", + "integrity": "sha512-jWsEm1iJzpg9SCXnNfFz+tcp4Ofzv0TJb6mj+soCNcar9GcT0yGz62ZsHC3pLQWaF4LkCzGwRJHJTXKjHQfG1A==", + "requires": { + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/hash": "^5.0.10", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/strings": "^5.0.8" }, "dependencies": { "@ethersproject/address": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.5.tgz", - "integrity": "sha512-DpkQ6rwk9jTefrRsJzEm6nhRiJd9pvhn1xN0rw5N/jswXG5r7BLk/GVA0mMAVWAsYfvi2xSc5L41FMox43RYEA==", - "requires": { - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/rlp": "^5.0.3", - "bn.js": "^4.4.0" + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.11.tgz", + "integrity": "sha512-Et4GBdD8/tsBGjCEOKee9upN29qjL5kbRcmJifb4Penmiuh9GARXL2/xpXvEp5EW+EIW/rfCHFJrkYBgoQFQBw==", + "requires": { + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/rlp": "^5.0.7" } }, "@ethersproject/bignumber": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.8.tgz", - "integrity": "sha512-KXFVAFKS1jdTXYN8BE5Oj+ZfPMh28iRdFeNGBVT6cUFdtiPVqeXqc0ggvBqA3A1VoFFGgM7oAeaagA393aORHA==", + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.15.tgz", + "integrity": "sha512-MTADqnyacvdRwtKh7o9ujwNDSM1SDJjYDMYAzjIgjoi9rh6TY4suMbhCa3i2vh3SUXiXSICyTI8ui+NPdrZ9Lw==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", "bn.js": "^4.4.0" } }, "@ethersproject/bytes": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.5.tgz", - "integrity": "sha512-IEj9HpZB+ACS6cZ+QQMTqmu/cnUK2fYNE6ms/PVxjoBjoxc6HCraLpam1KuRvreMy0i523PLmjN8OYeikRdcUQ==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.11.tgz", + "integrity": "sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/constants": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.5.tgz", - "integrity": "sha512-foaQVmxp2+ik9FrLUCtVrLZCj4M3Ibgkqvh+Xw/vFRSerkjVSYePApaVE5essxhoSlF1U9oXfWY09QI2AXtgKA==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.10.tgz", + "integrity": "sha512-OSo8jxkHLDXieCy8bgOFR7lMfgPxEzKvSDdP+WAWHCDM8+orwch0B6wzkTmiQFgryAtIctrBt5glAdJikZ3hGw==", "requires": { - "@ethersproject/bignumber": "^5.0.7" + "@ethersproject/bignumber": "^5.0.13" } }, "@ethersproject/hash": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.6.tgz", - "integrity": "sha512-Gvh57v6BWhwnud6l7tMfQm32PRQ2DYx2WaAAQmAxAfYvmzUkpQCBstnGeNMXIL8/2wdkvcB2u+WZRWaZtsFuUQ==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.12.tgz", + "integrity": "sha512-kn4QN+fhNFbUgX3XZTZUaQixi0oyfIEY+hfW+KtkHu+rq7dV76oAIvaLEEynu1/4npOL38E4X4YI42gGZk+C0Q==", "requires": { - "@ethersproject/abstract-signer": "^5.0.6", - "@ethersproject/address": "^5.0.5", - "@ethersproject/bignumber": "^5.0.8", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.4", - "@ethersproject/strings": "^5.0.4" + "@ethersproject/abstract-signer": "^5.0.10", + "@ethersproject/address": "^5.0.9", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/strings": "^5.0.8" } }, "@ethersproject/keccak256": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.4.tgz", - "integrity": "sha512-GNpiOUm9PGUxFNqOxYKDQBM0u68bG9XC9iOulEQ8I0tOx/4qUpgVzvgXL6ugxr0RY554Gz/NQsVqknqPzUcxpQ==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.9.tgz", + "integrity": "sha512-zhdUTj6RGtCJSgU+bDrWF6cGbvW453LoIC1DSNWrTlXzC7WuH4a+EiPrgc7/kNoRxerKuA/cxYlI8GwNtVtDlw==", "requires": { - "@ethersproject/bytes": "^5.0.4", + "@ethersproject/bytes": "^5.0.9", "js-sha3": "0.5.7" } }, "@ethersproject/logger": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.6.tgz", - "integrity": "sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==" + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.10.tgz", + "integrity": "sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw==" }, "@ethersproject/properties": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.4.tgz", - "integrity": "sha512-UdyX3GqBxFt15B0uSESdDNmhvEbK3ACdDXl2soshoPcneXuTswHDeA0LoPlnaZzhbgk4p6jqb4GMms5C26Qu6A==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.9.tgz", + "integrity": "sha512-ZCjzbHYTw+rF1Pn8FDCEmx3gQttwIHcm/6Xee8g/M3Ga3SfW4tccNMbs5zqnBH0E4RoOPaeNgyg1O68TaF0tlg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/rlp": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.4.tgz", - "integrity": "sha512-5qrrZad7VTjofxSsm7Zg/7Dr4ZOln4S2CqiDdOuTv6MBKnXj0CiBojXyuDy52M8O3wxH0CyE924hXWTDV1PQWQ==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.9.tgz", + "integrity": "sha512-ns1U7ZMVeruUW6JXc4om+1w3w4ynHN/0fpwmeNTsAjwGKoF8SAUgue6ylKpHKWSti2idx7jDxbn8hNNFHk67CA==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/strings": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.5.tgz", - "integrity": "sha512-JED6WaIV00xM/gvj8vSnd+0VWtDYdidTmavFRCTQakqfz+4tDo6Jz5LHgG+dd45h7ah7ykCHW0C7ZXWEDROCXQ==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.10.tgz", + "integrity": "sha512-KAeoS1tZ9/5ECXiIZA6S6hywbD0so2VmuW+Wfyo5EDXeyZ6Na1nxTPhTnW7voQmjbeYJffCrOc0qLFJeylyg7w==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/logger": "^5.0.5" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/logger": "^5.0.8" } } } @@ -2030,6 +1916,15 @@ "defer-to-connect": "^1.0.1" } }, + "@typechain/ethers-v5": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@typechain/ethers-v5/-/ethers-v5-2.0.0.tgz", + "integrity": "sha512-0xdCkyGOzdqh4h5JSf+zoWx85IusEjDcPIwNEHP8mrWSnCae4rvrqB+/gtpdNfX7zjlFlZiMeePn2r63EI3Lrw==", + "dev": true, + "requires": { + "ethers": "^5.0.2" + } + }, "@types/bn.js": { "version": "4.11.6", "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", @@ -2038,6 +1933,14 @@ "@types/node": "*" } }, + "@types/bson": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.3.tgz", + "integrity": "sha512-mVRvYnTOZJz3ccpxhr3wgxVmSeiYinW+zlzQz3SXWaJmD1DuL05Jeq7nKw3SnbKmbleW5qrLG5vdyWe/A9sXhw==", + "requires": { + "@types/node": "*" + } + }, "@types/chai": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.11.tgz", @@ -2100,6 +2003,15 @@ "integrity": "sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w==", "dev": true }, + "@types/mongodb": { + "version": "3.6.9", + "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.6.9.tgz", + "integrity": "sha512-2XSGr/+IOKeFQ5tU9ATcIiIr7bpHqWyOXNGLOOhp0kg2NnfEvoKZF1SZ25j4zvJRqM2WeSUjfWSvymFJ3HBGJQ==", + "requires": { + "@types/bson": "*", + "@types/node": "*" + } + }, "@types/node": { "version": "14.0.20", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.20.tgz", @@ -2137,6 +2049,21 @@ "@types/node": "*" } }, + "@types/prettier": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.2.2.tgz", + "integrity": "sha512-i99hy7Ki19EqVOl77WplDrvgNugHnsSjECVR/wUrzw2TJXz1zlUfT2ngGckR6xN7yFYaijsMAqPkOLx9HgUqHg==", + "dev": true + }, + "@types/resolve": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", + "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/secp256k1": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.1.tgz", @@ -2604,6 +2531,15 @@ "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" }, + "array-back": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", + "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", + "dev": true, + "requires": { + "typical": "^2.6.1" + } + }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -4857,43 +4793,95 @@ } } }, - "bech32": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", - "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" - }, - "big-integer": { - "version": "1.6.48", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz", - "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==" - }, - "bignumber.js": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", - "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==" - }, - "binary-extensions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", - "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", - "dev": true - }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "requires": { - "file-uri-to-path": "1.0.0" - } - }, - "bip66": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", - "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, + "bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" + }, + "big-integer": { + "version": "1.6.48", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz", + "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==" + }, + "bignumber.js": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", + "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==" + }, + "binary-extensions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", + "dev": true + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "bip66": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", + "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "bl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", + "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + } + } + }, "blake-hash": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/blake-hash/-/blake-hash-1.1.1.tgz", @@ -5116,6 +5104,11 @@ "safe-buffer": "^5.1.2" } }, + "bson": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.5.tgz", + "integrity": "sha512-kDuEzldR21lHciPQAIulLs1LZlCXdLziXI6Mb/TDkwXhb//UORJNPXgcRs2CuO4H0DcMkpfT3/ySsP3unoZjBg==" + }, "buffer": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", @@ -5659,6 +5652,17 @@ "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", "dev": true }, + "command-line-args": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-4.0.7.tgz", + "integrity": "sha512-aUdPvQRAyBvQd2n7jXcsMDz68ckBJELXNzBybCHOibUWEg0mWTnaYCSRU8h9R+aNRSvDihJtssSRCiDRpLaezA==", + "dev": true, + "requires": { + "array-back": "^2.0.0", + "find-replace": "^1.0.3", + "typical": "^2.6.1" + } + }, "common-config": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/common-config/-/common-config-0.1.1.tgz", @@ -6558,6 +6562,11 @@ } } }, + "denque": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.0.tgz", + "integrity": "sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ==" + }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -6699,17 +6708,17 @@ } }, "elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", + "bn.js": "^4.11.9", + "brorand": "^1.1.0", "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" } }, "emoji-regex": { @@ -7626,178 +7635,161 @@ } }, "ethers": { - "version": "5.0.19", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.0.19.tgz", - "integrity": "sha512-0AZnUgZh98q888WAd1oI3aLeI+iyDtrupjANVtPPS7O63lVopkR/No8A1NqSkgl/rU+b2iuu2mUZor6GD4RG2w==", - "requires": { - "@ethersproject/abi": "5.0.7", - "@ethersproject/abstract-provider": "5.0.5", - "@ethersproject/abstract-signer": "5.0.7", - "@ethersproject/address": "5.0.5", - "@ethersproject/base64": "5.0.4", - "@ethersproject/basex": "5.0.4", - "@ethersproject/bignumber": "5.0.8", - "@ethersproject/bytes": "5.0.5", - "@ethersproject/constants": "5.0.5", - "@ethersproject/contracts": "5.0.5", - "@ethersproject/hash": "5.0.6", - "@ethersproject/hdnode": "5.0.5", - "@ethersproject/json-wallets": "5.0.7", - "@ethersproject/keccak256": "5.0.4", - "@ethersproject/logger": "5.0.6", - "@ethersproject/networks": "5.0.4", - "@ethersproject/pbkdf2": "5.0.4", - "@ethersproject/properties": "5.0.4", - "@ethersproject/providers": "5.0.14", - "@ethersproject/random": "5.0.4", - "@ethersproject/rlp": "5.0.4", - "@ethersproject/sha2": "5.0.4", - "@ethersproject/signing-key": "5.0.5", - "@ethersproject/solidity": "5.0.5", - "@ethersproject/strings": "5.0.5", - "@ethersproject/transactions": "5.0.6", - "@ethersproject/units": "5.0.6", - "@ethersproject/wallet": "5.0.7", - "@ethersproject/web": "5.0.9", - "@ethersproject/wordlists": "5.0.5" + "version": "5.0.32", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.0.32.tgz", + "integrity": "sha512-rORfGWR0HsA4pjKMMcWZorw12DHsXqfIAuPVHJsXt+vI24jvXcVqx+rLsSvgOoLdaCMdxiN5qlIq2+4axKG31g==", + "requires": { + "@ethersproject/abi": "5.0.13", + "@ethersproject/abstract-provider": "5.0.10", + "@ethersproject/abstract-signer": "5.0.14", + "@ethersproject/address": "5.0.11", + "@ethersproject/base64": "5.0.9", + "@ethersproject/basex": "5.0.9", + "@ethersproject/bignumber": "5.0.15", + "@ethersproject/bytes": "5.0.11", + "@ethersproject/constants": "5.0.10", + "@ethersproject/contracts": "5.0.12", + "@ethersproject/hash": "5.0.12", + "@ethersproject/hdnode": "5.0.10", + "@ethersproject/json-wallets": "5.0.12", + "@ethersproject/keccak256": "5.0.9", + "@ethersproject/logger": "5.0.10", + "@ethersproject/networks": "5.0.9", + "@ethersproject/pbkdf2": "5.0.9", + "@ethersproject/properties": "5.0.9", + "@ethersproject/providers": "5.0.24", + "@ethersproject/random": "5.0.9", + "@ethersproject/rlp": "5.0.9", + "@ethersproject/sha2": "5.0.9", + "@ethersproject/signing-key": "5.0.11", + "@ethersproject/solidity": "5.0.10", + "@ethersproject/strings": "5.0.10", + "@ethersproject/transactions": "5.0.11", + "@ethersproject/units": "5.0.11", + "@ethersproject/wallet": "5.0.12", + "@ethersproject/web": "5.0.14", + "@ethersproject/wordlists": "5.0.10" }, "dependencies": { "@ethersproject/abi": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.7.tgz", - "integrity": "sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw==", + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.13.tgz", + "integrity": "sha512-2coOH3D7ra1lwamKEH0HVc+Jbcsw5yfeCgmY8ekhCDualEiyyovD2qDcMBBcY3+kjoLHVTmo7ost6MNClxdOrg==", "requires": { - "@ethersproject/address": "^5.0.4", - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/hash": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/strings": "^5.0.4" + "@ethersproject/address": "^5.0.9", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/hash": "^5.0.10", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/strings": "^5.0.8" } }, "@ethersproject/address": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.5.tgz", - "integrity": "sha512-DpkQ6rwk9jTefrRsJzEm6nhRiJd9pvhn1xN0rw5N/jswXG5r7BLk/GVA0mMAVWAsYfvi2xSc5L41FMox43RYEA==", - "requires": { - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/rlp": "^5.0.3", - "bn.js": "^4.4.0" + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.11.tgz", + "integrity": "sha512-Et4GBdD8/tsBGjCEOKee9upN29qjL5kbRcmJifb4Penmiuh9GARXL2/xpXvEp5EW+EIW/rfCHFJrkYBgoQFQBw==", + "requires": { + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/rlp": "^5.0.7" } }, "@ethersproject/bignumber": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.8.tgz", - "integrity": "sha512-KXFVAFKS1jdTXYN8BE5Oj+ZfPMh28iRdFeNGBVT6cUFdtiPVqeXqc0ggvBqA3A1VoFFGgM7oAeaagA393aORHA==", + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.15.tgz", + "integrity": "sha512-MTADqnyacvdRwtKh7o9ujwNDSM1SDJjYDMYAzjIgjoi9rh6TY4suMbhCa3i2vh3SUXiXSICyTI8ui+NPdrZ9Lw==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", "bn.js": "^4.4.0" } }, "@ethersproject/bytes": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.5.tgz", - "integrity": "sha512-IEj9HpZB+ACS6cZ+QQMTqmu/cnUK2fYNE6ms/PVxjoBjoxc6HCraLpam1KuRvreMy0i523PLmjN8OYeikRdcUQ==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.11.tgz", + "integrity": "sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/constants": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.5.tgz", - "integrity": "sha512-foaQVmxp2+ik9FrLUCtVrLZCj4M3Ibgkqvh+Xw/vFRSerkjVSYePApaVE5essxhoSlF1U9oXfWY09QI2AXtgKA==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.10.tgz", + "integrity": "sha512-OSo8jxkHLDXieCy8bgOFR7lMfgPxEzKvSDdP+WAWHCDM8+orwch0B6wzkTmiQFgryAtIctrBt5glAdJikZ3hGw==", "requires": { - "@ethersproject/bignumber": "^5.0.7" + "@ethersproject/bignumber": "^5.0.13" } }, "@ethersproject/hash": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.6.tgz", - "integrity": "sha512-Gvh57v6BWhwnud6l7tMfQm32PRQ2DYx2WaAAQmAxAfYvmzUkpQCBstnGeNMXIL8/2wdkvcB2u+WZRWaZtsFuUQ==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.12.tgz", + "integrity": "sha512-kn4QN+fhNFbUgX3XZTZUaQixi0oyfIEY+hfW+KtkHu+rq7dV76oAIvaLEEynu1/4npOL38E4X4YI42gGZk+C0Q==", "requires": { - "@ethersproject/abstract-signer": "^5.0.6", - "@ethersproject/address": "^5.0.5", - "@ethersproject/bignumber": "^5.0.8", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.4", - "@ethersproject/strings": "^5.0.4" + "@ethersproject/abstract-signer": "^5.0.10", + "@ethersproject/address": "^5.0.9", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/strings": "^5.0.8" } }, "@ethersproject/keccak256": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.4.tgz", - "integrity": "sha512-GNpiOUm9PGUxFNqOxYKDQBM0u68bG9XC9iOulEQ8I0tOx/4qUpgVzvgXL6ugxr0RY554Gz/NQsVqknqPzUcxpQ==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.9.tgz", + "integrity": "sha512-zhdUTj6RGtCJSgU+bDrWF6cGbvW453LoIC1DSNWrTlXzC7WuH4a+EiPrgc7/kNoRxerKuA/cxYlI8GwNtVtDlw==", "requires": { - "@ethersproject/bytes": "^5.0.4", + "@ethersproject/bytes": "^5.0.9", "js-sha3": "0.5.7" } }, "@ethersproject/logger": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.6.tgz", - "integrity": "sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==" + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.10.tgz", + "integrity": "sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw==" }, "@ethersproject/properties": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.4.tgz", - "integrity": "sha512-UdyX3GqBxFt15B0uSESdDNmhvEbK3ACdDXl2soshoPcneXuTswHDeA0LoPlnaZzhbgk4p6jqb4GMms5C26Qu6A==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.9.tgz", + "integrity": "sha512-ZCjzbHYTw+rF1Pn8FDCEmx3gQttwIHcm/6Xee8g/M3Ga3SfW4tccNMbs5zqnBH0E4RoOPaeNgyg1O68TaF0tlg==", "requires": { - "@ethersproject/logger": "^5.0.5" + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/rlp": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.4.tgz", - "integrity": "sha512-5qrrZad7VTjofxSsm7Zg/7Dr4ZOln4S2CqiDdOuTv6MBKnXj0CiBojXyuDy52M8O3wxH0CyE924hXWTDV1PQWQ==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.9.tgz", + "integrity": "sha512-ns1U7ZMVeruUW6JXc4om+1w3w4ynHN/0fpwmeNTsAjwGKoF8SAUgue6ylKpHKWSti2idx7jDxbn8hNNFHk67CA==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/signing-key": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.5.tgz", - "integrity": "sha512-Z1wY7JC1HVO4CvQWY2TyTTuAr8xK3bJijZw1a9G92JEmKdv1j255R/0YLBBcFTl2J65LUjtXynNJ2GbArPGi5g==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.11.tgz", + "integrity": "sha512-Jfcru/BGwdkXhLxT+8WCZtFy7LL0TPFZw05FAb5asxB/MyVsEfNdNxGDtjVE9zXfmRSPe/EusXYY4K7wcygOyQ==", "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "elliptic": "6.5.3" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "elliptic": "6.5.4" } }, "@ethersproject/strings": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.5.tgz", - "integrity": "sha512-JED6WaIV00xM/gvj8vSnd+0VWtDYdidTmavFRCTQakqfz+4tDo6Jz5LHgG+dd45h7ah7ykCHW0C7ZXWEDROCXQ==", - "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/logger": "^5.0.5" - } - }, - "@ethersproject/transactions": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.6.tgz", - "integrity": "sha512-htsFhOD+NMBxx676A8ehSuwVV49iqpSB+CkjPZ02tpNew0K6p8g0CZ46Z1ZP946gIHAU80xQ0NACHYrjIUaCFA==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.10.tgz", + "integrity": "sha512-KAeoS1tZ9/5ECXiIZA6S6hywbD0so2VmuW+Wfyo5EDXeyZ6Na1nxTPhTnW7voQmjbeYJffCrOc0qLFJeylyg7w==", "requires": { - "@ethersproject/address": "^5.0.4", - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/rlp": "^5.0.3", - "@ethersproject/signing-key": "^5.0.4" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/logger": "^5.0.8" } } } @@ -8757,6 +8749,27 @@ "find-file-up": "^0.1.2" } }, + "find-replace": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-1.0.3.tgz", + "integrity": "sha1-uI5zZNLZyVlVnziMZmcNYTBEH6A=", + "dev": true, + "requires": { + "array-back": "^1.0.4", + "test-value": "^2.1.0" + }, + "dependencies": { + "array-back": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", + "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", + "dev": true, + "requires": { + "typical": "^2.6.0" + } + } + } + }, "find-up": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", @@ -9088,8 +9101,7 @@ }, "@ethersproject/hash": { "version": "5.0.10", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.10.tgz", - "integrity": "sha512-Tf0bvs6YFhw28LuHnhlDWyr0xfcDxSXdwM4TcskeBbmXVSKLv3bJQEEEBFUcRX0fJuslR3gCVySEaSh7vuMx5w==", + "resolved": "", "dev": true, "optional": true, "requires": { @@ -9161,8 +9173,7 @@ "requires": { "@ethersproject/bytes": "^5.0.9", "@ethersproject/logger": "^5.0.8", - "@ethersproject/properties": "^5.0.7", - "elliptic": "6.5.3" + "@ethersproject/properties": "^5.0.7" } }, "@ethersproject/strings": { @@ -9179,8 +9190,7 @@ }, "@ethersproject/transactions": { "version": "5.0.9", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.9.tgz", - "integrity": "sha512-0Fu1yhdFBkrbMjenEr+39tmDxuHmaw0pe9Jb18XuKoItj7Z3p7+UzdHLr2S/okvHDHYPbZE5gtANDdQ3ZL1nBA==", + "resolved": "", "dev": true, "optional": true, "requires": { @@ -11267,21 +11277,6 @@ "integrity": "sha512-Adcvng33sd3gTjNIDNXGD1G4H6qCImIy2euUJAQHtLNplEKU5WEz5KRJxupRNIIT8sD5oFZLTKBWAf12Bsz24A==", "dev": true }, - "elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", - "dev": true, - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -11898,6 +11893,21 @@ "tweetnacl-util": "^0.15.0" }, "dependencies": { + "elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dev": true, + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "ethereumjs-abi": { "version": "0.6.5", "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz", @@ -13821,17 +13831,6 @@ "integrity": "sha1-CH4fELBGky/IWU3Z5tN4r8nR5aw=", "dev": true }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, "home-or-tmp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", @@ -14636,12 +14635,6 @@ "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", "dev": true }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -19541,6 +19534,11 @@ "verror": "1.10.0" } }, + "kareem": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.2.tgz", + "integrity": "sha512-STHz9P7X2L4Kwn72fA4rGyqyXdmrMSdxqHx9IXon/FXluXieaFA6KJ2upcHAHxQPQ0LeM/OjLrhFxifHewOALQ==" + }, "keccak": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/keccak/-/keccak-2.1.0.tgz", @@ -20018,7 +20016,6 @@ "requires": { "aes-js": "3.0.0", "bn.js": "^4.4.0", - "elliptic": "6.5.3", "hash.js": "1.1.3", "js-sha3": "0.5.7", "scrypt-js": "2.0.4", @@ -20709,7 +20706,6 @@ "requires": { "aes-js": "3.0.0", "bn.js": "^4.4.0", - "elliptic": "6.5.3", "hash.js": "1.1.3", "js-sha3": "0.5.7", "scrypt-js": "2.0.4", @@ -21198,6 +21194,12 @@ } } }, + "memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", + "optional": true + }, "memorystream": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", @@ -21813,6 +21815,85 @@ "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.12.0.tgz", "integrity": "sha512-/P/HtrlvBxY4o/PzXY9cCNBrdylDNxg7gnrv2sMNxj+UJ2m8jSpl0/A6fuJeNAWr99ZvGWH8XCbE0vmnM5KupQ==" }, + "mongodb": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.4.tgz", + "integrity": "sha512-Y+Ki9iXE9jI+n9bVtbTOOdK0B95d6wVGSucwtBkvQ+HIvVdTCfpVRp01FDC24uhC/Q2WXQ8Lpq3/zwtB5Op9Qw==", + "requires": { + "bl": "^2.2.1", + "bson": "^1.1.4", + "denque": "^1.4.1", + "require_optional": "^1.0.1", + "safe-buffer": "^5.1.2", + "saslprep": "^1.0.0" + } + }, + "mongoose": { + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.12.0.tgz", + "integrity": "sha512-s0Qpgf5lOk3AXtKnE+FA0HZhFKa2hesGVcTmx1wfTQ+7Q7ph0E79B6KUp1ZQERQyCwuE8WQ4wWllEhd7VPkxOg==", + "requires": { + "@types/mongodb": "^3.5.27", + "bson": "^1.1.4", + "kareem": "2.3.2", + "mongodb": "3.6.4", + "mongoose-legacy-pluralize": "1.0.2", + "mpath": "0.8.3", + "mquery": "3.2.4", + "ms": "2.1.2", + "regexp-clone": "1.0.0", + "safe-buffer": "5.2.1", + "sift": "7.0.1", + "sliced": "1.0.1" + } + }, + "mongoose-legacy-pluralize": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", + "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==" + }, + "mpath": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.8.3.tgz", + "integrity": "sha512-eb9rRvhDltXVNL6Fxd2zM9D4vKBxjVVQNLNijlj7uoXUy19zNDsIif5zR+pWmPCWNKwAtqyo4JveQm4nfD5+eA==" + }, + "mquery": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.4.tgz", + "integrity": "sha512-uOLpp7iRX0BV1Uu6YpsqJ5b42LwYnmu0WeF/f8qgD/On3g0XDaQM6pfn0m6UxO6SM8DioZ9Bk6xxbWIGHm2zHg==", + "requires": { + "bluebird": "3.5.1", + "debug": "3.1.0", + "regexp-clone": "^1.0.0", + "safe-buffer": "5.1.2", + "sliced": "1.0.1" + }, + "dependencies": { + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -23020,6 +23101,12 @@ "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" }, + "prettier": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", + "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", + "dev": true + }, "pretty-format": { "version": "24.9.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", @@ -23559,6 +23646,11 @@ "safe-regex": "^1.1.0" } }, + "regexp-clone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz", + "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw==" + }, "regexpp": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", @@ -23707,6 +23799,27 @@ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" }, + "require_optional": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", + "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", + "requires": { + "resolve-from": "^2.0.0", + "semver": "^5.1.0" + }, + "dependencies": { + "resolve-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", + "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, "resolve": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", @@ -23962,6 +24075,15 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "saslprep": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", + "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", + "optional": true, + "requires": { + "sparse-bitfield": "^3.0.3" + } + }, "scrypt-js": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", @@ -24366,6 +24488,11 @@ "rechoir": "^0.6.2" } }, + "sift": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/sift/-/sift-7.0.1.tgz", + "integrity": "sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g==" + }, "signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", @@ -24402,6 +24529,11 @@ "is-fullwidth-code-point": "^2.0.0" } }, + "sliced": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", + "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" + }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -24714,6 +24846,15 @@ "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", "dev": true }, + "sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", + "optional": true, + "requires": { + "memory-pager": "^1.0.2" + } + }, "spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", @@ -25411,6 +25552,27 @@ } } }, + "test-value": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/test-value/-/test-value-2.1.0.tgz", + "integrity": "sha1-Edpv9nDzRxpztiXKTz/c97t0gpE=", + "dev": true, + "requires": { + "array-back": "^1.0.3", + "typical": "^2.6.0" + }, + "dependencies": { + "array-back": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", + "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", + "dev": true, + "requires": { + "typical": "^2.6.0" + } + } + } + }, "testrpc": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/testrpc/-/testrpc-0.0.1.tgz", @@ -25800,6 +25962,29 @@ "integrity": "sha512-0z3j8R7MCjy10kc/g+qg7Ln3alJTodw9aDuVWZa3uiWqfuBMKeAeP2ocWcxoyM3D73yz3Jt/Pu4qPr4wHSdB/Q==", "dev": true }, + "ts-essentials": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-1.0.4.tgz", + "integrity": "sha512-q3N1xS4vZpRouhYHDPwO0bDW3EZ6SK9CrrDHxi/D6BPReSjpVgWIOpLS2o0gSBZm+7q/wyKp6RVM1AeeW7uyfQ==", + "dev": true + }, + "ts-generator": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ts-generator/-/ts-generator-0.1.1.tgz", + "integrity": "sha512-N+ahhZxTLYu1HNTQetwWcx3so8hcYbkKBHTr4b4/YgObFTIKkOSSsaa+nal12w8mfrJAyzJfETXawbNjSfP2gQ==", + "dev": true, + "requires": { + "@types/mkdirp": "^0.5.2", + "@types/prettier": "^2.1.1", + "@types/resolve": "^0.0.8", + "chalk": "^2.4.1", + "glob": "^7.1.2", + "mkdirp": "^0.5.1", + "prettier": "^2.1.2", + "resolve": "^1.8.1", + "ts-essentials": "^1.0.0" + } + }, "ts-node": { "version": "8.10.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", @@ -25885,6 +26070,35 @@ "mime-types": "~2.1.24" } }, + "typechain": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/typechain/-/typechain-3.0.0.tgz", + "integrity": "sha512-ft4KVmiN3zH4JUFu2WJBrwfHeDf772Tt2d8bssDTo/YcckKW2D+OwFrHXRC6hJvO3mHjFQTihoMV6fJOi0Hngg==", + "dev": true, + "requires": { + "command-line-args": "^4.0.7", + "debug": "^4.1.1", + "fs-extra": "^7.0.0", + "js-sha3": "^0.8.0", + "lodash": "^4.17.15", + "ts-essentials": "^6.0.3", + "ts-generator": "^0.1.1" + }, + "dependencies": { + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true + }, + "ts-essentials": { + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-6.0.7.tgz", + "integrity": "sha512-2E4HIIj4tQJlIHuATRHayv0EfMGK3ris/GRk1E3CFnsZzeNV+hUmelbaTZHLtXaZppM5oLhHRtO04gINC4Jusw==", + "dev": true + } + } + }, "typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", @@ -25898,6 +26112,12 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==" }, + "typical": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/typical/-/typical-2.6.1.tgz", + "integrity": "sha1-XAgOXWYcu+OCWdLnCjxyU+hziB0=", + "dev": true + }, "ultron": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", diff --git a/package.json b/package.json index f84d025..8fb9107 100644 --- a/package.json +++ b/package.json @@ -42,10 +42,11 @@ "base64url": "^3.0.1", "circom": "^0.5.35", "circomlib": "^0.2.4", - "ethers": "^5.0.19", + "ethers": "^5.0.32", "libsemaphore": "^1.0.15", "maci-config": "^0.2.1", "maci-crypto": "^0.2.1", + "mongoose": "^5.12.0", "n-readlines": "^1.0.1", "prompt-async": "^0.9.9", "shelljs": "^0.8.3", From e9e6f7120a2d55f6626c39183b311ef8fe57d180 Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Tue, 16 Mar 2021 16:08:50 +0800 Subject: [PATCH 09/38] mongoose: comment --- cli/leaveComment.ts | 25 ++++++++++++++++++++++++- cli/publishPost.ts | 11 +++++++++-- database/models/comment.ts | 12 ++++++++++++ database/models/post.ts | 5 ++++- 4 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 database/models/comment.ts diff --git a/cli/leaveComment.ts b/cli/leaveComment.ts index 353b3d2..9dfc05a 100644 --- a/cli/leaveComment.ts +++ b/cli/leaveComment.ts @@ -11,6 +11,7 @@ import { } from './utils' import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK, DEFAULT_MAX_POST_ID } from './defaults' +import { dbUri } from '../config/database'; import { add0x } from '../crypto/SMT' import { genUnirepStateFromContract } from '../core' @@ -18,6 +19,10 @@ import { genUnirepStateFromContract } from '../core' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import { epkProofPrefix } from './prefix' +import Comment, { IComment } from "../database/models/comment"; +import Post, { IPost } from "../database/models/post"; +import mongoose from 'mongoose' + const configureSubparser = (subparsers: any) => { const parser = subparsers.addParser( 'leaveComment', @@ -138,6 +143,18 @@ const leaveComment = async (args: any) => { startBlock, ) + const db = await mongoose.connect( + dbUri, + { useNewUrlParser: true, + useFindAndModify: false, + useUnifiedTopology: true + } + ) + + const newComment: IComment = new Comment({ + content: args.text, + }); + const unirepContract = new ethers.Contract( unirepAddress, Unirep.abi, @@ -147,11 +164,16 @@ const leaveComment = async (args: any) => { let tx try { tx = await unirepContract.leaveComment( - BigInt(args.post_id), + BigInt(add0x(args.post_id)), args.text, { gasLimit: 1000000 } ) + const postRes = await Post.findByIdAndUpdate( + {_id: mongoose.Types.ObjectId(args.post_id) }, + { $push: {comments: newComment }} + ) + } catch(e) { console.error('Error: the transaction failed') if (e.message) { @@ -160,6 +182,7 @@ const leaveComment = async (args: any) => { return } + db.disconnect(); const receipt = await tx.wait() console.log('Transaction hash:', tx.hash) } diff --git a/cli/publishPost.ts b/cli/publishPost.ts index e4a9427..701585c 100644 --- a/cli/publishPost.ts +++ b/cli/publishPost.ts @@ -159,12 +159,19 @@ const publishPost = async (args: any) => { const proof = JSON.parse(decodedProof) const publicSignals = [GSTRoot, currentEpoch, epk] - const db = await mongoose.connect(dbUri) + const db = await mongoose.connect( + dbUri, + { useNewUrlParser: true, + useFindAndModify: false, + useUnifiedTopology: true + } + ) const newpost: IPost = new Post({ content: args.text, epochKey: args.epoch_key, - epkProof: args.proof + epkProof: args.proof, + comments: [] }); const unirepContract = new ethers.Contract( diff --git a/database/models/comment.ts b/database/models/comment.ts new file mode 100644 index 0000000..660b945 --- /dev/null +++ b/database/models/comment.ts @@ -0,0 +1,12 @@ +import * as mongoose from 'mongoose'; +import { Schema, Document } from 'mongoose'; + +export interface IComment extends Document { + content: string + } + + const CommentSchema: Schema = new Schema({ + content: { type: String } + }); + + export default mongoose.model('Comment', CommentSchema); \ No newline at end of file diff --git a/database/models/post.ts b/database/models/post.ts index b54904d..71b00f4 100644 --- a/database/models/post.ts +++ b/database/models/post.ts @@ -1,16 +1,19 @@ import * as mongoose from 'mongoose'; import { Schema, Document } from 'mongoose'; +import Comment, { IComment } from './comment'; export interface IPost extends Document { content: string epochKey: string epkProof: string + comments: [ IComment ] } const PostSchema: Schema = new Schema({ content: { type: String }, epochKey: { type: String, required: true }, - epkProof: { type: String, required: true } + epkProof: { type: String, required: true }, + comments: { type: [ ]} }); export default mongoose.model('Post', PostSchema); \ No newline at end of file From 411fe3ea1e070aadc5bd664254558016fc35fc9e Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Wed, 24 Mar 2021 14:32:42 +0800 Subject: [PATCH 10/38] add Schemas attestation, newGSTLeaf, userTransitionedState --- cli/eventListeners.ts | 157 +++++++++++++++++++++++ cli/index.ts | 10 ++ cli/publishPost.ts | 3 +- cli/test/testAllCommands.ts | 2 +- cli/verifyEpochKeyProof.ts | 2 - database/connect.ts | 25 ---- database/models/attestation.ts | 26 ++++ database/models/newGSTLeaf.ts | 17 +++ database/models/userTransitionedState.ts | 27 ++++ 9 files changed, 239 insertions(+), 30 deletions(-) create mode 100644 cli/eventListeners.ts delete mode 100644 database/connect.ts create mode 100644 database/models/attestation.ts create mode 100644 database/models/newGSTLeaf.ts create mode 100644 database/models/userTransitionedState.ts diff --git a/cli/eventListeners.ts b/cli/eventListeners.ts new file mode 100644 index 0000000..66e0297 --- /dev/null +++ b/cli/eventListeners.ts @@ -0,0 +1,157 @@ +import { dbUri } from '../config/database'; +import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" +import { ethers as hardhatEthers } from 'hardhat' +import { ethers } from 'ethers' +import { + validateEthAddress, +} from './utils' +import mongoose from 'mongoose' + +import NewGSTLeaf, { INewGSTLeaf } from "../database/models/newGSTLeaf"; +import Comment, { IComment } from "../database/models/comment"; +import Attestation, { IAttestation } from "../database/models/attestation"; +import UserTransitionedState, { IUserTransitionedState } from "../database/models/userTransitionedState"; +import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' + +const configureSubparser = (subparsers: any) => { +const parser = subparsers.addParser( + 'eventListeners', + { addHelp: true }, + ) + + parser.addArgument( + ['-e', '--eth-provider'], + { + action: 'store', + type: 'string', + help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, + } + ) + + parser.addArgument( + ['-x', '--contract'], + { + required: true, + type: 'string', + help: 'The Unirep contract address', + } + ) +} + +const eventListeners = async (args: any) => { + + // Unirep contract + if (!validateEthAddress(args.contract)) { + console.error('Error: invalid Unirep contract address') + return + } + const unirepAddress = args.contract + + // Ethereum provider + const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER + + console.log('listener start') + + const db = await mongoose.connect( + dbUri, + { useNewUrlParser: true, + useFindAndModify: false, + useUnifiedTopology: true + } + ) + + const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) + const unirepContract = new ethers.Contract( + unirepAddress, + Unirep.abi, + provider, + ) + + + const NewGSTLeafInsertedFilter = unirepContract.filters.NewGSTLeafInserted() + const AttestationSubmittedFilter = unirepContract.filters.AttestationSubmitted() + const epochEndedFilter = unirepContract.filters.EpochEnded() + const userStateTransitionedFilter = unirepContract.filters.UserStateTransitioned() + + // NewGSTLeaf listeners + provider.on( + NewGSTLeafInsertedFilter, (event) => { + console.log(event) + const newLeaf: INewGSTLeaf = new NewGSTLeaf({ + formBlockhash: event.blockHash, + epoch: event.topics[1], + hashedLeaf: event.topics[0], + }) + console.log(newLeaf) + + newLeaf.save() + .then(()=>{console.log('saved')}) + .catch(err => {console.log(err)}) + } + ) + // Attestation listeners + provider.on( + AttestationSubmittedFilter, (event) => { + console.log("Attestation Sumbitted Filter") + const decodedData = ethers.utils.defaultAbiCoder.decode( + ['uint256', 'uint256', 'uint256', 'uint256', 'bool'], + event.data + ) + const newAttestation: IAttestation = new Attestation({ + epoch: event.topics[1], + epochKey: event.topics[2], + attester: event.topics[3], + attesterId: decodedData[0], + posRep: decodedData[1], + negRep: decodedData[2], + graffiti: decodedData[3], + overwriteGraffiti: decodedData[4], + }) + + newAttestation.save() + .then(()=>{console.log(newAttestation)}) + .catch(err => {console.log(err)}) + } + ) + + // Epoch Ended filter listeners + provider.on( + epochEndedFilter, (event) =>{ + console.log("epoch Ended Filter") + console.log(event) + } + ) + + // User state transition listeners + provider.on( + userStateTransitionedFilter, (event) =>{ + console.log("User State Transitioned Filter") + console.log(event) + + const decodedData = ethers.utils.defaultAbiCoder.decode( + ['uint256','uint256','uint256','uint256','uint256[8]','uint256[]','uint256[]'], + event.data + ) + + const newUserState: IUserTransitionedState = new UserTransitionedState({ + toEpoch: event.topics[1], + fromEpoch: decodedData[0], + fromGlobalStateTree: decodedData[1], + fromEpochTree: decodedData[2], + fromNullifierTreeRoot: decodedData[3], + proof: decodedData[4], + attestationNullifiers: decodedData[5], + epkNullifiers: decodedData[6], + }) + + newUserState.save() + .then(()=>{console.log(newUserState)}) + .catch(err => {console.log(err)}) + } + ) +} + +export { + eventListeners, + configureSubparser, +} \ No newline at end of file diff --git a/cli/index.ts b/cli/index.ts index e9116a4..45cb533 100644 --- a/cli/index.ts +++ b/cli/index.ts @@ -12,6 +12,11 @@ import { configureSubparser as configureSubparserForDeploy, } from './deploy' +import { + eventListeners, + configureSubparser as configureSubparserForEventListeners, +} from './eventListeners' + import { userSignup, configureSubparser as configureSubparserForUserSignup, @@ -94,6 +99,9 @@ const main = async () => { // Subcommand: deploy configureSubparserForDeploy(subparsers) + // Subcommand: eventListners + configureSubparserForEventListeners(subparsers) + // Subcommand: userSignup configureSubparserForUserSignup(subparsers) @@ -140,6 +148,8 @@ const main = async () => { await genUnirepIdentity(args) } else if (args.subcommand === 'deploy') { await deploy(args) + } else if (args.subcommand === 'eventListeners') { + await eventListeners(args) } else if (args.subcommand === 'userSignup') { await userSignup(args) } else if (args.subcommand === 'attesterSignup') { diff --git a/cli/publishPost.ts b/cli/publishPost.ts index 701585c..3cbdf72 100644 --- a/cli/publishPost.ts +++ b/cli/publishPost.ts @@ -151,7 +151,6 @@ const publishPost = async (args: any) => { startBlock, ) - const postId = BigInt(Math.floor(Math.random() * (DEFAULT_MAX_POST_ID) )) const currentEpoch = unirepState.currentEpoch const GSTRoot = unirepState.genGSTree(currentEpoch).root const epk = BigInt(add0x(args.epoch_key)) @@ -201,7 +200,7 @@ const publishPost = async (args: any) => { } db.disconnect(); - console.log('Post ID:', postId.toString()) + console.log('Post ID:', newpost._id.toString()) console.log('Transaction hash:', tx.hash) } diff --git a/cli/test/testAllCommands.ts b/cli/test/testAllCommands.ts index 86bcd23..93921d0 100644 --- a/cli/test/testAllCommands.ts +++ b/cli/test/testAllCommands.ts @@ -234,7 +234,7 @@ describe('test all CLI subcommands', function() { console.log(command) console.log(output) - const idRegMatch = output.match(/Post ID: ([0-9]+)/) + const idRegMatch = output.match(/Post ID: ([a-fA-F0-9]+)/) postID = idRegMatch[1] console.log('regmatch', postID) const postRegMatch = output.match(/Transaction hash: 0x[a-fA-F0-9]{64}/) diff --git a/cli/verifyEpochKeyProof.ts b/cli/verifyEpochKeyProof.ts index 6d0ecea..2cbc11b 100644 --- a/cli/verifyEpochKeyProof.ts +++ b/cli/verifyEpochKeyProof.ts @@ -100,8 +100,6 @@ const verifyEpochKeyProof = async (args: any) => { const decodedProof = base64url.decode(args.proof.slice(epkProofPrefix.length)) const proof = JSON.parse(decodedProof) const publicSignals = [GSTRoot, currentEpoch, epk] - console.log(publicSignals) - console.log(proof) const unirepContract = new ethers.Contract( unirepAddress, diff --git a/database/connect.ts b/database/connect.ts deleted file mode 100644 index 6e76bcd..0000000 --- a/database/connect.ts +++ /dev/null @@ -1,25 +0,0 @@ -import mongoose from "mongoose"; - -type TInput = { - db: string; -} -export default ({db}: TInput) => { - - const connect = () => { - mongoose - .connect( - db, - { useNewUrlParser: true } - ) - .then(() => { - return console.info(`Successfully connected to ${db}`); - }) - .catch(error => { - console.error('Error connecting to database: ', error); - return process.exit(1); - }); - }; - connect(); - - mongoose.connection.on('disconnected', connect); -}; \ No newline at end of file diff --git a/database/models/attestation.ts b/database/models/attestation.ts new file mode 100644 index 0000000..0d3884f --- /dev/null +++ b/database/models/attestation.ts @@ -0,0 +1,26 @@ +import * as mongoose from 'mongoose'; +import { Schema, Document } from 'mongoose'; + +export interface IAttestation extends Document { + epoch: number + epochKey: string + attester: string + attesterId: number + posRep: number + negRep: number + graffiti: string + overwriteGraffiti: boolean + } + + const AttestationSchema: Schema = new Schema({ + epoch: { type: Number }, + epochKey: { type: String, required: true }, + attester: { type: String, required: true }, + attesterId: { type: Number, required: true }, + posRep: { type: Number }, + negRep: { type: Number }, + graffiti: { type: {} }, + overwriteGraffiti: { type: String }, + }, { collection: 'Attestations' }); + + export default mongoose.model('Attestation', AttestationSchema); \ No newline at end of file diff --git a/database/models/newGSTLeaf.ts b/database/models/newGSTLeaf.ts new file mode 100644 index 0000000..00ec282 --- /dev/null +++ b/database/models/newGSTLeaf.ts @@ -0,0 +1,17 @@ +import { BigNumber } from 'ethers'; +import * as mongoose from 'mongoose'; +import { Schema, Document } from 'mongoose'; + +export interface INewGSTLeaf extends Document { + formBlockhash: string + epoch: BigNumber + hashedLeaf: BigNumber + } + + const NewGSTLeafSchema: Schema = new Schema({ + formBlockhash: { type: String }, + epoch: { type: String }, + hashedLeaf: { type: String } + }, { collection: 'NewGSTLeaves' }); + + export default mongoose.model('NewGSTLeaf', NewGSTLeafSchema); \ No newline at end of file diff --git a/database/models/userTransitionedState.ts b/database/models/userTransitionedState.ts new file mode 100644 index 0000000..df53eb3 --- /dev/null +++ b/database/models/userTransitionedState.ts @@ -0,0 +1,27 @@ +import { BigNumber } from 'ethers'; +import * as mongoose from 'mongoose'; +import { Schema, Document } from 'mongoose'; + +export interface IUserTransitionedState extends Document { + toEpoch: number + fromEpoch: number + fromGlobalStateTree: BigNumber + fromEpochTree: BigNumber + fromNullifierTreeRoot: BigNumber + proof: [ string ] + attestationNullifiers: [ string ] + epkNullifiers: [ string ] + } + + const UserTransitionedStateSchema: Schema = new Schema({ + toEpoch: { type: Number, required: true }, + fromEpoch: { type: Number, required: true }, + fromGlobalStateTree: { type: {}, required: true }, + fromEpochTree: { type: {}, required: true}, + fromNullifierTreeRoot: { type: {}, required: true }, + proof: { type: [] }, + attestationNullifiers: { type: [] }, + epkNullifiers: { type: [] }, + }, { collection: 'UserTransitionedStates' }); + + export default mongoose.model('UserTransitionedState', UserTransitionedStateSchema); \ No newline at end of file From 69070ea53cf095f6a180c2744a096af2c4907297 Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Tue, 13 Apr 2021 17:17:24 +0800 Subject: [PATCH 11/38] submit karma nullifiers while upvote/downvote/post/comment --- .DS_Store | Bin 8196 -> 10244 bytes circuits/proveReputation.circom | 208 +++++++++------- circuits/proveReputationFromAttester.circom | 231 ++++++++++++++++++ .../proveReputationFromAttester_test.circom | 3 + circuits/test/proveReputation_test.circom | 2 +- circuits/test/verifyEpochKey_test.circom | 2 +- circuits/userExists.circom | 54 ++++ circuits/userStateTransition.circom | 82 +++++-- circuits/verifiyEpochKey.circom | 51 +--- cli/defaults.ts | 2 - cli/deploy.ts | 5 + cli/leaveComment.ts | 148 +++++++++-- cli/publishPost.ts | 157 +++++++++--- cli/test/testAllCommands.ts | 125 ++++++---- cli/vote.ts | 134 ++++++---- config/nullifierDomainSeparator.ts | 3 + config/socialMedia.ts | 20 ++ contracts/.DS_Store | Bin 0 -> 6148 bytes contracts/DomainObjs.sol | 7 + contracts/Unirep.sol | 168 +++++++++++-- contracts/UnirepParameters.sol | 11 + core/UnirepState.ts | 12 + core/UserState.ts | 139 ++++++++--- core/utils.ts | 142 ++++++++--- test/utils.ts | 16 +- 25 files changed, 1321 insertions(+), 401 deletions(-) create mode 100644 circuits/proveReputationFromAttester.circom create mode 100644 circuits/test/proveReputationFromAttester_test.circom create mode 100644 circuits/userExists.circom create mode 100644 config/socialMedia.ts create mode 100644 contracts/.DS_Store diff --git a/.DS_Store b/.DS_Store index 8113852b3e2d341e015a7e34784d3b2ca2b78a39..2d99151b51860336249186ecd81455336e583373 100644 GIT binary patch literal 10244 zcmeHM-D(p-6h4!tZGx>$L9kv3OF{6WhWylm7eb8bMK1&~q8BP@(!_Q(-3`g6p^YiI z_X+f(ui$g|0OGTFrQeyIhM7&G6e9$gk(skQd%iO>-PoyY(!QLqrKwmZ=pq z6AFLlI#yz;XA@EYPxO|mbU*=h_L^hbw!<=D8L$jk1}p=Xfq7s6zu8<8*FtGq%YbFT zGB9F*`xZwYQPAyL$faAJm$D4PW^{ zeZhgc{!oa`O4@!Ism1kjrd2+xeZrAep#%C;M=3|M>K*|6y?c zNiLU!iaN9wzK`0^c+$u?DYw0*?;WC-5$mAH1+@p%g$$@d8TBtsXY`&LbZXKU15%u8 zL?hFunxo2JLp_{NLTBNF z$!PYZj!qe4^YQgCW^*c@Io9#FfNx{=Ct&Ous`Lvi@Gn0HgbJSERkUg7Wx;2}!}9+D zy2XtvSnObbADjH}PBV7FRc6@3%sWww>}O-mNvw1iy(M}AnMPYO=O9Dgg|=&#VUTS<21LA6E)_AW%UiDK1o^JrLET5?!g|9{N(dTO;eL4?j~Bj< zzpMH(EV<{4jJC&|MNcv%;w_H=KnVT4=;45W$=6(ey-(~bCm!80#=h; AeE= neg_rep - component rep_diff_get = GreaterEqThan(MAX_REPUTATION_SCORE_BITS); - rep_diff_get.in[0] <== pos_rep; - rep_diff_get.in[1] <== neg_rep; - // // check if (pos_rep - neg_rep) > min_rep_diff - component rep_diff_gt = GreaterThan(MAX_REPUTATION_SCORE_BITS); - rep_diff_gt.in[0] <== pos_rep - neg_rep; - rep_diff_gt.in[1] <== min_rep_diff; - rep_diff_get.out * prove_rep_diff + Not(prove_rep_diff) === 1; - rep_diff_gt.out * prove_rep_diff + Not(prove_rep_diff) === 1; - /* End of check 5 */ + /* 6. Check total reputation is greater than 0 */ + // if user wants to spend karma and prove total_reputation, it requires reputation to be positive + // total_reputation = positive_karma - negative_karma >= 0 + component pos_rep_get = GreaterEqThan(MAX_REPUTATION_SCORE_BITS); + pos_rep_get.in[0] <== positive_karma; + pos_rep_get.in[1] <== negative_karma; + pos_rep_get.out === 1; + /* End of check 6*/ + + + /* 7. Check nullifiers are valid */ + component karma_nullifier_hasher[MAX_KARMA_BUDGET]; + component nonce_gt[MAX_KARMA_BUDGET]; + for(var i = 0; i< MAX_KARMA_BUDGET; i++) { + // 7.1 verify is nonce is valid + // If user wants to generate karma nullifiers, check if positive_karma - negative_karma > karma_nonce + // Eg. if we have 10 karma, we have 0-9 valid nonce + nonce_gt[i] = GreaterThan(MAX_REPUTATION_SCORE_BITS); + nonce_gt[i].in[0] <== positive_karma - negative_karma; + nonce_gt[i].in[1] <== karma_nonce[i]; + nonce_gt[i].out * prove_karma_nullifiers + Not(prove_karma_nullifiers) === 1; + + // 6.2 Use karma_nonce to compute all karma nullifiers + karma_nullifier_hasher[i] = Hasher5(); + karma_nullifier_hasher[i].in[0] <== 3; // 3 is the domain separator for karma nullifier + karma_nullifier_hasher[i].in[1] <== identity_nullifier; + karma_nullifier_hasher[i].in[2] <== epoch; + karma_nullifier_hasher[i].in[3] <== karma_nonce[i]; + karma_nullifier_hasher[i].in[4] <== 0; + karma_nullifiers[i] <== karma_nullifier_hasher[i].hash; + } + /* End of check 7 */ - /* 6. Check pre-image of graffiti */ - component graffiti_hasher = HashLeftRight(); - graffiti_hasher.left <== graffiti_pre_image; - graffiti_hasher.right <== 0; - component graffiti_eq = IsEqual(); - graffiti_eq.in[0] <== graffiti_hasher.hash; - graffiti_eq.in[1] <== graffiti; - graffiti_eq.out * prove_graffiti + Not(prove_graffiti) === 1; - /* End of check 6 */ + /* 8. Check if user has reputation greater than min_rep */ + component rep_get = GreaterEqThan(MAX_REPUTATION_SCORE_BITS); + rep_get.in[0] <== positive_karma - negative_karma; + rep_get.in[1] <== min_rep; + rep_get.out * prove_min_rep + Not(prove_min_rep) === 1; + /* End of check 8 */ } \ No newline at end of file diff --git a/circuits/proveReputationFromAttester.circom b/circuits/proveReputationFromAttester.circom new file mode 100644 index 0000000..4fcae0b --- /dev/null +++ b/circuits/proveReputationFromAttester.circom @@ -0,0 +1,231 @@ +include "../node_modules/circomlib/circuits/comparators.circom"; +include "./hasherPoseidon.circom"; +include "./identityCommitment.circom"; +include "./incrementalMerkleTree.circom"; +include "./modulo.circom"; +include "./sparseMerkleTree.circom"; + +function Not(in) { + return 1 + in - (2 * in); +} + +template ProveReputation( + GST_tree_depth, + user_state_tree_depth, + nullifier_tree_depth, + EPOCH_KEY_NONCE_PER_EPOCH, + MAX_REPUTATION_SCORE_BITS, + NUM_ATTESTATIONS, + MAX_KARMA_BUDGET) { + signal input epoch; + signal private input nonce; + + // Global state tree leaf: Identity & user state root + signal private input identity_pk[2]; + signal private input identity_nullifier; + signal private input identity_trapdoor; + signal private input user_tree_root; + signal private input user_state_hash; + // Global state tree + signal private input GST_path_index[GST_tree_depth]; + signal private input GST_path_elements[GST_tree_depth][1]; + signal input GST_root; + // Nullifier tree + signal input nullifier_tree_root + signal private input nullifier_path_elements[nullifier_tree_depth][1]; + // Attester to prove reputation from + signal input attester_id; + // Attestation by the attester + signal private input pos_rep; + signal private input neg_rep; + signal private input graffiti; + signal private input UST_path_elements[user_state_tree_depth][1]; + // Sum of positive and negative karma + signal private input positive_karma; + signal private input negative_karma; + // Karma nullifier + signal input prove_karma_nullifiers; + signal input prove_karma_amount; + signal private input karma_nonce[MAX_KARMA_BUDGET]; + signal output karma_nullifiers[MAX_KARMA_BUDGET]; + // Prove the minimum reputation + signal input prove_min_rep; + signal input min_rep; + + /* 1. Check nonce validity */ + var bitsPerNonce = 8; + + component nonce_lt = LessThan(bitsPerNonce); + nonce_lt.in[0] <== nonce; + nonce_lt.in[1] <== EPOCH_KEY_NONCE_PER_EPOCH; + nonce_lt.out === 1; + /* End of check 1 */ + + + /* 2. Check if the reputation given by the attester is in the user state tree */ + component reputation_hasher = Hasher5(); + reputation_hasher.in[0] <== pos_rep; + reputation_hasher.in[1] <== neg_rep; + reputation_hasher.in[2] <== graffiti; + reputation_hasher.in[3] <== 0; + reputation_hasher.in[4] <== 0; + + component reputation_membership_check = SMTLeafExists(user_state_tree_depth); + reputation_membership_check.leaf_index <== attester_id; + reputation_membership_check.leaf <== reputation_hasher.hash; + for (var i = 0; i < user_state_tree_depth; i++) { + reputation_membership_check.path_elements[i][0] <== UST_path_elements[i][0]; + } + + reputation_membership_check.root <== user_tree_root; + /* End of check 2 */ + + + /* 3. Check if user exists in the Global State Tree */ + component identity_commitment = IdentityCommitment(); + identity_commitment.identity_pk[0] <== identity_pk[0]; + identity_commitment.identity_pk[1] <== identity_pk[1]; + identity_commitment.identity_nullifier <== identity_nullifier; + identity_commitment.identity_trapdoor <== identity_trapdoor; + + // 3.1 Compute user state tree root + component state = HashLeftRight(); + state.left <== identity_commitment.out; + state.right <== user_tree_root; + + // 3.2 Compute hashed karma + component karma = HashLeftRight(); + karma.left <== positive_karma; + karma.right <== negative_karma; + + // 3.3 Compute hashed leaf + component leaf = HashLeftRight(); + leaf.left <== state.hash; + leaf.right <== karma.hash; + + // 3.4 Check computed hash == user state tree leaf + leaf.hash === user_state_hash; + + // 3.6 Check if user state hash is in GST + component GST_leaf_exists = LeafExists(GST_tree_depth); + GST_leaf_exists.leaf <== leaf.hash; + for (var i = 0; i < GST_tree_depth; i++) { + GST_leaf_exists.path_index[i] <== GST_path_index[i]; + GST_leaf_exists.path_elements[i][0] <== GST_path_elements[i][0]; + } + GST_leaf_exists.root <== GST_root; + /* End of check 3 */ + + + /* 4. Check it's latest epoch the user transition to */ + // We check that nullifier of the epoch key is not seen before. + // 4.1.1 Compute nullifier of the epoch key + component epoch_key_nullifier_hasher = Hasher5(); + epoch_key_nullifier_hasher.in[0] <== 2; // 2 is the domain separator for epoch key nullifier + epoch_key_nullifier_hasher.in[1] <== identity_nullifier; + epoch_key_nullifier_hasher.in[2] <== epoch; + epoch_key_nullifier_hasher.in[3] <== nonce; + epoch_key_nullifier_hasher.in[4] <== 0; + // 4.1.2 Mod nullifier hash + // circom's best practices state that we should avoid using <-- unless + // we know what we are doing. But this is the only way to perform the + // modulo operation. + signal epk_nullifier_hash_moded; + component modEPKNullifier = ModuloTreeDepth(nullifier_tree_depth); + modEPKNullifier.dividend <== epoch_key_nullifier_hasher.hash; + epk_nullifier_hash_moded <== modEPKNullifier.remainder; + + // 4.2 Verify non-membership of the nullifier in nullifier tree + // Unseen nullifier leaf should have value hashLeftRight(0, 0) + signal zero_leaf; + component zero_leaf_hasher = HashLeftRight(); + zero_leaf_hasher.left <== 0; + zero_leaf_hasher.right <== 0; + zero_leaf <== zero_leaf_hasher.hash; + + component epk_exists = SMTLeafExists(nullifier_tree_depth); + epk_exists.leaf_index <== epk_nullifier_hash_moded; + epk_exists.leaf <== zero_leaf; + epk_exists.root <== nullifier_tree_root; + for (var i = 0; i < nullifier_tree_depth; i++) { + epk_exists.path_elements[i][0] <== nullifier_path_elements[i][0]; + } + /* End of check 4 */ + + + /* 5. Check total reputation is greater than 0 */ + // if user wants to spend karma and prove total_reputation, it requires reputation to be positive + // total_reputation = positive_karma - negative_karma >= 0 + component pos_rep_get = GreaterEqThan(MAX_REPUTATION_SCORE_BITS); + pos_rep_get.in[0] <== positive_karma; + pos_rep_get.in[1] <== negative_karma; + pos_rep_get.out === 1; + /* End of check 5*/ + + + /* 6. Check nullifiers are valid */ + component karma_nullifier_hasher[MAX_KARMA_BUDGET]; + component nonce_gt[MAX_KARMA_BUDGET]; + for(var i = 0; i< MAX_KARMA_BUDGET; i++) { + // 6.1 verify is nonce is valid + // If user wants to generate karma nullifiers, check if positive_karma - negative_karma > karma_nonce + // Eg. if we have 10 karma, we have 0-9 valid nonce + nonce_gt[i] = GreaterThan(MAX_REPUTATION_SCORE_BITS); + nonce_gt[i].in[0] <== positive_karma - negative_karma; + nonce_gt[i].in[1] <== karma_nonce[i]; + nonce_gt[i].out * prove_karma_nullifiers + Not(prove_karma_nullifiers) === 1; + + // 6.2 Use karma_nonce to compute all karma nullifiers + karma_nullifier_hasher[i] = Hasher5(); + karma_nullifier_hasher[i].in[0] <== 3; // 3 is the domain separator for karma nullifier + karma_nullifier_hasher[i].in[1] <== identity_nullifier; + karma_nullifier_hasher[i].in[2] <== epoch; + karma_nullifier_hasher[i].in[3] <== karma_nonce[i]; + karma_nullifier_hasher[i].in[4] <== 0; + karma_nullifiers[i] <== karma_nullifier_hasher[i].hash; + } + /* End of check 6 */ + + + /* 7. Check if user has reputation greater than min_rep */ + component rep_get = GreaterEqThan(MAX_REPUTATION_SCORE_BITS); + rep_get.in[0] <== positive_karma - negative_karma; + rep_get.in[1] <== min_rep; + rep_get.out * prove_min_rep + Not(prove_min_rep) === 1; + /* End of check 7 */ + + // if prove_pos_rep == TRUE then check GT + // else return TRUE + // component pos_rep_gt = GreaterThan(MAX_REPUTATION_SCORE_BITS); + // pos_rep_gt.in[0] <== pos_rep; + // pos_rep_gt.in[1] <== min_pos_rep; + // pos_rep_gt.out * prove_pos_rep + Not(prove_pos_rep) === 1; + + + // component neg_rep_lt = LessThan(MAX_REPUTATION_SCORE_BITS); + // neg_rep_lt.in[0] <== neg_rep; + // neg_rep_lt.in[1] <== max_neg_rep; + // neg_rep_lt.out * prove_neg_rep + Not(prove_neg_rep) === 1; + + // only valid if pos_rep >= neg_rep + // component rep_diff_get = GreaterEqThan(MAX_REPUTATION_SCORE_BITS); + // rep_diff_get.in[0] <== pos_rep; + // rep_diff_get.in[1] <== neg_rep; + // // check if (pos_rep - neg_rep) > min_rep_diff + // component rep_diff_gt = GreaterThan(MAX_REPUTATION_SCORE_BITS); + // rep_diff_gt.in[0] <== pos_rep - neg_rep; + // rep_diff_gt.in[1] <== min_rep_diff; + // rep_diff_get.out * prove_rep_diff + Not(prove_rep_diff) === 1; + // rep_diff_gt.out * prove_rep_diff + Not(prove_rep_diff) === 1; + + /* 7. Check pre-image of graffiti */ + // component graffiti_hasher = HashLeftRight(); + // graffiti_hasher.left <== graffiti_pre_image; + // graffiti_hasher.right <== 0; + // component graffiti_eq = IsEqual(); + // graffiti_eq.in[0] <== graffiti_hasher.hash; + // graffiti_eq.in[1] <== graffiti; + // graffiti_eq.out * prove_graffiti + Not(prove_graffiti) === 1; + + /* End of check 7 */ + } \ No newline at end of file diff --git a/circuits/test/proveReputationFromAttester_test.circom b/circuits/test/proveReputationFromAttester_test.circom new file mode 100644 index 0000000..58ec4c2 --- /dev/null +++ b/circuits/test/proveReputationFromAttester_test.circom @@ -0,0 +1,3 @@ +include "../proveReputation.circom" + +component main = ProveReputation(4, 4, 128, 2, 252, 10, 10); \ No newline at end of file diff --git a/circuits/test/proveReputation_test.circom b/circuits/test/proveReputation_test.circom index 0c2ea5e..4afb512 100644 --- a/circuits/test/proveReputation_test.circom +++ b/circuits/test/proveReputation_test.circom @@ -1,3 +1,3 @@ include "../proveReputation.circom" -component main = ProveReputation(4, 4, 128, 2, 252); \ No newline at end of file +component main = ProveReputation(4, 4, 128, 8, 2, 252, 10, 10); \ No newline at end of file diff --git a/circuits/test/verifyEpochKey_test.circom b/circuits/test/verifyEpochKey_test.circom index 50458d3..942f7b0 100644 --- a/circuits/test/verifyEpochKey_test.circom +++ b/circuits/test/verifyEpochKey_test.circom @@ -1,3 +1,3 @@ include "../verifiyEpochKey.circom" -component main = VerifyEpochKey(4, 8, 2); \ No newline at end of file +component main = verifyEpochKey(8, 2); \ No newline at end of file diff --git a/circuits/userExists.circom b/circuits/userExists.circom new file mode 100644 index 0000000..7e608e3 --- /dev/null +++ b/circuits/userExists.circom @@ -0,0 +1,54 @@ +include "./hasherPoseidon.circom"; +include "./identityCommitment.circom"; +include "./incrementalMerkleTree.circom"; + +template userExists(GST_tree_depth){ + // Global state tree + signal private input GST_path_index[GST_tree_depth]; + signal private input GST_path_elements[GST_tree_depth][1]; + signal input GST_root; + // Global state tree leaf: Identity & user state root + signal private input identity_pk[2]; + signal private input identity_nullifier; + signal private input identity_trapdoor; + signal private input user_tree_root; + signal private input user_state_hash; + // Sum of positive and negative karma + signal private input positive_karma; + signal private input negative_karma; + signal output out; + + component identity_commitment = IdentityCommitment(); + identity_commitment.identity_pk[0] <== identity_pk[0]; + identity_commitment.identity_pk[1] <== identity_pk[1]; + identity_commitment.identity_nullifier <== identity_nullifier; + identity_commitment.identity_trapdoor <== identity_trapdoor; + out <== identity_commitment.out; + + // 3.1 Compute user state tree root + component state = HashLeftRight(); + state.left <== identity_commitment.out; + state.right <== user_tree_root; + + // 3.2 Compute hashed karma + component karma = HashLeftRight(); + karma.left <== positive_karma; + karma.right <== negative_karma; + + // 3.3 Compute hashed leaf + component leaf = HashLeftRight(); + leaf.left <== state.hash; + leaf.right <== karma.hash; + + // 3.4 Check computed hash == user state tree leaf + leaf.hash === user_state_hash; + + // 3.6 Check if user state hash is in GST + component GST_leaf_exists = LeafExists(GST_tree_depth); + GST_leaf_exists.leaf <== leaf.hash; + for (var i = 0; i < GST_tree_depth; i++) { + GST_leaf_exists.path_index[i] <== GST_path_index[i]; + GST_leaf_exists.path_elements[i][0] <== GST_path_elements[i][0]; + } + GST_leaf_exists.root <== GST_root; +} \ No newline at end of file diff --git a/circuits/userStateTransition.circom b/circuits/userStateTransition.circom index f276662..5372555 100644 --- a/circuits/userStateTransition.circom +++ b/circuits/userStateTransition.circom @@ -1,11 +1,11 @@ include "../node_modules/circomlib/circuits/comparators.circom"; include "../node_modules/circomlib/circuits/mux1.circom"; include "./hasherPoseidon.circom"; -include "./identityCommitment.circom"; include "./incrementalMerkleTree.circom"; include "./modulo.circom"; include "./sparseMerkleTree.circom"; include "./processAttestations.circom"; +include "./userExists.circom"; template epochKeyExist(epoch_tree_depth) { signal input identity_nullifier; @@ -40,7 +40,14 @@ template epochKeyExist(epoch_tree_depth) { epoch_key <== epkModed; } -template UserStateTransition(GST_tree_depth, epoch_tree_depth, nullifier_tree_depth, user_state_tree_depth, ATTESTATIONS_PER_EPOCH_KEY, EPOCH_KEY_NONCE_PER_EPOCH, TOTAL_NUM_ATTESTATIONS) { +template UserStateTransition( + GST_tree_depth, + epoch_tree_depth, + nullifier_tree_depth, + user_state_tree_depth, + ATTESTATIONS_PER_EPOCH_KEY, + EPOCH_KEY_NONCE_PER_EPOCH, + TOTAL_NUM_ATTESTATIONS) { signal input epoch; // User state tree @@ -57,6 +64,12 @@ template UserStateTransition(GST_tree_depth, epoch_tree_depth, nullifier_tree_de signal private input identity_pk[2]; signal private input identity_nullifier; signal private input identity_trapdoor; + signal private input user_tree_root; + signal private input user_state_hash; + // Sum of positive and negative karma + signal private input old_positive_karma; + signal private input old_negative_karma; + // Global state tree signal private input GST_path_elements[GST_tree_depth][1]; signal private input GST_path_index[GST_tree_depth]; @@ -70,6 +83,10 @@ template UserStateTransition(GST_tree_depth, epoch_tree_depth, nullifier_tree_de signal private input neg_reps[TOTAL_NUM_ATTESTATIONS]; signal private input graffities[TOTAL_NUM_ATTESTATIONS]; signal private input overwrite_graffitis[TOTAL_NUM_ATTESTATIONS]; + // Sum of positive and negative karma + signal private input positive_karma; + signal private input negative_karma; + signal input airdropped_karma; // Epoch key & epoch tree signal private input epk_path_elements[EPOCH_KEY_NONCE_PER_EPOCH][epoch_tree_depth][1]; @@ -92,24 +109,20 @@ template UserStateTransition(GST_tree_depth, epoch_tree_depth, nullifier_tree_de /* 1. Check if user exists in the Global State Tree */ - component identity_commitment = IdentityCommitment(); - identity_commitment.identity_pk[0] <== identity_pk[0]; - identity_commitment.identity_pk[1] <== identity_pk[1]; - identity_commitment.identity_nullifier <== identity_nullifier; - identity_commitment.identity_trapdoor <== identity_trapdoor; - - component leaf = HashLeftRight(); - leaf.left <== identity_commitment.out; - // First intermediate root is the user state tree root before processing - leaf.right <== intermediate_user_state_tree_roots[0]; - - component GST_leaf_exists = LeafExists(GST_tree_depth); - GST_leaf_exists.leaf <== leaf.hash; - for (var i = 0; i < GST_tree_depth; i++) { - GST_leaf_exists.path_index[i] <== GST_path_index[i]; - GST_leaf_exists.path_elements[i][0] <== GST_path_elements[i][0]; + component user_exist = userExists(GST_tree_depth); + for (var i = 0; i< GST_tree_depth; i++) { + user_exist.GST_path_index[i] <== GST_path_index[i]; + user_exist.GST_path_elements[i][0] <== GST_path_elements[i][0]; } - GST_leaf_exists.root <== GST_root; + user_exist.GST_root <== GST_root; + user_exist.identity_pk[0] <== identity_pk[0]; + user_exist.identity_pk[1] <== identity_pk[1]; + user_exist.identity_nullifier <== identity_nullifier; + user_exist.identity_trapdoor <== identity_trapdoor; + user_exist.user_tree_root <== user_tree_root; + user_exist.user_state_hash <== user_state_hash; + user_exist.positive_karma <== old_positive_karma; + user_exist.negative_karma <== old_negative_karma; /* End of check 1 */ /* 2. Process the attestations of the epoch key specified by nonce `n` and verify attestation nullifiers */ @@ -176,11 +189,34 @@ template UserStateTransition(GST_tree_depth, epoch_tree_depth, nullifier_tree_de /* 3. Compute and output new GST leaf */ - // 3.1 Compute new GST leaf - component new_leaf = HashLeftRight(); - new_leaf.left <== identity_commitment.out; + // 3.1 Comput total positive and negative reputation + // if positive and negative are verified by provess_attestations + // then we sum all pos_reps and neg_reps + var pos_rep_sum = old_positive_karma + airdropped_karma; + var neg_rep_sum = old_negative_karma; + for (var i = 0; i < TOTAL_NUM_ATTESTATIONS; i++){ + pos_rep_sum += pos_reps[i]; + neg_rep_sum += neg_reps[i]; + } + pos_rep_sum === positive_karma; + neg_rep_sum === negative_karma; + + // 3.2 Compute new GST leaf + // 3.2.1 Compute user state tree root + component new_state = HashLeftRight(); + new_state.left <== user_exist.out; // Last intermediate root is the new user state tree root - new_leaf.right <== intermediate_user_state_tree_roots[TOTAL_NUM_ATTESTATIONS]; + new_state.right <== intermediate_user_state_tree_roots[TOTAL_NUM_ATTESTATIONS]; + + // 3.2.2 Compute hashed karma + component new_karma = HashLeftRight(); + new_karma.left <== positive_karma; + new_karma.right <== negative_karma; + + // 3.2.3 Compute hashed leaf + component new_leaf = HashLeftRight(); + new_leaf.left <== new_state.hash; + new_leaf.right <== new_karma.hash; new_GST_leaf <== new_leaf.hash; /* End of 3. compute and output new GST leaf */ } \ No newline at end of file diff --git a/circuits/verifiyEpochKey.circom b/circuits/verifiyEpochKey.circom index 14afc36..426d5e5 100644 --- a/circuits/verifiyEpochKey.circom +++ b/circuits/verifiyEpochKey.circom @@ -1,56 +1,25 @@ include "../node_modules/circomlib/circuits/comparators.circom"; include "./hasherPoseidon.circom"; -include "./identityCommitment.circom"; include "./incrementalMerkleTree.circom"; -template VerifyEpochKey(GST_tree_depth, epoch_tree_depth, EPOCH_KEY_NONCE_PER_EPOCH) { - signal private input identity_pk[2]; +template verifyEpochKey(epoch_tree_depth, EPOCH_KEY_NONCE_PER_EPOCH) { signal private input identity_nullifier; - signal private input identity_trapdoor; - - signal private input user_state_root; - - signal private input path_elements[GST_tree_depth][1]; - signal private input path_index[GST_tree_depth]; - signal input root; - signal private input nonce; signal input epoch; signal input epoch_key; - /* 1. Check if user exists in the Global State Tree */ - component identity_commitment = IdentityCommitment(); - identity_commitment.identity_pk[0] <== identity_pk[0]; - identity_commitment.identity_pk[1] <== identity_pk[1]; - identity_commitment.identity_nullifier <== identity_nullifier; - identity_commitment.identity_trapdoor <== identity_trapdoor; - - component leaf = HashLeftRight(); - leaf.left <== identity_commitment.out; - leaf.right <== user_state_root; - - component GST_leaf_exists = LeafExists(GST_tree_depth); - GST_leaf_exists.leaf <== leaf.hash; - for (var i = 0; i < GST_tree_depth; i++) { - GST_leaf_exists.path_index[i] <== path_index[i]; - GST_leaf_exists.path_elements[i][0] <== path_elements[i][0]; - } - GST_leaf_exists.root <== root; - /* End of check 1*/ - - - /* 2. Check nonce validity */ + /* 1. Check nonce validity */ var bitsPerNonce = 8; component nonce_lt = LessThan(bitsPerNonce); nonce_lt.in[0] <== nonce; nonce_lt.in[1] <== EPOCH_KEY_NONCE_PER_EPOCH; nonce_lt.out === 1; - /* End of check 2*/ + /* End of check 1*/ - /* 3. Check epoch key is computed correctly */ - // 3.1.1 Compute epoch key + /* 2. Check epoch key is computed correctly */ + // 2.1.1 Compute epoch key component epochKeyHasher = Hasher5(); epochKeyHasher.in[0] <== identity_nullifier; epochKeyHasher.in[1] <== epoch; @@ -59,25 +28,25 @@ template VerifyEpochKey(GST_tree_depth, epoch_tree_depth, EPOCH_KEY_NONCE_PER_EP epochKeyHasher.in[4] <== 0; signal quotient; - // 3.1.2 Mod epoch key + // 2.1.2 Mod epoch key // circom's best practices state that we should avoid using <-- unless // we know what we are doing. But this is the only way to perform the // modulo operation. quotient <-- epochKeyHasher.hash \ (2 ** epoch_tree_depth); - // 3.1.3 Range check on epoch key + // 2.1.3 Range check on epoch key component epk_lt = LessEqThan(epoch_tree_depth); epk_lt.in[0] <== epoch_key; epk_lt.in[1] <== 2 ** epoch_tree_depth - 1; epk_lt.out === 1; - // 3.1.4 Range check on quotient + // 2.1.4 Range check on quotient component quot_lt = LessEqThan(254 - epoch_tree_depth); quot_lt.in[0] <== quotient; quot_lt.in[1] <== 2 ** (254 - epoch_tree_depth) - 1; quot_lt.out === 1; - // 3.1.5 Check equality + // 2.1.5 Check equality epochKeyHasher.hash === quotient * (2 ** epoch_tree_depth) + epoch_key; - /* End of check 3*/ + /* End of check 2*/ } \ No newline at end of file diff --git a/cli/defaults.ts b/cli/defaults.ts index 1fe81a4..1337ac5 100644 --- a/cli/defaults.ts +++ b/cli/defaults.ts @@ -7,7 +7,6 @@ const DEFAULT_NUM_ATTESTATIONS_PER_EPOCH_KEY = numAttestationsPerEpochKey const DEFAULT_EPOCH_LENGTH = epochLength const DEFAULT_ATTESTING_FEE = attestingFee const DEFAULT_TREE_DEPTHS_CONFIG = 'circuit' -const DEFAULT_MAX_POST_ID = 2**10 export { DEFAULT_ETH_PROVIDER, @@ -17,5 +16,4 @@ export { DEFAULT_EPOCH_LENGTH, DEFAULT_ATTESTING_FEE, DEFAULT_TREE_DEPTHS_CONFIG, - DEFAULT_MAX_POST_ID } \ No newline at end of file diff --git a/cli/deploy.ts b/cli/deploy.ts index 61cdfe0..327b909 100644 --- a/cli/deploy.ts +++ b/cli/deploy.ts @@ -1,4 +1,5 @@ import { ethers } from 'ethers' +import { DEFAULT_START_KARMA } from '../config/socialMedia' import { maxUsers } from '../config/testLocal' import { deployUnirep, getTreeDepthsForTesting } from '../test/utils' import { DEFAULT_ATTESTING_FEE, DEFAULT_EPOCH_LENGTH, DEFAULT_ETH_PROVIDER, DEFAULT_MAX_EPOCH_KEY_NONCE, DEFAULT_NUM_ATTESTATIONS_PER_EPOCH_KEY, DEFAULT_TREE_DEPTHS_CONFIG } from './defaults' @@ -104,6 +105,9 @@ const deploy = async (args: any) => { const _numAttestationsPerEpochKey = DEFAULT_NUM_ATTESTATIONS_PER_EPOCH_KEY + // Default given karma + const _deaultKarma = DEFAULT_START_KARMA + // Epoch length const _epochLength = (args.epoch_length != undefined) ? args.epoch_length : DEFAULT_EPOCH_LENGTH @@ -114,6 +118,7 @@ const deploy = async (args: any) => { 'maxUsers': maxUsers, 'numEpochKeyNoncePerEpoch': _numEpochKeyNoncePerEpoch, 'numAttestationsPerEpochKey': _numAttestationsPerEpochKey, + 'defaultKarma': _deaultKarma, 'epochLength': _epochLength, 'attestingFee': _attestingFee, } diff --git a/cli/leaveComment.ts b/cli/leaveComment.ts index 9dfc05a..5b42732 100644 --- a/cli/leaveComment.ts +++ b/cli/leaveComment.ts @@ -1,6 +1,7 @@ import base64url from 'base64url' import { ethers as hardhatEthers } from 'hardhat' import { ethers } from 'ethers' +import { genIdentityCommitment, unSerialiseIdentity } from 'libsemaphore' import { promptPwd, @@ -10,18 +11,23 @@ import { contractExists, } from './utils' -import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK, DEFAULT_MAX_POST_ID } from './defaults' +import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' import { dbUri } from '../config/database'; import { add0x } from '../crypto/SMT' -import { genUnirepStateFromContract } from '../core' +import { genUnirepStateFromContract, genUserStateFromContract } from '../core' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" -import { epkProofPrefix } from './prefix' +import { epkProofPrefix, identityPrefix } from './prefix' import Comment, { IComment } from "../database/models/comment"; import Post, { IPost } from "../database/models/post"; import mongoose from 'mongoose' +import { DEFAULT_COMMENT_KARMA } from '../config/socialMedia' +import { formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyProveReputationProof } from '../test/circuits/utils' +import { stringifyBigInts } from 'maci-crypto' +import { nullifierTreeDepth } from '../config/testLocal' +import { genEpochKey } from '../test/utils' const configureSubparser = (subparsers: any) => { const parser = subparsers.addParser( @@ -56,15 +62,40 @@ const configureSubparser = (subparsers: any) => { } ) - // verify identity - // parser.addArgument( - // ['-c', '--identity-commitment'], - // { - // required: true, - // type: 'string', - // help: 'The user\'s identity commitment (in hex representation)', - // } - // ) + parser.addArgument( + ['-id', '--identity'], + { + required: true, + type: 'string', + help: 'The (serialized) user\'s identity', + } + ) + + parser.addArgument( + ['-n', '--epoch-key-nonce'], + { + required: true, + type: 'int', + help: 'The epoch key nonce', + } + ) + + parser.addArgument( + ['-kn', '--karma-nonce'], + { + required: true, + type: 'int', + help: `The first nonce to generate karma nullifiers. It will generate ${DEFAULT_COMMENT_KARMA} nullifiers`, + } + ) + + parser.addArgument( + ['-mr', '--min-rep'], + { + type: 'int', + help: 'The minimum reputation score the user has', + } + ) parser.addArgument( ['-x', '--contract'], @@ -137,14 +168,87 @@ const leaveComment = async (args: any) => { } const startBlock = (args.start_block) ? args.start_block : DEFAULT_START_BLOCK + const unirepContract = new ethers.Contract( + unirepAddress, + Unirep.abi, + wallet, + ) + const attestingFee = await unirepContract.attestingFee() + const unirepState = await genUnirepStateFromContract( provider, unirepAddress, startBlock, - ) + ) + + // Validate epoch key nonce + const epkNonce = args.epoch_key_nonce + const numEpochKeyNoncePerEpoch = await unirepContract.numEpochKeyNoncePerEpoch() + if (epkNonce >= numEpochKeyNoncePerEpoch) { + console.error('Error: epoch key nonce must be less than max epoch key nonce') + return + } + const encodedIdentity = args.identity.slice(identityPrefix.length) + const decodedIdentity = base64url.decode(encodedIdentity) + const id = unSerialiseIdentity(decodedIdentity) + const commitment = genIdentityCommitment(id) + const currentEpoch = (await unirepContract.currentEpoch()).toNumber() + const treeDepths = await unirepContract.treeDepths() + const epochTreeDepth = treeDepths.epochTreeDepth + const epk = genEpochKey(id.identityNullifier, currentEpoch, epkNonce, epochTreeDepth).toString(16) + + // Gen epoch key proof and reputation proof + const userState = await genUserStateFromContract( + provider, + unirepAddress, + startBlock, + id, + commitment, + ) + + // gen nullifier nonce list + const proveKarmaNullifiers = BigInt(1) + const proveKarmaAmount = BigInt(DEFAULT_COMMENT_KARMA) + const nonceStarter: number = args.karma_nonce + const nonceList: BigInt[] = [] + for (let i = 0; i < DEFAULT_COMMENT_KARMA; i++) { + nonceList.push( BigInt(nonceStarter + i) ) + } + + // gen minRep proof + const proveMinRep = args.min_rep != null ? BigInt(1) : BigInt(0) + const minRep = args.min_rep != null ? BigInt(args.min_rep) : BigInt(0) + + const circuitInputs = await userState.genProveReputationCircuitInputs( + epkNonce, // generate epoch key from epoch nonce + proveKarmaNullifiers, // indicate to prove karma nullifiers + proveKarmaAmount, // the amount of output karma nullifiers + nonceList, // nonce to generate karma nullifiers + proveMinRep, // indicate to prove minimum reputation the user has + minRep // the amount of minimum reputation the user wants to prove + ) - const db = await mongoose.connect( - dbUri, + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + const nullifiers: BigInt[] = [] + + for (let i = 0; i < DEFAULT_COMMENT_KARMA; i++) { + const variableName = 'main.karma_nullifiers['+i+']' + nullifiers.push(getSignalByNameViaSym('proveReputation', results['witness'], variableName) % BigInt(2 ** nullifierTreeDepth) ) + } + + // TODO: Not sure if this validation is necessary + const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) + if(!isValid) { + console.error('Error: reputation proof generated is not valid!') + return + } + + const proof = formatProofForVerifierContract(results['proof']) + const epochKey = BigInt(add0x(epk)) + const publicSignals = results['publicSignals'] + + const db = await mongoose.connect( + dbUri, { useNewUrlParser: true, useFindAndModify: false, useUnifiedTopology: true @@ -155,18 +259,16 @@ const leaveComment = async (args: any) => { content: args.text, }); - const unirepContract = new ethers.Contract( - unirepAddress, - Unirep.abi, - wallet, - ) - let tx try { tx = await unirepContract.leaveComment( BigInt(add0x(args.post_id)), + epochKey, args.text, - { gasLimit: 1000000 } + publicSignals, + proof, + nullifiers, + { value: attestingFee, gasLimit: 1000000 } ) const postRes = await Post.findByIdAndUpdate( @@ -190,4 +292,4 @@ const leaveComment = async (args: any) => { export { leaveComment, configureSubparser, -} \ No newline at end of file +} diff --git a/cli/publishPost.ts b/cli/publishPost.ts index 3cbdf72..b425c11 100644 --- a/cli/publishPost.ts +++ b/cli/publishPost.ts @@ -1,6 +1,8 @@ import base64url from 'base64url' import { ethers as hardhatEthers } from 'hardhat' import { ethers } from 'ethers' +import { genIdentityCommitment, unSerialiseIdentity } from 'libsemaphore' +import { stringifyBigInts } from 'maci-crypto' import { promptPwd, @@ -10,17 +12,22 @@ import { contractExists, } from './utils' -import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK, DEFAULT_MAX_POST_ID } from './defaults' +import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' import { dbUri } from '../config/database'; import { add0x } from '../crypto/SMT' -import { genUnirepStateFromContract } from '../core' +import { genUnirepStateFromContract, genUserStateFromContract } from '../core' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" -import { epkProofPrefix } from './prefix' +import { identityPrefix, identityCommitmentPrefix, epkProofPrefix } from './prefix' import Post, { IPost } from "../database/models/post"; import mongoose from 'mongoose' +import { DEFAULT_POST_KARMA } from '../config/socialMedia' +import { assert } from 'console' +import { formatProofForVerifierContract, genVerifyEpochKeyProofAndPublicSignals, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyEPKProof, verifyProveReputationProof } from '../test/circuits/utils' +import { genEpochKey, genKarmaNullifier } from '../test/utils' +import { nullifierTreeDepth } from '../config/testLocal' const configureSubparser = (subparsers: any) => { const parser = subparsers.addParser( @@ -47,32 +54,39 @@ const configureSubparser = (subparsers: any) => { ) parser.addArgument( - ['-epk', '--epoch-key'], + ['-id', '--identity'], { required: true, type: 'string', - help: 'The user\'s epoch key to attest to (in hex representation)', + help: 'The (serialized) user\'s identity', } ) parser.addArgument( - ['-pf', '--proof'], + ['-n', '--epoch-key-nonce'], { required: true, - type: 'string', - help: 'The snark proof of the user\'s epoch key ', + type: 'int', + help: 'The epoch key nonce', } ) - // verify identity - // parser.addArgument( - // ['-c', '--identity-commitment'], - // { - // required: true, - // type: 'string', - // help: 'The user\'s identity commitment (in hex representation)', - // } - // ) + parser.addArgument( + ['-kn', '--karma-nonce'], + { + required: true, + type: 'int', + help: `The first nonce to generate karma nullifiers. It will generate ${DEFAULT_POST_KARMA} nullifiers`, + } + ) + + parser.addArgument( + ['-mr', '--min-rep'], + { + type: 'int', + help: 'The minimum reputation score the user has', + } + ) parser.addArgument( ['-x', '--contract'], @@ -145,18 +159,95 @@ const publishPost = async (args: any) => { } const startBlock = (args.start_block) ? args.start_block : DEFAULT_START_BLOCK + const unirepContract = new ethers.Contract( + unirepAddress, + Unirep.abi, + wallet, + ) + const attestingFee = await unirepContract.attestingFee() + const unirepState = await genUnirepStateFromContract( provider, unirepAddress, startBlock, - ) - - const currentEpoch = unirepState.currentEpoch - const GSTRoot = unirepState.genGSTree(currentEpoch).root - const epk = BigInt(add0x(args.epoch_key)) - const decodedProof = base64url.decode(args.proof.slice(epkProofPrefix.length)) - const proof = JSON.parse(decodedProof) - const publicSignals = [GSTRoot, currentEpoch, epk] + ) + + // Validate epoch key nonce + const epkNonce = args.epoch_key_nonce + const numEpochKeyNoncePerEpoch = await unirepContract.numEpochKeyNoncePerEpoch() + if (epkNonce >= numEpochKeyNoncePerEpoch) { + console.error('Error: epoch key nonce must be less than max epoch key nonce') + return + } + const encodedIdentity = args.identity.slice(identityPrefix.length) + const decodedIdentity = base64url.decode(encodedIdentity) + const id = unSerialiseIdentity(decodedIdentity) + const commitment = genIdentityCommitment(id) + const currentEpoch = (await unirepContract.currentEpoch()).toNumber() + const treeDepths = await unirepContract.treeDepths() + const epochTreeDepth = treeDepths.epochTreeDepth + const epk = genEpochKey(id.identityNullifier, currentEpoch, epkNonce, epochTreeDepth).toString(16) + + // Gen epoch key proof and reputation proof + const userState = await genUserStateFromContract( + provider, + unirepAddress, + startBlock, + id, + commitment, + ) + + // gen nullifier nonce list + const proveKarmaNullifiers = BigInt(1) + const proveKarmaAmount = BigInt(DEFAULT_POST_KARMA) + const nonceStarter: number = args.karma_nonce + const nonceList: BigInt[] = [] + for (let i = 0; i < DEFAULT_POST_KARMA; i++) { + nonceList.push( BigInt(nonceStarter + i) ) + } + + // gen minRep proof + const proveMinRep = args.min_rep != null ? BigInt(1) : BigInt(0) + const minRep = args.min_rep != null ? BigInt(args.min_rep) : BigInt(0) + + const circuitInputs = await userState.genProveReputationCircuitInputs( + epkNonce, // generate epoch key from epoch nonce + proveKarmaNullifiers, // indicate to prove karma nullifiers + proveKarmaAmount, // the amount of output karma nullifiers + nonceList, // nonce to generate karma nullifiers + proveMinRep, // indicate to prove minimum reputation the user has + minRep // the amount of minimum reputation the user wants to prove + ) + + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + const nullifiers: BigInt[] = [] + + for (let i = 0; i < DEFAULT_POST_KARMA; i++) { + const variableName = 'main.karma_nullifiers['+i+']' + nullifiers.push(getSignalByNameViaSym('proveReputation', results['witness'], variableName) % BigInt(2 ** nullifierTreeDepth) ) + } + + // TODO: Not sure if this validation is necessary + const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) + if(!isValid) { + console.error('Error: reputation proof generated is not valid!') + return + } + + const proof = formatProofForVerifierContract(results['proof']) + const epochKey = BigInt(add0x(epk)) + console.log(`Epoch key of epoch ${currentEpoch} and nonce ${epkNonce}: ${epk}`) + const publicSignals = results['publicSignals'] + + + const isProofValid = await unirepContract.verifyReputation( + publicSignals, + proof + ) + if (!isProofValid) { + console.error('Error: invalid reputation proof') + return + } const db = await mongoose.connect( dbUri, @@ -168,26 +259,21 @@ const publishPost = async (args: any) => { const newpost: IPost = new Post({ content: args.text, - epochKey: args.epoch_key, - epkProof: args.proof, + epochKey: epk, + epkProof: base64url.encode(JSON.stringify(proof)), comments: [] }); - const unirepContract = new ethers.Contract( - unirepAddress, - Unirep.abi, - wallet, - ) - let tx try { tx = await unirepContract.publishPost( BigInt(add0x(newpost._id.toString())), - epk, + epochKey, args.text, publicSignals, proof, - { gasLimit: 1000000 } + nullifiers, + { value: attestingFee, gasLimit: 1000000 } ) const res: IPost = await newpost.save() @@ -196,6 +282,7 @@ const publishPost = async (args: any) => { if (e.message) { console.error(e.message) } + db.disconnect(); return } diff --git a/cli/test/testAllCommands.ts b/cli/test/testAllCommands.ts index 93921d0..3a64988 100644 --- a/cli/test/testAllCommands.ts +++ b/cli/test/testAllCommands.ts @@ -28,6 +28,10 @@ describe('test all CLI subcommands', function() { const startBlock = 0 const attestingFee = ethers.BigNumber.from(10).pow(18) const epochKeyNonce = 0 + const epochKeyNonce2 = 1 + const postNonce = 0 + const commentNonce = 10 + const attestNonce = 15 const epochLength = 5 let unirepContract: ethers.Contract let unirepState: UnirepState @@ -37,7 +41,7 @@ describe('test all CLI subcommands', function() { let epk, epkProof const text = "postText" const text2 = "commentText" - const posRep = 10, negRep = 8, graffitiPreimage = 0, graffiti = hashOne(BigInt(graffitiPreimage)) + const posRep = 3, negRep = 8, graffitiPreimage = 0, graffiti = hashOne(BigInt(graffitiPreimage)) const minPosRep = 0, maxNegRep = 10, minRepDiff = 1 let userRepProof @@ -182,58 +186,76 @@ describe('test all CLI subcommands', function() { const signUpRegMatch = output.match(/Attester sign up with attester id: 1/) expect(signUpRegMatch).not.equal(null) }) - }) - describe('genEpochKeyAndProof CLI subcommand', () => { - it('should generate epoch key proof', async () => { - const command = `npx ts-node cli/index.ts genEpochKeyAndProof` + + it('should sign user up', async () => { + const command = `npx ts-node cli/index.ts attesterSignup` + ` -x ${unirepContract.address} ` + - ` -id ${userIdentity1} ` + - ` -n ${epochKeyNonce} ` + ` -d ${userPrivKey} ` const output = exec(command).stdout.trim() console.log(command) console.log(output) - const epkRegMatch = output.match(/Epoch key of epoch 1 and nonce 0: ([a-fA-F0-9]+)/) - epk = epkRegMatch[1] - const epkProofRegMatch = output.match(/(Unirep.epkProof.[a-zA-Z0-9\-\_]+)$/) - epkProof = epkProofRegMatch[1] + const signUpRegMatch = output.match(/Attester sign up with attester id: 2/) + expect(signUpRegMatch).not.equal(null) }) }) - describe('verifyEpochKeyProof CLI subcommand', () => { - it('should verify epoch key proof', async () => { - const command = `npx ts-node cli/index.ts verifyEpochKeyProof` + - ` -x ${unirepContract.address} ` + - ` -epk ${epk} ` + - ` -pf ${epkProof} ` + // describe('genEpochKeyAndProof CLI subcommand', () => { + // it('should generate epoch key proof', async () => { + // const command = `npx ts-node cli/index.ts genEpochKeyAndProof` + + // ` -x ${unirepContract.address} ` + + // ` -id ${userIdentity1} ` + + // ` -n ${epochKeyNonce} ` - const output = exec(command).stdout.trim() + // const output = exec(command).stdout.trim() - console.log(command) - console.log(output) + // console.log(command) + // console.log(output) - const verifyRegMatch = output.match(/Verify epoch key proof with epoch key [a-fA-F0-9]+ succeed/) - expect(verifyRegMatch).not.equal(null) - }) - }) + // const epkRegMatch = output.match(/Epoch key of epoch 1 and nonce 0: ([a-fA-F0-9]+)/) + // epk = epkRegMatch[1] + // const epkProofRegMatch = output.match(/(Unirep.epkProof.[a-zA-Z0-9\-\_]+)$/) + // epkProof = epkProofRegMatch[1] + // }) + // }) + + // describe('verifyEpochKeyProof CLI subcommand', () => { + // it('should verify epoch key proof', async () => { + // const command = `npx ts-node cli/index.ts verifyEpochKeyProof` + + // ` -x ${unirepContract.address} ` + + // ` -epk ${epk} ` + + // ` -pf ${epkProof} ` + + // const output = exec(command).stdout.trim() + + // console.log(command) + // console.log(output) + + // const verifyRegMatch = output.match(/Verify epoch key proof with epoch key [a-fA-F0-9]+ succeed/) + // expect(verifyRegMatch).not.equal(null) + // }) + // }) describe('publishPost CLI subcommand', () => { it('should publish a post', async () => { const command = `npx ts-node cli/index.ts publishPost` + ` -x ${unirepContract.address} ` + - ` -epk ${epk} ` + - ` -pf ${epkProof} ` + ` -tx ${text}` + - ` -d ${userPrivKey}` + ` -d ${userPrivKey}` + + ` -id ${userIdentity1}` + + ` -n ${epochKeyNonce}` + + ` -kn ${postNonce}` const output = exec(command).stdout.trim() console.log(command) console.log(output) + const epkRegMatch = output.match(/Epoch key of epoch 1 and nonce 0: ([a-fA-F0-9]+)/) + epk = epkRegMatch[1] + const idRegMatch = output.match(/Post ID: ([a-fA-F0-9]+)/) postID = idRegMatch[1] console.log('regmatch', postID) @@ -257,23 +279,26 @@ describe('test all CLI subcommands', function() { }) }) - describe('leaveComment CLI subcommand', () => { - it('should leave a comment', async () => { - const command = `npx ts-node cli/index.ts leaveComment` + - ` -x ${unirepContract.address} ` + - ` -pid ${postID} ` + - ` -tx ${text2}` + - ` -d ${userPrivKey}` + // describe('leaveComment CLI subcommand', () => { + // it('should leave a comment', async () => { + // const command = `npx ts-node cli/index.ts leaveComment` + + // ` -x ${unirepContract.address} ` + + // ` -pid ${postID} ` + + // ` -tx ${text2}` + + // ` -d ${userPrivKey}` + + // ` -id ${userIdentity1}` + + // ` -n ${epochKeyNonce2}` + + // ` -kn ${commentNonce}` - const output = exec(command).stdout.trim() + // const output = exec(command).stdout.trim() - console.log(command) - console.log(output) + // console.log(command) + // console.log(output) - const commentRegMatch = output.match(/Transaction hash: 0x[a-fA-F0-9]{64}/) - expect(commentRegMatch).not.equal(null) - }) - }) + // const commentRegMatch = output.match(/Transaction hash: 0x[a-fA-F0-9]{64}/) + // expect(commentRegMatch).not.equal(null) + // }) + // }) describe('upvote CLI subcommand', () => { it('should upvote to user', async () => { @@ -283,6 +308,7 @@ describe('test all CLI subcommands', function() { ` -epk ${epk} ` + ` -id ${userIdentity2}` + ` -n ${epochKeyNonce}` + + ` -kn ${attestNonce}` + ` -uv ${posRep} ` + ` -gf ${graffiti.toString(16)} ` @@ -314,7 +340,7 @@ describe('test all CLI subcommands', function() { }) describe('userStateTransition CLI subcommand', () => { - it('should transition user state', async () => { + it('should transition user 1 state', async () => { const command = `npx ts-node cli/index.ts userStateTransition` + ` -x ${unirepContract.address} ` + ` -d ${userPrivKey} ` + @@ -328,6 +354,21 @@ describe('test all CLI subcommands', function() { const userTransitionRegMatch = output.match(/User transitioned from epoch 1 to epoch 2/) expect(userTransitionRegMatch).not.equal(null) }) + + it('should transition user 2 state', async () => { + const command = `npx ts-node cli/index.ts userStateTransition` + + ` -x ${unirepContract.address} ` + + ` -d ${userPrivKey} ` + + ` -id ${userIdentity2} ` + + const output = exec(command).stdout.trim() + + console.log(command) + console.log(output) + + const userTransitionRegMatch = output.match(/User transitioned from epoch 1 to epoch 2/) + expect(userTransitionRegMatch).not.equal(null) + }) }) describe('genReputationProof CLI subcommand', () => { diff --git a/cli/vote.ts b/cli/vote.ts index 65c7b01..f97ee70 100644 --- a/cli/vote.ts +++ b/cli/vote.ts @@ -15,14 +15,15 @@ import { import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' import { genEpochKey } from '../test/utils' -import { genUserStateFromContract } from '../core' -import { formatProofForVerifierContract, genVerifyEpochKeyProofAndPublicSignals, verifyEPKProof } from '../test/circuits/utils' +import { genUnirepStateFromContract, genUserStateFromContract } from '../core' +import { formatProofForVerifierContract, genVerifyEpochKeyProofAndPublicSignals, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyEPKProof, verifyProveReputationProof } from '../test/circuits/utils' import { add0x } from '../crypto/SMT' import { Attestation } from '../core' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import { epkProofPrefix, identityPrefix } from './prefix' +import { nullifierTreeDepth } from '../config/testLocal' const configureSubparser = (subparsers: any) => { const parser = subparsers.addParser( @@ -66,6 +67,23 @@ const configureSubparser = (subparsers: any) => { } ) + parser.addArgument( + ['-kn', '--karma-nonce'], + { + required: true, + type: 'int', + help: `The first nonce to generate karma nullifiers. It will generate number of nullifiers which equals to the number of upvote/downvote`, + } + ) + + parser.addArgument( + ['-mr', '--min-rep'], + { + type: 'int', + help: 'The minimum reputation score the attester has', + } + ) + parser.addArgument( ['-uv', '--upvote-value'], { @@ -186,6 +204,20 @@ const vote = async (args: any) => { return } + const unirepState = await genUnirepStateFromContract( + provider, + unirepAddress, + startBlock, + ) + + // upvote / downvote user + const graffiti = args.graffiti ? BigInt(add0x(args.graffiti)) : BigInt(0) + const overwriteGraffiti = args.graffiti ? true : false + const upvoteValue = args.upvote_value != null ? args.upvote_value : 0 + const downvoteValue = args.downvote_value != null ? args.downvote_value : 0 + const voteValue = upvoteValue + downvoteValue + + // Validate epoch key nonce const epkNonce = args.epoch_key_nonce const numEpochKeyNoncePerEpoch = await unirepContract.numEpochKeyNoncePerEpoch() @@ -193,8 +225,6 @@ const vote = async (args: any) => { console.error('Error: epoch key nonce must be less than max epoch key nonce') return } - - // Gen epoch key const encodedIdentity = args.identity.slice(identityPrefix.length) const decodedIdentity = base64url.decode(encodedIdentity) const id = unSerialiseIdentity(decodedIdentity) @@ -204,71 +234,74 @@ const vote = async (args: any) => { const epochTreeDepth = treeDepths.epochTreeDepth const epk = genEpochKey(id.identityNullifier, currentEpoch, epkNonce, epochTreeDepth).toString(16) - // Gen epoch key proof + // Gen epoch key proof and reputation proof const userState = await genUserStateFromContract( - provider, - unirepAddress, - startBlock, - id, - commitment, + provider, + unirepAddress, + startBlock, + id, + commitment, + ) + // gen nullifier nonce list + const proveKarmaNullifiers = BigInt(1) + const proveKarmaAmount = BigInt(voteValue) + const nonceStarter: number = args.karma_nonce + const nonceList: BigInt[] = [] + for (let i = 0; i < voteValue; i++) { + nonceList.push( BigInt(nonceStarter + i) ) + } + + // gen minRep proof + const proveMinRep = args.min_rep != null ? BigInt(1) : BigInt(0) + const minRep = args.min_rep != null ? BigInt(args.min_rep) : BigInt(0) + + const circuitInputs = await userState.genProveReputationCircuitInputs( + epkNonce, // generate epoch key from epoch nonce + BigInt(1), // indicate to prove karma nullifiers + BigInt(voteValue), // the amount of output karma nullifiers + nonceList, // nonce to generate karma nullifiers + proveMinRep, // indicate to prove minimum reputation the user has + minRep // the amount of minimum reputation the user wants to prove ) - const circuitInputs = await userState.genVerifyEpochKeyCircuitInputs(epkNonce) - console.log('Proving epoch key...') - console.log('----------------------User State----------------------') - console.log(userState.toJSON(4)) - console.log('------------------------------------------------------') - console.log('----------------------Circuit inputs----------------------') - console.log(circuitInputs) - console.log('----------------------------------------------------------') - const results = await genVerifyEpochKeyProofAndPublicSignals(stringifyBigInts(circuitInputs)) + + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + const nullifiers: BigInt[] = [] + + for (let i = 0; i < voteValue; i++) { + const variableName = 'main.karma_nullifiers['+i+']' + nullifiers.push(getSignalByNameViaSym('proveReputation', results['witness'], variableName) % BigInt(2 ** nullifierTreeDepth) ) + } // TODO: Not sure if this validation is necessary - const isValid = await verifyEPKProof(results['proof'], results['publicSignals']) + const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) if(!isValid) { - console.error('Error: epoch key proof generated is not valid!') + console.error('Error: reputation proof generated is not valid!') return } - const formattedProof = formatProofForVerifierContract(results["proof"]) - const encodedProof = base64url.encode(JSON.stringify(formattedProof)) - console.log(`Epoch key of epoch ${currentEpoch} and nonce ${epkNonce}: ${epk}`) - console.log(epkProofPrefix + encodedProof) - - // downvote user - const graffiti = args.graffiti ? BigInt(add0x(args.graffiti)) : BigInt(0) - const overwriteGraffiti = args.graffiti ? true : false - const upvoteValue = args.upvote_value != null ? BigInt(args.upvote_value) : BigInt(0) - const downvoteValue = args.downvote_value != null ? BigInt(args.downvote_value) : BigInt(0) - const attestation = new Attestation( - BigInt(attesterId), - BigInt(0), - upvoteValue + downvoteValue, - graffiti, - overwriteGraffiti, - ) + const proof = formatProofForVerifierContract(results['proof']) + const fromEpochKey = BigInt(add0x(epk)) + const publicSignals = results['publicSignals'] // upvote or downvote to epoch key const attestationToEpochKey = new Attestation( BigInt(attesterId), - upvoteValue, - downvoteValue, + BigInt(upvoteValue), + BigInt(downvoteValue), graffiti, overwriteGraffiti, ) - console.log(`Attesting to epoch key ${epk} with pos rep ${BigInt(0)}, neg rep ${upvoteValue + downvoteValue} and graffiti ${graffiti.toString(16)} (overwrite graffit: ${overwriteGraffiti})`) console.log(`Attesting to epoch key ${args.epoch_key} with pos rep ${upvoteValue}, neg rep ${downvoteValue} and graffiti ${graffiti.toString(16)} (overwrite graffit: ${overwriteGraffiti})`) - let tx1 - let tx2 + let tx try { - tx1 = await unirepContract.submitAttestation( - attestation, - BigInt(add0x(epk)), - { value: attestingFee, gasLimit: 1000000 } - ) - tx2 = await unirepContract.submitAttestation( + tx = await unirepContract.vote( attestationToEpochKey, BigInt(add0x(args.epoch_key)), + fromEpochKey, + publicSignals, + proof, + nullifiers, { value: attestingFee, gasLimit: 1000000 } ) } catch(e) { @@ -279,8 +312,7 @@ const vote = async (args: any) => { return } - console.log('Transaction hash:', tx1.hash) - console.log('Transaction hash:', tx2.hash) + console.log('Transaction hash:', tx.hash) } export { diff --git a/config/nullifierDomainSeparator.ts b/config/nullifierDomainSeparator.ts index c0f9b6c..19375c6 100644 --- a/config/nullifierDomainSeparator.ts +++ b/config/nullifierDomainSeparator.ts @@ -2,7 +2,10 @@ const ATTESTATION_NULLIFIER_DOMAIN = BigInt(1) const EPOCH_KEY_NULLIFIER_DOMAIN = BigInt(2) +const KARMA_NULLIFIER_DOMAIN = BigInt(3) + export { ATTESTATION_NULLIFIER_DOMAIN, EPOCH_KEY_NULLIFIER_DOMAIN, + KARMA_NULLIFIER_DOMAIN, } \ No newline at end of file diff --git a/config/socialMedia.ts b/config/socialMedia.ts new file mode 100644 index 0000000..9a9b49d --- /dev/null +++ b/config/socialMedia.ts @@ -0,0 +1,20 @@ +const DEFAULT_START_KARMA = 20 + +const DEFAULT_STATE_TRANSITION_KARMA = 20 + +const DEFAULT_POST_KARMA = 10 + +const DEFAULT_COMMENT_KARMA = 5 + +const MAX_KARMA_BUDGET = 10 + +const DEFAULT_AIRDROPPED_KARMA = 20 + +export { + DEFAULT_START_KARMA, + DEFAULT_STATE_TRANSITION_KARMA, + DEFAULT_POST_KARMA, + DEFAULT_COMMENT_KARMA, + MAX_KARMA_BUDGET, + DEFAULT_AIRDROPPED_KARMA, +} \ No newline at end of file diff --git a/contracts/.DS_Store b/contracts/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..b258f45fd46b2157e1c8cf4446cd51accbf9c4f1 GIT binary patch literal 6148 zcmeHKJ5B>J5Pc3QqJRJ)glG_Z0wiv*K#-sU5uj!R0Tx0w%BSC+J8%U~!(pi4&DfyC zNeUW-&`e}M+w13#Sy&JeM+Ml`tYar)#t^;BSYen3`<^ zrhqB%*A$R%cM*HI;jfSJ@3(W@DXv?cqQx1qJ?ydUe5kPntl)rO`4f5=VMyi~dj(tm z>yO#55qlX8WoO9I#R*z?_})1puG@;ZbsQn%?0b6c&-UluBhC^|>2E+r&P)sXoEc~3 zF5+!4uXe~WV|KZ6FV%C7TlVM1PQ@xH0 z&d>E-^=9V)(R!S-KEXNF2r|C8HvLNUb9}4redo)N#*I zlRynN3w)|NTP7*K;SbF3W zn)6hmr@C;(aGuWbB+N?#mL5GFE?hob@a)13#i@6$pXhYB)T7m=fGIGkz=H3t%K3jd z|NcKovYshm3j8YtT(!|`>@%fswoWA{XKliA#Udv2N{>om6^>(V$Wgq>qQ+;5G>B=y T(j!M`_D4Wvu*wwpRRul)b bool) public hasUserSignedUp; @@ -76,6 +85,9 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { // This is used to limit number of attestations per epoch key mapping(uint256 => uint8) public numAttestationsToEpochKey; + // Indicate if the karma nullifiers is submitted + mapping(uint256 => bool) public isKarmaNullifierSubmitted; + struct EpochKeyList { uint256 numKeys; mapping(uint256 => uint256) keys; @@ -98,15 +110,23 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { ); event PostSubmitted( + uint256 indexed _epoch, uint256 indexed _postId, uint256 indexed _epochKey, - string _content, + string _hahsedContent, ProofsRelated proof ); event CommentSubmitted( + uint256 indexed _epoch, uint256 indexed _postId, - string _content + uint256 indexed _epochKey, + string _hahsedContent, + ProofsRelated proof + ); + + event ReputationNullifierSubmitted( + uint256[] karmaNullifiers ); event AttestationSubmitted( @@ -120,13 +140,7 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { event UserStateTransitioned( uint256 indexed _toEpoch, - uint256 _fromEpoch, - uint256 _fromGlobalStateTree, - uint256 _fromEpochTree, - uint256 _fromNullifierTreeRoot, - uint256[8] _proof, - uint256[] _attestationNullifiers, - uint256[] _epkNullifiers + UserTransitionedRelated userTransitionedData ); @@ -152,6 +166,7 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { ReputationVerifier _reputationVerifier, uint8 _numEpochKeyNoncePerEpoch, uint8 _numAttestationsPerEpochKey, + uint256 _defaultKarma, uint256 _epochLength, uint256 _attestingFee ) public { @@ -167,6 +182,7 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { numAttestationsPerEpochKey = _numAttestationsPerEpochKey; numAttestationsPerEpoch = _numEpochKeyNoncePerEpoch * _numAttestationsPerEpochKey; epochLength = _epochLength; + defaultKarma = _defaultKarma; latestEpochTransitionTime = block.timestamp; // Check and store the maximum number of signups @@ -194,13 +210,20 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { require(hasUserSignedUp[_identityCommitment] == false, "Unirep: the user has already signed up"); require(numUserSignUps < maxUsers, "Unirep: maximum number of signups reached"); + // When a user signs up, give defaultKarma + Karma memory karma; + karma.positiveKaram = defaultKarma; + karma.negativeKarma = 0; + uint256 hashedKarma = hashLeftRight(karma.positiveKaram, karma.negativeKarma); + // Create, hash, and insert a fresh state leaf StateLeaf memory stateLeaf = StateLeaf({ identityCommitment: _identityCommitment, userStateRoot: emptyUserStateRoot }); - uint256 hashedLeaf = hashStateLeaf(stateLeaf); + uint256 hashedState = hashStateLeaf(stateLeaf); + uint256 hashedLeaf = hashLeftRight(hashedState, hashedKarma); hasUserSignedUp[_identityCommitment] = true; numUserSignUps ++; @@ -237,7 +260,47 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { nextAttesterId ++; } - function publishPost(uint256 postId, uint256 epochKey, string calldata content, uint256[] calldata _publicSignals, uint256[8] calldata _proof) external { + function spendReputation( + uint256 epochKey, + ProofsRelated memory proof, + uint256[] memory karmaNullifiers, + uint256 spendReputationAmount + ) internal { + require(karmaNullifiers.length == spendReputationAmount, "Unirep: should submit the exact amount of karma to execute action"); + // Determine if karma nullifiers are submitted before + for (uint i = 0; i < karmaNullifiers.length; i++) { + require(isKarmaNullifierSubmitted[karmaNullifiers[i]] == false, "Unirep: the nullifier has been submitted"); + isKarmaNullifierSubmitted[karmaNullifiers[i]] = true; + } + + // Verify the proof + proof.isValid = reputationVerifier.verifyProof(proof.a, proof.b, proof.c, proof.publicSignals); + require(proof.isValid); + + // Verify epoch key and its proof + // Then submit negative attestation to this epoch key + Attestation memory attestation; + attestation.attesterId = attesters[msg.sender]; + attestation.posRep = 0; + attestation.negRep = spendReputationAmount; + attestation.graffiti = 0; + attestation.overwriteGraffiti = false; + submitAttestation(attestation, epochKey); + + emit Sequencer("ReputationNullifierSubmitted"); + emit ReputationNullifierSubmitted( + karmaNullifiers + ); + } + + function publishPost( + uint256 postId, + uint256 epochKey, + string calldata hashedContent, + uint256[] calldata _publicSignals, + uint256[8] calldata _proof, + uint256[] calldata karmaNullifiers) external payable { + ProofsRelated memory proof; // Unpack the snark proof ( @@ -247,26 +310,73 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { proof.c ) = unpackProof(_publicSignals, _proof); - // Verify the proof - proof.isValid = epkValidityVerifier.verifyProof(proof.a, proof.b, proof.c, proof.publicSignals); - require(proof.isValid); - + spendReputation(epochKey, proof, karmaNullifiers, postKarma); + + emit Sequencer("PostSubmitted"); emit PostSubmitted( + currentEpoch, postId, epochKey, - content, + hashedContent, proof ); } - function leaveComment(uint256 postId, string calldata content) external { + function leaveComment( + uint256 postId, + uint256 epochKey, + string calldata hashedContent, + uint256[] calldata _publicSignals, + uint256[8] calldata _proof, + uint256[] calldata karmaNullifiers) external payable { + + ProofsRelated memory proof; + // Unpack the snark proof + ( + proof.publicSignals, + proof.a, + proof.b, + proof.c + ) = unpackProof(_publicSignals, _proof); + + spendReputation(epochKey, proof, karmaNullifiers, commentKarma); + + emit Sequencer("CommentSubmitted"); emit CommentSubmitted( + currentEpoch, postId, - content + epochKey, + hashedContent, + proof ); } - function submitAttestation(Attestation calldata attestation, uint256 epochKey) external payable { + function vote( + Attestation calldata attestation, + uint256 toEpochKey, + uint256 fromEpochKey, + uint256[] calldata _publicSignals, + uint256[8] calldata _proof, + uint256[] calldata karmaNullifiers) external payable { + ProofsRelated memory proof; + // Unpack the snark proof + ( + proof.publicSignals, + proof.a, + proof.b, + proof.c + ) = unpackProof(_publicSignals, _proof); + + // Spend attester's reputation + spendReputation(fromEpochKey, proof, karmaNullifiers, attestation.posRep + attestation.negRep); + + // Send Reputation to others + submitAttestation(attestation, toEpochKey); + } + + function submitAttestation( + Attestation memory attestation, + uint256 epochKey ) public payable { require(attesters[msg.sender] > 0, "Unirep: attester has not signed up yet"); require(attesters[msg.sender] == attestation.attesterId, "Unirep: mismatched attesterId"); require(isEpochKeyHashChainSealed[epochKey] == false, "Unirep: hash chain of this epoch key has been sealed"); @@ -357,18 +467,22 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { require(_attestationNullifiers.length == numAttestationsPerEpoch, "Unirep: invalid number of nullifiers"); require(_epkNullifiers.length == numEpochKeyNoncePerEpoch, "Unirep: invalid number of epk nullifiers"); + UserTransitionedRelated memory userTransitionedData; + userTransitionedData.fromEpoch = _transitionFromEpoch; + userTransitionedData.fromGlobalStateTree = _fromGlobalStateTree; + userTransitionedData.fromEpochTree = _fromEpochTree; + userTransitionedData.fromNullifierTreeRoot = _fromNullifierTreeRoot; + userTransitionedData.newGlobalStateTreeLeaf = _newGlobalStateTreeLeaf; + userTransitionedData.proof = _proof; + userTransitionedData.attestationNullifiers = _attestationNullifiers; + userTransitionedData.epkNullifiers = _epkNullifiers; + emit Sequencer("UserStateTransitioned"); emit UserStateTransitioned( currentEpoch, - _transitionFromEpoch, - _fromGlobalStateTree, - _fromEpochTree, - _fromNullifierTreeRoot, - _proof, - _attestationNullifiers, - _epkNullifiers + userTransitionedData ); - emit NewGSTLeafInserted(currentEpoch, _newGlobalStateTreeLeaf); + // emit NewGSTLeafInserted(currentEpoch, _newGlobalStateTreeLeaf); } diff --git a/contracts/UnirepParameters.sol b/contracts/UnirepParameters.sol index ec8adee..6cb2ceb 100644 --- a/contracts/UnirepParameters.sol +++ b/contracts/UnirepParameters.sol @@ -22,4 +22,15 @@ contract UnirepParameters { uint256[2] c; bool isValid; } + + struct UserTransitionedRelated{ + uint256 fromEpoch; + uint256 fromGlobalStateTree; + uint256 fromEpochTree; + uint256 fromNullifierTreeRoot; + uint256 newGlobalStateTreeLeaf; + uint256[8] proof; + uint256[] attestationNullifiers; + uint256[] epkNullifiers; + } } \ No newline at end of file diff --git a/core/UnirepState.ts b/core/UnirepState.ts index 8f18d43..135d2db 100644 --- a/core/UnirepState.ts +++ b/core/UnirepState.ts @@ -88,6 +88,7 @@ class UnirepState { private epochKeyToHashchainMap: {[key: string]: BigInt} = {} private epochKeyToAttestationsMap: {[key: string]: IAttestation[]} = {} + public karmaNullifiersMap: {[key: string]: boolean} = {} constructor( _globalStateTreeDepth: number, @@ -195,6 +196,17 @@ class UnirepState { this.epochKeyToAttestationsMap[epochKey].push(attestation) } + /* + * Add karma nullifiers to the map state + */ + public addKarmaNullifiers = ( + nullifiers: BigInt[] + ) => { + for(const nullifier of nullifiers){ + this.karmaNullifiersMap[nullifier.toString()] = true + } + } + /* * Computes the global state tree of given epoch */ diff --git a/core/UserState.ts b/core/UserState.ts index d50a99a..1ca3727 100644 --- a/core/UserState.ts +++ b/core/UserState.ts @@ -7,8 +7,9 @@ import { hashOne, } from 'maci-crypto' import { SparseMerkleTreeImpl } from '../crypto/SMT' -import { genAttestationNullifier, defaultUserStateLeaf, genEpochKey, genNewSMT, genEpochKeyNullifier } from '../test/utils' +import { genAttestationNullifier, defaultUserStateLeaf, genEpochKey, genNewSMT, genEpochKeyNullifier, genKarmaNullifier } from '../test/utils' import { IAttestation, UnirepState } from './UnirepState' +import { DEFAULT_AIRDROPPED_KARMA, DEFAULT_START_KARMA, DEFAULT_STATE_TRANSITION_KARMA, MAX_KARMA_BUDGET } from '../config/socialMedia' interface IUserStateLeaf { attesterId: BigInt; @@ -94,6 +95,14 @@ class UserState { public id public commitment private hasSignedUp: boolean = false + // All positive reputations given by attesters + default allowance after user state transition + private transitionedPosRep: number + // All negative reputations given by attesters + spent karma after user state transition + private transitionedNegRep: number + // All positive reputations given by attesters before user state transition + private currentEpochPosRep: number + // All negative reputations given by attesters and all spent karma before user state transition + private currentEpochNegRep: number public latestTransitionedEpoch: number // Latest epoch where the user has a record in the GST of that epoch public latestGSTLeafIndex: number // Leaf index of the latest GST where the user has a record in @@ -104,6 +113,10 @@ class UserState { _id, _commitment, _hasSignedUp: boolean, + _transitionedPosRep?: number, + _transitionedNegRep?: number, + _currentEpochPosRep?: number, + _currentEpochNegRep?: number, _latestTransitionedEpoch?: number, _latestGSTLeafIndex?: number, _latestUserStateLeaves?: IUserStateLeaf[], @@ -119,9 +132,17 @@ class UserState { if (_hasSignedUp) { assert(_latestTransitionedEpoch !== undefined, "User has signed up but missing latestTransitionedEpoch") assert(_latestGSTLeafIndex !== undefined, "User has signed up but missing latestTransitionedEpoch") + assert(_transitionedPosRep !== undefined, "User has signed up but missing transitionedPosRep") + assert(_transitionedNegRep !== undefined, "User has signed up but missing transitionedNegRep") + assert(_currentEpochPosRep !== undefined, "User has signed up but missing currentEpochPosRep") + assert(_currentEpochNegRep !== undefined, "User has signed up but missing currentEpochNegRep") this.latestTransitionedEpoch = _latestTransitionedEpoch this.latestGSTLeafIndex = _latestGSTLeafIndex + this.transitionedPosRep = _transitionedPosRep + this.transitionedNegRep = _transitionedNegRep + this.currentEpochPosRep = _currentEpochPosRep + this.currentEpochNegRep = _currentEpochNegRep if (_latestUserStateLeaves !== undefined) this.latestUserStateLeaves = _latestUserStateLeaves else this.latestUserStateLeaves = [] this.hasSignedUp = _hasSignedUp @@ -129,6 +150,10 @@ class UserState { this.latestTransitionedEpoch = 0 this.latestGSTLeafIndex = 0 this.latestUserStateLeaves = [] + this.transitionedPosRep = 0 + this.transitionedNegRep = 0 + this.currentEpochPosRep = 0 + this.currentEpochNegRep = 0 } } @@ -212,6 +237,22 @@ class UserState { else return Reputation.default() } + /* + * Genearte karma nullifiers from nonce starter + */ + public genKarmaNullifiersFromNonce = (nonce: number, amount: number): BigInt[] => { + assert(this.hasSignedUp, "User has not signed up yet") + assert((nonce+amount-1) < (this.transitionedPosRep-this.transitionedNegRep), `Should choose a nonce less than ${this.transitionedPosRep-this.transitionedNegRep}`) + const nullifiers: BigInt[] = [] + for (let i = 0; i < amount; i++) { + const karmaNullifier = genKarmaNullifier(this.id.identityNullifier, this.unirepState.currentEpoch, nonce + i); + assert(!this.nullifierExist(karmaNullifier), `Karma nullifier with nonce ${nonce + i} is already existed, it's nullifier: ${karmaNullifier}`) + nullifiers.push(karmaNullifier) + } + assert(nullifiers.length == amount, `Should generate ${amount} nullifiers but got ${nullifiers.length}. Change the starter nonce`) + return nullifiers + } + /* * Check if given nullifier exists in nullifier tree */ @@ -227,6 +268,7 @@ class UserState { this.latestTransitionedEpoch = _latestTransitionedEpoch this.latestGSTLeafIndex = _latestGSTLeafIndex this.hasSignedUp = true + this.transitionedPosRep = DEFAULT_START_KARMA } /* @@ -268,6 +310,8 @@ class UserState { user_state_root: (await this.genUserStateTree()).getRootHash(), path_elements: GSTProof.pathElements, path_index: GSTProof.indices, + positive_karma: this.transitionedPosRep, + negative_karma: this.transitionedNegRep, root: GSTree.root, nonce: epochKeyNonce, epoch: epoch, @@ -318,8 +362,15 @@ class UserState { // Gen new user state tree const newUserStateTree = await this._genUserStateTreeFromLeaves(stateLeaves) + // Gen new state hash + const newHashedState = hashLeftRight(this.commitment, newUserStateTree.getRootHash()) + // Gen karma hash + const newHashedKarma = hashLeftRight( + BigInt(this.transitionedPosRep + this.currentEpochPosRep + DEFAULT_AIRDROPPED_KARMA), + BigInt(this.transitionedNegRep + this.currentEpochNegRep) + ) // Gen new GST leaf - const newGSTLeaf = hashLeftRight(this.commitment, newUserStateTree.getRootHash()) + const newGSTLeaf = hashLeftRight(newHashedState, newHashedKarma) return { 'newGSTLeaf': newGSTLeaf, @@ -346,6 +397,11 @@ class UserState { const epochTreeRoot = fromEpochTree.getRootHash() const epochKeyPathElements: any[] = [] const hashChainResults: BigInt[] = [] + // User state tree + const userStateTree = await this.genUserStateTree() + const hashedState = hashLeftRight(this.commitment, userStateTree.getRootHash()) + const hashedKarma = hashLeftRight(BigInt(this.transitionedPosRep), BigInt(this.transitionedNegRep)) + const hashedLeaf = hashLeftRight(hashedState,hashedKarma) const selectors: number[] = [] const attesterIds: BigInt[] = [] @@ -380,6 +436,8 @@ class UserState { negReps.push(newRep.negRep) graffities.push(newRep.graffiti) overwriteGraffitis.push(attestation.overwriteGraffiti) + this.currentEpochPosRep += Number(newRep.posRep) + this.currentEpochNegRep += Number(newRep.negRep) } // Fill in blank data for non-exist attestation for (let i = 0; i < (this.numAttestationsPerEpochKey - attestations.length); i++) { @@ -413,6 +471,10 @@ class UserState { identity_pk: this.id.keypair.pubKey, identity_nullifier: this.id.identityNullifier, identity_trapdoor: this.id.identityTrapdoor, + user_tree_root: userStateTree.getRootHash(), + user_state_hash: hashedLeaf, + old_positive_karma: BigInt(this.transitionedPosRep), + old_negative_karma: BigInt(this.transitionedNegRep), GST_path_elements: GSTreeProof.pathElements, GST_path_index: GSTreeProof.indices, GST_root: GSTreeRoot, @@ -422,6 +484,9 @@ class UserState { neg_reps: negReps, graffities: graffities, overwrite_graffitis: overwriteGraffitis, + positive_karma: BigInt(this.transitionedPosRep + this.currentEpochPosRep + DEFAULT_AIRDROPPED_KARMA), + negative_karma: BigInt(this.transitionedNegRep + this.currentEpochNegRep), + airdropped_karma: DEFAULT_AIRDROPPED_KARMA, epk_path_elements: epochKeyPathElements, hash_chain_results: hashChainResults, epoch_tree_root: epochTreeRoot @@ -446,28 +511,25 @@ class UserState { // Update user state leaves this.latestUserStateLeaves = latestStateLeaves.slice() + this.transitionedPosRep += DEFAULT_STATE_TRANSITION_KARMA + this.currentEpochPosRep = 0 + this.currentEpochNegRep = 0 } public genProveReputationCircuitInputs = async ( - attesterId: BigInt, - provePosRep: BigInt, - proveNegRep: BigInt, - proveRepDiff: BigInt, - proveGraffiti: BigInt, - minPosRep: BigInt, - maxNegRep: BigInt, - minRepDiff: BigInt, - graffitiPreImage: BigInt, + epochKeyNonce: number, + proveKarmaNullifiers: BigInt, + proveKarmaAmount: BigInt, + karmaNonceList: BigInt[], + proveMinRep: BigInt, + minRep: BigInt, ) => { assert(this.hasSignedUp, "User has not signed up yet") - assert(attesterId > BigInt(0), `attesterId must be greater than zero`) - assert(attesterId < BigInt(2 ** this.userStateTreeDepth), `attesterId exceeds total number of attesters`) + assert(epochKeyNonce < this.numEpochKeyNoncePerEpoch, `epochKeyNonce(${epochKeyNonce}) must be less than max epoch nonce`) + const epoch = this.latestTransitionedEpoch + const epochKey = genEpochKey(this.id.identityNullifier, epoch, epochKeyNonce, this.unirepState.epochTreeDepth) const nonce = 0 - const rep = this.getRepByAttester(attesterId) - const posRep = rep.posRep - const negRep = rep.negRep - const graffiti = rep.graffiti const userStateTree = await this.genUserStateTree() const GSTree = this.unirepState.genGSTree(epoch) const GSTreeProof = GSTree.genMerklePath(this.latestGSTLeafIndex) @@ -476,7 +538,18 @@ class UserState { const nullifierTreeRoot = nullifierTree.getRootHash() const epkNullifier = genEpochKeyNullifier(this.id.identityNullifier, epoch, nonce, this.unirepState.nullifierTreeDepth) const epkNullifierProof = await nullifierTree.getMerkleProof(epkNullifier) - const USTPathElements = await userStateTree.getMerkleProof(attesterId) + // const attesterId = BigInt(1) + // const rep = this.getRepByAttester(attesterId) + // const posRep = rep.posRep + // const negRep = rep.negRep + // const graffiti = rep.graffiti + // const USTPathElements = await userStateTree.getMerkleProof(attesterId) + const hashedState = hashLeftRight(this.commitment, userStateTree.getRootHash()) + const hashedKarma = hashLeftRight(BigInt(this.transitionedPosRep), BigInt(this.transitionedNegRep)) + const hashedLeaf = hashLeftRight(hashedState,hashedKarma) + for (let i = karmaNonceList.length ; i < MAX_KARMA_BUDGET; i++) { + karmaNonceList.push(BigInt(0)) + } return stringifyBigInts({ epoch: epoch, @@ -484,25 +557,27 @@ class UserState { identity_pk: this.id.keypair.pubKey, identity_nullifier: this.id.identityNullifier, identity_trapdoor: this.id.identityTrapdoor, - user_state_root: userStateTree.getRootHash(), + user_tree_root: userStateTree.getRootHash(), + user_state_hash: hashedLeaf, + epoch_key_nonce: epochKeyNonce, + epoch_key: epochKey, GST_path_index: GSTreeProof.indices, GST_path_elements: GSTreeProof.pathElements, GST_root: GSTreeRoot, nullifier_tree_root: nullifierTreeRoot, nullifier_path_elements: epkNullifierProof, - attester_id: attesterId, - pos_rep: posRep, - neg_rep: negRep, - graffiti: graffiti, - UST_path_elements: USTPathElements, - prove_pos_rep: provePosRep, - prove_neg_rep: proveNegRep, - prove_rep_diff: proveRepDiff, - prove_graffiti: proveGraffiti, - min_rep_diff: minRepDiff, - min_pos_rep: minPosRep, - max_neg_rep: maxNegRep, - graffiti_pre_image: graffitiPreImage + // attester_id: attesterId, + // pos_rep: posRep, + // neg_rep: negRep, + // graffiti: graffiti, + // UST_path_elements: USTPathElements, + positive_karma: BigInt(this.transitionedPosRep), + negative_karma: BigInt(this.transitionedNegRep), + prove_karma_nullifiers: proveKarmaNullifiers, + prove_karma_amount: proveKarmaAmount, + karma_nonce: karmaNonceList, + prove_min_rep: proveMinRep, + min_rep: minRep }) } } diff --git a/core/utils.ts b/core/utils.ts index b0bc5ba..9e426b4 100644 --- a/core/utils.ts +++ b/core/utils.ts @@ -7,6 +7,9 @@ import { Attestation, IEpochTreeLeaf, UnirepState } from './UnirepState' import { IUserStateLeaf, UserState } from './UserState' import { hashLeftRight } from 'maci-crypto' import { computeEmptyUserStateRoot } from '../test/utils' +import { id } from 'ethers/lib/utils' +import comment from '../database/models/comment' +import { DEFAULT_START_KARMA } from '../config/socialMedia' /* * Retrieves and parses on-chain Unirep contract data to create an off-chain @@ -53,6 +56,15 @@ const genUnirepStateFromContract = async ( const attestationSubmittedFilter = unirepContract.filters.AttestationSubmitted() const attestationSubmittedEvents = await unirepContract.queryFilter(attestationSubmittedFilter, startBlock) + const postSubmittedFilter = unirepContract.filters.PostSubmitted() + const postSubmittedEvents = await unirepContract.queryFilter(postSubmittedFilter, startBlock) + + const commentSubmittedFilter = unirepContract.filters.CommentSubmitted() + const commentSubmittedEvents = await unirepContract.queryFilter(commentSubmittedFilter, startBlock) + + const reputationSubmittedFilter = unirepContract.filters.ReputationNullifierSubmitted() + const reputationSubmittedEvents = await unirepContract.queryFilter(reputationSubmittedFilter, startBlock) + const epochEndedFilter = unirepContract.filters.EpochEnded() const epochEndedEvents = await unirepContract.queryFilter(epochEndedFilter, startBlock) @@ -65,6 +77,9 @@ const genUnirepStateFromContract = async ( // Reverse the events so pop() can start from the first event newGSTLeafInsertedEvents.reverse() attestationSubmittedEvents.reverse() + postSubmittedEvents.reverse() + commentSubmittedEvents.reverse() + reputationSubmittedEvents.reverse() epochEndedEvents.reverse() userStateTransitionedEvents.reverse() for (let i = 0; i < sequencerEvents.length; i++) { @@ -94,6 +109,26 @@ const genUnirepStateFromContract = async ( _attestation.overwriteGraffiti ) unirepState.addAttestation(attestationEvent.args?._epochKey.toString(), attestation) + } else if (occurredEvent === "PostSubmitted") { + const postEvent = postSubmittedEvents.pop() + assert(postEvent !== undefined, `Event sequence mismatch: missing postSubmittedEvent`) + const epoch = postEvent.args?._epoch.toNumber() + assert( + epoch === unirepState.currentEpoch, + `Post epoch (${epoch}) does not match current epoch (${unirepState.currentEpoch})` + ) + } else if (occurredEvent === "CommentSubmitted") { + const commentEvent = commentSubmittedEvents.pop() + assert(commentEvent !== undefined, `Event sequence mismatch: missing commentSubmittedEvent`) + const epoch = commentEvent.args?._epoch.toNumber() + assert( + epoch === unirepState.currentEpoch, + `Comment epoch (${epoch}) does not match current epoch (${unirepState.currentEpoch})` + ) + } else if (occurredEvent === "ReputationNullifierSubmitted") { + const reputationEvent = reputationSubmittedEvents.pop() + assert(reputationEvent !== undefined, `Event sequence mismatch: missing ReputationNullifierSubmitted`) + unirepState.addKarmaNullifiers(reputationEvent.args?.karmaNullifiers.map((n) => BigInt(n))) } else if (occurredEvent === "EpochEnded") { const epochEndedEvent = epochEndedEvents.pop() assert(epochEndedEvent !== undefined, `Event sequence mismatch: missing epochEndedEvent`) @@ -118,22 +153,22 @@ const genUnirepStateFromContract = async ( unirepState.epochTransition(epoch, epochTreeLeaves) } else if (occurredEvent === "UserStateTransitioned") { - const newLeafEvent = newGSTLeafInsertedEvents.pop() - assert(newLeafEvent !== undefined, `Event sequence mismatch: missing newGSTLeafInsertedEvent`) + // const newLeafEvent = newGSTLeafInsertedEvents.pop() + // assert(newLeafEvent !== undefined, `Event sequence mismatch: missing newGSTLeafInsertedEvent`) const userStateTransitionedEvent = userStateTransitionedEvents.pop() assert(userStateTransitionedEvent !== undefined, `Event sequence mismatch: missing userStateTransitionedEvent`) - const newLeaf = newLeafEvent.args?._hashedLeaf + const newLeaf = userStateTransitionedEvent.args?.userTransitionedData.newGlobalStateTreeLeaf const isProofValid = await unirepContract.verifyUserStateTransition( newLeaf, - userStateTransitionedEvent.args?._attestationNullifiers, - userStateTransitionedEvent.args?._epkNullifiers, - userStateTransitionedEvent.args?._fromEpoch, - userStateTransitionedEvent.args?._fromGlobalStateTree, - userStateTransitionedEvent.args?._fromEpochTree, - userStateTransitionedEvent.args?._fromNullifierTreeRoot, - userStateTransitionedEvent.args?._proof, + userStateTransitionedEvent.args?.userTransitionedData.attestationNullifiers, + userStateTransitionedEvent.args?.userTransitionedData.epkNullifiers, + userStateTransitionedEvent.args?.userTransitionedData.fromEpoch, + userStateTransitionedEvent.args?.userTransitionedData.fromGlobalStateTree, + userStateTransitionedEvent.args?.userTransitionedData.fromEpochTree, + userStateTransitionedEvent.args?.userTransitionedData.fromNullifierTreeRoot, + userStateTransitionedEvent.args?.userTransitionedData.proof, ) // Proof is invalid, skip this step if (!isProofValid) { @@ -141,8 +176,8 @@ const genUnirepStateFromContract = async ( continue } - const attestationNullifiers = userStateTransitionedEvent.args?._attestationNullifiers.map((n) => BigInt(n)) - const epkNullifiers = userStateTransitionedEvent.args?._epkNullifiers.map((n) => BigInt(n)) + const attestationNullifiers = userStateTransitionedEvent.args?.userTransitionedData.attestationNullifiers.map((n) => BigInt(n)) + const epkNullifiers = userStateTransitionedEvent.args?.userTransitionedData.epkNullifiers.map((n) => BigInt(n)) // Combine nullifiers and mod them const allNullifiers = attestationNullifiers.concat(epkNullifiers).map((nullifier) => BigInt(nullifier) % BigInt(2 ** unirepState.nullifierTreeDepth)) @@ -179,6 +214,10 @@ const genUserStateFromParams = async ( startBlock: number, userIdentity: any, userIdentityCommitment: any, + transitionedPosRep: number, + transitionedNegRep: number, + currentEpochPosRep: number, + currentEpochNegRep: number, latestTransitionedEpoch: number, latestGSTLeafIndex: number, latestUserStateLeaves?: IUserStateLeaf[], @@ -193,6 +232,10 @@ const genUserStateFromParams = async ( userIdentity, userIdentityCommitment, true, + transitionedPosRep, + transitionedNegRep, + currentEpochPosRep, + currentEpochNegRep, latestTransitionedEpoch, latestGSTLeafIndex, latestUserStateLeaves, @@ -251,10 +294,18 @@ const _genUserStateFromContract = async ( false, ) const emptyUserStateRoot = computeEmptyUserStateRoot(unirepState.userStateTreeDepth) - const userDefaultGSTLeaf = hashLeftRight( + const userDefaultStateLeaf = hashLeftRight( userIdentityCommitment, emptyUserStateRoot ) + const userDefaultKarmaLeaf = hashLeftRight( + BigInt(DEFAULT_START_KARMA), + BigInt(0) + ) + const userDefaultGSTLeaf = hashLeftRight( + userDefaultStateLeaf, + userDefaultKarmaLeaf + ) const newGSTLeafInsertedFilter = unirepContract.filters.NewGSTLeafInserted() const newGSTLeafInsertedEvents = await unirepContract.queryFilter(newGSTLeafInsertedFilter, startBlock) @@ -262,6 +313,15 @@ const _genUserStateFromContract = async ( const attestationSubmittedFilter = unirepContract.filters.AttestationSubmitted() const attestationSubmittedEvents = await unirepContract.queryFilter(attestationSubmittedFilter, startBlock) + const postSubmittedFilter = unirepContract.filters.PostSubmitted() + const postSubmittedEvents = await unirepContract.queryFilter(postSubmittedFilter, startBlock) + + const commentSubmittedFilter = unirepContract.filters.CommentSubmitted() + const commentSubmittedEvents = await unirepContract.queryFilter(commentSubmittedFilter, startBlock) + + const reputationSubmittedFilter = unirepContract.filters.ReputationNullifierSubmitted() + const reputationSubmittedEvents = await unirepContract.queryFilter(reputationSubmittedFilter, startBlock) + const epochEndedFilter = unirepContract.filters.EpochEnded() const epochEndedEvents = await unirepContract.queryFilter(epochEndedFilter, startBlock) @@ -274,6 +334,9 @@ const _genUserStateFromContract = async ( // Reverse the events so pop() can start from the first event newGSTLeafInsertedEvents.reverse() attestationSubmittedEvents.reverse() + postSubmittedEvents.reverse() + commentSubmittedEvents.reverse() + reputationSubmittedEvents.reverse() epochEndedEvents.reverse() userStateTransitionedEvents.reverse() // Variables used to keep track of data required for user to transition @@ -315,6 +378,27 @@ const _genUserStateFromContract = async ( _attestation.overwriteGraffiti ) unirepState.addAttestation(attestationEvent.args?._epochKey.toString(), attestation) + // userState.computeMatchedKarmaNullifiers(attestationEvent.args?.karmaNullifiers.map((n) => BigInt(n))) + } else if (occurredEvent === "PostSubmitted") { + const postEvent = postSubmittedEvents.pop() + assert(postEvent !== undefined, `Event sequence mismatch: missing postSubmittedEvent`) + const epoch = postEvent.args?._epoch.toNumber() + assert( + epoch === unirepState.currentEpoch, + `Post epoch (${epoch}) does not match current epoch (${unirepState.currentEpoch})` + ) + } else if (occurredEvent === "CommentSubmitted") { + const commentEvent = commentSubmittedEvents.pop() + assert(commentEvent !== undefined, `Event sequence mismatch: missing commentSubmittedEvent`) + const epoch = commentEvent.args?._epoch.toNumber() + assert( + epoch === unirepState.currentEpoch, + `Comment epoch (${epoch}) does not match current epoch (${unirepState.currentEpoch})` + ) + } else if (occurredEvent === "ReputationNullifierSubmitted") { + const reputationEvent = reputationSubmittedEvents.pop() + assert(reputationEvent !== undefined, `Event sequence mismatch: missing ReputationNullifierSubmitted`) + unirepState.addKarmaNullifiers(reputationEvent.args?.karmaNullifiers.map((n) => BigInt(n))) } else if (occurredEvent === "EpochEnded") { const epochEndedEvent = epochEndedEvents.pop() assert(epochEndedEvent !== undefined, `Event sequence mismatch: missing epochEndedEvent`) @@ -349,22 +433,22 @@ const _genUserStateFromContract = async ( // Epoch ends, reset (next) GST leaf index currentEpochGSTLeafIndexToInsert = 0 } else if (occurredEvent === "UserStateTransitioned") { - const newLeafEvent = newGSTLeafInsertedEvents.pop() - assert(newLeafEvent !== undefined, `Event sequence mismatch: missing newGSTLeafInsertedEvent`) + // const newLeafEvent = newGSTLeafInsertedEvents.pop() + // assert(newLeafEvent !== undefined, `Event sequence mismatch: missing newGSTLeafInsertedEvent`) const userStateTransitionedEvent = userStateTransitionedEvents.pop() assert(userStateTransitionedEvent !== undefined, `Event sequence mismatch: missing userStateTransitionedEvent`) - const newLeaf = newLeafEvent.args?._hashedLeaf + const newLeaf = userStateTransitionedEvent.args?.userTransitionedData.newGlobalStateTreeLeaf const isProofValid = await unirepContract.verifyUserStateTransition( newLeaf, - userStateTransitionedEvent.args?._attestationNullifiers, - userStateTransitionedEvent.args?._epkNullifiers, - userStateTransitionedEvent.args?._fromEpoch, - userStateTransitionedEvent.args?._fromGlobalStateTree, - userStateTransitionedEvent.args?._fromEpochTree, - userStateTransitionedEvent.args?._fromNullifierTreeRoot, - userStateTransitionedEvent.args?._proof, + userStateTransitionedEvent.args?.userTransitionedData.attestationNullifiers, + userStateTransitionedEvent.args?.userTransitionedData.epkNullifiers, + userStateTransitionedEvent.args?.userTransitionedData.fromEpoch, + userStateTransitionedEvent.args?.userTransitionedData.fromGlobalStateTree, + userStateTransitionedEvent.args?.userTransitionedData.fromEpochTree, + userStateTransitionedEvent.args?.userTransitionedData.fromNullifierTreeRoot, + userStateTransitionedEvent.args?.userTransitionedData.proof, ) // Proof is invalid, skip this event if (!isProofValid) { @@ -372,10 +456,10 @@ const _genUserStateFromContract = async ( continue } - const attestationNullifiers = userStateTransitionedEvent.args?._attestationNullifiers.map((n) => BigInt(n)) - const epkNullifiers = userStateTransitionedEvent.args?._epkNullifiers.map((n) => BigInt(n)) + const attestationNullifiers = userStateTransitionedEvent.args?.userTransitionedData.attestationNullifiers.map((n) => BigInt(n)) + const epkNullifiers_ = userStateTransitionedEvent.args?.userTransitionedData.epkNullifiers.map((n) => BigInt(n)) // Combine nullifiers and mod them - const allNullifiers = attestationNullifiers.concat(epkNullifiers).map((nullifier) => BigInt(nullifier) % BigInt(2 ** unirepState.nullifierTreeDepth)) + const allNullifiers = attestationNullifiers.concat(epkNullifiers_).map((nullifier) => BigInt(nullifier) % BigInt(2 ** unirepState.nullifierTreeDepth)) let isNullifierSeen = false // Verify nullifiers are not seen before @@ -394,11 +478,11 @@ const _genUserStateFromContract = async ( if ( userHasSignedUp && - (userStateTransitionedEvent.args?._fromEpoch.toNumber() === userState.latestTransitionedEpoch) + (userStateTransitionedEvent.args?.userTransitionedData.fromEpoch.toNumber() === userState.latestTransitionedEpoch) ) { let epkNullifiersMatched = 0 - for (const nullifier of epkNullifiers) { - if (epkNullifiers.indexOf(nullifier) !== -1) epkNullifiersMatched++ + for (const nullifier of epkNullifiers_) { + if (epkNullifiers.indexOf(nullifier % BigInt(2 ** unirepState.nullifierTreeDepth)) !== -1) epkNullifiersMatched++ } if (epkNullifiersMatched == userState.numEpochKeyNoncePerEpoch) { const newState = await userState.genNewUserStateAfterTransition() diff --git a/test/utils.ts b/test/utils.ts index f512e5c..cc9e3c2 100644 --- a/test/utils.ts +++ b/test/utils.ts @@ -8,11 +8,12 @@ import { IncrementalQuinTree } from 'maci-crypto' import { SparseMerkleTreeImpl, add0x } from '../crypto/SMT' import { SnarkBigInt, hash5, hashLeftRight } from '../crypto/crypto' import { attestingFee, circuitEpochTreeDepth, circuitGlobalStateTreeDepth, circuitNullifierTreeDepth, circuitUserStateTreeDepth, epochLength, epochTreeDepth, globalStateTreeDepth, numAttestationsPerEpochKey, numEpochKeyNoncePerEpoch, maxUsers, nullifierTreeDepth, userStateTreeDepth} from '../config/testLocal' -import { ATTESTATION_NULLIFIER_DOMAIN, EPOCH_KEY_NULLIFIER_DOMAIN } from '../config/nullifierDomainSeparator' +import { ATTESTATION_NULLIFIER_DOMAIN, EPOCH_KEY_NULLIFIER_DOMAIN, KARMA_NULLIFIER_DOMAIN } from '../config/nullifierDomainSeparator' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import PoseidonT3 from "../artifacts/contracts/Poseidon.sol/PoseidonT3.json" import PoseidonT6 from "../artifacts/contracts/Poseidon.sol/PoseidonT6.json" +import { DEFAULT_START_KARMA } from '../config/socialMedia' const getTreeDepthsForTesting = (deployEnv: string = "contract") => { if (deployEnv === 'contract') { @@ -76,17 +77,19 @@ const deployUnirep = async ( console.log('Deploying Unirep') - let _maxUsers, _numEpochKeyNoncePerEpoch, _numAttestationsPerEpochKey, _epochLength, _attestingFee + let _maxUsers, _numEpochKeyNoncePerEpoch, _numAttestationsPerEpochKey, _defaultKarma, _epochLength, _attestingFee if (_settings) { _maxUsers = _settings.maxUsers _numEpochKeyNoncePerEpoch = _settings.numEpochKeyNoncePerEpoch _numAttestationsPerEpochKey = _settings.numAttestationsPerEpochKey + _defaultKarma = _settings.defaultKarma _epochLength = _settings.epochLength _attestingFee = _settings.attestingFee } else { _maxUsers = maxUsers _numEpochKeyNoncePerEpoch = numEpochKeyNoncePerEpoch _numAttestationsPerEpochKey = numAttestationsPerEpochKey + _defaultKarma = DEFAULT_START_KARMA _epochLength = epochLength _attestingFee = attestingFee } @@ -110,6 +113,7 @@ const deployUnirep = async ( ReputationVerifierContract.address, _numEpochKeyNoncePerEpoch, _numAttestationsPerEpochKey, + _defaultKarma, _epochLength, _attestingFee, { @@ -154,6 +158,13 @@ const genEpochKeyNullifier = (identityNullifier: SnarkBigInt, epoch: number, non return nullifierModed } +const genKarmaNullifier = (identityNullifier: SnarkBigInt, epoch: number, nonce: number, _nullifierTreeDepth: number = nullifierTreeDepth): SnarkBigInt => { + let nullifier = hash5([KARMA_NULLIFIER_DOMAIN, identityNullifier, BigInt(epoch), BigInt(nonce), BigInt(0)]) + // Adjust epoch key size according to epoch tree depth + const nullifierModed = BigInt(nullifier) % BigInt(2 ** _nullifierTreeDepth) + return nullifierModed +} + const toCompleteHexString = (str: string, len?: number): string => { str = add0x(str) if (len) str = ethers.utils.hexZeroPad(str, len) @@ -233,6 +244,7 @@ export { getTreeDepthsForTesting, genEpochKey, genEpochKeyNullifier, + genKarmaNullifier, genNewEpochTree, genNewNullifierTree, genNewUserStateTree, From e59b9a87433f93b1a0f3faa9bee5e433824a7951 Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Wed, 14 Apr 2021 11:22:40 +0800 Subject: [PATCH 12/38] hasedLeaf = hash5(idCommitment, stateRoot, posRep, negRep, 0) --- circuits/proveReputation.circom | 56 ++++++++------------------- circuits/userExists.circom | 25 +++++------- circuits/userStateTransition.circom | 23 ++++------- contracts/DomainObjs.sol | 2 +- contracts/Unirep.sol | 59 +++++++++++++++++++++++------ core/UserState.ts | 49 +++++++++++------------- core/utils.ts | 15 +++----- 7 files changed, 108 insertions(+), 121 deletions(-) diff --git a/circuits/proveReputation.circom b/circuits/proveReputation.circom index 91731bf..fdf4dc3 100644 --- a/circuits/proveReputation.circom +++ b/circuits/proveReputation.circom @@ -39,13 +39,6 @@ template ProveReputation( // Nullifier tree signal input nullifier_tree_root signal private input nullifier_path_elements[nullifier_tree_depth][1]; - // Attester to prove reputation from - // signal input attester_id; - // // Attestation by the attester - // signal private input pos_rep; - // signal private input neg_rep; - // signal private input graffiti; - // signal private input UST_path_elements[user_state_tree_depth][1]; // Sum of positive and negative karma signal private input positive_karma; signal private input negative_karma; @@ -67,27 +60,8 @@ template ProveReputation( nonce_lt.out === 1; /* End of check 1 */ - - /* 2. Check if the reputation given by the attester is in the user state tree */ - // component reputation_hasher = Hasher5(); - // reputation_hasher.in[0] <== pos_rep; - // reputation_hasher.in[1] <== neg_rep; - // reputation_hasher.in[2] <== graffiti; - // reputation_hasher.in[3] <== 0; - // reputation_hasher.in[4] <== 0; - - // component reputation_membership_check = SMTLeafExists(user_state_tree_depth); - // reputation_membership_check.leaf_index <== attester_id; - // reputation_membership_check.leaf <== reputation_hasher.hash; - // for (var i = 0; i < user_state_tree_depth; i++) { - // reputation_membership_check.path_elements[i][0] <== UST_path_elements[i][0]; - // } - - // reputation_membership_check.root <== user_tree_root; - /* End of check 2 */ - - /* 3. Check if user exists in the Global State Tree */ + /* 2. Check if user exists in the Global State Tree */ component user_exist = userExists(GST_tree_depth); for (var i = 0; i< GST_tree_depth; i++) { user_exist.GST_path_index[i] <== GST_path_index[i]; @@ -102,28 +76,28 @@ template ProveReputation( user_exist.user_state_hash <== user_state_hash; user_exist.positive_karma <== positive_karma; user_exist.negative_karma <== negative_karma; - /* End of check 3 */ + /* End of check 2 */ - /* 4. Check epoch key is computed correctly*/ + /* 3. Check epoch key is computed correctly*/ component epoch_key_check = verifyEpochKey(epoch_tree_depth, EPOCH_KEY_NONCE_PER_EPOCH); epoch_key_check.identity_nullifier <== identity_nullifier; epoch_key_check.nonce <== epoch_key_nonce; epoch_key_check.epoch <== epoch; epoch_key_check.epoch_key <== epoch_key; - /* End of check 4 */ + /* End of check 3 */ - /* 5. Check it's latest epoch the user transition to */ + /* 4. Check it's latest epoch the user transition to */ // We check that nullifier of the epoch key is not seen before. - // 5.1.1 Compute nullifier of the epoch key + // 4.1.1 Compute nullifier of the epoch key component epoch_key_nullifier_hasher = Hasher5(); epoch_key_nullifier_hasher.in[0] <== 2; // 2 is the domain separator for epoch key nullifier epoch_key_nullifier_hasher.in[1] <== identity_nullifier; epoch_key_nullifier_hasher.in[2] <== epoch; epoch_key_nullifier_hasher.in[3] <== nonce; epoch_key_nullifier_hasher.in[4] <== 0; - // 5.1.2 Mod nullifier hash + // 4.1.2 Mod nullifier hash // circom's best practices state that we should avoid using <-- unless // we know what we are doing. But this is the only way to perform the // modulo operation. @@ -132,7 +106,7 @@ template ProveReputation( modEPKNullifier.dividend <== epoch_key_nullifier_hasher.hash; epk_nullifier_hash_moded <== modEPKNullifier.remainder; - // 5.2 Verify non-membership of the nullifier in nullifier tree + // 4.2 Verify non-membership of the nullifier in nullifier tree // Unseen nullifier leaf should have value hashLeftRight(0, 0) signal zero_leaf; component zero_leaf_hasher = HashLeftRight(); @@ -147,20 +121,20 @@ template ProveReputation( for (var i = 0; i < nullifier_tree_depth; i++) { epk_exists.path_elements[i][0] <== nullifier_path_elements[i][0]; } - /* End of check 5 */ + /* End of check 4 */ - /* 6. Check total reputation is greater than 0 */ + /* 5. Check total reputation is greater than 0 */ // if user wants to spend karma and prove total_reputation, it requires reputation to be positive // total_reputation = positive_karma - negative_karma >= 0 component pos_rep_get = GreaterEqThan(MAX_REPUTATION_SCORE_BITS); pos_rep_get.in[0] <== positive_karma; pos_rep_get.in[1] <== negative_karma; pos_rep_get.out === 1; - /* End of check 6*/ + /* End of check 5*/ - /* 7. Check nullifiers are valid */ + /* 6. Check nullifiers are valid */ component karma_nullifier_hasher[MAX_KARMA_BUDGET]; component nonce_gt[MAX_KARMA_BUDGET]; for(var i = 0; i< MAX_KARMA_BUDGET; i++) { @@ -181,13 +155,13 @@ template ProveReputation( karma_nullifier_hasher[i].in[4] <== 0; karma_nullifiers[i] <== karma_nullifier_hasher[i].hash; } - /* End of check 7 */ + /* End of check 6 */ - /* 8. Check if user has reputation greater than min_rep */ + /* 7. Check if user has reputation greater than min_rep */ component rep_get = GreaterEqThan(MAX_REPUTATION_SCORE_BITS); rep_get.in[0] <== positive_karma - negative_karma; rep_get.in[1] <== min_rep; rep_get.out * prove_min_rep + Not(prove_min_rep) === 1; - /* End of check 8 */ + /* End of check 7 */ } \ No newline at end of file diff --git a/circuits/userExists.circom b/circuits/userExists.circom index 7e608e3..4dfaa7a 100644 --- a/circuits/userExists.circom +++ b/circuits/userExists.circom @@ -25,27 +25,20 @@ template userExists(GST_tree_depth){ identity_commitment.identity_trapdoor <== identity_trapdoor; out <== identity_commitment.out; - // 3.1 Compute user state tree root - component state = HashLeftRight(); - state.left <== identity_commitment.out; - state.right <== user_tree_root; - - // 3.2 Compute hashed karma - component karma = HashLeftRight(); - karma.left <== positive_karma; - karma.right <== negative_karma; - - // 3.3 Compute hashed leaf - component leaf = HashLeftRight(); - leaf.left <== state.hash; - leaf.right <== karma.hash; + // Compute user state tree root + component leaf_hasher = Hasher5(); + leaf_hasher.in[0] <== identity_commitment.out; + leaf_hasher.in[1] <== user_tree_root; + leaf_hasher.in[2] <== positive_karma; + leaf_hasher.in[3] <== negative_karma; + leaf_hasher.in[4] <== 0; // 3.4 Check computed hash == user state tree leaf - leaf.hash === user_state_hash; + leaf_hasher.hash === user_state_hash; // 3.6 Check if user state hash is in GST component GST_leaf_exists = LeafExists(GST_tree_depth); - GST_leaf_exists.leaf <== leaf.hash; + GST_leaf_exists.leaf <== leaf_hasher.hash; for (var i = 0; i < GST_tree_depth; i++) { GST_leaf_exists.path_index[i] <== GST_path_index[i]; GST_leaf_exists.path_elements[i][0] <== GST_path_elements[i][0]; diff --git a/circuits/userStateTransition.circom b/circuits/userStateTransition.circom index 5372555..573f74f 100644 --- a/circuits/userStateTransition.circom +++ b/circuits/userStateTransition.circom @@ -202,21 +202,14 @@ template UserStateTransition( neg_rep_sum === negative_karma; // 3.2 Compute new GST leaf - // 3.2.1 Compute user state tree root - component new_state = HashLeftRight(); - new_state.left <== user_exist.out; + component new_leaf_hasher = Hasher5(); + new_leaf_hasher.in[0] <== user_exist.out; // Last intermediate root is the new user state tree root - new_state.right <== intermediate_user_state_tree_roots[TOTAL_NUM_ATTESTATIONS]; - - // 3.2.2 Compute hashed karma - component new_karma = HashLeftRight(); - new_karma.left <== positive_karma; - new_karma.right <== negative_karma; - - // 3.2.3 Compute hashed leaf - component new_leaf = HashLeftRight(); - new_leaf.left <== new_state.hash; - new_leaf.right <== new_karma.hash; - new_GST_leaf <== new_leaf.hash; + new_leaf_hasher.in[1] <== intermediate_user_state_tree_roots[TOTAL_NUM_ATTESTATIONS]; + new_leaf_hasher.in[2] <== positive_karma; + new_leaf_hasher.in[3] <== negative_karma; + new_leaf_hasher.in[4] <== 0; + + new_GST_leaf <== new_leaf_hasher.hash; /* End of 3. compute and output new GST leaf */ } \ No newline at end of file diff --git a/contracts/DomainObjs.sol b/contracts/DomainObjs.sol index 19f5e78..d544e5c 100644 --- a/contracts/DomainObjs.sol +++ b/contracts/DomainObjs.sol @@ -28,7 +28,7 @@ contract DomainObjs is Hasher { struct Karma { // Total positive karma - uint256 positiveKaram; + uint256 positiveKarma; // Total negative karma uint256 negativeKarma; } diff --git a/contracts/Unirep.sol b/contracts/Unirep.sol index ed47a70..1bd93d3 100644 --- a/contracts/Unirep.sol +++ b/contracts/Unirep.sol @@ -11,6 +11,7 @@ import { UnirepParameters } from './UnirepParameters.sol'; import { EpochKeyValidityVerifier } from './EpochKeyValidityVerifier.sol'; import { UserStateTransitionVerifier } from './UserStateTransitionVerifier.sol'; import { ReputationVerifier } from './ReputationVerifier.sol'; +import { ReputationFromAttesterVerifier } from './ReputationFromAttesterVerifier.sol'; contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { using SafeMath for uint256; @@ -23,6 +24,7 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { EpochKeyValidityVerifier internal epkValidityVerifier; UserStateTransitionVerifier internal userStateTransitionVerifier; ReputationVerifier internal reputationVerifier; + ReputationFromAttesterVerifier internal reputationFromAttesterVerifier; uint256 public currentEpoch = 1; @@ -212,19 +214,18 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { // When a user signs up, give defaultKarma Karma memory karma; - karma.positiveKaram = defaultKarma; + karma.positiveKarma = defaultKarma; karma.negativeKarma = 0; - uint256 hashedKarma = hashLeftRight(karma.positiveKaram, karma.negativeKarma); - - // Create, hash, and insert a fresh state leaf - StateLeaf memory stateLeaf = StateLeaf({ - identityCommitment: _identityCommitment, - userStateRoot: emptyUserStateRoot - }); - - uint256 hashedState = hashStateLeaf(stateLeaf); - uint256 hashedLeaf = hashLeftRight(hashedState, hashedKarma); - + + // Compute hashed leaf + uint256[] memory hashElements = new uint256[](5); + hashElements[0] = _identityCommitment; + hashElements[1] = emptyUserStateRoot; + hashElements[2] = karma.positiveKarma; + hashElements[3] = karma.negativeKarma; + hashElements[4] = 0; + uint256 hashedLeaf = hash5(hashElements); + hasUserSignedUp[_identityCommitment] = true; numUserSignUps ++; @@ -616,6 +617,40 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { return proof.isValid; } + function verifyReputationFromAttester( + uint256[] calldata _publicSignals, + uint256[8] calldata _proof) external view returns (bool) { + // User prove his reputation by an attester: + // 1. User exists in GST + // 2. It is the latest state user transition to + // 3. positive reputation is greater than `_min_pos_rep` + // 4. negative reputation is less than `_max_neg_rep` + // 5. hash of graffiti pre-image matches + + // Ensure that each public input is within range of the snark scalar + // field. + // TODO: consider having more granular revert reasons + for (uint8 i = 0; i < _publicSignals.length; i++) { + require( + _publicSignals[i] < SNARK_SCALAR_FIELD, + "Unirep: each public signal must be lt the snark scalar field" + ); + } + + ProofsRelated memory proof; + // Unpack the snark proof + ( + proof.publicSignals, + proof.a, + proof.b, + proof.c + ) = unpackProof(_publicSignals, _proof); + + // Verify the proof + proof.isValid = reputationFromAttesterVerifier.verifyProof(proof.a, proof.b, proof.c, proof.publicSignals); + return proof.isValid; + } + function min(uint a, uint b) internal pure returns (uint) { if (a > b) { return b; diff --git a/core/UserState.ts b/core/UserState.ts index 1ca3727..21b0751 100644 --- a/core/UserState.ts +++ b/core/UserState.ts @@ -362,16 +362,15 @@ class UserState { // Gen new user state tree const newUserStateTree = await this._genUserStateTreeFromLeaves(stateLeaves) - // Gen new state hash - const newHashedState = hashLeftRight(this.commitment, newUserStateTree.getRootHash()) - // Gen karma hash - const newHashedKarma = hashLeftRight( - BigInt(this.transitionedPosRep + this.currentEpochPosRep + DEFAULT_AIRDROPPED_KARMA), - BigInt(this.transitionedNegRep + this.currentEpochNegRep) - ) + // Gen new GST leaf - const newGSTLeaf = hashLeftRight(newHashedState, newHashedKarma) - + const newGSTLeaf = hash5([ + this.commitment, + newUserStateTree.getRootHash(), + BigInt(this.transitionedPosRep + this.currentEpochPosRep + DEFAULT_AIRDROPPED_KARMA), + BigInt(this.transitionedNegRep + this.currentEpochNegRep), + BigInt(0) + ]) return { 'newGSTLeaf': newGSTLeaf, 'newUSTLeaves': stateLeaves @@ -399,9 +398,14 @@ class UserState { const hashChainResults: BigInt[] = [] // User state tree const userStateTree = await this.genUserStateTree() - const hashedState = hashLeftRight(this.commitment, userStateTree.getRootHash()) - const hashedKarma = hashLeftRight(BigInt(this.transitionedPosRep), BigInt(this.transitionedNegRep)) - const hashedLeaf = hashLeftRight(hashedState,hashedKarma) + + const hashedLeaf = hash5([ + this.commitment, + userStateTree.getRootHash(), + BigInt(this.transitionedPosRep), + BigInt(this.transitionedNegRep), + BigInt(0) + ]) const selectors: number[] = [] const attesterIds: BigInt[] = [] @@ -538,15 +542,13 @@ class UserState { const nullifierTreeRoot = nullifierTree.getRootHash() const epkNullifier = genEpochKeyNullifier(this.id.identityNullifier, epoch, nonce, this.unirepState.nullifierTreeDepth) const epkNullifierProof = await nullifierTree.getMerkleProof(epkNullifier) - // const attesterId = BigInt(1) - // const rep = this.getRepByAttester(attesterId) - // const posRep = rep.posRep - // const negRep = rep.negRep - // const graffiti = rep.graffiti - // const USTPathElements = await userStateTree.getMerkleProof(attesterId) - const hashedState = hashLeftRight(this.commitment, userStateTree.getRootHash()) - const hashedKarma = hashLeftRight(BigInt(this.transitionedPosRep), BigInt(this.transitionedNegRep)) - const hashedLeaf = hashLeftRight(hashedState,hashedKarma) + const hashedLeaf = hash5([ + this.commitment, + userStateTree.getRootHash(), + BigInt(this.transitionedPosRep), + BigInt(this.transitionedNegRep), + BigInt(0) + ]) for (let i = karmaNonceList.length ; i < MAX_KARMA_BUDGET; i++) { karmaNonceList.push(BigInt(0)) } @@ -566,11 +568,6 @@ class UserState { GST_root: GSTreeRoot, nullifier_tree_root: nullifierTreeRoot, nullifier_path_elements: epkNullifierProof, - // attester_id: attesterId, - // pos_rep: posRep, - // neg_rep: negRep, - // graffiti: graffiti, - // UST_path_elements: USTPathElements, positive_karma: BigInt(this.transitionedPosRep), negative_karma: BigInt(this.transitionedNegRep), prove_karma_nullifiers: proveKarmaNullifiers, diff --git a/core/utils.ts b/core/utils.ts index 9e426b4..b55b5f0 100644 --- a/core/utils.ts +++ b/core/utils.ts @@ -5,7 +5,7 @@ import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import { numAttestationsPerEpochKey } from '../config/testLocal' import { Attestation, IEpochTreeLeaf, UnirepState } from './UnirepState' import { IUserStateLeaf, UserState } from './UserState' -import { hashLeftRight } from 'maci-crypto' +import { hash5, hashLeftRight } from 'maci-crypto' import { computeEmptyUserStateRoot } from '../test/utils' import { id } from 'ethers/lib/utils' import comment from '../database/models/comment' @@ -294,18 +294,13 @@ const _genUserStateFromContract = async ( false, ) const emptyUserStateRoot = computeEmptyUserStateRoot(unirepState.userStateTreeDepth) - const userDefaultStateLeaf = hashLeftRight( + const userDefaultGSTLeaf = hash5([ userIdentityCommitment, - emptyUserStateRoot - ) - const userDefaultKarmaLeaf = hashLeftRight( + emptyUserStateRoot, BigInt(DEFAULT_START_KARMA), + BigInt(0), BigInt(0) - ) - const userDefaultGSTLeaf = hashLeftRight( - userDefaultStateLeaf, - userDefaultKarmaLeaf - ) + ]) const newGSTLeafInsertedFilter = unirepContract.filters.NewGSTLeafInserted() const newGSTLeafInsertedEvents = await unirepContract.queryFilter(newGSTLeafInsertedFilter, startBlock) From bc4bc9b69d09dad881d43dabe9ce56abe8913a88 Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Wed, 14 Apr 2021 17:06:29 +0800 Subject: [PATCH 13/38] prove reputation from attester --- .DS_Store | Bin 10244 -> 10244 bytes cli/genReputationProof.ts | 22 ++++----- cli/listAllPosts.ts | 2 +- cli/userStateTransition.ts | 9 +--- cli/verifyReputationProof.ts | 2 +- contracts/Unirep.sol | 12 +++-- core/UserState.ts | 84 +++++++++++++++++++++++++++++++++-- core/utils.ts | 9 ++-- test/circuits/utils.ts | 40 +++++++++++++++++ 9 files changed, 149 insertions(+), 31 deletions(-) diff --git a/.DS_Store b/.DS_Store index 2d99151b51860336249186ecd81455336e583373..bd348ad44576ed902961195edb09bfcebe173f0b 100644 GIT binary patch delta 67 zcmZn(XbG6$gHU^hRb@?;(XbIBxzQie>19EKFnoc!dZoctsP1_l8jcAOj|Ahp>? WU?Tr!c7Y<3r&%me^}^%GVA delta 49 zcmZn(XbG6$I9U^hRb(qtY1^Ub*ev-l@AXl-U!_{GAaqhM@2`GT<1 { const maxNegRep = args.max_neg_rep != null ? BigInt(args.max_neg_rep) : BigInt(0) const graffitiPreImage = args.graffiti_preimage != null ? BigInt(add0x(args.graffiti_preimage)) : BigInt(0) - const circuitInputs = await userState.genProveReputationCircuitInputs(attesterId, provePosRep, proveNegRep, proveRepDiff, proveGraffiti, minPosRep, maxNegRep, minRepDiff, graffitiPreImage) - console.log('Proving reputation...') - console.log('----------------------User State----------------------') - console.log(userState.toJSON(4)) - console.log('------------------------------------------------------') - console.log('----------------------Circuit inputs----------------------') - console.log(circuitInputs) - console.log('----------------------------------------------------------') - const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + const circuitInputs = await userState.genProveReputationFromAttesterCircuitInputs(attesterId, provePosRep, proveNegRep, proveRepDiff, proveGraffiti, minPosRep, maxNegRep, minRepDiff, graffitiPreImage) + // console.log('Proving reputation...') + // console.log('----------------------User State----------------------') + // console.log(userState.toJSON(4)) + // console.log('------------------------------------------------------') + // console.log('----------------------Circuit inputs----------------------') + // console.log(circuitInputs) + // console.log('----------------------------------------------------------') + const results = await genVerifyReputationFromAttesterProofAndPublicSignals(stringifyBigInts(circuitInputs)) // TODO: Not sure if this validation is necessary - const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) + const isValid = await verifyProveReputationFromAttesterProof(results['proof'], results['publicSignals']) if(!isValid) { console.error('Error: reputation proof generated is not valid!') return diff --git a/cli/listAllPosts.ts b/cli/listAllPosts.ts index 607dc0f..ab34742 100644 --- a/cli/listAllPosts.ts +++ b/cli/listAllPosts.ts @@ -77,7 +77,7 @@ const listAllPosts = async (args: any) => { for (let i = 0; i < postEvents.length; i++) { console.log('Post ', postEvents[i].args._postId.toString()) console.log('Epoch key ', postEvents[i].args._epochKey.toString()) - console.log('Content ', postEvents[i].args._content) + console.log('Content ', postEvents[i].args._hahsedContent) } } diff --git a/cli/userStateTransition.ts b/cli/userStateTransition.ts index a54cd61..429102a 100644 --- a/cli/userStateTransition.ts +++ b/cli/userStateTransition.ts @@ -145,13 +145,6 @@ const userStateTransition = async (args: any) => { ) const circuitInputs = await userState.genUserStateTransitionCircuitInputs() - console.log('Proving user state transition...') - console.log('----------------------User State----------------------') - console.log(userState.toJSON(4)) - console.log('------------------------------------------------------') - console.log('----------------------Circuit inputs----------------------') - console.log(circuitInputs) - console.log('----------------------------------------------------------') const results = await genVerifyUserStateTransitionProofAndPublicSignals(stringifyBigInts(circuitInputs)) const newGSTLeaf = getSignalByNameViaSym('userStateTransition', results['witness'], 'main.new_GST_leaf') const newState = await userState.genNewUserStateAfterTransition() @@ -159,6 +152,7 @@ const userStateTransition = async (args: any) => { console.error('Error: Computed new GST leaf should match') return } + const isValid = await verifyUserStateTransitionProof(results['proof'], results['publicSignals']) if (!isValid) { console.error('Error: user state transition proof generated is not valid!') @@ -193,6 +187,7 @@ const userStateTransition = async (args: any) => { outputEPKNullifiers.push(outputNullifier) } + let tx try { tx = await unirepContract.updateUserStateRoot( diff --git a/cli/verifyReputationProof.ts b/cli/verifyReputationProof.ts index 5e9e641..6fd885e 100644 --- a/cli/verifyReputationProof.ts +++ b/cli/verifyReputationProof.ts @@ -171,7 +171,7 @@ const verifyReputationProof = async (args: any) => { minPosRep, maxNegRep, graffitiPreImage] - const isProofValid = await unirepContract.verifyReputation( + const isProofValid = await unirepContract.verifyReputationFromAttester( publicInput, proof ) diff --git a/contracts/Unirep.sol b/contracts/Unirep.sol index 1bd93d3..6b58d39 100644 --- a/contracts/Unirep.sol +++ b/contracts/Unirep.sol @@ -57,6 +57,9 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { // The amount of karma required to submit a comment uint256 immutable public commentKarma = 5; + // The amount of karma airdropped to user after user state transition + uint256 immutable public airdroppedKarma = 20; + uint256 public numUserSignUps = 0; mapping(uint256 => bool) public hasUserSignedUp; @@ -166,6 +169,7 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { EpochKeyValidityVerifier _epkValidityVerifier, UserStateTransitionVerifier _userStateTransitionVerifier, ReputationVerifier _reputationVerifier, + ReputationFromAttesterVerifier _reputationFromAttesterVerifier, uint8 _numEpochKeyNoncePerEpoch, uint8 _numAttestationsPerEpochKey, uint256 _defaultKarma, @@ -179,6 +183,7 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { epkValidityVerifier = _epkValidityVerifier; userStateTransitionVerifier = _userStateTransitionVerifier; reputationVerifier = _reputationVerifier; + reputationFromAttesterVerifier = _reputationFromAttesterVerifier; numEpochKeyNoncePerEpoch = _numEpochKeyNoncePerEpoch; numAttestationsPerEpochKey = _numAttestationsPerEpochKey; @@ -225,7 +230,7 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { hashElements[3] = karma.negativeKarma; hashElements[4] = 0; uint256 hashedLeaf = hash5(hashElements); - + hasUserSignedUp[_identityCommitment] = true; numUserSignUps ++; @@ -535,7 +540,6 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { uint256 _transitionFromEpoch, uint256 _fromGlobalStateTree, uint256 _fromEpochTree, - uint256 _fromNullifierTreeRoot, uint256[8] calldata _proof) external view returns (bool) { // Verify validity of new user state: // 1. User's identity and state exist in the provided global state tree @@ -556,8 +560,8 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { } _publicSignals[2 + numAttestationsPerEpoch + numEpochKeyNoncePerEpoch - 1] = _transitionFromEpoch; _publicSignals[3 + numAttestationsPerEpoch + numEpochKeyNoncePerEpoch - 1] = _fromGlobalStateTree; - _publicSignals[4 + numAttestationsPerEpoch + numEpochKeyNoncePerEpoch - 1] = _fromEpochTree; - _publicSignals[5 + numAttestationsPerEpoch + numEpochKeyNoncePerEpoch - 1] = _fromNullifierTreeRoot; + _publicSignals[4 + numAttestationsPerEpoch + numEpochKeyNoncePerEpoch - 1] = airdroppedKarma; + _publicSignals[5 + numAttestationsPerEpoch + numEpochKeyNoncePerEpoch - 1] = _fromEpochTree; // Ensure that each public input is within range of the snark scalar // field. diff --git a/core/UserState.ts b/core/UserState.ts index 21b0751..62ddcea 100644 --- a/core/UserState.ts +++ b/core/UserState.ts @@ -341,6 +341,17 @@ class UserState { return stateLeaves } + public updateAttestation = async (epochKey: BigInt, posRep: BigInt, negRep: BigInt) => { + const fromEpoch = this.latestTransitionedEpoch + for (let nonce = 0; nonce < this.numEpochKeyNoncePerEpoch; nonce++) { + if(epochKey == genEpochKey(this.id.identityNullifier, fromEpoch, nonce, this.unirepState.epochTreeDepth)){ + this.currentEpochPosRep += Number(posRep) + this.currentEpochNegRep += Number(negRep) + return + } + } + } + public genNewUserStateAfterTransition = async () => { assert(this.hasSignedUp, "User has not signed up yet") const fromEpoch = this.latestTransitionedEpoch @@ -440,8 +451,6 @@ class UserState { negReps.push(newRep.negRep) graffities.push(newRep.graffiti) overwriteGraffitis.push(attestation.overwriteGraffiti) - this.currentEpochPosRep += Number(newRep.posRep) - this.currentEpochNegRep += Number(newRep.negRep) } // Fill in blank data for non-exist attestation for (let i = 0; i < (this.numAttestationsPerEpochKey - attestations.length); i++) { @@ -515,7 +524,8 @@ class UserState { // Update user state leaves this.latestUserStateLeaves = latestStateLeaves.slice() - this.transitionedPosRep += DEFAULT_STATE_TRANSITION_KARMA + this.transitionedPosRep = this.transitionedPosRep + this.currentEpochPosRep + DEFAULT_AIRDROPPED_KARMA + this.transitionedNegRep = this.transitionedNegRep + this.currentEpochNegRep this.currentEpochPosRep = 0 this.currentEpochNegRep = 0 } @@ -577,6 +587,74 @@ class UserState { min_rep: minRep }) } + + public genProveReputationFromAttesterCircuitInputs = async ( + attesterId: BigInt, + provePosRep: BigInt, + proveNegRep: BigInt, + proveRepDiff: BigInt, + proveGraffiti: BigInt, + minPosRep: BigInt, + maxNegRep: BigInt, + minRepDiff: BigInt, + graffitiPreImage: BigInt, + ) => { + assert(this.hasSignedUp, "User has not signed up yet") + assert(attesterId > BigInt(0), `attesterId must be greater than zero`) + assert(attesterId < BigInt(2 ** this.userStateTreeDepth), `attesterId exceeds total number of attesters`) + const epoch = this.latestTransitionedEpoch + const nonce = 0 + const rep = this.getRepByAttester(attesterId) + const posRep = rep.posRep + const negRep = rep.negRep + const graffiti = rep.graffiti + const userStateTree = await this.genUserStateTree() + const hashedLeaf = hash5([ + this.commitment, + userStateTree.getRootHash(), + BigInt(this.transitionedPosRep), + BigInt(this.transitionedNegRep), + BigInt(0) + ]) + const GSTree = this.unirepState.genGSTree(epoch) + const GSTreeProof = GSTree.genMerklePath(this.latestGSTLeafIndex) + const GSTreeRoot = GSTree.root + const nullifierTree = await this.unirepState.genNullifierTree() + const nullifierTreeRoot = nullifierTree.getRootHash() + const epkNullifier = genEpochKeyNullifier(this.id.identityNullifier, epoch, nonce, this.unirepState.nullifierTreeDepth) + const epkNullifierProof = await nullifierTree.getMerkleProof(epkNullifier) + const USTPathElements = await userStateTree.getMerkleProof(attesterId) + + return stringifyBigInts({ + epoch: epoch, + nonce: nonce, + identity_pk: this.id.keypair.pubKey, + identity_nullifier: this.id.identityNullifier, + identity_trapdoor: this.id.identityTrapdoor, + user_tree_root: userStateTree.getRootHash(), + user_state_hash: hashedLeaf, + GST_path_index: GSTreeProof.indices, + GST_path_elements: GSTreeProof.pathElements, + GST_root: GSTreeRoot, + nullifier_tree_root: nullifierTreeRoot, + nullifier_path_elements: epkNullifierProof, + attester_id: attesterId, + pos_rep: posRep, + neg_rep: negRep, + graffiti: graffiti, + UST_path_elements: USTPathElements, + positive_karma: BigInt(this.transitionedPosRep), + negative_karma: BigInt(this.transitionedNegRep), + prove_pos_rep: provePosRep, + prove_neg_rep: proveNegRep, + prove_rep_diff: proveRepDiff, + prove_graffiti: proveGraffiti, + min_rep_diff: minRepDiff, + min_pos_rep: minPosRep, + max_neg_rep: maxNegRep, + graffiti_pre_image: graffitiPreImage + }) + } } export { diff --git a/core/utils.ts b/core/utils.ts index b55b5f0..23ad476 100644 --- a/core/utils.ts +++ b/core/utils.ts @@ -167,7 +167,6 @@ const genUnirepStateFromContract = async ( userStateTransitionedEvent.args?.userTransitionedData.fromEpoch, userStateTransitionedEvent.args?.userTransitionedData.fromGlobalStateTree, userStateTransitionedEvent.args?.userTransitionedData.fromEpochTree, - userStateTransitionedEvent.args?.userTransitionedData.fromNullifierTreeRoot, userStateTransitionedEvent.args?.userTransitionedData.proof, ) // Proof is invalid, skip this step @@ -372,8 +371,11 @@ const _genUserStateFromContract = async ( BigInt(_attestation.graffiti), _attestation.overwriteGraffiti ) - unirepState.addAttestation(attestationEvent.args?._epochKey.toString(), attestation) - // userState.computeMatchedKarmaNullifiers(attestationEvent.args?.karmaNullifiers.map((n) => BigInt(n))) + const epochKey = attestationEvent.args?._epochKey + unirepState.addAttestation(epochKey.toString(), attestation) + if(userHasSignedUp){ + userState.updateAttestation(epochKey, attestation.posRep, attestation.negRep) + } } else if (occurredEvent === "PostSubmitted") { const postEvent = postSubmittedEvents.pop() assert(postEvent !== undefined, `Event sequence mismatch: missing postSubmittedEvent`) @@ -442,7 +444,6 @@ const _genUserStateFromContract = async ( userStateTransitionedEvent.args?.userTransitionedData.fromEpoch, userStateTransitionedEvent.args?.userTransitionedData.fromGlobalStateTree, userStateTransitionedEvent.args?.userTransitionedData.fromEpochTree, - userStateTransitionedEvent.args?.userTransitionedData.fromNullifierTreeRoot, userStateTransitionedEvent.args?.userTransitionedData.proof, ) // Proof is invalid, skip this event diff --git a/test/circuits/utils.ts b/test/circuits/utils.ts index d835a09..b0a8d89 100644 --- a/test/circuits/utils.ts +++ b/test/circuits/utils.ts @@ -119,6 +119,19 @@ const genVerifyReputationProofAndPublicSignals = ( ) } +const genVerifyReputationFromAttesterProofAndPublicSignals = ( + inputs: any, +) => { + return genProofAndPublicSignals( + inputs, + '/test/proveReputationFromAttester_test.circom', + 'proveReputationFromAttesterCircuit.r1cs', + 'proveReputationFromAttester.wasm', + 'proveReputationFromAttester.params', + false, + ) +} + const genProofAndPublicSignals = async ( inputs: any, circuitFilename: string, @@ -262,6 +275,31 @@ const verifyProveReputationProof = ( return verifyProof('proveReputation.params', proofFilename, publicSignalsFilename) } +const verifyProveReputationFromAttesterProof = ( + proof: any, + publicSignals: any, +) => { + const date = Date.now().toString() + const proofFilename = `${date}.proveReputationFromAttester.proof.json` + const publicSignalsFilename = `${date}.proveReputationFromAttester.publicSignals.json` + + fs.writeFileSync( + path.join(__dirname, '../../build/', proofFilename), + JSON.stringify( + stringifyBigInts(proof) + ) + ) + + fs.writeFileSync( + path.join(__dirname, '../../build/', publicSignalsFilename), + JSON.stringify( + stringifyBigInts(publicSignals) + ) + ) + + return verifyProof('proveReputationFromAttester.params', proofFilename, publicSignalsFilename) +} + const formatProofForVerifierContract = ( _proof: SnarkProof, ) => { @@ -286,9 +324,11 @@ export { getSignalByNameViaSym, genVerifyEpochKeyProofAndPublicSignals, genVerifyReputationProofAndPublicSignals, + genVerifyReputationFromAttesterProofAndPublicSignals, genVerifyUserStateTransitionProofAndPublicSignals, verifyEPKProof, verifyProveReputationProof, + verifyProveReputationFromAttesterProof, verifyUserStateTransitionProof, genProofAndPublicSignals, verifyProof, From f69a27c046b4e7e265ac1795a0e9b7e04870f16e Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Wed, 14 Apr 2021 17:08:02 +0800 Subject: [PATCH 14/38] prove reputation from attester --- circuits/proveReputationFromAttester.circom | 186 ++++++------------ .../proveReputationFromAttester_test.circom | 4 +- package.json | 6 +- .../buildProveReputationFromAttesterSnark.sh | 12 ++ 4 files changed, 81 insertions(+), 127 deletions(-) create mode 100755 scripts/buildProveReputationFromAttesterSnark.sh diff --git a/circuits/proveReputationFromAttester.circom b/circuits/proveReputationFromAttester.circom index 4fcae0b..03031ba 100644 --- a/circuits/proveReputationFromAttester.circom +++ b/circuits/proveReputationFromAttester.circom @@ -4,19 +4,13 @@ include "./identityCommitment.circom"; include "./incrementalMerkleTree.circom"; include "./modulo.circom"; include "./sparseMerkleTree.circom"; +include "./userExists.circom"; function Not(in) { return 1 + in - (2 * in); } -template ProveReputation( - GST_tree_depth, - user_state_tree_depth, - nullifier_tree_depth, - EPOCH_KEY_NONCE_PER_EPOCH, - MAX_REPUTATION_SCORE_BITS, - NUM_ATTESTATIONS, - MAX_KARMA_BUDGET) { +template proveReputationFromAttester(GST_tree_depth, user_state_tree_depth, nullifier_tree_depth, EPOCH_KEY_NONCE_PER_EPOCH, MAX_REPUTATION_SCORE_BITS) { signal input epoch; signal private input nonce; @@ -43,14 +37,19 @@ template ProveReputation( // Sum of positive and negative karma signal private input positive_karma; signal private input negative_karma; - // Karma nullifier - signal input prove_karma_nullifiers; - signal input prove_karma_amount; - signal private input karma_nonce[MAX_KARMA_BUDGET]; - signal output karma_nullifiers[MAX_KARMA_BUDGET]; - // Prove the minimum reputation - signal input prove_min_rep; - signal input min_rep; + // Adding flexibility to prove mp, mn or graffiti + signal input prove_pos_rep; + signal input prove_neg_rep; + signal input prove_rep_diff; + signal input prove_graffiti; + // Adding flexibility to prove differece of reputations + signal input min_rep_diff; + // Condition on repuations to prove + signal input min_pos_rep; + signal input max_neg_rep; + // Graffiti + signal input graffiti_pre_image; + /* 1. Check nonce validity */ var bitsPerNonce = 8; @@ -61,8 +60,25 @@ template ProveReputation( nonce_lt.out === 1; /* End of check 1 */ - - /* 2. Check if the reputation given by the attester is in the user state tree */ + /* 2. Check if user exists in the Global State Tree */ + component user_exist = userExists(GST_tree_depth); + for (var i = 0; i< GST_tree_depth; i++) { + user_exist.GST_path_index[i] <== GST_path_index[i]; + user_exist.GST_path_elements[i][0] <== GST_path_elements[i][0]; + } + user_exist.GST_root <== GST_root; + user_exist.identity_pk[0] <== identity_pk[0]; + user_exist.identity_pk[1] <== identity_pk[1]; + user_exist.identity_nullifier <== identity_nullifier; + user_exist.identity_trapdoor <== identity_trapdoor; + user_exist.user_tree_root <== user_tree_root; + user_exist.user_state_hash <== user_state_hash; + user_exist.positive_karma <== positive_karma; + user_exist.negative_karma <== negative_karma; + /* End of check 2 */ + + + /* 3. Check if the reputation given by the attester is in the user state tree */ component reputation_hasher = Hasher5(); reputation_hasher.in[0] <== pos_rep; reputation_hasher.in[1] <== neg_rep; @@ -76,44 +92,7 @@ template ProveReputation( for (var i = 0; i < user_state_tree_depth; i++) { reputation_membership_check.path_elements[i][0] <== UST_path_elements[i][0]; } - reputation_membership_check.root <== user_tree_root; - /* End of check 2 */ - - - /* 3. Check if user exists in the Global State Tree */ - component identity_commitment = IdentityCommitment(); - identity_commitment.identity_pk[0] <== identity_pk[0]; - identity_commitment.identity_pk[1] <== identity_pk[1]; - identity_commitment.identity_nullifier <== identity_nullifier; - identity_commitment.identity_trapdoor <== identity_trapdoor; - - // 3.1 Compute user state tree root - component state = HashLeftRight(); - state.left <== identity_commitment.out; - state.right <== user_tree_root; - - // 3.2 Compute hashed karma - component karma = HashLeftRight(); - karma.left <== positive_karma; - karma.right <== negative_karma; - - // 3.3 Compute hashed leaf - component leaf = HashLeftRight(); - leaf.left <== state.hash; - leaf.right <== karma.hash; - - // 3.4 Check computed hash == user state tree leaf - leaf.hash === user_state_hash; - - // 3.6 Check if user state hash is in GST - component GST_leaf_exists = LeafExists(GST_tree_depth); - GST_leaf_exists.leaf <== leaf.hash; - for (var i = 0; i < GST_tree_depth; i++) { - GST_leaf_exists.path_index[i] <== GST_path_index[i]; - GST_leaf_exists.path_elements[i][0] <== GST_path_elements[i][0]; - } - GST_leaf_exists.root <== GST_root; /* End of check 3 */ @@ -153,79 +132,40 @@ template ProveReputation( /* End of check 4 */ - /* 5. Check total reputation is greater than 0 */ - // if user wants to spend karma and prove total_reputation, it requires reputation to be positive - // total_reputation = positive_karma - negative_karma >= 0 - component pos_rep_get = GreaterEqThan(MAX_REPUTATION_SCORE_BITS); - pos_rep_get.in[0] <== positive_karma; - pos_rep_get.in[1] <== negative_karma; - pos_rep_get.out === 1; - /* End of check 5*/ - - - /* 6. Check nullifiers are valid */ - component karma_nullifier_hasher[MAX_KARMA_BUDGET]; - component nonce_gt[MAX_KARMA_BUDGET]; - for(var i = 0; i< MAX_KARMA_BUDGET; i++) { - // 6.1 verify is nonce is valid - // If user wants to generate karma nullifiers, check if positive_karma - negative_karma > karma_nonce - // Eg. if we have 10 karma, we have 0-9 valid nonce - nonce_gt[i] = GreaterThan(MAX_REPUTATION_SCORE_BITS); - nonce_gt[i].in[0] <== positive_karma - negative_karma; - nonce_gt[i].in[1] <== karma_nonce[i]; - nonce_gt[i].out * prove_karma_nullifiers + Not(prove_karma_nullifiers) === 1; - - // 6.2 Use karma_nonce to compute all karma nullifiers - karma_nullifier_hasher[i] = Hasher5(); - karma_nullifier_hasher[i].in[0] <== 3; // 3 is the domain separator for karma nullifier - karma_nullifier_hasher[i].in[1] <== identity_nullifier; - karma_nullifier_hasher[i].in[2] <== epoch; - karma_nullifier_hasher[i].in[3] <== karma_nonce[i]; - karma_nullifier_hasher[i].in[4] <== 0; - karma_nullifiers[i] <== karma_nullifier_hasher[i].hash; - } - /* End of check 6 */ - - - /* 7. Check if user has reputation greater than min_rep */ - component rep_get = GreaterEqThan(MAX_REPUTATION_SCORE_BITS); - rep_get.in[0] <== positive_karma - negative_karma; - rep_get.in[1] <== min_rep; - rep_get.out * prove_min_rep + Not(prove_min_rep) === 1; - /* End of check 7 */ - + /* 5. Check conditions on reputations */ // if prove_pos_rep == TRUE then check GT // else return TRUE - // component pos_rep_gt = GreaterThan(MAX_REPUTATION_SCORE_BITS); - // pos_rep_gt.in[0] <== pos_rep; - // pos_rep_gt.in[1] <== min_pos_rep; - // pos_rep_gt.out * prove_pos_rep + Not(prove_pos_rep) === 1; + component pos_rep_gt = GreaterThan(MAX_REPUTATION_SCORE_BITS); + pos_rep_gt.in[0] <== pos_rep; + pos_rep_gt.in[1] <== min_pos_rep; + pos_rep_gt.out * prove_pos_rep + Not(prove_pos_rep) === 1; - // component neg_rep_lt = LessThan(MAX_REPUTATION_SCORE_BITS); - // neg_rep_lt.in[0] <== neg_rep; - // neg_rep_lt.in[1] <== max_neg_rep; - // neg_rep_lt.out * prove_neg_rep + Not(prove_neg_rep) === 1; + component neg_rep_lt = LessThan(MAX_REPUTATION_SCORE_BITS); + neg_rep_lt.in[0] <== neg_rep; + neg_rep_lt.in[1] <== max_neg_rep; + neg_rep_lt.out * prove_neg_rep + Not(prove_neg_rep) === 1; // only valid if pos_rep >= neg_rep - // component rep_diff_get = GreaterEqThan(MAX_REPUTATION_SCORE_BITS); - // rep_diff_get.in[0] <== pos_rep; - // rep_diff_get.in[1] <== neg_rep; + component rep_diff_get = GreaterEqThan(MAX_REPUTATION_SCORE_BITS); + rep_diff_get.in[0] <== pos_rep; + rep_diff_get.in[1] <== neg_rep; // // check if (pos_rep - neg_rep) > min_rep_diff - // component rep_diff_gt = GreaterThan(MAX_REPUTATION_SCORE_BITS); - // rep_diff_gt.in[0] <== pos_rep - neg_rep; - // rep_diff_gt.in[1] <== min_rep_diff; - // rep_diff_get.out * prove_rep_diff + Not(prove_rep_diff) === 1; - // rep_diff_gt.out * prove_rep_diff + Not(prove_rep_diff) === 1; - - /* 7. Check pre-image of graffiti */ - // component graffiti_hasher = HashLeftRight(); - // graffiti_hasher.left <== graffiti_pre_image; - // graffiti_hasher.right <== 0; - // component graffiti_eq = IsEqual(); - // graffiti_eq.in[0] <== graffiti_hasher.hash; - // graffiti_eq.in[1] <== graffiti; - // graffiti_eq.out * prove_graffiti + Not(prove_graffiti) === 1; - - /* End of check 7 */ + component rep_diff_gt = GreaterThan(MAX_REPUTATION_SCORE_BITS); + rep_diff_gt.in[0] <== pos_rep - neg_rep; + rep_diff_gt.in[1] <== min_rep_diff; + rep_diff_get.out * prove_rep_diff + Not(prove_rep_diff) === 1; + rep_diff_gt.out * prove_rep_diff + Not(prove_rep_diff) === 1; + /* End of check 5 */ + + /* 6. Check pre-image of graffiti */ + component graffiti_hasher = HashLeftRight(); + graffiti_hasher.left <== graffiti_pre_image; + graffiti_hasher.right <== 0; + component graffiti_eq = IsEqual(); + graffiti_eq.in[0] <== graffiti_hasher.hash; + graffiti_eq.in[1] <== graffiti; + graffiti_eq.out * prove_graffiti + Not(prove_graffiti) === 1; + + /* End of check 6 */ } \ No newline at end of file diff --git a/circuits/test/proveReputationFromAttester_test.circom b/circuits/test/proveReputationFromAttester_test.circom index 58ec4c2..d833ce8 100644 --- a/circuits/test/proveReputationFromAttester_test.circom +++ b/circuits/test/proveReputationFromAttester_test.circom @@ -1,3 +1,3 @@ -include "../proveReputation.circom" +include "../proveReputationFromAttester.circom" -component main = ProveReputation(4, 4, 128, 2, 252, 10, 10); \ No newline at end of file +component main = proveReputationFromAttester(4, 4, 128, 2, 252); \ No newline at end of file diff --git a/package.json b/package.json index 8fb9107..9639da5 100644 --- a/package.json +++ b/package.json @@ -2,13 +2,15 @@ "name": "unirep", "version": "0.0.1", "description": "", - "main": "index.js", + "main": "index.ts", "scripts": { - "build": "npm run installZkutil && npm run buildVerifyEpochKeySnark && npm run buildUserStateTransitionSnark && npm run buildProveReputationSnark", + "build": "npm run installZkutil && npm run buildVerifyEpochKeySnark && npm run buildUserStateTransitionSnark && npm run buildProveReputationSnark && npm run buildProveReputationFromAttesterSnark", + "start": "npx hardhat node & npx ts-node database/EventsListeners.ts", "installZkutil": "./scripts/installZkutil.sh", "buildVerifyEpochKeySnark": "./scripts/buildVerifyEpochKeySnark.sh", "buildUserStateTransitionSnark": "./scripts/buildUserStateTransitionSnark.sh", "buildProveReputationSnark": "./scripts/buildProveReputationSnark.sh", + "buildProveReputationFromAttesterSnark": "./scripts/buildProveReputationFromAttesterSnark.sh", "test-cli": "./scripts/testCLI.sh", "test": "npx hardhat compile && npx ts-node scripts/buildPoseidon.ts && npm run contractUintTests && npm run circuitUintTests && npm run integrationTest", "contractUintTests": "NODE_OPTIONS=--max-old-space-size=4096 npx hardhat test --no-compile $(find test/contracts -name '*.ts')", diff --git a/scripts/buildProveReputationFromAttesterSnark.sh b/scripts/buildProveReputationFromAttesterSnark.sh new file mode 100755 index 0000000..8c11f2d --- /dev/null +++ b/scripts/buildProveReputationFromAttesterSnark.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +cd "$(dirname "$0")" +cd .. +mkdir -p build + +NODE_OPTIONS=--max-old-space-size=8192 npx ts-node scripts/buildSnarks.ts -i circuits/test/proveReputationFromAttester_test.circom -j build/proveReputationFromAttesterCircuit.r1cs -w build/proveReputationFromAttester.wasm -y build/proveReputationFromAttester.sym -p build/proveReputationFromAttesterPk.json -v build/proveReputationFromAttesterVk.json -s build/ReputationFromAttesterVerifier.sol -vs ReputationFromAttesterVerifier -pr build/proveReputationFromAttester.params -r + +echo 'Copying ReputationVerifier.sol to contracts/' +cp ./build/ReputationFromAttesterVerifier.sol ./contracts/ \ No newline at end of file From 57363c6b4c16d7e1105f68a979f7c150abf0fdc1 Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Fri, 16 Apr 2021 20:13:47 +0800 Subject: [PATCH 15/38] add event schema, reputationFromAttesterVerifier --- .gitignore | 1 + cli/eventListeners.ts | 141 +++++++++++++++++------ cli/leaveComment.ts | 10 +- cli/publishPost.ts | 15 ++- cli/vote.ts | 6 +- contracts/Unirep.sol | 32 ++++- database/models/comment.ts | 16 ++- database/models/newGSTLeaf.ts | 2 + database/models/post.ts | 12 +- database/models/reputationNullifier.ts | 19 +++ database/models/settings.ts | 32 +++++ database/models/userTransitionedState.ts | 4 + scripts/buildUserStateTransitionSnark.sh | 2 +- test/utils.ts | 9 +- 14 files changed, 246 insertions(+), 55 deletions(-) create mode 100644 database/models/reputationNullifier.ts create mode 100644 database/models/settings.ts diff --git a/.gitignore b/.gitignore index 55e3d1b..b3042d1 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ build #Verifier solidity contracts EpochKeyValidityVerifier.sol ReputationVerifier.sol +ReputationFromAttesterVerifier.sol UserStateTransitionVerifier.sol diff --git a/cli/eventListeners.ts b/cli/eventListeners.ts index 66e0297..c4a65aa 100644 --- a/cli/eventListeners.ts +++ b/cli/eventListeners.ts @@ -8,7 +8,9 @@ import { import mongoose from 'mongoose' import NewGSTLeaf, { INewGSTLeaf } from "../database/models/newGSTLeaf"; +import Post, { IPost } from "../database/models/post"; import Comment, { IComment } from "../database/models/comment"; +import ReputationNullifier, { IReputationNullifier } from "../database/models/reputationNullifier"; import Attestation, { IAttestation } from "../database/models/attestation"; import UserTransitionedState, { IUserTransitionedState } from "../database/models/userTransitionedState"; import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' @@ -67,85 +69,148 @@ const eventListeners = async (args: any) => { provider, ) + const iface = new ethers.utils.Interface(Unirep.abi) const NewGSTLeafInsertedFilter = unirepContract.filters.NewGSTLeafInserted() const AttestationSubmittedFilter = unirepContract.filters.AttestationSubmitted() + const postSubmittedFilter = unirepContract.filters.PostSubmitted() + const commentSubmittedFilter = unirepContract.filters.CommentSubmitted() + const reputationSubmittedFilter = unirepContract.filters.ReputationNullifierSubmitted() const epochEndedFilter = unirepContract.filters.EpochEnded() const userStateTransitionedFilter = unirepContract.filters.UserStateTransitioned() // NewGSTLeaf listeners provider.on( NewGSTLeafInsertedFilter, (event) => { - console.log(event) const newLeaf: INewGSTLeaf = new NewGSTLeaf({ formBlockhash: event.blockHash, epoch: event.topics[1], hashedLeaf: event.topics[0], }) - console.log(newLeaf) newLeaf.save() - .then(()=>{console.log('saved')}) + .then(()=>{console.log('Database: saved user sign up event')}) .catch(err => {console.log(err)}) } ) + + // PostSubmitted listeners + provider.on( + postSubmittedFilter, (event) => { + const postId = mongoose.Types.ObjectId(event.topics[2].slice(-24)) + + Post.findByIdAndUpdate( + postId, + {$set: { + status: 1, + transactionHash: event.transactionHash + }}, + ) + .then(() => { + console.log(`Database: updated ${postId} post`) + }) + .catch(err => {console.log(err)}) + } + ) + + // CommentSubmitted listeners + provider.on( + commentSubmittedFilter, (event) => { + const commentId = mongoose.Types.ObjectId(event.topics[2].slice(-24)) + + Post.findOneAndUpdate( + { "comments._id": commentId }, + {$set: { + "comments.$.status": 1, + "comments.$.transactionHash": event.transactionHash + }}, + ) + .then(() => {console.log(`Database: updated ${commentId} comment`)}) + .catch(err => {console.log(err)}) + } + ) + + // ReputationSubmitted listeners + provider.on( + reputationSubmittedFilter, (event) => { + const decodedData = iface.decodeEventLog("ReputationNullifierSubmitted",event.data) + + enum action { + UpVote = 0, + DownVote = 1, + Post = 2, + Comment = 3 + } + + for (let nullifier of decodedData.karmaNullifiers) { + const newReputationNullifier: IReputationNullifier = new ReputationNullifier({ + transactionHash: event.transactionHash, + action: action[decodedData.actionChoice], + nullifiers: nullifier.toString() + }) + newReputationNullifier.save() + .then(()=>{console.log('Database: saved reputation nullifiers')}) + .catch(err => {console.log(err)}) + } + } + ) + // Attestation listeners provider.on( AttestationSubmittedFilter, (event) => { - console.log("Attestation Sumbitted Filter") - const decodedData = ethers.utils.defaultAbiCoder.decode( - ['uint256', 'uint256', 'uint256', 'uint256', 'bool'], - event.data - ) + const _epoch = event.topics[1] + const _epochKey = event.topics[2] + const _attester = event.topics[3] + const decodedData = iface.decodeEventLog("AttestationSubmitted",event.data) + const newAttestation: IAttestation = new Attestation({ - epoch: event.topics[1], - epochKey: event.topics[2], - attester: event.topics[3], - attesterId: decodedData[0], - posRep: decodedData[1], - negRep: decodedData[2], - graffiti: decodedData[3], - overwriteGraffiti: decodedData[4], + transactionHash: event.transactionHash, + epoch: _epoch, + epochKey: _epochKey, + attester: _attester, + attesterId: decodedData?.attestation?.attesterId, + posRep: decodedData?.attestation?.posRep, + negRep: decodedData?.attestation?.negRep, + graffiti: decodedData?.attestation?.graffiti, + overwriteGraffiti: decodedData?.attestation?.overwriteGraffiti, }) newAttestation.save() - .then(()=>{console.log(newAttestation)}) + .then(()=>{console.log('Database: saved submitted attestation')}) .catch(err => {console.log(err)}) } ) // Epoch Ended filter listeners - provider.on( - epochEndedFilter, (event) =>{ - console.log("epoch Ended Filter") - console.log(event) - } - ) + // provider.on( + // epochEndedFilter, (event) =>{ + // console.log("epoch Ended Filter") + // console.log(event) + // } + // ) // User state transition listeners provider.on( userStateTransitionedFilter, (event) =>{ - console.log("User State Transitioned Filter") - console.log(event) - const decodedData = ethers.utils.defaultAbiCoder.decode( - ['uint256','uint256','uint256','uint256','uint256[8]','uint256[]','uint256[]'], - event.data - ) + const _toEpoch = event.topics[1] + const decodedData = iface.decodeEventLog("UserStateTransitioned",event.data) const newUserState: IUserTransitionedState = new UserTransitionedState({ - toEpoch: event.topics[1], - fromEpoch: decodedData[0], - fromGlobalStateTree: decodedData[1], - fromEpochTree: decodedData[2], - fromNullifierTreeRoot: decodedData[3], - proof: decodedData[4], - attestationNullifiers: decodedData[5], - epkNullifiers: decodedData[6], + transactionHash: event.transactionHash, + toEpoch: _toEpoch, + fromEpoch: decodedData?.userTransitionedData?.fromEpoch, + fromGlobalStateTree: decodedData?.userTransitionedData?.fromGlobalStateTree, + fromEpochTree: decodedData?.userTransitionedData?.fromEpochTree, + fromNullifierTreeRoot: decodedData?.userTransitionedData?.fromNullifierTreeRoot, + newGlobalStateTreeLeaf: decodedData?.userTransitionedData?.newGlobalStateTreeLeaf, + proof: decodedData?.userTransitionedData?.proof, + attestationNullifiers: decodedData?.userTransitionedData?.attestationNullifiers, + epkNullifiers: decodedData?.userTransitionedData?.epkNullifiers, }) newUserState.save() - .then(()=>{console.log(newUserState)}) + .then(()=>{console.log('Database: saved user transitioned state')}) .catch(err => {console.log(err)}) } ) diff --git a/cli/leaveComment.ts b/cli/leaveComment.ts index 5b42732..0447874 100644 --- a/cli/leaveComment.ts +++ b/cli/leaveComment.ts @@ -257,12 +257,20 @@ const leaveComment = async (args: any) => { const newComment: IComment = new Comment({ content: args.text, + // TODO: hashedContent + epochKey: epk, + epkProof: base64url.encode(JSON.stringify(proof)), + proveMinRep: Boolean(proveMinRep), + minRep: Number(minRep), + comments: [], + status: 0 }); let tx try { tx = await unirepContract.leaveComment( BigInt(add0x(args.post_id)), + BigInt(add0x(newComment._id.toString())), epochKey, args.text, publicSignals, @@ -271,7 +279,7 @@ const leaveComment = async (args: any) => { { value: attestingFee, gasLimit: 1000000 } ) - const postRes = await Post.findByIdAndUpdate( + const commentRes = await Post.findByIdAndUpdate( {_id: mongoose.Types.ObjectId(args.post_id) }, { $push: {comments: newComment }} ) diff --git a/cli/publishPost.ts b/cli/publishPost.ts index b425c11..8d6294c 100644 --- a/cli/publishPost.ts +++ b/cli/publishPost.ts @@ -2,7 +2,7 @@ import base64url from 'base64url' import { ethers as hardhatEthers } from 'hardhat' import { ethers } from 'ethers' import { genIdentityCommitment, unSerialiseIdentity } from 'libsemaphore' -import { stringifyBigInts } from 'maci-crypto' +import { hashLeftRight, hashOne, stringifyBigInts } from 'maci-crypto' import { promptPwd, @@ -218,7 +218,6 @@ const publishPost = async (args: any) => { proveMinRep, // indicate to prove minimum reputation the user has minRep // the amount of minimum reputation the user wants to prove ) - const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) const nullifiers: BigInt[] = [] @@ -249,6 +248,10 @@ const publishPost = async (args: any) => { return } + if(proveMinRep){ + console.log(`Prove minimum reputation: ${minRep}`) + } + const db = await mongoose.connect( dbUri, { useNewUrlParser: true, @@ -256,12 +259,16 @@ const publishPost = async (args: any) => { useUnifiedTopology: true } ) - + const newpost: IPost = new Post({ content: args.text, + // TODO: hashedContent epochKey: epk, epkProof: base64url.encode(JSON.stringify(proof)), - comments: [] + proveMinRep: Boolean(proveMinRep), + minRep: Number(minRep), + comments: [], + status: 0 }); let tx diff --git a/cli/vote.ts b/cli/vote.ts index f97ee70..4ace342 100644 --- a/cli/vote.ts +++ b/cli/vote.ts @@ -257,8 +257,8 @@ const vote = async (args: any) => { const circuitInputs = await userState.genProveReputationCircuitInputs( epkNonce, // generate epoch key from epoch nonce - BigInt(1), // indicate to prove karma nullifiers - BigInt(voteValue), // the amount of output karma nullifiers + proveKarmaNullifiers, // indicate to prove karma nullifiers + proveKarmaAmount, // the amount of output karma nullifiers nonceList, // nonce to generate karma nullifiers proveMinRep, // indicate to prove minimum reputation the user has minRep // the amount of minimum reputation the user wants to prove @@ -272,6 +272,8 @@ const vote = async (args: any) => { nullifiers.push(getSignalByNameViaSym('proveReputation', results['witness'], variableName) % BigInt(2 ** nullifierTreeDepth) ) } + console.log(nullifiers) + // TODO: Not sure if this validation is necessary const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) if(!isValid) { diff --git a/contracts/Unirep.sol b/contracts/Unirep.sol index 6b58d39..93f43aa 100644 --- a/contracts/Unirep.sol +++ b/contracts/Unirep.sol @@ -48,6 +48,8 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { // The maximum number of signups allowed uint256 immutable public maxUsers; + enum actionChoices { UpVote, DownVote, Post, Comment } + // The default given karma when users sign up uint256 immutable public defaultKarma; @@ -124,13 +126,16 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { event CommentSubmitted( uint256 indexed _epoch, - uint256 indexed _postId, + uint256 indexed _commentId, uint256 indexed _epochKey, + uint256 _postId, string _hahsedContent, ProofsRelated proof ); event ReputationNullifierSubmitted( + uint256 indexed _epoch, + actionChoices actionChoice, uint256[] karmaNullifiers ); @@ -270,7 +275,8 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { uint256 epochKey, ProofsRelated memory proof, uint256[] memory karmaNullifiers, - uint256 spendReputationAmount + uint256 spendReputationAmount, + actionChoices actionChoice ) internal { require(karmaNullifiers.length == spendReputationAmount, "Unirep: should submit the exact amount of karma to execute action"); // Determine if karma nullifiers are submitted before @@ -295,6 +301,8 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { emit Sequencer("ReputationNullifierSubmitted"); emit ReputationNullifierSubmitted( + currentEpoch, + actionChoice, karmaNullifiers ); } @@ -316,7 +324,7 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { proof.c ) = unpackProof(_publicSignals, _proof); - spendReputation(epochKey, proof, karmaNullifiers, postKarma); + spendReputation(epochKey, proof, karmaNullifiers, postKarma, actionChoices.Post); emit Sequencer("PostSubmitted"); emit PostSubmitted( @@ -330,6 +338,7 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { function leaveComment( uint256 postId, + uint256 commentId, uint256 epochKey, string calldata hashedContent, uint256[] calldata _publicSignals, @@ -345,13 +354,14 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { proof.c ) = unpackProof(_publicSignals, _proof); - spendReputation(epochKey, proof, karmaNullifiers, commentKarma); + spendReputation(epochKey, proof, karmaNullifiers, commentKarma, actionChoices.Comment); emit Sequencer("CommentSubmitted"); emit CommentSubmitted( currentEpoch, - postId, + commentId, epochKey, + postId, hashedContent, proof ); @@ -364,6 +374,9 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { uint256[] calldata _publicSignals, uint256[8] calldata _proof, uint256[] calldata karmaNullifiers) external payable { + require((attestation.posRep + attestation.negRep) > 0, "Unirep: should submit a positive vote value"); + require(attestation.posRep * attestation.negRep == 0, "Unirep: should only choose to upvote or to downvote"); + ProofsRelated memory proof; // Unpack the snark proof ( @@ -373,8 +386,15 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { proof.c ) = unpackProof(_publicSignals, _proof); + actionChoices action; + if(attestation.posRep > 0){ + action = actionChoices.UpVote; + } else{ + action = actionChoices.DownVote; + } + // Spend attester's reputation - spendReputation(fromEpochKey, proof, karmaNullifiers, attestation.posRep + attestation.negRep); + spendReputation(fromEpochKey, proof, karmaNullifiers, attestation.posRep + attestation.negRep, action); // Send Reputation to others submitAttestation(attestation, toEpochKey); diff --git a/database/models/comment.ts b/database/models/comment.ts index 660b945..dba4750 100644 --- a/database/models/comment.ts +++ b/database/models/comment.ts @@ -2,11 +2,25 @@ import * as mongoose from 'mongoose'; import { Schema, Document } from 'mongoose'; export interface IComment extends Document { + transactionHash: string content: string + hashedContent: string + epochKey: string + epkProof: string + proveMinRep: boolean + minRep: number + status: number // 0: pending, 1: on-chain, 2: disabled } const CommentSchema: Schema = new Schema({ - content: { type: String } + transactionHash: { type: String }, + content: { type: String }, + hashedContent: {type: String}, + epochKey: { type: String, required: true }, + epkProof: { type: String, required: true }, + proveMinRep: { type: Boolean }, + minRep: { type: Number }, + status: { type: Number, required: true }, }); export default mongoose.model('Comment', CommentSchema); \ No newline at end of file diff --git a/database/models/newGSTLeaf.ts b/database/models/newGSTLeaf.ts index 00ec282..ff09355 100644 --- a/database/models/newGSTLeaf.ts +++ b/database/models/newGSTLeaf.ts @@ -3,12 +3,14 @@ import * as mongoose from 'mongoose'; import { Schema, Document } from 'mongoose'; export interface INewGSTLeaf extends Document { + transactionHash: string formBlockhash: string epoch: BigNumber hashedLeaf: BigNumber } const NewGSTLeafSchema: Schema = new Schema({ + transactionHash: { type: String }, formBlockhash: { type: String }, epoch: { type: String }, hashedLeaf: { type: String } diff --git a/database/models/post.ts b/database/models/post.ts index 71b00f4..4df08ba 100644 --- a/database/models/post.ts +++ b/database/models/post.ts @@ -3,17 +3,27 @@ import { Schema, Document } from 'mongoose'; import Comment, { IComment } from './comment'; export interface IPost extends Document { + transactionHash: string content: string + hashedContent: string epochKey: string epkProof: string + proveMinRep: boolean + minRep: number comments: [ IComment ] + status: number // 0: pending, 1: on-chain, 2: disabled } const PostSchema: Schema = new Schema({ + transactionHash: { type: String }, content: { type: String }, + hashedContent: {type: String }, epochKey: { type: String, required: true }, epkProof: { type: String, required: true }, - comments: { type: [ ]} + proveMinRep: { type: Boolean }, + minRep: { type: Number }, + comments: { type: [ ]}, + status: { type: Number, required: true }, }); export default mongoose.model('Post', PostSchema); \ No newline at end of file diff --git a/database/models/reputationNullifier.ts b/database/models/reputationNullifier.ts new file mode 100644 index 0000000..96a2476 --- /dev/null +++ b/database/models/reputationNullifier.ts @@ -0,0 +1,19 @@ +import * as mongoose from 'mongoose'; +import { Schema, Document } from 'mongoose'; + +export interface IReputationNullifier extends Document { + // on-chain transaction hash + transactionHash: string + // upvote, downvote, post, comment + action: string + // spend nullifiers + nullifiers: string + } + + const ReputationNullifierSchema: Schema = new Schema({ + transactionHash: { type: String }, + action: { type: String, enum: ['UpVote', 'DownVote', 'Post', 'Comment'] }, + nullifiers: { type: String }, + }, { collection: 'ReputationNullifier' }); + + export default mongoose.model('ReputationNullifier', ReputationNullifierSchema); \ No newline at end of file diff --git a/database/models/settings.ts b/database/models/settings.ts new file mode 100644 index 0000000..0f2386c --- /dev/null +++ b/database/models/settings.ts @@ -0,0 +1,32 @@ +import * as mongoose from 'mongoose'; +import { Schema, Document } from 'mongoose'; +import { ethers } from 'ethers' +import { hashLeftRight } from 'maci-crypto' +import { computeEmptyUserStateRoot } from '../../test/utils' + +export interface ISettings extends Document { + globalStateTreeDepth: number + userStateTreeDepth: number + epochTreeDepth: number + nullifierTreeDepth: number + attestingFee: number + epochLength: number + numEpochKeyNoncePerEpoch: number + numAttestationsPerEpochKey: number + defaultGSTLeaf: string +} + +const SettingSchema: Schema = new Schema({ + globalStateTreeDepth: { type: Number }, + userStateTreeDepth: { type: Number }, + epochTreeDepth: { type: Number }, + nullifierTreeDepth: { type: Number }, + attestingFee: { type: Number }, + epochLength: { type: Number }, + numEpochKeyNoncePerEpoch: { type: Number }, + numAttestationsPerEpochKey: { type: Number }, + defaultGSTLeaf: { type: String }, +}, { collection: 'Settings' }); + + +export default mongoose.model('Settings', SettingSchema); \ No newline at end of file diff --git a/database/models/userTransitionedState.ts b/database/models/userTransitionedState.ts index df53eb3..fe784ab 100644 --- a/database/models/userTransitionedState.ts +++ b/database/models/userTransitionedState.ts @@ -3,8 +3,10 @@ import * as mongoose from 'mongoose'; import { Schema, Document } from 'mongoose'; export interface IUserTransitionedState extends Document { + transactionHash: string toEpoch: number fromEpoch: number + newGlobalStateTreeLeaf: BigNumber fromGlobalStateTree: BigNumber fromEpochTree: BigNumber fromNullifierTreeRoot: BigNumber @@ -14,8 +16,10 @@ export interface IUserTransitionedState extends Document { } const UserTransitionedStateSchema: Schema = new Schema({ + transactionHash: { type: String }, toEpoch: { type: Number, required: true }, fromEpoch: { type: Number, required: true }, + newGlobalStateTreeLeaf: { type: {}, required: true }, fromGlobalStateTree: { type: {}, required: true }, fromEpochTree: { type: {}, required: true}, fromNullifierTreeRoot: { type: {}, required: true }, diff --git a/scripts/buildUserStateTransitionSnark.sh b/scripts/buildUserStateTransitionSnark.sh index b36e54a..89c23b1 100755 --- a/scripts/buildUserStateTransitionSnark.sh +++ b/scripts/buildUserStateTransitionSnark.sh @@ -6,7 +6,7 @@ cd "$(dirname "$0")" cd .. mkdir -p build -NODE_OPTIONS=--max-old-space-size=8192 npx ts-node scripts/buildSnarks.ts -i circuits/test/userStateTransition_test.circom -j build/userStateTransitionCircuit.r1cs -w build/userStateTransition.wasm -y build/userStateTransition.sym -p build/userStateTransitionPk.json -v build/userStateTransitionVk.json -s build/UserStateTransitionVerifier.sol -vs UserStateTransitionVerifier -pr build/userStateTransition.params +NODE_OPTIONS=--max-old-space-size=8192 npx ts-node scripts/buildSnarks.ts -i circuits/test/userStateTransition_test.circom -j build/userStateTransitionCircuit.r1cs -w build/userStateTransition.wasm -y build/userStateTransition.sym -p build/userStateTransitionPk.json -v build/userStateTransitionVk.json -s build/UserStateTransitionVerifier.sol -vs UserStateTransitionVerifier -pr build/userStateTransition.params -r echo 'Copying UserStateTransitionVerifier.sol to contracts/' cp ./build/UserStateTransitionVerifier.sol ./contracts/ \ No newline at end of file diff --git a/test/utils.ts b/test/utils.ts index cc9e3c2..597d1d6 100644 --- a/test/utils.ts +++ b/test/utils.ts @@ -40,7 +40,7 @@ const deployUnirep = async ( _treeDepths: any, _settings?: any): Promise => { let PoseidonT3Contract, PoseidonT6Contract - let EpochKeyValidityVerifierContract, UserStateTransitionVerifierContract, ReputationVerifierContract + let EpochKeyValidityVerifierContract, UserStateTransitionVerifierContract, ReputationVerifierContract, ReputationFromAttesterVerifierContract console.log('Deploying PoseidonT3') PoseidonT3Contract = await waffle.deployContract( @@ -75,6 +75,12 @@ const deployUnirep = async ( deployer )).deploy() + console.log('Deploying ReputationFromAttesterVerifier') + ReputationFromAttesterVerifierContract = await (await hardhatEthers.getContractFactory( + "ReputationFromAttesterVerifier", + deployer + )).deploy() + console.log('Deploying Unirep') let _maxUsers, _numEpochKeyNoncePerEpoch, _numAttestationsPerEpochKey, _defaultKarma, _epochLength, _attestingFee @@ -111,6 +117,7 @@ const deployUnirep = async ( EpochKeyValidityVerifierContract.address, UserStateTransitionVerifierContract.address, ReputationVerifierContract.address, + ReputationFromAttesterVerifierContract.address, _numEpochKeyNoncePerEpoch, _numAttestationsPerEpochKey, _defaultKarma, From 294f3ff50406dccb407b8102161a34a28632b85e Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Mon, 26 Apr 2021 17:58:18 +0800 Subject: [PATCH 16/38] gen proving circuit from db, db utils --- cli/deploy.ts | 4 +- cli/eventListeners.ts | 152 +--- cli/genReputationProof.ts | 27 +- cli/leaveComment.ts | 96 ++- cli/publishPost.ts | 98 ++- cli/test/testAllCommands.ts | 26 +- cli/userStateTransition.ts | 29 +- cli/vote.ts | 76 +- config/socialMedia.ts | 10 +- core/UserState.ts | 4 +- core/utils.ts | 4 +- crypto/SMT/utils.ts | 1 + database/models/GSTLeaf.ts | 21 + database/models/attestation.ts | 44 +- database/models/epochTreeLeaf.ts | 20 + database/models/newGSTLeaf.ts | 19 - database/models/nullifierTreeLeaf.ts | 16 + database/models/settings.ts | 4 +- database/models/userSignUp.ts | 17 + database/utils.ts | 1112 ++++++++++++++++++++++++++ test/utils.ts | 4 +- 21 files changed, 1490 insertions(+), 294 deletions(-) create mode 100644 database/models/GSTLeaf.ts create mode 100644 database/models/epochTreeLeaf.ts delete mode 100644 database/models/newGSTLeaf.ts create mode 100644 database/models/nullifierTreeLeaf.ts create mode 100644 database/models/userSignUp.ts create mode 100644 database/utils.ts diff --git a/cli/deploy.ts b/cli/deploy.ts index 327b909..4f886b1 100644 --- a/cli/deploy.ts +++ b/cli/deploy.ts @@ -1,5 +1,5 @@ import { ethers } from 'ethers' -import { DEFAULT_START_KARMA } from '../config/socialMedia' +import { DEFAULT_AIRDROPPED_KARMA } from '../config/socialMedia' import { maxUsers } from '../config/testLocal' import { deployUnirep, getTreeDepthsForTesting } from '../test/utils' import { DEFAULT_ATTESTING_FEE, DEFAULT_EPOCH_LENGTH, DEFAULT_ETH_PROVIDER, DEFAULT_MAX_EPOCH_KEY_NONCE, DEFAULT_NUM_ATTESTATIONS_PER_EPOCH_KEY, DEFAULT_TREE_DEPTHS_CONFIG } from './defaults' @@ -106,7 +106,7 @@ const deploy = async (args: any) => { const _numAttestationsPerEpochKey = DEFAULT_NUM_ATTESTATIONS_PER_EPOCH_KEY // Default given karma - const _deaultKarma = DEFAULT_START_KARMA + const _deaultKarma = DEFAULT_AIRDROPPED_KARMA // Epoch length const _epochLength = (args.epoch_length != undefined) ? args.epoch_length : DEFAULT_EPOCH_LENGTH diff --git a/cli/eventListeners.ts b/cli/eventListeners.ts index c4a65aa..96ea21a 100644 --- a/cli/eventListeners.ts +++ b/cli/eventListeners.ts @@ -7,13 +7,17 @@ import { } from './utils' import mongoose from 'mongoose' -import NewGSTLeaf, { INewGSTLeaf } from "../database/models/newGSTLeaf"; -import Post, { IPost } from "../database/models/post"; -import Comment, { IComment } from "../database/models/comment"; -import ReputationNullifier, { IReputationNullifier } from "../database/models/reputationNullifier"; -import Attestation, { IAttestation } from "../database/models/attestation"; -import UserTransitionedState, { IUserTransitionedState } from "../database/models/userTransitionedState"; import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' +import { saveSettingsFromContract, + updateDBFromNewGSTLeafInsertedEvent, + updateDBFromAttestationEvent, + updateDBFromPostSubmittedEvent, + updateDBFromCommentSubmittedEvent, + updateDBFromReputationNullifierSubmittedEvent, + updateDBFromEpochEndedEvent, + updateDBFromUserStateTransitionEvent, + connectDB, + initDB,}from '../database/utils' const configureSubparser = (subparsers: any) => { const parser = subparsers.addParser( @@ -54,13 +58,12 @@ const eventListeners = async (args: any) => { console.log('listener start') - const db = await mongoose.connect( - dbUri, - { useNewUrlParser: true, - useFindAndModify: false, - useUnifiedTopology: true - } - ) + const db = await connectDB(dbUri) + const isInit = await initDB(db) + if(!isInit){ + console.error('Error: DB is not initialized') + return + } const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) const unirepContract = new ethers.Contract( @@ -68,8 +71,9 @@ const eventListeners = async (args: any) => { Unirep.abi, provider, ) + + await saveSettingsFromContract(unirepContract) - const iface = new ethers.utils.Interface(Unirep.abi) const NewGSTLeafInsertedFilter = unirepContract.filters.NewGSTLeafInserted() const AttestationSubmittedFilter = unirepContract.filters.AttestationSubmitted() @@ -78,141 +82,41 @@ const eventListeners = async (args: any) => { const reputationSubmittedFilter = unirepContract.filters.ReputationNullifierSubmitted() const epochEndedFilter = unirepContract.filters.EpochEnded() const userStateTransitionedFilter = unirepContract.filters.UserStateTransitioned() + // NewGSTLeaf listeners provider.on( - NewGSTLeafInsertedFilter, (event) => { - const newLeaf: INewGSTLeaf = new NewGSTLeaf({ - formBlockhash: event.blockHash, - epoch: event.topics[1], - hashedLeaf: event.topics[0], - }) - - newLeaf.save() - .then(()=>{console.log('Database: saved user sign up event')}) - .catch(err => {console.log(err)}) - } + NewGSTLeafInsertedFilter, (event) => updateDBFromNewGSTLeafInsertedEvent(event) ) // PostSubmitted listeners provider.on( - postSubmittedFilter, (event) => { - const postId = mongoose.Types.ObjectId(event.topics[2].slice(-24)) - - Post.findByIdAndUpdate( - postId, - {$set: { - status: 1, - transactionHash: event.transactionHash - }}, - ) - .then(() => { - console.log(`Database: updated ${postId} post`) - }) - .catch(err => {console.log(err)}) - } + postSubmittedFilter, (event) => updateDBFromPostSubmittedEvent(event) ) // CommentSubmitted listeners provider.on( - commentSubmittedFilter, (event) => { - const commentId = mongoose.Types.ObjectId(event.topics[2].slice(-24)) - - Post.findOneAndUpdate( - { "comments._id": commentId }, - {$set: { - "comments.$.status": 1, - "comments.$.transactionHash": event.transactionHash - }}, - ) - .then(() => {console.log(`Database: updated ${commentId} comment`)}) - .catch(err => {console.log(err)}) - } + commentSubmittedFilter, (event) => updateDBFromCommentSubmittedEvent(event) ) // ReputationSubmitted listeners provider.on( - reputationSubmittedFilter, (event) => { - const decodedData = iface.decodeEventLog("ReputationNullifierSubmitted",event.data) - - enum action { - UpVote = 0, - DownVote = 1, - Post = 2, - Comment = 3 - } - - for (let nullifier of decodedData.karmaNullifiers) { - const newReputationNullifier: IReputationNullifier = new ReputationNullifier({ - transactionHash: event.transactionHash, - action: action[decodedData.actionChoice], - nullifiers: nullifier.toString() - }) - newReputationNullifier.save() - .then(()=>{console.log('Database: saved reputation nullifiers')}) - .catch(err => {console.log(err)}) - } - } + reputationSubmittedFilter, (event) => updateDBFromReputationNullifierSubmittedEvent(event) ) // Attestation listeners provider.on( - AttestationSubmittedFilter, (event) => { - const _epoch = event.topics[1] - const _epochKey = event.topics[2] - const _attester = event.topics[3] - const decodedData = iface.decodeEventLog("AttestationSubmitted",event.data) - - const newAttestation: IAttestation = new Attestation({ - transactionHash: event.transactionHash, - epoch: _epoch, - epochKey: _epochKey, - attester: _attester, - attesterId: decodedData?.attestation?.attesterId, - posRep: decodedData?.attestation?.posRep, - negRep: decodedData?.attestation?.negRep, - graffiti: decodedData?.attestation?.graffiti, - overwriteGraffiti: decodedData?.attestation?.overwriteGraffiti, - }) - - newAttestation.save() - .then(()=>{console.log('Database: saved submitted attestation')}) - .catch(err => {console.log(err)}) - } + AttestationSubmittedFilter, (event) => updateDBFromAttestationEvent(event) ) // Epoch Ended filter listeners - // provider.on( - // epochEndedFilter, (event) =>{ - // console.log("epoch Ended Filter") - // console.log(event) - // } - // ) + provider.on( + epochEndedFilter, (event) => updateDBFromEpochEndedEvent(event, unirepContract) + ) // User state transition listeners provider.on( - userStateTransitionedFilter, (event) =>{ - - const _toEpoch = event.topics[1] - const decodedData = iface.decodeEventLog("UserStateTransitioned",event.data) - - const newUserState: IUserTransitionedState = new UserTransitionedState({ - transactionHash: event.transactionHash, - toEpoch: _toEpoch, - fromEpoch: decodedData?.userTransitionedData?.fromEpoch, - fromGlobalStateTree: decodedData?.userTransitionedData?.fromGlobalStateTree, - fromEpochTree: decodedData?.userTransitionedData?.fromEpochTree, - fromNullifierTreeRoot: decodedData?.userTransitionedData?.fromNullifierTreeRoot, - newGlobalStateTreeLeaf: decodedData?.userTransitionedData?.newGlobalStateTreeLeaf, - proof: decodedData?.userTransitionedData?.proof, - attestationNullifiers: decodedData?.userTransitionedData?.attestationNullifiers, - epkNullifiers: decodedData?.userTransitionedData?.epkNullifiers, - }) - - newUserState.save() - .then(()=>{console.log('Database: saved user transitioned state')}) - .catch(err => {console.log(err)}) - } + userStateTransitionedFilter, (event) => updateDBFromUserStateTransitionEvent(event) ) } diff --git a/cli/genReputationProof.ts b/cli/genReputationProof.ts index 56065fa..da9c18f 100644 --- a/cli/genReputationProof.ts +++ b/cli/genReputationProof.ts @@ -14,6 +14,7 @@ import { formatProofForVerifierContract, genVerifyReputationFromAttesterProofAnd import { stringifyBigInts } from 'maci-crypto' import { add0x } from '../crypto/SMT' import { identityPrefix, reputationProofPrefix } from './prefix' +import { genProveReputationFromAttesterCircuitInputsFromDB } from '../database/utils' const configureSubparser = (subparsers: any) => { const parser = subparsers.addParser( @@ -97,6 +98,14 @@ const configureSubparser = (subparsers: any) => { help: 'The Unirep contract address', } ) + + parser.addArgument( + ['-db', '--from-database'], + { + action: 'storeTrue', + help: 'Indicate if to generate proving circuit from database', + } + ) } const genReputationProof = async (args: any) => { @@ -151,7 +160,23 @@ const genReputationProof = async (args: any) => { const maxNegRep = args.max_neg_rep != null ? BigInt(args.max_neg_rep) : BigInt(0) const graffitiPreImage = args.graffiti_preimage != null ? BigInt(add0x(args.graffiti_preimage)) : BigInt(0) - const circuitInputs = await userState.genProveReputationFromAttesterCircuitInputs(attesterId, provePosRep, proveNegRep, proveRepDiff, proveGraffiti, minPosRep, maxNegRep, minRepDiff, graffitiPreImage) + + let circuitInputs: any + + if(args.from_database){ + + console.log('generating proving circuit from database...') + + circuitInputs = await genProveReputationFromAttesterCircuitInputsFromDB( + userState.getUnirepStateCurrentEpoch(), id,attesterId, provePosRep, proveNegRep, proveRepDiff, proveGraffiti, minPosRep, maxNegRep, minRepDiff, graffitiPreImage) + + } else { + + console.log('generating proving circuit from contract...') + + circuitInputs = await userState.genProveReputationFromAttesterCircuitInputs(attesterId, provePosRep, proveNegRep, proveRepDiff, proveGraffiti, minPosRep, maxNegRep, minRepDiff, graffitiPreImage) + } + // console.log('Proving reputation...') // console.log('----------------------User State----------------------') // console.log(userState.toJSON(4)) diff --git a/cli/leaveComment.ts b/cli/leaveComment.ts index 0447874..bd163ee 100644 --- a/cli/leaveComment.ts +++ b/cli/leaveComment.ts @@ -2,6 +2,7 @@ import base64url from 'base64url' import { ethers as hardhatEthers } from 'hardhat' import { ethers } from 'ethers' import { genIdentityCommitment, unSerialiseIdentity } from 'libsemaphore' +import mongoose from 'mongoose' import { promptPwd, @@ -15,19 +16,19 @@ import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' import { dbUri } from '../config/database'; import { add0x } from '../crypto/SMT' -import { genUnirepStateFromContract, genUserStateFromContract } from '../core' +import { genUserStateFromContract } from '../core' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import { epkProofPrefix, identityPrefix } from './prefix' import Comment, { IComment } from "../database/models/comment"; import Post, { IPost } from "../database/models/post"; -import mongoose from 'mongoose' import { DEFAULT_COMMENT_KARMA } from '../config/socialMedia' import { formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyProveReputationProof } from '../test/circuits/utils' import { stringifyBigInts } from 'maci-crypto' import { nullifierTreeDepth } from '../config/testLocal' import { genEpochKey } from '../test/utils' +import { genProveReputationCircuitInputsFromDB } from '../database/utils' const configureSubparser = (subparsers: any) => { const parser = subparsers.addParser( @@ -106,6 +107,14 @@ const configureSubparser = (subparsers: any) => { } ) + parser.addArgument( + ['-db', '--from-database'], + { + action: 'storeTrue', + help: 'Indicate if to generate proving circuit from database', + } + ) + const privkeyGroup = parser.addMutuallyExclusiveGroup({ required: true }) privkeyGroup.addArgument( @@ -175,12 +184,6 @@ const leaveComment = async (args: any) => { ) const attestingFee = await unirepContract.attestingFee() - const unirepState = await genUnirepStateFromContract( - provider, - unirepAddress, - startBlock, - ) - // Validate epoch key nonce const epkNonce = args.epoch_key_nonce const numEpochKeyNoncePerEpoch = await unirepContract.numEpochKeyNoncePerEpoch() @@ -196,15 +199,6 @@ const leaveComment = async (args: any) => { const treeDepths = await unirepContract.treeDepths() const epochTreeDepth = treeDepths.epochTreeDepth const epk = genEpochKey(id.identityNullifier, currentEpoch, epkNonce, epochTreeDepth).toString(16) - - // Gen epoch key proof and reputation proof - const userState = await genUserStateFromContract( - provider, - unirepAddress, - startBlock, - id, - commitment, - ) // gen nullifier nonce list const proveKarmaNullifiers = BigInt(1) @@ -218,15 +212,47 @@ const leaveComment = async (args: any) => { // gen minRep proof const proveMinRep = args.min_rep != null ? BigInt(1) : BigInt(0) const minRep = args.min_rep != null ? BigInt(args.min_rep) : BigInt(0) + + let circuitInputs: any + + if(args.from_database){ + + console.log('generating proving circuit from database...') + + // Gen epoch key proof and reputation proof from database + circuitInputs = await genProveReputationCircuitInputsFromDB( + currentEpoch, + id, + epkNonce, // generate epoch key from epoch nonce + proveKarmaNullifiers, // indicate to prove karma nullifiers + proveKarmaAmount, // the amount of output karma nullifiers + nonceList, // nonce to generate karma nullifiers + proveMinRep, // indicate to prove minimum reputation the user has + minRep // the amount of minimum reputation the user wants to prove + ) - const circuitInputs = await userState.genProveReputationCircuitInputs( - epkNonce, // generate epoch key from epoch nonce - proveKarmaNullifiers, // indicate to prove karma nullifiers - proveKarmaAmount, // the amount of output karma nullifiers - nonceList, // nonce to generate karma nullifiers - proveMinRep, // indicate to prove minimum reputation the user has - minRep // the amount of minimum reputation the user wants to prove - ) + } else { + + console.log('generating proving circuit from contract...') + + // Gen epoch key proof and reputation proof from Unirep contract + const userState = await genUserStateFromContract( + provider, + unirepAddress, + startBlock, + id, + commitment, + ) + + circuitInputs = await userState.genProveReputationCircuitInputs( + epkNonce, // generate epoch key from epoch nonce + proveKarmaNullifiers, // indicate to prove karma nullifiers + proveKarmaAmount, // the amount of output karma nullifiers + nonceList, // nonce to generate karma nullifiers + proveMinRep, // indicate to prove minimum reputation the user has + minRep // the amount of minimum reputation the user wants to prove + ) + } const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) const nullifiers: BigInt[] = [] @@ -247,14 +273,6 @@ const leaveComment = async (args: any) => { const epochKey = BigInt(add0x(epk)) const publicSignals = results['publicSignals'] - const db = await mongoose.connect( - dbUri, - { useNewUrlParser: true, - useFindAndModify: false, - useUnifiedTopology: true - } - ) - const newComment: IComment = new Comment({ content: args.text, // TODO: hashedContent @@ -278,21 +296,27 @@ const leaveComment = async (args: any) => { nullifiers, { value: attestingFee, gasLimit: 1000000 } ) - + const db = await mongoose.connect( + dbUri, + { useNewUrlParser: true, + useFindAndModify: false, + useUnifiedTopology: true + } + ) const commentRes = await Post.findByIdAndUpdate( {_id: mongoose.Types.ObjectId(args.post_id) }, { $push: {comments: newComment }} ) - + db.disconnect(); } catch(e) { console.error('Error: the transaction failed') if (e.message) { console.error(e.message) } + return } - db.disconnect(); const receipt = await tx.wait() console.log('Transaction hash:', tx.hash) } diff --git a/cli/publishPost.ts b/cli/publishPost.ts index 8d6294c..b03c6f5 100644 --- a/cli/publishPost.ts +++ b/cli/publishPost.ts @@ -3,6 +3,7 @@ import { ethers as hardhatEthers } from 'hardhat' import { ethers } from 'ethers' import { genIdentityCommitment, unSerialiseIdentity } from 'libsemaphore' import { hashLeftRight, hashOne, stringifyBigInts } from 'maci-crypto' +import mongoose from 'mongoose' import { promptPwd, @@ -16,18 +17,18 @@ import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' import { dbUri } from '../config/database'; import { add0x } from '../crypto/SMT' -import { genUnirepStateFromContract, genUserStateFromContract } from '../core' +import { genUserStateFromContract } from '../core' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import { identityPrefix, identityCommitmentPrefix, epkProofPrefix } from './prefix' import Post, { IPost } from "../database/models/post"; -import mongoose from 'mongoose' import { DEFAULT_POST_KARMA } from '../config/socialMedia' import { assert } from 'console' import { formatProofForVerifierContract, genVerifyEpochKeyProofAndPublicSignals, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyEPKProof, verifyProveReputationProof } from '../test/circuits/utils' import { genEpochKey, genKarmaNullifier } from '../test/utils' import { nullifierTreeDepth } from '../config/testLocal' +import { genProveReputationCircuitInputsFromDB } from '../database/utils' const configureSubparser = (subparsers: any) => { const parser = subparsers.addParser( @@ -97,6 +98,14 @@ const configureSubparser = (subparsers: any) => { } ) + parser.addArgument( + ['-db', '--from-database'], + { + action: 'storeTrue', + help: 'Indicate if to generate proving circuit from database', + } + ) + const privkeyGroup = parser.addMutuallyExclusiveGroup({ required: true }) privkeyGroup.addArgument( @@ -165,13 +174,6 @@ const publishPost = async (args: any) => { wallet, ) const attestingFee = await unirepContract.attestingFee() - - const unirepState = await genUnirepStateFromContract( - provider, - unirepAddress, - startBlock, - ) - // Validate epoch key nonce const epkNonce = args.epoch_key_nonce const numEpochKeyNoncePerEpoch = await unirepContract.numEpochKeyNoncePerEpoch() @@ -188,15 +190,6 @@ const publishPost = async (args: any) => { const epochTreeDepth = treeDepths.epochTreeDepth const epk = genEpochKey(id.identityNullifier, currentEpoch, epkNonce, epochTreeDepth).toString(16) - // Gen epoch key proof and reputation proof - const userState = await genUserStateFromContract( - provider, - unirepAddress, - startBlock, - id, - commitment, - ) - // gen nullifier nonce list const proveKarmaNullifiers = BigInt(1) const proveKarmaAmount = BigInt(DEFAULT_POST_KARMA) @@ -209,15 +202,48 @@ const publishPost = async (args: any) => { // gen minRep proof const proveMinRep = args.min_rep != null ? BigInt(1) : BigInt(0) const minRep = args.min_rep != null ? BigInt(args.min_rep) : BigInt(0) - - const circuitInputs = await userState.genProveReputationCircuitInputs( - epkNonce, // generate epoch key from epoch nonce - proveKarmaNullifiers, // indicate to prove karma nullifiers - proveKarmaAmount, // the amount of output karma nullifiers - nonceList, // nonce to generate karma nullifiers - proveMinRep, // indicate to prove minimum reputation the user has - minRep // the amount of minimum reputation the user wants to prove - ) + + let circuitInputs: any + + if(args.from_database){ + + console.log('generating proving circuit from database...') + + // Gen epoch key proof and reputation proof from database + circuitInputs = await genProveReputationCircuitInputsFromDB( + currentEpoch, + id, + epkNonce, // generate epoch key from epoch nonce + proveKarmaNullifiers, // indicate to prove karma nullifiers + proveKarmaAmount, // the amount of output karma nullifiers + nonceList, // nonce to generate karma nullifiers + proveMinRep, // indicate to prove minimum reputation the user has + minRep // the amount of minimum reputation the user wants to prove + ) + + } else { + + console.log('generating proving circuit from contract...') + + // Gen epoch key proof and reputation proof from Unirep contract + const userState = await genUserStateFromContract( + provider, + unirepAddress, + startBlock, + id, + commitment, + ) + + circuitInputs = await userState.genProveReputationCircuitInputs( + epkNonce, // generate epoch key from epoch nonce + proveKarmaNullifiers, // indicate to prove karma nullifiers + proveKarmaAmount, // the amount of output karma nullifiers + nonceList, // nonce to generate karma nullifiers + proveMinRep, // indicate to prove minimum reputation the user has + minRep // the amount of minimum reputation the user wants to prove + ) + } + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) const nullifiers: BigInt[] = [] @@ -252,14 +278,6 @@ const publishPost = async (args: any) => { console.log(`Prove minimum reputation: ${minRep}`) } - const db = await mongoose.connect( - dbUri, - { useNewUrlParser: true, - useFindAndModify: false, - useUnifiedTopology: true - } - ) - const newpost: IPost = new Post({ content: args.text, // TODO: hashedContent @@ -282,18 +300,24 @@ const publishPost = async (args: any) => { nullifiers, { value: attestingFee, gasLimit: 1000000 } ) + const db = await mongoose.connect( + dbUri, + { useNewUrlParser: true, + useFindAndModify: false, + useUnifiedTopology: true + } + ) const res: IPost = await newpost.save() + db.disconnect(); } catch(e) { console.error('Error: the transaction failed') if (e.message) { console.error(e.message) } - db.disconnect(); return } - db.disconnect(); console.log('Post ID:', newpost._id.toString()) console.log('Transaction hash:', tx.hash) } diff --git a/cli/test/testAllCommands.ts b/cli/test/testAllCommands.ts index 3a64988..f743388 100644 --- a/cli/test/testAllCommands.ts +++ b/cli/test/testAllCommands.ts @@ -42,7 +42,7 @@ describe('test all CLI subcommands', function() { const text = "postText" const text2 = "commentText" const posRep = 3, negRep = 8, graffitiPreimage = 0, graffiti = hashOne(BigInt(graffitiPreimage)) - const minPosRep = 0, maxNegRep = 10, minRepDiff = 1 + const minPosRep = 0, maxNegRep = 10, minRepDiff = 15 let userRepProof before(async() => { @@ -246,7 +246,8 @@ describe('test all CLI subcommands', function() { ` -d ${userPrivKey}` + ` -id ${userIdentity1}` + ` -n ${epochKeyNonce}` + - ` -kn ${postNonce}` + ` -kn ${postNonce}` + + ` -db` const output = exec(command).stdout.trim() @@ -286,9 +287,11 @@ describe('test all CLI subcommands', function() { // ` -pid ${postID} ` + // ` -tx ${text2}` + // ` -d ${userPrivKey}` + - // ` -id ${userIdentity1}` + - // ` -n ${epochKeyNonce2}` + - // ` -kn ${commentNonce}` + // ` -id ${userIdentity2}` + + // ` -n ${epochKeyNonce}` + + // ` -kn ${commentNonce}` + + // ` -mr ${minRepDiff}` + + // ` -db` // const output = exec(command).stdout.trim() @@ -300,6 +303,7 @@ describe('test all CLI subcommands', function() { // }) // }) + describe('upvote CLI subcommand', () => { it('should upvote to user', async () => { const command = `npx ts-node cli/index.ts vote` + @@ -310,7 +314,8 @@ describe('test all CLI subcommands', function() { ` -n ${epochKeyNonce}` + ` -kn ${attestNonce}` + ` -uv ${posRep} ` + - ` -gf ${graffiti.toString(16)} ` + ` -gf ${graffiti.toString(16)} ` + + ` -db` const output = exec(command).stdout.trim() @@ -344,7 +349,8 @@ describe('test all CLI subcommands', function() { const command = `npx ts-node cli/index.ts userStateTransition` + ` -x ${unirepContract.address} ` + ` -d ${userPrivKey} ` + - ` -id ${userIdentity1} ` + ` -id ${userIdentity1} ` + + ` -db` const output = exec(command).stdout.trim() @@ -359,7 +365,8 @@ describe('test all CLI subcommands', function() { const command = `npx ts-node cli/index.ts userStateTransition` + ` -x ${unirepContract.address} ` + ` -d ${userPrivKey} ` + - ` -id ${userIdentity2} ` + ` -id ${userIdentity2} ` + + ` -db` const output = exec(command).stdout.trim() @@ -380,7 +387,8 @@ describe('test all CLI subcommands', function() { // ` -mp ${minPosRep} ` + ` -mn ${maxNegRep} ` + // ` -md ${minRepDiff}` + - ` -gp ${graffitiPreimage} ` + ` -gp ${graffitiPreimage} ` + + ` -db` const output = exec(command).stdout.trim() diff --git a/cli/userStateTransition.ts b/cli/userStateTransition.ts index 429102a..68c0aa9 100644 --- a/cli/userStateTransition.ts +++ b/cli/userStateTransition.ts @@ -18,6 +18,7 @@ import { genUserStateFromContract } from '../core' import { formatProofForVerifierContract, genVerifyUserStateTransitionProofAndPublicSignals, getSignalByName, getSignalByNameViaSym, verifyUserStateTransitionProof } from '../test/circuits/utils' import { stringifyBigInts } from 'maci-crypto' import { identityPrefix } from './prefix' +import { genUserStateTransitionCircuitInputsFromDB } from '../database/utils' const configureSubparser = (subparsers: any) => { const parser = subparsers.addParser( @@ -61,6 +62,14 @@ const configureSubparser = (subparsers: any) => { } ) + parser.addArgument( + ['-db', '--from-database'], + { + action: 'storeTrue', + help: 'Indicate if to generate proving circuit from database', + } + ) + const privkeyGroup = parser.addMutuallyExclusiveGroup({ required: true }) privkeyGroup.addArgument( @@ -135,6 +144,7 @@ const userStateTransition = async (args: any) => { const decodedIdentity = base64url.decode(encodedIdentity) const id = unSerialiseIdentity(decodedIdentity) const commitment = genIdentityCommitment(id) + const currentEpoch = (await unirepContract.currentEpoch()).toNumber() const userState = await genUserStateFromContract( provider, @@ -144,7 +154,22 @@ const userStateTransition = async (args: any) => { commitment, ) - const circuitInputs = await userState.genUserStateTransitionCircuitInputs() + let circuitInputs: any + + if(args.from_database){ + console.log('generating proving circuit from database...') + + circuitInputs = await genUserStateTransitionCircuitInputsFromDB( + currentEpoch, + id + ) + } else { + + console.log('generating proving circuit from contract...') + + circuitInputs = await userState.genUserStateTransitionCircuitInputs() + + } const results = await genVerifyUserStateTransitionProofAndPublicSignals(stringifyBigInts(circuitInputs)) const newGSTLeaf = getSignalByNameViaSym('userStateTransition', results['witness'], 'main.new_GST_leaf') const newState = await userState.genNewUserStateAfterTransition() @@ -187,7 +212,6 @@ const userStateTransition = async (args: any) => { outputEPKNullifiers.push(outputNullifier) } - let tx try { tx = await unirepContract.updateUserStateRoot( @@ -209,7 +233,6 @@ const userStateTransition = async (args: any) => { } console.log('Transaction hash:', tx.hash) - const currentEpoch = (await unirepContract.currentEpoch()).toNumber() console.log(`User transitioned from epoch ${fromEpoch} to epoch ${currentEpoch}`) } diff --git a/cli/vote.ts b/cli/vote.ts index 4ace342..d619e39 100644 --- a/cli/vote.ts +++ b/cli/vote.ts @@ -3,6 +3,7 @@ import { ethers as hardhatEthers } from 'hardhat' import { ethers } from 'ethers' import { genIdentityCommitment, unSerialiseIdentity } from 'libsemaphore' import { stringifyBigInts } from 'maci-crypto' +import mongoose from 'mongoose' import { promptPwd, @@ -15,7 +16,7 @@ import { import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' import { genEpochKey } from '../test/utils' -import { genUnirepStateFromContract, genUserStateFromContract } from '../core' +import { genUserStateFromContract } from '../core' import { formatProofForVerifierContract, genVerifyEpochKeyProofAndPublicSignals, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyEPKProof, verifyProveReputationProof } from '../test/circuits/utils' import { add0x } from '../crypto/SMT' @@ -24,6 +25,7 @@ import { Attestation } from '../core' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import { epkProofPrefix, identityPrefix } from './prefix' import { nullifierTreeDepth } from '../config/testLocal' +import { genProveReputationCircuitInputsFromDB } from '../database/utils' const configureSubparser = (subparsers: any) => { const parser = subparsers.addParser( @@ -118,6 +120,14 @@ const configureSubparser = (subparsers: any) => { } ) + parser.addArgument( + ['-db', '--from-database'], + { + action: 'storeTrue', + help: 'Indicate if to generate proving circuit from database', + } + ) + const privkeyGroup = parser.addMutuallyExclusiveGroup({ required: true }) privkeyGroup.addArgument( @@ -204,12 +214,6 @@ const vote = async (args: any) => { return } - const unirepState = await genUnirepStateFromContract( - provider, - unirepAddress, - startBlock, - ) - // upvote / downvote user const graffiti = args.graffiti ? BigInt(add0x(args.graffiti)) : BigInt(0) const overwriteGraffiti = args.graffiti ? true : false @@ -234,14 +238,6 @@ const vote = async (args: any) => { const epochTreeDepth = treeDepths.epochTreeDepth const epk = genEpochKey(id.identityNullifier, currentEpoch, epkNonce, epochTreeDepth).toString(16) - // Gen epoch key proof and reputation proof - const userState = await genUserStateFromContract( - provider, - unirepAddress, - startBlock, - id, - commitment, - ) // gen nullifier nonce list const proveKarmaNullifiers = BigInt(1) const proveKarmaAmount = BigInt(voteValue) @@ -254,15 +250,47 @@ const vote = async (args: any) => { // gen minRep proof const proveMinRep = args.min_rep != null ? BigInt(1) : BigInt(0) const minRep = args.min_rep != null ? BigInt(args.min_rep) : BigInt(0) + + let circuitInputs: any + + if(args.from_database){ + + console.log('generating proving circuit from database...') + + // Gen epoch key proof and reputation proof from database + circuitInputs = await genProveReputationCircuitInputsFromDB( + currentEpoch, + id, + epkNonce, // generate epoch key from epoch nonce + proveKarmaNullifiers, // indicate to prove karma nullifiers + proveKarmaAmount, // the amount of output karma nullifiers + nonceList, // nonce to generate karma nullifiers + proveMinRep, // indicate to prove minimum reputation the user has + minRep // the amount of minimum reputation the user wants to prove + ) - const circuitInputs = await userState.genProveReputationCircuitInputs( - epkNonce, // generate epoch key from epoch nonce - proveKarmaNullifiers, // indicate to prove karma nullifiers - proveKarmaAmount, // the amount of output karma nullifiers - nonceList, // nonce to generate karma nullifiers - proveMinRep, // indicate to prove minimum reputation the user has - minRep // the amount of minimum reputation the user wants to prove - ) + } else { + + console.log('generating proving circuit from contract...') + + // Gen epoch key proof and reputation proof from Unirep contract + const userState = await genUserStateFromContract( + provider, + unirepAddress, + startBlock, + id, + commitment, + ) + + circuitInputs = await userState.genProveReputationCircuitInputs( + epkNonce, // generate epoch key from epoch nonce + proveKarmaNullifiers, // indicate to prove karma nullifiers + proveKarmaAmount, // the amount of output karma nullifiers + nonceList, // nonce to generate karma nullifiers + proveMinRep, // indicate to prove minimum reputation the user has + minRep // the amount of minimum reputation the user wants to prove + ) + } const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) const nullifiers: BigInt[] = [] @@ -272,8 +300,6 @@ const vote = async (args: any) => { nullifiers.push(getSignalByNameViaSym('proveReputation', results['witness'], variableName) % BigInt(2 ** nullifierTreeDepth) ) } - console.log(nullifiers) - // TODO: Not sure if this validation is necessary const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) if(!isValid) { diff --git a/config/socialMedia.ts b/config/socialMedia.ts index 9a9b49d..e708e10 100644 --- a/config/socialMedia.ts +++ b/config/socialMedia.ts @@ -1,6 +1,4 @@ -const DEFAULT_START_KARMA = 20 - -const DEFAULT_STATE_TRANSITION_KARMA = 20 +const DEFAULT_AIRDROPPED_KARMA = 20 const DEFAULT_POST_KARMA = 10 @@ -8,13 +6,9 @@ const DEFAULT_COMMENT_KARMA = 5 const MAX_KARMA_BUDGET = 10 -const DEFAULT_AIRDROPPED_KARMA = 20 - export { - DEFAULT_START_KARMA, - DEFAULT_STATE_TRANSITION_KARMA, + DEFAULT_AIRDROPPED_KARMA, DEFAULT_POST_KARMA, DEFAULT_COMMENT_KARMA, MAX_KARMA_BUDGET, - DEFAULT_AIRDROPPED_KARMA, } \ No newline at end of file diff --git a/core/UserState.ts b/core/UserState.ts index 62ddcea..d5599b1 100644 --- a/core/UserState.ts +++ b/core/UserState.ts @@ -9,7 +9,7 @@ import { import { SparseMerkleTreeImpl } from '../crypto/SMT' import { genAttestationNullifier, defaultUserStateLeaf, genEpochKey, genNewSMT, genEpochKeyNullifier, genKarmaNullifier } from '../test/utils' import { IAttestation, UnirepState } from './UnirepState' -import { DEFAULT_AIRDROPPED_KARMA, DEFAULT_START_KARMA, DEFAULT_STATE_TRANSITION_KARMA, MAX_KARMA_BUDGET } from '../config/socialMedia' +import { DEFAULT_AIRDROPPED_KARMA, MAX_KARMA_BUDGET } from '../config/socialMedia' interface IUserStateLeaf { attesterId: BigInt; @@ -268,7 +268,7 @@ class UserState { this.latestTransitionedEpoch = _latestTransitionedEpoch this.latestGSTLeafIndex = _latestGSTLeafIndex this.hasSignedUp = true - this.transitionedPosRep = DEFAULT_START_KARMA + this.transitionedPosRep = DEFAULT_AIRDROPPED_KARMA } /* diff --git a/core/utils.ts b/core/utils.ts index 23ad476..c5556da 100644 --- a/core/utils.ts +++ b/core/utils.ts @@ -9,7 +9,7 @@ import { hash5, hashLeftRight } from 'maci-crypto' import { computeEmptyUserStateRoot } from '../test/utils' import { id } from 'ethers/lib/utils' import comment from '../database/models/comment' -import { DEFAULT_START_KARMA } from '../config/socialMedia' +import { DEFAULT_AIRDROPPED_KARMA } from '../config/socialMedia' /* * Retrieves and parses on-chain Unirep contract data to create an off-chain @@ -296,7 +296,7 @@ const _genUserStateFromContract = async ( const userDefaultGSTLeaf = hash5([ userIdentityCommitment, emptyUserStateRoot, - BigInt(DEFAULT_START_KARMA), + BigInt(DEFAULT_AIRDROPPED_KARMA), BigInt(0), BigInt(0) ]) diff --git a/crypto/SMT/utils.ts b/crypto/SMT/utils.ts index fd67c2a..a1cbf1c 100644 --- a/crypto/SMT/utils.ts +++ b/crypto/SMT/utils.ts @@ -19,6 +19,7 @@ export const remove0x = (str: string): string => { * @returns the string with "0x". */ export const add0x = (str: string): string => { + str = str.padStart(64,"0") return str.startsWith('0x') ? str : '0x' + str } diff --git a/database/models/GSTLeaf.ts b/database/models/GSTLeaf.ts new file mode 100644 index 0000000..6f8dfe0 --- /dev/null +++ b/database/models/GSTLeaf.ts @@ -0,0 +1,21 @@ +import * as mongoose from 'mongoose'; +import { Schema, Document } from 'mongoose'; + +export interface IGSTLeaf { + transactionHash: string + hashedLeaf: string +} + +export interface IGSTLeaves extends Document { + epoch: number + GSTLeaves: Array + currentEpochGSTLeafIndexToInsert: number +} + +const GSTLeavesSchema: Schema = new Schema({ + epoch: { type: Number }, + GSTLeaves: { type: Array }, + currentEpochGSTLeafIndexToInsert: { type: Number }, +}, { collection: 'GSTLeaves' }) + +export default mongoose.model('GSTLeaves', GSTLeavesSchema); \ No newline at end of file diff --git a/database/models/attestation.ts b/database/models/attestation.ts index 0d3884f..02474b3 100644 --- a/database/models/attestation.ts +++ b/database/models/attestation.ts @@ -1,26 +1,26 @@ import * as mongoose from 'mongoose'; import { Schema, Document } from 'mongoose'; -export interface IAttestation extends Document { - epoch: number - epochKey: string - attester: string - attesterId: number - posRep: number - negRep: number - graffiti: string - overwriteGraffiti: boolean - } - - const AttestationSchema: Schema = new Schema({ - epoch: { type: Number }, - epochKey: { type: String, required: true }, - attester: { type: String, required: true }, - attesterId: { type: Number, required: true }, - posRep: { type: Number }, - negRep: { type: Number }, - graffiti: { type: {} }, - overwriteGraffiti: { type: String }, - }, { collection: 'Attestations' }); +export interface IAttestation { + transactionHash: string; + epoch: number + attester: string + attesterId: string + posRep: string + negRep: string + graffiti: string + overwriteGraffiti: boolean +} + +export interface IAttestations extends Document { + epochKey: string + attestations: Array +} - export default mongoose.model('Attestation', AttestationSchema); \ No newline at end of file +const AttestationsSchema: Schema = new Schema({ + epochKey: { type: String }, + attestations: { type: Array }, +}, { collection: 'Attestations' }); + + +export default mongoose.model('Attestations', AttestationsSchema); \ No newline at end of file diff --git a/database/models/epochTreeLeaf.ts b/database/models/epochTreeLeaf.ts new file mode 100644 index 0000000..fd6aeee --- /dev/null +++ b/database/models/epochTreeLeaf.ts @@ -0,0 +1,20 @@ +import { BigNumber } from 'ethers'; +import * as mongoose from 'mongoose'; +import { Schema, Document } from 'mongoose'; + +export interface IEpochTreeLeaf { + epochKey: string; + hashchainResult: string; +} + +export interface IEpochTreeLeaves extends Document { + epoch: number + epochTreeLeaves: Array +} + +const EpochGSTLeavesSchema: Schema = new Schema({ + epoch: { type: Number }, + epochTreeLeaves: { type: Array }, +}, { collection: 'EpochTreeLeaves' }) + +export default mongoose.model('EpochGSTLeaves', EpochGSTLeavesSchema); \ No newline at end of file diff --git a/database/models/newGSTLeaf.ts b/database/models/newGSTLeaf.ts deleted file mode 100644 index ff09355..0000000 --- a/database/models/newGSTLeaf.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { BigNumber } from 'ethers'; -import * as mongoose from 'mongoose'; -import { Schema, Document } from 'mongoose'; - -export interface INewGSTLeaf extends Document { - transactionHash: string - formBlockhash: string - epoch: BigNumber - hashedLeaf: BigNumber - } - - const NewGSTLeafSchema: Schema = new Schema({ - transactionHash: { type: String }, - formBlockhash: { type: String }, - epoch: { type: String }, - hashedLeaf: { type: String } - }, { collection: 'NewGSTLeaves' }); - - export default mongoose.model('NewGSTLeaf', NewGSTLeafSchema); \ No newline at end of file diff --git a/database/models/nullifierTreeLeaf.ts b/database/models/nullifierTreeLeaf.ts new file mode 100644 index 0000000..1fdb389 --- /dev/null +++ b/database/models/nullifierTreeLeaf.ts @@ -0,0 +1,16 @@ +import * as mongoose from 'mongoose'; +import { Schema, Document } from 'mongoose'; + +export interface INullifierTreeLeaves extends Document { + epoch: number + nullifier: string + transactionHash: string +} + +const NullifiertreeLeavesSchema: Schema = new Schema({ + epoch: { type: Number }, + nullifier: { type: String }, + transactionHash: { type: String }, +}, { collection: 'NullifierTreeLeaves' }) + +export default mongoose.model('NullifierTreeLeaves', NullifiertreeLeavesSchema); \ No newline at end of file diff --git a/database/models/settings.ts b/database/models/settings.ts index 0f2386c..dee987f 100644 --- a/database/models/settings.ts +++ b/database/models/settings.ts @@ -9,7 +9,7 @@ export interface ISettings extends Document { userStateTreeDepth: number epochTreeDepth: number nullifierTreeDepth: number - attestingFee: number + attestingFee: ethers.BigNumber epochLength: number numEpochKeyNoncePerEpoch: number numAttestationsPerEpochKey: number @@ -21,7 +21,7 @@ const SettingSchema: Schema = new Schema({ userStateTreeDepth: { type: Number }, epochTreeDepth: { type: Number }, nullifierTreeDepth: { type: Number }, - attestingFee: { type: Number }, + attestingFee: { type: {} }, epochLength: { type: Number }, numEpochKeyNoncePerEpoch: { type: Number }, numAttestationsPerEpochKey: { type: Number }, diff --git a/database/models/userSignUp.ts b/database/models/userSignUp.ts new file mode 100644 index 0000000..38510a1 --- /dev/null +++ b/database/models/userSignUp.ts @@ -0,0 +1,17 @@ +import * as mongoose from 'mongoose'; +import { Schema, Document } from 'mongoose'; + + +export interface IUserSignUp extends Document { + transactionHash: string + hashedLeaf: string + epoch: number +} + +const UserSignUpSchema: Schema = new Schema({ + transactionHash: { type: String }, + hashedLeaf: { type: String }, + epoch: { type: Number }, +}, { collection: 'Users' }) + +export default mongoose.model('UserSignUp', UserSignUpSchema); \ No newline at end of file diff --git a/database/utils.ts b/database/utils.ts new file mode 100644 index 0000000..85088c9 --- /dev/null +++ b/database/utils.ts @@ -0,0 +1,1112 @@ +import { ethers } from 'ethers' +import mongoose from 'mongoose' +import { genIdentityCommitment, unSerialiseIdentity } from 'libsemaphore' +import { attestingFee, circuitEpochTreeDepth, circuitGlobalStateTreeDepth, circuitNullifierTreeDepth, circuitUserStateTreeDepth, epochLength, numEpochKeyNoncePerEpoch, numAttestationsPerEpochKey} from '../config/testLocal' + +import { UnirepState } from '../core/UnirepState' +import { IUserStateLeaf, UserState } from '../core/UserState' + +import Settings, { ISettings } from './models/settings' +import UserSignUp, { IUserSignUp } from './models/userSignUp' +import Attestations, { IAttestation, IAttestations } from './models/attestation' +import Comment, { IComment } from "../database/models/comment"; +import Post, { IPost } from "../database/models/post"; +import ReputationNullifier, { IReputationNullifier } from "../database/models/reputationNullifier"; +import UserTransitionedState, { IUserTransitionedState } from "../database/models/userTransitionedState"; +import GSTLeaves, { IGSTLeaf, IGSTLeaves } from '../database/models/GSTLeaf' +import EpochTreeLeaves, { IEpochTreeLeaf, IEpochTreeLeaves } from '../database/models/epochTreeLeaf' +import NullifierTreeLeaves, { INullifierTreeLeaves } from '../database/models/nullifierTreeLeaf' + +import { hash5, hashLeftRight, IncrementalQuinTree, stringifyBigInts } from 'maci-crypto' +import { computeEmptyUserStateRoot, defaultUserStateLeaf, genAttestationNullifier, genEpochKey, genEpochKeyNullifier, genNewSMT, SMT_ONE_LEAF, SMT_ZERO_LEAF } from '../test/utils' + +import { assert } from 'console' +import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" +import GSTLeaf from './models/treeLeaves' +import { add0x, SparseMerkleTreeImpl } from '../crypto/SMT' +import { settings } from 'cluster' +import { DEFAULT_AIRDROPPED_KARMA, MAX_KARMA_BUDGET } from '../config/socialMedia' +import { dbUri } from '../config/database' + +enum action { + UpVote = 0, + DownVote = 1, + Post = 2, + Comment = 3 +} + +export interface IUserTransitionState { + transitionedGSTLeafIndex: number + fromEpoch: number + toEpoch: number + userStateTree: SparseMerkleTreeImpl + attestations: IAttestation[] + transitionedPosRep: BigInt + transitionedNegRep: BigInt + GSTLeaf: string +} + +/* +* Connect to db uri +* @param dbUri mongoose database uri +*/ +const connectDB = async(dbUri: string): Promise => { + + const db = await mongoose.connect( + dbUri, + { useNewUrlParser: true, + useFindAndModify: false, + useUnifiedTopology: true + } + ) + + return db +} + +/* +* Initialize the database by dropping the existing database +* returns true if it is successfully deleted +* @param db mongoose type database object +*/ +const initDB = async(db: typeof mongoose)=> { + + const deletedDb = await db.connection.db.dropDatabase() + + return deletedDb +} + +/* +* Disconnect to db uri +* @param db mongoose type database object +*/ +const disconnectDB = (db: typeof mongoose): void => { + + db.disconnect() + + return +} + + +const saveSettingsFromContract = async (unirepContract: ethers.Contract): Promise => { + + let settings + const existedSettings = await Settings.findOne() + if(existedSettings === null){ + + const treeDepths_ = await unirepContract.treeDepths() + const globalStateTreeDepth = treeDepths_.globalStateTreeDepth + const userStateTreeDepth = treeDepths_.userStateTreeDepth + const epochTreeDepth = treeDepths_.epochTreeDepth + const nullifierTreeDepth = treeDepths_.nullifierTreeDepth + const attestingFee = await unirepContract.attestingFee() + const epochLength = await unirepContract.epochLength() + const numEpochKeyNoncePerEpoch = await unirepContract.numEpochKeyNoncePerEpoch() + + const emptyUserStateRoot = computeEmptyUserStateRoot(ethers.BigNumber.from(userStateTreeDepth).toNumber()) + settings = new Settings({ + globalStateTreeDepth: ethers.BigNumber.from(globalStateTreeDepth).toNumber(), + userStateTreeDepth: ethers.BigNumber.from(userStateTreeDepth).toNumber(), + epochTreeDepth: ethers.BigNumber.from(epochTreeDepth).toNumber(), + nullifierTreeDepth: ethers.BigNumber.from(nullifierTreeDepth).toNumber(), + attestingFee: attestingFee, + epochLength: ethers.BigNumber.from(epochLength).toNumber(), + numEpochKeyNoncePerEpoch: ethers.BigNumber.from(numEpochKeyNoncePerEpoch).toNumber(), + numAttestationsPerEpochKey: numAttestationsPerEpochKey, + defaultGSTLeaf: hashLeftRight( + BigInt(0), // zero identityCommitment + emptyUserStateRoot, // zero user state root + ) + }) + } + + return existedSettings? existedSettings : settings.save() +} + +/* +* Computes the global state tree of given epoch +* @param epoch current epoch +*/ +const genGSTreeFromDB = async (epoch: number): Promise => { + + const _settings = await Settings.findOne() + const treeLeaves = await GSTLeaves?.findOne({epoch: epoch}) + if (!_settings) { + throw new Error('Error: should save settings first') + } + + const globalStateTreeDepth = _settings.globalStateTreeDepth + const userStateTreeDepth = _settings.userStateTreeDepth + const emptyUserStateRoot = computeEmptyUserStateRoot(userStateTreeDepth) + const defaultGSTLeaf = hashLeftRight( + BigInt(0), + emptyUserStateRoot + ) + + const GSTree = new IncrementalQuinTree( + globalStateTreeDepth, + defaultGSTLeaf, + 2, + ) + + const GSTLeavesToEpoch = treeLeaves?.get('GSTLeaves') + let leaves: BigInt[] = [] + for (let i = 0; i < GSTLeavesToEpoch.length; i++) { + leaves.push(BigInt(GSTLeavesToEpoch[i]?.hashedLeaf)) + } + + for(const leaf of leaves){ + GSTree.insert(leaf) + } + + return GSTree +} + +/* +* Computes the epoch tree of given epoch +* @param epoch current epoch +*/ +const genEpochTreeFromDB = async (epoch: number): Promise => { + + const _settings = await Settings.findOne() + const treeLeaves = await EpochTreeLeaves?.findOne({epoch: epoch}) + if (!_settings) { + throw new Error('Error: should save settings first') + } + + const epochTreeDepth = _settings.epochTreeDepth + + const epochTree = await genNewSMT(epochTreeDepth, SMT_ONE_LEAF) + const leaves = treeLeaves?.epochTreeLeaves? treeLeaves?.epochTreeLeaves : [] + for (const leaf of leaves) { + const decEpochKey = BigInt(BigInt(add0x(leaf.epochKey)).toString()) + await epochTree.update(decEpochKey, BigInt(leaf.hashchainResult)) + } + + return epochTree +} + +/* +* Computes the nullifier tree of given epoch +*/ +const genNullifierTreeFromDB = async (): Promise => { + + const _settings = await Settings.findOne() + const treeLeaves = await NullifierTreeLeaves?.find() + if (!_settings) { + throw new Error('Error: should save settings first') + } + + const nullifierTree = await genNewSMT(_settings.nullifierTreeDepth, SMT_ZERO_LEAF) + await nullifierTree.update(BigInt(0), SMT_ONE_LEAF) + + if (treeLeaves.length == 0) return nullifierTree + else{ + for (const leaf of treeLeaves) { + await nullifierTree.update(BigInt(leaf.nullifier), SMT_ONE_LEAF) + } + return nullifierTree + } +} + +/* +* Get the attestations of given epoch key +* @param epochKey given epoch key +*/ +const getAttestationsFromDB = async (epochKey: string): Promise => { + const attestationsToEpochKey = await Attestations.findOne({epochKey: epochKey}) + if ( attestationsToEpochKey ){ + return attestationsToEpochKey?.attestations + } + else { + return [] + } + +} + +/* +* Get the nullifier of the attestations of given epoch +* @param epoch given epoch +* @param id user's identity +*/ +const getAttestationNullifiersFromDB = async (epoch: number, id: any): Promise => { + + const _settings = await Settings.findOne() + if (!_settings) { + throw new Error('Error: should save settings first') + } + + const epochTreeDepth = _settings.epochTreeDepth + const numEpochKeyNoncePerEpoch = _settings.numEpochKeyNoncePerEpoch + + const nullifiers: BigInt[] = [] + for (let nonce = 0; nonce < numEpochKeyNoncePerEpoch; nonce++) { + const epochKey = genEpochKey(id.identityNullifier, epoch, nonce, epochTreeDepth) + const attestations = await getAttestationsFromDB(epochKey.toString(16)) + if(!attestations) return nullifiers + for (const attestation of attestations) { + nullifiers.push( + genAttestationNullifier(id.identityNullifier, BigInt(attestation.attesterId), epoch, epochKey, _settings.nullifierTreeDepth) + ) + } + for (let i = 0; i < (numAttestationsPerEpochKey - attestations.length); i++) { + nullifiers.push(BigInt(0)) + } + } + + return nullifiers +} + +/* +* Assert user has signed up and find the epoch where user signed up +* finding user's signed up leaf event in db +* @param id user's identity +*/ +const findUserSignedUpEpochFromDB = async (id: any): Promise => { + + const _settings = await Settings.findOne() + if (!_settings) { + throw new Error('Error: should save settings first') + } + + const emptyUserStateRoot = computeEmptyUserStateRoot(_settings.userStateTreeDepth) + const userDefaultGSTLeaf = hash5([ + genIdentityCommitment(id), + emptyUserStateRoot, + BigInt(DEFAULT_AIRDROPPED_KARMA), + BigInt(0), + BigInt(0) + ]).toString(16) + const result = await UserSignUp.findOne({hashedLeaf: add0x(userDefaultGSTLeaf)}) + return result +} + +const nullifierExist = async (nullifier: string): Promise => { + const leaf = await NullifierTreeLeaves.findOne({nullifier: nullifier}) + if (leaf) return true + else return false +} + + +/* +* get GST leaf index of given epoch +* @param epoch find GST leaf in the epoch +* @param hasedLeaf find the hash of GST leaf +*/ +const getGSTLeafIndex = async (epoch: number, hashedLeaf: string): Promise => { + + const leaves = await GSTLeaves.findOne({epoch: epoch}) + if(leaves){ + for(const leaf of leaves.get('GSTLeaves')){ + if (leaf.hashedLeaf == hashedLeaf){ + return leaves?.GSTLeaves?.indexOf(leaf) + } + } + } + + return -1 +} + +/* +* generate user state tree from given reputations +* @param reputations reputations received by user in current epoch +*/ +const genUserStateTreeFromDB = async( + reputations: IAttestation[] + +): Promise => { + + const settings = await Settings.findOne() + if (!settings) { + throw new Error('Error: should save settings first') + } + + const USTree = await genNewSMT(settings.userStateTreeDepth, defaultUserStateLeaf) + + for (const reputation of reputations) { + const hashedReputation = hash5([ + BigInt(reputation.posRep), + BigInt(reputation.negRep), + BigInt(reputation.graffiti), + BigInt(0), + BigInt(0) + ]) + await USTree.update(BigInt(reputation.attesterId), hashedReputation) + } + + return USTree +} + +const getRepByAttester = async ( + reputations: IAttestation[], + attesterId: string, +) => { + const leaf = reputations.find((leaf) => BigInt(leaf.attesterId) == BigInt(attesterId)) + if(leaf !== undefined) return leaf + else { + const defaultAttestation: IAttestation = { + transactionHash: "0", + epoch: 0, + attester: "0", + attesterId: "0", + posRep: "0", + negRep: "0", + graffiti: "0", + overwriteGraffiti: false + } + return defaultAttestation + } +} + + +/* +* Retrives the updated UserState from the database +* @param currentEpoch current epoch +* @param userIdentity user's semaphore identity +*/ +const genCurrentUserStateFromDB = async ( + currentEpoch: number, + id: any, + ) => { + const settings = await Settings.findOne() + if (!settings) { + throw new Error('Error: should save settings first') + } + + const idCommitment = genIdentityCommitment(id) + const globalStateTreeDepth = settings.globalStateTreeDepth + const userStateTreeDepth = settings.userStateTreeDepth + const epochTreeDepth = settings.epochTreeDepth + const nullifierTreeDepth = settings.nullifierTreeDepth + const attestingFee = settings.attestingFee + const epochLength = settings.epochLength + const numEpochKeyNoncePerEpoch = settings.numEpochKeyNoncePerEpoch + const numAttestationsPerEpochKey = settings.numAttestationsPerEpochKey + + const userHasSignedUp = await findUserSignedUpEpochFromDB(id) + assert(userHasSignedUp, "User has not signed up yet") + if(!userHasSignedUp){ + return + } + + // start user state + let transitionedFromEpoch = userHasSignedUp?.epoch ? userHasSignedUp?.epoch : 0 + let startEpoch = transitionedFromEpoch + let transitionedPosRep = DEFAULT_AIRDROPPED_KARMA + let transitionedNegRep = 0 + let userStates: {[key: number]: IUserTransitionState} = {} + let GSTLeaf = userHasSignedUp?.hashedLeaf + let userStateTree: SparseMerkleTreeImpl = await genUserStateTreeFromDB([]) + let attestations: IAttestation[] = [] + let transitionedGSTLeaf = await getGSTLeafIndex(startEpoch, GSTLeaf) + + // find all reputation received by the user + for (let e = startEpoch; e <= currentEpoch; e++) { + + // find if user has transitioned + if (e !== startEpoch) { + transitionedGSTLeaf = await getGSTLeafIndex(e, GSTLeaf) + } + + // user transitioned state + const newState: IUserTransitionState = { + transitionedGSTLeafIndex: transitionedGSTLeaf, + fromEpoch: transitionedFromEpoch, + toEpoch: e, + userStateTree: userStateTree, + attestations: attestations, + transitionedPosRep: BigInt(transitionedPosRep), + transitionedNegRep: BigInt(transitionedNegRep), + GSTLeaf: GSTLeaf + } + userStates[e] = newState + + // get all attestations from epoch key generated in the given epoch e + attestations = [] + for (let nonce = 0; nonce < numEpochKeyNoncePerEpoch; nonce++) { + const epochKey = genEpochKey(id.identityNullifier, e, nonce, epochTreeDepth) + const attestationToEpk = await Attestations.findOne({epochKey: epochKey.toString(16)}) + attestationToEpk?.attestations?.map((a) => {attestations.push(a)}) + } + userStateTree = await genUserStateTreeFromDB(attestations) + + // compute user state transition result + transitionedFromEpoch = e + for (const attestation of attestations) { + transitionedPosRep += Number(attestation.posRep) + transitionedNegRep += Number(attestation.negRep) + } + transitionedPosRep += DEFAULT_AIRDROPPED_KARMA + GSTLeaf = add0x(hash5([ + idCommitment, + userStateTree.getRootHash(), + BigInt(transitionedPosRep), + BigInt(transitionedNegRep), + BigInt(0) + ]).toString(16)) + } + + return userStates + +} + +const genProveReputationCircuitInputsFromDB = async ( + epoch: number, + id: any, + epochKeyNonce: number, + proveKarmaNullifiers: BigInt, + proveKarmaAmount: BigInt, + karmaNonceList: BigInt[], + proveMinRep: BigInt, + minRep: BigInt, +) => { + const db = await mongoose.connect( + dbUri, + { useNewUrlParser: true, + useFindAndModify: false, + useUnifiedTopology: true + } + ) + const settings = await Settings.findOne() + if (!settings) { + throw new Error('Error: should save settings first') + } + + const epochTreeDepth = settings.epochTreeDepth + const nullifierTreeDepth = settings.nullifierTreeDepth + + const userState = await genCurrentUserStateFromDB(epoch, id) + if(!userState) return + const epochKey = genEpochKey(id.identityNullifier, epoch, epochKeyNonce, epochTreeDepth) + const nonce = 0 + const userStateTree = await userState[epoch].userStateTree + const GSTree = await genGSTreeFromDB(epoch) + const GSTLeafIndex = await getGSTLeafIndex(epoch, userState[epoch].GSTLeaf) + const GSTreeProof = GSTree.genMerklePath(GSTLeafIndex) + const GSTreeRoot = GSTree.root + const nullifierTree = await genNullifierTreeFromDB() + const nullifierTreeRoot = nullifierTree.getRootHash() + const epkNullifier = genEpochKeyNullifier(id.identityNullifier, epoch, nonce, nullifierTreeDepth) + const epkNullifierProof = await nullifierTree.getMerkleProof(epkNullifier) + const hashedLeaf = hash5([ + genIdentityCommitment(id), + userStateTree.getRootHash(), + BigInt(userState[epoch].transitionedPosRep), + BigInt(userState[epoch].transitionedNegRep), + BigInt(0) + ]) + + for (let i = karmaNonceList.length ; i < MAX_KARMA_BUDGET; i++) { + karmaNonceList.push(BigInt(0)) + } + + db.disconnect(); + + return stringifyBigInts({ + epoch: epoch, + nonce: nonce, + identity_pk: id.keypair.pubKey, + identity_nullifier: id.identityNullifier, + identity_trapdoor: id.identityTrapdoor, + user_tree_root: userStateTree.getRootHash(), + user_state_hash: hashedLeaf, + epoch_key_nonce: epochKeyNonce, + epoch_key: epochKey, + GST_path_index: GSTreeProof.indices, + GST_path_elements: GSTreeProof.pathElements, + GST_root: GSTreeRoot, + nullifier_tree_root: nullifierTreeRoot, + nullifier_path_elements: epkNullifierProof, + positive_karma: userState[epoch].transitionedPosRep, + negative_karma: userState[epoch].transitionedNegRep, + prove_karma_nullifiers: proveKarmaNullifiers, + prove_karma_amount: proveKarmaAmount, + karma_nonce: karmaNonceList, + prove_min_rep: proveMinRep, + min_rep: minRep + }) +} + +const genProveReputationFromAttesterCircuitInputsFromDB = async ( + epoch: number, + id: any, + attesterId: BigInt, + provePosRep: BigInt, + proveNegRep: BigInt, + proveRepDiff: BigInt, + proveGraffiti: BigInt, + minPosRep: BigInt, + maxNegRep: BigInt, + minRepDiff: BigInt, + graffitiPreImage: BigInt, +) => { + const db = await mongoose.connect( + dbUri, + { useNewUrlParser: true, + useFindAndModify: false, + useUnifiedTopology: true + } + ) + const settings = await Settings.findOne() + if (!settings) { + throw new Error('Error: should save settings first') + } + + const epochTreeDepth = settings.epochTreeDepth + const nullifierTreeDepth = settings.nullifierTreeDepth + const userStateTreeDepth = settings.userStateTreeDepth + + const userState = await genCurrentUserStateFromDB(epoch, id) + if(!userState) return + assert(attesterId > BigInt(0), `attesterId must be greater than zero`) + assert(attesterId < BigInt(2 ** userStateTreeDepth), `attesterId exceeds total number of attesters`) + + const latestGSTLeafIndex = userState[epoch].transitionedGSTLeafIndex + assert(latestGSTLeafIndex > 0, `user haven't transitioned from ${userState[epoch].fromEpoch} epoch`) + + const fromEpoch = userState[epoch].fromEpoch + const transitionedPosRep = userState[epoch].transitionedPosRep + const transitionedNegRep = userState[epoch].transitionedNegRep + const nonce = 0 + const rep = await getRepByAttester(userState[epoch].attestations, attesterId.toString()) + const posRep = rep.posRep + const negRep = rep.negRep + const graffiti = rep.graffiti + const userStateTree = await genUserStateTreeFromDB(userState[epoch].attestations) + const hashedLeaf = hash5([ + genIdentityCommitment(id), + userStateTree.getRootHash(), + BigInt(transitionedPosRep), + BigInt(transitionedNegRep), + BigInt(0) + ]) + const GSTree = await genGSTreeFromDB(epoch) + const GSTreeProof = GSTree.genMerklePath(latestGSTLeafIndex) + const GSTreeRoot = GSTree.root + const nullifierTree = await genNullifierTreeFromDB() + const nullifierTreeRoot = nullifierTree.getRootHash() + const epkNullifier = genEpochKeyNullifier(id.identityNullifier, epoch, nonce, nullifierTreeDepth) + const epkNullifierProof = await nullifierTree.getMerkleProof(epkNullifier) + const USTPathElements = await userStateTree.getMerkleProof(attesterId) + + db.disconnect(); + + return stringifyBigInts({ + epoch: epoch, + nonce: nonce, + identity_pk: id.keypair.pubKey, + identity_nullifier: id.identityNullifier, + identity_trapdoor: id.identityTrapdoor, + user_tree_root: userStateTree.getRootHash(), + user_state_hash: hashedLeaf, + GST_path_index: GSTreeProof.indices, + GST_path_elements: GSTreeProof.pathElements, + GST_root: GSTreeRoot, + nullifier_tree_root: nullifierTreeRoot, + nullifier_path_elements: epkNullifierProof, + attester_id: attesterId, + pos_rep: posRep, + neg_rep: negRep, + graffiti: graffiti, + UST_path_elements: USTPathElements, + positive_karma: BigInt(transitionedPosRep), + negative_karma: BigInt(transitionedNegRep), + prove_pos_rep: provePosRep, + prove_neg_rep: proveNegRep, + prove_rep_diff: proveRepDiff, + prove_graffiti: proveGraffiti, + min_rep_diff: minRepDiff, + min_pos_rep: minPosRep, + max_neg_rep: maxNegRep, + graffiti_pre_image: graffitiPreImage + }) + +} + +const genUserStateTransitionCircuitInputsFromDB = async ( + epoch: number, + id: any, +) => { + const db = await mongoose.connect( + dbUri, + { useNewUrlParser: true, + useFindAndModify: false, + useUnifiedTopology: true + } + ) + const settings = await Settings.findOne() + if (!settings) { + throw new Error('Error: should save settings first') + } + + const globalStateTreeDepth = settings.globalStateTreeDepth + const userStateTreeDepth = settings.userStateTreeDepth + const epochTreeDepth = settings.epochTreeDepth + const nullifierTreeDepth = settings.nullifierTreeDepth + const attestingFee = settings.attestingFee + const epochLength = settings.epochLength + const numEpochKeyNoncePerEpoch = settings.numEpochKeyNoncePerEpoch + const numAttestationsPerEpochKey = settings.numAttestationsPerEpochKey + const DefaultHashchainResult = SMT_ONE_LEAF + + const userState = await genCurrentUserStateFromDB(epoch, id) + if(!userState) return + + const fromEpoch = userState[epoch].fromEpoch + const fromEpochUserStateTree: SparseMerkleTreeImpl = userState[fromEpoch].userStateTree + const intermediateUserStateTreeRoots: BigInt[] = [ + fromEpochUserStateTree.getRootHash() + ] + + // GSTree + const userStateLeafPathElements: any[] = [] + const fromEpochGSTree: IncrementalQuinTree = await genGSTreeFromDB(fromEpoch) + const latestGSTLeafIndex = userState[fromEpoch].transitionedGSTLeafIndex + const GSTreeProof = fromEpochGSTree.genMerklePath(latestGSTLeafIndex) + const GSTreeRoot = fromEpochGSTree.root + + //EpochTree + const fromEpochTree = await genEpochTreeFromDB(fromEpoch) + const epochTreeRoot = fromEpochTree.getRootHash() + const epochKeyPathElements: any[] = [] + const hashChainResults: BigInt[] = [] + + // User state tree + const userStateTreeRoot = userState[fromEpoch].userStateTree.getRootHash() + const transitionedPosRep = userState[fromEpoch].transitionedPosRep + const transitionedNegRep = BigInt(userState[fromEpoch].transitionedNegRep) + + const hashedLeaf = hash5([ + genIdentityCommitment(id), + userStateTreeRoot, + transitionedPosRep, + transitionedNegRep, + BigInt(0) + ]) + + const selectors: number[] = [] + const attesterIds: BigInt[] = [] + const oldPosReps: BigInt[] = [], oldNegReps: BigInt[] = [], oldGraffities: BigInt[] = [] + const posReps: BigInt[] = [], negReps: BigInt[] = [], graffities: BigInt[] = [], overwriteGraffitis: any[] = [] + let newPosRep = Number(userState[fromEpoch].transitionedPosRep) + DEFAULT_AIRDROPPED_KARMA + let newNegRep = Number(userState[fromEpoch].transitionedNegRep) + + for (let nonce = 0; nonce < numEpochKeyNoncePerEpoch; nonce++) { + const epochKey = genEpochKey(id.identityNullifier, fromEpoch, nonce, epochTreeDepth) + + // Attestations + const attestations = await getAttestationsFromDB(epochKey.toString(16)) + for (let i = 0; i < attestations?.length; i++) { + const attestation = attestations[i] + const attesterId = attestation.attesterId + const oldAttestations = userState[fromEpoch].attestations + const rep = await getRepByAttester(oldAttestations, attesterId) + oldPosReps.push(BigInt(rep.posRep)) + oldNegReps.push(BigInt(rep.negRep)) + oldGraffities.push(BigInt(rep.graffiti)) + + // Add UST merkle proof to the list + const USTLeafPathElements = await fromEpochUserStateTree.getMerkleProof(BigInt(attesterId)) + userStateLeafPathElements.push(USTLeafPathElements) + + // TODO: update new Rep by adding + const newRep: IAttestation = { + transactionHash: "0", + epoch: 0, + attester: "0", + attesterId: "0", + posRep: attestation.posRep, + negRep: attestation.negRep, + graffiti: attestation.graffiti, + overwriteGraffiti: attestation.overwriteGraffiti + } + const newRepHash = hash5([ + BigInt(newRep.posRep), + BigInt(newRep.negRep), + BigInt(newRep.graffiti), + BigInt(0), + BigInt(0) + ]) + await fromEpochUserStateTree.update(BigInt(attesterId), newRepHash) + intermediateUserStateTreeRoots.push(fromEpochUserStateTree.getRootHash()) + + selectors.push(1) + attesterIds.push(BigInt(attesterId)) + posReps.push(BigInt(newRep.posRep)) + negReps.push(BigInt(newRep.negRep)) + graffities.push(BigInt(newRep.graffiti)) + overwriteGraffitis.push(attestation.overwriteGraffiti) + newPosRep += Number(newRep.posRep) + newNegRep += Number(newRep.negRep) + } + // Fill in blank data for non-exist attestation + for (let i = 0; i < (numAttestationsPerEpochKey - attestations?.length); i++) { + oldPosReps.push(BigInt(0)) + oldNegReps.push(BigInt(0)) + oldGraffities.push(BigInt(0)) + + const USTLeafZeroPathElements = await fromEpochUserStateTree.getMerkleProof(BigInt(0)) + userStateLeafPathElements.push(USTLeafZeroPathElements) + intermediateUserStateTreeRoots.push(fromEpochUserStateTree.getRootHash()) + + selectors.push(0) + attesterIds.push(BigInt(0)) + posReps.push(BigInt(0)) + negReps.push(BigInt(0)) + graffities.push(BigInt(0)) + overwriteGraffitis.push(false) + } + epochKeyPathElements.push(await fromEpochTree.getMerkleProof(epochKey)) + const epochTreeLeaves = await EpochTreeLeaves.findOne({epoch: fromEpoch}) + let hashChainResult = DefaultHashchainResult + if(epochTreeLeaves){ + for (const leaf of epochTreeLeaves?.epochTreeLeaves) { + if ( leaf.epochKey == epochKey.toString(16)){ + hashChainResult = BigInt(leaf.hashchainResult) + } + } + } + hashChainResults.push(hashChainResult) + } + + db.disconnect(); + + return stringifyBigInts({ + epoch: fromEpoch, + intermediate_user_state_tree_roots: intermediateUserStateTreeRoots, + old_pos_reps: oldPosReps, + old_neg_reps: oldNegReps, + old_graffities: oldGraffities, + UST_path_elements: userStateLeafPathElements, + identity_pk: id.keypair.pubKey, + identity_nullifier: id.identityNullifier, + identity_trapdoor: id.identityTrapdoor, + user_tree_root: userStateTreeRoot, + user_state_hash: hashedLeaf, + old_positive_karma: transitionedPosRep, + old_negative_karma: transitionedNegRep, + GST_path_elements: GSTreeProof.pathElements, + GST_path_index: GSTreeProof.indices, + GST_root: GSTreeRoot, + selectors: selectors, + attester_ids: attesterIds, + pos_reps: posReps, + neg_reps: negReps, + graffities: graffities, + overwrite_graffitis: overwriteGraffitis, + positive_karma: BigInt(newPosRep), + negative_karma: BigInt(newNegRep), + airdropped_karma: DEFAULT_AIRDROPPED_KARMA, + epk_path_elements: epochKeyPathElements, + hash_chain_results: hashChainResults, + epoch_tree_root: epochTreeRoot + }) +} + + +/* +* When a newGSTLeafInserted event comes +* update the database +* @param event newGSTLeafInserted event +*/ + +const updateDBFromNewGSTLeafInsertedEvent = async ( + event: ethers.Event, +) => { + const iface = new ethers.utils.Interface(Unirep.abi) + const decodedData = iface.decodeEventLog("NewGSTLeafInserted",event.data) + + const _transactionHash = event.transactionHash + const _epoch = Number(event?.topics[1]) + const _hashedLeaf = decodedData?._hashedLeaf._hex + + // save the new leaf + const newLeaf: IGSTLeaf = { + transactionHash: _transactionHash, + hashedLeaf: _hashedLeaf + } + + let treeLeaves: IGSTLeaves | null = await GSTLeaves.findOne({epoch: _epoch}) + + if(!treeLeaves){ + treeLeaves = new GSTLeaves({ + epoch: _epoch, + GSTLeaves: [newLeaf], + currentEpochGSTLeafIndexToInsert: 1 + }) + } else { + const nextIndex = treeLeaves.currentEpochGSTLeafIndexToInsert + 1 + treeLeaves.get('GSTLeaves').push(newLeaf) + treeLeaves.set('currentEpochGSTLeafIndexToInsert', nextIndex) + } + + const savedTreeLeavesRes = await treeLeaves?.save() + + // save new user + + const newUser: IUserSignUp = new UserSignUp({ + transactionHash: _transactionHash, + hashedLeaf: _hashedLeaf, + epoch: _epoch + }) + + const savedUserSignUpRes = await newUser.save() + + if( savedTreeLeavesRes && savedUserSignUpRes ){ + console.log('Database: saved user sign up event') + } +} + +/* +* When an AttestationSubmitted event comes +* update the database +* @param event AttestationSubmitted event +*/ +const updateDBFromAttestationEvent = async ( + event: ethers.Event, +) => { + const iface = new ethers.utils.Interface(Unirep.abi) + const _epoch = event.topics[1] + const _epochKey = BigInt(event.topics[2]).toString(16) + const _attester = event.topics[3] + const decodedData = iface.decodeEventLog("AttestationSubmitted",event.data) + + const newAttestation: IAttestation = { + transactionHash: event.transactionHash, + epoch: Number(_epoch), + attester: _attester, + attesterId: decodedData?.attestation?.attesterId?._hex, + posRep: decodedData?.attestation?.posRep?._hex, + negRep: decodedData?.attestation?.negRep?._hex, + graffiti: decodedData?.attestation?.graffiti?._hex, + overwriteGraffiti: decodedData?.attestation?.overwriteGraffiti, + } + + let attestations = await Attestations.findOne({epochKey: _epochKey}) + + if(!attestations){ + attestations = new Attestations({ + epochKey: _epochKey, + attestations: [newAttestation] + }) + } else { + attestations.get('attestations').push(newAttestation) + } + + const res = await attestations?.save() + if(res){ + console.log('Database: saved submitted attestation') + } +} + +/* +* When a PostSubmitted event comes +* update the database +* @param event PostSubmitted event +*/ +const updateDBFromPostSubmittedEvent = async ( + event: ethers.Event, +) => { + const postId = mongoose.Types.ObjectId(event.topics[2].slice(-24)) + + const newPost = await Post.findByIdAndUpdate( + postId, + {$set: { + status: 1, + transactionHash: event.transactionHash + }}, + ) + + if(newPost){ + console.log(`Database: updated ${postId} post`) + } +} + +/* +* When a CommentSubmitted event comes +* update the database +* @param event CommentSubmitted event +*/ +const updateDBFromCommentSubmittedEvent = async ( + event: ethers.Event, +) => { + const commentId = mongoose.Types.ObjectId(event.topics[2].slice(-24)) + + const res = await Post.findOneAndUpdate( + { "comments._id": commentId }, + {$set: { + "comments.$.status": 1, + "comments.$.transactionHash": event.transactionHash + }}, + ) + + if(res) { + console.log(`Database: updated ${commentId} comment`) + } +} + +/* +* When a ReputationNullifierSubmitted event comes +* update the database +* @param event ReputationNullifierSubmitted event +*/ +const updateDBFromReputationNullifierSubmittedEvent = async ( + event: ethers.Event, +) => { + const iface = new ethers.utils.Interface(Unirep.abi) + const decodedData = iface.decodeEventLog("ReputationNullifierSubmitted",event.data) + + for (let nullifier of decodedData.karmaNullifiers) { + const newReputationNullifier: IReputationNullifier = new ReputationNullifier({ + transactionHash: event.transactionHash, + action: action[decodedData.actionChoice], + nullifiers: nullifier.toString() + }) + + const res = await newReputationNullifier.save() + if(res) { + console.log('Database: saved reputation nullifiers') + } + } +} + +/* +* When an EpochEnded event comes +* update the database +* @param event EpochEnded event +* @param address The address of the Unirep contract +* @param provider An Ethereum provider +*/ +const updateDBFromEpochEndedEvent = async ( + event: ethers.Event, + unirepContract: ethers.Contract, +) => { + // update Unirep state + const epoch = Number(event?.topics[1]) + + // Get epoch tree leaves of the ending epoch + let [epochKeys_, epochKeyHashchains_] = await unirepContract.getEpochTreeLeaves(epoch) + epochKeys_ = epochKeys_.map((epk) => BigInt(epk).toString(16)) + epochKeyHashchains_ = epochKeyHashchains_.map((hc) => BigInt(hc).toString()) + + const epochTreeLeaves: IEpochTreeLeaf[] = [] + for (let i = 0; i < epochKeys_.length; i++) { + const epochTreeLeaf: IEpochTreeLeaf = { + epochKey: epochKeys_[i], + hashchainResult: epochKeyHashchains_[i] + } + epochTreeLeaves.push(epochTreeLeaf) + } + + const newEpochTreeLeaves = new EpochTreeLeaves({ + epoch: epoch, + epochTreeLeaves: epochTreeLeaves + }) + + const EpochEndedEventResult = await newEpochTreeLeaves?.save() + + if(EpochEndedEventResult) { + console.log('Database: saved epoch tree leaves and update current Epoch') + } +} + +/* +* When a UserstateTransitioned event comes +* update the database +* and insert a new leaf into GST +* @param event UserstateTransitioned event +*/ +const updateDBFromUserStateTransitionEvent = async ( + event: ethers.Event +) => { + const _settings = await Settings.findOne() + if (!_settings) { + throw new Error('Error: should save settings first') + } + const iface = new ethers.utils.Interface(Unirep.abi) + const _toEpoch = Number(event.topics[1]) + const decodedUserStateTransitionedData = iface.decodeEventLog("UserStateTransitioned",event.data) + const _transactionHash = event.transactionHash + const _hashedLeaf = decodedUserStateTransitionedData?.userTransitionedData?.newGlobalStateTreeLeaf._hex + + // save new user transitioned state + const newUserState: IUserTransitionedState = new UserTransitionedState({ + transactionHash: _transactionHash, + toEpoch: _toEpoch, + fromEpoch: decodedUserStateTransitionedData?.userTransitionedData?.fromEpoch._hex, + fromGlobalStateTree: decodedUserStateTransitionedData?.userTransitionedData?.fromGlobalStateTree._hex, + fromEpochTree: decodedUserStateTransitionedData?.userTransitionedData?.fromEpochTree._hex, + fromNullifierTreeRoot: decodedUserStateTransitionedData?.userTransitionedData?.fromNullifierTreeRoot._hex, + newGlobalStateTreeLeaf: _hashedLeaf, + proof: decodedUserStateTransitionedData?.userTransitionedData?.proof, + attestationNullifiers: decodedUserStateTransitionedData?.userTransitionedData?.attestationNullifiers, + epkNullifiers: decodedUserStateTransitionedData?.userTransitionedData?.epkNullifiers, + }) + + const UserStateTransitionedResult = await newUserState.save() + + // save the new leaf + const newLeaf: IGSTLeaf = { + transactionHash: _transactionHash, + hashedLeaf: _hashedLeaf + } + + let treeLeaves: IGSTLeaves | null = await GSTLeaves.findOne({epoch: _toEpoch}) + + if(!treeLeaves){ + treeLeaves = new GSTLeaves({ + epoch: _toEpoch, + GSTLeaves: [newLeaf], + currentEpochGSTLeafIndexToInsert: 1 + }) + } else { + const nextIndex = treeLeaves.currentEpochGSTLeafIndexToInsert + 1 + treeLeaves.get('GSTLeaves').push(newLeaf) + treeLeaves.set('currentEpochGSTLeafIndexToInsert', nextIndex) + } + + // save nullifiers + const attestationNullifiers = decodedUserStateTransitionedData?.userTransitionedData?.attestationNullifiers.map((n) => BigInt(n)) + const epkNullifiers = decodedUserStateTransitionedData?.userTransitionedData?.epkNullifiers.map((n) => BigInt(n)) + // Combine nullifiers and mod them + const allNullifiers = attestationNullifiers?.concat(epkNullifiers).map((nullifier) => BigInt(nullifier) % BigInt(2 ** _settings.nullifierTreeDepth)) + + for (let nullifier of allNullifiers) { + if (nullifier > BigInt(0)) { + assert(nullifier < BigInt(2 ** _settings.nullifierTreeDepth), `Nullifier(${nullifier}) larger than max leaf value(2**nullifierTreeDepth)`) + const findNullifier = await NullifierTreeLeaves.findOne({nullifier: nullifier}) + assert(!findNullifier, `Nullifier(${nullifier}) seen before`) + const nullifierLeaf = new NullifierTreeLeaves({ + epoch: _toEpoch, + nullifier: nullifier, + transactionHash: _transactionHash + }) + await nullifierLeaf.save() + } + } + + const NewLeafInsertedResult = await treeLeaves?.save() + + if(NewLeafInsertedResult && UserStateTransitionedResult){ + console.log('Database: saved user transitioned state and inserted a new GST leaf') + } + +} + + + +export { + connectDB, + initDB, + disconnectDB, + saveSettingsFromContract, + genProveReputationCircuitInputsFromDB, + genProveReputationFromAttesterCircuitInputsFromDB, + genUserStateTransitionCircuitInputsFromDB, + updateDBFromNewGSTLeafInsertedEvent, + updateDBFromAttestationEvent, + updateDBFromPostSubmittedEvent, + updateDBFromCommentSubmittedEvent, + updateDBFromReputationNullifierSubmittedEvent, + updateDBFromEpochEndedEvent, + updateDBFromUserStateTransitionEvent, +} \ No newline at end of file diff --git a/test/utils.ts b/test/utils.ts index 597d1d6..d93b59d 100644 --- a/test/utils.ts +++ b/test/utils.ts @@ -13,7 +13,7 @@ import { ATTESTATION_NULLIFIER_DOMAIN, EPOCH_KEY_NULLIFIER_DOMAIN, KARMA_NULLIFI import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import PoseidonT3 from "../artifacts/contracts/Poseidon.sol/PoseidonT3.json" import PoseidonT6 from "../artifacts/contracts/Poseidon.sol/PoseidonT6.json" -import { DEFAULT_START_KARMA } from '../config/socialMedia' +import { DEFAULT_AIRDROPPED_KARMA } from '../config/socialMedia' const getTreeDepthsForTesting = (deployEnv: string = "contract") => { if (deployEnv === 'contract') { @@ -95,7 +95,7 @@ const deployUnirep = async ( _maxUsers = maxUsers _numEpochKeyNoncePerEpoch = numEpochKeyNoncePerEpoch _numAttestationsPerEpochKey = numAttestationsPerEpochKey - _defaultKarma = DEFAULT_START_KARMA + _defaultKarma = DEFAULT_AIRDROPPED_KARMA _epochLength = epochLength _attestingFee = attestingFee } From 34035e4d970989dd0c54b6971dbee0efaf8828a8 Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Wed, 28 Apr 2021 18:22:46 +0800 Subject: [PATCH 17/38] change default GST leaf, modify integration test --- .DS_Store | Bin 10244 -> 8196 bytes .gitignore | 1 + circuits/test/userStateTransition_test.circom | 11 +- cli/eventListeners.ts | 18 +- cli/test/testAllCommands.ts | 110 +++- contracts/DomainObjs.sol | 9 +- contracts/Unirep.sol | 39 +- core/UnirepState.ts | 8 +- database/utils.ts | 11 +- package.json | 2 +- test/integration/Integration.ts | 504 ++++++++++++------ test/utils.ts | 5 +- 12 files changed, 491 insertions(+), 227 deletions(-) diff --git a/.DS_Store b/.DS_Store index bd348ad44576ed902961195edb09bfcebe173f0b..e715b3f3c81d8ac0cda6a8d1c5cd7da327a1758b 100644 GIT binary patch delta 316 zcmX9)Jxc>Y5S`0u63LnD#@oFtF`OEMHUL~(t`&=5A77il zAQDmrYyAP*h?R|hK(KXAXPEb99?Za-UZYnp5RtVJ1vR3$O>@O8GX0M3SLZD?Y>ac3 zf+H&UmI5tN!j?OYSLq{iWy+=#YEy`TDowFhv9Fi$Y(zQFTAS4>9Z{F_l&%@$KK$FM zQWsZx9S1_5!UHjUbl zDtDd$4t)ilg9ku73n%!->qho&LRA4(L3U-2*E=(|zp-aCQz8<@UL!~35K#)1>GA@a z35DNtjg^ENxdkd9PxOYWRHuNt+g^;@4p;;%0u}*_fJML}a2XK5H=9f9N=R*M5wHkY z1jY!ke{fKl78D(YRJsl{G6VokVptaR5eG;aN6~_!qmW8b=nSI=p+toWF+?bi_YSjz z78D(YG!!QhijzY)>$H^3<#Cjs>nC_bDmamnEQV;6q{I1#9m z624B%OMZ`l#wO{|A+_PJebXfD5)6~1r~y+1s5R7XOg9W7bg#Yw$HZTPhNJ;ybo1j$ z=5=+GCcZ{yT)<)RA>V`p+n2o_?pBlY!7;fL%^A&sw+H=gZcSbR1dLVA>%6pXa!a>p z?x~GE)!{;`w2PJ8#d>`CoT0bC1jpOdK=^`@zP1IdO4l$=jy;Ahw*)yKd&<$e;m+A| zRqC0u%CDjB&L>IdV1vohY)M^u*_fNJZwqsJQ{@?BUH%5-J6Qbz5POO$?E($_8-X1{ z1wB|5Z3cWf;2E*7{KcSaTs?=zF3$J9i4UJN;}o1{g?+5N8`a2mHujvxPPZ^xqQ{^a zv?X&5(&e3Kr*&KU0roun1TL{#^t_vQ#b=vHsKCRdg$yYj;q0P`NPQ zD5O#ZjZDXb%5*#)I30fnm3gyFxu9QAbQDsIpj`Mr11>u8XXAex|Az_PX%ReU!;iJt J@~_ALKLNjEX;}aO diff --git a/.gitignore b/.gitignore index b3042d1..10cf5bc 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ node_modules cache artifacts build +mongodb #Verifier solidity contracts EpochKeyValidityVerifier.sol diff --git a/circuits/test/userStateTransition_test.circom b/circuits/test/userStateTransition_test.circom index 6c8de28..1efc6c0 100644 --- a/circuits/test/userStateTransition_test.circom +++ b/circuits/test/userStateTransition_test.circom @@ -1,3 +1,12 @@ include "../userStateTransition.circom" -component main = UserStateTransition(4, 8, 128, 4, 6, 2, 12); \ No newline at end of file +component main = UserStateTransition( + 4, // GST_tree_depth + 8, // epoch_tree_depth + 128, // nullifier_tree_depth + 4, // user_state_tree_depth + // 20, // airdropped_karma + 6, // ATTESTATIONS_PER_EPOCH_KEY + 2, // EPOCH_KEY_NONCE_PER_EPOCH + 12 // TOTAL_NUM_ATTESTATIONS +); \ No newline at end of file diff --git a/cli/eventListeners.ts b/cli/eventListeners.ts index 96ea21a..cc9a9ca 100644 --- a/cli/eventListeners.ts +++ b/cli/eventListeners.ts @@ -94,15 +94,15 @@ const eventListeners = async (args: any) => { postSubmittedFilter, (event) => updateDBFromPostSubmittedEvent(event) ) - // CommentSubmitted listeners - provider.on( - commentSubmittedFilter, (event) => updateDBFromCommentSubmittedEvent(event) - ) - - // ReputationSubmitted listeners - provider.on( - reputationSubmittedFilter, (event) => updateDBFromReputationNullifierSubmittedEvent(event) - ) + // CommentSubmitted listeners + provider.on( + commentSubmittedFilter, (event) => updateDBFromCommentSubmittedEvent(event) + ) + + // ReputationSubmitted listeners + provider.on( + reputationSubmittedFilter, (event) => updateDBFromReputationNullifierSubmittedEvent(event) + ) // Attestation listeners provider.on( diff --git a/cli/test/testAllCommands.ts b/cli/test/testAllCommands.ts index f743388..34b2c0c 100644 --- a/cli/test/testAllCommands.ts +++ b/cli/test/testAllCommands.ts @@ -13,6 +13,8 @@ import { exec } from './utils' import Unirep from "../../artifacts/contracts/Unirep.sol/Unirep.json" import { hashOne } from "maci-crypto" import { identityCommitmentPrefix, identityPrefix } from '../prefix' +import { connectDB, initDB, updateDBFromAttestationEvent, updateDBFromCommentSubmittedEvent, updateDBFromEpochEndedEvent, updateDBFromNewGSTLeafInsertedEvent, updateDBFromPostSubmittedEvent, updateDBFromReputationNullifierSubmittedEvent, updateDBFromUserStateTransitionEvent } from '../../database/utils' +import { dbUri } from '../../config/database' describe('test all CLI subcommands', function() { this.timeout(500000) @@ -35,6 +37,7 @@ describe('test all CLI subcommands', function() { const epochLength = 5 let unirepContract: ethers.Contract let unirepState: UnirepState + const dbOption = ` -db` let userIdentity1, userIdentityCommitment1, userIdentity2, userIdentityCommitment2 const attesterId = 1 @@ -247,7 +250,7 @@ describe('test all CLI subcommands', function() { ` -id ${userIdentity1}` + ` -n ${epochKeyNonce}` + ` -kn ${postNonce}` + - ` -db` + dbOption const output = exec(command).stdout.trim() @@ -280,29 +283,6 @@ describe('test all CLI subcommands', function() { }) }) - // describe('leaveComment CLI subcommand', () => { - // it('should leave a comment', async () => { - // const command = `npx ts-node cli/index.ts leaveComment` + - // ` -x ${unirepContract.address} ` + - // ` -pid ${postID} ` + - // ` -tx ${text2}` + - // ` -d ${userPrivKey}` + - // ` -id ${userIdentity2}` + - // ` -n ${epochKeyNonce}` + - // ` -kn ${commentNonce}` + - // ` -mr ${minRepDiff}` + - // ` -db` - - // const output = exec(command).stdout.trim() - - // console.log(command) - // console.log(output) - - // const commentRegMatch = output.match(/Transaction hash: 0x[a-fA-F0-9]{64}/) - // expect(commentRegMatch).not.equal(null) - // }) - // }) - describe('upvote CLI subcommand', () => { it('should upvote to user', async () => { @@ -315,7 +295,7 @@ describe('test all CLI subcommands', function() { ` -kn ${attestNonce}` + ` -uv ${posRep} ` + ` -gf ${graffiti.toString(16)} ` + - ` -db` + dbOption const output = exec(command).stdout.trim() @@ -350,7 +330,7 @@ describe('test all CLI subcommands', function() { ` -x ${unirepContract.address} ` + ` -d ${userPrivKey} ` + ` -id ${userIdentity1} ` + - ` -db` + dbOption const output = exec(command).stdout.trim() @@ -366,7 +346,7 @@ describe('test all CLI subcommands', function() { ` -x ${unirepContract.address} ` + ` -d ${userPrivKey} ` + ` -id ${userIdentity2} ` + - ` -db` + dbOption const output = exec(command).stdout.trim() @@ -388,7 +368,7 @@ describe('test all CLI subcommands', function() { ` -mn ${maxNegRep} ` + // ` -md ${minRepDiff}` + ` -gp ${graffitiPreimage} ` + - ` -db` + dbOption const output = exec(command).stdout.trim() @@ -420,4 +400,78 @@ describe('test all CLI subcommands', function() { expect(verifyRegMatch).not.equal(null) }) }) + + // describe('leaveComment CLI subcommand', () => { + // it('should leave a comment', async () => { + // const command = `npx ts-node cli/index.ts leaveComment` + + // ` -x ${unirepContract.address} ` + + // ` -pid ${postID} ` + + // ` -tx ${text2}` + + // ` -d ${userPrivKey}` + + // ` -id ${userIdentity2}` + + // ` -n ${epochKeyNonce}` + + // ` -kn ${commentNonce}` + + // ` -mr ${minRepDiff}` + + // dbOption + + // const output = exec(command).stdout.trim() + + // console.log(command) + // console.log(output) + + // const commentRegMatch = output.match(/Transaction hash: 0x[a-fA-F0-9]{64}/) + // expect(commentRegMatch).not.equal(null) + // }) + // }) + + // describe('epochTransition CLI subcommand', () => { + // it('should transition to next epoch', async () => { + // const command = `npx ts-node cli/index.ts epochTransition` + + // ` -x ${unirepContract.address} ` + + // ` -d ${deployerPrivKey} ` + + // ` -t ` + + // const output = exec(command).stdout.trim() + + // console.log(command) + // console.log(output) + + // const epochEndRegMatch = output.match(/End of epoch: 2/) + // expect(epochEndRegMatch).not.equal(null) + // }) + // }) + + // describe('userStateTransition CLI subcommand', () => { + // it('should transition user 1 state', async () => { + // const command = `npx ts-node cli/index.ts userStateTransition` + + // ` -x ${unirepContract.address} ` + + // ` -d ${userPrivKey} ` + + // ` -id ${userIdentity1} ` + + // dbOption + + // const output = exec(command).stdout.trim() + + // console.log(command) + // console.log(output) + + // const userTransitionRegMatch = output.match(/User transitioned from epoch 2 to epoch 3/) + // expect(userTransitionRegMatch).not.equal(null) + // }) + + // it('should transition user 2 state', async () => { + // const command = `npx ts-node cli/index.ts userStateTransition` + + // ` -x ${unirepContract.address} ` + + // ` -d ${userPrivKey} ` + + // ` -id ${userIdentity2} ` + + // dbOption + + // const output = exec(command).stdout.trim() + + // console.log(command) + // console.log(output) + + // const userTransitionRegMatch = output.match(/User transitioned from epoch 2 to epoch 3/) + // expect(userTransitionRegMatch).not.equal(null) + // }) + // }) }) \ No newline at end of file diff --git a/contracts/DomainObjs.sol b/contracts/DomainObjs.sol index d544e5c..520ba6c 100644 --- a/contracts/DomainObjs.sol +++ b/contracts/DomainObjs.sol @@ -7,10 +7,17 @@ contract DomainObjs is Hasher { struct StateLeaf { uint256 identityCommitment; uint256 userStateRoot; + uint256 positiveKarma; + uint256 negativeKarma; } function hashStateLeaf(StateLeaf memory _stateLeaf) public pure returns (uint256) { - return hashLeftRight(_stateLeaf.identityCommitment, _stateLeaf.userStateRoot); + uint256[] memory hashElements = new uint256[](5); + hashElements[0] = _stateLeaf.identityCommitment; + hashElements[1] = _stateLeaf.userStateRoot; + hashElements[2] = _stateLeaf.positiveKarma; + hashElements[3] = _stateLeaf.negativeKarma; + return hash5(hashElements); } struct Attestation { diff --git a/contracts/Unirep.sol b/contracts/Unirep.sol index 93f43aa..e22bbc3 100644 --- a/contracts/Unirep.sol +++ b/contracts/Unirep.sol @@ -51,7 +51,7 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { enum actionChoices { UpVote, DownVote, Post, Comment } // The default given karma when users sign up - uint256 immutable public defaultKarma; + uint256 immutable public defaultKarma = 20; // The amount of karma required to publish a post uint256 immutable public postKarma = 10; @@ -64,6 +64,8 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { uint256 public numUserSignUps = 0; + uint256 public nextGSTLeafIndex = 0; + mapping(uint256 => bool) public hasUserSignedUp; // Fee required for submitting an attestation @@ -113,6 +115,7 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { event NewGSTLeafInserted( uint256 indexed _epoch, + uint256 _leafIndex, uint256 _hashedLeaf ); @@ -150,6 +153,7 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { event UserStateTransitioned( uint256 indexed _toEpoch, + uint256 _leafIndex, UserTransitionedRelated userTransitionedData ); @@ -177,7 +181,6 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { ReputationFromAttesterVerifier _reputationFromAttesterVerifier, uint8 _numEpochKeyNoncePerEpoch, uint8 _numAttestationsPerEpochKey, - uint256 _defaultKarma, uint256 _epochLength, uint256 _attestingFee ) public { @@ -194,7 +197,6 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { numAttestationsPerEpochKey = _numAttestationsPerEpochKey; numAttestationsPerEpoch = _numEpochKeyNoncePerEpoch * _numAttestationsPerEpochKey; epochLength = _epochLength; - defaultKarma = _defaultKarma; latestEpochTransitionTime = block.timestamp; // Check and store the maximum number of signups @@ -221,26 +223,22 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { function userSignUp(uint256 _identityCommitment) external { require(hasUserSignedUp[_identityCommitment] == false, "Unirep: the user has already signed up"); require(numUserSignUps < maxUsers, "Unirep: maximum number of signups reached"); - - // When a user signs up, give defaultKarma - Karma memory karma; - karma.positiveKarma = defaultKarma; - karma.negativeKarma = 0; // Compute hashed leaf - uint256[] memory hashElements = new uint256[](5); - hashElements[0] = _identityCommitment; - hashElements[1] = emptyUserStateRoot; - hashElements[2] = karma.positiveKarma; - hashElements[3] = karma.negativeKarma; - hashElements[4] = 0; - uint256 hashedLeaf = hash5(hashElements); + StateLeaf memory stateLeaf; + stateLeaf.identityCommitment = _identityCommitment; + stateLeaf.userStateRoot = emptyUserStateRoot; + stateLeaf.positiveKarma = defaultKarma; + stateLeaf.negativeKarma = 0; + uint256 hashedLeaf = hashStateLeaf(stateLeaf); hasUserSignedUp[_identityCommitment] = true; numUserSignUps ++; emit Sequencer("UserSignUp"); - emit NewGSTLeafInserted(currentEpoch, hashedLeaf); + emit NewGSTLeafInserted(currentEpoch, nextGSTLeafIndex ,hashedLeaf); + + nextGSTLeafIndex ++; } function attesterSignUp() external { @@ -473,6 +471,7 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { latestEpochTransitionTime = block.timestamp; currentEpoch ++; + nextGSTLeafIndex = 0; } uint256 gasUsed = initGas.sub(gasleft()); @@ -506,8 +505,11 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { emit Sequencer("UserStateTransitioned"); emit UserStateTransitioned( currentEpoch, + nextGSTLeafIndex, userTransitionedData ); + + nextGSTLeafIndex ++; // emit NewGSTLeafInserted(currentEpoch, _newGlobalStateTreeLeaf); } @@ -711,7 +713,10 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { function hashedBlankStateLeaf() public view returns (uint256) { StateLeaf memory stateLeaf = StateLeaf({ identityCommitment: 0, - userStateRoot: emptyUserStateRoot + userStateRoot: emptyUserStateRoot, + // DefaultKarma + positiveKarma: 20, + negativeKarma: 0 }); return hashStateLeaf(stateLeaf); diff --git a/core/UnirepState.ts b/core/UnirepState.ts index 135d2db..7f69453 100644 --- a/core/UnirepState.ts +++ b/core/UnirepState.ts @@ -5,6 +5,7 @@ import { IncrementalQuinTree, hash5, } from 'maci-crypto' +import { DEFAULT_AIRDROPPED_KARMA } from '../config/socialMedia' import { SparseMerkleTreeImpl } from '../crypto/SMT' import { computeEmptyUserStateRoot, genNewSMT, SMT_ONE_LEAF, SMT_ZERO_LEAF } from '../test/utils' @@ -113,10 +114,13 @@ class UnirepState { this.currentEpoch = 1 this.GSTLeaves[this.currentEpoch] = [] const emptyUserStateRoot = computeEmptyUserStateRoot(_userStateTreeDepth) - this.defaultGSTLeaf = hashLeftRight( + this.defaultGSTLeaf = hash5([ BigInt(0), // zero identityCommitment emptyUserStateRoot, // zero user state root - ) + BigInt(DEFAULT_AIRDROPPED_KARMA), // default airdropped karma + BigInt(0), // default negative karma + BigInt(0) + ]) } public toJSON = (space = 0): string => { diff --git a/database/utils.ts b/database/utils.ts index 85088c9..f68be11 100644 --- a/database/utils.ts +++ b/database/utils.ts @@ -137,10 +137,13 @@ const genGSTreeFromDB = async (epoch: number): Promise => { const globalStateTreeDepth = _settings.globalStateTreeDepth const userStateTreeDepth = _settings.userStateTreeDepth const emptyUserStateRoot = computeEmptyUserStateRoot(userStateTreeDepth) - const defaultGSTLeaf = hashLeftRight( - BigInt(0), - emptyUserStateRoot - ) + const defaultGSTLeaf = hash5([ + BigInt(0), // zero identityCommitment + emptyUserStateRoot, // zero user state root + BigInt(DEFAULT_AIRDROPPED_KARMA), // default airdropped karma + BigInt(0), // default negative karma + BigInt(0) + ]) const GSTree = new IncrementalQuinTree( globalStateTreeDepth, diff --git a/package.json b/package.json index 9639da5..a9a81fd 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "test": "npx hardhat compile && npx ts-node scripts/buildPoseidon.ts && npm run contractUintTests && npm run circuitUintTests && npm run integrationTest", "contractUintTests": "NODE_OPTIONS=--max-old-space-size=4096 npx hardhat test --no-compile $(find test/contracts -name '*.ts')", "circuitUintTests": "NODE_OPTIONS=--max-old-space-size=4096 npx hardhat test --no-compile $(find test/circuits -name '*.ts')", - "integrationTest": "NODE_OPTIONS=--max-old-space-size=4096 npx hardhat test --no-compile $(find test/integration -name '*.ts')" + "integrationTest": "npx ts-node scripts/buildPoseidon.ts && NODE_OPTIONS=--max-old-space-size=4096 npx hardhat test --no-compile $(find test/integration -name '*.ts')" }, "repository": { "type": "git", diff --git a/test/integration/Integration.ts b/test/integration/Integration.ts index d73077f..a0e541f 100644 --- a/test/integration/Integration.ts +++ b/test/integration/Integration.ts @@ -3,13 +3,17 @@ import { BigNumber, ethers } from 'ethers' import chai from "chai" import { attestingFee, circuitEpochTreeDepth, circuitGlobalStateTreeDepth, circuitNullifierTreeDepth, circuitUserStateTreeDepth, epochLength, numEpochKeyNoncePerEpoch, numAttestationsPerEpochKey} from '../../config/testLocal' import { genIdentity, genIdentityCommitment } from 'libsemaphore' -import { IncrementalQuinTree, genRandomSalt, stringifyBigInts, hashLeftRight, hashOne } from 'maci-crypto' +import { IncrementalQuinTree, genRandomSalt, stringifyBigInts, hashLeftRight, hashOne, hash5 } from 'maci-crypto' import { deployUnirep, genEpochKey, toCompleteHexString, computeEmptyUserStateRoot, getTreeDepthsForTesting } from '../utils' const { expect } = chai import { Attestation, IAttestation, IEpochTreeLeaf, IUserStateLeaf, UnirepState, UserState, genUserStateFromContract } from "../../core" -import { compileAndLoadCircuit, formatProofForVerifierContract, genVerifyEpochKeyProofAndPublicSignals, genVerifyReputationProofAndPublicSignals, genVerifyUserStateTransitionProofAndPublicSignals, getSignalByName, getSignalByNameViaSym, verifyEPKProof, verifyProveReputationProof, verifyUserStateTransitionProof } from "../circuits/utils" +import { compileAndLoadCircuit, formatProofForVerifierContract, genVerifyEpochKeyProofAndPublicSignals, genVerifyReputationProofAndPublicSignals, genVerifyReputationFromAttesterProofAndPublicSignals, +genVerifyUserStateTransitionProofAndPublicSignals, getSignalByName, getSignalByNameViaSym, verifyEPKProof, verifyProveReputationProof, verifyUserStateTransitionProof, verifyProveReputationFromAttesterProof } from "../circuits/utils" +import { DEFAULT_AIRDROPPED_KARMA, DEFAULT_POST_KARMA } from '../../config/socialMedia' +import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from '../../cli/defaults' +import { add0x } from '../../crypto/SMT' describe('Integration', function () { this.timeout(500000) @@ -24,6 +28,7 @@ describe('Integration', function () { let unirepContract: ethers.Contract let unirepContractCalledByFirstAttester, unirepContractCalledBySecondAttester + let _treeDepths let prevEpoch: ethers.BigNumber let currentEpoch: ethers.BigNumber @@ -37,12 +42,12 @@ describe('Integration', function () { before(async () => { accounts = await hardhatEthers.getSigners() - const _treeDepths = getTreeDepthsForTesting("circuit") + _treeDepths = getTreeDepthsForTesting("circuit") unirepContract = await deployUnirep(accounts[0], _treeDepths) currentEpoch = await unirepContract.currentEpoch() emptyUserStateRoot = computeEmptyUserStateRoot(circuitUserStateTreeDepth) - blankGSLeaf = hashLeftRight(BigInt(0), emptyUserStateRoot) + blankGSLeaf = hash5([BigInt(0), emptyUserStateRoot, BigInt(DEFAULT_AIRDROPPED_KARMA), BigInt(0), BigInt(0)]) unirepState = new UnirepState( circuitGlobalStateTreeDepth, @@ -68,7 +73,9 @@ describe('Integration', function () { const hashedStateLeaf = await unirepContract.hashStateLeaf( [ commitment, - emptyUserStateRoot + emptyUserStateRoot, + BigInt(DEFAULT_AIRDROPPED_KARMA), + BigInt(0) ] ) unirepState.signUp(currentEpoch.toNumber(), BigInt(hashedStateLeaf)) @@ -79,7 +86,17 @@ describe('Integration', function () { false, ) const latestTransitionedToEpoch = currentEpoch.toNumber() - const GSTreeLeafIndex = 0 + const newLeafFilter = unirepContract.filters.NewGSTLeafInserted(currentEpoch) + const newLeafEvents = await unirepContract.queryFilter(newLeafFilter) + let GSTreeLeafIndex: number = -1 + + for (let i = 0; i < newLeafEvents.length; i++) { + if(BigInt(newLeafEvents[i]?.args?._hashedLeaf) == BigInt(hashedStateLeaf)){ + GSTreeLeafIndex = newLeafEvents[i]?.args?._leafIndex.toNumber() + } + } + + expect(GSTreeLeafIndex).to.equal(0) users[0].signUp(latestTransitionedToEpoch, GSTreeLeafIndex) console.log(`First user signs up with commitment (${commitment}), in epoch ${latestTransitionedToEpoch} and GST leaf ${GSTreeLeafIndex}`) console.log('----------------------User State----------------------') @@ -104,7 +121,22 @@ describe('Integration', function () { it('Global state tree built from events should match', async () => { const newLeafFilter = unirepContract.filters.NewGSTLeafInserted(currentEpoch) const newLeafEvents = await unirepContract.queryFilter(newLeafFilter) - const newLeaves: any[] = newLeafEvents.map((event: any) => event['args']['_hashedLeaf']) + + const stateTransitionByEpochFilter = unirepContract.filters.UserStateTransitioned(currentEpoch) + const stateTransitionByEpochEvents = await unirepContract.queryFilter(stateTransitionByEpochFilter) + + let newLeaves = new Array(newLeafEvents.length + stateTransitionByEpochEvents.length) + + for(const event of newLeafEvents){ + const leafIndex = event?.args?._leafIndex + newLeaves[leafIndex] = event?.args?._hashedLeaf + } + + for(const event of stateTransitionByEpochEvents){ + const leafIndex = event?.args?._leafIndex + newLeaves[leafIndex] = event?.args?.userTransitionedData?.newGlobalStateTreeLeaf + } + let observedGST = new IncrementalQuinTree(circuitGlobalStateTreeDepth, blankGSLeaf, 2) for(let leaf of newLeaves) { observedGST.insert(leaf) @@ -196,28 +228,29 @@ describe('Integration', function () { const stateTransitionByEpochEvent = await unirepContract.queryFilter(stateTransitionByEpochFilter) expect(stateTransitionByEpochEvent.length, 'Number of state transition events current epoch should be 1').to.equal(1) - const newGSTLeafByEpochFilter = unirepContract.filters.NewGSTLeafInserted(currentEpoch) - const newGSTLeafByEpochEvent = await unirepContract.queryFilter(newGSTLeafByEpochFilter) - expect(newGSTLeafByEpochEvent.length, 'Number of new GST leaves should be 1').to.equal(1) + // const newGSTLeafByEpochFilter = unirepContract.filters.NewGSTLeafInserted(currentEpoch) + // const newGSTLeafByEpochEvent = await unirepContract.queryFilter(newGSTLeafByEpochFilter) + // console.log(newGSTLeafByEpochEvent) + // expect(newGSTLeafByEpochEvent.length, 'Number of new GST leaves should be 1').to.equal(1) const stateTransitionArgs: any = stateTransitionByEpochEvent[0]['args'] - const newGSTLeafArgs: any = newGSTLeafByEpochEvent[0]['args'] + // const newGSTLeafArgs: any = stateTransitionByEpochEvent[0]['args'] // Verify on-chain const isProofValid = await unirepContract.verifyUserStateTransition( - newGSTLeafArgs['_hashedLeaf'], - stateTransitionArgs['_attestationNullifiers'], - stateTransitionArgs['_epkNullifiers'], - stateTransitionArgs['_fromEpoch'], - stateTransitionArgs['_fromGlobalStateTree'], - stateTransitionArgs['_fromEpochTree'], - stateTransitionArgs['_fromNullifierTreeRoot'], - stateTransitionArgs['_proof'], + stateTransitionArgs['userTransitionedData']['newGlobalStateTreeLeaf'], + stateTransitionArgs['userTransitionedData']['attestationNullifiers'], + stateTransitionArgs['userTransitionedData']['epkNullifiers'], + stateTransitionArgs['userTransitionedData']['fromEpoch'], + stateTransitionArgs['userTransitionedData']['fromGlobalStateTree'], + stateTransitionArgs['userTransitionedData']['fromEpochTree'], + // stateTransitionArgs['userTransitionedData']['_fromNullifierTreeRoot'], + stateTransitionArgs['userTransitionedData']['proof'], ) expect(isProofValid, 'Verify user state transition on-chain failed').to.be.true - const attestationNullifiers = stateTransitionArgs['_attestationNullifiers'].map((n) => BigInt(n)) - const epkNullifiers = stateTransitionArgs['_epkNullifiers'].map((n) => BigInt(n)) + const attestationNullifiers = stateTransitionArgs['userTransitionedData']['attestationNullifiers'].map((n) => BigInt(n)) + const epkNullifiers = stateTransitionArgs['userTransitionedData']['epkNullifiers'].map((n) => BigInt(n)) // Combine nullifiers and mod them const allNullifiers = attestationNullifiers.concat(epkNullifiers).map((nullifier) => BigInt(nullifier) % BigInt(2 ** circuitNullifierTreeDepth)) @@ -226,9 +259,9 @@ describe('Integration', function () { console.log(`First user finish state transition. AttesterIds in UST: [${latestUserStateLeaves.map((l) => l.attesterId.toString())}]`) expect(users[0].latestTransitionedEpoch, 'First user should transition to current epoch').to.equal(currentEpoch.toNumber()) - unirepState.userStateTransition(currentEpoch.toNumber(), BigInt(newGSTLeafArgs['_hashedLeaf']), allNullifiers) + unirepState.userStateTransition(currentEpoch.toNumber(), BigInt(stateTransitionArgs['userTransitionedData']['newGlobalStateTreeLeaf']), allNullifiers) console.log('User state transition off-chain: ') - console.log(`newGSTLeaf ${BigInt(newGSTLeafArgs['_hashedLeaf'])}, attestation attestationNullifiers [${attestationNullifiers}] and epk nullifier ${epkNullifiers}`) + console.log(`newGSTLeaf ${BigInt(stateTransitionArgs['userTransitionedData']['newGlobalStateTreeLeaf'])}, attestation attestationNullifiers [${attestationNullifiers}] and epk nullifier ${epkNullifiers}`) console.log('----------------------User State----------------------') console.log(users[0].toJSON(4)) console.log('------------------------------------------------------') @@ -245,7 +278,9 @@ describe('Integration', function () { const hashedStateLeaf = await unirepContract.hashStateLeaf( [ commitment, - emptyUserStateRoot + emptyUserStateRoot, + BigInt(DEFAULT_AIRDROPPED_KARMA), + BigInt(0) ] ) unirepState.signUp(currentEpoch.toNumber(), BigInt(hashedStateLeaf.toString())) @@ -256,7 +291,16 @@ describe('Integration', function () { false, ) const latestTransitionedToEpoch = currentEpoch.toNumber() - const GSTreeLeafIndex = 1 + const newLeafFilter = unirepContract.filters.NewGSTLeafInserted(currentEpoch) + const newLeafEvents = await unirepContract.queryFilter(newLeafFilter) + let GSTreeLeafIndex: number = -1 + + for (let i = 0; i < newLeafEvents.length; i++) { + if(BigInt(newLeafEvents[i]?.args?._hashedLeaf) == BigInt(hashedStateLeaf)){ + GSTreeLeafIndex = newLeafEvents[i]?.args?._leafIndex.toNumber() + } + } + users[1].signUp(latestTransitionedToEpoch, GSTreeLeafIndex) console.log(`Second user signs up with commitment (${commitment}), in epoch ${latestTransitionedToEpoch} and GST leaf ${GSTreeLeafIndex}`) console.log('----------------------User State----------------------') @@ -278,162 +322,286 @@ describe('Integration', function () { console.log(`First attester signs up, attester id: ${attesters[0].id}`) }) - it('Verify epoch key of first user', async () => { + it('first user publish a post and generate epoch key', async () => { const epochKeyNonce = 0 - const circuitInputs = await users[0].genVerifyEpochKeyCircuitInputs(epochKeyNonce) - const results = await genVerifyEpochKeyProofAndPublicSignals(stringifyBigInts(circuitInputs)) - const isValid = await verifyEPKProof(results['proof'], results['publicSignals']) - expect(isValid, 'Verify epk proof off-chain failed').to.be.true + const epk = genEpochKey(users[0].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth).toString(16) + + // gen nullifier nonce list + const proveKarmaNullifiers = BigInt(1) + const proveKarmaAmount = BigInt(DEFAULT_POST_KARMA) + const nonceStarter: number = 0 + const nonceList: BigInt[] = [] + for (let i = 0; i < DEFAULT_POST_KARMA; i++) { + nonceList.push( BigInt(nonceStarter + i) ) + } + + // gen minRep proof + const proveMinRep = BigInt(0) + const minRep = BigInt(0) + + const circuitInputs = await users[0].genProveReputationCircuitInputs( + epochKeyNonce, // generate epoch key from epoch nonce + proveKarmaNullifiers, // indicate to prove karma nullifiers + proveKarmaAmount, // the amount of output karma nullifiers + nonceList, // nonce to generate karma nullifiers + proveMinRep, // indicate to prove minimum reputation the user has + minRep // the amount of minimum reputation the user wants to prove + ) + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + + const nullifiers: BigInt[] = [] + + for (let i = 0; i < DEFAULT_POST_KARMA; i++) { + const variableName = 'main.karma_nullifiers['+i+']' + nullifiers.push(getSignalByNameViaSym('proveReputation', results['witness'], variableName) % BigInt(2 ** circuitNullifierTreeDepth) ) + } + const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) + expect(isValid, 'Verify reputation proof off-chain failed').to.be.true // Verify on-chain - const GSTree = unirepState.genGSTree(currentEpoch.toNumber()) + const proof = formatProofForVerifierContract(results['proof']) + const epochKey = BigInt(add0x(epk)) + const publicSignals = results['publicSignals'] + const firstUserEpochKey = genEpochKey(users[0].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth) - const isProofValid = await unirepContract.verifyEpochKeyValidity( - GSTree.root, - currentEpoch, - firstUserEpochKey, - formatProofForVerifierContract(results['proof']), + const isProofValid = await unirepContract.verifyReputation( + publicSignals, + proof ) - console.log(`Verifying epk proof with GSTreeRoot ${GSTree.root}, epoch ${currentEpoch} and epk ${firstUserEpochKey}`) - expect(isProofValid, 'Verify epk proof on-chain failed').to.be.true - }) + console.log(`Verifying epk proof with epoch ${currentEpoch} and epk ${firstUserEpochKey}`) + expect(isProofValid, 'Verify reputation proof on-chain failed').to.be.true - it('First attester attest to first user', async () => { - const nonce = 0 - const firstUserEpochKey = genEpochKey(users[0].id.identityNullifier, currentEpoch.toNumber(), nonce, circuitEpochTreeDepth) - const graffitiPreImage = genRandomSalt() - const attestation: Attestation = new Attestation( - attesters[0].id, - BigInt(3), - BigInt(1), - hashOne(graffitiPreImage), - true, + const attestationToEpochKey = new Attestation( + BigInt(attesters[0].id), + BigInt(0), + BigInt(DEFAULT_POST_KARMA), + BigInt(0), + false, ) - // Add graffiti pre-image to graffitiPreImageMap - graffitiPreImageMap[0] = new Object() - graffitiPreImageMap[0][attestation.attesterId.toString()] = graffitiPreImage - console.log(`Attester attest to epk ${firstUserEpochKey} with ${attestation.toJSON()}`) - const tx = await unirepContractCalledByFirstAttester.submitAttestation( - attestation, - firstUserEpochKey, - { value: attestingFee } + + const tx = await unirepContractCalledByFirstAttester.publishPost( + BigInt(add0x('12356')), + epochKey, + 'postText', + publicSignals, + proof, + nullifiers, + { value: attestingFee, gasLimit: 1000000 } ) + const receipt = await tx.wait() - expect(receipt.status, 'Submit attestation failed').to.equal(1) + expect(receipt.status, 'Submit post failed').to.equal(1) secondEpochEpochKeys.push(firstUserEpochKey.toString()) - unirepState.addAttestation(firstUserEpochKey.toString(), attestation) + unirepState.addAttestation(firstUserEpochKey.toString(), attestationToEpochKey) + for(const user of users){ + user.updateAttestation(firstUserEpochKey, attestationToEpochKey.posRep, attestationToEpochKey.negRep) + } }) - it('Second attester attest to first user', async () => { + it('Second attester upvote to first user', async () => { const nonce = 0 const firstUserEpochKey = genEpochKey(users[0].id.identityNullifier, currentEpoch.toNumber(), nonce, circuitEpochTreeDepth) const graffitiPreImage = genRandomSalt() - const attestation: Attestation = new Attestation( - attesters[1].id, - BigInt(3), - BigInt(1), - hashOne(graffitiPreImage), - true, - ) - // Add graffiti pre-image to graffitiPreImageMap - graffitiPreImageMap[0][attestation.attesterId.toString()] = graffitiPreImage - console.log(`Attester attest to epk ${firstUserEpochKey} with ${attestation.toJSON()}`) - const tx = await unirepContractCalledBySecondAttester.submitAttestation( - attestation, - firstUserEpochKey, - { value: attestingFee } - ) - const receipt = await tx.wait() - expect(receipt.status, 'Submit attestation failed').to.equal(1) - - unirepState.addAttestation(firstUserEpochKey.toString(), attestation) - }) + const secondUserEpochKey = genEpochKey(users[1].id.identityNullifier, currentEpoch.toNumber(), nonce, circuitEpochTreeDepth) - it('Verify epoch key of second user', async () => { - const epochKeyNonce = 0 - const circuitInputs = await users[1].genVerifyEpochKeyCircuitInputs(epochKeyNonce) - const results = await genVerifyEpochKeyProofAndPublicSignals(stringifyBigInts(circuitInputs)) - const isValid = await verifyEPKProof(results['proof'], results['publicSignals']) - expect(isValid, 'Verify epk proof off-chain failed').to.be.true + // gen nullifier nonce list + const proveKarmaNullifiers = BigInt(1) + const voteValue = 3 + const proveKarmaAmount = BigInt(voteValue) + const upvoteValue = BigInt(voteValue) - // Verify on-chain - const GSTree = unirepState.genGSTree(currentEpoch.toNumber()) - const secondUserEpochKey = genEpochKey(users[1].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth) - const isProofValid = await unirepContract.verifyEpochKeyValidity( - GSTree.root, - currentEpoch, - secondUserEpochKey, - formatProofForVerifierContract(results['proof']), - ) - console.log(`Verifying epk proof with GSTreeRoot ${GSTree.root}, epoch ${currentEpoch} and epk ${secondUserEpochKey}`) - expect(isProofValid, 'Verify epk proof on-chain failed').to.be.true - }) + const nonceStarter: number = 0 + const nonceList: BigInt[] = [] + for (let i = 0; i < voteValue; i++) { + nonceList.push( BigInt(nonceStarter + i) ) + } + + // gen minRep proof + const proveMinRep = BigInt(0) + const minRep = BigInt(0) - it('First attester attest to second user', async () => { - const nonce = 0 - const secondUserEpochKey = genEpochKey(users[1].id.identityNullifier, currentEpoch.toNumber(), nonce, circuitEpochTreeDepth) - const graffitiPreImage = genRandomSalt() - const attestation: Attestation = new Attestation( - attesters[0].id, - BigInt(2), - BigInt(6), - hashOne(graffitiPreImage), - true, - ) // Add graffiti pre-image to graffitiPreImageMap - graffitiPreImageMap[1] = new Object() - graffitiPreImageMap[1][attestation.attesterId.toString()] = graffitiPreImage - console.log(`Attester attest to epk ${secondUserEpochKey} with ${attestation.toJSON()}`) - const tx = await unirepContractCalledByFirstAttester.submitAttestation( - attestation, - secondUserEpochKey, - { value: attestingFee } + graffitiPreImageMap[0] = new Object() + graffitiPreImageMap[0][attesters[1].id] = graffitiPreImage + console.log(`Attester attest to epk ${firstUserEpochKey} with vote value ${voteValue}`) + + // generating reputation proof + const circuitInputs = await users[1].genProveReputationCircuitInputs( + nonce, // generate epoch key from epoch nonce + proveKarmaNullifiers, // indicate to prove karma nullifiers + proveKarmaAmount, // the amount of output karma nullifiers + nonceList, // nonce to generate karma nullifiers + proveMinRep, // indicate to prove minimum reputation the user has + minRep // the amount of minimum reputation the user wants to prove ) - const receipt = await tx.wait() - expect(receipt.status, 'Submit attestation failed').to.equal(1) - secondEpochEpochKeys.push(secondUserEpochKey.toString()) - unirepState.addAttestation(secondUserEpochKey.toString(), attestation) - }) + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) - it('Second attester attest to second user', async () => { - const nonce = 0 - const secondUserEpochKey = genEpochKey(users[1].id.identityNullifier, currentEpoch.toNumber(), nonce, circuitEpochTreeDepth) - const graffitiPreImage = genRandomSalt() - const attestation: Attestation = new Attestation( - attesters[1].id, + // generating onchain nullifiers + const nullifiers: BigInt[] = [] + + for (let i = 0; i < voteValue; i++) { + const variableName = 'main.karma_nullifiers['+i+']' + nullifiers.push(getSignalByNameViaSym('proveReputation', results['witness'], variableName) % BigInt(2 ** _treeDepths.nullifierTreeDepth) ) + } + + // verify reputation proof + const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) + expect(isValid, 'verify reputation circuit failed').to.equal(true) + + // format proof + const proof = formatProofForVerifierContract(results['proof']) + const fromEpochKey = BigInt(add0x(secondUserEpochKey.toString(16))) + const publicSignals = results['publicSignals'] + + const attestationToEpochKey = new Attestation( + BigInt(attesters[1].id), + BigInt(upvoteValue), BigInt(0), - BigInt(3), hashOne(graffitiPreImage), true, ) - // Add graffiti pre-image to graffitiPreImageMap - graffitiPreImageMap[0][attestation.attesterId.toString()] = graffitiPreImage - console.log(`Attester attest to epk ${secondUserEpochKey} with ${attestation.toJSON()}`) - const tx = await unirepContractCalledBySecondAttester.submitAttestation( - attestation, - secondUserEpochKey, + + const attestationToAttester = new Attestation( + BigInt(attesters[1].id), + BigInt(0), + BigInt(upvoteValue), + BigInt(0), + false, + ) + + const tx = await unirepContractCalledBySecondAttester.vote( + attestationToEpochKey, + firstUserEpochKey, + fromEpochKey, + publicSignals, + proof, + nullifiers, { value: attestingFee } ) const receipt = await tx.wait() expect(receipt.status, 'Submit attestation failed').to.equal(1) - unirepState.addAttestation(secondUserEpochKey.toString(), attestation) + secondEpochEpochKeys.push(secondUserEpochKey.toString()) + + unirepState.addAttestation(secondUserEpochKey.toString(), attestationToAttester) + unirepState.addAttestation(firstUserEpochKey.toString(), attestationToEpochKey) + for(const user of users){ + user.updateAttestation(secondUserEpochKey, attestationToAttester.posRep, attestationToAttester.negRep) + user.updateAttestation(firstUserEpochKey, attestationToEpochKey.posRep, attestationToEpochKey.negRep) + } }) + // it('Second attester attest to first user', async () => { + // const nonce = 0 + // const firstUserEpochKey = genEpochKey(users[0].id.identityNullifier, currentEpoch.toNumber(), nonce, circuitEpochTreeDepth) + // const graffitiPreImage = genRandomSalt() + // const attestation: Attestation = new Attestation( + // attesters[1].id, + // BigInt(3), + // BigInt(1), + // hashOne(graffitiPreImage), + // true, + // ) + // // Add graffiti pre-image to graffitiPreImageMap + // graffitiPreImageMap[0][attestation.attesterId.toString()] = graffitiPreImage + // console.log(`Attester attest to epk ${firstUserEpochKey} with ${attestation.toJSON()}`) + // const tx = await unirepContractCalledBySecondAttester.submitAttestation( + // attestation, + // firstUserEpochKey, + // { value: attestingFee } + // ) + // const receipt = await tx.wait() + // expect(receipt.status, 'Submit attestation failed').to.equal(1) + + // unirepState.addAttestation(firstUserEpochKey.toString(), attestation) + // }) + + // it('Verify epoch key of second user', async () => { + // const epochKeyNonce = 0 + // const circuitInputs = await users[1].genVerifyEpochKeyCircuitInputs(epochKeyNonce) + // const results = await genVerifyEpochKeyProofAndPublicSignals(stringifyBigInts(circuitInputs)) + // const isValid = await verifyEPKProof(results['proof'], results['publicSignals']) + // expect(isValid, 'Verify epk proof off-chain failed').to.be.true + + // // Verify on-chain + // const GSTree = unirepState.genGSTree(currentEpoch.toNumber()) + // const secondUserEpochKey = genEpochKey(users[1].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth) + // const isProofValid = await unirepContract.verifyEpochKeyValidity( + // GSTree.root, + // currentEpoch, + // secondUserEpochKey, + // formatProofForVerifierContract(results['proof']), + // ) + // console.log(`Verifying epk proof with GSTreeRoot ${GSTree.root}, epoch ${currentEpoch} and epk ${secondUserEpochKey}`) + // expect(isProofValid, 'Verify epk proof on-chain failed').to.be.true + // }) + + // it('First attester attest to second user', async () => { + // const nonce = 0 + // const secondUserEpochKey = genEpochKey(users[1].id.identityNullifier, currentEpoch.toNumber(), nonce, circuitEpochTreeDepth) + // const graffitiPreImage = genRandomSalt() + // const attestation: Attestation = new Attestation( + // attesters[0].id, + // BigInt(2), + // BigInt(6), + // hashOne(graffitiPreImage), + // true, + // ) + // // Add graffiti pre-image to graffitiPreImageMap + // graffitiPreImageMap[1] = new Object() + // graffitiPreImageMap[1][attestation.attesterId.toString()] = graffitiPreImage + // console.log(`Attester attest to epk ${secondUserEpochKey} with ${attestation.toJSON()}`) + // const tx = await unirepContractCalledByFirstAttester.submitAttestation( + // attestation, + // secondUserEpochKey, + // { value: attestingFee } + // ) + // const receipt = await tx.wait() + // expect(receipt.status, 'Submit attestation failed').to.equal(1) + + // secondEpochEpochKeys.push(secondUserEpochKey.toString()) + // unirepState.addAttestation(secondUserEpochKey.toString(), attestation) + // }) + + // it('Second attester attest to second user', async () => { + // const nonce = 0 + // const secondUserEpochKey = genEpochKey(users[1].id.identityNullifier, currentEpoch.toNumber(), nonce, circuitEpochTreeDepth) + // const graffitiPreImage = genRandomSalt() + // const attestation: Attestation = new Attestation( + // attesters[1].id, + // BigInt(0), + // BigInt(3), + // hashOne(graffitiPreImage), + // true, + // ) + // // Add graffiti pre-image to graffitiPreImageMap + // graffitiPreImageMap[0][attestation.attesterId.toString()] = graffitiPreImage + // console.log(`Attester attest to epk ${secondUserEpochKey} with ${attestation.toJSON()}`) + // const tx = await unirepContractCalledBySecondAttester.submitAttestation( + // attestation, + // secondUserEpochKey, + // { value: attestingFee } + // ) + // const receipt = await tx.wait() + // expect(receipt.status, 'Submit attestation failed').to.equal(1) + + // unirepState.addAttestation(secondUserEpochKey.toString(), attestation) + // }) + it('Attestations gathered from events should match', async () => { // First filter by epoch const attestationsByEpochFilter = unirepContract.filters.AttestationSubmitted(currentEpoch) const attestationsByEpochEvent = await unirepContract.queryFilter(attestationsByEpochFilter) - expect(attestationsByEpochEvent.length, 'Number of attestations submitted should be 4').to.equal(4) + expect(attestationsByEpochEvent.length, 'Number of attestations submitted should be 3').to.equal(3) // Second filter by attester for (let attester of attesters) { let attestationsByAttesterFilter = unirepContract.filters.AttestationSubmitted(null, null, attester['addr']) let attestationsByAttesterEvent = await unirepContract.queryFilter(attestationsByAttesterFilter) if (attester.id == 1) { - expect(attestationsByAttesterEvent.length, 'Number of attestations from first attester should be 2').to.equal(2) + expect(attestationsByAttesterEvent.length, 'Number of attestations from first attester should be 1').to.equal(1) } else if (attester.id == 2) { expect(attestationsByAttesterEvent.length, 'Number of attestations from second attester should be 2').to.equal(2) } else { @@ -465,9 +633,25 @@ describe('Integration', function () { it('Global state tree built from events should match', async () => { const newLeafFilter = unirepContract.filters.NewGSTLeafInserted(currentEpoch) const newLeafEvents = await unirepContract.queryFilter(newLeafFilter) - const newLeaves: any[] = newLeafEvents.map((event: any) => event['args']['_hashedLeaf']) + + const stateTransitionByEpochFilter = unirepContract.filters.UserStateTransitioned(currentEpoch) + const stateTransitionByEpochEvents = await unirepContract.queryFilter(stateTransitionByEpochFilter) + + let newLeaves = new Array(newLeafEvents.length + stateTransitionByEpochEvents.length) + + for(const event of newLeafEvents){ + const leafIndex = event?.args?._leafIndex + newLeaves[leafIndex] = event?.args?._hashedLeaf + } + + for(const event of stateTransitionByEpochEvents){ + const leafIndex = event?.args?._leafIndex + newLeaves[leafIndex] = event?.args?.userTransitionedData?.newGlobalStateTreeLeaf + } + let observedGST = new IncrementalQuinTree(circuitGlobalStateTreeDepth, blankGSLeaf, 2) for(let leaf of newLeaves) { + console.log("event",BigInt(leaf)) // Only insert non-zero leaf if (leaf.gt(0)) observedGST.insert(leaf) } @@ -582,28 +766,28 @@ describe('Integration', function () { const stateTransitionByEpochEvent = await unirepContract.queryFilter(stateTransitionByEpochFilter) expect(stateTransitionByEpochEvent.length, 'Number of state transition events current epoch should be 1').to.equal(1) - const newGSTLeafByEpochFilter = unirepContract.filters.NewGSTLeafInserted(currentEpoch) - const newGSTLeafByEpochEvent = await unirepContract.queryFilter(newGSTLeafByEpochFilter) - expect(newGSTLeafByEpochEvent.length, 'Number of new GST leaves should be 1').to.equal(1) + // const newGSTLeafByEpochFilter = unirepContract.filters.NewGSTLeafInserted(currentEpoch) + // const newGSTLeafByEpochEvent = await unirepContract.queryFilter(newGSTLeafByEpochFilter) + // expect(newGSTLeafByEpochEvent.length, 'Number of new GST leaves should be 1').to.equal(1) const stateTransitionArgs: any = stateTransitionByEpochEvent[0]['args'] - const newGSTLeafArgs: any = newGSTLeafByEpochEvent[0]['args'] + const newGSTLeaf: any = stateTransitionArgs['userTransitionedData']['newGlobalStateTreeLeaf'] // Verify on-chain const isProofValid = await unirepContract.verifyUserStateTransition( - newGSTLeafArgs['_hashedLeaf'], - stateTransitionArgs['_attestationNullifiers'], - stateTransitionArgs['_epkNullifiers'], - stateTransitionArgs['_fromEpoch'], - stateTransitionArgs['_fromGlobalStateTree'], - stateTransitionArgs['_fromEpochTree'], - stateTransitionArgs['_fromNullifierTreeRoot'], - stateTransitionArgs['_proof'], + stateTransitionArgs['userTransitionedData']['newGlobalStateTreeLeaf'], + stateTransitionArgs['userTransitionedData']['attestationNullifiers'], + stateTransitionArgs['userTransitionedData']['epkNullifiers'], + stateTransitionArgs['userTransitionedData']['fromEpoch'], + stateTransitionArgs['userTransitionedData']['fromGlobalStateTree'], + stateTransitionArgs['userTransitionedData']['fromEpochTree'], + // stateTransitionArgs['userTransitionedData']['_fromNullifierTreeRoot'], + stateTransitionArgs['userTransitionedData']['proof'], ) expect(isProofValid, 'Verify user state transition on-chain failed').to.be.true - const attestationNullifiers = stateTransitionArgs['_attestationNullifiers'].map((n) => BigInt(n)) - const epkNullifiers = stateTransitionArgs['_epkNullifiers'].map((n) => BigInt(n)) + const attestationNullifiers = stateTransitionArgs['userTransitionedData']['attestationNullifiers'].map((n) => BigInt(n)) + const epkNullifiers = stateTransitionArgs['userTransitionedData']['epkNullifiers'].map((n) => BigInt(n)) // Combine nullifiers and mod them const allNullifiers = attestationNullifiers.concat(epkNullifiers).map((nullifier) => BigInt(nullifier) % BigInt(2 ** circuitNullifierTreeDepth)) @@ -612,31 +796,31 @@ describe('Integration', function () { console.log(`First user finish state transition. AttesterIds in UST: [${latestUserStateLeaves.map((l) => l.attesterId.toString())}]`) expect(users[0].latestTransitionedEpoch, 'First user should transition to current epoch').to.equal(currentEpoch.toNumber()) - unirepState.userStateTransition(currentEpoch.toNumber(), BigInt(newGSTLeafArgs['_hashedLeaf']), allNullifiers) + unirepState.userStateTransition(currentEpoch.toNumber(), BigInt(newGSTLeaf), allNullifiers) console.log('User state transition off-chain: ') - console.log(`newGSTLeaf ${BigInt(newGSTLeafArgs['_hashedLeaf'])}, attestation attestationNullifiers [${attestationNullifiers}] and epk nullifier ${epkNullifiers}`) + console.log(`newGSTLeaf ${BigInt(newGSTLeaf)}, attestation attestationNullifiers [${attestationNullifiers}] and epk nullifier ${epkNullifiers}`) console.log('----------------------User State----------------------') console.log(users[0].toJSON(4)) console.log('------------------------------------------------------') }) it('First user prove his reputation', async () => { - const attesterId = attesters[0].id // Prove reputation received from first attester + const attesterId = attesters[1].id // Prove reputation received from first attester const provePosRep = BigInt(1) const proveNegRep = BigInt(1) const proveRepDiff = BigInt(1) const proveGraffiti = BigInt(1) const minPosRep = BigInt(1) const maxNegRep = BigInt(10) - const minRepDiff = BigInt(1) + const minRepDiff = BigInt(0) const graffitiPreImage = graffitiPreImageMap[0][attesterId.toString()] console.log(`Proving reputation from attester ${attesterId} with minPosRep ${minPosRep}, maxNegRep ${maxNegRep} and graffitiPreimage ${graffitiPreImage}`) - const circuitInputs = await users[0].genProveReputationCircuitInputs(attesterId, provePosRep, proveNegRep, proveRepDiff, proveGraffiti, minPosRep, maxNegRep, minRepDiff, graffitiPreImage) + const circuitInputs = await users[0].genProveReputationFromAttesterCircuitInputs(attesterId, provePosRep, proveNegRep, proveRepDiff, proveGraffiti, minPosRep, maxNegRep, minRepDiff, graffitiPreImage) const startTime = new Date().getTime() - const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + const results = await genVerifyReputationFromAttesterProofAndPublicSignals(stringifyBigInts(circuitInputs)) const endTime = new Date().getTime() console.log(`Gen Proof time: ${endTime - startTime} ms (${Math.floor((endTime - startTime) / 1000)} s)`) - const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) + const isValid = await verifyProveReputationFromAttesterProof(results['proof'], results['publicSignals']) expect(isValid, 'Verify reputation proof off-chain failed').to.be.true // Verify on-chain @@ -657,7 +841,7 @@ describe('Integration', function () { maxNegRep, graffitiPreImage ] - const isProofValid = await unirepContract.verifyReputation( + const isProofValid = await unirepContract.verifyReputationFromAttester( publicInput, formatProofForVerifierContract(results['proof']), ) diff --git a/test/utils.ts b/test/utils.ts index d93b59d..e54d9dd 100644 --- a/test/utils.ts +++ b/test/utils.ts @@ -83,19 +83,17 @@ const deployUnirep = async ( console.log('Deploying Unirep') - let _maxUsers, _numEpochKeyNoncePerEpoch, _numAttestationsPerEpochKey, _defaultKarma, _epochLength, _attestingFee + let _maxUsers, _numEpochKeyNoncePerEpoch, _numAttestationsPerEpochKey, _epochLength, _attestingFee if (_settings) { _maxUsers = _settings.maxUsers _numEpochKeyNoncePerEpoch = _settings.numEpochKeyNoncePerEpoch _numAttestationsPerEpochKey = _settings.numAttestationsPerEpochKey - _defaultKarma = _settings.defaultKarma _epochLength = _settings.epochLength _attestingFee = _settings.attestingFee } else { _maxUsers = maxUsers _numEpochKeyNoncePerEpoch = numEpochKeyNoncePerEpoch _numAttestationsPerEpochKey = numAttestationsPerEpochKey - _defaultKarma = DEFAULT_AIRDROPPED_KARMA _epochLength = epochLength _attestingFee = attestingFee } @@ -120,7 +118,6 @@ const deployUnirep = async ( ReputationFromAttesterVerifierContract.address, _numEpochKeyNoncePerEpoch, _numAttestationsPerEpochKey, - _defaultKarma, _epochLength, _attestingFee, { From 1cf06521f5493c5568ecdbcd2966373de6107b5f Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Thu, 29 Apr 2021 16:34:18 +0800 Subject: [PATCH 18/38] add db flag, remove unused schema --- cli/leaveComment.ts | 28 +++++---- cli/publishPost.ts | 21 ++++--- cli/test/testAllCommands.ts | 119 ++++++++++++++++++------------------ database/utils.ts | 1 - package.json | 2 +- test/contracts/SignUp.ts | 5 +- 6 files changed, 91 insertions(+), 85 deletions(-) diff --git a/cli/leaveComment.ts b/cli/leaveComment.ts index bd163ee..9c9f263 100644 --- a/cli/leaveComment.ts +++ b/cli/leaveComment.ts @@ -215,7 +215,7 @@ const leaveComment = async (args: any) => { let circuitInputs: any - if(args.from_database){ + if (args.from_database){ console.log('generating proving circuit from database...') @@ -296,18 +296,20 @@ const leaveComment = async (args: any) => { nullifiers, { value: attestingFee, gasLimit: 1000000 } ) - const db = await mongoose.connect( - dbUri, - { useNewUrlParser: true, - useFindAndModify: false, - useUnifiedTopology: true - } - ) - const commentRes = await Post.findByIdAndUpdate( - {_id: mongoose.Types.ObjectId(args.post_id) }, - { $push: {comments: newComment }} - ) - db.disconnect(); + if(args.from_database){ + const db = await mongoose.connect( + dbUri, + { useNewUrlParser: true, + useFindAndModify: false, + useUnifiedTopology: true + } + ) + const commentRes = await Post.findByIdAndUpdate( + {_id: mongoose.Types.ObjectId(args.post_id) }, + { $push: {comments: newComment }} + ) + db.disconnect(); + } } catch(e) { console.error('Error: the transaction failed') if (e.message) { diff --git a/cli/publishPost.ts b/cli/publishPost.ts index b03c6f5..6528b9c 100644 --- a/cli/publishPost.ts +++ b/cli/publishPost.ts @@ -300,16 +300,17 @@ const publishPost = async (args: any) => { nullifiers, { value: attestingFee, gasLimit: 1000000 } ) - const db = await mongoose.connect( - dbUri, - { useNewUrlParser: true, - useFindAndModify: false, - useUnifiedTopology: true - } - ) - const res: IPost = await newpost.save() - db.disconnect(); - + if (args.from_database){ + const db = await mongoose.connect( + dbUri, + { useNewUrlParser: true, + useFindAndModify: false, + useUnifiedTopology: true + } + ) + const res: IPost = await newpost.save() + db.disconnect(); + } } catch(e) { console.error('Error: the transaction failed') if (e.message) { diff --git a/cli/test/testAllCommands.ts b/cli/test/testAllCommands.ts index 34b2c0c..afd69e7 100644 --- a/cli/test/testAllCommands.ts +++ b/cli/test/testAllCommands.ts @@ -37,7 +37,8 @@ describe('test all CLI subcommands', function() { const epochLength = 5 let unirepContract: ethers.Contract let unirepState: UnirepState - const dbOption = ` -db` + const dbOption = `` + // const dbOption = ` -db` let userIdentity1, userIdentityCommitment1, userIdentity2, userIdentityCommitment2 const attesterId = 1 @@ -401,77 +402,77 @@ describe('test all CLI subcommands', function() { }) }) - // describe('leaveComment CLI subcommand', () => { - // it('should leave a comment', async () => { - // const command = `npx ts-node cli/index.ts leaveComment` + - // ` -x ${unirepContract.address} ` + - // ` -pid ${postID} ` + - // ` -tx ${text2}` + - // ` -d ${userPrivKey}` + - // ` -id ${userIdentity2}` + - // ` -n ${epochKeyNonce}` + - // ` -kn ${commentNonce}` + - // ` -mr ${minRepDiff}` + - // dbOption + describe('leaveComment CLI subcommand', () => { + it('should leave a comment', async () => { + const command = `npx ts-node cli/index.ts leaveComment` + + ` -x ${unirepContract.address} ` + + ` -pid ${postID} ` + + ` -tx ${text2}` + + ` -d ${userPrivKey}` + + ` -id ${userIdentity2}` + + ` -n ${epochKeyNonce}` + + ` -kn ${commentNonce}` + + ` -mr ${minRepDiff}` + + dbOption - // const output = exec(command).stdout.trim() + const output = exec(command).stdout.trim() - // console.log(command) - // console.log(output) + console.log(command) + console.log(output) - // const commentRegMatch = output.match(/Transaction hash: 0x[a-fA-F0-9]{64}/) - // expect(commentRegMatch).not.equal(null) - // }) - // }) + const commentRegMatch = output.match(/Transaction hash: 0x[a-fA-F0-9]{64}/) + expect(commentRegMatch).not.equal(null) + }) + }) - // describe('epochTransition CLI subcommand', () => { - // it('should transition to next epoch', async () => { - // const command = `npx ts-node cli/index.ts epochTransition` + - // ` -x ${unirepContract.address} ` + - // ` -d ${deployerPrivKey} ` + - // ` -t ` + describe('epochTransition CLI subcommand', () => { + it('should transition to next epoch', async () => { + const command = `npx ts-node cli/index.ts epochTransition` + + ` -x ${unirepContract.address} ` + + ` -d ${deployerPrivKey} ` + + ` -t ` - // const output = exec(command).stdout.trim() + const output = exec(command).stdout.trim() - // console.log(command) - // console.log(output) + console.log(command) + console.log(output) - // const epochEndRegMatch = output.match(/End of epoch: 2/) - // expect(epochEndRegMatch).not.equal(null) - // }) - // }) + const epochEndRegMatch = output.match(/End of epoch: 2/) + expect(epochEndRegMatch).not.equal(null) + }) + }) - // describe('userStateTransition CLI subcommand', () => { - // it('should transition user 1 state', async () => { - // const command = `npx ts-node cli/index.ts userStateTransition` + - // ` -x ${unirepContract.address} ` + - // ` -d ${userPrivKey} ` + - // ` -id ${userIdentity1} ` + - // dbOption + describe('userStateTransition CLI subcommand', () => { + it('should transition user 1 state', async () => { + const command = `npx ts-node cli/index.ts userStateTransition` + + ` -x ${unirepContract.address} ` + + ` -d ${userPrivKey} ` + + ` -id ${userIdentity1} ` + + dbOption - // const output = exec(command).stdout.trim() + const output = exec(command).stdout.trim() - // console.log(command) - // console.log(output) + console.log(command) + console.log(output) - // const userTransitionRegMatch = output.match(/User transitioned from epoch 2 to epoch 3/) - // expect(userTransitionRegMatch).not.equal(null) - // }) + const userTransitionRegMatch = output.match(/User transitioned from epoch 2 to epoch 3/) + expect(userTransitionRegMatch).not.equal(null) + }) - // it('should transition user 2 state', async () => { - // const command = `npx ts-node cli/index.ts userStateTransition` + - // ` -x ${unirepContract.address} ` + - // ` -d ${userPrivKey} ` + - // ` -id ${userIdentity2} ` + - // dbOption + it('should transition user 2 state', async () => { + const command = `npx ts-node cli/index.ts userStateTransition` + + ` -x ${unirepContract.address} ` + + ` -d ${userPrivKey} ` + + ` -id ${userIdentity2} ` + + dbOption - // const output = exec(command).stdout.trim() + const output = exec(command).stdout.trim() - // console.log(command) - // console.log(output) + console.log(command) + console.log(output) - // const userTransitionRegMatch = output.match(/User transitioned from epoch 2 to epoch 3/) - // expect(userTransitionRegMatch).not.equal(null) - // }) - // }) + const userTransitionRegMatch = output.match(/User transitioned from epoch 2 to epoch 3/) + expect(userTransitionRegMatch).not.equal(null) + }) + }) }) \ No newline at end of file diff --git a/database/utils.ts b/database/utils.ts index f68be11..94916a7 100644 --- a/database/utils.ts +++ b/database/utils.ts @@ -22,7 +22,6 @@ import { computeEmptyUserStateRoot, defaultUserStateLeaf, genAttestationNullifie import { assert } from 'console' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" -import GSTLeaf from './models/treeLeaves' import { add0x, SparseMerkleTreeImpl } from '../crypto/SMT' import { settings } from 'cluster' import { DEFAULT_AIRDROPPED_KARMA, MAX_KARMA_BUDGET } from '../config/socialMedia' diff --git a/package.json b/package.json index a9a81fd..833fb30 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "buildUserStateTransitionSnark": "./scripts/buildUserStateTransitionSnark.sh", "buildProveReputationSnark": "./scripts/buildProveReputationSnark.sh", "buildProveReputationFromAttesterSnark": "./scripts/buildProveReputationFromAttesterSnark.sh", - "test-cli": "./scripts/testCLI.sh", + "test-cli": "npx hardhat compile && ./scripts/testCLI.sh", "test": "npx hardhat compile && npx ts-node scripts/buildPoseidon.ts && npm run contractUintTests && npm run circuitUintTests && npm run integrationTest", "contractUintTests": "NODE_OPTIONS=--max-old-space-size=4096 npx hardhat test --no-compile $(find test/contracts -name '*.ts')", "circuitUintTests": "NODE_OPTIONS=--max-old-space-size=4096 npx hardhat test --no-compile $(find test/circuits -name '*.ts')", diff --git a/test/contracts/SignUp.ts b/test/contracts/SignUp.ts index 4306d57..819f416 100644 --- a/test/contracts/SignUp.ts +++ b/test/contracts/SignUp.ts @@ -9,6 +9,7 @@ import { deployUnirep, genNewUserStateTree, getTreeDepthsForTesting } from '../u const { expect } = chai import Unirep from "../../artifacts/contracts/Unirep.sol/Unirep.json" +import { DEFAULT_AIRDROPPED_KARMA } from '../../config/socialMedia' describe('Signup', () => { @@ -74,7 +75,9 @@ describe('Signup', () => { const hashedStateLeaf = await unirepContract.hashStateLeaf( [ commitment, - emptyUserStateRoot + emptyUserStateRoot, + BigInt(DEFAULT_AIRDROPPED_KARMA), + BigInt(0) ] ) GSTree.insert(hashedStateLeaf) From 5bcddbcc5cd5cd7bfba5d47922b473331dcafe97 Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Fri, 30 Apr 2021 20:44:19 +0800 Subject: [PATCH 19/38] verifyReputationProof, add Mux1 circuit --- circuits/proveReputation.circom | 37 +++- circuits/proveReputationFromAttester.circom | 37 +++- cli/genEpochKeyAndProof.ts | 152 -------------- ...f.ts => genReputationProofFromAttester.ts} | 10 +- cli/index.ts | 52 ++--- cli/leaveComment.ts | 16 +- cli/prefix.ts | 4 +- cli/publishPost.ts | 23 +-- cli/test/testAllCommands.ts | 100 +++++---- cli/verifyEpochKeyProof.ts | 123 ------------ cli/verifyReputationProof.ts | 116 ++++++----- cli/verifyReputationProofFromAttester.ts | 189 ++++++++++++++++++ cli/vote.ts | 19 +- contracts/Unirep.sol | 3 +- core/UserState.ts | 6 + database/utils.ts | 29 ++- 16 files changed, 460 insertions(+), 456 deletions(-) delete mode 100644 cli/genEpochKeyAndProof.ts rename cli/{genReputationProof.ts => genReputationProofFromAttester.ts} (95%) delete mode 100644 cli/verifyEpochKeyProof.ts create mode 100644 cli/verifyReputationProofFromAttester.ts diff --git a/circuits/proveReputation.circom b/circuits/proveReputation.circom index fdf4dc3..0e32c69 100644 --- a/circuits/proveReputation.circom +++ b/circuits/proveReputation.circom @@ -1,4 +1,5 @@ include "../node_modules/circomlib/circuits/comparators.circom"; +include "../node_modules/circomlib/circuits/mux1.circom"; include "./hasherPoseidon.circom"; include "./identityCommitment.circom"; include "./incrementalMerkleTree.circom"; @@ -7,10 +8,6 @@ include "./sparseMerkleTree.circom"; include "./userExists.circom"; include "./verifiyEpochKey.circom"; -function Not(in) { - return 1 + in - (2 * in); -} - template ProveReputation( GST_tree_depth, user_state_tree_depth, @@ -43,6 +40,7 @@ template ProveReputation( signal private input positive_karma; signal private input negative_karma; // Karma nullifier + signal private input selectors[MAX_KARMA_BUDGET]; signal input prove_karma_nullifiers; signal input prove_karma_amount; signal private input karma_nonce[MAX_KARMA_BUDGET]; @@ -135,6 +133,17 @@ template ProveReputation( /* 6. Check nullifiers are valid */ + signal default_nullifier_zero; + component default_nullifier_zero_hasher = Hasher5(); + default_nullifier_zero_hasher.in[0] <== 0; + default_nullifier_zero_hasher.in[1] <== 0; + default_nullifier_zero_hasher.in[2] <== 0; + default_nullifier_zero_hasher.in[3] <== 0; + default_nullifier_zero_hasher.in[4] <== 0; + default_nullifier_zero <== default_nullifier_zero_hasher.hash; + + component if_check_nullifiers[MAX_KARMA_BUDGET]; + component if_output_nullifiers[MAX_KARMA_BUDGET]; component karma_nullifier_hasher[MAX_KARMA_BUDGET]; component nonce_gt[MAX_KARMA_BUDGET]; for(var i = 0; i< MAX_KARMA_BUDGET; i++) { @@ -144,24 +153,36 @@ template ProveReputation( nonce_gt[i] = GreaterThan(MAX_REPUTATION_SCORE_BITS); nonce_gt[i].in[0] <== positive_karma - negative_karma; nonce_gt[i].in[1] <== karma_nonce[i]; - nonce_gt[i].out * prove_karma_nullifiers + Not(prove_karma_nullifiers) === 1; - + if_check_nullifiers[i] = Mux1(); + if_check_nullifiers[i].c[0] <== 1; + if_check_nullifiers[i].c[1] <== nonce_gt[i].out; + if_check_nullifiers[i].s <== prove_karma_nullifiers; + if_check_nullifiers[i].out === 1; + // 6.2 Use karma_nonce to compute all karma nullifiers + if_output_nullifiers[i] = Mux1(); karma_nullifier_hasher[i] = Hasher5(); karma_nullifier_hasher[i].in[0] <== 3; // 3 is the domain separator for karma nullifier karma_nullifier_hasher[i].in[1] <== identity_nullifier; karma_nullifier_hasher[i].in[2] <== epoch; karma_nullifier_hasher[i].in[3] <== karma_nonce[i]; karma_nullifier_hasher[i].in[4] <== 0; - karma_nullifiers[i] <== karma_nullifier_hasher[i].hash; + if_output_nullifiers[i].c[0] <== default_nullifier_zero; + if_output_nullifiers[i].c[1] <== karma_nullifier_hasher[i].hash; + if_output_nullifiers[i].s <== selectors[i]; + karma_nullifiers[i] <== if_output_nullifiers[i].out; } /* End of check 6 */ /* 7. Check if user has reputation greater than min_rep */ + component if_check_min_rep = Mux1(); component rep_get = GreaterEqThan(MAX_REPUTATION_SCORE_BITS); rep_get.in[0] <== positive_karma - negative_karma; rep_get.in[1] <== min_rep; - rep_get.out * prove_min_rep + Not(prove_min_rep) === 1; + if_check_min_rep.c[0] <== 1; + if_check_min_rep.c[1] <== rep_get.out; + if_check_min_rep.s <== prove_min_rep; + if_check_min_rep.out === 1; /* End of check 7 */ } \ No newline at end of file diff --git a/circuits/proveReputationFromAttester.circom b/circuits/proveReputationFromAttester.circom index 03031ba..029dab2 100644 --- a/circuits/proveReputationFromAttester.circom +++ b/circuits/proveReputationFromAttester.circom @@ -1,4 +1,5 @@ include "../node_modules/circomlib/circuits/comparators.circom"; +include "../node_modules/circomlib/circuits/mux1.circom"; include "./hasherPoseidon.circom"; include "./identityCommitment.circom"; include "./incrementalMerkleTree.circom"; @@ -6,10 +7,6 @@ include "./modulo.circom"; include "./sparseMerkleTree.circom"; include "./userExists.circom"; -function Not(in) { - return 1 + in - (2 * in); -} - template proveReputationFromAttester(GST_tree_depth, user_state_tree_depth, nullifier_tree_depth, EPOCH_KEY_NONCE_PER_EPOCH, MAX_REPUTATION_SCORE_BITS) { signal input epoch; signal private input nonce; @@ -135,37 +132,55 @@ template proveReputationFromAttester(GST_tree_depth, user_state_tree_depth, null /* 5. Check conditions on reputations */ // if prove_pos_rep == TRUE then check GT // else return TRUE + component if_check_pos_rep = Mux1(); component pos_rep_gt = GreaterThan(MAX_REPUTATION_SCORE_BITS); pos_rep_gt.in[0] <== pos_rep; pos_rep_gt.in[1] <== min_pos_rep; - pos_rep_gt.out * prove_pos_rep + Not(prove_pos_rep) === 1; + if_check_pos_rep.c[0] <== 1; + if_check_pos_rep.c[1] <== pos_rep_gt.out; + if_check_pos_rep.s <== prove_pos_rep; + if_check_pos_rep.out === 1; - + component if_check_neg_rep = Mux1(); component neg_rep_lt = LessThan(MAX_REPUTATION_SCORE_BITS); neg_rep_lt.in[0] <== neg_rep; neg_rep_lt.in[1] <== max_neg_rep; - neg_rep_lt.out * prove_neg_rep + Not(prove_neg_rep) === 1; + if_check_neg_rep.c[0] <== 1; + if_check_neg_rep.c[1] <== neg_rep_lt.out; + if_check_neg_rep.s <== prove_neg_rep; + if_check_neg_rep.out === 1; // only valid if pos_rep >= neg_rep + component if_check_pos_get = Mux1(); + component if_check_diff_gt = Mux1(); component rep_diff_get = GreaterEqThan(MAX_REPUTATION_SCORE_BITS); rep_diff_get.in[0] <== pos_rep; rep_diff_get.in[1] <== neg_rep; + if_check_pos_get.c[0] <== 1; + if_check_pos_get.c[1] <== rep_diff_get.out; + if_check_pos_get.s <== prove_rep_diff; + if_check_pos_get.out === 1; // // check if (pos_rep - neg_rep) > min_rep_diff component rep_diff_gt = GreaterThan(MAX_REPUTATION_SCORE_BITS); rep_diff_gt.in[0] <== pos_rep - neg_rep; rep_diff_gt.in[1] <== min_rep_diff; - rep_diff_get.out * prove_rep_diff + Not(prove_rep_diff) === 1; - rep_diff_gt.out * prove_rep_diff + Not(prove_rep_diff) === 1; + if_check_diff_gt.c[0] <== 1; + if_check_diff_gt.c[1] <== rep_diff_gt.out; + if_check_diff_gt.s <== prove_rep_diff; + if_check_diff_gt.out === 1; /* End of check 5 */ /* 6. Check pre-image of graffiti */ + component if_check_graffiti = Mux1(); component graffiti_hasher = HashLeftRight(); graffiti_hasher.left <== graffiti_pre_image; graffiti_hasher.right <== 0; component graffiti_eq = IsEqual(); graffiti_eq.in[0] <== graffiti_hasher.hash; graffiti_eq.in[1] <== graffiti; - graffiti_eq.out * prove_graffiti + Not(prove_graffiti) === 1; - + if_check_graffiti.c[0] <== 1; + if_check_graffiti.c[1] <== graffiti_eq.out; + if_check_graffiti.s <== prove_graffiti; + if_check_graffiti.out === 1; /* End of check 6 */ } \ No newline at end of file diff --git a/cli/genEpochKeyAndProof.ts b/cli/genEpochKeyAndProof.ts deleted file mode 100644 index 4f24031..0000000 --- a/cli/genEpochKeyAndProof.ts +++ /dev/null @@ -1,152 +0,0 @@ -import base64url from 'base64url' -import { ethers as hardhatEthers } from 'hardhat' -import { ethers } from 'ethers' -import { genIdentityCommitment, unSerialiseIdentity } from 'libsemaphore' -import { stringifyBigInts } from 'maci-crypto' - -import { - validateEthAddress, - contractExists, -} from './utils' - -import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' - -import { genEpochKey } from '../test/utils' -import { genUserStateFromContract } from '../core' -import { formatProofForVerifierContract, genVerifyEpochKeyProofAndPublicSignals, verifyEPKProof } from '../test/circuits/utils' - -import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" -import { epkProofPrefix, identityPrefix } from './prefix' - -const configureSubparser = (subparsers: any) => { - const parser = subparsers.addParser( - 'genEpochKeyAndProof', - { addHelp: true }, - ) - - parser.addArgument( - ['-e', '--eth-provider'], - { - action: 'store', - type: 'string', - help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, - } - ) - - parser.addArgument( - ['-id', '--identity'], - { - required: true, - type: 'string', - help: 'The (serialized) user\'s identity', - } - ) - - parser.addArgument( - ['-n', '--epoch-key-nonce'], - { - required: true, - type: 'int', - help: 'The epoch key nonce', - } - ) - - parser.addArgument( - ['-b', '--start-block'], - { - action: 'store', - type: 'int', - help: 'The block the Unirep contract is deployed. Default: 0', - } - ) - - parser.addArgument( - ['-x', '--contract'], - { - required: true, - type: 'string', - help: 'The Unirep contract address', - } - ) -} - -const genEpochKeyAndProof = async (args: any) => { - - // Unirep contract - if (!validateEthAddress(args.contract)) { - console.error('Error: invalid Unirep contract address') - return - } - - const unirepAddress = args.contract - - // Ethereum provider - const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER - - const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) - - if (! await contractExists(provider, unirepAddress)) { - console.error('Error: there is no contract deployed at the specified address') - return - } - - const unirepContract = new ethers.Contract( - unirepAddress, - Unirep.abi, - provider, - ) - const startBlock = (args.start_block) ? args.start_block : DEFAULT_START_BLOCK - - // Validate epoch key nonce - const epkNonce = args.epoch_key_nonce - const numEpochKeyNoncePerEpoch = await unirepContract.numEpochKeyNoncePerEpoch() - if (epkNonce >= numEpochKeyNoncePerEpoch) { - console.error('Error: epoch key nonce must be less than max epoch key nonce') - return - } - - // Gen epoch key - const encodedIdentity = args.identity.slice(identityPrefix.length) - const decodedIdentity = base64url.decode(encodedIdentity) - const id = unSerialiseIdentity(decodedIdentity) - const commitment = genIdentityCommitment(id) - const currentEpoch = (await unirepContract.currentEpoch()).toNumber() - const treeDepths = await unirepContract.treeDepths() - const epochTreeDepth = treeDepths.epochTreeDepth - const epk = genEpochKey(id.identityNullifier, currentEpoch, epkNonce, epochTreeDepth).toString(16) - - // Gen epoch key proof - const userState = await genUserStateFromContract( - provider, - unirepAddress, - startBlock, - id, - commitment, - ) - const circuitInputs = await userState.genVerifyEpochKeyCircuitInputs(epkNonce) - console.log('Proving epoch key...') - console.log('----------------------User State----------------------') - console.log(userState.toJSON(4)) - console.log('------------------------------------------------------') - console.log('----------------------Circuit inputs----------------------') - console.log(circuitInputs) - console.log('----------------------------------------------------------') - const results = await genVerifyEpochKeyProofAndPublicSignals(stringifyBigInts(circuitInputs)) - - // TODO: Not sure if this validation is necessary - const isValid = await verifyEPKProof(results['proof'], results['publicSignals']) - if(!isValid) { - console.error('Error: epoch key proof generated is not valid!') - return - } - - const formattedProof = formatProofForVerifierContract(results["proof"]) - const encodedProof = base64url.encode(JSON.stringify(formattedProof)) - console.log(`Epoch key of epoch ${currentEpoch} and nonce ${epkNonce}: ${epk}`) - console.log(epkProofPrefix + encodedProof) -} - -export { - genEpochKeyAndProof, - configureSubparser, -} \ No newline at end of file diff --git a/cli/genReputationProof.ts b/cli/genReputationProofFromAttester.ts similarity index 95% rename from cli/genReputationProof.ts rename to cli/genReputationProofFromAttester.ts index da9c18f..0ce327b 100644 --- a/cli/genReputationProof.ts +++ b/cli/genReputationProofFromAttester.ts @@ -13,12 +13,12 @@ import { genUserStateFromContract } from '../core' import { formatProofForVerifierContract, genVerifyReputationFromAttesterProofAndPublicSignals, verifyProveReputationFromAttesterProof } from '../test/circuits/utils' import { stringifyBigInts } from 'maci-crypto' import { add0x } from '../crypto/SMT' -import { identityPrefix, reputationProofPrefix } from './prefix' +import { identityPrefix, reputationProofFromAttesterPrefix } from './prefix' import { genProveReputationFromAttesterCircuitInputsFromDB } from '../database/utils' const configureSubparser = (subparsers: any) => { const parser = subparsers.addParser( - 'genReputationProof', + 'genReputationProofFromAttester', { addHelp: true }, ) @@ -108,7 +108,7 @@ const configureSubparser = (subparsers: any) => { ) } -const genReputationProof = async (args: any) => { +const genReputationProofFromAttester = async (args: any) => { // Warning is there is no reputation and graffiti to prove if (!args.min_pos_rep && !args.max_neg_rep && !args.graffiti_preimage) { @@ -196,10 +196,10 @@ const genReputationProof = async (args: any) => { const formattedProof = formatProofForVerifierContract(results["proof"]) const encodedProof = base64url.encode(JSON.stringify(formattedProof)) console.log(`Proof of reputation from attester ${attesterId}:`) - console.log(reputationProofPrefix + encodedProof) + console.log(reputationProofFromAttesterPrefix + encodedProof) } export { - genReputationProof, + genReputationProofFromAttester, configureSubparser, } \ No newline at end of file diff --git a/cli/index.ts b/cli/index.ts index 45cb533..2f72aa2 100644 --- a/cli/index.ts +++ b/cli/index.ts @@ -27,15 +27,15 @@ import { configureSubparser as configureSubparserForAttesterSignup, } from './attesterSignUp' -import { - genEpochKeyAndProof, - configureSubparser as configureSubparserForGenEpochKeyAndProof, -} from './genEpochKeyAndProof' +// import { +// genEpochKeyAndProof, +// configureSubparser as configureSubparserForGenEpochKeyAndProof, +// } from './genEpochKeyAndProof' import { - verifyEpochKeyProof, - configureSubparser as configureSubparserForVerifyEpochKeyProof, -} from './verifyEpochKeyProof' + verifyReputationProof, + configureSubparser as configureSubparserForVerifyReputationProof, +} from './verifyReputationProof' import { publishPost, @@ -73,14 +73,14 @@ import { } from './userStateTransition' import { - genReputationProof, - configureSubparser as configureSubparserForGenReputationProof, -} from './genReputationProof' + genReputationProofFromAttester, + configureSubparser as configureSubparserForGenReputationProofFromAttester, +} from './genReputationProofFromAttester' import { - verifyReputationProof, - configureSubparser as configureSubparserForVerifyReputationProof, -} from './verifyReputationProof' + verifyReputationProofFromAttester, + configureSubparser as configureSubparserForVerifyReputationProofFromAttester, +} from './verifyReputationProofFromAttester' const main = async () => { @@ -109,10 +109,10 @@ const main = async () => { configureSubparserForAttesterSignup(subparsers) // Subcommand: genEpochKeyAndProof - configureSubparserForGenEpochKeyAndProof(subparsers) + // configureSubparserForGenEpochKeyAndProof(subparsers) - // Subcommand: verifyEpochKeyProof - configureSubparserForVerifyEpochKeyProof(subparsers) + // Subcommand: verifyReputationProof + configureSubparserForVerifyReputationProof(subparsers) // Subcommand: publishPost configureSubparserForPublishPost(subparsers) @@ -136,10 +136,10 @@ const main = async () => { configureSubparserForGenUserStateTransitionProof(subparsers) // Subcommand: genReputationProof - configureSubparserForGenReputationProof(subparsers) + configureSubparserForGenReputationProofFromAttester(subparsers) // Subcommand: verifyReputationProof - configureSubparserForVerifyReputationProof(subparsers) + configureSubparserForVerifyReputationProofFromAttester(subparsers) const args = parser.parseArgs() @@ -154,10 +154,10 @@ const main = async () => { await userSignup(args) } else if (args.subcommand === 'attesterSignup') { await attesterSignup(args) - } else if (args.subcommand === 'genEpochKeyAndProof') { - await genEpochKeyAndProof(args) - } else if (args.subcommand === 'verifyEpochKeyProof') { - await verifyEpochKeyProof(args) + // } else if (args.subcommand === 'genEpochKeyAndProof') { + // await genEpochKeyAndProof(args) + } else if (args.subcommand === 'verifyReputationProof') { + await verifyReputationProof(args) } else if (args.subcommand === 'publishPost') { await publishPost(args) } else if (args.subcommand === 'listAllPosts') { @@ -172,10 +172,10 @@ const main = async () => { await epochTransition(args) } else if (args.subcommand === 'userStateTransition') { await userStateTransition(args) - } else if (args.subcommand === 'genReputationProof') { - await genReputationProof(args) - } else if (args.subcommand === 'verifyReputationProof') { - await verifyReputationProof(args) + } else if (args.subcommand === 'genReputationProofFromAttester') { + await genReputationProofFromAttester(args) + } else if (args.subcommand === 'verifyReputationProofFromAttester') { + await verifyReputationProofFromAttester(args) } } diff --git a/cli/leaveComment.ts b/cli/leaveComment.ts index 9c9f263..16162bd 100644 --- a/cli/leaveComment.ts +++ b/cli/leaveComment.ts @@ -19,11 +19,11 @@ import { add0x } from '../crypto/SMT' import { genUserStateFromContract } from '../core' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" -import { epkProofPrefix, identityPrefix } from './prefix' +import { reputationProofPrefix, identityPrefix } from './prefix' import Comment, { IComment } from "../database/models/comment"; import Post, { IPost } from "../database/models/post"; -import { DEFAULT_COMMENT_KARMA } from '../config/socialMedia' +import { DEFAULT_COMMENT_KARMA, MAX_KARMA_BUDGET } from '../config/socialMedia' import { formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyProveReputationProof } from '../test/circuits/utils' import { stringifyBigInts } from 'maci-crypto' import { nullifierTreeDepth } from '../config/testLocal' @@ -257,9 +257,9 @@ const leaveComment = async (args: any) => { const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) const nullifiers: BigInt[] = [] - for (let i = 0; i < DEFAULT_COMMENT_KARMA; i++) { + for (let i = 0; i < MAX_KARMA_BUDGET; i++) { const variableName = 'main.karma_nullifiers['+i+']' - nullifiers.push(getSignalByNameViaSym('proveReputation', results['witness'], variableName) % BigInt(2 ** nullifierTreeDepth) ) + nullifiers.push(getSignalByNameViaSym('proveReputation', results['witness'], variableName)) } // TODO: Not sure if this validation is necessary @@ -271,8 +271,14 @@ const leaveComment = async (args: any) => { const proof = formatProofForVerifierContract(results['proof']) const epochKey = BigInt(add0x(epk)) + const encodedProof = base64url.encode(JSON.stringify(proof)) + const publicSignals = results['publicSignals'] + if(proveMinRep){ + console.log(`Prove minimum reputation: ${minRep}`) + } + const newComment: IComment = new Comment({ content: args.text, // TODO: hashedContent @@ -321,6 +327,8 @@ const leaveComment = async (args: any) => { const receipt = await tx.wait() console.log('Transaction hash:', tx.hash) + console.log(`Epoch key of epoch ${currentEpoch} and nonce ${epkNonce}: ${epk}`) + console.log(reputationProofPrefix + encodedProof) } export { diff --git a/cli/prefix.ts b/cli/prefix.ts index 184e0b6..0842f21 100644 --- a/cli/prefix.ts +++ b/cli/prefix.ts @@ -2,6 +2,6 @@ export const identityPrefix = 'Unirep.identity.' export const identityCommitmentPrefix = 'Unirep.identityCommitment.' -export const epkProofPrefix = 'Unirep.epkProof.' +export const reputationProofPrefix = 'Unirep.reputationProof.' -export const reputationProofPrefix = 'Unirep.reputationProof.' \ No newline at end of file +export const reputationProofFromAttesterPrefix = 'Unirep.reputationProofFromAttester.' \ No newline at end of file diff --git a/cli/publishPost.ts b/cli/publishPost.ts index 6528b9c..4955f6d 100644 --- a/cli/publishPost.ts +++ b/cli/publishPost.ts @@ -20,10 +20,10 @@ import { add0x } from '../crypto/SMT' import { genUserStateFromContract } from '../core' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" -import { identityPrefix, identityCommitmentPrefix, epkProofPrefix } from './prefix' +import { identityPrefix, identityCommitmentPrefix, reputationProofPrefix } from './prefix' import Post, { IPost } from "../database/models/post"; -import { DEFAULT_POST_KARMA } from '../config/socialMedia' +import { DEFAULT_POST_KARMA, MAX_KARMA_BUDGET } from '../config/socialMedia' import { assert } from 'console' import { formatProofForVerifierContract, genVerifyEpochKeyProofAndPublicSignals, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyEPKProof, verifyProveReputationProof } from '../test/circuits/utils' import { genEpochKey, genKarmaNullifier } from '../test/utils' @@ -247,9 +247,9 @@ const publishPost = async (args: any) => { const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) const nullifiers: BigInt[] = [] - for (let i = 0; i < DEFAULT_POST_KARMA; i++) { + for (let i = 0; i < MAX_KARMA_BUDGET; i++) { const variableName = 'main.karma_nullifiers['+i+']' - nullifiers.push(getSignalByNameViaSym('proveReputation', results['witness'], variableName) % BigInt(2 ** nullifierTreeDepth) ) + nullifiers.push(getSignalByNameViaSym('proveReputation', results['witness'], variableName)) } // TODO: Not sure if this validation is necessary @@ -261,18 +261,9 @@ const publishPost = async (args: any) => { const proof = formatProofForVerifierContract(results['proof']) const epochKey = BigInt(add0x(epk)) - console.log(`Epoch key of epoch ${currentEpoch} and nonce ${epkNonce}: ${epk}`) - const publicSignals = results['publicSignals'] + const encodedProof = base64url.encode(JSON.stringify(proof)) - - const isProofValid = await unirepContract.verifyReputation( - publicSignals, - proof - ) - if (!isProofValid) { - console.error('Error: invalid reputation proof') - return - } + const publicSignals = results['publicSignals'] if(proveMinRep){ console.log(`Prove minimum reputation: ${minRep}`) @@ -321,6 +312,8 @@ const publishPost = async (args: any) => { console.log('Post ID:', newpost._id.toString()) console.log('Transaction hash:', tx.hash) + console.log(`Epoch key of epoch ${currentEpoch} and nonce ${epkNonce}: ${epk}`) + console.log(reputationProofPrefix + encodedProof) } export { diff --git a/cli/test/testAllCommands.ts b/cli/test/testAllCommands.ts index afd69e7..ecd1d9c 100644 --- a/cli/test/testAllCommands.ts +++ b/cli/test/testAllCommands.ts @@ -48,6 +48,7 @@ describe('test all CLI subcommands', function() { const posRep = 3, negRep = 8, graffitiPreimage = 0, graffiti = hashOne(BigInt(graffitiPreimage)) const minPosRep = 0, maxNegRep = 10, minRepDiff = 15 let userRepProof + let transactionHash before(async() => { deployerPrivKey = ethers.utils.solidityKeccak256(['uint'], [0]) @@ -206,42 +207,6 @@ describe('test all CLI subcommands', function() { }) }) - // describe('genEpochKeyAndProof CLI subcommand', () => { - // it('should generate epoch key proof', async () => { - // const command = `npx ts-node cli/index.ts genEpochKeyAndProof` + - // ` -x ${unirepContract.address} ` + - // ` -id ${userIdentity1} ` + - // ` -n ${epochKeyNonce} ` - - // const output = exec(command).stdout.trim() - - // console.log(command) - // console.log(output) - - // const epkRegMatch = output.match(/Epoch key of epoch 1 and nonce 0: ([a-fA-F0-9]+)/) - // epk = epkRegMatch[1] - // const epkProofRegMatch = output.match(/(Unirep.epkProof.[a-zA-Z0-9\-\_]+)$/) - // epkProof = epkProofRegMatch[1] - // }) - // }) - - // describe('verifyEpochKeyProof CLI subcommand', () => { - // it('should verify epoch key proof', async () => { - // const command = `npx ts-node cli/index.ts verifyEpochKeyProof` + - // ` -x ${unirepContract.address} ` + - // ` -epk ${epk} ` + - // ` -pf ${epkProof} ` - - // const output = exec(command).stdout.trim() - - // console.log(command) - // console.log(output) - - // const verifyRegMatch = output.match(/Verify epoch key proof with epoch key [a-fA-F0-9]+ succeed/) - // expect(verifyRegMatch).not.equal(null) - // }) - // }) - describe('publishPost CLI subcommand', () => { it('should publish a post', async () => { const command = `npx ts-node cli/index.ts publishPost` + @@ -263,9 +228,33 @@ describe('test all CLI subcommands', function() { const idRegMatch = output.match(/Post ID: ([a-fA-F0-9]+)/) postID = idRegMatch[1] - console.log('regmatch', postID) const postRegMatch = output.match(/Transaction hash: 0x[a-fA-F0-9]{64}/) expect(postRegMatch).not.equal(null) + if(postRegMatch){ + transactionHash =postRegMatch[0].split('Transaction hash: ')[1] + } + const userRepProofRegMatch = output.match(/(Unirep\.reputationProof\.[a-zA-Z0-9\-\_]+)$/) + expect(userRepProofRegMatch).not.equal(null) + userRepProof = userRepProofRegMatch[1] + }) + }) + + describe('verifyReputationProof CLI subcommand', () => { + it('should verify epoch key proof', async () => { + const command = `npx ts-node cli/index.ts verifyReputationProof` + + ` -x ${unirepContract.address} ` + + ` -epk ${epk} ` + + ` -pf ${userRepProof} ` + + ` -th ${transactionHash}` + + ` -act publishPost` + + const output = exec(command).stdout.trim() + + console.log(command) + console.log(output) + + const verifyRegMatch = output.match(/Verify reputation proof of epoch key [a-zA-Z0-9 ]+ succeed/) + expect(verifyRegMatch).not.equal(null) }) }) @@ -303,8 +292,35 @@ describe('test all CLI subcommands', function() { console.log(command) console.log(output) + const epkRegMatch = output.match(/Epoch key of epoch 1 and nonce 0: ([a-fA-F0-9]+)/) + epk = epkRegMatch[1] const txRegMatch = output.match(/Transaction hash: 0x[a-fA-F0-9]{64}/) expect(txRegMatch).not.equal(null) + if(txRegMatch){ + transactionHash = txRegMatch[0].split('Transaction hash: ')[1] + } + const userRepProofRegMatch = output.match(/(Unirep\.reputationProof\.[a-zA-Z0-9\-\_]+)$/) + expect(userRepProofRegMatch).not.equal(null) + userRepProof = userRepProofRegMatch[1] + }) + }) + + describe('verifyReputationProof CLI subcommand', () => { + it('should verify epoch key proof', async () => { + const command = `npx ts-node cli/index.ts verifyReputationProof` + + ` -x ${unirepContract.address} ` + + ` -epk ${epk} ` + + ` -pf ${userRepProof} ` + + ` -th ${transactionHash}` + + ` -act vote` + + const output = exec(command).stdout.trim() + + console.log(command) + console.log(output) + + const verifyRegMatch = output.match(/Verify reputation proof of epoch key [a-zA-Z0-9 ]+ succeed/) + expect(verifyRegMatch).not.equal(null) }) }) @@ -359,9 +375,9 @@ describe('test all CLI subcommands', function() { }) }) - describe('genReputationProof CLI subcommand', () => { + describe('genReputationProofFromAttester CLI subcommand', () => { it('should generate user reputation proof', async () => { - const command = `npx ts-node cli/index.ts genReputationProof` + + const command = `npx ts-node cli/index.ts genReputationProofFromAttester` + ` -x ${unirepContract.address} ` + ` -id ${userIdentity1} ` + ` -a ${attesterId} ` + @@ -376,14 +392,14 @@ describe('test all CLI subcommands', function() { console.log(command) console.log(output) - const userRepProofRegMatch = output.match(/(Unirep.reputationProof.[a-zA-Z0-9\-\_]+)$/) + const userRepProofRegMatch = output.match(/(Unirep.reputationProofFromAttester.[a-zA-Z0-9\-\_]+)$/) userRepProof = userRepProofRegMatch[1] }) }) - describe('verifyReputationProof CLI subcommand', () => { + describe('verifyReputationProofFromAttester CLI subcommand', () => { it('should verify user reputation proof', async () => { - const command = `npx ts-node cli/index.ts verifyReputationProof` + + const command = `npx ts-node cli/index.ts verifyReputationProofFromAttester` + ` -x ${unirepContract.address} ` + ` -a ${attesterId} ` + // ` -mp ${minPosRep} ` + diff --git a/cli/verifyEpochKeyProof.ts b/cli/verifyEpochKeyProof.ts deleted file mode 100644 index 2cbc11b..0000000 --- a/cli/verifyEpochKeyProof.ts +++ /dev/null @@ -1,123 +0,0 @@ -import base64url from 'base64url' -import { ethers as hardhatEthers } from 'hardhat' -import { ethers } from 'ethers' - -import { - validateEthAddress, - contractExists, -} from './utils' - -import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' - -import { genUnirepStateFromContract } from '../core' -import { add0x } from '../crypto/SMT' - -import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" -import { epkProofPrefix } from './prefix' - -const configureSubparser = (subparsers: any) => { - const parser = subparsers.addParser( - 'verifyEpochKeyProof', - { addHelp: true }, - ) - - parser.addArgument( - ['-e', '--eth-provider'], - { - action: 'store', - type: 'string', - help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, - } - ) - - parser.addArgument( - ['-epk', '--epoch-key'], - { - required: true, - type: 'string', - help: 'The user\'s epoch key (in hex representation)', - } - ) - - parser.addArgument( - ['-pf', '--proof'], - { - required: true, - type: 'string', - help: 'The snark proof of the user\'s epoch key ', - } - ) - - parser.addArgument( - ['-b', '--start-block'], - { - action: 'store', - type: 'int', - help: 'The block the Unirep contract is deployed. Default: 0', - } - ) - - parser.addArgument( - ['-x', '--contract'], - { - required: true, - type: 'string', - help: 'The Unirep contract address', - } - ) -} - -const verifyEpochKeyProof = async (args: any) => { - - // Unirep contract - if (!validateEthAddress(args.contract)) { - console.error('Error: invalid Unirep contract address') - return - } - - const unirepAddress = args.contract - - // Ethereum provider - const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER - - const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) - - if (! await contractExists(provider, unirepAddress)) { - console.error('Error: there is no contract deployed at the specified address') - return - } - - const startBlock = (args.start_block) ? args.start_block : DEFAULT_START_BLOCK - const unirepState = await genUnirepStateFromContract( - provider, - unirepAddress, - startBlock, - ) - - const currentEpoch = unirepState.currentEpoch - const GSTRoot = unirepState.genGSTree(currentEpoch).root - const epk = BigInt(add0x(args.epoch_key)) - const decodedProof = base64url.decode(args.proof.slice(epkProofPrefix.length)) - const proof = JSON.parse(decodedProof) - const publicSignals = [GSTRoot, currentEpoch, epk] - - const unirepContract = new ethers.Contract( - unirepAddress, - Unirep.abi, - provider, - ) - const isProofValid = await unirepContract.verifyEpochKeyValidity( - publicSignals, - proof - ) - if (!isProofValid) { - console.error('Error: invalid epoch key proof') - return - } - console.log(`Verify epoch key proof with epoch key ${args.epoch_key} succeed`) -} - -export { - verifyEpochKeyProof, - configureSubparser, -} \ No newline at end of file diff --git a/cli/verifyReputationProof.ts b/cli/verifyReputationProof.ts index 6fd885e..5e32932 100644 --- a/cli/verifyReputationProof.ts +++ b/cli/verifyReputationProof.ts @@ -14,6 +14,7 @@ import { add0x } from '../crypto/SMT' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import { reputationProofPrefix } from './prefix' +import { hash5 } from 'maci-crypto' const configureSubparser = (subparsers: any) => { const parser = subparsers.addParser( @@ -40,52 +41,46 @@ const configureSubparser = (subparsers: any) => { ) parser.addArgument( - ['-a', '--attester-id'], + ['-epk', '--epoch-key'], { required: true, type: 'string', - help: 'The attester id (in hex representation)', - } - ) - - parser.addArgument( - ['-mp', '--min-pos-rep'], - { - type: 'int', - help: 'The minimum positive score the attester given to the user', + help: 'The user\'s epoch key (in hex representation)', } ) parser.addArgument( - ['-mn', '--max-neg-rep'], + ['-pf', '--proof'], { - type: 'int', - help: 'The maximum negative score the attester given to the user', + required: true, + type: 'string', + help: 'The snark proof of the user\'s epoch key and reputation ', } ) parser.addArgument( - ['-md', '--min-rep-diff'], + ['-act', '--action'], { - type: 'int', - help: 'The difference between positive and negative scores the attester given to the user', + required: true, + type: 'string', + help: 'Which action the user spends reputation', } ) parser.addArgument( - ['-gp', '--graffiti-preimage'], + ['-th', '--transaction-hash'], { + required: true, type: 'string', - help: 'The pre-image of the graffiti for the reputation the attester given to the user (in hex representation)', + help: 'The transaction hash of where user submit the reputation nullifiers ', } ) parser.addArgument( - ['-pf', '--proof'], + ['-mr', '--min-rep'], { - required: true, - type: 'string', - help: 'The snark proof of the user\'s epoch key ', + type: 'int', + help: 'The minimum reputation score the user has', } ) @@ -128,6 +123,17 @@ const verifyReputationProof = async (args: any) => { return } + enum actions { + publishPost, + leaveComment, + vote + } + + if (!(args.action in actions)) { + console.error(`Error: there is no such action ${args.action}`) + return + } + const unirepContract = new ethers.Contract( unirepAddress, Unirep.abi, @@ -141,37 +147,47 @@ const verifyReputationProof = async (args: any) => { startBlock, ) - const currentEpoch = unirepState.currentEpoch - const epoch = args.epoch ? Number(args.epoch) : currentEpoch - const attesterId = BigInt(add0x(args.attester_id)) - const provePosRep = args.min_pos_rep != null ? BigInt(1) : BigInt(0) - const proveNegRep = args.max_neg_rep != null ? BigInt(1) : BigInt(0) - const proveRepDiff = args.min_rep_diff != null ? BigInt(1) : BigInt(0) - const proveGraffiti = args.graffiti_preimage != null ? BigInt(1) : BigInt(0) - const minRepDiff = args.min_rep_diff != null ? BigInt(args.min_rep_diff) : BigInt(0) - const minPosRep = args.min_pos_rep != null ? BigInt(args.min_pos_rep) : BigInt(0) - const maxNegRep = args.max_neg_rep != null ? BigInt(args.max_neg_rep) : BigInt(0) - const graffitiPreImage = args.graffiti_preimage != null ? BigInt(add0x(args.graffiti_preimage)) : BigInt(0) - const decodedProof = base64url.decode(args.proof.slice(reputationProofPrefix.length)) - const proof = JSON.parse(decodedProof) - // Verify on-chain - const GSTreeRoot = unirepState.genGSTree(epoch).root + const currentEpoch = unirepState.currentEpoch + const GSTRoot = unirepState.genGSTree(currentEpoch).root const nullifierTree = await unirepState.genNullifierTree() const nullifierTreeRoot = nullifierTree.getRootHash() - const publicInput = [epoch, - GSTreeRoot, + const epk = BigInt(add0x(args.epoch_key)) + + // get reputation nullifiers from contract + const tx = await provider.getTransaction(args.transaction_hash) + const iface = new ethers.utils.Interface(Unirep.abi) + const decodedData = iface.decodeFunctionData(args.action, tx.data) + const nullifiers = decodedData['karmaNullifiers'].map((n) => BigInt(n)) + + const proveKarmaNullifiers = BigInt(1) + let proveKarmaAmount: number = 0 + const default_nullifier = hash5([BigInt(0),BigInt(0),BigInt(0),BigInt(0),BigInt(0)]) + for (let i = 0; i < nullifiers.length; i++) { + if (nullifiers[i] != default_nullifier) { + proveKarmaAmount ++ + } + } + + // get minRep + const proveMinRep = args.min_rep != null ? BigInt(1) : BigInt(0) + const minRep = args.min_rep != null ? BigInt(args.min_rep) : BigInt(0) + + const decodedProof = base64url.decode(args.proof.slice(reputationProofPrefix.length)) + const proof = JSON.parse(decodedProof) + + const publicInput = nullifiers.concat([ + currentEpoch, + epk, + GSTRoot, nullifierTreeRoot, - attesterId, - provePosRep, - proveNegRep, - proveRepDiff, - proveGraffiti, - minRepDiff, - minPosRep, - maxNegRep, - graffitiPreImage] - const isProofValid = await unirepContract.verifyReputationFromAttester( + proveKarmaNullifiers, + proveKarmaAmount, + proveMinRep, + minRep + ]) + + const isProofValid = await unirepContract.verifyReputation( publicInput, proof ) @@ -180,7 +196,7 @@ const verifyReputationProof = async (args: any) => { return } - console.log(`Verify reputation proof from attester ${attesterId} with min pos rep ${minPosRep}, max neg rep ${maxNegRep} and graffiti pre-image ${args.graffiti_preimage}, succeed`) + console.log(`Verify reputation proof of epoch key ${epk.toString(16)} with ${proveKarmaAmount} reputation spent in ${args.transaction_hash} transaction and minimum reputation ${minRep} succeed`) } export { diff --git a/cli/verifyReputationProofFromAttester.ts b/cli/verifyReputationProofFromAttester.ts new file mode 100644 index 0000000..97567fa --- /dev/null +++ b/cli/verifyReputationProofFromAttester.ts @@ -0,0 +1,189 @@ +import base64url from 'base64url' +import { ethers as hardhatEthers } from 'hardhat' +import { ethers } from 'ethers' + +import { + validateEthAddress, + contractExists, +} from './utils' + +import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' + +import { genUnirepStateFromContract } from '../core' +import { add0x } from '../crypto/SMT' + +import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" +import { reputationProofFromAttesterPrefix } from './prefix' + +const configureSubparser = (subparsers: any) => { + const parser = subparsers.addParser( + 'verifyReputationProofFromAttester', + { addHelp: true }, + ) + + parser.addArgument( + ['-e', '--eth-provider'], + { + action: 'store', + type: 'string', + help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, + } + ) + + parser.addArgument( + ['-ep', '--epoch'], + { + action: 'store', + type: 'int', + help: 'The latest epoch user transitioned to. Default: current epoch', + } + ) + + parser.addArgument( + ['-a', '--attester-id'], + { + required: true, + type: 'string', + help: 'The attester id (in hex representation)', + } + ) + + parser.addArgument( + ['-mp', '--min-pos-rep'], + { + type: 'int', + help: 'The minimum positive score the attester given to the user', + } + ) + + parser.addArgument( + ['-mn', '--max-neg-rep'], + { + type: 'int', + help: 'The maximum negative score the attester given to the user', + } + ) + + parser.addArgument( + ['-md', '--min-rep-diff'], + { + type: 'int', + help: 'The difference between positive and negative scores the attester given to the user', + } + ) + + parser.addArgument( + ['-gp', '--graffiti-preimage'], + { + type: 'string', + help: 'The pre-image of the graffiti for the reputation the attester given to the user (in hex representation)', + } + ) + + parser.addArgument( + ['-pf', '--proof'], + { + required: true, + type: 'string', + help: 'The snark proof of the user\'s epoch key ', + } + ) + + parser.addArgument( + ['-b', '--start-block'], + { + action: 'store', + type: 'int', + help: 'The block the Unirep contract is deployed. Default: 0', + } + ) + + parser.addArgument( + ['-x', '--contract'], + { + required: true, + type: 'string', + help: 'The Unirep contract address', + } + ) +} + +const verifyReputationProofFromAttester = async (args: any) => { + + // Unirep contract + if (!validateEthAddress(args.contract)) { + console.error('Error: invalid Unirep contract address') + return + } + + const unirepAddress = args.contract + + // Ethereum provider + const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER + + const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) + + if (! await contractExists(provider, unirepAddress)) { + console.error('Error: there is no contract deployed at the specified address') + return + } + + const unirepContract = new ethers.Contract( + unirepAddress, + Unirep.abi, + provider, + ) + + const startBlock = (args.start_block) ? args.start_block : DEFAULT_START_BLOCK + const unirepState = await genUnirepStateFromContract( + provider, + unirepAddress, + startBlock, + ) + + const currentEpoch = unirepState.currentEpoch + const epoch = args.epoch ? Number(args.epoch) : currentEpoch + const attesterId = BigInt(add0x(args.attester_id)) + const provePosRep = args.min_pos_rep != null ? BigInt(1) : BigInt(0) + const proveNegRep = args.max_neg_rep != null ? BigInt(1) : BigInt(0) + const proveRepDiff = args.min_rep_diff != null ? BigInt(1) : BigInt(0) + const proveGraffiti = args.graffiti_preimage != null ? BigInt(1) : BigInt(0) + const minRepDiff = args.min_rep_diff != null ? BigInt(args.min_rep_diff) : BigInt(0) + const minPosRep = args.min_pos_rep != null ? BigInt(args.min_pos_rep) : BigInt(0) + const maxNegRep = args.max_neg_rep != null ? BigInt(args.max_neg_rep) : BigInt(0) + const graffitiPreImage = args.graffiti_preimage != null ? BigInt(add0x(args.graffiti_preimage)) : BigInt(0) + const decodedProof = base64url.decode(args.proof.slice(reputationProofFromAttesterPrefix.length)) + const proof = JSON.parse(decodedProof) + + // Verify on-chain + const GSTreeRoot = unirepState.genGSTree(epoch).root + const nullifierTree = await unirepState.genNullifierTree() + const nullifierTreeRoot = nullifierTree.getRootHash() + const publicInput = [epoch, + GSTreeRoot, + nullifierTreeRoot, + attesterId, + provePosRep, + proveNegRep, + proveRepDiff, + proveGraffiti, + minRepDiff, + minPosRep, + maxNegRep, + graffitiPreImage] + const isProofValid = await unirepContract.verifyReputationFromAttester( + publicInput, + proof + ) + if (!isProofValid) { + console.error('Error: invalid reputation proof') + return + } + + console.log(`Verify reputation proof from attester ${attesterId} with min pos rep ${minPosRep}, max neg rep ${maxNegRep} and graffiti pre-image ${args.graffiti_preimage}, succeed`) +} + +export { + verifyReputationProofFromAttester, + configureSubparser, +} \ No newline at end of file diff --git a/cli/vote.ts b/cli/vote.ts index d619e39..5b387df 100644 --- a/cli/vote.ts +++ b/cli/vote.ts @@ -23,9 +23,10 @@ import { add0x } from '../crypto/SMT' import { Attestation } from '../core' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" -import { epkProofPrefix, identityPrefix } from './prefix' +import { reputationProofPrefix, identityPrefix } from './prefix' import { nullifierTreeDepth } from '../config/testLocal' import { genProveReputationCircuitInputsFromDB } from '../database/utils' +import { MAX_KARMA_BUDGET } from '../config/socialMedia' const configureSubparser = (subparsers: any) => { const parser = subparsers.addParser( @@ -236,7 +237,7 @@ const vote = async (args: any) => { const currentEpoch = (await unirepContract.currentEpoch()).toNumber() const treeDepths = await unirepContract.treeDepths() const epochTreeDepth = treeDepths.epochTreeDepth - const epk = genEpochKey(id.identityNullifier, currentEpoch, epkNonce, epochTreeDepth).toString(16) + const epk = genEpochKey(id.identityNullifier, currentEpoch, epkNonce, epochTreeDepth) // gen nullifier nonce list const proveKarmaNullifiers = BigInt(1) @@ -295,9 +296,9 @@ const vote = async (args: any) => { const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) const nullifiers: BigInt[] = [] - for (let i = 0; i < voteValue; i++) { + for (let i = 0; i < MAX_KARMA_BUDGET; i++) { const variableName = 'main.karma_nullifiers['+i+']' - nullifiers.push(getSignalByNameViaSym('proveReputation', results['witness'], variableName) % BigInt(2 ** nullifierTreeDepth) ) + nullifiers.push(getSignalByNameViaSym('proveReputation', results['witness'], variableName)) } // TODO: Not sure if this validation is necessary @@ -308,9 +309,15 @@ const vote = async (args: any) => { } const proof = formatProofForVerifierContract(results['proof']) - const fromEpochKey = BigInt(add0x(epk)) + const fromEpochKey = epk + const encodedProof = base64url.encode(JSON.stringify(proof)) + const publicSignals = results['publicSignals'] + if(proveMinRep){ + console.log(`Prove minimum reputation: ${minRep}`) + } + // upvote or downvote to epoch key const attestationToEpochKey = new Attestation( BigInt(attesterId), @@ -341,6 +348,8 @@ const vote = async (args: any) => { } console.log('Transaction hash:', tx.hash) + console.log(`Epoch key of epoch ${currentEpoch} and nonce ${epkNonce}: ${fromEpochKey.toString(16)}`) + console.log(reputationProofPrefix + encodedProof) } export { diff --git a/contracts/Unirep.sol b/contracts/Unirep.sol index e22bbc3..9b78b65 100644 --- a/contracts/Unirep.sol +++ b/contracts/Unirep.sol @@ -276,9 +276,8 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { uint256 spendReputationAmount, actionChoices actionChoice ) internal { - require(karmaNullifiers.length == spendReputationAmount, "Unirep: should submit the exact amount of karma to execute action"); // Determine if karma nullifiers are submitted before - for (uint i = 0; i < karmaNullifiers.length; i++) { + for (uint i = 0; i < spendReputationAmount; i++) { require(isKarmaNullifierSubmitted[karmaNullifiers[i]] == false, "Unirep: the nullifier has been submitted"); isKarmaNullifierSubmitted[karmaNullifiers[i]] = true; } diff --git a/core/UserState.ts b/core/UserState.ts index d5599b1..122c673 100644 --- a/core/UserState.ts +++ b/core/UserState.ts @@ -559,8 +559,13 @@ class UserState { BigInt(this.transitionedNegRep), BigInt(0) ]) + const selectors: BigInt[] = [] + for (let i = 0; i < karmaNonceList.length; i++) { + selectors.push(BigInt(1)); + } for (let i = karmaNonceList.length ; i < MAX_KARMA_BUDGET; i++) { karmaNonceList.push(BigInt(0)) + selectors.push(BigInt(0)) } return stringifyBigInts({ @@ -578,6 +583,7 @@ class UserState { GST_root: GSTreeRoot, nullifier_tree_root: nullifierTreeRoot, nullifier_path_elements: epkNullifierProof, + selectors: selectors, positive_karma: BigInt(this.transitionedPosRep), negative_karma: BigInt(this.transitionedNegRep), prove_karma_nullifiers: proveKarmaNullifiers, diff --git a/database/utils.ts b/database/utils.ts index 94916a7..40ee976 100644 --- a/database/utils.ts +++ b/database/utils.ts @@ -23,7 +23,6 @@ import { computeEmptyUserStateRoot, defaultUserStateLeaf, genAttestationNullifie import { assert } from 'console' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import { add0x, SparseMerkleTreeImpl } from '../crypto/SMT' -import { settings } from 'cluster' import { DEFAULT_AIRDROPPED_KARMA, MAX_KARMA_BUDGET } from '../config/socialMedia' import { dbUri } from '../config/database' @@ -496,9 +495,13 @@ const genProveReputationCircuitInputsFromDB = async ( BigInt(userState[epoch].transitionedNegRep), BigInt(0) ]) - + const selectors: BigInt[] = [] + for (let i = 0; i < karmaNonceList.length; i++) { + selectors.push(BigInt(1)); + } for (let i = karmaNonceList.length ; i < MAX_KARMA_BUDGET; i++) { karmaNonceList.push(BigInt(0)) + selectors.push(BigInt(0)) } db.disconnect(); @@ -518,6 +521,7 @@ const genProveReputationCircuitInputsFromDB = async ( GST_root: GSTreeRoot, nullifier_tree_root: nullifierTreeRoot, nullifier_path_elements: epkNullifierProof, + selectors: selectors, positive_karma: userState[epoch].transitionedPosRep, negative_karma: userState[epoch].transitionedNegRep, prove_karma_nullifiers: proveKarmaNullifiers, @@ -956,17 +960,20 @@ const updateDBFromReputationNullifierSubmittedEvent = async ( ) => { const iface = new ethers.utils.Interface(Unirep.abi) const decodedData = iface.decodeEventLog("ReputationNullifierSubmitted",event.data) + const default_nullifier = hash5([BigInt(0), BigInt(0), BigInt(0), BigInt(0), BigInt(0)]) for (let nullifier of decodedData.karmaNullifiers) { - const newReputationNullifier: IReputationNullifier = new ReputationNullifier({ - transactionHash: event.transactionHash, - action: action[decodedData.actionChoice], - nullifiers: nullifier.toString() - }) - - const res = await newReputationNullifier.save() - if(res) { - console.log('Database: saved reputation nullifiers') + if ( BigInt(nullifier) != default_nullifier ){ + const newReputationNullifier: IReputationNullifier = new ReputationNullifier({ + transactionHash: event.transactionHash, + action: action[decodedData.actionChoice], + nullifiers: nullifier.toString() + }) + + const res = await newReputationNullifier.save() + if(res) { + console.log('Database: saved reputation nullifiers') + } } } } From e1b2d197d1e3eef34edd548a57df627c504aaf31 Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Sun, 2 May 2021 17:30:05 +0800 Subject: [PATCH 20/38] resume gen epoch key and proof --- README.MD | 231 +---------------------- circuits/proveReputation.circom | 64 +++---- circuits/test/verifyEpochKey_test.circom | 2 +- circuits/userExists.circom | 2 +- circuits/verifiyEpochKey.circom | 51 ++++- cli/genEpochKeyAndProof.ts | 152 +++++++++++++++ cli/index.ts | 24 ++- cli/prefix.ts | 2 + cli/test/testAllCommands.ts | 36 ++++ cli/verifyEpochKeyProof.ts | 127 +++++++++++++ core/UserState.ts | 18 +- test/integration/Integration.ts | 213 +++++++++++---------- 12 files changed, 538 insertions(+), 384 deletions(-) create mode 100644 cli/genEpochKeyAndProof.ts create mode 100644 cli/verifyEpochKeyProof.ts diff --git a/README.MD b/README.MD index 8f85294..3e2178e 100644 --- a/README.MD +++ b/README.MD @@ -1,6 +1,8 @@ # Unirep UniRep is a private and nonrepudiable repuation system. Users can receive positive and negative reputation from attesters, and voluntarily prove that they have at least certain amount of reputation without revealing the exact amount. Moreover, users cannot refuse to receive reputation from an attester. +For more information, refer to the [documentation](https://vivi432.gitbook.io/unirep/) + ## Install and build ``` @@ -14,231 +16,8 @@ npm run build ``` to build the circuits -## Test - -``` -npm run test -``` - -## Introduction - -### Cryptography tools used -- poseidon hash function - - `hashLeftRight()`(represented as `hash` hereafter) and `hash5()` -- [semaphore identity](https://github.com/weijiekoh/libsemaphore) - - `identityCommitment` - - ``identityCommitment`` is the hash of user's EdDSA pubkey, `identityNullifier` and `identityTrapdoor` - -### Actors in Unirep -- There are users who receive reputation and prove received reputation - - user signs up by calling `userSignUp` in Unirep contract - - user's `identityCommitment` is revealed at this time and it will be recorded in the contract to prevent double signup - - the identity commitment will not reveal the actual identity of the user but at the same time allow user to prove identity in the cirucit -- There are attesters who give attestations to users and the attestations become the users' reputation - - attester signs up by calling `attesterSignUp` in Unirep contract - - attesters would be given `attesterId` by the order they sign up, `attesterId` begins with `1` - - attester record and attestation record are public and so everyone can see which attester submits which attestation to the Unirep contract - -### Won't this reveal who is receiving what attestation from which attester? -- so the receiver of an attestation is not a user's `identityCommitment` but an random value called `epochKey`, i.e., attester attests to an `epochKey` instead of an `identityCommitment` - - `epochKey` is computed by `hash5(identityNullifier, epoch, nonce, 0, 0)` - - only the user knows his `identityNullifier` so only he knows if he is receiving an attestation, others would see an attestation attesting to a random value - - and in the circuit user can prove that he knows the `epochKey` and can rightfully receive and process the attestations attested to this `epochKey` - -### Can a user choose not to process certain attestations that are bad for his reputation? -- No. The attestations to an `epochKey` would be chained together. A hashchain would be formed by the hashes of the attestations. - - So user can not omit any attestation because the circuit requires each attestation in the hashchain to be processed. - - if user omits an attestation, then the computed hashchain would not match the one in the Unirep contract -``` -hashChainResult = hash(attestation_3, hash(attestation_2, hash(attestation_1, 0))) -``` - -### Data structures in Unirep - -#### User state tree -- a user state tree is a sparse merkle tree with it's leaves storing reputation received from each attester, e.g., - - a user state tree leaf = hash of the reputation -``` - user state tree root - / \ - hash(DEFAULT_REP_HASH, 0xabc...) hash(0xbcd..., 0xcde...) - / \ / \ -[No rep for leaf 0] [leaf 1: 0xabc...] [leaf 2: 0xbcd...] [leaf 3: 0xcde...] -``` -- NOTE: `[leaf 1: 0xabc...]` represents the reputation received from attester with `attesterId = 1` and `0xabc...` is the hash of the reputation - - -#### Global state tree -- a global state tree is an incremental sparse merkle tree with it's leaves storing users' `identityCommitment`s and `userStateRoot`s, e.g., - - a global state tree leaf = `hash(identityCommitment, userStateRoot)` - -``` - global state tree root - / \ - hash(0xabc..., 0xcde...) hash(0xdef..., DEFAULT_EMPTY_HASH) - / \ / \ -[leaf_0: 0xabc...] [leaf_1: 0xcde...] [leaf_2: 0xdef...] [DEFAULT_EMPTY_HASH] -``` -- NOTE: this is an incremental merkle tree so leaves are inserted from left (leaf index 0) to right, one by one, instead of inserted directly into the specified leaf index. -- NOTE: since global state tree leaf is the hash of `identityCommitment` and `userStateRoot`, others will be not be able to tell which user (his `identityCommitment`) inserted his user state into global state tree. - -#### Epoch tree -- an epoch tree is a sparse merkle tree with it's leaves storing hashchain results of each epoch key, e.g., -``` - epoch tree root - / \ - hash(DEFAULT_EMPTY_HASH, 0x123...) hash(DEFAULT_EMPTY_HASH, 0x456...) - / \ / \ -[DEFAULT_EMPTY_HASH] [epk_1: 0x123...] [DEFAULT_EMPTY_HASH] [epk_3: 0x456...] -``` - -#### Nullifier tree -- an nullifier tree is a sparse merkle tree with it's leaves storing nullifier of already processed attestations or epoch keys, e.g., -``` - nullifier tree root - / \ - hash(1, 0) hash(0, 1) - / \ / \ -[leaf 0: 1] [leaf 1: 0] [leaf_2: 0] [leaf_3: 1] -``` -- NOTE: leaf 0 of nullifier tree is reserved, it always has value `1` -- NOTE: leaf value `1` means the nullifier represented by the leaf index is processed. In the example above, nullifier `3` is stored in nullifier tree, this nullifier could be a nullifier of an attestation or an epoch key, and it means that the attestation or the epoch key is processed. -- NOTE: nullifiers are used to prevent user from processing an aleady processed attestation or epoch key. - -- an attestation includes the following data: -```solidity -struct Attestation { - // The attester’s ID - uint256 attesterId; - // Positive reputation - uint256 posRep; - // Negative reputation - uint256 negRep; - // A hash of an arbitary string - uint256 graffiti; - // Whether or not to overwrite the graffiti in the user’s state - bool overwriteGraffiti; -} -``` -- nullifier of an attestation is computed by `hash5(ATTESTATION_NULLIFIER_DOMAIN, identityNullifier, attesterId, epoch, epochKey)` - - `ATTESTATION_NULLIFIER_DOMAIN` is used to prevent mixed-up of attestation nullifier and epoch key nullifier -- nullifier of an epoch key is computed by `hash5(EPOCH_KEY_NULLIFIER_DOMAIN, identityNullifier, epoch, nonce, 0)` - - `EPOCH_KEY_NULLIFIER_DOMAIN` is used to prevent mixed-up of attestation nullifier and epoch key nullifier -- a reputation includes the following data: `posRep, negRep, graffiti` - - it does not include `attesterId` like an attestation does because reputation is already stored in user state tree with `attesterId` as leaf index - -### Epoch, epoch transition and user state transition -- There is the notion of epoch in Unirep. Every `epochLength` seconds, one epoch ends and next epoch begins. - - Epoch transition happens when someone calls `beginEpochTransition` - - in `beginEpochTransition`, all epoch keys attested during this epoch will have their hash chain sealed - - by 'sealed' it means that the hash chain is hashed again with `1`, e.g., `hash(1, originalHashChain)` - - if an epoch key received no attestation, it's hash chain would be `hash(1, 0)` - - After hash chain of the epoch keys are sealed, these epoch keys and their hash chain will be inserted into the epoch tree of this epoch - - there's one epoch tree for every epoch - - caller will be compensated for executing the epoch transition - - There will be a new global state tree for each epoch - - and user needs to perform user state transition to transition his user state into the latest epoch - - user performs user state transition by calling `updateUserStateRoot` - - once the user performed user state transition, his user state will be inserted into the global state tree of the latest epoch - - so if a user does not perform user state transition during an epoch, his user state will not be in the global state tree of that epoch -- User should perform user state transition before he can prove the latest attestations he received. - - Also, user should perform user state transition before he can receive any attestations further. Attester can still attest to a user's epoch key in the past epoch but the user will not be able to process the attestation. - -### Example flow using CLI commands - -#### 1. First, spin up the testing chain -``` -npx hardhat node -``` -- NOTE: a list of default accounts will be printed, choose one of them to be user's account and one to be attester's. User's and attester's private key will be referred to as `userPrivateKey` and `attesterPrivateKey` respectively. - -#### 2. Deploy Unirep contract -``` -npx ts-node cli/index.ts deploy -d userPrivateKey -``` --NOTE: Unirep contract's address will be printed. For example, `Unirep: 0xb3dD32d090f05Afd6225e6b611bb25C1E87a650B` - -#### 3. Generate user's identity and identity commitment -``` -npx ts-node cli/index.ts genUnirepIdentity -``` -- NOTE: base64url encoded identity and identity commitment will be printed, For example, -``` -Unirep.identity.WyJlOGQ2NGU5OThhM2VmNjAxZThjZTNkNDQwOWQyZjc3MjEwOGJkMGI1NTgwODAzYjY2MDk0YTllZWExMzYxZjA2IiwiODZiYjk5ZGQ4MzA2ZGVkZDgxYTE4MzBiNmVjYmRlZjk5ZmVjYTU3M2RiNjIxMjk5NGMyMmJlMWEwMWZmMTEiLCIzMGE3M2MxMjE4ODQwNjE0MWQwYmI4NWRjZDY5ZjdhMjEzMWM1NWRkNDQzYWNmMGVhZTEwNjI2NzBjNDhmYSJd -278 -Unirep.identityCommitment.MTI0ZWQ1YTc4NjYzMWVhODViY2YzZDI4NWFhOTA5MzFjMjUwOTEzMzljYzAzODU3YTVlMzY5ZWYxZmI2NTAzNw -``` - -#### 4. User signs up -``` -npx ts-node cli/index.ts userSignup -x 0xb3dD32d090f05Afd6225e6b611bb25C1E87a650B... -c Unirep.identityCommitment.MTI0ZWQ1YTc4NjYzMWVhODViY2YzZDI4NWFhOTA5MzFjMjUwOTEzMzljYzAzODU3YTVlMzY5ZWYxZmI2NTAzNw -d userPrivateKey -``` -- NOTE: `-x` is the Unirep contract address and `-c` is user's identity commitment - -#### 5. Attester signs up -``` -npx ts-node cli/index.ts attesterSignup -x 0xb3dD32d090f05Afd6225e6b611bb25C1E87a650B -d attesterPrivateKey -``` -- NOTE: `-d` is attester's private key, this private key is to be used only by this attester hereafter - -#### 6. User generates epoch key and epoch key proof -``` -npx ts-node cli/index.ts genEpochKeyAndProof -x 0xb3dD32d090f05Afd6225e6b611bb25C1E87a650B -id Unirep.identity.WyJlOGQ2NGU5OThhM2VmNjAxZThjZTNkNDQwOWQyZjc3MjEwOGJkMGI1NTgwODAzYjY2MDk0YTllZWExMzYxZjA2IiwiODZiYjk5ZGQ4MzA2ZGVkZDgxYTE4MzBiNmVjYmRlZjk5ZmVjYTU3M2RiNjIxMjk5NGMyMmJlMWEwMWZmMTEiLCIzMGE3M2MxMjE4ODQwNjE0MWQwYmI4NWRjZDY5ZjdhMjEzMWM1NWRkNDQzYWNmMGVhZTEwNjI2NzBjNDhmYSJd -n 0 -``` -- NOTE: `-id` is user's identity and `-n` is epoch key nonce which should be less than the system parameter `maxEpochKeyNonce` -- NOTE: epoch key and base64url encoded epoch key proof will be printed and they should be handed to attester to be verified, for example: -``` -Epoch key of epoch 1 and nonce 0: 3d -Unirep.epkProof.WyIxNDg5MTgwNTg3ODMyODk3ODU0NTYzNTI4MTAxNDAwODY4MTIxMTAyODg1NjY3MTAwOTM0Mzc2MTgwODkxMzQ3Mzg2MzEzNDEwMjA1MyIsIjYxMzI2NTYxOTQ4NDk1MjMwMDUyNDI4OTI3Mjg0OTMwODQ3NDY1NTA3OTE3MTk1MTYwNTM5NjY2MTAzMzA4Mjg5NDc5NjEwNDI5NDYiLCIxMDc4NTcxMDIxMTYyMTI2MTE4NzkwOTQ4MjEzMjk5ODA0MzgzMjQyOTczMzM4MTQ3NDU3NTA5NTY5MjgzMzQzNTY5ODE0MTE5ODQ2MSIsIjY5OTgzMTU3NzA2NjQyMDAwNTc4ODA5OTcxODkyNzQzOTY0Njc3Mzc4NTQ0NTc0NjQ5NDc0MDY1NjkwNDEzNjQ0MzM1NjkwNTU4MDciLCI5Mzk4NDE1NTE0MjExMDQ5NTkzNjc1ODIzMzMyOTQzMDQ1ODk5NTUzMTkzODUwMTYxODk0NzU5NjQ2Mzc2MjgzMTUwOTQ2MTcxMzEwIiwiNjM4MDYyNzY2NTY4MDc5MzA2ODg3NDU0MzMxMzcwODg4NzUzNDY3Njk2MjQyOTY2OTQ5ODIxMzAxNzU1OTI5NDYwODgxODk0Mjk4MiIsIjk5ODgzOTA5MjM5MDQ5MTU1NzM5Mjk1NTQ0NTY3MDM2NTk1NDE5MDk2Mjk2OTk3MDM5ODkzNjU3NTU1NzIyNzUxMjQzNTI3MjY4MzAiLCIxODg5ODI1MDA0NTAzNzE2NjcxNzQ4MjkwNDI2MzA2MDkzMzA2NDk0NzczOTg5MDc5MjU5MDQwODYyNzI0MjE2MjY1MTM3NDUwMjY1Il0 -``` - -#### 7. Attester verify epoch key proof -``` -npx ts-node cli/index.ts verifyEpochKeyProof -x 0xb3dD32d090f05Afd6225e6b611bb25C1E87a650B -epk 33 -pf Unirep.epkProof.WyIxNDg5MTgwNTg3ODMyODk3ODU0NTYzNTI4MTAxNDAwODY4MTIxMTAyODg1NjY3MTAwOTM0Mzc2MTgwODkxMzQ3Mzg2MzEzNDEwMjA1MyIsIjYxMzI2NTYxOTQ4NDk1MjMwMDUyNDI4OTI3Mjg0OTMwODQ3NDY1NTA3OTE3MTk1MTYwNTM5NjY2MTAzMzA4Mjg5NDc5NjEwNDI5NDYiLCIxMDc4NTcxMDIxMTYyMTI2MTE4NzkwOTQ4MjEzMjk5ODA0MzgzMjQyOTczMzM4MTQ3NDU3NTA5NTY5MjgzMzQzNTY5ODE0MTE5ODQ2MSIsIjY5OTgzMTU3NzA2NjQyMDAwNTc4ODA5OTcxODkyNzQzOTY0Njc3Mzc4NTQ0NTc0NjQ5NDc0MDY1NjkwNDEzNjQ0MzM1NjkwNTU4MDciLCI5Mzk4NDE1NTE0MjExMDQ5NTkzNjc1ODIzMzMyOTQzMDQ1ODk5NTUzMTkzODUwMTYxODk0NzU5NjQ2Mzc2MjgzMTUwOTQ2MTcxMzEwIiwiNjM4MDYyNzY2NTY4MDc5MzA2ODg3NDU0MzMxMzcwODg4NzUzNDY3Njk2MjQyOTY2OTQ5ODIxMzAxNzU1OTI5NDYwODgxODk0Mjk4MiIsIjk5ODgzOTA5MjM5MDQ5MTU1NzM5Mjk1NTQ0NTY3MDM2NTk1NDE5MDk2Mjk2OTk3MDM5ODkzNjU3NTU1NzIyNzUxMjQzNTI3MjY4MzAiLCIxODg5ODI1MDA0NTAzNzE2NjcxNzQ4MjkwNDI2MzA2MDkzMzA2NDk0NzczOTg5MDc5MjU5MDQwODYyNzI0MjE2MjY1MTM3NDUwMjY1Il0 -``` -- NOTE: `-epk` is user's epoch key and `-pf` is the epoch key proof - -#### 8. Attester attest to epoch key -``` -npx ts-node cli/index.ts attest -x 0xb3dD32d090f05Afd6225e6b611bb25C1E87a650B -d attesterPrivateKey -epk 33 -pr 10 -nr 8 -gf 176ff05d9c7c4528b04553217098a71cd076d52623dab894a7f7ee34116ca170 -``` -- NOTE: `-pr` is the positive reputation given to the user, `-nr` is the negative reputation given to the user and `-gf` is the graffiti for the reputation given to the user - -#### 9. Epoch transition -``` -npx ts-node cli/index.ts epochTransition -x 0xb3dD32d090f05Afd6225e6b611bb25C1E87a650B -d 0x... -t -``` - -NOTE: `-d` private key could be anyone's private key and `-t` indicates it's testing environment so it will fast forward to the end of epoch +## Test cli commands -#### 10. User state transition -``` -npx ts-node cli/index.ts userStateTransition -x 0xb3dD32d090f05Afd6225e6b611bb25C1E87a650B -d userPrivateKey -id Unirep.identity.WyJlOGQ2NGU5OThhM2VmNjAxZThjZTNkNDQwOWQyZjc3MjEwOGJkMGI1NTgwODAzYjY2MDk0YTllZWExMzYxZjA2IiwiODZiYjk5ZGQ4MzA2ZGVkZDgxYTE4MzBiNmVjYmRlZjk5ZmVjYTU3M2RiNjIxMjk5NGMyMmJlMWEwMWZmMTEiLCIzMGE3M2MxMjE4ODQwNjE0MWQwYmI4NWRjZDY5ZjdhMjEzMWM1NWRkNDQzYWNmMGVhZTEwNjI2NzBjNDhmYSJd -``` - -#### 11. User generate reputation proof -``` -npx ts-node cli/index.ts genReputationProof -x 0xb3dD32d090f05Afd6225e6b611bb25C1E87a650B -id Unirep.identity.WyJlOGQ2NGU5OThhM2VmNjAxZThjZTNkNDQwOWQyZjc3MjEwOGJkMGI1NTgwODAzYjY2MDk0YTllZWExMzYxZjA2IiwiODZiYjk5ZGQ4MzA2ZGVkZDgxYTE4MzBiNmVjYmRlZjk5ZmVjYTU3M2RiNjIxMjk5NGMyMmJlMWEwMWZmMTEiLCIzMGE3M2MxMjE4ODQwNjE0MWQwYmI4NWRjZDY5ZjdhMjEzMWM1NWRkNDQzYWNmMGVhZTEwNjI2NzBjNDhmYSJd -a 1 -mp 0 -mn 10 -gp 0 -``` -- NOTE: `-a` is attester's id, `-mp` is the minimum positive reputation score, i.e, user wants to prove that the attester gave the user a positive reputation score that's larger than the minimum positive reputation score, `-mn` is the maximum negative reputation score, i.e, user wants to prove that the attester gave the user a negative reputation score that's less than the maximum negative reputation score, `-md` is the minimum difference between positive and negative reputation scores, and `-gp` is the pre-image of the graffiti for the reputation -- NOTE: `gp` in this case, `0` being the hash pre-image of `176ff05d9c7c4528b04553217098a71cd076d52623dab894a7f7ee34116ca170` -- NOTE: proof will be printed and it should be handed to the receiver of this proof, for example, ``` -Proof of reputation from attester 1: -Unirep.reputationProof.WyIxMzMzNjY5MTkyMjk1NTE4MjgyNTM2NjMyNzc0MjUxMzM0NDExNjgzOTE1Njc5ODI5MDQ1NzUxNzIxNzA1OTkxNTk1MzUzMzkzMDc5NyIsIjk0NjM0MjUwNTY2NzgyNzMxMzUxMzY3NjI4OTQ3OTU3MTg1OTc0MTgzMzIwMjM2NDE0NzExODEyOTYyNjk0ODc4MjM2OTM2MzgyNzEiLCIxODQ1NTUzMDg2NTUwMDUxMzkyNDM0NjYxNjIzNjkzMTQwMzgyMjYyNDA1MDgwMzU1NjM2NDY4MDc4MjU0MjM5NTcxNTQ4MDQ5Njg0NyIsIjEzNzg5OTg3NDk0OTA3NDQzNTg3NjczODA5OTk5NTUyMzQzNDg0ODM5Mzk0NzMyNDI1ODg4NTkyMDEwNDU5MzM5ODA1Nzc4OTc2Mjk2IiwiMTg4MzU3NzI0MzgxNTg1Mjk3NTM4MzczMjgwNTQwODkzNDI0MjcwMTg0MjA0NDAxOTc5MDAzMDI5ODk0MzkwMzg3NTY1NDU4MjE3MTciLCIxMjI1MDYwMzkwOTkyMjQ4NzAxNzg1NzAxODk4OTk1OTEzMzgxOTE4ODI2NjU2NTY0MDkyMzIxNDY5NzE2OTc1MjA2NzA4NDQ2NTAwMCIsIjI4NzQ3Nzc2MTg2NjE3NzczNDMzMTU3MzIyOTAyODY4MjMyOTMyNDI0NTQwMjQ1NTQ1OTIyMTIwNTY2NTYwODg4NDY5MTEzNDkxNjUiLCI5MDc1NTcwMTYyNDkyNjQ5NzEwMzg5Njc5NTY1Mzk1NjUwOTQ1OTU0MjQzMDAxOTY0Njg3NjM3MDM3OTMxNzc3MDg2NDgyOTA5MDQ1Il0 -``` - -#### 12. (someone) Verify the reputation proof -``` -npx ts-node cli/index.ts verifyReputationProof -x 0xb3dD32d090f05Afd6225e6b611bb25C1E87a650B -a 1 -mp 0 -mn 10 -gp 0 -pf Unirep.reputationProof.WyIxMzMzNjY5MTkyMjk1NTE4MjgyNTM2NjMyNzc0MjUxMzM0NDExNjgzOTE1Njc5ODI5MDQ1NzUxNzIxNzA1OTkxNTk1MzUzMzkzMDc5NyIsIjk0NjM0MjUwNTY2NzgyNzMxMzUxMzY3NjI4OTQ3OTU3MTg1OTc0MTgzMzIwMjM2NDE0NzExODEyOTYyNjk0ODc4MjM2OTM2MzgyNzEiLCIxODQ1NTUzMDg2NTUwMDUxMzkyNDM0NjYxNjIzNjkzMTQwMzgyMjYyNDA1MDgwMzU1NjM2NDY4MDc4MjU0MjM5NTcxNTQ4MDQ5Njg0NyIsIjEzNzg5OTg3NDk0OTA3NDQzNTg3NjczODA5OTk5NTUyMzQzNDg0ODM5Mzk0NzMyNDI1ODg4NTkyMDEwNDU5MzM5ODA1Nzc4OTc2Mjk2IiwiMTg4MzU3NzI0MzgxNTg1Mjk3NTM4MzczMjgwNTQwODkzNDI0MjcwMTg0MjA0NDAxOTc5MDAzMDI5ODk0MzkwMzg3NTY1NDU4MjE3MTciLCIxMjI1MDYwMzkwOTkyMjQ4NzAxNzg1NzAxODk4OTk1OTEzMzgxOTE4ODI2NjU2NTY0MDkyMzIxNDY5NzE2OTc1MjA2NzA4NDQ2NTAwMCIsIjI4NzQ3Nzc2MTg2NjE3NzczNDMzMTU3MzIyOTAyODY4MjMyOTMyNDI0NTQwMjQ1NTQ1OTIyMTIwNTY2NTYwODg4NDY5MTEzNDkxNjUiLCI5MDc1NTcwMTYyNDkyNjQ5NzEwMzg5Njc5NTY1Mzk1NjUwOTQ1OTU0MjQzMDAxOTY0Njg3NjM3MDM3OTMxNzc3MDg2NDgyOTA5MDQ1Il0 -``` - -### Computation happens off-chain - -After you read through the introduction above, you should have a picture of how Unirep works. User/attester registers on-chain, attester submits attestations on-chain, user submits proof to update his state and also the global state tree of current epoch in Unirep contract. These all happens on-chain, including proof verification, updating global state trees and generating epoch trees, but these computation could be very expensive! - -There are no on-chain assets that required latest state of the contract in order to transfer its ownership or to apply computation on it. There's no such asset in Unirep, all you have is one's reputation and proving one's reputation does not has to be done on-chain, instead the proof is transmitted to the verifier off-chain. So there's really no need to do all these computation on-chain! - -So that's why the current implementation of Unirep is taking the LazyLedger-like approach - the Unirep contract (i.e., the underlying Ethereum chain) is serving as the data availability layer and the computations including proof verification all happen on top of this data availability layer. We log every user/attester actions like register/submit attestation/submit state transition proof and the according data. Then we perform state transition off-chain according to the order of when these events took place and everyone that does the same should arrive at the exact same global state! (assuming no re-org in the underlying data availability layer) - -You can take a look at [`genUserStateFromContract`](https://github.com/NIC619/UniRep/blob/6e056d583bd6dcc9c12353362244dd5e6dbe3cfc/core/utils.ts#L421) to better know how a user can fetch the events from the contract and build up the latest global state. +npm run test-cli +``` \ No newline at end of file diff --git a/circuits/proveReputation.circom b/circuits/proveReputation.circom index 0e32c69..e579a1e 100644 --- a/circuits/proveReputation.circom +++ b/circuits/proveReputation.circom @@ -59,43 +59,37 @@ template ProveReputation( /* End of check 1 */ - /* 2. Check if user exists in the Global State Tree */ - component user_exist = userExists(GST_tree_depth); + /* 2. Check if user exists in GST and check correctness of epoch key */ + component verify_epoch_key = verifyEpochKey(GST_tree_depth, epoch_tree_depth, EPOCH_KEY_NONCE_PER_EPOCH); for (var i = 0; i< GST_tree_depth; i++) { - user_exist.GST_path_index[i] <== GST_path_index[i]; - user_exist.GST_path_elements[i][0] <== GST_path_elements[i][0]; + verify_epoch_key.GST_path_index[i] <== GST_path_index[i]; + verify_epoch_key.GST_path_elements[i][0] <== GST_path_elements[i][0]; } - user_exist.GST_root <== GST_root; - user_exist.identity_pk[0] <== identity_pk[0]; - user_exist.identity_pk[1] <== identity_pk[1]; - user_exist.identity_nullifier <== identity_nullifier; - user_exist.identity_trapdoor <== identity_trapdoor; - user_exist.user_tree_root <== user_tree_root; - user_exist.user_state_hash <== user_state_hash; - user_exist.positive_karma <== positive_karma; - user_exist.negative_karma <== negative_karma; + verify_epoch_key.GST_root <== GST_root; + verify_epoch_key.identity_pk[0] <== identity_pk[0]; + verify_epoch_key.identity_pk[1] <== identity_pk[1]; + verify_epoch_key.identity_nullifier <== identity_nullifier; + verify_epoch_key.identity_trapdoor <== identity_trapdoor; + verify_epoch_key.user_tree_root <== user_tree_root; + verify_epoch_key.user_state_hash <== user_state_hash; + verify_epoch_key.positive_karma <== positive_karma; + verify_epoch_key.negative_karma <== negative_karma; + verify_epoch_key.nonce <== epoch_key_nonce; + verify_epoch_key.epoch <== epoch; + verify_epoch_key.epoch_key <== epoch_key; /* End of check 2 */ - /* 3. Check epoch key is computed correctly*/ - component epoch_key_check = verifyEpochKey(epoch_tree_depth, EPOCH_KEY_NONCE_PER_EPOCH); - epoch_key_check.identity_nullifier <== identity_nullifier; - epoch_key_check.nonce <== epoch_key_nonce; - epoch_key_check.epoch <== epoch; - epoch_key_check.epoch_key <== epoch_key; - /* End of check 3 */ - - - /* 4. Check it's latest epoch the user transition to */ + /* 3. Check it's latest epoch the user transition to */ // We check that nullifier of the epoch key is not seen before. - // 4.1.1 Compute nullifier of the epoch key + // 3.1.1 Compute nullifier of the epoch key component epoch_key_nullifier_hasher = Hasher5(); epoch_key_nullifier_hasher.in[0] <== 2; // 2 is the domain separator for epoch key nullifier epoch_key_nullifier_hasher.in[1] <== identity_nullifier; epoch_key_nullifier_hasher.in[2] <== epoch; epoch_key_nullifier_hasher.in[3] <== nonce; epoch_key_nullifier_hasher.in[4] <== 0; - // 4.1.2 Mod nullifier hash + // 3.1.2 Mod nullifier hash // circom's best practices state that we should avoid using <-- unless // we know what we are doing. But this is the only way to perform the // modulo operation. @@ -104,7 +98,7 @@ template ProveReputation( modEPKNullifier.dividend <== epoch_key_nullifier_hasher.hash; epk_nullifier_hash_moded <== modEPKNullifier.remainder; - // 4.2 Verify non-membership of the nullifier in nullifier tree + // 3.2 Verify non-membership of the nullifier in nullifier tree // Unseen nullifier leaf should have value hashLeftRight(0, 0) signal zero_leaf; component zero_leaf_hasher = HashLeftRight(); @@ -119,20 +113,20 @@ template ProveReputation( for (var i = 0; i < nullifier_tree_depth; i++) { epk_exists.path_elements[i][0] <== nullifier_path_elements[i][0]; } - /* End of check 4 */ + /* End of check 3 */ - /* 5. Check total reputation is greater than 0 */ + /* 4. Check total reputation is greater than 0 */ // if user wants to spend karma and prove total_reputation, it requires reputation to be positive // total_reputation = positive_karma - negative_karma >= 0 component pos_rep_get = GreaterEqThan(MAX_REPUTATION_SCORE_BITS); pos_rep_get.in[0] <== positive_karma; pos_rep_get.in[1] <== negative_karma; pos_rep_get.out === 1; - /* End of check 5*/ + /* End of check 4*/ - /* 6. Check nullifiers are valid */ + /* 5. Check nullifiers are valid */ signal default_nullifier_zero; component default_nullifier_zero_hasher = Hasher5(); default_nullifier_zero_hasher.in[0] <== 0; @@ -147,7 +141,7 @@ template ProveReputation( component karma_nullifier_hasher[MAX_KARMA_BUDGET]; component nonce_gt[MAX_KARMA_BUDGET]; for(var i = 0; i< MAX_KARMA_BUDGET; i++) { - // 7.1 verify is nonce is valid + // 5.1 verify is nonce is valid // If user wants to generate karma nullifiers, check if positive_karma - negative_karma > karma_nonce // Eg. if we have 10 karma, we have 0-9 valid nonce nonce_gt[i] = GreaterThan(MAX_REPUTATION_SCORE_BITS); @@ -159,7 +153,7 @@ template ProveReputation( if_check_nullifiers[i].s <== prove_karma_nullifiers; if_check_nullifiers[i].out === 1; - // 6.2 Use karma_nonce to compute all karma nullifiers + // 5.2 Use karma_nonce to compute all karma nullifiers if_output_nullifiers[i] = Mux1(); karma_nullifier_hasher[i] = Hasher5(); karma_nullifier_hasher[i].in[0] <== 3; // 3 is the domain separator for karma nullifier @@ -172,10 +166,10 @@ template ProveReputation( if_output_nullifiers[i].s <== selectors[i]; karma_nullifiers[i] <== if_output_nullifiers[i].out; } - /* End of check 6 */ + /* End of check 5 */ - /* 7. Check if user has reputation greater than min_rep */ + /* 6. Check if user has reputation greater than min_rep */ component if_check_min_rep = Mux1(); component rep_get = GreaterEqThan(MAX_REPUTATION_SCORE_BITS); rep_get.in[0] <== positive_karma - negative_karma; @@ -184,5 +178,5 @@ template ProveReputation( if_check_min_rep.c[1] <== rep_get.out; if_check_min_rep.s <== prove_min_rep; if_check_min_rep.out === 1; - /* End of check 7 */ + /* End of check 6 */ } \ No newline at end of file diff --git a/circuits/test/verifyEpochKey_test.circom b/circuits/test/verifyEpochKey_test.circom index 942f7b0..d94a5a5 100644 --- a/circuits/test/verifyEpochKey_test.circom +++ b/circuits/test/verifyEpochKey_test.circom @@ -1,3 +1,3 @@ include "../verifiyEpochKey.circom" -component main = verifyEpochKey(8, 2); \ No newline at end of file +component main = verifyEpochKey(4, 8, 2); \ No newline at end of file diff --git a/circuits/userExists.circom b/circuits/userExists.circom index 4dfaa7a..f092168 100644 --- a/circuits/userExists.circom +++ b/circuits/userExists.circom @@ -17,7 +17,7 @@ template userExists(GST_tree_depth){ signal private input positive_karma; signal private input negative_karma; signal output out; - + component identity_commitment = IdentityCommitment(); identity_commitment.identity_pk[0] <== identity_pk[0]; identity_commitment.identity_pk[1] <== identity_pk[1]; diff --git a/circuits/verifiyEpochKey.circom b/circuits/verifiyEpochKey.circom index 426d5e5..2224ff6 100644 --- a/circuits/verifiyEpochKey.circom +++ b/circuits/verifiyEpochKey.circom @@ -1,25 +1,56 @@ include "../node_modules/circomlib/circuits/comparators.circom"; include "./hasherPoseidon.circom"; include "./incrementalMerkleTree.circom"; +include "./userExists.circom"; -template verifyEpochKey(epoch_tree_depth, EPOCH_KEY_NONCE_PER_EPOCH) { +template verifyEpochKey(GST_tree_depth, epoch_tree_depth, EPOCH_KEY_NONCE_PER_EPOCH) { + // Global state tree + signal private input GST_path_index[GST_tree_depth]; + signal private input GST_path_elements[GST_tree_depth][1]; + signal input GST_root; + // Global state tree leaf: Identity & user state root + signal private input identity_pk[2]; signal private input identity_nullifier; + signal private input identity_trapdoor; + signal private input user_tree_root; + signal private input user_state_hash; + // Sum of positive and negative karma + signal private input positive_karma; + signal private input negative_karma; + signal private input nonce; signal input epoch; signal input epoch_key; - /* 1. Check nonce validity */ + /* 1. Check if user exists in the Global State Tree */ + component user_exist = userExists(GST_tree_depth); + for (var i = 0; i< GST_tree_depth; i++) { + user_exist.GST_path_index[i] <== GST_path_index[i]; + user_exist.GST_path_elements[i][0] <== GST_path_elements[i][0]; + } + user_exist.GST_root <== GST_root; + user_exist.identity_pk[0] <== identity_pk[0]; + user_exist.identity_pk[1] <== identity_pk[1]; + user_exist.identity_nullifier <== identity_nullifier; + user_exist.identity_trapdoor <== identity_trapdoor; + user_exist.user_tree_root <== user_tree_root; + user_exist.user_state_hash <== user_state_hash; + user_exist.positive_karma <== positive_karma; + user_exist.negative_karma <== negative_karma; + /* End of check 1 */ + + /* 2. Check nonce validity */ var bitsPerNonce = 8; component nonce_lt = LessThan(bitsPerNonce); nonce_lt.in[0] <== nonce; nonce_lt.in[1] <== EPOCH_KEY_NONCE_PER_EPOCH; nonce_lt.out === 1; - /* End of check 1*/ + /* End of check 2*/ - /* 2. Check epoch key is computed correctly */ - // 2.1.1 Compute epoch key + /* 3. Check epoch key is computed correctly */ + // 3.1.1 Compute epoch key component epochKeyHasher = Hasher5(); epochKeyHasher.in[0] <== identity_nullifier; epochKeyHasher.in[1] <== epoch; @@ -28,25 +59,25 @@ template verifyEpochKey(epoch_tree_depth, EPOCH_KEY_NONCE_PER_EPOCH) { epochKeyHasher.in[4] <== 0; signal quotient; - // 2.1.2 Mod epoch key + // 3.1.2 Mod epoch key // circom's best practices state that we should avoid using <-- unless // we know what we are doing. But this is the only way to perform the // modulo operation. quotient <-- epochKeyHasher.hash \ (2 ** epoch_tree_depth); - // 2.1.3 Range check on epoch key + // 3.1.3 Range check on epoch key component epk_lt = LessEqThan(epoch_tree_depth); epk_lt.in[0] <== epoch_key; epk_lt.in[1] <== 2 ** epoch_tree_depth - 1; epk_lt.out === 1; - // 2.1.4 Range check on quotient + // 3.1.4 Range check on quotient component quot_lt = LessEqThan(254 - epoch_tree_depth); quot_lt.in[0] <== quotient; quot_lt.in[1] <== 2 ** (254 - epoch_tree_depth) - 1; quot_lt.out === 1; - // 2.1.5 Check equality + // 3.1.5 Check equality epochKeyHasher.hash === quotient * (2 ** epoch_tree_depth) + epoch_key; - /* End of check 2*/ + /* End of check 3*/ } \ No newline at end of file diff --git a/cli/genEpochKeyAndProof.ts b/cli/genEpochKeyAndProof.ts new file mode 100644 index 0000000..4f24031 --- /dev/null +++ b/cli/genEpochKeyAndProof.ts @@ -0,0 +1,152 @@ +import base64url from 'base64url' +import { ethers as hardhatEthers } from 'hardhat' +import { ethers } from 'ethers' +import { genIdentityCommitment, unSerialiseIdentity } from 'libsemaphore' +import { stringifyBigInts } from 'maci-crypto' + +import { + validateEthAddress, + contractExists, +} from './utils' + +import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' + +import { genEpochKey } from '../test/utils' +import { genUserStateFromContract } from '../core' +import { formatProofForVerifierContract, genVerifyEpochKeyProofAndPublicSignals, verifyEPKProof } from '../test/circuits/utils' + +import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" +import { epkProofPrefix, identityPrefix } from './prefix' + +const configureSubparser = (subparsers: any) => { + const parser = subparsers.addParser( + 'genEpochKeyAndProof', + { addHelp: true }, + ) + + parser.addArgument( + ['-e', '--eth-provider'], + { + action: 'store', + type: 'string', + help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, + } + ) + + parser.addArgument( + ['-id', '--identity'], + { + required: true, + type: 'string', + help: 'The (serialized) user\'s identity', + } + ) + + parser.addArgument( + ['-n', '--epoch-key-nonce'], + { + required: true, + type: 'int', + help: 'The epoch key nonce', + } + ) + + parser.addArgument( + ['-b', '--start-block'], + { + action: 'store', + type: 'int', + help: 'The block the Unirep contract is deployed. Default: 0', + } + ) + + parser.addArgument( + ['-x', '--contract'], + { + required: true, + type: 'string', + help: 'The Unirep contract address', + } + ) +} + +const genEpochKeyAndProof = async (args: any) => { + + // Unirep contract + if (!validateEthAddress(args.contract)) { + console.error('Error: invalid Unirep contract address') + return + } + + const unirepAddress = args.contract + + // Ethereum provider + const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER + + const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) + + if (! await contractExists(provider, unirepAddress)) { + console.error('Error: there is no contract deployed at the specified address') + return + } + + const unirepContract = new ethers.Contract( + unirepAddress, + Unirep.abi, + provider, + ) + const startBlock = (args.start_block) ? args.start_block : DEFAULT_START_BLOCK + + // Validate epoch key nonce + const epkNonce = args.epoch_key_nonce + const numEpochKeyNoncePerEpoch = await unirepContract.numEpochKeyNoncePerEpoch() + if (epkNonce >= numEpochKeyNoncePerEpoch) { + console.error('Error: epoch key nonce must be less than max epoch key nonce') + return + } + + // Gen epoch key + const encodedIdentity = args.identity.slice(identityPrefix.length) + const decodedIdentity = base64url.decode(encodedIdentity) + const id = unSerialiseIdentity(decodedIdentity) + const commitment = genIdentityCommitment(id) + const currentEpoch = (await unirepContract.currentEpoch()).toNumber() + const treeDepths = await unirepContract.treeDepths() + const epochTreeDepth = treeDepths.epochTreeDepth + const epk = genEpochKey(id.identityNullifier, currentEpoch, epkNonce, epochTreeDepth).toString(16) + + // Gen epoch key proof + const userState = await genUserStateFromContract( + provider, + unirepAddress, + startBlock, + id, + commitment, + ) + const circuitInputs = await userState.genVerifyEpochKeyCircuitInputs(epkNonce) + console.log('Proving epoch key...') + console.log('----------------------User State----------------------') + console.log(userState.toJSON(4)) + console.log('------------------------------------------------------') + console.log('----------------------Circuit inputs----------------------') + console.log(circuitInputs) + console.log('----------------------------------------------------------') + const results = await genVerifyEpochKeyProofAndPublicSignals(stringifyBigInts(circuitInputs)) + + // TODO: Not sure if this validation is necessary + const isValid = await verifyEPKProof(results['proof'], results['publicSignals']) + if(!isValid) { + console.error('Error: epoch key proof generated is not valid!') + return + } + + const formattedProof = formatProofForVerifierContract(results["proof"]) + const encodedProof = base64url.encode(JSON.stringify(formattedProof)) + console.log(`Epoch key of epoch ${currentEpoch} and nonce ${epkNonce}: ${epk}`) + console.log(epkProofPrefix + encodedProof) +} + +export { + genEpochKeyAndProof, + configureSubparser, +} \ No newline at end of file diff --git a/cli/index.ts b/cli/index.ts index 2f72aa2..5d608f6 100644 --- a/cli/index.ts +++ b/cli/index.ts @@ -27,10 +27,15 @@ import { configureSubparser as configureSubparserForAttesterSignup, } from './attesterSignUp' -// import { -// genEpochKeyAndProof, -// configureSubparser as configureSubparserForGenEpochKeyAndProof, -// } from './genEpochKeyAndProof' +import { + genEpochKeyAndProof, + configureSubparser as configureSubparserForGenEpochKeyAndProof, +} from './genEpochKeyAndProof' + +import { + verifyEpochKeyProof, + configureSubparser as configureSubparserForVerifyEpochKeyProof, +} from './verifyEpochKeyProof' import { verifyReputationProof, @@ -109,7 +114,10 @@ const main = async () => { configureSubparserForAttesterSignup(subparsers) // Subcommand: genEpochKeyAndProof - // configureSubparserForGenEpochKeyAndProof(subparsers) + configureSubparserForGenEpochKeyAndProof(subparsers) + + // Subcommand: verifyEpochKeyProof + configureSubparserForVerifyEpochKeyProof(subparsers) // Subcommand: verifyReputationProof configureSubparserForVerifyReputationProof(subparsers) @@ -154,8 +162,10 @@ const main = async () => { await userSignup(args) } else if (args.subcommand === 'attesterSignup') { await attesterSignup(args) - // } else if (args.subcommand === 'genEpochKeyAndProof') { - // await genEpochKeyAndProof(args) + } else if (args.subcommand === 'genEpochKeyAndProof') { + await genEpochKeyAndProof(args) + } else if (args.subcommand === 'verifyEpochKeyProof') { + await verifyEpochKeyProof(args) } else if (args.subcommand === 'verifyReputationProof') { await verifyReputationProof(args) } else if (args.subcommand === 'publishPost') { diff --git a/cli/prefix.ts b/cli/prefix.ts index 0842f21..20d8c73 100644 --- a/cli/prefix.ts +++ b/cli/prefix.ts @@ -2,6 +2,8 @@ export const identityPrefix = 'Unirep.identity.' export const identityCommitmentPrefix = 'Unirep.identityCommitment.' +export const epkProofPrefix = 'Unirep.epkProof.' + export const reputationProofPrefix = 'Unirep.reputationProof.' export const reputationProofFromAttesterPrefix = 'Unirep.reputationProofFromAttester.' \ No newline at end of file diff --git a/cli/test/testAllCommands.ts b/cli/test/testAllCommands.ts index ecd1d9c..887766b 100644 --- a/cli/test/testAllCommands.ts +++ b/cli/test/testAllCommands.ts @@ -207,6 +207,42 @@ describe('test all CLI subcommands', function() { }) }) + describe('genEpochKeyAndProof CLI subcommand', () => { + it('should generate epoch key proof', async () => { + const command = `npx ts-node cli/index.ts genEpochKeyAndProof` + + ` -x ${unirepContract.address} ` + + ` -id ${userIdentity1} ` + + ` -n ${epochKeyNonce} ` + + const output = exec(command).stdout.trim() + + console.log(command) + console.log(output) + + const epkRegMatch = output.match(/Epoch key of epoch 1 and nonce 0: ([a-fA-F0-9]+)/) + epk = epkRegMatch[1] + const epkProofRegMatch = output.match(/(Unirep.epkProof.[a-zA-Z0-9\-\_]+)$/) + epkProof = epkProofRegMatch[1] + }) + }) + + describe('verifyEpochKeyProof CLI subcommand', () => { + it('should verify epoch key proof', async () => { + const command = `npx ts-node cli/index.ts verifyEpochKeyProof` + + ` -x ${unirepContract.address} ` + + ` -epk ${epk} ` + + ` -pf ${epkProof} ` + + const output = exec(command).stdout.trim() + + console.log(command) + console.log(output) + + const verifyRegMatch = output.match(/Verify epoch key proof with epoch key [a-fA-F0-9]+ succeed/) + expect(verifyRegMatch).not.equal(null) + }) + }) + describe('publishPost CLI subcommand', () => { it('should publish a post', async () => { const command = `npx ts-node cli/index.ts publishPost` + diff --git a/cli/verifyEpochKeyProof.ts b/cli/verifyEpochKeyProof.ts new file mode 100644 index 0000000..fa67d04 --- /dev/null +++ b/cli/verifyEpochKeyProof.ts @@ -0,0 +1,127 @@ +import base64url from 'base64url' +import { ethers as hardhatEthers } from 'hardhat' +import { ethers } from 'ethers' + +import { + validateEthAddress, + contractExists, +} from './utils' + +import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' + +import { genUnirepStateFromContract } from '../core' +import { add0x } from '../crypto/SMT' + +import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" +import { epkProofPrefix } from './prefix' + +const configureSubparser = (subparsers: any) => { + const parser = subparsers.addParser( + 'verifyEpochKeyProof', + { addHelp: true }, + ) + + parser.addArgument( + ['-e', '--eth-provider'], + { + action: 'store', + type: 'string', + help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, + } + ) + + parser.addArgument( + ['-epk', '--epoch-key'], + { + required: true, + type: 'string', + help: 'The user\'s epoch key (in hex representation)', + } + ) + + parser.addArgument( + ['-pf', '--proof'], + { + required: true, + type: 'string', + help: 'The snark proof of the user\'s epoch key ', + } + ) + + parser.addArgument( + ['-b', '--start-block'], + { + action: 'store', + type: 'int', + help: 'The block the Unirep contract is deployed. Default: 0', + } + ) + + parser.addArgument( + ['-x', '--contract'], + { + required: true, + type: 'string', + help: 'The Unirep contract address', + } + ) +} + +const verifyEpochKeyProof = async (args: any) => { + + // Unirep contract + if (!validateEthAddress(args.contract)) { + console.error('Error: invalid Unirep contract address') + return + } + + const unirepAddress = args.contract + + // Ethereum provider + const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER + + const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) + + if (! await contractExists(provider, unirepAddress)) { + console.error('Error: there is no contract deployed at the specified address') + return + } + + const startBlock = (args.start_block) ? args.start_block : DEFAULT_START_BLOCK + const unirepState = await genUnirepStateFromContract( + provider, + unirepAddress, + startBlock, + ) + + const currentEpoch = unirepState.currentEpoch + const GSTRoot = unirepState.genGSTree(currentEpoch).root + const epk = BigInt(add0x(args.epoch_key)) + const decodedProof = base64url.decode(args.proof.slice(epkProofPrefix.length)) + const proof = JSON.parse(decodedProof) + const publicInput = [ + GSTRoot, + currentEpoch, + epk, + ] + + const unirepContract = new ethers.Contract( + unirepAddress, + Unirep.abi, + provider, + ) + const isProofValid = await unirepContract.verifyEpochKeyValidity( + publicInput, + proof, + ) + if (!isProofValid) { + console.error('Error: invalid epoch key proof') + return + } + console.log(`Verify epoch key proof with epoch key ${args.epoch_key} succeed`) +} + +export { + verifyEpochKeyProof, + configureSubparser, +} \ No newline at end of file diff --git a/core/UserState.ts b/core/UserState.ts index 122c673..39d8e15 100644 --- a/core/UserState.ts +++ b/core/UserState.ts @@ -300,19 +300,29 @@ class UserState { const epoch = this.latestTransitionedEpoch const epochKey = genEpochKey(this.id.identityNullifier, epoch, epochKeyNonce, this.unirepState.epochTreeDepth) + const userStateTree = await this.genUserStateTree() + const hashedLeaf = hash5([ + this.commitment, + userStateTree.getRootHash(), + BigInt(this.transitionedPosRep), + BigInt(this.transitionedNegRep), + BigInt(0) + ]) + const GSTree = this.unirepState.genGSTree(epoch) const GSTProof = GSTree.genMerklePath(this.latestGSTLeafIndex) return stringifyBigInts({ + GST_path_elements: GSTProof.pathElements, + GST_path_index: GSTProof.indices, + GST_root: GSTree.root, identity_pk: this.id.keypair.pubKey, identity_nullifier: this.id.identityNullifier, identity_trapdoor: this.id.identityTrapdoor, - user_state_root: (await this.genUserStateTree()).getRootHash(), - path_elements: GSTProof.pathElements, - path_index: GSTProof.indices, + user_tree_root: userStateTree.getRootHash(), + user_state_hash: hashedLeaf, positive_karma: this.transitionedPosRep, negative_karma: this.transitionedNegRep, - root: GSTree.root, nonce: epochKeyNonce, epoch: epoch, epoch_key: epochKey, diff --git a/test/integration/Integration.ts b/test/integration/Integration.ts index a0e541f..ee6f6d4 100644 --- a/test/integration/Integration.ts +++ b/test/integration/Integration.ts @@ -11,7 +11,7 @@ const { expect } = chai import { Attestation, IAttestation, IEpochTreeLeaf, IUserStateLeaf, UnirepState, UserState, genUserStateFromContract } from "../../core" import { compileAndLoadCircuit, formatProofForVerifierContract, genVerifyEpochKeyProofAndPublicSignals, genVerifyReputationProofAndPublicSignals, genVerifyReputationFromAttesterProofAndPublicSignals, genVerifyUserStateTransitionProofAndPublicSignals, getSignalByName, getSignalByNameViaSym, verifyEPKProof, verifyProveReputationProof, verifyUserStateTransitionProof, verifyProveReputationFromAttesterProof } from "../circuits/utils" -import { DEFAULT_AIRDROPPED_KARMA, DEFAULT_POST_KARMA } from '../../config/socialMedia' +import { DEFAULT_AIRDROPPED_KARMA, DEFAULT_COMMENT_KARMA, DEFAULT_POST_KARMA } from '../../config/socialMedia' import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from '../../cli/defaults' import { add0x } from '../../crypto/SMT' @@ -39,6 +39,11 @@ describe('Integration', function () { let duplicatedProofInputs + let postId = '123456' + let commentId = '654321' + let postText = 'postText' + let commentText = 'commentText' + before(async () => { accounts = await hardhatEthers.getSigners() @@ -322,6 +327,32 @@ describe('Integration', function () { console.log(`First attester signs up, attester id: ${attesters[0].id}`) }) + it('first user generate an epoch key and verify it', async () => { + const epochKeyNonce = 0 + const epk = genEpochKey(users[0].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth).toString(16) + + const circuitInputs = await users[0].genVerifyEpochKeyCircuitInputs( + epochKeyNonce, // generate epoch key from epoch nonce + ) + const results = await genVerifyEpochKeyProofAndPublicSignals(stringifyBigInts(circuitInputs)) + + const isValid = await verifyEPKProof(results['proof'], results['publicSignals']) + expect(isValid, 'Verify epoch key proof off-chain failed').to.be.true + + // Verify on-chain + const proof = formatProofForVerifierContract(results['proof']) + const epochKey = BigInt(add0x(epk)) + const publicSignals = results['publicSignals'] + + const firstUserEpochKey = genEpochKey(users[0].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth) + const isProofValid = await unirepContract.verifyEpochKeyValidity( + publicSignals, + proof + ) + console.log(`Verifying epk proof with epoch ${currentEpoch} and epk ${firstUserEpochKey}`) + expect(isProofValid, 'Verify reputation proof on-chain failed').to.be.true + }) + it('first user publish a post and generate epoch key', async () => { const epochKeyNonce = 0 const epk = genEpochKey(users[0].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth).toString(16) @@ -380,9 +411,9 @@ describe('Integration', function () { ) const tx = await unirepContractCalledByFirstAttester.publishPost( - BigInt(add0x('12356')), + BigInt(add0x(postId)), epochKey, - 'postText', + postText, publicSignals, proof, nullifiers, @@ -493,103 +524,6 @@ describe('Integration', function () { } }) - // it('Second attester attest to first user', async () => { - // const nonce = 0 - // const firstUserEpochKey = genEpochKey(users[0].id.identityNullifier, currentEpoch.toNumber(), nonce, circuitEpochTreeDepth) - // const graffitiPreImage = genRandomSalt() - // const attestation: Attestation = new Attestation( - // attesters[1].id, - // BigInt(3), - // BigInt(1), - // hashOne(graffitiPreImage), - // true, - // ) - // // Add graffiti pre-image to graffitiPreImageMap - // graffitiPreImageMap[0][attestation.attesterId.toString()] = graffitiPreImage - // console.log(`Attester attest to epk ${firstUserEpochKey} with ${attestation.toJSON()}`) - // const tx = await unirepContractCalledBySecondAttester.submitAttestation( - // attestation, - // firstUserEpochKey, - // { value: attestingFee } - // ) - // const receipt = await tx.wait() - // expect(receipt.status, 'Submit attestation failed').to.equal(1) - - // unirepState.addAttestation(firstUserEpochKey.toString(), attestation) - // }) - - // it('Verify epoch key of second user', async () => { - // const epochKeyNonce = 0 - // const circuitInputs = await users[1].genVerifyEpochKeyCircuitInputs(epochKeyNonce) - // const results = await genVerifyEpochKeyProofAndPublicSignals(stringifyBigInts(circuitInputs)) - // const isValid = await verifyEPKProof(results['proof'], results['publicSignals']) - // expect(isValid, 'Verify epk proof off-chain failed').to.be.true - - // // Verify on-chain - // const GSTree = unirepState.genGSTree(currentEpoch.toNumber()) - // const secondUserEpochKey = genEpochKey(users[1].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth) - // const isProofValid = await unirepContract.verifyEpochKeyValidity( - // GSTree.root, - // currentEpoch, - // secondUserEpochKey, - // formatProofForVerifierContract(results['proof']), - // ) - // console.log(`Verifying epk proof with GSTreeRoot ${GSTree.root}, epoch ${currentEpoch} and epk ${secondUserEpochKey}`) - // expect(isProofValid, 'Verify epk proof on-chain failed').to.be.true - // }) - - // it('First attester attest to second user', async () => { - // const nonce = 0 - // const secondUserEpochKey = genEpochKey(users[1].id.identityNullifier, currentEpoch.toNumber(), nonce, circuitEpochTreeDepth) - // const graffitiPreImage = genRandomSalt() - // const attestation: Attestation = new Attestation( - // attesters[0].id, - // BigInt(2), - // BigInt(6), - // hashOne(graffitiPreImage), - // true, - // ) - // // Add graffiti pre-image to graffitiPreImageMap - // graffitiPreImageMap[1] = new Object() - // graffitiPreImageMap[1][attestation.attesterId.toString()] = graffitiPreImage - // console.log(`Attester attest to epk ${secondUserEpochKey} with ${attestation.toJSON()}`) - // const tx = await unirepContractCalledByFirstAttester.submitAttestation( - // attestation, - // secondUserEpochKey, - // { value: attestingFee } - // ) - // const receipt = await tx.wait() - // expect(receipt.status, 'Submit attestation failed').to.equal(1) - - // secondEpochEpochKeys.push(secondUserEpochKey.toString()) - // unirepState.addAttestation(secondUserEpochKey.toString(), attestation) - // }) - - // it('Second attester attest to second user', async () => { - // const nonce = 0 - // const secondUserEpochKey = genEpochKey(users[1].id.identityNullifier, currentEpoch.toNumber(), nonce, circuitEpochTreeDepth) - // const graffitiPreImage = genRandomSalt() - // const attestation: Attestation = new Attestation( - // attesters[1].id, - // BigInt(0), - // BigInt(3), - // hashOne(graffitiPreImage), - // true, - // ) - // // Add graffiti pre-image to graffitiPreImageMap - // graffitiPreImageMap[0][attestation.attesterId.toString()] = graffitiPreImage - // console.log(`Attester attest to epk ${secondUserEpochKey} with ${attestation.toJSON()}`) - // const tx = await unirepContractCalledBySecondAttester.submitAttestation( - // attestation, - // secondUserEpochKey, - // { value: attestingFee } - // ) - // const receipt = await tx.wait() - // expect(receipt.status, 'Submit attestation failed').to.equal(1) - - // unirepState.addAttestation(secondUserEpochKey.toString(), attestation) - // }) - it('Attestations gathered from events should match', async () => { // First filter by epoch const attestationsByEpochFilter = unirepContract.filters.AttestationSubmitted(currentEpoch) @@ -660,6 +594,7 @@ describe('Integration', function () { }) describe('Third epoch', () => { + const thirdEpochEpochKeys: string[] = [] it('begin second epoch epoch transition', async () => { prevEpoch = currentEpoch // Fast-forward epochLength of seconds @@ -848,6 +783,84 @@ describe('Integration', function () { expect(isProofValid, 'Verify reputation on-chain failed').to.be.true }) + it('first user leave a comment and generate epoch key', async () => { + const epochKeyNonce = 0 + const epk = genEpochKey(users[0].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth).toString(16) + + // gen nullifier nonce list + const proveKarmaNullifiers = BigInt(1) + const proveKarmaAmount = BigInt(DEFAULT_POST_KARMA) + const nonceStarter: number = 0 + const nonceList: BigInt[] = [] + for (let i = 0; i < DEFAULT_POST_KARMA; i++) { + nonceList.push( BigInt(nonceStarter + i) ) + } + + // gen minRep proof + const proveMinRep = BigInt(0) + const minRep = BigInt(0) + + const circuitInputs = await users[0].genProveReputationCircuitInputs( + epochKeyNonce, // generate epoch key from epoch nonce + proveKarmaNullifiers, // indicate to prove karma nullifiers + proveKarmaAmount, // the amount of output karma nullifiers + nonceList, // nonce to generate karma nullifiers + proveMinRep, // indicate to prove minimum reputation the user has + minRep // the amount of minimum reputation the user wants to prove + ) + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + + const nullifiers: BigInt[] = [] + + for (let i = 0; i < DEFAULT_COMMENT_KARMA; i++) { + const variableName = 'main.karma_nullifiers['+i+']' + nullifiers.push(getSignalByNameViaSym('proveReputation', results['witness'], variableName) % BigInt(2 ** circuitNullifierTreeDepth) ) + } + const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) + expect(isValid, 'Verify reputation proof off-chain failed').to.be.true + + // Verify on-chain + const proof = formatProofForVerifierContract(results['proof']) + const epochKey = BigInt(add0x(epk)) + const publicSignals = results['publicSignals'] + + const firstUserEpochKey = genEpochKey(users[0].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth) + const isProofValid = await unirepContract.verifyReputation( + publicSignals, + proof + ) + console.log(`Verifying epk proof with epoch ${currentEpoch} and epk ${firstUserEpochKey}`) + expect(isProofValid, 'Verify reputation proof on-chain failed').to.be.true + + const attestationToEpochKey = new Attestation( + BigInt(attesters[0].id), + BigInt(0), + BigInt(DEFAULT_COMMENT_KARMA), + BigInt(0), + false, + ) + + const tx = await unirepContractCalledByFirstAttester.leaveComment( + BigInt(add0x(postId)), + BigInt(add0x(commentId)), + epochKey, + commentText, + publicSignals, + proof, + nullifiers, + { value: attestingFee, gasLimit: 1000000 } + ) + + const receipt = await tx.wait() + expect(receipt.status, 'Submit comment failed').to.equal(1) + + thirdEpochEpochKeys.push(firstUserEpochKey.toString()) + unirepState.addAttestation(firstUserEpochKey.toString(), attestationToEpochKey) + for(const user of users){ + user.updateAttestation(firstUserEpochKey, attestationToEpochKey.posRep, attestationToEpochKey.negRep) + } + }) + it('First user submits duplicated state transition proof', async () => { let tx = await unirepContract.updateUserStateRoot( duplicatedProofInputs["newGSTLeaf"], From 396a033ed5d66e6d0cc9a0d3b9635e72de18f62f Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Wed, 5 May 2021 21:23:52 +0800 Subject: [PATCH 21/38] fix test scripts --- .DS_Store | Bin 8196 -> 8196 bytes circuits/proveReputationFromAttester.circom | 34 +- circuits/userStateTransition.circom | 3 +- cli/genEpochKeyAndProof.ts | 7 - cli/leaveComment.ts | 38 +- cli/publishPost.ts | 26 +- cli/vote.ts | 34 +- core/UserState.ts | 27 +- database/utils.ts | 27 +- test/circuits/proveReputation.ts | 330 ++++++---- test/circuits/proveReputationFromAttester.ts | 641 +++++++++++++++++++ test/circuits/userStateTransition.ts | 43 +- test/circuits/verifyEpochKey.ts | 83 ++- test/integration/Integration.ts | 45 +- 14 files changed, 1034 insertions(+), 304 deletions(-) create mode 100644 test/circuits/proveReputationFromAttester.ts diff --git a/.DS_Store b/.DS_Store index e715b3f3c81d8ac0cda6a8d1c5cd7da327a1758b..ce3c5f24e76c9c16e8d2512a45120ee28c783ed3 100644 GIT binary patch delta 54 zcmZp1XmOa}&nUJrU^hRb*km37bIBxzQie>19EKFnoc!dZoctsP1_l8jUccE$;4|}P If03=+0HBW#761SM delta 33 ncmZp1XmOa}&nUVvU^hRb=wu!N^Ub*ekC->B@&E~TiNEXsxpxZr diff --git a/circuits/proveReputationFromAttester.circom b/circuits/proveReputationFromAttester.circom index 029dab2..4c0aa05 100644 --- a/circuits/proveReputationFromAttester.circom +++ b/circuits/proveReputationFromAttester.circom @@ -133,39 +133,39 @@ template proveReputationFromAttester(GST_tree_depth, user_state_tree_depth, null // if prove_pos_rep == TRUE then check GT // else return TRUE component if_check_pos_rep = Mux1(); - component pos_rep_gt = GreaterThan(MAX_REPUTATION_SCORE_BITS); - pos_rep_gt.in[0] <== pos_rep; - pos_rep_gt.in[1] <== min_pos_rep; + component pos_rep_get = GreaterEqThan(MAX_REPUTATION_SCORE_BITS); + pos_rep_get.in[0] <== pos_rep; + pos_rep_get.in[1] <== min_pos_rep; if_check_pos_rep.c[0] <== 1; - if_check_pos_rep.c[1] <== pos_rep_gt.out; + if_check_pos_rep.c[1] <== pos_rep_get.out; if_check_pos_rep.s <== prove_pos_rep; if_check_pos_rep.out === 1; component if_check_neg_rep = Mux1(); - component neg_rep_lt = LessThan(MAX_REPUTATION_SCORE_BITS); - neg_rep_lt.in[0] <== neg_rep; - neg_rep_lt.in[1] <== max_neg_rep; + component neg_rep_let = LessEqThan(MAX_REPUTATION_SCORE_BITS); + neg_rep_let.in[0] <== neg_rep; + neg_rep_let.in[1] <== max_neg_rep; if_check_neg_rep.c[0] <== 1; - if_check_neg_rep.c[1] <== neg_rep_lt.out; + if_check_neg_rep.c[1] <== neg_rep_let.out; if_check_neg_rep.s <== prove_neg_rep; if_check_neg_rep.out === 1; // only valid if pos_rep >= neg_rep component if_check_pos_get = Mux1(); component if_check_diff_gt = Mux1(); - component rep_diff_get = GreaterEqThan(MAX_REPUTATION_SCORE_BITS); - rep_diff_get.in[0] <== pos_rep; - rep_diff_get.in[1] <== neg_rep; + component rep_diff_get_zero = GreaterEqThan(MAX_REPUTATION_SCORE_BITS); + rep_diff_get_zero.in[0] <== pos_rep; + rep_diff_get_zero.in[1] <== neg_rep; if_check_pos_get.c[0] <== 1; - if_check_pos_get.c[1] <== rep_diff_get.out; + if_check_pos_get.c[1] <== rep_diff_get_zero.out; if_check_pos_get.s <== prove_rep_diff; if_check_pos_get.out === 1; - // // check if (pos_rep - neg_rep) > min_rep_diff - component rep_diff_gt = GreaterThan(MAX_REPUTATION_SCORE_BITS); - rep_diff_gt.in[0] <== pos_rep - neg_rep; - rep_diff_gt.in[1] <== min_rep_diff; + // // check if (pos_rep - neg_rep) >= min_rep_diff + component rep_diff_get = GreaterEqThan(MAX_REPUTATION_SCORE_BITS); + rep_diff_get.in[0] <== pos_rep - neg_rep; + rep_diff_get.in[1] <== min_rep_diff; if_check_diff_gt.c[0] <== 1; - if_check_diff_gt.c[1] <== rep_diff_gt.out; + if_check_diff_gt.c[1] <== rep_diff_get.out; if_check_diff_gt.s <== prove_rep_diff; if_check_diff_gt.out === 1; /* End of check 5 */ diff --git a/circuits/userStateTransition.circom b/circuits/userStateTransition.circom index 573f74f..285664d 100644 --- a/circuits/userStateTransition.circom +++ b/circuits/userStateTransition.circom @@ -64,7 +64,6 @@ template UserStateTransition( signal private input identity_pk[2]; signal private input identity_nullifier; signal private input identity_trapdoor; - signal private input user_tree_root; signal private input user_state_hash; // Sum of positive and negative karma signal private input old_positive_karma; @@ -119,7 +118,7 @@ template UserStateTransition( user_exist.identity_pk[1] <== identity_pk[1]; user_exist.identity_nullifier <== identity_nullifier; user_exist.identity_trapdoor <== identity_trapdoor; - user_exist.user_tree_root <== user_tree_root; + user_exist.user_tree_root <== intermediate_user_state_tree_roots[0]; user_exist.user_state_hash <== user_state_hash; user_exist.positive_karma <== old_positive_karma; user_exist.negative_karma <== old_negative_karma; diff --git a/cli/genEpochKeyAndProof.ts b/cli/genEpochKeyAndProof.ts index 4f24031..09631c6 100644 --- a/cli/genEpochKeyAndProof.ts +++ b/cli/genEpochKeyAndProof.ts @@ -124,13 +124,6 @@ const genEpochKeyAndProof = async (args: any) => { commitment, ) const circuitInputs = await userState.genVerifyEpochKeyCircuitInputs(epkNonce) - console.log('Proving epoch key...') - console.log('----------------------User State----------------------') - console.log(userState.toJSON(4)) - console.log('------------------------------------------------------') - console.log('----------------------Circuit inputs----------------------') - console.log(circuitInputs) - console.log('----------------------------------------------------------') const results = await genVerifyEpochKeyProofAndPublicSignals(stringifyBigInts(circuitInputs)) // TODO: Not sure if this validation is necessary diff --git a/cli/leaveComment.ts b/cli/leaveComment.ts index 16162bd..78a5108 100644 --- a/cli/leaveComment.ts +++ b/cli/leaveComment.ts @@ -200,18 +200,10 @@ const leaveComment = async (args: any) => { const epochTreeDepth = treeDepths.epochTreeDepth const epk = genEpochKey(id.identityNullifier, currentEpoch, epkNonce, epochTreeDepth).toString(16) - // gen nullifier nonce list - const proveKarmaNullifiers = BigInt(1) - const proveKarmaAmount = BigInt(DEFAULT_COMMENT_KARMA) + // gen reputation proof + const proveKarmaAmount = DEFAULT_COMMENT_KARMA const nonceStarter: number = args.karma_nonce - const nonceList: BigInt[] = [] - for (let i = 0; i < DEFAULT_COMMENT_KARMA; i++) { - nonceList.push( BigInt(nonceStarter + i) ) - } - - // gen minRep proof - const proveMinRep = args.min_rep != null ? BigInt(1) : BigInt(0) - const minRep = args.min_rep != null ? BigInt(args.min_rep) : BigInt(0) + const minRep = args.min_rep != null ? args.min_rep : 0 let circuitInputs: any @@ -219,16 +211,14 @@ const leaveComment = async (args: any) => { console.log('generating proving circuit from database...') - // Gen epoch key proof and reputation proof from database + // Gen epoch key proof and reputation proof from database circuitInputs = await genProveReputationCircuitInputsFromDB( - currentEpoch, - id, - epkNonce, // generate epoch key from epoch nonce - proveKarmaNullifiers, // indicate to prove karma nullifiers - proveKarmaAmount, // the amount of output karma nullifiers - nonceList, // nonce to generate karma nullifiers - proveMinRep, // indicate to prove minimum reputation the user has - minRep // the amount of minimum reputation the user wants to prove + currentEpoch, + id, + epkNonce, // generate epoch key from epoch nonce + proveKarmaAmount, // the amount of output karma nullifiers + nonceStarter, // nonce to generate karma nullifiers + minRep // the amount of minimum reputation the user wants to prove ) } else { @@ -246,10 +236,8 @@ const leaveComment = async (args: any) => { circuitInputs = await userState.genProveReputationCircuitInputs( epkNonce, // generate epoch key from epoch nonce - proveKarmaNullifiers, // indicate to prove karma nullifiers proveKarmaAmount, // the amount of output karma nullifiers - nonceList, // nonce to generate karma nullifiers - proveMinRep, // indicate to prove minimum reputation the user has + nonceStarter, // nonce to generate karma nullifiers minRep // the amount of minimum reputation the user wants to prove ) } @@ -275,7 +263,7 @@ const leaveComment = async (args: any) => { const publicSignals = results['publicSignals'] - if(proveMinRep){ + if(args.min_rep != null){ console.log(`Prove minimum reputation: ${minRep}`) } @@ -284,7 +272,7 @@ const leaveComment = async (args: any) => { // TODO: hashedContent epochKey: epk, epkProof: base64url.encode(JSON.stringify(proof)), - proveMinRep: Boolean(proveMinRep), + proveMinRep: args.min_rep != null ? true : false, minRep: Number(minRep), comments: [], status: 0 diff --git a/cli/publishPost.ts b/cli/publishPost.ts index 4955f6d..870bf2f 100644 --- a/cli/publishPost.ts +++ b/cli/publishPost.ts @@ -190,18 +190,10 @@ const publishPost = async (args: any) => { const epochTreeDepth = treeDepths.epochTreeDepth const epk = genEpochKey(id.identityNullifier, currentEpoch, epkNonce, epochTreeDepth).toString(16) - // gen nullifier nonce list - const proveKarmaNullifiers = BigInt(1) - const proveKarmaAmount = BigInt(DEFAULT_POST_KARMA) + // gen reputation proof + const proveKarmaAmount = DEFAULT_POST_KARMA const nonceStarter: number = args.karma_nonce - const nonceList: BigInt[] = [] - for (let i = 0; i < DEFAULT_POST_KARMA; i++) { - nonceList.push( BigInt(nonceStarter + i) ) - } - - // gen minRep proof - const proveMinRep = args.min_rep != null ? BigInt(1) : BigInt(0) - const minRep = args.min_rep != null ? BigInt(args.min_rep) : BigInt(0) + const minRep = args.min_rep != null ? args.min_rep : 0 let circuitInputs: any @@ -214,10 +206,8 @@ const publishPost = async (args: any) => { currentEpoch, id, epkNonce, // generate epoch key from epoch nonce - proveKarmaNullifiers, // indicate to prove karma nullifiers proveKarmaAmount, // the amount of output karma nullifiers - nonceList, // nonce to generate karma nullifiers - proveMinRep, // indicate to prove minimum reputation the user has + nonceStarter, // nonce to generate karma nullifiers minRep // the amount of minimum reputation the user wants to prove ) @@ -236,10 +226,8 @@ const publishPost = async (args: any) => { circuitInputs = await userState.genProveReputationCircuitInputs( epkNonce, // generate epoch key from epoch nonce - proveKarmaNullifiers, // indicate to prove karma nullifiers proveKarmaAmount, // the amount of output karma nullifiers - nonceList, // nonce to generate karma nullifiers - proveMinRep, // indicate to prove minimum reputation the user has + nonceStarter, // nonce to generate karma nullifiers minRep // the amount of minimum reputation the user wants to prove ) } @@ -265,7 +253,7 @@ const publishPost = async (args: any) => { const publicSignals = results['publicSignals'] - if(proveMinRep){ + if(args.min_rep != null){ console.log(`Prove minimum reputation: ${minRep}`) } @@ -274,7 +262,7 @@ const publishPost = async (args: any) => { // TODO: hashedContent epochKey: epk, epkProof: base64url.encode(JSON.stringify(proof)), - proveMinRep: Boolean(proveMinRep), + proveMinRep: args.min_rep != null ? true : false, minRep: Number(minRep), comments: [], status: 0 diff --git a/cli/vote.ts b/cli/vote.ts index 5b387df..7aea35f 100644 --- a/cli/vote.ts +++ b/cli/vote.ts @@ -240,17 +240,9 @@ const vote = async (args: any) => { const epk = genEpochKey(id.identityNullifier, currentEpoch, epkNonce, epochTreeDepth) // gen nullifier nonce list - const proveKarmaNullifiers = BigInt(1) - const proveKarmaAmount = BigInt(voteValue) + const proveKarmaAmount = voteValue const nonceStarter: number = args.karma_nonce - const nonceList: BigInt[] = [] - for (let i = 0; i < voteValue; i++) { - nonceList.push( BigInt(nonceStarter + i) ) - } - - // gen minRep proof - const proveMinRep = args.min_rep != null ? BigInt(1) : BigInt(0) - const minRep = args.min_rep != null ? BigInt(args.min_rep) : BigInt(0) + const minRep = args.min_rep != null ? args.min_rep : 0 let circuitInputs: any @@ -258,16 +250,14 @@ const vote = async (args: any) => { console.log('generating proving circuit from database...') - // Gen epoch key proof and reputation proof from database + // Gen epoch key proof and reputation proof from database circuitInputs = await genProveReputationCircuitInputsFromDB( - currentEpoch, - id, - epkNonce, // generate epoch key from epoch nonce - proveKarmaNullifiers, // indicate to prove karma nullifiers - proveKarmaAmount, // the amount of output karma nullifiers - nonceList, // nonce to generate karma nullifiers - proveMinRep, // indicate to prove minimum reputation the user has - minRep // the amount of minimum reputation the user wants to prove + currentEpoch, + id, + epkNonce, // generate epoch key from epoch nonce + proveKarmaAmount, // the amount of output karma nullifiers + nonceStarter, // nonce to generate karma nullifiers + minRep // the amount of minimum reputation the user wants to prove ) } else { @@ -285,10 +275,8 @@ const vote = async (args: any) => { circuitInputs = await userState.genProveReputationCircuitInputs( epkNonce, // generate epoch key from epoch nonce - proveKarmaNullifiers, // indicate to prove karma nullifiers proveKarmaAmount, // the amount of output karma nullifiers - nonceList, // nonce to generate karma nullifiers - proveMinRep, // indicate to prove minimum reputation the user has + nonceStarter, // nonce to generate karma nullifiers minRep // the amount of minimum reputation the user wants to prove ) } @@ -314,7 +302,7 @@ const vote = async (args: any) => { const publicSignals = results['publicSignals'] - if(proveMinRep){ + if(args.min_rep != null){ console.log(`Prove minimum reputation: ${minRep}`) } diff --git a/core/UserState.ts b/core/UserState.ts index 39d8e15..64a2f7d 100644 --- a/core/UserState.ts +++ b/core/UserState.ts @@ -494,7 +494,6 @@ class UserState { identity_pk: this.id.keypair.pubKey, identity_nullifier: this.id.identityNullifier, identity_trapdoor: this.id.identityTrapdoor, - user_tree_root: userStateTree.getRootHash(), user_state_hash: hashedLeaf, old_positive_karma: BigInt(this.transitionedPosRep), old_negative_karma: BigInt(this.transitionedNegRep), @@ -542,11 +541,9 @@ class UserState { public genProveReputationCircuitInputs = async ( epochKeyNonce: number, - proveKarmaNullifiers: BigInt, - proveKarmaAmount: BigInt, - karmaNonceList: BigInt[], - proveMinRep: BigInt, - minRep: BigInt, + proveKarmaAmount: number, + nonceStarter: number, + minRep: number, ) => { assert(this.hasSignedUp, "User has not signed up yet") assert(epochKeyNonce < this.numEpochKeyNoncePerEpoch, `epochKeyNonce(${epochKeyNonce}) must be less than max epoch nonce`) @@ -570,11 +567,13 @@ class UserState { BigInt(0) ]) const selectors: BigInt[] = [] - for (let i = 0; i < karmaNonceList.length; i++) { + const nonceList: BigInt[] = [] + for (let i = 0; i < proveKarmaAmount; i++) { + nonceList.push( BigInt(nonceStarter + i) ) selectors.push(BigInt(1)); } - for (let i = karmaNonceList.length ; i < MAX_KARMA_BUDGET; i++) { - karmaNonceList.push(BigInt(0)) + for (let i = proveKarmaAmount ; i < MAX_KARMA_BUDGET; i++) { + nonceList.push(BigInt(0)) selectors.push(BigInt(0)) } @@ -596,11 +595,11 @@ class UserState { selectors: selectors, positive_karma: BigInt(this.transitionedPosRep), negative_karma: BigInt(this.transitionedNegRep), - prove_karma_nullifiers: proveKarmaNullifiers, - prove_karma_amount: proveKarmaAmount, - karma_nonce: karmaNonceList, - prove_min_rep: proveMinRep, - min_rep: minRep + prove_karma_nullifiers: BigInt(Boolean(proveKarmaAmount)), + prove_karma_amount: BigInt(proveKarmaAmount), + karma_nonce: nonceList, + prove_min_rep: BigInt(Boolean(minRep)), + min_rep: BigInt(minRep) }) } diff --git a/database/utils.ts b/database/utils.ts index 40ee976..7cbbbcc 100644 --- a/database/utils.ts +++ b/database/utils.ts @@ -454,11 +454,9 @@ const genProveReputationCircuitInputsFromDB = async ( epoch: number, id: any, epochKeyNonce: number, - proveKarmaNullifiers: BigInt, - proveKarmaAmount: BigInt, - karmaNonceList: BigInt[], - proveMinRep: BigInt, - minRep: BigInt, + proveKarmaAmount: number, + nonceStarter: number, + minRep: number, ) => { const db = await mongoose.connect( dbUri, @@ -496,11 +494,13 @@ const genProveReputationCircuitInputsFromDB = async ( BigInt(0) ]) const selectors: BigInt[] = [] - for (let i = 0; i < karmaNonceList.length; i++) { + const nonceList: BigInt[] = [] + for (let i = 0; i < proveKarmaAmount; i++) { + nonceList.push( BigInt(nonceStarter + i) ) selectors.push(BigInt(1)); } - for (let i = karmaNonceList.length ; i < MAX_KARMA_BUDGET; i++) { - karmaNonceList.push(BigInt(0)) + for (let i = proveKarmaAmount ; i < MAX_KARMA_BUDGET; i++) { + nonceList.push(BigInt(0)) selectors.push(BigInt(0)) } @@ -524,11 +524,11 @@ const genProveReputationCircuitInputsFromDB = async ( selectors: selectors, positive_karma: userState[epoch].transitionedPosRep, negative_karma: userState[epoch].transitionedNegRep, - prove_karma_nullifiers: proveKarmaNullifiers, - prove_karma_amount: proveKarmaAmount, - karma_nonce: karmaNonceList, - prove_min_rep: proveMinRep, - min_rep: minRep + prove_karma_nullifiers: BigInt(Boolean(proveKarmaAmount)), + prove_karma_amount: BigInt(proveKarmaAmount), + karma_nonce: nonceList, + prove_min_rep: BigInt(Boolean(minRep)), + min_rep: BigInt(minRep) }) } @@ -786,7 +786,6 @@ const genUserStateTransitionCircuitInputsFromDB = async ( identity_pk: id.keypair.pubKey, identity_nullifier: id.identityNullifier, identity_trapdoor: id.identityTrapdoor, - user_tree_root: userStateTreeRoot, user_state_hash: hashedLeaf, old_positive_karma: transitionedPosRep, old_negative_karma: transitionedNegRep, diff --git a/test/circuits/proveReputation.ts b/test/circuits/proveReputation.ts index 3e7acc0..a41fa17 100644 --- a/test/circuits/proveReputation.ts +++ b/test/circuits/proveReputation.ts @@ -22,6 +22,7 @@ import { genIdentity, genIdentityCommitment } from 'libsemaphore' import { SparseMerkleTreeImpl } from "../../crypto/SMT" import { circuitEpochTreeDepth, circuitGlobalStateTreeDepth, circuitNullifierTreeDepth, circuitUserStateTreeDepth } from "../../config/testLocal" import { Reputation } from "../../core" +import { MAX_KARMA_BUDGET } from "../../config/socialMedia" describe('Prove reputation from attester circuit', function () { this.timeout(300000) @@ -37,10 +38,18 @@ describe('Prove reputation from attester circuit', function () { let userStateTree: SparseMerkleTreeImpl, userStateRoot let nullifierTree: SparseMerkleTreeImpl, nullifierTreeRoot, epkNullifierProof let epkNullifier + let hashedLeaf let reputationRecords = {} const MIN_POS_REP = 10 const MAX_NEG_REP = 10 + const transitionedPosRep = 5 + const transitionedNegRep = 0 + const proveKarmaAmount = 3 + const epochKeyNonce = 0 + const epochKey = genEpochKey(user['identityNullifier'], epoch, epochKeyNonce, circuitEpochTreeDepth) + const nonceStarter = 0 + let minRep = null before(async () => { const startCompileTime = Math.floor(new Date().getTime() / 1000) @@ -69,8 +78,14 @@ describe('Prove reputation from attester circuit', function () { // Global state tree GSTree = new IncrementalQuinTree(circuitGlobalStateTreeDepth, GSTZERO_VALUE, 2) const commitment = genIdentityCommitment(user) - const hashedStateLeaf = hashLeftRight(commitment, userStateRoot) - GSTree.insert(hashedStateLeaf) + hashedLeaf = hash5([ + commitment, + userStateRoot, + BigInt(transitionedPosRep), + BigInt(transitionedNegRep), + BigInt(0) + ]) + GSTree.insert(hashedLeaf) GSTreeProof = GSTree.genMerklePath(0) GSTreeRoot = GSTree.root @@ -85,7 +100,16 @@ describe('Prove reputation from attester circuit', function () { it('successfully prove reputation', async () => { const attesterIds = Object.keys(reputationRecords) const attesterId = attesterIds[Math.floor(Math.random() * NUM_ATTESTERS)] - const USTPathElements = await userStateTree.getMerkleProof(BigInt(attesterId)) + const selectors: BigInt[] = [] + const nonceList: BigInt[] = [] + for (let i = 0; i < proveKarmaAmount; i++) { + nonceList.push( BigInt(nonceStarter + i) ) + selectors.push(BigInt(1)); + } + for (let i = proveKarmaAmount ; i < MAX_KARMA_BUDGET; i++) { + nonceList.push(BigInt(0)) + selectors.push(BigInt(0)) + } const circuitInputs = { epoch: epoch, @@ -93,20 +117,23 @@ describe('Prove reputation from attester circuit', function () { identity_pk: user['keypair']['pubKey'], identity_nullifier: user['identityNullifier'], identity_trapdoor: user['identityTrapdoor'], - user_state_root: userStateRoot, + user_tree_root: userStateRoot, + user_state_hash: hashedLeaf, + epoch_key_nonce: epochKeyNonce, + epoch_key: epochKey, GST_path_index: GSTreeProof.indices, GST_path_elements: GSTreeProof.pathElements, GST_root: GSTreeRoot, nullifier_tree_root: nullifierTreeRoot, nullifier_path_elements: epkNullifierProof, - attester_id: attesterId, - pos_rep: reputationRecords[attesterId]['posRep'], - neg_rep: reputationRecords[attesterId]['negRep'], - graffiti: reputationRecords[attesterId]['graffiti'], - UST_path_elements: USTPathElements, - min_pos_rep: MIN_POS_REP, - max_neg_rep: MAX_NEG_REP, - graffiti_pre_image: reputationRecords[attesterId]['graffitiPreImage'] + selectors: selectors, + positive_karma: transitionedPosRep, + negative_karma: transitionedNegRep, + prove_karma_nullifiers: BigInt(Boolean(proveKarmaAmount)), + prove_karma_amount: BigInt(proveKarmaAmount), + karma_nonce: nonceList, + prove_min_rep: minRep != null ? true: false, + min_rep: minRep != null ? BigInt(minRep) : BigInt(0), } const witness = await executeCircuit(circuit, circuitInputs) @@ -118,11 +145,19 @@ describe('Prove reputation from attester circuit', function () { expect(isValid).to.be.true }) - it('prove reputation with wrong attester Id should fail', async () => { + it('successfully prove min reputation', async () => { const attesterIds = Object.keys(reputationRecords) - const attesterId = Number(attesterIds[Math.floor(Math.random() * NUM_ATTESTERS)]) - const USTPathElements = await userStateTree.getMerkleProof(BigInt(attesterId)) - const wrongAttesterId = attesterId < (NUM_ATTESTERS - 1) ? attesterId + 1 : attesterId - 1 + const attesterId = attesterIds[Math.floor(Math.random() * NUM_ATTESTERS)] + const selectors: BigInt[] = [] + const nonceList: BigInt[] = [] + for (let i = 0; i < proveKarmaAmount; i++) { + nonceList.push( BigInt(nonceStarter + i) ) + selectors.push(BigInt(1)); + } + for (let i = proveKarmaAmount ; i < MAX_KARMA_BUDGET; i++) { + nonceList.push(BigInt(0)) + selectors.push(BigInt(0)) + } const circuitInputs = { epoch: epoch, @@ -130,38 +165,48 @@ describe('Prove reputation from attester circuit', function () { identity_pk: user['keypair']['pubKey'], identity_nullifier: user['identityNullifier'], identity_trapdoor: user['identityTrapdoor'], - user_state_root: userStateRoot, + user_tree_root: userStateRoot, + user_state_hash: hashedLeaf, + epoch_key_nonce: epochKeyNonce, + epoch_key: epochKey, GST_path_index: GSTreeProof.indices, GST_path_elements: GSTreeProof.pathElements, GST_root: GSTreeRoot, nullifier_tree_root: nullifierTreeRoot, nullifier_path_elements: epkNullifierProof, - attester_id: wrongAttesterId, - pos_rep: reputationRecords[attesterId]['posRep'], - neg_rep: reputationRecords[attesterId]['negRep'], - graffiti: reputationRecords[attesterId]['graffiti'], - UST_path_elements: USTPathElements, - min_pos_rep: MIN_POS_REP, - max_neg_rep: MAX_NEG_REP, - graffiti_pre_image: reputationRecords[attesterId]['graffitiPreImage'] + selectors: selectors, + positive_karma: transitionedPosRep, + negative_karma: transitionedNegRep, + prove_karma_nullifiers: BigInt(Boolean(proveKarmaAmount)), + prove_karma_amount: BigInt(proveKarmaAmount), + karma_nonce: nonceList, + prove_min_rep: true, + min_rep: transitionedPosRep, } - let error - try { - await executeCircuit(circuit, circuitInputs) - } catch (e) { - error = e - expect(true).to.be.true - } finally { - if (!error) throw Error("Root mismatch results from wrong attester Id should throw error") - } + const witness = await executeCircuit(circuit, circuitInputs) + const startTime = new Date().getTime() + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + const endTime = new Date().getTime() + console.log(`Gen Proof time: ${endTime - startTime} ms (${Math.floor((endTime - startTime) / 1000)} s)`) + const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) + expect(isValid).to.be.true }) - it('prove reputation with not exist user state should fail', async () => { + it('prove reputation with reputation amount less than required amount should fail', async () => { const attesterIds = Object.keys(reputationRecords) - const attesterId = Number(attesterIds[Math.floor(Math.random() * NUM_ATTESTERS)]) - const USTPathElements = await userStateTree.getMerkleProof(BigInt(attesterId)) - const wrongUserStateRoot = genRandomSalt() + const attesterId = attesterIds[Math.floor(Math.random() * NUM_ATTESTERS)] + const selectors: BigInt[] = [] + const nonceList: BigInt[] = [] + const wrongProveKarmaAmount = 8 + for (let i = 0; i < wrongProveKarmaAmount; i++) { + nonceList.push( BigInt(nonceStarter + i) ) + selectors.push(BigInt(1)); + } + for (let i = wrongProveKarmaAmount ; i < MAX_KARMA_BUDGET; i++) { + nonceList.push(BigInt(0)) + selectors.push(BigInt(0)) + } const circuitInputs = { epoch: epoch, @@ -169,20 +214,23 @@ describe('Prove reputation from attester circuit', function () { identity_pk: user['keypair']['pubKey'], identity_nullifier: user['identityNullifier'], identity_trapdoor: user['identityTrapdoor'], - user_state_root: wrongUserStateRoot, + user_tree_root: userStateRoot, + user_state_hash: hashedLeaf, + epoch_key_nonce: epochKeyNonce, + epoch_key: epochKey, GST_path_index: GSTreeProof.indices, GST_path_elements: GSTreeProof.pathElements, GST_root: GSTreeRoot, nullifier_tree_root: nullifierTreeRoot, nullifier_path_elements: epkNullifierProof, - attester_id: attesterId, - pos_rep: reputationRecords[attesterId]['posRep'], - neg_rep: reputationRecords[attesterId]['negRep'], - graffiti: reputationRecords[attesterId]['graffiti'], - UST_path_elements: USTPathElements, - min_pos_rep: MIN_POS_REP, - max_neg_rep: MAX_NEG_REP, - graffiti_pre_image: reputationRecords[attesterId]['graffitiPreImage'] + selectors: selectors, + positive_karma: transitionedPosRep, + negative_karma: transitionedNegRep, + prove_karma_nullifiers: BigInt(Boolean(proveKarmaAmount)), + prove_karma_amount: BigInt(wrongProveKarmaAmount), + karma_nonce: nonceList, + prove_min_rep: minRep != null ? true: false, + min_rep: minRep != null ? BigInt(minRep) : BigInt(0), } let error @@ -192,89 +240,122 @@ describe('Prove reputation from attester circuit', function () { error = e expect(true).to.be.true } finally { - if (!error) throw Error("Root mismatch results from wrong user state should throw error") + if (!error) throw Error("Wrong reputation amount should throw error") } }) - it('prove reputation with incorrect reputation should fail', async () => { + it('successfully prove wrong reputation nullifiers when flag is set false', async () => { const attesterIds = Object.keys(reputationRecords) - const attesterId = Number(attesterIds[Math.floor(Math.random() * NUM_ATTESTERS)]) - const posRep = reputationRecords[attesterId]['posRep'] - const negRep = reputationRecords[attesterId]['negRep'] - const USTPathElements = await userStateTree.getMerkleProof(BigInt(attesterId)) - const wrongMinPosRep = posRep + const attesterId = attesterIds[Math.floor(Math.random() * NUM_ATTESTERS)] + const selectors: BigInt[] = [] + const nonceList: BigInt[] = [] + const wrongProveKarmaAmount = 8 + for (let i = 0; i < wrongProveKarmaAmount; i++) { + nonceList.push( BigInt(nonceStarter + i) ) + selectors.push(BigInt(1)); + } + for (let i = wrongProveKarmaAmount ; i < MAX_KARMA_BUDGET; i++) { + nonceList.push(BigInt(0)) + selectors.push(BigInt(0)) + } - const circuitInputs1 = { + const circuitInputs = { epoch: epoch, nonce: nonce, identity_pk: user['keypair']['pubKey'], identity_nullifier: user['identityNullifier'], identity_trapdoor: user['identityTrapdoor'], - user_state_root: userStateRoot, + user_tree_root: userStateRoot, + user_state_hash: hashedLeaf, + epoch_key_nonce: epochKeyNonce, + epoch_key: epochKey, GST_path_index: GSTreeProof.indices, GST_path_elements: GSTreeProof.pathElements, GST_root: GSTreeRoot, nullifier_tree_root: nullifierTreeRoot, nullifier_path_elements: epkNullifierProof, - attester_id: attesterId, - pos_rep: reputationRecords[attesterId]['posRep'], - neg_rep: reputationRecords[attesterId]['negRep'], - graffiti: reputationRecords[attesterId]['graffiti'], - UST_path_elements: USTPathElements, - min_pos_rep: wrongMinPosRep, - max_neg_rep: MAX_NEG_REP, - graffiti_pre_image: reputationRecords[attesterId]['graffitiPreImage'] + selectors: selectors, + positive_karma: transitionedPosRep, + negative_karma: transitionedNegRep, + prove_karma_nullifiers: false, + prove_karma_amount: BigInt(wrongProveKarmaAmount), + karma_nonce: nonceList, + prove_min_rep: minRep != null ? true: false, + min_rep: minRep != null ? BigInt(minRep) : BigInt(0), } - let error - try { - await executeCircuit(circuit, circuitInputs1) - } catch (e) { - error = e - expect(true).to.be.true - } finally { - if (!error) throw Error("Mismatch reputation record should throw error") - } + const witness = await executeCircuit(circuit, circuitInputs) + const startTime = new Date().getTime() + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + const endTime = new Date().getTime() + console.log(`Gen Proof time: ${endTime - startTime} ms (${Math.floor((endTime - startTime) / 1000)} s)`) + const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) + expect(isValid).to.be.true + }) - const wrongMaxNegRep = negRep + it('prove reputation with reputation amount more than claimed min rep amount should fail', async () => { + const attesterIds = Object.keys(reputationRecords) + const attesterId = attesterIds[Math.floor(Math.random() * NUM_ATTESTERS)] + const selectors: BigInt[] = [] + const nonceList: BigInt[] = [] + for (let i = 0; i < proveKarmaAmount; i++) { + nonceList.push( BigInt(nonceStarter + i) ) + selectors.push(BigInt(1)); + } + for (let i = proveKarmaAmount ; i < MAX_KARMA_BUDGET; i++) { + nonceList.push(BigInt(0)) + selectors.push(BigInt(0)) + } - const circuitInputs2 = { + const circuitInputs = { epoch: epoch, nonce: nonce, identity_pk: user['keypair']['pubKey'], identity_nullifier: user['identityNullifier'], identity_trapdoor: user['identityTrapdoor'], - user_state_root: userStateRoot, + user_tree_root: userStateRoot, + user_state_hash: hashedLeaf, + epoch_key_nonce: epochKeyNonce, + epoch_key: epochKey, GST_path_index: GSTreeProof.indices, GST_path_elements: GSTreeProof.pathElements, GST_root: GSTreeRoot, nullifier_tree_root: nullifierTreeRoot, nullifier_path_elements: epkNullifierProof, - attester_id: attesterId, - pos_rep: reputationRecords[attesterId]['posRep'], - neg_rep: reputationRecords[attesterId]['negRep'], - graffiti: reputationRecords[attesterId]['graffiti'], - UST_path_elements: USTPathElements, - min_pos_rep: MIN_POS_REP, - max_neg_rep: wrongMaxNegRep, - graffiti_pre_image: reputationRecords[attesterId]['graffitiPreImage'] + selectors: selectors, + positive_karma: transitionedPosRep, + negative_karma: transitionedNegRep, + prove_karma_nullifiers: BigInt(Boolean(proveKarmaAmount)), + prove_karma_amount: BigInt(proveKarmaAmount), + karma_nonce: nonceList, + prove_min_rep: true, + min_rep: BigInt(21), } + let error try { - await executeCircuit(circuit, circuitInputs2) + await executeCircuit(circuit, circuitInputs) } catch (e) { error = e expect(true).to.be.true } finally { - if (!error) throw Error("Mismatch reputation record should throw error") + if (!error) throw Error("Wrong minimum reputation amount should throw error") } }) - it('prove reputation with wrong graffiti pre image should fail', async () => { + it('successfully prove wrong min reputation when flag is set false', async () => { const attesterIds = Object.keys(reputationRecords) - const attesterId = Number(attesterIds[Math.floor(Math.random() * NUM_ATTESTERS)]) - const USTPathElements = await userStateTree.getMerkleProof(BigInt(attesterId)) - const wrongGraffitiPreImage = genRandomSalt() + const attesterId = attesterIds[Math.floor(Math.random() * NUM_ATTESTERS)] + const selectors: BigInt[] = [] + const nonceList: BigInt[] = [] + for (let i = 0; i < proveKarmaAmount; i++) { + nonceList.push( BigInt(nonceStarter + i) ) + selectors.push(BigInt(1)); + } + for (let i = proveKarmaAmount ; i < MAX_KARMA_BUDGET; i++) { + nonceList.push(BigInt(0)) + selectors.push(BigInt(0)) + } const circuitInputs = { epoch: epoch, @@ -282,41 +363,51 @@ describe('Prove reputation from attester circuit', function () { identity_pk: user['keypair']['pubKey'], identity_nullifier: user['identityNullifier'], identity_trapdoor: user['identityTrapdoor'], - user_state_root: userStateRoot, + user_tree_root: userStateRoot, + user_state_hash: hashedLeaf, + epoch_key_nonce: epochKeyNonce, + epoch_key: epochKey, GST_path_index: GSTreeProof.indices, GST_path_elements: GSTreeProof.pathElements, GST_root: GSTreeRoot, nullifier_tree_root: nullifierTreeRoot, nullifier_path_elements: epkNullifierProof, - attester_id: attesterId, - pos_rep: reputationRecords[attesterId]['posRep'], - neg_rep: reputationRecords[attesterId]['negRep'], - graffiti: reputationRecords[attesterId]['graffiti'], - UST_path_elements: USTPathElements, - min_pos_rep: MIN_POS_REP, - max_neg_rep: MAX_NEG_REP, - graffiti_pre_image: wrongGraffitiPreImage + selectors: selectors, + positive_karma: transitionedPosRep, + negative_karma: transitionedNegRep, + prove_karma_nullifiers: BigInt(Boolean(proveKarmaAmount)), + prove_karma_amount: BigInt(proveKarmaAmount), + karma_nonce: nonceList, + prove_min_rep: false, + min_rep: BigInt(21), } - let error - try { - await executeCircuit(circuit, circuitInputs) - } catch (e) { - error = e - expect(true).to.be.true - } finally { - if (!error) throw Error("Wrong graffiti pre-image should throw error") - } + const witness = await executeCircuit(circuit, circuitInputs) + const startTime = new Date().getTime() + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + const endTime = new Date().getTime() + console.log(`Gen Proof time: ${endTime - startTime} ms (${Math.floor((endTime - startTime) / 1000)} s)`) + const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) + expect(isValid).to.be.true }) it('prove reputation with epoch key nullifier seen before should fail', async () => { const attesterIds = Object.keys(reputationRecords) const attesterId = Number(attesterIds[Math.floor(Math.random() * NUM_ATTESTERS)]) - const USTPathElements = await userStateTree.getMerkleProof(BigInt(attesterId)) // Create another nullifier tree that inserted the epoch key nullifier const _nullifierTree = await genNewNullifierTree("circuit") await _nullifierTree.update(BigInt(attesterId), SMT_ONE_LEAF) const _nullifierTreeRoot = _nullifierTree.getRootHash() + const selectors: BigInt[] = [] + const nonceList: BigInt[] = [] + for (let i = 0; i < proveKarmaAmount; i++) { + nonceList.push( BigInt(nonceStarter + i) ) + selectors.push(BigInt(1)); + } + for (let i = proveKarmaAmount ; i < MAX_KARMA_BUDGET; i++) { + nonceList.push(BigInt(0)) + selectors.push(BigInt(0)) + } const circuitInputs = { @@ -325,20 +416,23 @@ describe('Prove reputation from attester circuit', function () { identity_pk: user['keypair']['pubKey'], identity_nullifier: user['identityNullifier'], identity_trapdoor: user['identityTrapdoor'], - user_state_root: userStateRoot, + user_tree_root: userStateRoot, + user_state_hash: hashedLeaf, + epoch_key_nonce: epochKeyNonce, + epoch_key: epochKey, GST_path_index: GSTreeProof.indices, GST_path_elements: GSTreeProof.pathElements, GST_root: GSTreeRoot, nullifier_tree_root: _nullifierTreeRoot, nullifier_path_elements: epkNullifierProof, - attester_id: attesterId, - pos_rep: reputationRecords[attesterId]['posRep'], - neg_rep: reputationRecords[attesterId]['negRep'], - graffiti: reputationRecords[attesterId]['graffiti'], - UST_path_elements: USTPathElements, - min_pos_rep: MIN_POS_REP, - max_neg_rep: MAX_NEG_REP, - graffiti_pre_image: reputationRecords[attesterId]['graffitiPreImage'] + selectors: selectors, + positive_karma: transitionedPosRep, + negative_karma: transitionedNegRep, + prove_karma_nullifiers: BigInt(Boolean(proveKarmaAmount)), + prove_karma_amount: BigInt(proveKarmaAmount), + karma_nonce: nonceList, + prove_min_rep: minRep != null ? true: false, + min_rep: minRep != null ? BigInt(minRep) : BigInt(0), } let error diff --git a/test/circuits/proveReputationFromAttester.ts b/test/circuits/proveReputationFromAttester.ts new file mode 100644 index 0000000..a48cf24 --- /dev/null +++ b/test/circuits/proveReputationFromAttester.ts @@ -0,0 +1,641 @@ +import chai from "chai" + +const { expect } = chai + +import { + compileAndLoadCircuit, + executeCircuit, + genVerifyReputationFromAttesterProofAndPublicSignals, + verifyProveReputationFromAttesterProof, +} from './utils' +import { genEpochKeyNullifier, genNewNullifierTree, genNewUserStateTree, SMT_ONE_LEAF } from '../utils' + +import { + IncrementalQuinTree, + genRandomSalt, + hash5, + hashOne, + stringifyBigInts, +} from 'maci-crypto' +import { genIdentity, genIdentityCommitment } from 'libsemaphore' +import { SparseMerkleTreeImpl } from "../../crypto/SMT" +import { circuitGlobalStateTreeDepth, circuitNullifierTreeDepth, circuitUserStateTreeDepth } from "../../config/testLocal" +import { Reputation } from "../../core" + +describe('Prove reputation from attester circuit', function () { + this.timeout(300000) + + let circuit + + const epoch = 1 + const nonce = 1 + const user = genIdentity() + const NUM_ATTESTERS = 10 + + let GSTZERO_VALUE = 0, GSTree, GSTreeRoot, GSTreeProof + let userStateTree: SparseMerkleTreeImpl, userStateRoot + let nullifierTree: SparseMerkleTreeImpl, nullifierTreeRoot, epkNullifierProof + let epkNullifier + let hashedLeaf + + let reputationRecords = {} + const transitionedPosRep = 20 + const transitionedNegRep = 0 + const MIN_POS_REP = 10 + const MAX_NEG_REP = 10 + + before(async () => { + const startCompileTime = Math.floor(new Date().getTime() / 1000) + circuit = await compileAndLoadCircuit('test/proveReputationFromAttester_test.circom') + const endCompileTime = Math.floor(new Date().getTime() / 1000) + console.log(`Compile time: ${endCompileTime - startCompileTime} seconds`) + + // User state + userStateTree = await genNewUserStateTree("circuit") + + // Bootstrap user state + for (let i = 0; i < NUM_ATTESTERS; i++) { + let attesterId = Math.ceil(Math.random() * (2 ** circuitUserStateTreeDepth - 1)) + while (reputationRecords[attesterId] !== undefined) attesterId = Math.floor(Math.random() * (2 ** circuitUserStateTreeDepth)) + const graffitiPreImage = genRandomSalt() + reputationRecords[attesterId] = new Reputation( + BigInt(Math.floor(Math.random() * 100) + MIN_POS_REP), + BigInt(Math.floor(Math.random() * MAX_NEG_REP)), + hashOne(graffitiPreImage), + ) + reputationRecords[attesterId].addGraffitiPreImage(graffitiPreImage) + await userStateTree.update(BigInt(attesterId), reputationRecords[attesterId].hash()) + } + + userStateRoot = userStateTree.getRootHash() + // Global state tree + GSTree = new IncrementalQuinTree(circuitGlobalStateTreeDepth, GSTZERO_VALUE, 2) + const commitment = genIdentityCommitment(user) + hashedLeaf = hash5([ + commitment, + userStateRoot, + BigInt(transitionedPosRep), + BigInt(transitionedNegRep), + BigInt(0) + ]) + GSTree.insert(hashedLeaf) + GSTreeProof = GSTree.genMerklePath(0) + GSTreeRoot = GSTree.root + + // Nullifier tree + nullifierTree = await genNewNullifierTree("circuit") + nullifierTreeRoot = nullifierTree.getRootHash() + + epkNullifier = genEpochKeyNullifier(user['identityNullifier'], epoch, nonce, circuitNullifierTreeDepth) + epkNullifierProof = await nullifierTree.getMerkleProof(epkNullifier) + }) + + it('successfully prove a random generated reputation', async () => { + const attesterIds = Object.keys(reputationRecords) + const attesterId = attesterIds[Math.floor(Math.random() * NUM_ATTESTERS)] + const USTPathElements = await userStateTree.getMerkleProof(BigInt(attesterId)) + + const circuitInputs = { + epoch: epoch, + nonce: nonce, + identity_pk: user['keypair']['pubKey'], + identity_nullifier: user['identityNullifier'], + identity_trapdoor: user['identityTrapdoor'], + user_tree_root: userStateRoot, + user_state_hash: hashedLeaf, + GST_path_index: GSTreeProof.indices, + GST_path_elements: GSTreeProof.pathElements, + GST_root: GSTreeRoot, + nullifier_tree_root: nullifierTreeRoot, + nullifier_path_elements: epkNullifierProof, + attester_id: attesterId, + pos_rep: reputationRecords[attesterId]['posRep'], + neg_rep: reputationRecords[attesterId]['negRep'], + graffiti: reputationRecords[attesterId]['graffiti'], + UST_path_elements: USTPathElements, + positive_karma: BigInt(transitionedPosRep), + negative_karma: BigInt(transitionedNegRep), + prove_pos_rep: BigInt(Boolean(MIN_POS_REP)), + prove_neg_rep: BigInt(Boolean(MAX_NEG_REP)), + prove_rep_diff: BigInt(Boolean(reputationRecords[attesterId]['posRep'] - reputationRecords[attesterId]['negRep'])), + prove_graffiti: BigInt(Boolean(reputationRecords[attesterId]['graffitiPreImage'])), + min_rep_diff: BigInt(reputationRecords[attesterId]['posRep'] - reputationRecords[attesterId]['negRep']), + min_pos_rep: BigInt(MIN_POS_REP), + max_neg_rep: BigInt(MAX_NEG_REP), + graffiti_pre_image: reputationRecords[attesterId]['graffitiPreImage'] + } + + const witness = await executeCircuit(circuit, circuitInputs) + const startTime = new Date().getTime() + const results = await genVerifyReputationFromAttesterProofAndPublicSignals(stringifyBigInts(circuitInputs)) + const endTime = new Date().getTime() + console.log(`Gen Proof time: ${endTime - startTime} ms (${Math.floor((endTime - startTime) / 1000)} s)`) + const isValid = await verifyProveReputationFromAttesterProof(results['proof'], results['publicSignals']) + expect(isValid).to.be.true + }) + + it('successfully prove a reputation with equal positive and negative repuataion', async () => { + const attesterIds = Object.keys(reputationRecords) + const attesterId = attesterIds[Math.floor(Math.random() * NUM_ATTESTERS)] + const USTPathElements = await userStateTree.getMerkleProof(BigInt(attesterId)) + + const circuitInputs = { + epoch: epoch, + nonce: nonce, + identity_pk: user['keypair']['pubKey'], + identity_nullifier: user['identityNullifier'], + identity_trapdoor: user['identityTrapdoor'], + user_tree_root: userStateRoot, + user_state_hash: hashedLeaf, + GST_path_index: GSTreeProof.indices, + GST_path_elements: GSTreeProof.pathElements, + GST_root: GSTreeRoot, + nullifier_tree_root: nullifierTreeRoot, + nullifier_path_elements: epkNullifierProof, + attester_id: attesterId, + pos_rep: reputationRecords[attesterId]['posRep'], + neg_rep: reputationRecords[attesterId]['negRep'], + graffiti: reputationRecords[attesterId]['graffiti'], + UST_path_elements: USTPathElements, + positive_karma: BigInt(transitionedPosRep), + negative_karma: BigInt(transitionedNegRep), + prove_pos_rep: BigInt(Boolean(reputationRecords[attesterId]['posRep'])), + prove_neg_rep: BigInt(Boolean(reputationRecords[attesterId]['negRep'])), + prove_rep_diff: BigInt(Boolean(reputationRecords[attesterId]['posRep'] - reputationRecords[attesterId]['negRep'])), + prove_graffiti: BigInt(Boolean(reputationRecords[attesterId]['graffitiPreImage'])), + min_rep_diff: BigInt(reputationRecords[attesterId]['posRep'] - reputationRecords[attesterId]['negRep']), + min_pos_rep: reputationRecords[attesterId]['posRep'], + max_neg_rep: reputationRecords[attesterId]['negRep'], + graffiti_pre_image: reputationRecords[attesterId]['graffitiPreImage'] + } + + const witness = await executeCircuit(circuit, circuitInputs) + const startTime = new Date().getTime() + const results = await genVerifyReputationFromAttesterProofAndPublicSignals(stringifyBigInts(circuitInputs)) + const endTime = new Date().getTime() + console.log(`Gen Proof time: ${endTime - startTime} ms (${Math.floor((endTime - startTime) / 1000)} s)`) + const isValid = await verifyProveReputationFromAttesterProof(results['proof'], results['publicSignals']) + expect(isValid).to.be.true + }) + + it('successfully choose to prove only minimun positive reputation', async () => { + const attesterIds = Object.keys(reputationRecords) + const attesterId = attesterIds[Math.floor(Math.random() * NUM_ATTESTERS)] + const USTPathElements = await userStateTree.getMerkleProof(BigInt(attesterId)) + + const circuitInputs = { + epoch: epoch, + nonce: nonce, + identity_pk: user['keypair']['pubKey'], + identity_nullifier: user['identityNullifier'], + identity_trapdoor: user['identityTrapdoor'], + user_tree_root: userStateRoot, + user_state_hash: hashedLeaf, + GST_path_index: GSTreeProof.indices, + GST_path_elements: GSTreeProof.pathElements, + GST_root: GSTreeRoot, + nullifier_tree_root: nullifierTreeRoot, + nullifier_path_elements: epkNullifierProof, + attester_id: attesterId, + pos_rep: reputationRecords[attesterId]['posRep'], + neg_rep: reputationRecords[attesterId]['negRep'], + graffiti: reputationRecords[attesterId]['graffiti'], + UST_path_elements: USTPathElements, + positive_karma: BigInt(transitionedPosRep), + negative_karma: BigInt(transitionedNegRep), + prove_pos_rep: BigInt(1), + prove_neg_rep: BigInt(0), + prove_rep_diff: BigInt(0), + prove_graffiti: BigInt(0), + min_rep_diff: BigInt(reputationRecords[attesterId]['posRep'] - reputationRecords[attesterId]['negRep']), + min_pos_rep: BigInt(MIN_POS_REP), + max_neg_rep: BigInt(MAX_NEG_REP), + graffiti_pre_image: reputationRecords[attesterId]['graffitiPreImage'] + } + + const witness = await executeCircuit(circuit, circuitInputs) + const startTime = new Date().getTime() + const results = await genVerifyReputationFromAttesterProofAndPublicSignals(stringifyBigInts(circuitInputs)) + const endTime = new Date().getTime() + console.log(`Gen Proof time: ${endTime - startTime} ms (${Math.floor((endTime - startTime) / 1000)} s)`) + const isValid = await verifyProveReputationFromAttesterProof(results['proof'], results['publicSignals']) + expect(isValid).to.be.true + }) + + it('successfully choose to prove only maximum negative reputation', async () => { + const attesterIds = Object.keys(reputationRecords) + const attesterId = attesterIds[Math.floor(Math.random() * NUM_ATTESTERS)] + const USTPathElements = await userStateTree.getMerkleProof(BigInt(attesterId)) + + const circuitInputs = { + epoch: epoch, + nonce: nonce, + identity_pk: user['keypair']['pubKey'], + identity_nullifier: user['identityNullifier'], + identity_trapdoor: user['identityTrapdoor'], + user_tree_root: userStateRoot, + user_state_hash: hashedLeaf, + GST_path_index: GSTreeProof.indices, + GST_path_elements: GSTreeProof.pathElements, + GST_root: GSTreeRoot, + nullifier_tree_root: nullifierTreeRoot, + nullifier_path_elements: epkNullifierProof, + attester_id: attesterId, + pos_rep: reputationRecords[attesterId]['posRep'], + neg_rep: reputationRecords[attesterId]['negRep'], + graffiti: reputationRecords[attesterId]['graffiti'], + UST_path_elements: USTPathElements, + positive_karma: BigInt(transitionedPosRep), + negative_karma: BigInt(transitionedNegRep), + prove_pos_rep: BigInt(0), + prove_neg_rep: BigInt(1), + prove_rep_diff: BigInt(0), + prove_graffiti: BigInt(0), + min_rep_diff: BigInt(reputationRecords[attesterId]['posRep'] - reputationRecords[attesterId]['negRep']), + min_pos_rep: BigInt(MIN_POS_REP), + max_neg_rep: BigInt(MAX_NEG_REP), + graffiti_pre_image: reputationRecords[attesterId]['graffitiPreImage'] + } + + const witness = await executeCircuit(circuit, circuitInputs) + const startTime = new Date().getTime() + const results = await genVerifyReputationFromAttesterProofAndPublicSignals(stringifyBigInts(circuitInputs)) + const endTime = new Date().getTime() + console.log(`Gen Proof time: ${endTime - startTime} ms (${Math.floor((endTime - startTime) / 1000)} s)`) + const isValid = await verifyProveReputationFromAttesterProof(results['proof'], results['publicSignals']) + expect(isValid).to.be.true + }) + + it('successfully choose to prove only minimum difference between positive and negative reputation', async () => { + const attesterIds = Object.keys(reputationRecords) + const attesterId = attesterIds[Math.floor(Math.random() * NUM_ATTESTERS)] + const USTPathElements = await userStateTree.getMerkleProof(BigInt(attesterId)) + + const circuitInputs = { + epoch: epoch, + nonce: nonce, + identity_pk: user['keypair']['pubKey'], + identity_nullifier: user['identityNullifier'], + identity_trapdoor: user['identityTrapdoor'], + user_tree_root: userStateRoot, + user_state_hash: hashedLeaf, + GST_path_index: GSTreeProof.indices, + GST_path_elements: GSTreeProof.pathElements, + GST_root: GSTreeRoot, + nullifier_tree_root: nullifierTreeRoot, + nullifier_path_elements: epkNullifierProof, + attester_id: attesterId, + pos_rep: reputationRecords[attesterId]['posRep'], + neg_rep: reputationRecords[attesterId]['negRep'], + graffiti: reputationRecords[attesterId]['graffiti'], + UST_path_elements: USTPathElements, + positive_karma: BigInt(transitionedPosRep), + negative_karma: BigInt(transitionedNegRep), + prove_pos_rep: BigInt(0), + prove_neg_rep: BigInt(0), + prove_rep_diff: BigInt(1), + prove_graffiti: BigInt(0), + min_rep_diff: BigInt(reputationRecords[attesterId]['posRep'] - reputationRecords[attesterId]['negRep']), + min_pos_rep: BigInt(MIN_POS_REP), + max_neg_rep: BigInt(MAX_NEG_REP), + graffiti_pre_image: reputationRecords[attesterId]['graffitiPreImage'] + } + + const witness = await executeCircuit(circuit, circuitInputs) + const startTime = new Date().getTime() + const results = await genVerifyReputationFromAttesterProofAndPublicSignals(stringifyBigInts(circuitInputs)) + const endTime = new Date().getTime() + console.log(`Gen Proof time: ${endTime - startTime} ms (${Math.floor((endTime - startTime) / 1000)} s)`) + const isValid = await verifyProveReputationFromAttesterProof(results['proof'], results['publicSignals']) + expect(isValid).to.be.true + }) + + it('successfully choose to prove only maximum positve reputation and others with wrong value', async () => { + const attesterIds = Object.keys(reputationRecords) + const attesterId = attesterIds[Math.floor(Math.random() * NUM_ATTESTERS)] + const USTPathElements = await userStateTree.getMerkleProof(BigInt(attesterId)) + const wrongMinRepDiff = Number(reputationRecords[attesterId]['posRep']) - Number(reputationRecords[attesterId]['negRep']) + 1 + const wrongMaxNegRep = Number(reputationRecords[attesterId]['negRep']) - 1 + const wrongGraffitiPreImage = genRandomSalt() + + const circuitInputs = { + epoch: epoch, + nonce: nonce, + identity_pk: user['keypair']['pubKey'], + identity_nullifier: user['identityNullifier'], + identity_trapdoor: user['identityTrapdoor'], + user_tree_root: userStateRoot, + user_state_hash: hashedLeaf, + GST_path_index: GSTreeProof.indices, + GST_path_elements: GSTreeProof.pathElements, + GST_root: GSTreeRoot, + nullifier_tree_root: nullifierTreeRoot, + nullifier_path_elements: epkNullifierProof, + attester_id: attesterId, + pos_rep: reputationRecords[attesterId]['posRep'], + neg_rep: reputationRecords[attesterId]['negRep'], + graffiti: reputationRecords[attesterId]['graffiti'], + UST_path_elements: USTPathElements, + positive_karma: BigInt(transitionedPosRep), + negative_karma: BigInt(transitionedNegRep), + prove_pos_rep: BigInt(1), + prove_neg_rep: BigInt(0), + prove_rep_diff: BigInt(0), + prove_graffiti: BigInt(0), + min_rep_diff: BigInt(wrongMinRepDiff), + min_pos_rep: BigInt(MIN_POS_REP), + max_neg_rep: BigInt(wrongMaxNegRep), + graffiti_pre_image: wrongGraffitiPreImage + } + + const witness = await executeCircuit(circuit, circuitInputs) + const startTime = new Date().getTime() + const results = await genVerifyReputationFromAttesterProofAndPublicSignals(stringifyBigInts(circuitInputs)) + const endTime = new Date().getTime() + console.log(`Gen Proof time: ${endTime - startTime} ms (${Math.floor((endTime - startTime) / 1000)} s)`) + const isValid = await verifyProveReputationFromAttesterProof(results['proof'], results['publicSignals']) + expect(isValid).to.be.true + }) + + it('prove reputation with wrong attester Id should fail', async () => { + const attesterIds = Object.keys(reputationRecords) + const attesterId = Number(attesterIds[Math.floor(Math.random() * NUM_ATTESTERS)]) + const USTPathElements = await userStateTree.getMerkleProof(BigInt(attesterId)) + const wrongAttesterId = attesterId < (NUM_ATTESTERS - 1) ? attesterId + 1 : attesterId - 1 + + const circuitInputs = { + epoch: epoch, + nonce: nonce, + identity_pk: user['keypair']['pubKey'], + identity_nullifier: user['identityNullifier'], + identity_trapdoor: user['identityTrapdoor'], + user_tree_root: userStateRoot, + user_state_hash: hashedLeaf, + GST_path_index: GSTreeProof.indices, + GST_path_elements: GSTreeProof.pathElements, + GST_root: GSTreeRoot, + nullifier_tree_root: nullifierTreeRoot, + nullifier_path_elements: epkNullifierProof, + attester_id: wrongAttesterId, + pos_rep: reputationRecords[attesterId]['posRep'], + neg_rep: reputationRecords[attesterId]['negRep'], + graffiti: reputationRecords[attesterId]['graffiti'], + UST_path_elements: USTPathElements, + positive_karma: BigInt(transitionedPosRep), + negative_karma: BigInt(transitionedNegRep), + prove_pos_rep: BigInt(Boolean(MIN_POS_REP)), + prove_neg_rep: BigInt(Boolean(MAX_NEG_REP)), + prove_rep_diff: BigInt(Boolean(reputationRecords[attesterId]['posRep'] - reputationRecords[attesterId]['negRep'])), + prove_graffiti: BigInt(Boolean(reputationRecords[attesterId]['graffitiPreImage'])), + min_rep_diff: BigInt(reputationRecords[attesterId]['posRep'] - reputationRecords[attesterId]['negRep']), + min_pos_rep: BigInt(MIN_POS_REP), + max_neg_rep: BigInt(MAX_NEG_REP), + graffiti_pre_image: reputationRecords[attesterId]['graffitiPreImage'] + } + + let error + try { + await executeCircuit(circuit, circuitInputs) + } catch (e) { + error = e + expect(true).to.be.true + } finally { + if (!error) throw Error("Root mismatch results from wrong attester Id should throw error") + } + }) + + it('prove reputation with not exist user state should fail', async () => { + const attesterIds = Object.keys(reputationRecords) + const attesterId = Number(attesterIds[Math.floor(Math.random() * NUM_ATTESTERS)]) + const USTPathElements = await userStateTree.getMerkleProof(BigInt(attesterId)) + const wrongUserStateRoot = genRandomSalt() + + const circuitInputs = { + epoch: epoch, + nonce: nonce, + identity_pk: user['keypair']['pubKey'], + identity_nullifier: user['identityNullifier'], + identity_trapdoor: user['identityTrapdoor'], + user_tree_root: wrongUserStateRoot, + user_state_hash: hashedLeaf, + GST_path_index: GSTreeProof.indices, + GST_path_elements: GSTreeProof.pathElements, + GST_root: GSTreeRoot, + nullifier_tree_root: nullifierTreeRoot, + nullifier_path_elements: epkNullifierProof, + attester_id: attesterId, + pos_rep: reputationRecords[attesterId]['posRep'], + neg_rep: reputationRecords[attesterId]['negRep'], + graffiti: reputationRecords[attesterId]['graffiti'], + UST_path_elements: USTPathElements, + positive_karma: BigInt(transitionedPosRep), + negative_karma: BigInt(transitionedNegRep), + prove_pos_rep: BigInt(Boolean(MIN_POS_REP)), + prove_neg_rep: BigInt(Boolean(MAX_NEG_REP)), + prove_rep_diff: BigInt(Boolean(reputationRecords[attesterId]['posRep'] - reputationRecords[attesterId]['negRep'])), + prove_graffiti: BigInt(Boolean(reputationRecords[attesterId]['graffitiPreImage'])), + min_rep_diff: BigInt(reputationRecords[attesterId]['posRep'] - reputationRecords[attesterId]['negRep']), + min_pos_rep: BigInt(MIN_POS_REP), + max_neg_rep: BigInt(MAX_NEG_REP), + graffiti_pre_image: reputationRecords[attesterId]['graffitiPreImage'] + } + + let error + try { + await executeCircuit(circuit, circuitInputs) + } catch (e) { + error = e + expect(true).to.be.true + } finally { + if (!error) throw Error("Root mismatch results from wrong user state should throw error") + } + }) + + it('prove reputation with incorrect reputation should fail', async () => { + const attesterIds = Object.keys(reputationRecords) + const attesterId = Number(attesterIds[Math.floor(Math.random() * NUM_ATTESTERS)]) + const posRep = reputationRecords[attesterId]['posRep'] + const negRep = reputationRecords[attesterId]['negRep'] + const USTPathElements = await userStateTree.getMerkleProof(BigInt(attesterId)) + const wrongMinPosRep = Number(posRep) + 1 + + const circuitInputs1 = { + epoch: epoch, + nonce: nonce, + identity_pk: user['keypair']['pubKey'], + identity_nullifier: user['identityNullifier'], + identity_trapdoor: user['identityTrapdoor'], + user_tree_root: userStateRoot, + user_state_hash: hashedLeaf, + GST_path_index: GSTreeProof.indices, + GST_path_elements: GSTreeProof.pathElements, + GST_root: GSTreeRoot, + nullifier_tree_root: nullifierTreeRoot, + nullifier_path_elements: epkNullifierProof, + attester_id: attesterId, + pos_rep: reputationRecords[attesterId]['posRep'], + neg_rep: reputationRecords[attesterId]['negRep'], + graffiti: reputationRecords[attesterId]['graffiti'], + UST_path_elements: USTPathElements, + positive_karma: BigInt(transitionedPosRep), + negative_karma: BigInt(transitionedNegRep), + prove_pos_rep: BigInt(Boolean(MIN_POS_REP)), + prove_neg_rep: BigInt(Boolean(MAX_NEG_REP)), + prove_rep_diff: BigInt(Boolean(reputationRecords[attesterId]['posRep'] - reputationRecords[attesterId]['negRep'])), + prove_graffiti: BigInt(Boolean(reputationRecords[attesterId]['graffitiPreImage'])), + min_rep_diff: BigInt(reputationRecords[attesterId]['posRep'] - reputationRecords[attesterId]['negRep']), + min_pos_rep: BigInt(wrongMinPosRep), + max_neg_rep: BigInt(MAX_NEG_REP), + graffiti_pre_image: reputationRecords[attesterId]['graffitiPreImage'] + } + + let error + try { + await executeCircuit(circuit, circuitInputs1) + } catch (e) { + error = e + expect(true).to.be.true + } finally { + if (!error) throw Error("Mismatch reputation record should throw error") + } + + const wrongMaxNegRep = Number(negRep) - 1 + + const circuitInputs2 = { + epoch: epoch, + nonce: nonce, + identity_pk: user['keypair']['pubKey'], + identity_nullifier: user['identityNullifier'], + identity_trapdoor: user['identityTrapdoor'], + user_tree_root: userStateRoot, + user_state_hash: hashedLeaf, + GST_path_index: GSTreeProof.indices, + GST_path_elements: GSTreeProof.pathElements, + GST_root: GSTreeRoot, + nullifier_tree_root: nullifierTreeRoot, + nullifier_path_elements: epkNullifierProof, + attester_id: attesterId, + pos_rep: reputationRecords[attesterId]['posRep'], + neg_rep: reputationRecords[attesterId]['negRep'], + graffiti: reputationRecords[attesterId]['graffiti'], + UST_path_elements: USTPathElements, + positive_karma: BigInt(transitionedPosRep), + negative_karma: BigInt(transitionedNegRep), + prove_pos_rep: BigInt(Boolean(MIN_POS_REP)), + prove_neg_rep: BigInt(Boolean(MAX_NEG_REP)), + prove_rep_diff: BigInt(Boolean(reputationRecords[attesterId]['posRep'] - reputationRecords[attesterId]['negRep'])), + prove_graffiti: BigInt(Boolean(reputationRecords[attesterId]['graffitiPreImage'])), + min_rep_diff: BigInt(reputationRecords[attesterId]['posRep'] - reputationRecords[attesterId]['negRep']), + min_pos_rep: BigInt(MIN_POS_REP), + max_neg_rep: BigInt(wrongMaxNegRep), + graffiti_pre_image: reputationRecords[attesterId]['graffitiPreImage'] + } + + try { + await executeCircuit(circuit, circuitInputs2) + } catch (e) { + error = e + expect(true).to.be.true + } finally { + if (!error) throw Error("Mismatch reputation record should throw error") + } + }) + + it('prove reputation with wrong graffiti pre image should fail', async () => { + const attesterIds = Object.keys(reputationRecords) + const attesterId = Number(attesterIds[Math.floor(Math.random() * NUM_ATTESTERS)]) + const USTPathElements = await userStateTree.getMerkleProof(BigInt(attesterId)) + const wrongGraffitiPreImage = genRandomSalt() + + const circuitInputs = { + epoch: epoch, + nonce: nonce, + identity_pk: user['keypair']['pubKey'], + identity_nullifier: user['identityNullifier'], + identity_trapdoor: user['identityTrapdoor'], + user_tree_root: userStateRoot, + user_state_hash: hashedLeaf, + GST_path_index: GSTreeProof.indices, + GST_path_elements: GSTreeProof.pathElements, + GST_root: GSTreeRoot, + nullifier_tree_root: nullifierTreeRoot, + nullifier_path_elements: epkNullifierProof, + attester_id: attesterId, + pos_rep: reputationRecords[attesterId]['posRep'], + neg_rep: reputationRecords[attesterId]['negRep'], + graffiti: reputationRecords[attesterId]['graffiti'], + UST_path_elements: USTPathElements, + positive_karma: BigInt(transitionedPosRep), + negative_karma: BigInt(transitionedNegRep), + prove_pos_rep: BigInt(Boolean(MIN_POS_REP)), + prove_neg_rep: BigInt(Boolean(MAX_NEG_REP)), + prove_rep_diff: BigInt(Boolean(reputationRecords[attesterId]['posRep'] - reputationRecords[attesterId]['negRep'])), + prove_graffiti: BigInt(Boolean(reputationRecords[attesterId]['graffitiPreImage'])), + min_rep_diff: BigInt(reputationRecords[attesterId]['posRep'] - reputationRecords[attesterId]['negRep']), + min_pos_rep: BigInt(MIN_POS_REP), + max_neg_rep: BigInt(MAX_NEG_REP), + graffiti_pre_image: wrongGraffitiPreImage + } + + let error + try { + await executeCircuit(circuit, circuitInputs) + } catch (e) { + error = e + expect(true).to.be.true + } finally { + if (!error) throw Error("Wrong graffiti pre-image should throw error") + } + }) + + it('prove reputation with epoch key nullifier seen before should fail', async () => { + const attesterIds = Object.keys(reputationRecords) + const attesterId = Number(attesterIds[Math.floor(Math.random() * NUM_ATTESTERS)]) + const USTPathElements = await userStateTree.getMerkleProof(BigInt(attesterId)) + // Create another nullifier tree that inserted the epoch key nullifier + const _nullifierTree = await genNewNullifierTree("circuit") + await _nullifierTree.update(BigInt(attesterId), SMT_ONE_LEAF) + const _nullifierTreeRoot = _nullifierTree.getRootHash() + + + const circuitInputs = { + epoch: epoch, + nonce: nonce, + identity_pk: user['keypair']['pubKey'], + identity_nullifier: user['identityNullifier'], + identity_trapdoor: user['identityTrapdoor'], + user_tree_root: userStateRoot, + user_state_hash: hashedLeaf, + GST_path_index: GSTreeProof.indices, + GST_path_elements: GSTreeProof.pathElements, + GST_root: GSTreeRoot, + nullifier_tree_root: _nullifierTreeRoot, + nullifier_path_elements: epkNullifierProof, + attester_id: attesterId, + pos_rep: reputationRecords[attesterId]['posRep'], + neg_rep: reputationRecords[attesterId]['negRep'], + graffiti: reputationRecords[attesterId]['graffiti'], + UST_path_elements: USTPathElements, + positive_karma: BigInt(transitionedPosRep), + negative_karma: BigInt(transitionedNegRep), + prove_pos_rep: BigInt(Boolean(MIN_POS_REP)), + prove_neg_rep: BigInt(Boolean(MAX_NEG_REP)), + prove_rep_diff: BigInt(Boolean(reputationRecords[attesterId]['posRep'] - reputationRecords[attesterId]['negRep'])), + prove_graffiti: BigInt(Boolean(reputationRecords[attesterId]['graffitiPreImage'])), + min_rep_diff: BigInt(reputationRecords[attesterId]['posRep'] - reputationRecords[attesterId]['negRep']), + min_pos_rep: BigInt(MIN_POS_REP), + max_neg_rep: BigInt(MAX_NEG_REP), + graffiti_pre_image: reputationRecords[attesterId]['graffitiPreImage'] + } + + let error + try { + await executeCircuit(circuit, circuitInputs) + } catch (e) { + error = e + expect(true).to.be.true + } finally { + if (!error) throw Error("Seen epoch key nullifier should throw error") + } + }) +}) \ No newline at end of file diff --git a/test/circuits/userStateTransition.ts b/test/circuits/userStateTransition.ts index 4b3687c..23c7ad2 100644 --- a/test/circuits/userStateTransition.ts +++ b/test/circuits/userStateTransition.ts @@ -10,6 +10,7 @@ import { genRandomSalt, hashLeftRight, stringifyBigInts, + hash5, } from 'maci-crypto' import { @@ -19,10 +20,11 @@ import { verifyUserStateTransitionProof, getSignalByName, } from './utils' -import { circuitEpochTreeDepth, circuitNullifierTreeDepth, circuitUserStateTreeDepth, globalStateTreeDepth, numAttestationsPerEpochKey, numEpochKeyNoncePerEpoch } from "../../config/testLocal" +import { circuitEpochTreeDepth, circuitGlobalStateTreeDepth, circuitNullifierTreeDepth, circuitUserStateTreeDepth, globalStateTreeDepth, numAttestationsPerEpochKey, numEpochKeyNoncePerEpoch } from "../../config/testLocal" import { genEpochKey, genAttestationNullifier, genNewEpochTree, genNewNullifierTree, genNewUserStateTree, genEpochKeyNullifier, SMT_ONE_LEAF } from "../utils" import { SparseMerkleTreeImpl } from "../../crypto/SMT" import { Attestation, Reputation } from "../../core" +import { DEFAULT_AIRDROPPED_KARMA } from "../../config/socialMedia" describe('User State Transition circuits', function () { this.timeout(600000) @@ -93,6 +95,11 @@ describe('User State Transition circuits', function () { let selectors: number[] = [] let nullifiers: BigInt[] let hashChainResults: BigInt[] = [] + let hashedLeaf + const transitionedPosRep = 20 + const transitionedNegRep = 0 + let currentEpochPosRep = 0 + let currentEpochNegRep = 0 before(async () => { const startCompileTime = Math.floor(new Date().getTime() / 1000) @@ -126,10 +133,16 @@ describe('User State Transition circuits', function () { intermediateUserStateTreeRoots.push(userStateTree.getRootHash()) // Global state tree - GSTree = new IncrementalQuinTree(globalStateTreeDepth, GSTZERO_VALUE, 2) + GSTree = new IncrementalQuinTree(circuitGlobalStateTreeDepth, GSTZERO_VALUE, 2) const commitment = genIdentityCommitment(user) - const hashedStateLeaf = hashLeftRight(commitment, userStateTree.getRootHash()) - GSTree.insert(hashedStateLeaf) + hashedLeaf = hash5([ + commitment, + userStateTree.getRootHash(), + BigInt(transitionedPosRep), + BigInt(transitionedNegRep), + BigInt(0) + ]) + GSTree.insert(hashedLeaf) GSTreeProof = GSTree.genMerklePath(0) GSTreeRoot = GSTree.root @@ -206,6 +219,8 @@ describe('User State Transition circuits', function () { // Update attestation record reputationRecords[attesterId.toString()]['posRep'] = attestation['posRep'] reputationRecords[attesterId.toString()]['negRep'] = attestation['negRep'] + currentEpochPosRep += Number(attestation['posRep']) + currentEpochNegRep += Number(attestation['negRep']) if (attestation['overwriteGraffiti']) reputationRecords[attesterId.toString()]['graffiti'] = attestation['graffiti'] await userStateTree.update(BigInt(attesterId), reputationRecords[attesterId.toString()].hash()) @@ -240,7 +255,13 @@ describe('User State Transition circuits', function () { // Compute new GST Leaf const latestUSTRoot = intermediateUserStateTreeRoots[TOTAL_NUM_ATTESTATIONS] - newGSTLeaf = hashLeftRight(commitment, latestUSTRoot) + newGSTLeaf = hash5([ + commitment, + latestUSTRoot, + BigInt(transitionedPosRep + currentEpochPosRep + DEFAULT_AIRDROPPED_KARMA), + BigInt(transitionedNegRep + currentEpochNegRep), + BigInt(0) + ]) for (let nonce = 0; nonce < EPK_NONCE_PER_EPOCH; nonce++) { const epochKey = genEpochKey(user['identityNullifier'], epoch, nonce, circuitEpochTreeDepth) @@ -262,6 +283,9 @@ describe('User State Transition circuits', function () { identity_pk: user['keypair']['pubKey'], identity_nullifier: user['identityNullifier'], identity_trapdoor: user['identityTrapdoor'], + user_state_hash: hashedLeaf, + old_positive_karma: BigInt(transitionedPosRep), + old_negative_karma: BigInt(transitionedNegRep), GST_path_elements: GSTreeProof.pathElements, GST_path_index: GSTreeProof.indices, GST_root: GSTreeRoot, @@ -271,6 +295,9 @@ describe('User State Transition circuits', function () { neg_reps: negReps, graffities: graffities, overwrite_graffitis: overwriteGraffitis, + positive_karma: BigInt(transitionedPosRep + currentEpochPosRep + DEFAULT_AIRDROPPED_KARMA), + negative_karma: BigInt(transitionedNegRep + currentEpochNegRep), + airdropped_karma: DEFAULT_AIRDROPPED_KARMA, epk_path_elements: epochTreePathElements, hash_chain_results: hashChainResults, epoch_tree_root: epochTreeRoot @@ -307,6 +334,9 @@ describe('User State Transition circuits', function () { identity_pk: user['keypair']['pubKey'], identity_nullifier: user['identityNullifier'], identity_trapdoor: user['identityTrapdoor'], + user_state_hash: hashedLeaf, + old_positive_karma: BigInt(transitionedPosRep), + old_negative_karma: BigInt(transitionedNegRep), GST_path_elements: GSTreeProof.pathElements, GST_path_index: GSTreeProof.indices, GST_root: GSTreeRoot, @@ -316,6 +346,9 @@ describe('User State Transition circuits', function () { neg_reps: negReps, graffities: graffities, overwrite_graffitis: overwriteGraffitis, + positive_karma: BigInt(transitionedPosRep + currentEpochPosRep + DEFAULT_AIRDROPPED_KARMA), + negative_karma: BigInt(transitionedNegRep + currentEpochNegRep), + airdropped_karma: DEFAULT_AIRDROPPED_KARMA, epk_path_elements: epochTreePathElements, hash_chain_results: hashChainResults, epoch_tree_root: epochTreeRoot diff --git a/test/circuits/verifyEpochKey.ts b/test/circuits/verifyEpochKey.ts index 651de9d..6733f83 100644 --- a/test/circuits/verifyEpochKey.ts +++ b/test/circuits/verifyEpochKey.ts @@ -15,10 +15,12 @@ import { deployUnirep, genEpochKey, getTreeDepthsForTesting } from '../utils' import { genRandomSalt, + hash5, IncrementalQuinTree, stringifyBigInts, } from 'maci-crypto' import { numEpochKeyNoncePerEpoch, circuitEpochTreeDepth, circuitGlobalStateTreeDepth } from "../../config/testLocal" +import { DEFAULT_AIRDROPPED_KARMA } from "../../config/socialMedia" describe('Verify Epoch Key circuits', function () { this.timeout(300000) @@ -34,6 +36,9 @@ describe('Verify Epoch Key circuits', function () { let id, commitment, stateRoot let tree, proof, root let nonce, currentEpoch, epochKey + let hashedLeaf + const transitionedPosRep = 20 + const transitionedNegRep = 0 before(async () => { accounts = await hardhatEthers.getSigners() @@ -50,11 +55,20 @@ describe('Verify Epoch Key circuits', function () { id = genIdentity() commitment = genIdentityCommitment(id) stateRoot = genRandomSalt() + hashedLeaf = hash5([ + commitment, + stateRoot, + BigInt(transitionedPosRep), + BigInt(transitionedNegRep), + BigInt(0) + ]) const hashedStateLeaf = await unirepContract.hashStateLeaf( [ commitment.toString(), - stateRoot.toString() + stateRoot.toString(), + BigInt(DEFAULT_AIRDROPPED_KARMA), + BigInt(0) ] ) tree.insert(BigInt(hashedStateLeaf.toString())) @@ -71,14 +85,18 @@ describe('Verify Epoch Key circuits', function () { for (let i = 0; i < numEpochKeyNoncePerEpoch; i++) { const n = i const epk = genEpochKey(id['identityNullifier'], currentEpoch, n, circuitEpochTreeDepth) + const circuitInputs = { + GST_path_elements: proof.pathElements, + GST_path_index: proof.indices, + GST_root: root, identity_pk: id['keypair']['pubKey'], identity_nullifier: id['identityNullifier'], identity_trapdoor: id['identityTrapdoor'], - user_state_root: stateRoot, - path_elements: proof.pathElements, - path_index: proof.indices, - root: root, + user_tree_root: stateRoot, + user_state_hash: hashedLeaf, + positive_karma: transitionedPosRep, + negative_karma: transitionedNegRep, nonce: n, epoch: currentEpoch, epoch_key: epk, @@ -97,13 +115,16 @@ describe('Verify Epoch Key circuits', function () { // Validate against invalid epoch key const invalidEpochKey1 = maxEPK let circuitInputs = { + GST_path_elements: proof.pathElements, + GST_path_index: proof.indices, + GST_root: root, identity_pk: id['keypair']['pubKey'], identity_nullifier: id['identityNullifier'], identity_trapdoor: id['identityTrapdoor'], - user_state_root: stateRoot, - path_elements: proof.pathElements, - path_index: proof.indices, - root: root, + user_tree_root: stateRoot, + user_state_hash: hashedLeaf, + positive_karma: transitionedPosRep, + negative_karma: transitionedNegRep, nonce: nonce, epoch: currentEpoch, epoch_key: invalidEpochKey1, @@ -122,13 +143,16 @@ describe('Verify Epoch Key circuits', function () { it('Wrong Id should not pass check', async () => { const fakeId = genIdentity() const circuitInputs = { + GST_path_elements: proof.pathElements, + GST_path_index: proof.indices, + GST_root: root, identity_pk: fakeId['keypair']['pubKey'], identity_nullifier: fakeId['identityNullifier'], identity_trapdoor: fakeId['identityTrapdoor'], - user_state_root: stateRoot, - path_elements: proof.pathElements, - path_index: proof.indices, - root: root, + user_tree_root: stateRoot, + user_state_hash: hashedLeaf, + positive_karma: transitionedPosRep, + negative_karma: transitionedNegRep, nonce: nonce, epoch: currentEpoch, epoch_key: epochKey, @@ -147,13 +171,16 @@ describe('Verify Epoch Key circuits', function () { it('Mismatched GST tree root should not pass check', async () => { const otherTreeRoot = genRandomSalt() const circuitInputs = { + GST_path_elements: proof.pathElements, + GST_path_index: proof.indices, + GST_root: root, identity_pk: id['keypair']['pubKey'], identity_nullifier: id['identityNullifier'], identity_trapdoor: id['identityTrapdoor'], - user_state_root: stateRoot, - path_elements: proof.pathElements, - path_index: proof.indices, - root: otherTreeRoot, + user_tree_root: otherTreeRoot, + user_state_hash: hashedLeaf, + positive_karma: transitionedPosRep, + negative_karma: transitionedNegRep, nonce: nonce, epoch: currentEpoch, epoch_key: epochKey, @@ -172,13 +199,16 @@ describe('Verify Epoch Key circuits', function () { it('Invalid nonce should not pass check', async () => { const invalidNonce = numEpochKeyNoncePerEpoch const circuitInputs = { + GST_path_elements: proof.pathElements, + GST_path_index: proof.indices, + GST_root: root, identity_pk: id['keypair']['pubKey'], identity_nullifier: id['identityNullifier'], identity_trapdoor: id['identityTrapdoor'], - user_state_root: stateRoot, - path_elements: proof.pathElements, - path_index: proof.indices, - root: root, + user_tree_root: stateRoot, + user_state_hash: hashedLeaf, + positive_karma: transitionedPosRep, + negative_karma: transitionedNegRep, nonce: invalidNonce, epoch: currentEpoch, epoch_key: epochKey, @@ -203,13 +233,16 @@ describe('Verify Epoch Key circuits', function () { invalidEpochKey = genEpochKey(id['identityNullifier'], invalidEpoch, nonce, circuitEpochTreeDepth) } const circuitInputs = { + GST_path_elements: proof.pathElements, + GST_path_index: proof.indices, + GST_root: root, identity_pk: id['keypair']['pubKey'], identity_nullifier: id['identityNullifier'], identity_trapdoor: id['identityTrapdoor'], - user_state_root: stateRoot, - path_elements: proof.pathElements, - path_index: proof.indices, - root: root, + user_tree_root: stateRoot, + user_state_hash: hashedLeaf, + positive_karma: transitionedPosRep, + negative_karma: transitionedNegRep, nonce: nonce, epoch: invalidEpoch, epoch_key: epochKey, diff --git a/test/integration/Integration.ts b/test/integration/Integration.ts index ee6f6d4..825720c 100644 --- a/test/integration/Integration.ts +++ b/test/integration/Integration.ts @@ -358,24 +358,16 @@ describe('Integration', function () { const epk = genEpochKey(users[0].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth).toString(16) // gen nullifier nonce list - const proveKarmaNullifiers = BigInt(1) - const proveKarmaAmount = BigInt(DEFAULT_POST_KARMA) + const proveKarmaAmount = DEFAULT_POST_KARMA const nonceStarter: number = 0 - const nonceList: BigInt[] = [] - for (let i = 0; i < DEFAULT_POST_KARMA; i++) { - nonceList.push( BigInt(nonceStarter + i) ) - } // gen minRep proof - const proveMinRep = BigInt(0) - const minRep = BigInt(0) + const minRep = 0 const circuitInputs = await users[0].genProveReputationCircuitInputs( epochKeyNonce, // generate epoch key from epoch nonce - proveKarmaNullifiers, // indicate to prove karma nullifiers proveKarmaAmount, // the amount of output karma nullifiers - nonceList, // nonce to generate karma nullifiers - proveMinRep, // indicate to prove minimum reputation the user has + nonceStarter, // nonce to generate karma nullifiers minRep // the amount of minimum reputation the user wants to prove ) const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) @@ -437,20 +429,13 @@ describe('Integration', function () { const secondUserEpochKey = genEpochKey(users[1].id.identityNullifier, currentEpoch.toNumber(), nonce, circuitEpochTreeDepth) // gen nullifier nonce list - const proveKarmaNullifiers = BigInt(1) const voteValue = 3 - const proveKarmaAmount = BigInt(voteValue) - const upvoteValue = BigInt(voteValue) - + const proveKarmaAmount = voteValue + const upvoteValue = BigInt(voteValue) const nonceStarter: number = 0 - const nonceList: BigInt[] = [] - for (let i = 0; i < voteValue; i++) { - nonceList.push( BigInt(nonceStarter + i) ) - } // gen minRep proof - const proveMinRep = BigInt(0) - const minRep = BigInt(0) + const minRep = 0 // Add graffiti pre-image to graffitiPreImageMap graffitiPreImageMap[0] = new Object() @@ -460,10 +445,8 @@ describe('Integration', function () { // generating reputation proof const circuitInputs = await users[1].genProveReputationCircuitInputs( nonce, // generate epoch key from epoch nonce - proveKarmaNullifiers, // indicate to prove karma nullifiers proveKarmaAmount, // the amount of output karma nullifiers - nonceList, // nonce to generate karma nullifiers - proveMinRep, // indicate to prove minimum reputation the user has + nonceStarter, // nonce to generate karma nullifiers minRep // the amount of minimum reputation the user wants to prove ) @@ -788,24 +771,16 @@ describe('Integration', function () { const epk = genEpochKey(users[0].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth).toString(16) // gen nullifier nonce list - const proveKarmaNullifiers = BigInt(1) - const proveKarmaAmount = BigInt(DEFAULT_POST_KARMA) + const proveKarmaAmount = DEFAULT_COMMENT_KARMA const nonceStarter: number = 0 - const nonceList: BigInt[] = [] - for (let i = 0; i < DEFAULT_POST_KARMA; i++) { - nonceList.push( BigInt(nonceStarter + i) ) - } // gen minRep proof - const proveMinRep = BigInt(0) - const minRep = BigInt(0) + const minRep = 0 const circuitInputs = await users[0].genProveReputationCircuitInputs( epochKeyNonce, // generate epoch key from epoch nonce - proveKarmaNullifiers, // indicate to prove karma nullifiers proveKarmaAmount, // the amount of output karma nullifiers - nonceList, // nonce to generate karma nullifiers - proveMinRep, // indicate to prove minimum reputation the user has + nonceStarter, // nonce to generate karma nullifiers minRep // the amount of minimum reputation the user wants to prove ) const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) From 941e01116622e88bd6697267effcb2bb8d4f04d5 Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Wed, 12 May 2021 09:25:53 +0800 Subject: [PATCH 22/38] update new_rep by adding old_rep --- .DS_Store | Bin 8196 -> 8196 bytes circuits/processAttestations.circom | 5 +- circuits/userStateTransition.circom | 2 +- cli/test/testAllCommands.ts | 97 +++++++-------------------- core/UserState.ts | 48 ++++++++----- test/circuits/processAttestations.ts | 20 ++++-- test/circuits/userStateTransition.ts | 9 ++- 7 files changed, 80 insertions(+), 101 deletions(-) diff --git a/.DS_Store b/.DS_Store index ce3c5f24e76c9c16e8d2512a45120ee28c783ed3..e715b3f3c81d8ac0cda6a8d1c5cd7da327a1758b 100644 GIT binary patch delta 33 ncmZp1XmOa}&nUVvU^hRb=wu!N^Ub*ekC->B@&E~TiNEXsxpxZr delta 54 zcmZp1XmOa}&nUJrU^hRb*km37bIBxzQie>19EKFnoc!dZoctsP1_l8jUccE$;4|}P If03=+0HBW#761SM diff --git a/circuits/processAttestations.circom b/circuits/processAttestations.circom index ce5f8b5..ac7ba07 100644 --- a/circuits/processAttestations.circom +++ b/circuits/processAttestations.circom @@ -92,7 +92,6 @@ template ProcessAttestations(nullifier_tree_depth, user_state_tree_depth, NUM_AT epoch_key_nullifier <== epoch_key_nullifier_hasher.hash; /* End of 1. verify attestation hash chain and compute nullifiers */ - /* 2. Process attestations and update user state tree */ // If the attestation is not to be processed, we check and verify leaf 0 instead. @@ -157,8 +156,8 @@ template ProcessAttestations(nullifier_tree_depth, user_state_tree_depth, NUM_AT overwrite_graffiti_muxer[i].c[1] <== graffities[i]; overwrite_graffiti_muxer[i].s <== overwrite_graffitis[i]; new_leaf_value_hasher[i] = Hasher5(); - new_leaf_value_hasher[i].in[0] <== pos_reps[i]; - new_leaf_value_hasher[i].in[1] <== neg_reps[i]; + new_leaf_value_hasher[i].in[0] <== pos_reps[i] + old_pos_reps[i]; + new_leaf_value_hasher[i].in[1] <== neg_reps[i] + old_neg_reps[i]; new_leaf_value_hasher[i].in[2] <== overwrite_graffiti_muxer[i].out; new_leaf_value_hasher[i].in[3] <== 0; new_leaf_value_hasher[i].in[4] <== 0; diff --git a/circuits/userStateTransition.circom b/circuits/userStateTransition.circom index 285664d..24b22ce 100644 --- a/circuits/userStateTransition.circom +++ b/circuits/userStateTransition.circom @@ -102,7 +102,7 @@ template UserStateTransition( ATTESTATIONS_PER_EPOCH_KEY * EPOCH_KEY_NONCE_PER_EPOCH === TOTAL_NUM_ATTESTATIONS; /* 0. Validate inputs */ for (var i = 0; i < TOTAL_NUM_ATTESTATIONS; i++) { - selectors[i] * (selectors[i] - 1) === 0 + selectors[i] * (selectors[i] - 1) === 0; } /* End of check 0 */ diff --git a/cli/test/testAllCommands.ts b/cli/test/testAllCommands.ts index 887766b..616cf07 100644 --- a/cli/test/testAllCommands.ts +++ b/cli/test/testAllCommands.ts @@ -309,6 +309,29 @@ describe('test all CLI subcommands', function() { }) }) + describe('leaveComment CLI subcommand', () => { + it('should leave a comment', async () => { + const command = `npx ts-node cli/index.ts leaveComment` + + ` -x ${unirepContract.address} ` + + ` -pid ${postID} ` + + ` -tx ${text2}` + + ` -d ${userPrivKey}` + + ` -id ${userIdentity1}` + + ` -n ${epochKeyNonce2}` + + ` -kn ${commentNonce}` + + ` -mr ${minRepDiff}` + + dbOption + + const output = exec(command).stdout.trim() + + console.log(command) + console.log(output) + + const commentRegMatch = output.match(/Transaction hash: 0x[a-fA-F0-9]{64}/) + expect(commentRegMatch).not.equal(null) + }) + }) + describe('upvote CLI subcommand', () => { it('should upvote to user', async () => { @@ -453,78 +476,4 @@ describe('test all CLI subcommands', function() { expect(verifyRegMatch).not.equal(null) }) }) - - describe('leaveComment CLI subcommand', () => { - it('should leave a comment', async () => { - const command = `npx ts-node cli/index.ts leaveComment` + - ` -x ${unirepContract.address} ` + - ` -pid ${postID} ` + - ` -tx ${text2}` + - ` -d ${userPrivKey}` + - ` -id ${userIdentity2}` + - ` -n ${epochKeyNonce}` + - ` -kn ${commentNonce}` + - ` -mr ${minRepDiff}` + - dbOption - - const output = exec(command).stdout.trim() - - console.log(command) - console.log(output) - - const commentRegMatch = output.match(/Transaction hash: 0x[a-fA-F0-9]{64}/) - expect(commentRegMatch).not.equal(null) - }) - }) - - describe('epochTransition CLI subcommand', () => { - it('should transition to next epoch', async () => { - const command = `npx ts-node cli/index.ts epochTransition` + - ` -x ${unirepContract.address} ` + - ` -d ${deployerPrivKey} ` + - ` -t ` - - const output = exec(command).stdout.trim() - - console.log(command) - console.log(output) - - const epochEndRegMatch = output.match(/End of epoch: 2/) - expect(epochEndRegMatch).not.equal(null) - }) - }) - - describe('userStateTransition CLI subcommand', () => { - it('should transition user 1 state', async () => { - const command = `npx ts-node cli/index.ts userStateTransition` + - ` -x ${unirepContract.address} ` + - ` -d ${userPrivKey} ` + - ` -id ${userIdentity1} ` + - dbOption - - const output = exec(command).stdout.trim() - - console.log(command) - console.log(output) - - const userTransitionRegMatch = output.match(/User transitioned from epoch 2 to epoch 3/) - expect(userTransitionRegMatch).not.equal(null) - }) - - it('should transition user 2 state', async () => { - const command = `npx ts-node cli/index.ts userStateTransition` + - ` -x ${unirepContract.address} ` + - ` -d ${userPrivKey} ` + - ` -id ${userIdentity2} ` + - dbOption - - const output = exec(command).stdout.trim() - - console.log(command) - console.log(output) - - const userTransitionRegMatch = output.match(/User transitioned from epoch 2 to epoch 3/) - expect(userTransitionRegMatch).not.equal(null) - }) - }) }) \ No newline at end of file diff --git a/core/UserState.ts b/core/UserState.ts index 64a2f7d..7f57c30 100644 --- a/core/UserState.ts +++ b/core/UserState.ts @@ -48,12 +48,12 @@ class Reputation implements IReputation { _graffiti: BigInt, _overwriteGraffiti: boolean, ): Reputation => { - const newRep = new Reputation( - _posRep, - _negRep, - _overwriteGraffiti ? _graffiti : this.graffiti - ) - return newRep + this.posRep = BigInt(Number(this.posRep) + Number(_posRep)) + this.negRep = BigInt(Number(this.negRep) + Number(_negRep)) + if(_overwriteGraffiti) { + this.graffiti = _graffiti + } + return this } public addGraffitiPreImage = (_graffitiPreImage: BigInt) => { @@ -428,6 +428,7 @@ class UserState { BigInt(0) ]) + let reputationRecords = {} const selectors: number[] = [] const attesterIds: BigInt[] = [] const oldPosReps: BigInt[] = [], oldNegReps: BigInt[] = [], oldGraffities: BigInt[] = [] @@ -442,25 +443,42 @@ class UserState { const attestation = attestations[i] const attesterId = attestation.attesterId const rep = this.getRepByAttester(attesterId) - oldPosReps.push(rep.posRep) - oldNegReps.push(rep.negRep) - oldGraffities.push(rep.graffiti) + + if (reputationRecords[attesterId.toString()] === undefined) { + reputationRecords[attesterId.toString()] = new Reputation( + rep.posRep, + rep.negRep, + rep.graffiti + ) + } + + oldPosReps.push(reputationRecords[attesterId.toString()]['posRep']) + oldNegReps.push(reputationRecords[attesterId.toString()]['negRep']) + oldGraffities.push(reputationRecords[attesterId.toString()]['graffiti']) // Add UST merkle proof to the list const USTLeafPathElements = await fromEpochUserStateTree.getMerkleProof(attesterId) userStateLeafPathElements.push(USTLeafPathElements) - const newRep = rep.update(attestation.posRep, attestation.negRep, attestation.graffiti, attestation.overwriteGraffiti) + + // Update attestation record + reputationRecords[attesterId.toString()].update( + attestation['posRep'], + attestation['negRep'], + attestation['graffiti'], + attestation['overwriteGraffiti'] + ) + // Update UST - await fromEpochUserStateTree.update(attesterId, newRep.hash()) + await fromEpochUserStateTree.update(attesterId, reputationRecords[attesterId.toString()].hash()) // Add new UST root to intermediate UST roots intermediateUserStateTreeRoots.push(fromEpochUserStateTree.getRootHash()) selectors.push(1) attesterIds.push(attesterId) - posReps.push(newRep.posRep) - negReps.push(newRep.negRep) - graffities.push(newRep.graffiti) - overwriteGraffitis.push(attestation.overwriteGraffiti) + posReps.push(attestation['posRep']) + negReps.push(attestation['negRep']) + graffities.push(attestation['graffiti']) + overwriteGraffitis.push(attestation['overwriteGraffiti']) } // Fill in blank data for non-exist attestation for (let i = 0; i < (this.numAttestationsPerEpochKey - attestations.length); i++) { diff --git a/test/circuits/processAttestations.ts b/test/circuits/processAttestations.ts index cf25fb5..1bf9ea8 100644 --- a/test/circuits/processAttestations.ts +++ b/test/circuits/processAttestations.ts @@ -64,13 +64,20 @@ describe('Process attestation circuit', function () { // Bootstrap user state for (let i = 0; i < NUM_ATTESTATIONS; i++) { - const attesterId = BigInt(i + 1) + const attesterId = BigInt(i%(NUM_ATTESTATIONS/2)+1) if (reputationRecords[attesterId.toString()] === undefined) { reputationRecords[attesterId.toString()] = new Reputation( BigInt(Math.floor(Math.random() * 100)), BigInt(Math.floor(Math.random() * 100)), genRandomSalt(), ) + } else { + reputationRecords[attesterId.toString()].update( + BigInt(Math.floor(Math.random() * 100)), + BigInt(Math.floor(Math.random() * 100)), + genRandomSalt(), + true + ) } await userStateTree.update(attesterId, reputationRecords[attesterId.toString()].hash()) } @@ -88,7 +95,7 @@ describe('Process attestation circuit', function () { nullifiers = [] hashChainResult = BigInt(0) for (let i = 0; i < NUM_ATTESTATIONS; i++) { - const attesterId = BigInt(i + 1) + const attesterId = BigInt(i%(NUM_ATTESTATIONS/2)+1) const attestation: Attestation = new Attestation( attesterId, BigInt(Math.floor(Math.random() * 100)), @@ -112,9 +119,12 @@ describe('Process attestation circuit', function () { userStateTreePathElements.push(oldReputationRecordProof) // Update reputation record - reputationRecords[attesterId.toString()]['posRep'] = attestation['posRep'] - reputationRecords[attesterId.toString()]['negRep'] = attestation['negRep'] - if (attestation['overwriteGraffiti']) reputationRecords[attesterId.toString()]['graffiti'] = attestation['graffiti'] + reputationRecords[attesterId.toString()].update( + attestation['posRep'], + attestation['negRep'], + attestation['graffiti'], + attestation['overwriteGraffiti'] + ) await userStateTree.update(attesterId, reputationRecords[attesterId.toString()].hash()) diff --git a/test/circuits/userStateTransition.ts b/test/circuits/userStateTransition.ts index 23c7ad2..0e15ffa 100644 --- a/test/circuits/userStateTransition.ts +++ b/test/circuits/userStateTransition.ts @@ -217,11 +217,14 @@ describe('User State Transition circuits', function () { userStateLeafPathElements.push(oldReputationRecordProof) // Update attestation record - reputationRecords[attesterId.toString()]['posRep'] = attestation['posRep'] - reputationRecords[attesterId.toString()]['negRep'] = attestation['negRep'] + reputationRecords[attesterId.toString()].update( + attestation['posRep'], + attestation['negRep'], + attestation['graffiti'], + attestation['overwriteGraffiti'] + ) currentEpochPosRep += Number(attestation['posRep']) currentEpochNegRep += Number(attestation['negRep']) - if (attestation['overwriteGraffiti']) reputationRecords[attesterId.toString()]['graffiti'] = attestation['graffiti'] await userStateTree.update(BigInt(attesterId), reputationRecords[attesterId.toString()].hash()) const attestation_hash = attestation.hash() From 8ddef4a20d7fb475ffa48ae6c2cd0832c7457998 Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Thu, 13 May 2021 20:38:10 +0800 Subject: [PATCH 23/38] test post function --- .DS_Store | Bin 8196 -> 8196 bytes config/testLocal.ts | 4 +- contracts/Unirep.sol | 2 +- test/.DS_Store | Bin 0 -> 6148 bytes test/circuits/.DS_Store | Bin 0 -> 6148 bytes test/circuits/processAttestations.ts | 4 +- test/circuits/userStateTransition.ts | 221 +++++++++++ test/contracts/Posting.ts | 536 +++++++++++++++++++++++++++ 8 files changed, 762 insertions(+), 5 deletions(-) create mode 100644 test/.DS_Store create mode 100644 test/circuits/.DS_Store create mode 100644 test/contracts/Posting.ts diff --git a/.DS_Store b/.DS_Store index e715b3f3c81d8ac0cda6a8d1c5cd7da327a1758b..f6f5a36096d6bf1513aac9262a94566ef78efe03 100644 GIT binary patch delta 340 zcmZp1XmOa}&nU4mU^hRb#AF@;bIBxzQie>19EKFnoc!dZoctsP1_l8jUccE$U?+1u z3quJ*Dnl_tNm6-n0aW@#QbA5;afyM!bw(y;7FITP4o*%EPF~K~;Eeq8;F83W(qgB? zqG%8=Ah9GP3Ca%1&(DFg6O+O+Q_JH8M4a>UN)j{kQj5TvGgDH5N@Bt@^HTE5o$^cT z^HPez1_eW8z&6DTh*wt|8W`#*m>JgUC{$Y-8R#gO7@O7Ba&m~P8rpg$n+X6n(_SF} delta 41 xcmZp1XmOa}&nUVvU^hRb=wu!N^Ub*eE0`zqirQ>e=Xt=qnO))=%fv2SBZzM6D&`t!$?egdpE} z0eA{tgE!!D;GfwAk~p~`RKbq4`|s||*xpa}u9t|^U@{7cx1kXi^`sgkFJDAUXZ})Ea@aW{t+jq0~^ADe7CZw=#iQTmNQ$C~7n&(Aa7P&4?;p03X95fYJ z@k&b2wkzKPxi5%XB)2Bxva#F$GwjyPbcNmy-XUf;rc>cpqYs+Acl;)(?yL~>@Q!k1 zP8IF7iK~w*@#s3+K)}BH-p&TU8+HU7f&Z5PuMYtVYh<-CDoY0{IRZdC7#2gDe;GI@ zuo_uyjKTv`CKYN@l|5o8laBGg#zj^eqb8k{J$xv8XJt<)O74#92NF&yGU{qaz!6v` zux+|s-v6I$KL0N#xt=572>eq7ROc{09AHXzZ*5JE_u2sE1ci;`8l#ee%5KNf;H~&J biWqzWH=vQ##wbQ$?ngi{xXKaus|0=kZ}iW$ literal 0 HcmV?d00001 diff --git a/test/circuits/.DS_Store b/test/circuits/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..eadca147338a98bf34eb5d025b6dfe22246dd05b GIT binary patch literal 6148 zcmeHKOHRWu5PdFP6xi?)hz%$wsKgDzrwD}D00*GZ02M8%+Je+w_S}Iha2gK73f_zd zl%zqhLI^yS{T$o#;(2!L8i3or>udrG02)k!^*Lr0Chd}@tY$UyM5i1HhG=4p(Lryj zcc=&o1Ov?nCHIV^y0jip0ic9hApP%s~Std3cBd9_btEmF4F`%NYUp{ zp8D2eJ3)czsl>E~1F~Fj-$*|E+UVg($8y6`f>Uix-glNfpIa~Stzy95DH#(+G~&p| z{7HGt7-h66-#4n{dMI%%8P`4ikC_IzE3j0==Uz%28((nj>1g|faegujwW|{MGUFI9 zsv$A?u41+463Z&168|AiEIO}vTXmB8^qN&ftLx%1w=Np0P?xh-sW4>r^Zgeg+79`K zORk|7qmh}r#vyAbm2)KXoo84oFznkp-q97^Wds$Yb~4X-4nF=%3}eI0BU@9p z^zLwW`Ed4TXEzk5Zzq4G-Qi-7ArA@!1&RvH_{Rk~|68Bm|BFuHDJT#W_)`kF`tHf@ zHbb(rbt*VHYa^yJCNb%kc~lo>b{uO#j^Z^YHMT`kAjXE7N7m579|4siWI=%+Rp1RV C7tk~S literal 0 HcmV?d00001 diff --git a/test/circuits/processAttestations.ts b/test/circuits/processAttestations.ts index 1bf9ea8..e23add1 100644 --- a/test/circuits/processAttestations.ts +++ b/test/circuits/processAttestations.ts @@ -64,7 +64,7 @@ describe('Process attestation circuit', function () { // Bootstrap user state for (let i = 0; i < NUM_ATTESTATIONS; i++) { - const attesterId = BigInt(i%(NUM_ATTESTATIONS/2)+1) + const attesterId = BigInt(i+1) if (reputationRecords[attesterId.toString()] === undefined) { reputationRecords[attesterId.toString()] = new Reputation( BigInt(Math.floor(Math.random() * 100)), @@ -95,7 +95,7 @@ describe('Process attestation circuit', function () { nullifiers = [] hashChainResult = BigInt(0) for (let i = 0; i < NUM_ATTESTATIONS; i++) { - const attesterId = BigInt(i%(NUM_ATTESTATIONS/2)+1) + const attesterId = BigInt(i+1) const attestation: Attestation = new Attestation( attesterId, BigInt(Math.floor(Math.random() * 100)), diff --git a/test/circuits/userStateTransition.ts b/test/circuits/userStateTransition.ts index 0e15ffa..4d160d1 100644 --- a/test/circuits/userStateTransition.ts +++ b/test/circuits/userStateTransition.ts @@ -323,6 +323,227 @@ describe('User State Transition circuits', function () { expect(isValid).to.be.true }) + it('Same attester give reputation to different epoch keys should work', async () => { + + // Epoch tree + epochTree = await genNewEpochTree("circuit") + + // User state tree + userStateTree = await genNewUserStateTree("circuit") + intermediateUserStateTreeRoots = [] + userStateLeafPathElements = [] + oldPosReps = [] + oldNegReps = [] + oldGraffities = [] + + // Bootstrap user state + for (let i = 1; i < maxNumAttesters; i++) { + const attesterId = BigInt(i) + if (reputationRecords[attesterId.toString()] === undefined) { + reputationRecords[attesterId.toString()] = new Reputation( + BigInt(Math.floor(Math.random() * 100)), + BigInt(Math.floor(Math.random() * 100)), + genRandomSalt(), + ) + } + await userStateTree.update(BigInt(attesterId), reputationRecords[attesterId.toString()].hash()) + } + intermediateUserStateTreeRoots.push(userStateTree.getRootHash()) + + // Global state tree + GSTree = new IncrementalQuinTree(circuitGlobalStateTreeDepth, GSTZERO_VALUE, 2) + const commitment = genIdentityCommitment(user) + hashedLeaf = hash5([ + commitment, + userStateTree.getRootHash(), + BigInt(transitionedPosRep), + BigInt(transitionedNegRep), + BigInt(0) + ]) + GSTree.insert(hashedLeaf) + GSTreeProof = GSTree.genMerklePath(0) + GSTreeRoot = GSTree.root + + attesterIds = [] + posReps = [] + negReps = [] + graffities = [] + overwriteGraffitis = [] + selectors = [] + hashChainResults = [] + currentEpochPosRep = 0 + currentEpochNegRep = 0 + + let numAttestationsMade = 0 + for (let i = 0; i < TOTAL_NUM_ATTESTATIONS; i++) { + if (numAttestationsMade < expectedNumAttestationsMade) { + const s = Math.floor(Math.random() * 2) + selectors.push(s) + if (s == 1) numAttestationsMade++ + } else { + selectors.push(0) + } + } + + // Begin generating and processing attestations + nullifiers = [] + epochTreePathElements = [] + let hashChainResult: BigInt + const attesterToNonceMap = {} + let startIndex + // generate an attester id list + const attesterIdList: BigInt[] = [] + for(let i = 1; i <= ATTESTATIONS_PER_EPOCH_KEY; i++) { + attesterIdList.push(BigInt(i)) + } + + for (let nonce = 0; nonce < EPK_NONCE_PER_EPOCH; nonce++) { + startIndex = nonce * ATTESTATIONS_PER_EPOCH_KEY + attesterToNonceMap[nonce] = [] + hashChainResult = BigInt(0) + // Each epoch key has `ATTESTATIONS_PER_EPOCH_KEY` of attestations so + // interval between starting index of each epoch key is `ATTESTATIONS_PER_EPOCH_KEY`. + const epochKey = genEpochKey(user['identityNullifier'], epoch, nonce, circuitEpochTreeDepth) + for (let i = 0; i < ATTESTATIONS_PER_EPOCH_KEY; i++) { + // attesterId ranges from 1 to (maxNumAttesters - 1) + let attesterId = attesterIdList[i] + const attestation: Attestation = new Attestation( + attesterId, + BigInt(Math.floor(Math.random() * 100)), + BigInt(Math.floor(Math.random() * 100)), + genRandomSalt(), + true, + ) + // If nullifier tree is too small, it's likely that nullifier would be zero and + // this conflicts with the reserved zero leaf of nullifier tree. + // In this case, force selector to be zero. + const nullifier = genAttestationNullifier(user['identityNullifier'], attesterId, epoch, epochKey, circuitNullifierTreeDepth) + if ( nullifier == BigInt(0) ) { + if (selectors[startIndex + i] == 1) numAttestationsMade-- + selectors[startIndex + i] = 0 + } + + if ( selectors[startIndex + i] == 1) { + attesterToNonceMap[nonce].push(attesterId) + + attesterIds.push(attesterId) + posReps.push(attestation['posRep']) + negReps.push(attestation['negRep']) + graffities.push(attestation['graffiti']) + overwriteGraffitis.push(attestation['overwriteGraffiti']) + + oldPosReps.push(reputationRecords[attesterId.toString()]['posRep']) + oldNegReps.push(reputationRecords[attesterId.toString()]['negRep']) + oldGraffities.push(reputationRecords[attesterId.toString()]['graffiti']) + + // Get old attestation record proof + const oldReputationRecordProof = await userStateTree.getMerkleProof(BigInt(attesterId)) + userStateLeafPathElements.push(oldReputationRecordProof) + + // Update attestation record + reputationRecords[attesterId.toString()].update( + attestation['posRep'], + attestation['negRep'], + attestation['graffiti'], + attestation['overwriteGraffiti'] + ) + currentEpochPosRep += Number(attestation['posRep']) + currentEpochNegRep += Number(attestation['negRep']) + await userStateTree.update(BigInt(attesterId), reputationRecords[attesterId.toString()].hash()) + + const attestation_hash = attestation.hash() + hashChainResult = hashLeftRight(attestation_hash, hashChainResult) + + nullifiers.push(nullifier) + } else { + attesterIds.push(BigInt(0)) + posReps.push(BigInt(0)) + negReps.push(BigInt(0)) + graffities.push(BigInt(0)) + overwriteGraffitis.push(false) + + oldPosReps.push(BigInt(0)) + oldNegReps.push(BigInt(0)) + oldGraffities.push(BigInt(0)) + + const USTLeafZeroPathElements = await userStateTree.getMerkleProof(BigInt(0)) + userStateLeafPathElements.push(USTLeafZeroPathElements) + + nullifiers.push(BigInt(0)) + } + intermediateUserStateTreeRoots.push(userStateTree.getRootHash()) + } + // Seal hash chain of this epoch key + hashChainResult = hashLeftRight(BigInt(1), hashChainResult) + hashChainResults.push(hashChainResult) + // Update epoch tree + await epochTree.update(epochKey, hashChainResult) + } + + // Compute new GST Leaf + const latestUSTRoot = intermediateUserStateTreeRoots[TOTAL_NUM_ATTESTATIONS] + newGSTLeaf = hash5([ + commitment, + latestUSTRoot, + BigInt(transitionedPosRep + currentEpochPosRep + DEFAULT_AIRDROPPED_KARMA), + BigInt(transitionedNegRep + currentEpochNegRep), + BigInt(0) + ]) + + for (let nonce = 0; nonce < EPK_NONCE_PER_EPOCH; nonce++) { + const epochKey = genEpochKey(user['identityNullifier'], epoch, nonce, circuitEpochTreeDepth) + // Get epoch tree root and merkle proof for this epoch key + epochTreePathElements.push(await epochTree.getMerkleProof(epochKey)) + } + epochTreeRoot = epochTree.getRootHash() + + const circuitInputs = { + epoch: epoch, + intermediate_user_state_tree_roots: intermediateUserStateTreeRoots, + old_pos_reps: oldPosReps, + old_neg_reps: oldNegReps, + old_graffities: oldGraffities, + UST_path_elements: userStateLeafPathElements, + identity_pk: user['keypair']['pubKey'], + identity_nullifier: user['identityNullifier'], + identity_trapdoor: user['identityTrapdoor'], + user_state_hash: hashedLeaf, + old_positive_karma: BigInt(transitionedPosRep), + old_negative_karma: BigInt(transitionedNegRep), + GST_path_elements: GSTreeProof.pathElements, + GST_path_index: GSTreeProof.indices, + GST_root: GSTreeRoot, + selectors: selectors, + attester_ids: attesterIds, + pos_reps: posReps, + neg_reps: negReps, + graffities: graffities, + overwrite_graffitis: overwriteGraffitis, + positive_karma: BigInt(transitionedPosRep + currentEpochPosRep + DEFAULT_AIRDROPPED_KARMA), + negative_karma: BigInt(transitionedNegRep + currentEpochNegRep), + airdropped_karma: DEFAULT_AIRDROPPED_KARMA, + epk_path_elements: epochTreePathElements, + hash_chain_results: hashChainResults, + epoch_tree_root: epochTreeRoot + } + + const witness = await executeCircuit(circuit, circuitInputs) + for (let i = 0; i < TOTAL_NUM_ATTESTATIONS; i++) { + const nullifier = getSignalByName(circuit, witness, 'main.nullifiers[' + i + ']') + const modedNullifier = BigInt(nullifier) % BigInt(2 ** circuitNullifierTreeDepth) + expect(modedNullifier).to.equal(nullifiers[i]) + } + const _newGSTLeaf = getSignalByName(circuit, witness, 'main.new_GST_leaf') + expect(BigNumber.from(_newGSTLeaf)).to.equal(BigNumber.from(newGSTLeaf)) + + const startTime = new Date().getTime() + const results = await genVerifyUserStateTransitionProofAndPublicSignals(stringifyBigInts(circuitInputs)) + const endTime = new Date().getTime() + console.log(`Gen Proof time: ${endTime - startTime} ms (${Math.floor((endTime - startTime) / 1000)} s)`) + const isValid = await verifyUserStateTransitionProof(results['proof'], results['publicSignals']) + expect(isValid).to.be.true + }) + it('User state update with invalid selector value should not work', async () => { const invalidSelectors = selectors.slice() const indexToCorrupt = Math.floor(Math.random() * (TOTAL_NUM_ATTESTATIONS)) diff --git a/test/contracts/Posting.ts b/test/contracts/Posting.ts new file mode 100644 index 0000000..2c9a993 --- /dev/null +++ b/test/contracts/Posting.ts @@ -0,0 +1,536 @@ +import { ethers as hardhatEthers } from 'hardhat' +import { BigNumber, ethers } from 'ethers' +import chai from "chai" +import { attestingFee, epochLength, circuitEpochTreeDepth, circuitGlobalStateTreeDepth, numEpochKeyNoncePerEpoch, maxUsers, circuitNullifierTreeDepth, numAttestationsPerEpochKey, circuitUserStateTreeDepth} from '../../config/testLocal' +import { genIdentity, genIdentityCommitment } from 'libsemaphore' +import { genRandomSalt, IncrementalQuinTree, stringifyBigInts } from 'maci-crypto' +import { deployUnirep, genEpochKey, genNewUserStateTree, getTreeDepthsForTesting } from '../utils' + +const { expect } = chai + +import Unirep from "../../artifacts/contracts/Unirep.sol/Unirep.json" +import { DEFAULT_AIRDROPPED_KARMA, DEFAULT_COMMENT_KARMA, DEFAULT_POST_KARMA, MAX_KARMA_BUDGET } from '../../config/socialMedia' +import { UnirepState, UserState } from '../../core' +import { compileAndLoadCircuit, executeCircuit, formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyProveReputationProof } from '../circuits/utils' +import { DEFAULT_ETH_PROVIDER } from '../../cli/defaults' + + +describe('Post', function () { + this.timeout(300000) + + let circuit + let unirepContract + let GSTree + let emptyUserStateRoot + const ids = new Array(2) + const commitments = new Array(2) + let users: UserState[] = new Array(2) + let unirepState + let attesters = new Array(2) + let attesterAddresses = new Array(2) + + let accounts: ethers.Signer[] + let provider + let unirepContractCalledByAttesters = new Array(2) + + const epochKeyNonce = 0 + let proof + let publicSignals + let witness + const postId = genRandomSalt() + const commentId = genRandomSalt() + const text = genRandomSalt().toString() + + before(async () => { + accounts = await hardhatEthers.getSigners() + provider = new hardhatEthers.providers.JsonRpcProvider(DEFAULT_ETH_PROVIDER) + + const _treeDepths = getTreeDepthsForTesting('circuit') + unirepContract = await deployUnirep(accounts[0], _treeDepths) + + const blankGSLeaf = await unirepContract.hashedBlankStateLeaf() + GSTree = new IncrementalQuinTree(circuitGlobalStateTreeDepth, blankGSLeaf, 2) + }) + + it('should have the correct config value', async () => { + const attestingFee_ = await unirepContract.attestingFee() + expect(attestingFee).equal(attestingFee_) + const epochLength_ = await unirepContract.epochLength() + expect(epochLength).equal(epochLength_) + const numAttestationsPerEpochKey_ = await unirepContract.numAttestationsPerEpochKey() + expect(numAttestationsPerEpochKey).equal(numAttestationsPerEpochKey_) + const numEpochKeyNoncePerEpoch_ = await unirepContract.numEpochKeyNoncePerEpoch() + expect(numEpochKeyNoncePerEpoch).equal(numEpochKeyNoncePerEpoch_) + const numAttestationsPerEpoch_ = await unirepContract.numAttestationsPerEpoch() + expect(numEpochKeyNoncePerEpoch * numAttestationsPerEpochKey).equal(numAttestationsPerEpoch_) + const maxUsers_ = await unirepContract.maxUsers() + expect(maxUsers).equal(maxUsers_) + + const treeDepths_ = await unirepContract.treeDepths() + expect(circuitEpochTreeDepth).equal(treeDepths_.epochTreeDepth) + expect(circuitGlobalStateTreeDepth).equal(treeDepths_.globalStateTreeDepth) + expect(circuitNullifierTreeDepth).equal(treeDepths_.nullifierTreeDepth) + expect(circuitUserStateTreeDepth).equal(treeDepths_.userStateTreeDepth) + }) + + it('should have the correct default value', async () => { + const emptyUSTree = await genNewUserStateTree() + emptyUserStateRoot = await unirepContract.emptyUserStateRoot() + expect(BigNumber.from(emptyUSTree.getRootHash())).equal(emptyUserStateRoot) + + const emptyGlobalStateTreeRoot = await unirepContract.emptyGlobalStateTreeRoot() + expect(BigNumber.from(GSTree.root)).equal(emptyGlobalStateTreeRoot) + }) + + describe('User sign-ups', () => { + + it('sign up should succeed', async () => { + let GSTreeLeafIndex: number = -1 + const currentEpoch = await unirepContract.currentEpoch() + unirepState = new UnirepState( + circuitGlobalStateTreeDepth, + circuitUserStateTreeDepth, + circuitEpochTreeDepth, + circuitNullifierTreeDepth, + attestingFee, + epochLength, + numEpochKeyNoncePerEpoch, + numAttestationsPerEpochKey, + ) + for (let i = 0; i < 2; i++) { + ids[i] = genIdentity() + commitments[i] = genIdentityCommitment(ids[i]) + const tx = await unirepContract.userSignUp(commitments[i]) + const receipt = await tx.wait() + + expect(receipt.status).equal(1) + + const numUserSignUps_ = await unirepContract.numUserSignUps() + expect(i+1).equal(numUserSignUps_) + + const hashedStateLeaf = await unirepContract.hashStateLeaf( + [ + commitments[i], + emptyUserStateRoot, + BigInt(DEFAULT_AIRDROPPED_KARMA), + BigInt(0) + ] + ) + GSTree.insert(hashedStateLeaf) + + unirepState.signUp(currentEpoch.toNumber(), BigInt(hashedStateLeaf)) + users[i] = new UserState( + unirepState, + ids[i], + commitments[i], + false + ) + + const latestTransitionedToEpoch = currentEpoch.toNumber() + const newLeafFilter = unirepContract.filters.NewGSTLeafInserted(currentEpoch) + const newLeafEvents = await unirepContract.queryFilter(newLeafFilter) + + + for (let i = 0; i < newLeafEvents.length; i++) { + if(BigInt(newLeafEvents[i]?.args?._hashedLeaf) == BigInt(hashedStateLeaf)){ + GSTreeLeafIndex = newLeafEvents[i]?.args?._leafIndex.toNumber() + } + } + expect(GSTreeLeafIndex).to.equal(i) + + users[i].signUp(latestTransitionedToEpoch, GSTreeLeafIndex) + } + }) + + it('sign up should succeed', async () => { + for (let i = 0; i < 2; i++) { + attesters[i] = accounts[i+1] + attesterAddresses[i] = await attesters[i].getAddress() + unirepContractCalledByAttesters[i] = await hardhatEthers.getContractAt(Unirep.abi, unirepContract.address, attesters[i]) + const tx = await unirepContractCalledByAttesters[i].attesterSignUp() + const receipt = await tx.wait() + + expect(receipt.status).equal(1) + + const attesterId = await unirepContract.attesters(attesterAddresses[i]) + expect(i+1).equal(attesterId) + const nextAttesterId_ = await unirepContract.nextAttesterId() + // nextAttesterId starts with 1 so now it should be 2 + expect(i+2).equal(nextAttesterId_) + } + }) + }) + + describe('Generate reputation proof for verification', () => { + + it('reputation proof should be verified valid off-chain', async() => { + const nonceStarter = 0 + const circuitInputs = await users[0].genProveReputationCircuitInputs( + epochKeyNonce, + DEFAULT_POST_KARMA, + nonceStarter, + 0 + ) + + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + proof = results['proof'] + publicSignals = results['publicSignals'] + witness = results['witness'] + const isValid = await verifyProveReputationProof(proof, publicSignals) + expect(isValid, "proof is not valid").to.be.true + }) + + it('reputation proof should be verified valid on-chain', async() => { + const isProofValid = await unirepContract.verifyReputation( + publicSignals, + formatProofForVerifierContract(proof) + ) + expect(isProofValid, "proof is not valid").to.be.true + }) + }) + + describe('Publishing a post', () => { + it('submit post should succeed', async() => { + const currentEpoch = (await unirepContract.currentEpoch()).toNumber() + const epochKeyNonce = 0 + const epk = genEpochKey(ids[0].identityNullifier, currentEpoch, epochKeyNonce, circuitEpochTreeDepth) + const nullifiers: BigInt[] = [] + + for (let i = 0; i < MAX_KARMA_BUDGET; i++) { + const variableName = 'main.karma_nullifiers['+i+']' + nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) + } + + const tx = await unirepContractCalledByAttesters[0].publishPost( + postId, + epk, + text, + publicSignals, + formatProofForVerifierContract(proof), + nullifiers, + { value: attestingFee, gasLimit: 1000000 } + ) + const receipt = await tx.wait() + expect(receipt.status, 'Submit post failed').to.equal(1) + }) + + it('submit a post with duplicated nullifiers should fail', async() => { + const text = genRandomSalt().toString() + const currentEpoch = (await unirepContract.currentEpoch()).toNumber() + const epochKeyNonce = 0 + const epk = genEpochKey(ids[0].identityNullifier, currentEpoch, epochKeyNonce, circuitEpochTreeDepth) + const nonceStarter = 1 + const circuitInputs = await users[0].genProveReputationCircuitInputs( + epochKeyNonce, + DEFAULT_POST_KARMA, + nonceStarter, + 0 + ) + + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + proof = results['proof'] + publicSignals = results['publicSignals'] + witness = results['witness'] + const isValid = await verifyProveReputationProof(proof, publicSignals) + expect(isValid, "proof is not valid").to.be.true + + const isProofValid = await unirepContract.verifyReputation( + publicSignals, + formatProofForVerifierContract(proof) + ) + expect(isProofValid, "proof is not valid").to.be.true + + const nullifiers: BigInt[] = [] + + for (let i = 0; i < MAX_KARMA_BUDGET; i++) { + const variableName = 'main.karma_nullifiers['+i+']' + nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) + } + + await expect(unirepContractCalledByAttesters[0].publishPost( + postId, + epk, + text, + publicSignals, + formatProofForVerifierContract(proof), + nullifiers, + { value: attestingFee, gasLimit: 1000000 } + )).to.be.revertedWith('Unirep: the nullifier has been submitted') + }) + + it('submit a post with the same epoch key should fail', async() => { + + + const currentEpoch = (await unirepContract.currentEpoch()).toNumber() + const epochKeyNonce = 0 + const epk = genEpochKey(ids[0].identityNullifier, currentEpoch, epochKeyNonce, circuitEpochTreeDepth) + const nonceStarter = 10 + const circuitInputs = await users[0].genProveReputationCircuitInputs( + epochKeyNonce, + DEFAULT_POST_KARMA, + nonceStarter, + 0 + ) + + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + proof = results['proof'] + publicSignals = results['publicSignals'] + witness = results['witness'] + const isValid = await verifyProveReputationProof(proof, publicSignals) + expect(isValid, "proof is not valid").to.be.true + + const isProofValid = await unirepContract.verifyReputation( + publicSignals, + formatProofForVerifierContract(proof) + ) + expect(isProofValid, "proof is not valid").to.be.true + + const nullifiers: BigInt[] = [] + + for (let i = 0; i < MAX_KARMA_BUDGET; i++) { + const variableName = 'main.karma_nullifiers['+i+']' + nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) + } + + await expect(unirepContractCalledByAttesters[0].publishPost( + postId, + epk, + text, + publicSignals, + formatProofForVerifierContract(proof), + nullifiers, + { value: attestingFee, gasLimit: 1000000 } + )).to.be.revertedWith('Unirep: attester has already attested to this epoch key') + }) + + it('submit a post with invalid proof should fail', async() => { + const currentEpoch = (await unirepContract.currentEpoch()).toNumber() + const epochKeyNonce = 0 + const epk = genEpochKey(ids[0].identityNullifier, currentEpoch, epochKeyNonce, circuitEpochTreeDepth) + const nonceStarter = 15 + const circuitInputs = await users[0].genProveReputationCircuitInputs( + epochKeyNonce, + DEFAULT_POST_KARMA, + nonceStarter, + 0 + ) + + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + proof = results['proof'] + publicSignals = results['publicSignals'] + witness = results['witness'] + const isValid = await verifyProveReputationProof(proof, publicSignals) + expect(isValid, "proof is valid").to.be.false + + const isProofValid = await unirepContract.verifyReputation( + publicSignals, + formatProofForVerifierContract(proof) + ) + expect(isProofValid, "proof is valid").to.be.false + + const nullifiers: BigInt[] = [] + + for (let i = 0; i < MAX_KARMA_BUDGET; i++) { + const variableName = 'main.karma_nullifiers['+i+']' + nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) + } + + await expect(unirepContractCalledByAttesters[0].publishPost( + postId, + epk, + text, + publicSignals, + formatProofForVerifierContract(proof), + nullifiers, + { value: attestingFee, gasLimit: 1000000 } + )).to.be.revertedWith('Unirep: the proof is not valid') + }) + }) + + describe('Comment a post', () => { + const epochKeyNonce = 0 + it('reputation proof should be verified valid off-chain', async() => { + const nonceStarter = 0 + const circuitInputs = await users[1].genProveReputationCircuitInputs( + epochKeyNonce, + DEFAULT_COMMENT_KARMA, + nonceStarter, + 0 + ) + + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + proof = results['proof'] + publicSignals = results['publicSignals'] + witness = results['witness'] + const isValid = await verifyProveReputationProof(proof, publicSignals) + expect(isValid, "proof is not valid").to.be.true + }) + + it('reputation proof should be verified valid on-chain', async() => { + const isProofValid = await unirepContract.verifyReputation( + publicSignals, + formatProofForVerifierContract(proof) + ) + expect(isProofValid, "proof is not valid").to.be.true + }) + + it('submit comment should succeed', async() => { + const currentEpoch = (await unirepContract.currentEpoch()).toNumber() + const epk = genEpochKey(ids[1].identityNullifier, currentEpoch, epochKeyNonce, circuitEpochTreeDepth) + const nullifiers: BigInt[] = [] + + for (let i = 0; i < MAX_KARMA_BUDGET; i++) { + const variableName = 'main.karma_nullifiers['+i+']' + nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) + } + + const tx = await unirepContractCalledByAttesters[1].leaveComment( + postId, + commentId, + epk, + text, + publicSignals, + formatProofForVerifierContract(proof), + nullifiers, + { value: attestingFee, gasLimit: 1000000 } + ) + const receipt = await tx.wait() + expect(receipt.status, 'Submit comment failed').to.equal(1) + }) + + it('submit a comment with duplicated nullifiers should fail', async() => { + const text = genRandomSalt().toString() + const currentEpoch = (await unirepContract.currentEpoch()).toNumber() + const epochKeyNonce = 0 + const epk = genEpochKey(ids[1].identityNullifier, currentEpoch, epochKeyNonce, circuitEpochTreeDepth) + const nonceStarter = 1 + const circuitInputs = await users[1].genProveReputationCircuitInputs( + epochKeyNonce, + DEFAULT_POST_KARMA, + nonceStarter, + 0 + ) + + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + proof = results['proof'] + publicSignals = results['publicSignals'] + witness = results['witness'] + const isValid = await verifyProveReputationProof(proof, publicSignals) + expect(isValid, "proof is not valid").to.be.true + + const isProofValid = await unirepContract.verifyReputation( + publicSignals, + formatProofForVerifierContract(proof) + ) + expect(isProofValid, "proof is not valid").to.be.true + + const nullifiers: BigInt[] = [] + + for (let i = 0; i < MAX_KARMA_BUDGET; i++) { + const variableName = 'main.karma_nullifiers['+i+']' + nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) + } + + await expect(unirepContractCalledByAttesters[1].leaveComment( + postId, + commentId, + epk, + text, + publicSignals, + formatProofForVerifierContract(proof), + nullifiers, + { value: attestingFee, gasLimit: 1000000 } + )).to.be.revertedWith('Unirep: the nullifier has been submitted') + }) + + it('submit a comment with the same epoch key should fail', async() => { + + + const currentEpoch = (await unirepContract.currentEpoch()).toNumber() + const epochKeyNonce = 0 + const epk = genEpochKey(ids[1].identityNullifier, currentEpoch, epochKeyNonce, circuitEpochTreeDepth) + const nonceStarter = 10 + const circuitInputs = await users[1].genProveReputationCircuitInputs( + epochKeyNonce, + DEFAULT_POST_KARMA, + nonceStarter, + 0 + ) + + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + proof = results['proof'] + publicSignals = results['publicSignals'] + witness = results['witness'] + const isValid = await verifyProveReputationProof(proof, publicSignals) + expect(isValid, "proof is not valid").to.be.true + + const isProofValid = await unirepContract.verifyReputation( + publicSignals, + formatProofForVerifierContract(proof) + ) + expect(isProofValid, "proof is not valid").to.be.true + + const nullifiers: BigInt[] = [] + + for (let i = 0; i < MAX_KARMA_BUDGET; i++) { + const variableName = 'main.karma_nullifiers['+i+']' + nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) + } + + await expect(unirepContractCalledByAttesters[1].leaveComment( + postId, + commentId, + epk, + text, + publicSignals, + formatProofForVerifierContract(proof), + nullifiers, + { value: attestingFee, gasLimit: 1000000 } + )).to.be.revertedWith('Unirep: attester has already attested to this epoch key') + }) + + it('submit a comment with invalid proof should fail', async() => { + const currentEpoch = (await unirepContract.currentEpoch()).toNumber() + const epochKeyNonce = 0 + const epk = genEpochKey(ids[1].identityNullifier, currentEpoch, epochKeyNonce, circuitEpochTreeDepth) + const nonceStarter = 15 + const circuitInputs = await users[1].genProveReputationCircuitInputs( + epochKeyNonce, + DEFAULT_POST_KARMA, + nonceStarter, + 0 + ) + + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + proof = results['proof'] + publicSignals = results['publicSignals'] + witness = results['witness'] + const isValid = await verifyProveReputationProof(proof, publicSignals) + expect(isValid, "proof is valid").to.be.false + + const isProofValid = await unirepContract.verifyReputation( + publicSignals, + formatProofForVerifierContract(proof) + ) + expect(isProofValid, "proof is valid").to.be.false + + const nullifiers: BigInt[] = [] + + for (let i = 0; i < MAX_KARMA_BUDGET; i++) { + const variableName = 'main.karma_nullifiers['+i+']' + nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) + } + + await expect(unirepContractCalledByAttesters[1].leaveComment( + postId, + commentId, + epk, + text, + publicSignals, + formatProofForVerifierContract(proof), + nullifiers, + { value: attestingFee, gasLimit: 1000000 } + )).to.be.revertedWith('Unirep: the proof is not valid') + }) + }) +}) \ No newline at end of file From e777f07ef9162069680440d545f372432dd8f75f Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Fri, 14 May 2021 12:09:24 +0800 Subject: [PATCH 24/38] test vote function --- cli/vote.ts | 4 +- test/contracts/Vote.ts | 431 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 433 insertions(+), 2 deletions(-) create mode 100644 test/contracts/Vote.ts diff --git a/cli/vote.ts b/cli/vote.ts index 7aea35f..606e9eb 100644 --- a/cli/vote.ts +++ b/cli/vote.ts @@ -216,8 +216,8 @@ const vote = async (args: any) => { } // upvote / downvote user - const graffiti = args.graffiti ? BigInt(add0x(args.graffiti)) : BigInt(0) - const overwriteGraffiti = args.graffiti ? true : false + const graffiti = args.graffiti != null ? BigInt(add0x(args.graffiti)) : BigInt(0) + const overwriteGraffiti = args.graffiti != null ? true : false const upvoteValue = args.upvote_value != null ? args.upvote_value : 0 const downvoteValue = args.downvote_value != null ? args.downvote_value : 0 const voteValue = upvoteValue + downvoteValue diff --git a/test/contracts/Vote.ts b/test/contracts/Vote.ts new file mode 100644 index 0000000..ef82add --- /dev/null +++ b/test/contracts/Vote.ts @@ -0,0 +1,431 @@ +import { ethers as hardhatEthers } from 'hardhat' +import { BigNumber, ethers } from 'ethers' +import chai from "chai" +import { attestingFee, epochLength, circuitEpochTreeDepth, circuitGlobalStateTreeDepth, numEpochKeyNoncePerEpoch, maxUsers, circuitNullifierTreeDepth, numAttestationsPerEpochKey, circuitUserStateTreeDepth} from '../../config/testLocal' +import { genIdentity, genIdentityCommitment } from 'libsemaphore' +import { genRandomSalt, IncrementalQuinTree, stringifyBigInts } from 'maci-crypto' +import { deployUnirep, genEpochKey, genNewUserStateTree, getTreeDepthsForTesting } from '../utils' + +const { expect } = chai + +import Unirep from "../../artifacts/contracts/Unirep.sol/Unirep.json" +import { DEFAULT_AIRDROPPED_KARMA, DEFAULT_COMMENT_KARMA, DEFAULT_POST_KARMA, MAX_KARMA_BUDGET } from '../../config/socialMedia' +import { Attestation, UnirepState, UserState } from '../../core' +import { compileAndLoadCircuit, executeCircuit, formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyProveReputationProof } from '../circuits/utils' +import { DEFAULT_ETH_PROVIDER } from '../../cli/defaults' + + +describe('Vote', function () { + this.timeout(300000) + + let circuit + let unirepContract + let GSTree + let emptyUserStateRoot + let userNum = 4 + const ids = new Array(userNum) + const commitments = new Array(userNum) + let users: UserState[] = new Array(userNum) + let unirepState + let attesters = new Array(userNum) + let attesterAddresses = new Array(userNum) + + let accounts: ethers.Signer[] + let provider + let unirepContractCalledByAttesters = new Array(userNum) + + let proof + let publicSignals + let witness + const epochKeyNonce = 0 + const epochKeyNonce2 = 1 + let fromEpk + let toEpk + let attesterId + let upvoteValue = 3 + let downvoteValue = 5 + const graffiti = genRandomSalt() + const overwriteGraffiti = true + let attestation + + before(async () => { + accounts = await hardhatEthers.getSigners() + provider = new hardhatEthers.providers.JsonRpcProvider(DEFAULT_ETH_PROVIDER) + + const _treeDepths = getTreeDepthsForTesting('circuit') + unirepContract = await deployUnirep(accounts[0], _treeDepths) + + const blankGSLeaf = await unirepContract.hashedBlankStateLeaf() + GSTree = new IncrementalQuinTree(circuitGlobalStateTreeDepth, blankGSLeaf, 2) + }) + + it('should have the correct config value', async () => { + const attestingFee_ = await unirepContract.attestingFee() + expect(attestingFee).equal(attestingFee_) + const epochLength_ = await unirepContract.epochLength() + expect(epochLength).equal(epochLength_) + const numAttestationsPerEpochKey_ = await unirepContract.numAttestationsPerEpochKey() + expect(numAttestationsPerEpochKey).equal(numAttestationsPerEpochKey_) + const numEpochKeyNoncePerEpoch_ = await unirepContract.numEpochKeyNoncePerEpoch() + expect(numEpochKeyNoncePerEpoch).equal(numEpochKeyNoncePerEpoch_) + const numAttestationsPerEpoch_ = await unirepContract.numAttestationsPerEpoch() + expect(numEpochKeyNoncePerEpoch * numAttestationsPerEpochKey).equal(numAttestationsPerEpoch_) + const maxUsers_ = await unirepContract.maxUsers() + expect(maxUsers).equal(maxUsers_) + + const treeDepths_ = await unirepContract.treeDepths() + expect(circuitEpochTreeDepth).equal(treeDepths_.epochTreeDepth) + expect(circuitGlobalStateTreeDepth).equal(treeDepths_.globalStateTreeDepth) + expect(circuitNullifierTreeDepth).equal(treeDepths_.nullifierTreeDepth) + expect(circuitUserStateTreeDepth).equal(treeDepths_.userStateTreeDepth) + }) + + it('should have the correct default value', async () => { + const emptyUSTree = await genNewUserStateTree() + emptyUserStateRoot = await unirepContract.emptyUserStateRoot() + expect(BigNumber.from(emptyUSTree.getRootHash())).equal(emptyUserStateRoot) + + const emptyGlobalStateTreeRoot = await unirepContract.emptyGlobalStateTreeRoot() + expect(BigNumber.from(GSTree.root)).equal(emptyGlobalStateTreeRoot) + }) + + describe('User sign-ups', () => { + + it('sign up should succeed', async () => { + let GSTreeLeafIndex: number = -1 + const currentEpoch = await unirepContract.currentEpoch() + unirepState = new UnirepState( + circuitGlobalStateTreeDepth, + circuitUserStateTreeDepth, + circuitEpochTreeDepth, + circuitNullifierTreeDepth, + attestingFee, + epochLength, + numEpochKeyNoncePerEpoch, + numAttestationsPerEpochKey, + ) + for (let i = 0; i < userNum; i++) { + ids[i] = genIdentity() + commitments[i] = genIdentityCommitment(ids[i]) + const tx = await unirepContract.userSignUp(commitments[i]) + const receipt = await tx.wait() + + expect(receipt.status).equal(1) + + const numUserSignUps_ = await unirepContract.numUserSignUps() + expect(i+1).equal(numUserSignUps_) + + const hashedStateLeaf = await unirepContract.hashStateLeaf( + [ + commitments[i], + emptyUserStateRoot, + BigInt(DEFAULT_AIRDROPPED_KARMA), + BigInt(0) + ] + ) + GSTree.insert(hashedStateLeaf) + + unirepState.signUp(currentEpoch.toNumber(), BigInt(hashedStateLeaf)) + users[i] = new UserState( + unirepState, + ids[i], + commitments[i], + false + ) + + const latestTransitionedToEpoch = currentEpoch.toNumber() + const newLeafFilter = unirepContract.filters.NewGSTLeafInserted(currentEpoch) + const newLeafEvents = await unirepContract.queryFilter(newLeafFilter) + + + for (let i = 0; i < newLeafEvents.length; i++) { + if(BigInt(newLeafEvents[i]?.args?._hashedLeaf) == BigInt(hashedStateLeaf)){ + GSTreeLeafIndex = newLeafEvents[i]?.args?._leafIndex.toNumber() + } + } + expect(GSTreeLeafIndex).to.equal(i) + + users[i].signUp(latestTransitionedToEpoch, GSTreeLeafIndex) + } + }) + + it('sign up should succeed', async () => { + for (let i = 0; i < userNum; i++) { + attesters[i] = accounts[i+1] + attesterAddresses[i] = await attesters[i].getAddress() + unirepContractCalledByAttesters[i] = await hardhatEthers.getContractAt(Unirep.abi, unirepContract.address, attesters[i]) + const tx = await unirepContractCalledByAttesters[i].attesterSignUp() + const receipt = await tx.wait() + + expect(receipt.status).equal(1) + + const attesterId = await unirepContract.attesters(attesterAddresses[i]) + expect(i+1).equal(attesterId) + const nextAttesterId_ = await unirepContract.nextAttesterId() + // nextAttesterId starts with 1 so now it should be 2 + expect(i+2).equal(nextAttesterId_) + } + }) + }) + + describe('Generate reputation proof for verification', () => { + + it('reputation proof should be verified valid off-chain', async() => { + const nonceStarter = 0 + const circuitInputs = await users[0].genProveReputationCircuitInputs( + epochKeyNonce, + upvoteValue, + nonceStarter, + 0 + ) + + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + proof = results['proof'] + publicSignals = results['publicSignals'] + witness = results['witness'] + const isValid = await verifyProveReputationProof(proof, publicSignals) + expect(isValid, "proof is not valid").to.be.true + }) + + it('reputation proof should be verified valid on-chain', async() => { + const isProofValid = await unirepContract.verifyReputation( + publicSignals, + formatProofForVerifierContract(proof) + ) + expect(isProofValid, "proof is not valid").to.be.true + }) + }) + + // user 1 and user 2 + describe('Upvote', () => { + let currentEpoch + attesterId = 1 + attestation = new Attestation( + BigInt(attesterId), + BigInt(upvoteValue), + BigInt(0), + graffiti, + overwriteGraffiti, + ) + const fromUser = 0 + const toUser = 1 + + it('submit upvote should succeed', async() => { + currentEpoch = (await unirepContract.currentEpoch()).toNumber() + + fromEpk = genEpochKey(ids[fromUser].identityNullifier, currentEpoch, epochKeyNonce, circuitEpochTreeDepth) + + toEpk = genEpochKey(ids[toUser].identityNullifier, currentEpoch, epochKeyNonce, circuitEpochTreeDepth) + + const nullifiers: BigInt[] = [] + + for (let i = 0; i < MAX_KARMA_BUDGET; i++) { + const variableName = 'main.karma_nullifiers['+i+']' + nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) + } + + const tx = await unirepContractCalledByAttesters[fromUser].vote( + attestation, + toEpk, + fromEpk, + publicSignals, + formatProofForVerifierContract(proof), + nullifiers, + { value: attestingFee, gasLimit: 1000000 } + ) + const receipt = await tx.wait() + expect(receipt.status, 'Submit vote failed').to.equal(1) + }) + + it('submit upvote with duplicated nullifiers should fail', async() => { + + fromEpk = genEpochKey(ids[fromUser].identityNullifier, currentEpoch, epochKeyNonce, circuitEpochTreeDepth) + + toEpk = genEpochKey(ids[toUser].identityNullifier, currentEpoch, epochKeyNonce2, circuitEpochTreeDepth) + + const nonceStarter = 1 + const circuitInputs = await users[fromUser].genProveReputationCircuitInputs( + epochKeyNonce, + upvoteValue, + nonceStarter, + 0 + ) + + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + proof = results['proof'] + publicSignals = results['publicSignals'] + witness = results['witness'] + const isValid = await verifyProveReputationProof(proof, publicSignals) + expect(isValid, "proof is not valid").to.be.true + + const isProofValid = await unirepContract.verifyReputation( + publicSignals, + formatProofForVerifierContract(proof) + ) + expect(isProofValid, "proof is not valid").to.be.true + + const nullifiers: BigInt[] = [] + + for (let i = 0; i < MAX_KARMA_BUDGET; i++) { + const variableName = 'main.karma_nullifiers['+i+']' + nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) + } + + await expect(unirepContractCalledByAttesters[fromUser].vote( + attestation, + toEpk, + fromEpk, + publicSignals, + formatProofForVerifierContract(proof), + nullifiers, + { value: attestingFee, gasLimit: 1000000 } + )).to.be.revertedWith('Unirep: the nullifier has been submitted') + }) + + it('submit upvote from the same epoch key should fail', async() => { + + fromEpk = genEpochKey(ids[fromUser].identityNullifier, currentEpoch, epochKeyNonce, circuitEpochTreeDepth) + + toEpk = genEpochKey(ids[toUser].identityNullifier, currentEpoch, epochKeyNonce2, circuitEpochTreeDepth) + + const nonceStarter = 10 + const circuitInputs = await users[fromUser].genProveReputationCircuitInputs( + epochKeyNonce, + upvoteValue, + nonceStarter, + 0 + ) + + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + proof = results['proof'] + publicSignals = results['publicSignals'] + witness = results['witness'] + const isValid = await verifyProveReputationProof(proof, publicSignals) + expect(isValid, "proof is not valid").to.be.true + + const isProofValid = await unirepContract.verifyReputation( + publicSignals, + formatProofForVerifierContract(proof) + ) + expect(isProofValid, "proof is not valid").to.be.true + + const nullifiers: BigInt[] = [] + + for (let i = 0; i < MAX_KARMA_BUDGET; i++) { + const variableName = 'main.karma_nullifiers['+i+']' + nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) + } + + await expect(unirepContractCalledByAttesters[fromUser].vote( + attestation, + toEpk, + fromEpk, + publicSignals, + formatProofForVerifierContract(proof), + nullifiers, + { value: attestingFee, gasLimit: 1000000 } + )).to.be.revertedWith('Unirep: attester has already attested to this epoch key') + }) + + it('submit upvote with invalid proof should fail', async() => { + + fromEpk = genEpochKey(ids[fromUser].identityNullifier, currentEpoch, epochKeyNonce2, circuitEpochTreeDepth) + + toEpk = genEpochKey(ids[toUser].identityNullifier, currentEpoch, epochKeyNonce2, circuitEpochTreeDepth) + + const nonceStarter = 20 + const circuitInputs = await users[fromUser].genProveReputationCircuitInputs( + epochKeyNonce2, + upvoteValue, + nonceStarter, + 0 + ) + + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + proof = results['proof'] + publicSignals = results['publicSignals'] + witness = results['witness'] + const isValid = await verifyProveReputationProof(proof, publicSignals) + expect(isValid, "proof is valid").to.be.false + + const isProofValid = await unirepContract.verifyReputation( + publicSignals, + formatProofForVerifierContract(proof) + ) + expect(isProofValid, "proof is valid").to.be.false + + const nullifiers: BigInt[] = [] + + for (let i = 0; i < MAX_KARMA_BUDGET; i++) { + const variableName = 'main.karma_nullifiers['+i+']' + nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) + } + + await expect(unirepContractCalledByAttesters[fromUser].vote( + attestation, + toEpk, + fromEpk, + publicSignals, + formatProofForVerifierContract(proof), + nullifiers, + { value: attestingFee, gasLimit: 1000000 } + )).to.be.revertedWith('Unirep: the proof is not valid') + }) + + it('submit vote with 0 value should fail', async() => { + + const zeroAttestation = new Attestation( + BigInt(attesterId), + BigInt(0), + BigInt(0), + graffiti, + overwriteGraffiti, + ) + + const nullifiers: BigInt[] = [] + + for (let i = 0; i < MAX_KARMA_BUDGET; i++) { + const variableName = 'main.karma_nullifiers['+i+']' + nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) + } + + await expect(unirepContractCalledByAttesters[fromUser].vote( + zeroAttestation, + toEpk, + fromEpk, + publicSignals, + formatProofForVerifierContract(proof), + nullifiers, + { value: attestingFee, gasLimit: 1000000 } + )).to.be.revertedWith('Unirep: should submit a positive vote value') + }) + + it('submit vote with both upvote value and downvote value should fail', async() => { + + const invalidAttestation = new Attestation( + BigInt(attesterId), + BigInt(upvoteValue), + BigInt(downvoteValue), + graffiti, + overwriteGraffiti, + ) + + const nullifiers: BigInt[] = [] + + for (let i = 0; i < MAX_KARMA_BUDGET; i++) { + const variableName = 'main.karma_nullifiers['+i+']' + nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) + } + + await expect(unirepContractCalledByAttesters[fromUser].vote( + invalidAttestation, + toEpk, + fromEpk, + publicSignals, + formatProofForVerifierContract(proof), + nullifiers, + { value: attestingFee, gasLimit: 1000000 } + )).to.be.revertedWith('Unirep: should only choose to upvote or to downvote') + }) + }) +}) \ No newline at end of file From f5cc08ce1ab17b940950ac49d4326d4391546299 Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Sun, 16 May 2021 12:00:02 +0800 Subject: [PATCH 25/38] remove unused parameters --- .DS_Store | Bin 8196 -> 14340 bytes circuits/processAttestations.circom | 2 +- circuits/proveReputation.circom | 2 - circuits/test/processAttestations_test.circom | 2 +- circuits/test/proveReputation_test.circom | 2 +- circuits/test/userStateTransition_test.circom | 1 - circuits/userStateTransition.circom | 3 +- circuits/utils.ts | 335 ++++++++++++++++++ cli/deploy.ts | 2 +- cli/eventListeners.ts | 3 +- cli/genEpochKeyAndProof.ts | 4 +- cli/genReputationProofFromAttester.ts | 2 +- cli/leaveComment.ts | 7 +- cli/listAllPosts.ts | 1 - cli/publishPost.ts | 10 +- cli/test/testAllCommands.ts | 2 - cli/userStateTransition.ts | 2 +- cli/vote.ts | 6 +- core/UnirepState.ts | 6 +- core/UserState.ts | 4 +- core/utils.ts | 206 ++++++++++- test/circuits/proveReputation.ts | 1 - test/circuits/userStateTransition.ts | 4 +- test/circuits/utils.ts | 1 - test/contracts/Attesting.ts | 2 +- test/contracts/Posting.ts | 18 +- test/contracts/SignUp.ts | 2 +- test/contracts/Vote.ts | 8 +- test/integration/Integration.ts | 7 +- test/utils.ts | 7 +- 30 files changed, 579 insertions(+), 73 deletions(-) create mode 100644 circuits/utils.ts diff --git a/.DS_Store b/.DS_Store index f6f5a36096d6bf1513aac9262a94566ef78efe03..5b196347eccd2ea9393dfd0912a1797c5a6f8f7c 100644 GIT binary patch literal 14340 zcmeHO&2HO95FYwhLY&qq3gi@2m)u-Kl5PDQ0=TYo$e}<{744x79LZ8_rHW`sRD{&E z;ad-Vf%ei@=xg)^iatwE={HMS-W_sjTBKT_C5_#s$k}g)-|Q}DXK5mG4kq0SQJIJe zNL+4iAp4Q1#HDudeNLfc8CM*n=SVo;BTVWRYTI@3ro1f^;eJ{QHLf*{W3MF zj#PniRoX?qN85BpBXaTg66ddIjI-ghfqUE;xE-KC1?MlM%XjL)l_6?O$cvQ5?fl3Y z$Qj5P$Qj5P_}?+W?_L~*dw!YcIRiNZIRi5Wcz!4$ak(FqSAMCc4rJ`Y^L=*V)q!(3 z;p$o`DEEW%$}d$_)KOJY`c<7^iQ)LwalORiDEEW%$}j!uUVBd zdqD32+lub|lo9$=wKW!Tghv8BIzrK;9mFVh5vkw^MHNi+V`C0HJ^dz-qge?fOIFhB z-9${Kf>h32Zyj0c9UZrke8;g8haSy}>?<~F?t+iHvStJMJl0H#eAh^pZJcuNGj-;O z*CNJgxTR#4mE7AbE1yH6M_X3*8$18I7^|GBh)>RAS-ajQveY}ezb9uU9z8uP9A({6 z^VmGB#PO{oXW8F*zP-_Tk^S9lDSON6&mqy%T6PaTeNWBqmAU%6-LfWfmX?*si<`;J zmL&IS$80=$GRv;Q&uSx`QZMYA(DrPPgSTgn;dhLX^B#&v(wD(pW5_Q<5`LUO#m9ykM1bLS_rhdE^ zWk_#;O_uA?k*e2)y$0;%n)MXBx}G1P7VoTWtEcmnU(8SG!7^;22u&5=I>s6#c_&Qm zhnej$=gxZ?=j*yGRfRPBue$UDV6x4>Lw*9?K8CKY`fb~z<9D`>uptm^_4u8s*DKN& z^c313(q|~Qksq46s@*`n#yWZh_ou$}|_9o+l_UIe_^?BPn?F8pvy6#|h-tK(W?@f<3 zKm61kdhPzOH&T`R-5x}~{klKwy3+%9GVG2OPRqZc8amp1cz#|fSGG#E%Eeacyjd-8 zm3DV(7Z=6C!^f2;&tANK`~CS37neVykK%BGzzV(Z|DNT);B3ajo7QMJaECnlS^hqc z5HV&VXHM0_F0~#ugU?U?RR*@udJ*Gxq~?;BY8;1VJvAq9Yu1bQ4C?ST8t|?6ly8>h znlg->?0qfQ2GJh;?dZ|(Yw5w;SgEPVKn>jRHx2Xn*fzZ-a<;78hMu04J+&I+^-b2S z=*Y=fk=BgkJPtjY71JD_^BTgFV8uX*=AsgoGmN2p{Heq<5o2=Q=M}bu(M(!Cu2pvm*z!} zW<|bJZ8KN{Zzg^}HNXvj<$3o#l%&Yn&5cs$MMWX&V8vu7nPnySahBD&m*~-!mHo!X ze-l={{+rLTHoYaX)H~hWcpG|pR(O?EQ)!<59>MU-_SghWzC9?oINXX z=xJFozkt8{+-M6htok>~_fS5yfB$c*o?p)y$Qk$#FyO2lwhj;QAlD&a`Aqz+T?y$0 z()9sZC5}veiic8tiiaQkDPH4Rj!WFz56UaQR8?_ZRYmy^eFXT9Tep6NBqJp9Es<^> tmut|w&*L^9OCo3IYe}HVZO-W1FnNxOOu;2MY(I#AF@?Q+ZZ~B!*IkOokkW6wjReqBkeiK7hpj8YFlO0W@Ie;vXqZlT~^Gw}r MDR+qxsMnMc0J_*ABLDyZ diff --git a/circuits/processAttestations.circom b/circuits/processAttestations.circom index ac7ba07..1190f9b 100644 --- a/circuits/processAttestations.circom +++ b/circuits/processAttestations.circom @@ -4,7 +4,7 @@ include "./hasherPoseidon.circom"; include "./sparseMerkleTree.circom"; include "./verifyHashChain.circom"; -template ProcessAttestations(nullifier_tree_depth, user_state_tree_depth, NUM_ATTESTATIONS) { +template ProcessAttestations(user_state_tree_depth, NUM_ATTESTATIONS) { signal input epoch; signal input nonce; signal input identity_nullifier; diff --git a/circuits/proveReputation.circom b/circuits/proveReputation.circom index e579a1e..a8ac2ba 100644 --- a/circuits/proveReputation.circom +++ b/circuits/proveReputation.circom @@ -10,12 +10,10 @@ include "./verifiyEpochKey.circom"; template ProveReputation( GST_tree_depth, - user_state_tree_depth, nullifier_tree_depth, epoch_tree_depth, EPOCH_KEY_NONCE_PER_EPOCH, MAX_REPUTATION_SCORE_BITS, - NUM_ATTESTATIONS, MAX_KARMA_BUDGET) { signal input epoch; signal private input nonce; diff --git a/circuits/test/processAttestations_test.circom b/circuits/test/processAttestations_test.circom index e42aee3..037cb34 100644 --- a/circuits/test/processAttestations_test.circom +++ b/circuits/test/processAttestations_test.circom @@ -1,3 +1,3 @@ include "../processAttestations.circom" -component main = ProcessAttestations(8, 4, 10); \ No newline at end of file +component main = ProcessAttestations(4, 10); \ No newline at end of file diff --git a/circuits/test/proveReputation_test.circom b/circuits/test/proveReputation_test.circom index 4afb512..6d8ba39 100644 --- a/circuits/test/proveReputation_test.circom +++ b/circuits/test/proveReputation_test.circom @@ -1,3 +1,3 @@ include "../proveReputation.circom" -component main = ProveReputation(4, 4, 128, 8, 2, 252, 10, 10); \ No newline at end of file +component main = ProveReputation(4, 128, 8, 2, 252, 10); \ No newline at end of file diff --git a/circuits/test/userStateTransition_test.circom b/circuits/test/userStateTransition_test.circom index 1efc6c0..566c19d 100644 --- a/circuits/test/userStateTransition_test.circom +++ b/circuits/test/userStateTransition_test.circom @@ -3,7 +3,6 @@ include "../userStateTransition.circom" component main = UserStateTransition( 4, // GST_tree_depth 8, // epoch_tree_depth - 128, // nullifier_tree_depth 4, // user_state_tree_depth // 20, // airdropped_karma 6, // ATTESTATIONS_PER_EPOCH_KEY diff --git a/circuits/userStateTransition.circom b/circuits/userStateTransition.circom index 24b22ce..7c14eb3 100644 --- a/circuits/userStateTransition.circom +++ b/circuits/userStateTransition.circom @@ -43,7 +43,6 @@ template epochKeyExist(epoch_tree_depth) { template UserStateTransition( GST_tree_depth, epoch_tree_depth, - nullifier_tree_depth, user_state_tree_depth, ATTESTATIONS_PER_EPOCH_KEY, EPOCH_KEY_NONCE_PER_EPOCH, @@ -154,7 +153,7 @@ template UserStateTransition( } // 2.2 Begin processing attestations - process_attestations[n] = ProcessAttestations(nullifier_tree_depth, user_state_tree_depth, ATTESTATIONS_PER_EPOCH_KEY); + process_attestations[n] = ProcessAttestations(user_state_tree_depth, ATTESTATIONS_PER_EPOCH_KEY); process_attestations[n].epoch <== epoch; process_attestations[n].nonce <== n; process_attestations[n].identity_nullifier <== identity_nullifier; diff --git a/circuits/utils.ts b/circuits/utils.ts new file mode 100644 index 0000000..5a35042 --- /dev/null +++ b/circuits/utils.ts @@ -0,0 +1,335 @@ +import * as fs from 'fs' +import assert from 'assert' +import lineByLine from 'n-readlines' +import * as path from 'path' +import { SnarkProof } from 'libsemaphore' +const circom = require('circom') +import * as shell from 'shelljs' + +import { + stringifyBigInts, + unstringifyBigInts, +} from 'maci-crypto' + +const zkutilPath = "~/.cargo/bin/zkutil" +const buildPath = "../build" + +/* + * @param circuitPath The subpath to the circuit file (e.g. + * test/userStateTransition_test.circom) + */ +const compileAndLoadCircuit = async ( + circuitPath: string +) => { + const circuit = await circom.tester(path.join( + __dirname, + `../../circuits/${circuitPath}`, + )) + + await circuit.loadSymbols() + + return circuit +} + +const executeCircuit = async ( + circuit: any, + inputs: any, +) => { + + const witness = await circuit.calculateWitness(inputs, true) + await circuit.checkConstraints(witness) + await circuit.loadSymbols() + + return witness +} + +const getSignalByName = ( + circuit: any, + witness: any, + signal: string, +) => { + + return witness[circuit.symbols[signal].varIdx] +} + +const getSignalByNameViaSym = ( + circuitName: any, + witness: any, + signal: string, +) => { + const symPath = path.join(__dirname, buildPath, `${circuitName}.sym`) + const liner = new lineByLine(symPath) + let line + let index + let found = false + + while (true) { + line = liner.next() + debugger + if (!line) { break } + const s = line.toString().split(',') + if (signal === s[3]) { + index = s[1] + found = true + break + } + } + + assert(found) + + return witness[index] +} + +const genVerifyEpochKeyProofAndPublicSignals = ( + inputs: any, +) => { + return genProofAndPublicSignals( + inputs, + '/test/verifyEpochKey_test.circom', + 'verifyEpochKeyCircuit.r1cs', + 'verifyEpochKey.wasm', + 'verifyEpochKey.params', + false, + ) +} + +const genVerifyUserStateTransitionProofAndPublicSignals = ( + inputs: any, +) => { + return genProofAndPublicSignals( + inputs, + '/test/userStateTransition_test.circom', + 'userStateTransitionCircuit.r1cs', + 'userStateTransition.wasm', + 'userStateTransition.params', + false, + ) +} + +const genVerifyReputationProofAndPublicSignals = ( + inputs: any, +) => { + return genProofAndPublicSignals( + inputs, + '/test/proveReputation_test.circom', + 'proveReputationCircuit.r1cs', + 'proveReputation.wasm', + 'proveReputation.params', + false, + ) +} + +const genVerifyReputationFromAttesterProofAndPublicSignals = ( + inputs: any, +) => { + return genProofAndPublicSignals( + inputs, + '/test/proveReputationFromAttester_test.circom', + 'proveReputationFromAttesterCircuit.r1cs', + 'proveReputationFromAttester.wasm', + 'proveReputationFromAttester.params', + false, + ) +} + +const genProofAndPublicSignals = async ( + inputs: any, + circuitFilename: string, + circuitR1csFilename: string, + circuitWasmFilename: string, + paramsFilename: string, + compileCircuit = true, +) => { + const date = Date.now() + const paramsPath = path.join(__dirname, buildPath, paramsFilename) + const circuitR1csPath = path.join(__dirname, buildPath, circuitR1csFilename) + const circuitWasmPath = path.join(__dirname, buildPath, circuitWasmFilename) + const inputJsonPath = path.join(__dirname, buildPath + date + '.input.json') + const witnessPath = path.join(__dirname, buildPath + date + '.witness.wtns') + const witnessJsonPath = path.join(__dirname, buildPath + date + '.witness.json') + const proofPath = path.join(__dirname, buildPath + date + '.proof.json') + const publicJsonPath = path.join(__dirname, buildPath + date + '.publicSignals.json') + + fs.writeFileSync(inputJsonPath, JSON.stringify(stringifyBigInts(inputs))) + + let circuit + if (compileCircuit) { + circuit = await compileAndLoadCircuit(circuitFilename) + } + + const snarkjsCmd = 'node ' + path.join(__dirname, '../node_modules/snarkjs/build/cli.cjs') + const witnessCmd = `${snarkjsCmd} wc ${circuitWasmPath} ${inputJsonPath} ${witnessPath}` + + shell.exec(witnessCmd) + + const witnessJsonCmd = `${snarkjsCmd} wej ${witnessPath} ${witnessJsonPath}` + shell.exec(witnessJsonCmd) + + const proveCmd = `${zkutilPath} prove -c ${circuitR1csPath} -p ${paramsPath} -w ${witnessJsonPath} -r ${proofPath} -o ${publicJsonPath}` + + shell.exec(proveCmd) + + const witness = unstringifyBigInts(JSON.parse(fs.readFileSync(witnessJsonPath).toString())) + const publicSignals = unstringifyBigInts(JSON.parse(fs.readFileSync(publicJsonPath).toString())) + const proof = JSON.parse(fs.readFileSync(proofPath).toString()) + + shell.rm('-f', witnessPath) + shell.rm('-f', witnessJsonPath) + shell.rm('-f', proofPath) + shell.rm('-f', publicJsonPath) + shell.rm('-f', inputJsonPath) + + return { circuit, proof, publicSignals, witness } +} + +const verifyProof = async ( + paramsFilename: string, + proofFilename: string, + publicSignalsFilename: string, +): Promise => { + const paramsPath = path.join(__dirname, buildPath, paramsFilename) + const proofPath = path.join(__dirname, buildPath, proofFilename) + const publicSignalsPath = path.join(__dirname, buildPath, publicSignalsFilename) + + const verifyCmd = `${zkutilPath} verify -p ${paramsPath} -r ${proofPath} -i ${publicSignalsPath}` + const output = shell.exec(verifyCmd).stdout.trim() + + shell.rm('-f', proofPath) + shell.rm('-f', publicSignalsPath) + + return output === 'Proof is correct' +} + +const verifyEPKProof = ( + proof: any, + publicSignals: any, +) => { + const date = Date.now().toString() + const proofFilename = `${date}.verifyEpochKey.proof.json` + const publicSignalsFilename = `${date}.verifyEpochKey.publicSignals.json` + + fs.writeFileSync( + path.join(__dirname, buildPath, proofFilename), + JSON.stringify( + stringifyBigInts(proof) + ) + ) + + fs.writeFileSync( + path.join(__dirname, buildPath, publicSignalsFilename), + JSON.stringify( + stringifyBigInts(publicSignals) + ) + ) + + return verifyProof('verifyEpochKey.params', proofFilename, publicSignalsFilename) +} + +const verifyUserStateTransitionProof = ( + proof: any, + publicSignals: any, +) => { + const date = Date.now().toString() + const proofFilename = `${date}.userStateTransition.proof.json` + const publicSignalsFilename = `${date}.userStateTransition.publicSignals.json` + + fs.writeFileSync( + path.join(__dirname, buildPath, proofFilename), + JSON.stringify( + stringifyBigInts(proof) + ) + ) + + fs.writeFileSync( + path.join(__dirname, buildPath, publicSignalsFilename), + JSON.stringify( + stringifyBigInts(publicSignals) + ) + ) + + return verifyProof('userStateTransition.params', proofFilename, publicSignalsFilename) +} + +const verifyProveReputationProof = ( + proof: any, + publicSignals: any, +) => { + const date = Date.now().toString() + const proofFilename = `${date}.proveReputation.proof.json` + const publicSignalsFilename = `${date}.proveReputation.publicSignals.json` + + fs.writeFileSync( + path.join(__dirname, buildPath, proofFilename), + JSON.stringify( + stringifyBigInts(proof) + ) + ) + + fs.writeFileSync( + path.join(__dirname, buildPath, publicSignalsFilename), + JSON.stringify( + stringifyBigInts(publicSignals) + ) + ) + + return verifyProof('proveReputation.params', proofFilename, publicSignalsFilename) +} + +const verifyProveReputationFromAttesterProof = ( + proof: any, + publicSignals: any, +) => { + const date = Date.now().toString() + const proofFilename = `${date}.proveReputationFromAttester.proof.json` + const publicSignalsFilename = `${date}.proveReputationFromAttester.publicSignals.json` + + fs.writeFileSync( + path.join(__dirname, buildPath, proofFilename), + JSON.stringify( + stringifyBigInts(proof) + ) + ) + + fs.writeFileSync( + path.join(__dirname, buildPath, publicSignalsFilename), + JSON.stringify( + stringifyBigInts(publicSignals) + ) + ) + + return verifyProof('proveReputationFromAttester.params', proofFilename, publicSignalsFilename) +} + +const formatProofForVerifierContract = ( + _proof: SnarkProof, +) => { + + return ([ + _proof.pi_a[0], + _proof.pi_a[1], + _proof.pi_b[0][1], + _proof.pi_b[0][0], + _proof.pi_b[1][1], + _proof.pi_b[1][0], + _proof.pi_c[0], + _proof.pi_c[1], + ]).map((x) => x.toString()) +} + +export { + compileAndLoadCircuit, + executeCircuit, + formatProofForVerifierContract, + getSignalByName, + getSignalByNameViaSym, + genVerifyEpochKeyProofAndPublicSignals, + genVerifyReputationProofAndPublicSignals, + genVerifyReputationFromAttesterProofAndPublicSignals, + genVerifyUserStateTransitionProofAndPublicSignals, + verifyEPKProof, + verifyProveReputationProof, + verifyProveReputationFromAttesterProof, + verifyUserStateTransitionProof, + genProofAndPublicSignals, + verifyProof, +} \ No newline at end of file diff --git a/cli/deploy.ts b/cli/deploy.ts index 4f886b1..7956df6 100644 --- a/cli/deploy.ts +++ b/cli/deploy.ts @@ -1,7 +1,7 @@ import { ethers } from 'ethers' import { DEFAULT_AIRDROPPED_KARMA } from '../config/socialMedia' import { maxUsers } from '../config/testLocal' -import { deployUnirep, getTreeDepthsForTesting } from '../test/utils' +import { deployUnirep, getTreeDepthsForTesting } from '../core/utils' import { DEFAULT_ATTESTING_FEE, DEFAULT_EPOCH_LENGTH, DEFAULT_ETH_PROVIDER, DEFAULT_MAX_EPOCH_KEY_NONCE, DEFAULT_NUM_ATTESTATIONS_PER_EPOCH_KEY, DEFAULT_TREE_DEPTHS_CONFIG } from './defaults' import { checkDeployerProviderConnection, diff --git a/cli/eventListeners.ts b/cli/eventListeners.ts index cc9a9ca..a6c841a 100644 --- a/cli/eventListeners.ts +++ b/cli/eventListeners.ts @@ -5,9 +5,8 @@ import { ethers } from 'ethers' import { validateEthAddress, } from './utils' -import mongoose from 'mongoose' -import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' +import { DEFAULT_ETH_PROVIDER } from './defaults' import { saveSettingsFromContract, updateDBFromNewGSTLeafInsertedEvent, updateDBFromAttestationEvent, diff --git a/cli/genEpochKeyAndProof.ts b/cli/genEpochKeyAndProof.ts index 09631c6..0d39c0c 100644 --- a/cli/genEpochKeyAndProof.ts +++ b/cli/genEpochKeyAndProof.ts @@ -11,9 +11,9 @@ import { import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' -import { genEpochKey } from '../test/utils' +import { genEpochKey } from '../core/utils' import { genUserStateFromContract } from '../core' -import { formatProofForVerifierContract, genVerifyEpochKeyProofAndPublicSignals, verifyEPKProof } from '../test/circuits/utils' +import { formatProofForVerifierContract, genVerifyEpochKeyProofAndPublicSignals, verifyEPKProof } from '../circuits/utils' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import { epkProofPrefix, identityPrefix } from './prefix' diff --git a/cli/genReputationProofFromAttester.ts b/cli/genReputationProofFromAttester.ts index 0ce327b..deb7120 100644 --- a/cli/genReputationProofFromAttester.ts +++ b/cli/genReputationProofFromAttester.ts @@ -10,7 +10,7 @@ import { import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' import { genUserStateFromContract } from '../core' -import { formatProofForVerifierContract, genVerifyReputationFromAttesterProofAndPublicSignals, verifyProveReputationFromAttesterProof } from '../test/circuits/utils' +import { formatProofForVerifierContract, genVerifyReputationFromAttesterProofAndPublicSignals, verifyProveReputationFromAttesterProof } from '../circuits/utils' import { stringifyBigInts } from 'maci-crypto' import { add0x } from '../crypto/SMT' import { identityPrefix, reputationProofFromAttesterPrefix } from './prefix' diff --git a/cli/leaveComment.ts b/cli/leaveComment.ts index 78a5108..50d7a4d 100644 --- a/cli/leaveComment.ts +++ b/cli/leaveComment.ts @@ -22,12 +22,11 @@ import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import { reputationProofPrefix, identityPrefix } from './prefix' import Comment, { IComment } from "../database/models/comment"; -import Post, { IPost } from "../database/models/post"; +import Post from "../database/models/post"; import { DEFAULT_COMMENT_KARMA, MAX_KARMA_BUDGET } from '../config/socialMedia' -import { formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyProveReputationProof } from '../test/circuits/utils' +import { formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyProveReputationProof } from '../circuits/utils' import { stringifyBigInts } from 'maci-crypto' -import { nullifierTreeDepth } from '../config/testLocal' -import { genEpochKey } from '../test/utils' +import { genEpochKey } from '../core/utils' import { genProveReputationCircuitInputsFromDB } from '../database/utils' const configureSubparser = (subparsers: any) => { diff --git a/cli/listAllPosts.ts b/cli/listAllPosts.ts index ab34742..0664de4 100644 --- a/cli/listAllPosts.ts +++ b/cli/listAllPosts.ts @@ -1,4 +1,3 @@ -import base64url from 'base64url' import { ethers as hardhatEthers } from 'hardhat' import { ethers } from 'ethers' diff --git a/cli/publishPost.ts b/cli/publishPost.ts index 870bf2f..a04f59a 100644 --- a/cli/publishPost.ts +++ b/cli/publishPost.ts @@ -2,7 +2,7 @@ import base64url from 'base64url' import { ethers as hardhatEthers } from 'hardhat' import { ethers } from 'ethers' import { genIdentityCommitment, unSerialiseIdentity } from 'libsemaphore' -import { hashLeftRight, hashOne, stringifyBigInts } from 'maci-crypto' +import { stringifyBigInts } from 'maci-crypto' import mongoose from 'mongoose' import { @@ -20,14 +20,12 @@ import { add0x } from '../crypto/SMT' import { genUserStateFromContract } from '../core' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" -import { identityPrefix, identityCommitmentPrefix, reputationProofPrefix } from './prefix' +import { identityPrefix, reputationProofPrefix } from './prefix' import Post, { IPost } from "../database/models/post"; import { DEFAULT_POST_KARMA, MAX_KARMA_BUDGET } from '../config/socialMedia' -import { assert } from 'console' -import { formatProofForVerifierContract, genVerifyEpochKeyProofAndPublicSignals, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyEPKProof, verifyProveReputationProof } from '../test/circuits/utils' -import { genEpochKey, genKarmaNullifier } from '../test/utils' -import { nullifierTreeDepth } from '../config/testLocal' +import { formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyProveReputationProof } from '../circuits/utils' +import { genEpochKey } from '../core/utils' import { genProveReputationCircuitInputsFromDB } from '../database/utils' const configureSubparser = (subparsers: any) => { diff --git a/cli/test/testAllCommands.ts b/cli/test/testAllCommands.ts index 616cf07..d14f1fd 100644 --- a/cli/test/testAllCommands.ts +++ b/cli/test/testAllCommands.ts @@ -13,8 +13,6 @@ import { exec } from './utils' import Unirep from "../../artifacts/contracts/Unirep.sol/Unirep.json" import { hashOne } from "maci-crypto" import { identityCommitmentPrefix, identityPrefix } from '../prefix' -import { connectDB, initDB, updateDBFromAttestationEvent, updateDBFromCommentSubmittedEvent, updateDBFromEpochEndedEvent, updateDBFromNewGSTLeafInsertedEvent, updateDBFromPostSubmittedEvent, updateDBFromReputationNullifierSubmittedEvent, updateDBFromUserStateTransitionEvent } from '../../database/utils' -import { dbUri } from '../../config/database' describe('test all CLI subcommands', function() { this.timeout(500000) diff --git a/cli/userStateTransition.ts b/cli/userStateTransition.ts index 68c0aa9..c320ddd 100644 --- a/cli/userStateTransition.ts +++ b/cli/userStateTransition.ts @@ -15,7 +15,7 @@ import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import { genUserStateFromContract } from '../core' -import { formatProofForVerifierContract, genVerifyUserStateTransitionProofAndPublicSignals, getSignalByName, getSignalByNameViaSym, verifyUserStateTransitionProof } from '../test/circuits/utils' +import { formatProofForVerifierContract, genVerifyUserStateTransitionProofAndPublicSignals, getSignalByNameViaSym, verifyUserStateTransitionProof } from '../circuits/utils' import { stringifyBigInts } from 'maci-crypto' import { identityPrefix } from './prefix' import { genUserStateTransitionCircuitInputsFromDB } from '../database/utils' diff --git a/cli/vote.ts b/cli/vote.ts index 606e9eb..0a214b2 100644 --- a/cli/vote.ts +++ b/cli/vote.ts @@ -3,7 +3,6 @@ import { ethers as hardhatEthers } from 'hardhat' import { ethers } from 'ethers' import { genIdentityCommitment, unSerialiseIdentity } from 'libsemaphore' import { stringifyBigInts } from 'maci-crypto' -import mongoose from 'mongoose' import { promptPwd, @@ -15,16 +14,15 @@ import { import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' -import { genEpochKey } from '../test/utils' +import { genEpochKey } from '../core/utils' import { genUserStateFromContract } from '../core' -import { formatProofForVerifierContract, genVerifyEpochKeyProofAndPublicSignals, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyEPKProof, verifyProveReputationProof } from '../test/circuits/utils' +import { formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyProveReputationProof } from '../test/circuits/utils' import { add0x } from '../crypto/SMT' import { Attestation } from '../core' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import { reputationProofPrefix, identityPrefix } from './prefix' -import { nullifierTreeDepth } from '../config/testLocal' import { genProveReputationCircuitInputsFromDB } from '../database/utils' import { MAX_KARMA_BUDGET } from '../config/socialMedia' diff --git a/core/UnirepState.ts b/core/UnirepState.ts index 7f69453..1d401e3 100644 --- a/core/UnirepState.ts +++ b/core/UnirepState.ts @@ -1,21 +1,18 @@ import assert from 'assert' import { ethers } from 'ethers' import { - hashLeftRight, IncrementalQuinTree, hash5, } from 'maci-crypto' import { DEFAULT_AIRDROPPED_KARMA } from '../config/socialMedia' import { SparseMerkleTreeImpl } from '../crypto/SMT' -import { computeEmptyUserStateRoot, genNewSMT, SMT_ONE_LEAF, SMT_ZERO_LEAF } from '../test/utils' +import { computeEmptyUserStateRoot, genNewSMT, SMT_ONE_LEAF, SMT_ZERO_LEAF } from './utils' interface IEpochTreeLeaf { epochKey: BigInt; hashchainResult: BigInt; } -const DefaultHashchainResult = SMT_ONE_LEAF - interface IAttestation { attesterId: BigInt; posRep: BigInt; @@ -162,6 +159,7 @@ class UnirepState { * Get the hash chain result of given epoch key */ public getHashchain = (epochKey: string): BigInt => { + const DefaultHashchainResult = SMT_ONE_LEAF const hashchain = this.epochKeyToHashchainMap[epochKey] if (!hashchain) return DefaultHashchainResult else return hashchain diff --git a/core/UserState.ts b/core/UserState.ts index 7f57c30..c8982b0 100644 --- a/core/UserState.ts +++ b/core/UserState.ts @@ -1,13 +1,12 @@ import assert from 'assert' import { - hashLeftRight, IncrementalQuinTree, hash5, stringifyBigInts, hashOne, } from 'maci-crypto' import { SparseMerkleTreeImpl } from '../crypto/SMT' -import { genAttestationNullifier, defaultUserStateLeaf, genEpochKey, genNewSMT, genEpochKeyNullifier, genKarmaNullifier } from '../test/utils' +import { genAttestationNullifier, defaultUserStateLeaf, genEpochKey, genNewSMT, genEpochKeyNullifier, genKarmaNullifier } from './utils' import { IAttestation, UnirepState } from './UnirepState' import { DEFAULT_AIRDROPPED_KARMA, MAX_KARMA_BUDGET } from '../config/socialMedia' @@ -501,7 +500,6 @@ class UserState { hashChainResults.push(this.unirepState.getHashchain(epochKey.toString())) } - return stringifyBigInts({ epoch: fromEpoch, intermediate_user_state_tree_roots: intermediateUserStateTreeRoots, diff --git a/core/utils.ts b/core/utils.ts index c5556da..76a7ef0 100644 --- a/core/utils.ts +++ b/core/utils.ts @@ -1,15 +1,196 @@ +// The reason for the ts-ignore below is that if we are executing the code via `ts-node` instead of `hardhat`, +// it can not read the hardhat config and error ts-2305 will be reported. +// @ts-ignore +import { ethers as hardhatEthers, waffle } from 'hardhat' +import { ethers } from 'ethers' +import Keyv from "keyv" import assert from 'assert' -import { BigNumber, ethers } from 'ethers' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" -import { numAttestationsPerEpochKey } from '../config/testLocal' +import PoseidonT3 from "../artifacts/contracts/Poseidon.sol/PoseidonT3.json" +import PoseidonT6 from "../artifacts/contracts/Poseidon.sol/PoseidonT6.json" +import { attestingFee, circuitEpochTreeDepth, circuitGlobalStateTreeDepth, circuitNullifierTreeDepth, circuitUserStateTreeDepth, epochLength, epochTreeDepth, globalStateTreeDepth, maxUsers, nullifierTreeDepth, numAttestationsPerEpochKey, numEpochKeyNoncePerEpoch, userStateTreeDepth } from '../config/testLocal' import { Attestation, IEpochTreeLeaf, UnirepState } from './UnirepState' import { IUserStateLeaf, UserState } from './UserState' -import { hash5, hashLeftRight } from 'maci-crypto' -import { computeEmptyUserStateRoot } from '../test/utils' -import { id } from 'ethers/lib/utils' -import comment from '../database/models/comment' +import { hash5, hashLeftRight, IncrementalQuinTree, SnarkBigInt } from 'maci-crypto' import { DEFAULT_AIRDROPPED_KARMA } from '../config/socialMedia' +import { ATTESTATION_NULLIFIER_DOMAIN, EPOCH_KEY_NULLIFIER_DOMAIN, KARMA_NULLIFIER_DOMAIN } from '../config/nullifierDomainSeparator' +import { SparseMerkleTreeImpl } from '../crypto/SMT' + +const defaultUserStateLeaf = hash5([BigInt(0), BigInt(0), BigInt(0), BigInt(0), BigInt(0)]) +const SMT_ZERO_LEAF = hashLeftRight(BigInt(0), BigInt(0)) +const SMT_ONE_LEAF = hashLeftRight(BigInt(1), BigInt(0)) + +const computeEmptyUserStateRoot = (treeDepth: number): BigInt => { + const t = new IncrementalQuinTree( + treeDepth, + defaultUserStateLeaf, + 2, + ) + return t.root +} + +const getTreeDepthsForTesting = (deployEnv: string = "circuit") => { + if (deployEnv === 'contract') { + return { + "userStateTreeDepth": userStateTreeDepth, + "globalStateTreeDepth": globalStateTreeDepth, + "epochTreeDepth": epochTreeDepth, + "nullifierTreeDepth": nullifierTreeDepth, + } + } else if (deployEnv === 'circuit') { + return { + "userStateTreeDepth": circuitUserStateTreeDepth, + "globalStateTreeDepth": circuitGlobalStateTreeDepth, + "epochTreeDepth": circuitEpochTreeDepth, + "nullifierTreeDepth": circuitNullifierTreeDepth, + } + } else { + throw new Error('Only contract and circuit testing env are supported') + } +} + +const deployUnirep = async ( + deployer: ethers.Signer, + _treeDepths: any, + _settings?: any): Promise => { + let PoseidonT3Contract, PoseidonT6Contract + let EpochKeyValidityVerifierContract, UserStateTransitionVerifierContract, ReputationVerifierContract, ReputationFromAttesterVerifierContract + + console.log('Deploying PoseidonT3') + PoseidonT3Contract = await waffle.deployContract( + deployer, + PoseidonT3 + ) + console.log('Deploying PoseidonT6') + PoseidonT6Contract = await waffle.deployContract( + deployer, + PoseidonT6, + [], + { + gasLimit: 9000000, + } + ) + + console.log('Deploying EpochKeyValidityVerifier') + EpochKeyValidityVerifierContract = await (await hardhatEthers.getContractFactory( + "EpochKeyValidityVerifier", + deployer + )).deploy() + + console.log('Deploying UserStateTransitionVerifier') + UserStateTransitionVerifierContract = await (await hardhatEthers.getContractFactory( + "UserStateTransitionVerifier", + deployer + )).deploy() + + console.log('Deploying ReputationVerifier') + ReputationVerifierContract = await (await hardhatEthers.getContractFactory( + "ReputationVerifier", + deployer + )).deploy() + + console.log('Deploying ReputationFromAttesterVerifier') + ReputationFromAttesterVerifierContract = await (await hardhatEthers.getContractFactory( + "ReputationFromAttesterVerifier", + deployer + )).deploy() + + console.log('Deploying Unirep') + + let _maxUsers, _numEpochKeyNoncePerEpoch, _numAttestationsPerEpochKey, _epochLength, _attestingFee + if (_settings) { + _maxUsers = _settings.maxUsers + _numEpochKeyNoncePerEpoch = _settings.numEpochKeyNoncePerEpoch + _numAttestationsPerEpochKey = _settings.numAttestationsPerEpochKey + _epochLength = _settings.epochLength + _attestingFee = _settings.attestingFee + } else { + _maxUsers = maxUsers + _numEpochKeyNoncePerEpoch = numEpochKeyNoncePerEpoch + _numAttestationsPerEpochKey = numAttestationsPerEpochKey + _epochLength = epochLength + _attestingFee = attestingFee + } + const f = await hardhatEthers.getContractFactory( + "Unirep", + { + signer: deployer, + libraries: { + "PoseidonT3": PoseidonT3Contract.address, + "PoseidonT6": PoseidonT6Contract.address + } + } + ) + const c = await (f.deploy( + _treeDepths, + { + "maxUsers": _maxUsers + }, + EpochKeyValidityVerifierContract.address, + UserStateTransitionVerifierContract.address, + ReputationVerifierContract.address, + ReputationFromAttesterVerifierContract.address, + _numEpochKeyNoncePerEpoch, + _numAttestationsPerEpochKey, + _epochLength, + _attestingFee, + { + gasLimit: 9000000, + } + )) + + // Print out deployment info + console.log("-----------------------------------------------------------------") + console.log("Bytecode size of Unirep:", Math.floor(Unirep.bytecode.length / 2), "bytes") + let receipt = await c.provider.getTransactionReceipt(c.deployTransaction.hash) + console.log("Gas cost of deploying Unirep:", receipt.gasUsed.toString()) + console.log("-----------------------------------------------------------------") + + return c +} + +const genEpochKey = (identityNullifier: SnarkBigInt, epoch: number, nonce: number, _epochTreeDepth: number = epochTreeDepth): SnarkBigInt => { + const values: any[] = [ + identityNullifier, + epoch, + nonce, + BigInt(0), + BigInt(0), + ] + let epochKey = hash5(values) + // Adjust epoch key size according to epoch tree depth + const epochKeyModed = BigInt(epochKey) % BigInt(2 ** _epochTreeDepth) + return epochKeyModed +} + +const genAttestationNullifier = (identityNullifier: SnarkBigInt, attesterId: BigInt, epoch: number, epochKey: BigInt, _nullifierTreeDepth: number = nullifierTreeDepth): SnarkBigInt => { + let nullifier = hash5([ATTESTATION_NULLIFIER_DOMAIN, identityNullifier, attesterId, BigInt(epoch), epochKey]) + const nullifierModed = BigInt(nullifier) % BigInt(2 ** _nullifierTreeDepth) + return nullifierModed +} + +const genEpochKeyNullifier = (identityNullifier: SnarkBigInt, epoch: number, nonce: number, _nullifierTreeDepth: number = nullifierTreeDepth): SnarkBigInt => { + let nullifier = hash5([EPOCH_KEY_NULLIFIER_DOMAIN, identityNullifier, BigInt(epoch), BigInt(nonce), BigInt(0)]) + // Adjust epoch key size according to epoch tree depth + const nullifierModed = BigInt(nullifier) % BigInt(2 ** _nullifierTreeDepth) + return nullifierModed +} + +const genKarmaNullifier = (identityNullifier: SnarkBigInt, epoch: number, nonce: number, _nullifierTreeDepth: number = nullifierTreeDepth): SnarkBigInt => { + let nullifier = hash5([KARMA_NULLIFIER_DOMAIN, identityNullifier, BigInt(epoch), BigInt(nonce), BigInt(0)]) + // Adjust epoch key size according to epoch tree depth + const nullifierModed = BigInt(nullifier) % BigInt(2 ** _nullifierTreeDepth) + return nullifierModed +} + +const genNewSMT = async (treeDepth: number, defaultLeafHash: BigInt): Promise => { + return SparseMerkleTreeImpl.create( + new Keyv(), + treeDepth, + defaultLeafHash, + ) +} /* * Retrieves and parses on-chain Unirep contract data to create an off-chain @@ -484,7 +665,7 @@ const _genUserStateFromContract = async ( const newState = await userState.genNewUserStateAfterTransition() userState.transition(newState.newUSTLeaves) // User processed all epoch keys so non-zero GST leaf is generated. - assert(BigNumber.from(newState.newGSTLeaf).eq(newLeaf), 'New GST leaf mismatch') + assert(ethers.BigNumber.from(newState.newGSTLeaf).eq(newLeaf), 'New GST leaf mismatch') // User transition to this epoch, increment (next) GST leaf index currentEpochGSTLeafIndexToInsert ++ } else if (epkNullifiersMatched > 0) { @@ -532,6 +713,17 @@ const genUserStateFromContract = async ( } export { + defaultUserStateLeaf, + SMT_ONE_LEAF, + SMT_ZERO_LEAF, + computeEmptyUserStateRoot, + getTreeDepthsForTesting, + deployUnirep, + genEpochKey, + genAttestationNullifier, + genEpochKeyNullifier, + genKarmaNullifier, + genNewSMT, genUnirepStateFromContract, genUserStateFromContract, genUserStateFromParams, diff --git a/test/circuits/proveReputation.ts b/test/circuits/proveReputation.ts index a41fa17..c1f65d8 100644 --- a/test/circuits/proveReputation.ts +++ b/test/circuits/proveReputation.ts @@ -14,7 +14,6 @@ import { IncrementalQuinTree, genRandomSalt, hash5, - hashLeftRight, hashOne, stringifyBigInts, } from 'maci-crypto' diff --git a/test/circuits/userStateTransition.ts b/test/circuits/userStateTransition.ts index 4d160d1..887a7b9 100644 --- a/test/circuits/userStateTransition.ts +++ b/test/circuits/userStateTransition.ts @@ -20,8 +20,8 @@ import { verifyUserStateTransitionProof, getSignalByName, } from './utils' -import { circuitEpochTreeDepth, circuitGlobalStateTreeDepth, circuitNullifierTreeDepth, circuitUserStateTreeDepth, globalStateTreeDepth, numAttestationsPerEpochKey, numEpochKeyNoncePerEpoch } from "../../config/testLocal" -import { genEpochKey, genAttestationNullifier, genNewEpochTree, genNewNullifierTree, genNewUserStateTree, genEpochKeyNullifier, SMT_ONE_LEAF } from "../utils" +import { circuitEpochTreeDepth, circuitGlobalStateTreeDepth, circuitNullifierTreeDepth, circuitUserStateTreeDepth, numAttestationsPerEpochKey, numEpochKeyNoncePerEpoch } from "../../config/testLocal" +import { genEpochKey, genAttestationNullifier, genNewEpochTree, genNewUserStateTree } from "../utils" import { SparseMerkleTreeImpl } from "../../crypto/SMT" import { Attestation, Reputation } from "../../core" import { DEFAULT_AIRDROPPED_KARMA } from "../../config/socialMedia" diff --git a/test/circuits/utils.ts b/test/circuits/utils.ts index b0a8d89..e7dfebd 100644 --- a/test/circuits/utils.ts +++ b/test/circuits/utils.ts @@ -4,7 +4,6 @@ import lineByLine from 'n-readlines' import * as path from 'path' import { SnarkProof } from 'libsemaphore' const circom = require('circom') -const snarkjs = require('snarkjs') import * as shell from 'shelljs' import { diff --git a/test/contracts/Attesting.ts b/test/contracts/Attesting.ts index 1098c5d..2926c08 100644 --- a/test/contracts/Attesting.ts +++ b/test/contracts/Attesting.ts @@ -1,7 +1,7 @@ import { ethers as hardhatEthers } from 'hardhat' import { ethers } from 'ethers' import chai from "chai" -import { attestingFee, epochLength, maxUsers, numEpochKeyNoncePerEpoch } from '../../config/testLocal' +import { attestingFee, circuitEpochTreeDepth, epochLength, maxUsers, numEpochKeyNoncePerEpoch } from '../../config/testLocal' import { genRandomSalt, hashLeftRight, SNARK_FIELD_SIZE } from '../../crypto/crypto' import { genIdentity, genIdentityCommitment } from 'libsemaphore' import { deployUnirep, genEpochKey, getTreeDepthsForTesting } from '../utils' diff --git a/test/contracts/Posting.ts b/test/contracts/Posting.ts index 2c9a993..2931924 100644 --- a/test/contracts/Posting.ts +++ b/test/contracts/Posting.ts @@ -11,7 +11,7 @@ const { expect } = chai import Unirep from "../../artifacts/contracts/Unirep.sol/Unirep.json" import { DEFAULT_AIRDROPPED_KARMA, DEFAULT_COMMENT_KARMA, DEFAULT_POST_KARMA, MAX_KARMA_BUDGET } from '../../config/socialMedia' import { UnirepState, UserState } from '../../core' -import { compileAndLoadCircuit, executeCircuit, formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyProveReputationProof } from '../circuits/utils' +import { formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyProveReputationProof } from '../circuits/utils' import { DEFAULT_ETH_PROVIDER } from '../../cli/defaults' @@ -193,7 +193,7 @@ describe('Post', function () { it('submit post should succeed', async() => { const currentEpoch = (await unirepContract.currentEpoch()).toNumber() const epochKeyNonce = 0 - const epk = genEpochKey(ids[0].identityNullifier, currentEpoch, epochKeyNonce, circuitEpochTreeDepth) + const epk = genEpochKey(ids[0].identityNullifier, currentEpoch, epochKeyNonce) const nullifiers: BigInt[] = [] for (let i = 0; i < MAX_KARMA_BUDGET; i++) { @@ -218,7 +218,7 @@ describe('Post', function () { const text = genRandomSalt().toString() const currentEpoch = (await unirepContract.currentEpoch()).toNumber() const epochKeyNonce = 0 - const epk = genEpochKey(ids[0].identityNullifier, currentEpoch, epochKeyNonce, circuitEpochTreeDepth) + const epk = genEpochKey(ids[0].identityNullifier, currentEpoch, epochKeyNonce) const nonceStarter = 1 const circuitInputs = await users[0].genProveReputationCircuitInputs( epochKeyNonce, @@ -263,7 +263,7 @@ describe('Post', function () { const currentEpoch = (await unirepContract.currentEpoch()).toNumber() const epochKeyNonce = 0 - const epk = genEpochKey(ids[0].identityNullifier, currentEpoch, epochKeyNonce, circuitEpochTreeDepth) + const epk = genEpochKey(ids[0].identityNullifier, currentEpoch, epochKeyNonce) const nonceStarter = 10 const circuitInputs = await users[0].genProveReputationCircuitInputs( epochKeyNonce, @@ -306,7 +306,7 @@ describe('Post', function () { it('submit a post with invalid proof should fail', async() => { const currentEpoch = (await unirepContract.currentEpoch()).toNumber() const epochKeyNonce = 0 - const epk = genEpochKey(ids[0].identityNullifier, currentEpoch, epochKeyNonce, circuitEpochTreeDepth) + const epk = genEpochKey(ids[0].identityNullifier, currentEpoch, epochKeyNonce) const nonceStarter = 15 const circuitInputs = await users[0].genProveReputationCircuitInputs( epochKeyNonce, @@ -376,7 +376,7 @@ describe('Post', function () { it('submit comment should succeed', async() => { const currentEpoch = (await unirepContract.currentEpoch()).toNumber() - const epk = genEpochKey(ids[1].identityNullifier, currentEpoch, epochKeyNonce, circuitEpochTreeDepth) + const epk = genEpochKey(ids[1].identityNullifier, currentEpoch, epochKeyNonce) const nullifiers: BigInt[] = [] for (let i = 0; i < MAX_KARMA_BUDGET; i++) { @@ -402,7 +402,7 @@ describe('Post', function () { const text = genRandomSalt().toString() const currentEpoch = (await unirepContract.currentEpoch()).toNumber() const epochKeyNonce = 0 - const epk = genEpochKey(ids[1].identityNullifier, currentEpoch, epochKeyNonce, circuitEpochTreeDepth) + const epk = genEpochKey(ids[1].identityNullifier, currentEpoch, epochKeyNonce) const nonceStarter = 1 const circuitInputs = await users[1].genProveReputationCircuitInputs( epochKeyNonce, @@ -448,7 +448,7 @@ describe('Post', function () { const currentEpoch = (await unirepContract.currentEpoch()).toNumber() const epochKeyNonce = 0 - const epk = genEpochKey(ids[1].identityNullifier, currentEpoch, epochKeyNonce, circuitEpochTreeDepth) + const epk = genEpochKey(ids[1].identityNullifier, currentEpoch, epochKeyNonce) const nonceStarter = 10 const circuitInputs = await users[1].genProveReputationCircuitInputs( epochKeyNonce, @@ -492,7 +492,7 @@ describe('Post', function () { it('submit a comment with invalid proof should fail', async() => { const currentEpoch = (await unirepContract.currentEpoch()).toNumber() const epochKeyNonce = 0 - const epk = genEpochKey(ids[1].identityNullifier, currentEpoch, epochKeyNonce, circuitEpochTreeDepth) + const epk = genEpochKey(ids[1].identityNullifier, currentEpoch, epochKeyNonce) const nonceStarter = 15 const circuitInputs = await users[1].genProveReputationCircuitInputs( epochKeyNonce, diff --git a/test/contracts/SignUp.ts b/test/contracts/SignUp.ts index 819f416..0fd0231 100644 --- a/test/contracts/SignUp.ts +++ b/test/contracts/SignUp.ts @@ -22,7 +22,7 @@ describe('Signup', () => { before(async () => { accounts = await hardhatEthers.getSigners() - const _treeDepths = getTreeDepthsForTesting() + const _treeDepths = getTreeDepthsForTesting("contract") unirepContract = await deployUnirep(accounts[0], _treeDepths) const blankGSLeaf = await unirepContract.hashedBlankStateLeaf() diff --git a/test/contracts/Vote.ts b/test/contracts/Vote.ts index ef82add..d65708f 100644 --- a/test/contracts/Vote.ts +++ b/test/contracts/Vote.ts @@ -9,9 +9,9 @@ import { deployUnirep, genEpochKey, genNewUserStateTree, getTreeDepthsForTesting const { expect } = chai import Unirep from "../../artifacts/contracts/Unirep.sol/Unirep.json" -import { DEFAULT_AIRDROPPED_KARMA, DEFAULT_COMMENT_KARMA, DEFAULT_POST_KARMA, MAX_KARMA_BUDGET } from '../../config/socialMedia' +import { DEFAULT_AIRDROPPED_KARMA, MAX_KARMA_BUDGET } from '../../config/socialMedia' import { Attestation, UnirepState, UserState } from '../../core' -import { compileAndLoadCircuit, executeCircuit, formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyProveReputationProof } from '../circuits/utils' +import { formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyProveReputationProof } from '../circuits/utils' import { DEFAULT_ETH_PROVIDER } from '../../cli/defaults' @@ -213,9 +213,9 @@ describe('Vote', function () { it('submit upvote should succeed', async() => { currentEpoch = (await unirepContract.currentEpoch()).toNumber() - fromEpk = genEpochKey(ids[fromUser].identityNullifier, currentEpoch, epochKeyNonce, circuitEpochTreeDepth) + fromEpk = genEpochKey(ids[fromUser].identityNullifier, currentEpoch, epochKeyNonce) - toEpk = genEpochKey(ids[toUser].identityNullifier, currentEpoch, epochKeyNonce, circuitEpochTreeDepth) + toEpk = genEpochKey(ids[toUser].identityNullifier, currentEpoch, epochKeyNonce) const nullifiers: BigInt[] = [] diff --git a/test/integration/Integration.ts b/test/integration/Integration.ts index 825720c..3cc8725 100644 --- a/test/integration/Integration.ts +++ b/test/integration/Integration.ts @@ -3,16 +3,15 @@ import { BigNumber, ethers } from 'ethers' import chai from "chai" import { attestingFee, circuitEpochTreeDepth, circuitGlobalStateTreeDepth, circuitNullifierTreeDepth, circuitUserStateTreeDepth, epochLength, numEpochKeyNoncePerEpoch, numAttestationsPerEpochKey} from '../../config/testLocal' import { genIdentity, genIdentityCommitment } from 'libsemaphore' -import { IncrementalQuinTree, genRandomSalt, stringifyBigInts, hashLeftRight, hashOne, hash5 } from 'maci-crypto' +import { IncrementalQuinTree, genRandomSalt, stringifyBigInts, hashOne, hash5 } from 'maci-crypto' import { deployUnirep, genEpochKey, toCompleteHexString, computeEmptyUserStateRoot, getTreeDepthsForTesting } from '../utils' const { expect } = chai import { Attestation, IAttestation, IEpochTreeLeaf, IUserStateLeaf, UnirepState, UserState, genUserStateFromContract } from "../../core" -import { compileAndLoadCircuit, formatProofForVerifierContract, genVerifyEpochKeyProofAndPublicSignals, genVerifyReputationProofAndPublicSignals, genVerifyReputationFromAttesterProofAndPublicSignals, -genVerifyUserStateTransitionProofAndPublicSignals, getSignalByName, getSignalByNameViaSym, verifyEPKProof, verifyProveReputationProof, verifyUserStateTransitionProof, verifyProveReputationFromAttesterProof } from "../circuits/utils" +import { formatProofForVerifierContract, genVerifyEpochKeyProofAndPublicSignals, genVerifyReputationProofAndPublicSignals, genVerifyReputationFromAttesterProofAndPublicSignals, +genVerifyUserStateTransitionProofAndPublicSignals, getSignalByNameViaSym, verifyEPKProof, verifyProveReputationProof, verifyUserStateTransitionProof, verifyProveReputationFromAttesterProof } from "../circuits/utils" import { DEFAULT_AIRDROPPED_KARMA, DEFAULT_COMMENT_KARMA, DEFAULT_POST_KARMA } from '../../config/socialMedia' -import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from '../../cli/defaults' import { add0x } from '../../crypto/SMT' describe('Integration', function () { diff --git a/test/utils.ts b/test/utils.ts index e54d9dd..e0f123e 100644 --- a/test/utils.ts +++ b/test/utils.ts @@ -1,5 +1,5 @@ // The reason for the ts-ignore below is that if we are executing the code via `ts-node` instead of `hardhat`, -// it can not read the hardhat config and error ts-2503 will be reported. +// it can not read the hardhat config and error ts-2305 will be reported. // @ts-ignore import { ethers as hardhatEthers, waffle } from 'hardhat' import { ethers } from 'ethers' @@ -13,9 +13,8 @@ import { ATTESTATION_NULLIFIER_DOMAIN, EPOCH_KEY_NULLIFIER_DOMAIN, KARMA_NULLIFI import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import PoseidonT3 from "../artifacts/contracts/Poseidon.sol/PoseidonT3.json" import PoseidonT6 from "../artifacts/contracts/Poseidon.sol/PoseidonT6.json" -import { DEFAULT_AIRDROPPED_KARMA } from '../config/socialMedia' -const getTreeDepthsForTesting = (deployEnv: string = "contract") => { +const getTreeDepthsForTesting = (deployEnv: string = "circuit") => { if (deployEnv === 'contract') { return { "userStateTreeDepth": userStateTreeDepth, @@ -135,7 +134,7 @@ const deployUnirep = async ( return c } -const genEpochKey = (identityNullifier: SnarkBigInt, epoch: number, nonce: number, _epochTreeDepth: number = epochTreeDepth): SnarkBigInt => { +const genEpochKey = (identityNullifier: SnarkBigInt, epoch: number, nonce: number, _epochTreeDepth: number = circuitEpochTreeDepth): SnarkBigInt => { const values: any[] = [ identityNullifier, epoch, From 115e9851ae7d6ce0538f17e9333497c22fe8579e Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Wed, 19 May 2021 09:29:12 +0800 Subject: [PATCH 26/38] trigger GitHub actions From 006b35c188dc73ba996b7a96d929587daeb9ead8 Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Thu, 20 May 2021 13:59:32 +0800 Subject: [PATCH 27/38] create a branch with database functions --- cli/attest.ts | 185 ---- cli/deploy.ts | 9 - cli/eventListeners.ts | 125 --- cli/genReputationProofFromAttester.ts | 26 +- cli/index.ts | 20 - cli/leaveComment.ts | 79 +- cli/publishPost.ts | 74 +- cli/test/testAllCommands.ts | 20 +- cli/userStateTransition.ts | 25 +- cli/vote.ts | 58 +- config/database.ts | 5 - database/utils.ts | 1120 ------------------------- package.json | 1 - 13 files changed, 54 insertions(+), 1693 deletions(-) delete mode 100644 cli/attest.ts delete mode 100644 cli/eventListeners.ts delete mode 100644 config/database.ts delete mode 100644 database/utils.ts diff --git a/cli/attest.ts b/cli/attest.ts deleted file mode 100644 index 664ea5d..0000000 --- a/cli/attest.ts +++ /dev/null @@ -1,185 +0,0 @@ -import { ethers as hardhatEthers } from 'hardhat' -import { ethers } from 'ethers' - -import { - promptPwd, - validateEthSk, - validateEthAddress, - checkDeployerProviderConnection, - contractExists, -} from './utils' - -import { DEFAULT_ETH_PROVIDER } from './defaults' - -import { add0x } from '../crypto/SMT' -import { Attestation } from '../core' - -import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" - -const configureSubparser = (subparsers: any) => { - const parser = subparsers.addParser( - 'attest', - { addHelp: true }, - ) - - parser.addArgument( - ['-e', '--eth-provider'], - { - action: 'store', - type: 'string', - help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, - } - ) - - parser.addArgument( - ['-epk', '--epoch-key'], - { - required: true, - type: 'string', - help: 'The user\'s epoch key to attest to (in hex representation)', - } - ) - - parser.addArgument( - ['-pr', '--pos-rep'], - { - required: true, - type: 'int', - help: 'Score of positive reputation to give to the user', - } - ) - - parser.addArgument( - ['-nr', '--neg-rep'], - { - required: true, - type: 'int', - help: 'Score of negative reputation to give to the user', - } - ) - - parser.addArgument( - ['-gf', '--graffiti'], - { - action: 'store', - type: 'string', - help: 'Graffiti for the reputation given to the user (in hex representation)', - } - ) - - parser.addArgument( - ['-x', '--contract'], - { - required: true, - type: 'string', - help: 'The Unirep contract address', - } - ) - - const privkeyGroup = parser.addMutuallyExclusiveGroup({ required: true }) - - privkeyGroup.addArgument( - ['-dp', '--prompt-for-eth-privkey'], - { - action: 'storeTrue', - help: 'Whether to prompt for the user\'s Ethereum private key and ignore -d / --eth-privkey', - } - ) - - privkeyGroup.addArgument( - ['-d', '--eth-privkey'], - { - action: 'store', - type: 'string', - help: 'The deployer\'s Ethereum private key', - } - ) -} - -const attest = async (args: any) => { - - // Unirep contract - if (!validateEthAddress(args.contract)) { - console.error('Error: invalid Unirep contract address') - return - } - - const unirepAddress = args.contract - - // Ethereum provider - const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER - - let ethSk - // The deployer's Ethereum private key - // The user may either enter it as a command-line option or via the - // standard input - if (args.prompt_for_eth_privkey) { - ethSk = await promptPwd('Your Ethereum private key') - } else { - ethSk = args.eth_privkey - } - - if (!validateEthSk(ethSk)) { - console.error('Error: invalid Ethereum private key') - return - } - - if (! (await checkDeployerProviderConnection(ethSk, ethProvider))) { - console.error('Error: unable to connect to the Ethereum provider at', ethProvider) - return - } - - const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) - const wallet = new ethers.Wallet(ethSk, provider) - - if (! await contractExists(provider, unirepAddress)) { - console.error('Error: there is no contract deployed at the specified address') - return - } - - const unirepContract = new ethers.Contract( - unirepAddress, - Unirep.abi, - wallet, - ) - const attestingFee = await unirepContract.attestingFee() - const ethAddr = ethers.utils.computeAddress(args.eth_privkey) - const attesterId = await unirepContract.attesters(ethAddr) - if (attesterId.toNumber() == 0) { - console.error('Error: attester has not registered yet') - return - } - - const epk = BigInt(add0x(args.epoch_key)) - const graffiti = args.graffiti ? BigInt(add0x(args.graffiti)) : BigInt(0) - const overwriteGraffiti = args.graffiti ? true : false - const attestation = new Attestation( - BigInt(attesterId), - BigInt(args.pos_rep), - BigInt(args.neg_rep), - graffiti, - overwriteGraffiti, - ) - console.log(`Attesting to epoch key ${args.epoch_key} with pos rep ${args.pos_rep}, neg rep ${args.neg_rep} and graffiti ${graffiti.toString(16)} (overwrite graffit: ${overwriteGraffiti})`) - let tx - try { - tx = await unirepContract.submitAttestation( - attestation, - epk, - { value: attestingFee, gasLimit: 1000000 } - ) - } catch(e) { - console.error('Error: the transaction failed') - if (e.message) { - console.error(e.message) - } - return - } - - console.log('Transaction hash:', tx.hash) -} - -export { - attest, - configureSubparser, -} \ No newline at end of file diff --git a/cli/deploy.ts b/cli/deploy.ts index 7956df6..8f09880 100644 --- a/cli/deploy.ts +++ b/cli/deploy.ts @@ -44,15 +44,6 @@ const configureSubparser = (subparsers: any) => { } ) - // deployParser.addArgument( - // ['-kn', '--max-epoch-key-nonce'], - // { - // action: 'store', - // type: 'int', - // help: 'The maximum supported epoch key nonce. Default: 2', - // } - // ) - deployParser.addArgument( ['-l', '--epoch-length'], { diff --git a/cli/eventListeners.ts b/cli/eventListeners.ts deleted file mode 100644 index a6c841a..0000000 --- a/cli/eventListeners.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { dbUri } from '../config/database'; -import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" -import { ethers as hardhatEthers } from 'hardhat' -import { ethers } from 'ethers' -import { - validateEthAddress, -} from './utils' - -import { DEFAULT_ETH_PROVIDER } from './defaults' -import { saveSettingsFromContract, - updateDBFromNewGSTLeafInsertedEvent, - updateDBFromAttestationEvent, - updateDBFromPostSubmittedEvent, - updateDBFromCommentSubmittedEvent, - updateDBFromReputationNullifierSubmittedEvent, - updateDBFromEpochEndedEvent, - updateDBFromUserStateTransitionEvent, - connectDB, - initDB,}from '../database/utils' - -const configureSubparser = (subparsers: any) => { -const parser = subparsers.addParser( - 'eventListeners', - { addHelp: true }, - ) - - parser.addArgument( - ['-e', '--eth-provider'], - { - action: 'store', - type: 'string', - help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, - } - ) - - parser.addArgument( - ['-x', '--contract'], - { - required: true, - type: 'string', - help: 'The Unirep contract address', - } - ) -} - -const eventListeners = async (args: any) => { - - // Unirep contract - if (!validateEthAddress(args.contract)) { - console.error('Error: invalid Unirep contract address') - return - } - const unirepAddress = args.contract - - // Ethereum provider - const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER - - console.log('listener start') - - const db = await connectDB(dbUri) - const isInit = await initDB(db) - if(!isInit){ - console.error('Error: DB is not initialized') - return - } - - const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) - const unirepContract = new ethers.Contract( - unirepAddress, - Unirep.abi, - provider, - ) - - await saveSettingsFromContract(unirepContract) - - - const NewGSTLeafInsertedFilter = unirepContract.filters.NewGSTLeafInserted() - const AttestationSubmittedFilter = unirepContract.filters.AttestationSubmitted() - const postSubmittedFilter = unirepContract.filters.PostSubmitted() - const commentSubmittedFilter = unirepContract.filters.CommentSubmitted() - const reputationSubmittedFilter = unirepContract.filters.ReputationNullifierSubmitted() - const epochEndedFilter = unirepContract.filters.EpochEnded() - const userStateTransitionedFilter = unirepContract.filters.UserStateTransitioned() - - - // NewGSTLeaf listeners - provider.on( - NewGSTLeafInsertedFilter, (event) => updateDBFromNewGSTLeafInsertedEvent(event) - ) - - // PostSubmitted listeners - provider.on( - postSubmittedFilter, (event) => updateDBFromPostSubmittedEvent(event) - ) - - // CommentSubmitted listeners - provider.on( - commentSubmittedFilter, (event) => updateDBFromCommentSubmittedEvent(event) - ) - - // ReputationSubmitted listeners - provider.on( - reputationSubmittedFilter, (event) => updateDBFromReputationNullifierSubmittedEvent(event) - ) - - // Attestation listeners - provider.on( - AttestationSubmittedFilter, (event) => updateDBFromAttestationEvent(event) - ) - - // Epoch Ended filter listeners - provider.on( - epochEndedFilter, (event) => updateDBFromEpochEndedEvent(event, unirepContract) - ) - - // User state transition listeners - provider.on( - userStateTransitionedFilter, (event) => updateDBFromUserStateTransitionEvent(event) - ) -} - -export { - eventListeners, - configureSubparser, -} \ No newline at end of file diff --git a/cli/genReputationProofFromAttester.ts b/cli/genReputationProofFromAttester.ts index deb7120..24c5996 100644 --- a/cli/genReputationProofFromAttester.ts +++ b/cli/genReputationProofFromAttester.ts @@ -14,7 +14,6 @@ import { formatProofForVerifierContract, genVerifyReputationFromAttesterProofAnd import { stringifyBigInts } from 'maci-crypto' import { add0x } from '../crypto/SMT' import { identityPrefix, reputationProofFromAttesterPrefix } from './prefix' -import { genProveReputationFromAttesterCircuitInputsFromDB } from '../database/utils' const configureSubparser = (subparsers: any) => { const parser = subparsers.addParser( @@ -98,14 +97,6 @@ const configureSubparser = (subparsers: any) => { help: 'The Unirep contract address', } ) - - parser.addArgument( - ['-db', '--from-database'], - { - action: 'storeTrue', - help: 'Indicate if to generate proving circuit from database', - } - ) } const genReputationProofFromAttester = async (args: any) => { @@ -160,22 +151,7 @@ const genReputationProofFromAttester = async (args: any) => { const maxNegRep = args.max_neg_rep != null ? BigInt(args.max_neg_rep) : BigInt(0) const graffitiPreImage = args.graffiti_preimage != null ? BigInt(add0x(args.graffiti_preimage)) : BigInt(0) - - let circuitInputs: any - - if(args.from_database){ - - console.log('generating proving circuit from database...') - - circuitInputs = await genProveReputationFromAttesterCircuitInputsFromDB( - userState.getUnirepStateCurrentEpoch(), id,attesterId, provePosRep, proveNegRep, proveRepDiff, proveGraffiti, minPosRep, maxNegRep, minRepDiff, graffitiPreImage) - - } else { - - console.log('generating proving circuit from contract...') - - circuitInputs = await userState.genProveReputationFromAttesterCircuitInputs(attesterId, provePosRep, proveNegRep, proveRepDiff, proveGraffiti, minPosRep, maxNegRep, minRepDiff, graffitiPreImage) - } + const circuitInputs = await userState.genProveReputationFromAttesterCircuitInputs(attesterId, provePosRep, proveNegRep, proveRepDiff, proveGraffiti, minPosRep, maxNegRep, minRepDiff, graffitiPreImage) // console.log('Proving reputation...') // console.log('----------------------User State----------------------') diff --git a/cli/index.ts b/cli/index.ts index 5d608f6..eca1d32 100644 --- a/cli/index.ts +++ b/cli/index.ts @@ -12,11 +12,6 @@ import { configureSubparser as configureSubparserForDeploy, } from './deploy' -import { - eventListeners, - configureSubparser as configureSubparserForEventListeners, -} from './eventListeners' - import { userSignup, configureSubparser as configureSubparserForUserSignup, @@ -57,11 +52,6 @@ import { configureSubparser as configureSubparserForleaveComment, } from './leaveComment' -import { - attest, - configureSubparser as configureSubparserForAttest, -} from './attest' - import { vote, configureSubparser as configureSubparserForvote, @@ -104,9 +94,6 @@ const main = async () => { // Subcommand: deploy configureSubparserForDeploy(subparsers) - // Subcommand: eventListners - configureSubparserForEventListeners(subparsers) - // Subcommand: userSignup configureSubparserForUserSignup(subparsers) @@ -131,9 +118,6 @@ const main = async () => { // Subcommand: leaveComment configureSubparserForleaveComment(subparsers) - // Subcommand: attest - configureSubparserForAttest(subparsers) - // Subcommand: vote configureSubparserForvote(subparsers) @@ -156,8 +140,6 @@ const main = async () => { await genUnirepIdentity(args) } else if (args.subcommand === 'deploy') { await deploy(args) - } else if (args.subcommand === 'eventListeners') { - await eventListeners(args) } else if (args.subcommand === 'userSignup') { await userSignup(args) } else if (args.subcommand === 'attesterSignup') { @@ -174,8 +156,6 @@ const main = async () => { await listAllPosts(args) } else if (args.subcommand === 'leaveComment') { await leaveComment(args) - } else if (args.subcommand === 'attest') { - await attest(args) } else if (args.subcommand === 'vote') { await vote(args) } else if (args.subcommand === 'epochTransition') { diff --git a/cli/leaveComment.ts b/cli/leaveComment.ts index 50d7a4d..638e90a 100644 --- a/cli/leaveComment.ts +++ b/cli/leaveComment.ts @@ -2,7 +2,6 @@ import base64url from 'base64url' import { ethers as hardhatEthers } from 'hardhat' import { ethers } from 'ethers' import { genIdentityCommitment, unSerialiseIdentity } from 'libsemaphore' -import mongoose from 'mongoose' import { promptPwd, @@ -13,7 +12,6 @@ import { } from './utils' import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' -import { dbUri } from '../config/database'; import { add0x } from '../crypto/SMT' import { genUserStateFromContract } from '../core' @@ -22,12 +20,10 @@ import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import { reputationProofPrefix, identityPrefix } from './prefix' import Comment, { IComment } from "../database/models/comment"; -import Post from "../database/models/post"; import { DEFAULT_COMMENT_KARMA, MAX_KARMA_BUDGET } from '../config/socialMedia' import { formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyProveReputationProof } from '../circuits/utils' import { stringifyBigInts } from 'maci-crypto' import { genEpochKey } from '../core/utils' -import { genProveReputationCircuitInputsFromDB } from '../database/utils' const configureSubparser = (subparsers: any) => { const parser = subparsers.addParser( @@ -106,14 +102,6 @@ const configureSubparser = (subparsers: any) => { } ) - parser.addArgument( - ['-db', '--from-database'], - { - action: 'storeTrue', - help: 'Indicate if to generate proving circuit from database', - } - ) - const privkeyGroup = parser.addMutuallyExclusiveGroup({ required: true }) privkeyGroup.addArgument( @@ -204,42 +192,21 @@ const leaveComment = async (args: any) => { const nonceStarter: number = args.karma_nonce const minRep = args.min_rep != null ? args.min_rep : 0 - let circuitInputs: any - - if (args.from_database){ - - console.log('generating proving circuit from database...') - - // Gen epoch key proof and reputation proof from database - circuitInputs = await genProveReputationCircuitInputsFromDB( - currentEpoch, - id, - epkNonce, // generate epoch key from epoch nonce - proveKarmaAmount, // the amount of output karma nullifiers - nonceStarter, // nonce to generate karma nullifiers - minRep // the amount of minimum reputation the user wants to prove - ) - - } else { - - console.log('generating proving circuit from contract...') - - // Gen epoch key proof and reputation proof from Unirep contract - const userState = await genUserStateFromContract( - provider, - unirepAddress, - startBlock, - id, - commitment, - ) - - circuitInputs = await userState.genProveReputationCircuitInputs( - epkNonce, // generate epoch key from epoch nonce - proveKarmaAmount, // the amount of output karma nullifiers - nonceStarter, // nonce to generate karma nullifiers - minRep // the amount of minimum reputation the user wants to prove - ) - } + // Gen epoch key proof and reputation proof from Unirep contract + const userState = await genUserStateFromContract( + provider, + unirepAddress, + startBlock, + id, + commitment, + ) + + const circuitInputs = await userState.genProveReputationCircuitInputs( + epkNonce, // generate epoch key from epoch nonce + proveKarmaAmount, // the amount of output karma nullifiers + nonceStarter, // nonce to generate karma nullifiers + minRep // the amount of minimum reputation the user wants to prove + ) const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) const nullifiers: BigInt[] = [] @@ -266,6 +233,7 @@ const leaveComment = async (args: any) => { console.log(`Prove minimum reputation: ${minRep}`) } + // generate comment id from mongoose schema const newComment: IComment = new Comment({ content: args.text, // TODO: hashedContent @@ -289,20 +257,6 @@ const leaveComment = async (args: any) => { nullifiers, { value: attestingFee, gasLimit: 1000000 } ) - if(args.from_database){ - const db = await mongoose.connect( - dbUri, - { useNewUrlParser: true, - useFindAndModify: false, - useUnifiedTopology: true - } - ) - const commentRes = await Post.findByIdAndUpdate( - {_id: mongoose.Types.ObjectId(args.post_id) }, - { $push: {comments: newComment }} - ) - db.disconnect(); - } } catch(e) { console.error('Error: the transaction failed') if (e.message) { @@ -312,7 +266,6 @@ const leaveComment = async (args: any) => { return } - const receipt = await tx.wait() console.log('Transaction hash:', tx.hash) console.log(`Epoch key of epoch ${currentEpoch} and nonce ${epkNonce}: ${epk}`) console.log(reputationProofPrefix + encodedProof) diff --git a/cli/publishPost.ts b/cli/publishPost.ts index a04f59a..3b564d6 100644 --- a/cli/publishPost.ts +++ b/cli/publishPost.ts @@ -3,7 +3,6 @@ import { ethers as hardhatEthers } from 'hardhat' import { ethers } from 'ethers' import { genIdentityCommitment, unSerialiseIdentity } from 'libsemaphore' import { stringifyBigInts } from 'maci-crypto' -import mongoose from 'mongoose' import { promptPwd, @@ -14,7 +13,6 @@ import { } from './utils' import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' -import { dbUri } from '../config/database'; import { add0x } from '../crypto/SMT' import { genUserStateFromContract } from '../core' @@ -26,7 +24,6 @@ import Post, { IPost } from "../database/models/post"; import { DEFAULT_POST_KARMA, MAX_KARMA_BUDGET } from '../config/socialMedia' import { formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyProveReputationProof } from '../circuits/utils' import { genEpochKey } from '../core/utils' -import { genProveReputationCircuitInputsFromDB } from '../database/utils' const configureSubparser = (subparsers: any) => { const parser = subparsers.addParser( @@ -96,14 +93,6 @@ const configureSubparser = (subparsers: any) => { } ) - parser.addArgument( - ['-db', '--from-database'], - { - action: 'storeTrue', - help: 'Indicate if to generate proving circuit from database', - } - ) - const privkeyGroup = parser.addMutuallyExclusiveGroup({ required: true }) privkeyGroup.addArgument( @@ -193,42 +182,21 @@ const publishPost = async (args: any) => { const nonceStarter: number = args.karma_nonce const minRep = args.min_rep != null ? args.min_rep : 0 - let circuitInputs: any - - if(args.from_database){ - - console.log('generating proving circuit from database...') - - // Gen epoch key proof and reputation proof from database - circuitInputs = await genProveReputationCircuitInputsFromDB( - currentEpoch, - id, - epkNonce, // generate epoch key from epoch nonce - proveKarmaAmount, // the amount of output karma nullifiers - nonceStarter, // nonce to generate karma nullifiers - minRep // the amount of minimum reputation the user wants to prove - ) - - } else { - - console.log('generating proving circuit from contract...') - - // Gen epoch key proof and reputation proof from Unirep contract - const userState = await genUserStateFromContract( - provider, - unirepAddress, - startBlock, - id, - commitment, - ) - - circuitInputs = await userState.genProveReputationCircuitInputs( - epkNonce, // generate epoch key from epoch nonce - proveKarmaAmount, // the amount of output karma nullifiers - nonceStarter, // nonce to generate karma nullifiers - minRep // the amount of minimum reputation the user wants to prove - ) - } + // Gen epoch key proof and reputation proof from Unirep contract + const userState = await genUserStateFromContract( + provider, + unirepAddress, + startBlock, + id, + commitment, + ) + + const circuitInputs = await userState.genProveReputationCircuitInputs( + epkNonce, // generate epoch key from epoch nonce + proveKarmaAmount, // the amount of output karma nullifiers + nonceStarter, // nonce to generate karma nullifiers + minRep // the amount of minimum reputation the user wants to prove + ) const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) const nullifiers: BigInt[] = [] @@ -255,6 +223,7 @@ const publishPost = async (args: any) => { console.log(`Prove minimum reputation: ${minRep}`) } + // generate post id from mongoose schema const newpost: IPost = new Post({ content: args.text, // TODO: hashedContent @@ -277,17 +246,6 @@ const publishPost = async (args: any) => { nullifiers, { value: attestingFee, gasLimit: 1000000 } ) - if (args.from_database){ - const db = await mongoose.connect( - dbUri, - { useNewUrlParser: true, - useFindAndModify: false, - useUnifiedTopology: true - } - ) - const res: IPost = await newpost.save() - db.disconnect(); - } } catch(e) { console.error('Error: the transaction failed') if (e.message) { diff --git a/cli/test/testAllCommands.ts b/cli/test/testAllCommands.ts index d14f1fd..8631c33 100644 --- a/cli/test/testAllCommands.ts +++ b/cli/test/testAllCommands.ts @@ -35,8 +35,6 @@ describe('test all CLI subcommands', function() { const epochLength = 5 let unirepContract: ethers.Contract let unirepState: UnirepState - const dbOption = `` - // const dbOption = ` -db` let userIdentity1, userIdentityCommitment1, userIdentity2, userIdentityCommitment2 const attesterId = 1 @@ -249,8 +247,7 @@ describe('test all CLI subcommands', function() { ` -d ${userPrivKey}` + ` -id ${userIdentity1}` + ` -n ${epochKeyNonce}` + - ` -kn ${postNonce}` + - dbOption + ` -kn ${postNonce}` const output = exec(command).stdout.trim() @@ -317,8 +314,7 @@ describe('test all CLI subcommands', function() { ` -id ${userIdentity1}` + ` -n ${epochKeyNonce2}` + ` -kn ${commentNonce}` + - ` -mr ${minRepDiff}` + - dbOption + ` -mr ${minRepDiff}` const output = exec(command).stdout.trim() @@ -341,8 +337,7 @@ describe('test all CLI subcommands', function() { ` -n ${epochKeyNonce}` + ` -kn ${attestNonce}` + ` -uv ${posRep} ` + - ` -gf ${graffiti.toString(16)} ` + - dbOption + ` -gf ${graffiti.toString(16)} ` const output = exec(command).stdout.trim() @@ -403,8 +398,7 @@ describe('test all CLI subcommands', function() { const command = `npx ts-node cli/index.ts userStateTransition` + ` -x ${unirepContract.address} ` + ` -d ${userPrivKey} ` + - ` -id ${userIdentity1} ` + - dbOption + ` -id ${userIdentity1} ` const output = exec(command).stdout.trim() @@ -419,8 +413,7 @@ describe('test all CLI subcommands', function() { const command = `npx ts-node cli/index.ts userStateTransition` + ` -x ${unirepContract.address} ` + ` -d ${userPrivKey} ` + - ` -id ${userIdentity2} ` + - dbOption + ` -id ${userIdentity2} ` const output = exec(command).stdout.trim() @@ -441,8 +434,7 @@ describe('test all CLI subcommands', function() { // ` -mp ${minPosRep} ` + ` -mn ${maxNegRep} ` + // ` -md ${minRepDiff}` + - ` -gp ${graffitiPreimage} ` + - dbOption + ` -gp ${graffitiPreimage} ` const output = exec(command).stdout.trim() diff --git a/cli/userStateTransition.ts b/cli/userStateTransition.ts index c320ddd..eb61c7a 100644 --- a/cli/userStateTransition.ts +++ b/cli/userStateTransition.ts @@ -18,7 +18,6 @@ import { genUserStateFromContract } from '../core' import { formatProofForVerifierContract, genVerifyUserStateTransitionProofAndPublicSignals, getSignalByNameViaSym, verifyUserStateTransitionProof } from '../circuits/utils' import { stringifyBigInts } from 'maci-crypto' import { identityPrefix } from './prefix' -import { genUserStateTransitionCircuitInputsFromDB } from '../database/utils' const configureSubparser = (subparsers: any) => { const parser = subparsers.addParser( @@ -62,14 +61,6 @@ const configureSubparser = (subparsers: any) => { } ) - parser.addArgument( - ['-db', '--from-database'], - { - action: 'storeTrue', - help: 'Indicate if to generate proving circuit from database', - } - ) - const privkeyGroup = parser.addMutuallyExclusiveGroup({ required: true }) privkeyGroup.addArgument( @@ -154,22 +145,8 @@ const userStateTransition = async (args: any) => { commitment, ) - let circuitInputs: any - - if(args.from_database){ - console.log('generating proving circuit from database...') + const circuitInputs = await userState.genUserStateTransitionCircuitInputs() - circuitInputs = await genUserStateTransitionCircuitInputsFromDB( - currentEpoch, - id - ) - } else { - - console.log('generating proving circuit from contract...') - - circuitInputs = await userState.genUserStateTransitionCircuitInputs() - - } const results = await genVerifyUserStateTransitionProofAndPublicSignals(stringifyBigInts(circuitInputs)) const newGSTLeaf = getSignalByNameViaSym('userStateTransition', results['witness'], 'main.new_GST_leaf') const newState = await userState.genNewUserStateAfterTransition() diff --git a/cli/vote.ts b/cli/vote.ts index 0a214b2..becdf2f 100644 --- a/cli/vote.ts +++ b/cli/vote.ts @@ -23,7 +23,6 @@ import { Attestation } from '../core' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import { reputationProofPrefix, identityPrefix } from './prefix' -import { genProveReputationCircuitInputsFromDB } from '../database/utils' import { MAX_KARMA_BUDGET } from '../config/socialMedia' const configureSubparser = (subparsers: any) => { @@ -119,14 +118,6 @@ const configureSubparser = (subparsers: any) => { } ) - parser.addArgument( - ['-db', '--from-database'], - { - action: 'storeTrue', - help: 'Indicate if to generate proving circuit from database', - } - ) - const privkeyGroup = parser.addMutuallyExclusiveGroup({ required: true }) privkeyGroup.addArgument( @@ -241,43 +232,22 @@ const vote = async (args: any) => { const proveKarmaAmount = voteValue const nonceStarter: number = args.karma_nonce const minRep = args.min_rep != null ? args.min_rep : 0 - - let circuitInputs: any - - if(args.from_database){ - - console.log('generating proving circuit from database...') - - // Gen epoch key proof and reputation proof from database - circuitInputs = await genProveReputationCircuitInputsFromDB( - currentEpoch, - id, - epkNonce, // generate epoch key from epoch nonce - proveKarmaAmount, // the amount of output karma nullifiers - nonceStarter, // nonce to generate karma nullifiers - minRep // the amount of minimum reputation the user wants to prove - ) - } else { - - console.log('generating proving circuit from contract...') - - // Gen epoch key proof and reputation proof from Unirep contract - const userState = await genUserStateFromContract( - provider, - unirepAddress, - startBlock, - id, - commitment, - ) + // Gen epoch key proof and reputation proof from Unirep contract + const userState = await genUserStateFromContract( + provider, + unirepAddress, + startBlock, + id, + commitment, + ) - circuitInputs = await userState.genProveReputationCircuitInputs( - epkNonce, // generate epoch key from epoch nonce - proveKarmaAmount, // the amount of output karma nullifiers - nonceStarter, // nonce to generate karma nullifiers - minRep // the amount of minimum reputation the user wants to prove - ) - } + const circuitInputs = await userState.genProveReputationCircuitInputs( + epkNonce, // generate epoch key from epoch nonce + proveKarmaAmount, // the amount of output karma nullifiers + nonceStarter, // nonce to generate karma nullifiers + minRep // the amount of minimum reputation the user wants to prove + ) const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) const nullifiers: BigInt[] = [] diff --git a/config/database.ts b/config/database.ts deleted file mode 100644 index 4c4469b..0000000 --- a/config/database.ts +++ /dev/null @@ -1,5 +0,0 @@ -const dbUri = 'mongodb://127.0.0.1:27017/test' - -export { - dbUri -} \ No newline at end of file diff --git a/database/utils.ts b/database/utils.ts deleted file mode 100644 index 7cbbbcc..0000000 --- a/database/utils.ts +++ /dev/null @@ -1,1120 +0,0 @@ -import { ethers } from 'ethers' -import mongoose from 'mongoose' -import { genIdentityCommitment, unSerialiseIdentity } from 'libsemaphore' -import { attestingFee, circuitEpochTreeDepth, circuitGlobalStateTreeDepth, circuitNullifierTreeDepth, circuitUserStateTreeDepth, epochLength, numEpochKeyNoncePerEpoch, numAttestationsPerEpochKey} from '../config/testLocal' - -import { UnirepState } from '../core/UnirepState' -import { IUserStateLeaf, UserState } from '../core/UserState' - -import Settings, { ISettings } from './models/settings' -import UserSignUp, { IUserSignUp } from './models/userSignUp' -import Attestations, { IAttestation, IAttestations } from './models/attestation' -import Comment, { IComment } from "../database/models/comment"; -import Post, { IPost } from "../database/models/post"; -import ReputationNullifier, { IReputationNullifier } from "../database/models/reputationNullifier"; -import UserTransitionedState, { IUserTransitionedState } from "../database/models/userTransitionedState"; -import GSTLeaves, { IGSTLeaf, IGSTLeaves } from '../database/models/GSTLeaf' -import EpochTreeLeaves, { IEpochTreeLeaf, IEpochTreeLeaves } from '../database/models/epochTreeLeaf' -import NullifierTreeLeaves, { INullifierTreeLeaves } from '../database/models/nullifierTreeLeaf' - -import { hash5, hashLeftRight, IncrementalQuinTree, stringifyBigInts } from 'maci-crypto' -import { computeEmptyUserStateRoot, defaultUserStateLeaf, genAttestationNullifier, genEpochKey, genEpochKeyNullifier, genNewSMT, SMT_ONE_LEAF, SMT_ZERO_LEAF } from '../test/utils' - -import { assert } from 'console' -import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" -import { add0x, SparseMerkleTreeImpl } from '../crypto/SMT' -import { DEFAULT_AIRDROPPED_KARMA, MAX_KARMA_BUDGET } from '../config/socialMedia' -import { dbUri } from '../config/database' - -enum action { - UpVote = 0, - DownVote = 1, - Post = 2, - Comment = 3 -} - -export interface IUserTransitionState { - transitionedGSTLeafIndex: number - fromEpoch: number - toEpoch: number - userStateTree: SparseMerkleTreeImpl - attestations: IAttestation[] - transitionedPosRep: BigInt - transitionedNegRep: BigInt - GSTLeaf: string -} - -/* -* Connect to db uri -* @param dbUri mongoose database uri -*/ -const connectDB = async(dbUri: string): Promise => { - - const db = await mongoose.connect( - dbUri, - { useNewUrlParser: true, - useFindAndModify: false, - useUnifiedTopology: true - } - ) - - return db -} - -/* -* Initialize the database by dropping the existing database -* returns true if it is successfully deleted -* @param db mongoose type database object -*/ -const initDB = async(db: typeof mongoose)=> { - - const deletedDb = await db.connection.db.dropDatabase() - - return deletedDb -} - -/* -* Disconnect to db uri -* @param db mongoose type database object -*/ -const disconnectDB = (db: typeof mongoose): void => { - - db.disconnect() - - return -} - - -const saveSettingsFromContract = async (unirepContract: ethers.Contract): Promise => { - - let settings - const existedSettings = await Settings.findOne() - if(existedSettings === null){ - - const treeDepths_ = await unirepContract.treeDepths() - const globalStateTreeDepth = treeDepths_.globalStateTreeDepth - const userStateTreeDepth = treeDepths_.userStateTreeDepth - const epochTreeDepth = treeDepths_.epochTreeDepth - const nullifierTreeDepth = treeDepths_.nullifierTreeDepth - const attestingFee = await unirepContract.attestingFee() - const epochLength = await unirepContract.epochLength() - const numEpochKeyNoncePerEpoch = await unirepContract.numEpochKeyNoncePerEpoch() - - const emptyUserStateRoot = computeEmptyUserStateRoot(ethers.BigNumber.from(userStateTreeDepth).toNumber()) - settings = new Settings({ - globalStateTreeDepth: ethers.BigNumber.from(globalStateTreeDepth).toNumber(), - userStateTreeDepth: ethers.BigNumber.from(userStateTreeDepth).toNumber(), - epochTreeDepth: ethers.BigNumber.from(epochTreeDepth).toNumber(), - nullifierTreeDepth: ethers.BigNumber.from(nullifierTreeDepth).toNumber(), - attestingFee: attestingFee, - epochLength: ethers.BigNumber.from(epochLength).toNumber(), - numEpochKeyNoncePerEpoch: ethers.BigNumber.from(numEpochKeyNoncePerEpoch).toNumber(), - numAttestationsPerEpochKey: numAttestationsPerEpochKey, - defaultGSTLeaf: hashLeftRight( - BigInt(0), // zero identityCommitment - emptyUserStateRoot, // zero user state root - ) - }) - } - - return existedSettings? existedSettings : settings.save() -} - -/* -* Computes the global state tree of given epoch -* @param epoch current epoch -*/ -const genGSTreeFromDB = async (epoch: number): Promise => { - - const _settings = await Settings.findOne() - const treeLeaves = await GSTLeaves?.findOne({epoch: epoch}) - if (!_settings) { - throw new Error('Error: should save settings first') - } - - const globalStateTreeDepth = _settings.globalStateTreeDepth - const userStateTreeDepth = _settings.userStateTreeDepth - const emptyUserStateRoot = computeEmptyUserStateRoot(userStateTreeDepth) - const defaultGSTLeaf = hash5([ - BigInt(0), // zero identityCommitment - emptyUserStateRoot, // zero user state root - BigInt(DEFAULT_AIRDROPPED_KARMA), // default airdropped karma - BigInt(0), // default negative karma - BigInt(0) - ]) - - const GSTree = new IncrementalQuinTree( - globalStateTreeDepth, - defaultGSTLeaf, - 2, - ) - - const GSTLeavesToEpoch = treeLeaves?.get('GSTLeaves') - let leaves: BigInt[] = [] - for (let i = 0; i < GSTLeavesToEpoch.length; i++) { - leaves.push(BigInt(GSTLeavesToEpoch[i]?.hashedLeaf)) - } - - for(const leaf of leaves){ - GSTree.insert(leaf) - } - - return GSTree -} - -/* -* Computes the epoch tree of given epoch -* @param epoch current epoch -*/ -const genEpochTreeFromDB = async (epoch: number): Promise => { - - const _settings = await Settings.findOne() - const treeLeaves = await EpochTreeLeaves?.findOne({epoch: epoch}) - if (!_settings) { - throw new Error('Error: should save settings first') - } - - const epochTreeDepth = _settings.epochTreeDepth - - const epochTree = await genNewSMT(epochTreeDepth, SMT_ONE_LEAF) - const leaves = treeLeaves?.epochTreeLeaves? treeLeaves?.epochTreeLeaves : [] - for (const leaf of leaves) { - const decEpochKey = BigInt(BigInt(add0x(leaf.epochKey)).toString()) - await epochTree.update(decEpochKey, BigInt(leaf.hashchainResult)) - } - - return epochTree -} - -/* -* Computes the nullifier tree of given epoch -*/ -const genNullifierTreeFromDB = async (): Promise => { - - const _settings = await Settings.findOne() - const treeLeaves = await NullifierTreeLeaves?.find() - if (!_settings) { - throw new Error('Error: should save settings first') - } - - const nullifierTree = await genNewSMT(_settings.nullifierTreeDepth, SMT_ZERO_LEAF) - await nullifierTree.update(BigInt(0), SMT_ONE_LEAF) - - if (treeLeaves.length == 0) return nullifierTree - else{ - for (const leaf of treeLeaves) { - await nullifierTree.update(BigInt(leaf.nullifier), SMT_ONE_LEAF) - } - return nullifierTree - } -} - -/* -* Get the attestations of given epoch key -* @param epochKey given epoch key -*/ -const getAttestationsFromDB = async (epochKey: string): Promise => { - const attestationsToEpochKey = await Attestations.findOne({epochKey: epochKey}) - if ( attestationsToEpochKey ){ - return attestationsToEpochKey?.attestations - } - else { - return [] - } - -} - -/* -* Get the nullifier of the attestations of given epoch -* @param epoch given epoch -* @param id user's identity -*/ -const getAttestationNullifiersFromDB = async (epoch: number, id: any): Promise => { - - const _settings = await Settings.findOne() - if (!_settings) { - throw new Error('Error: should save settings first') - } - - const epochTreeDepth = _settings.epochTreeDepth - const numEpochKeyNoncePerEpoch = _settings.numEpochKeyNoncePerEpoch - - const nullifiers: BigInt[] = [] - for (let nonce = 0; nonce < numEpochKeyNoncePerEpoch; nonce++) { - const epochKey = genEpochKey(id.identityNullifier, epoch, nonce, epochTreeDepth) - const attestations = await getAttestationsFromDB(epochKey.toString(16)) - if(!attestations) return nullifiers - for (const attestation of attestations) { - nullifiers.push( - genAttestationNullifier(id.identityNullifier, BigInt(attestation.attesterId), epoch, epochKey, _settings.nullifierTreeDepth) - ) - } - for (let i = 0; i < (numAttestationsPerEpochKey - attestations.length); i++) { - nullifiers.push(BigInt(0)) - } - } - - return nullifiers -} - -/* -* Assert user has signed up and find the epoch where user signed up -* finding user's signed up leaf event in db -* @param id user's identity -*/ -const findUserSignedUpEpochFromDB = async (id: any): Promise => { - - const _settings = await Settings.findOne() - if (!_settings) { - throw new Error('Error: should save settings first') - } - - const emptyUserStateRoot = computeEmptyUserStateRoot(_settings.userStateTreeDepth) - const userDefaultGSTLeaf = hash5([ - genIdentityCommitment(id), - emptyUserStateRoot, - BigInt(DEFAULT_AIRDROPPED_KARMA), - BigInt(0), - BigInt(0) - ]).toString(16) - const result = await UserSignUp.findOne({hashedLeaf: add0x(userDefaultGSTLeaf)}) - return result -} - -const nullifierExist = async (nullifier: string): Promise => { - const leaf = await NullifierTreeLeaves.findOne({nullifier: nullifier}) - if (leaf) return true - else return false -} - - -/* -* get GST leaf index of given epoch -* @param epoch find GST leaf in the epoch -* @param hasedLeaf find the hash of GST leaf -*/ -const getGSTLeafIndex = async (epoch: number, hashedLeaf: string): Promise => { - - const leaves = await GSTLeaves.findOne({epoch: epoch}) - if(leaves){ - for(const leaf of leaves.get('GSTLeaves')){ - if (leaf.hashedLeaf == hashedLeaf){ - return leaves?.GSTLeaves?.indexOf(leaf) - } - } - } - - return -1 -} - -/* -* generate user state tree from given reputations -* @param reputations reputations received by user in current epoch -*/ -const genUserStateTreeFromDB = async( - reputations: IAttestation[] - -): Promise => { - - const settings = await Settings.findOne() - if (!settings) { - throw new Error('Error: should save settings first') - } - - const USTree = await genNewSMT(settings.userStateTreeDepth, defaultUserStateLeaf) - - for (const reputation of reputations) { - const hashedReputation = hash5([ - BigInt(reputation.posRep), - BigInt(reputation.negRep), - BigInt(reputation.graffiti), - BigInt(0), - BigInt(0) - ]) - await USTree.update(BigInt(reputation.attesterId), hashedReputation) - } - - return USTree -} - -const getRepByAttester = async ( - reputations: IAttestation[], - attesterId: string, -) => { - const leaf = reputations.find((leaf) => BigInt(leaf.attesterId) == BigInt(attesterId)) - if(leaf !== undefined) return leaf - else { - const defaultAttestation: IAttestation = { - transactionHash: "0", - epoch: 0, - attester: "0", - attesterId: "0", - posRep: "0", - negRep: "0", - graffiti: "0", - overwriteGraffiti: false - } - return defaultAttestation - } -} - - -/* -* Retrives the updated UserState from the database -* @param currentEpoch current epoch -* @param userIdentity user's semaphore identity -*/ -const genCurrentUserStateFromDB = async ( - currentEpoch: number, - id: any, - ) => { - const settings = await Settings.findOne() - if (!settings) { - throw new Error('Error: should save settings first') - } - - const idCommitment = genIdentityCommitment(id) - const globalStateTreeDepth = settings.globalStateTreeDepth - const userStateTreeDepth = settings.userStateTreeDepth - const epochTreeDepth = settings.epochTreeDepth - const nullifierTreeDepth = settings.nullifierTreeDepth - const attestingFee = settings.attestingFee - const epochLength = settings.epochLength - const numEpochKeyNoncePerEpoch = settings.numEpochKeyNoncePerEpoch - const numAttestationsPerEpochKey = settings.numAttestationsPerEpochKey - - const userHasSignedUp = await findUserSignedUpEpochFromDB(id) - assert(userHasSignedUp, "User has not signed up yet") - if(!userHasSignedUp){ - return - } - - // start user state - let transitionedFromEpoch = userHasSignedUp?.epoch ? userHasSignedUp?.epoch : 0 - let startEpoch = transitionedFromEpoch - let transitionedPosRep = DEFAULT_AIRDROPPED_KARMA - let transitionedNegRep = 0 - let userStates: {[key: number]: IUserTransitionState} = {} - let GSTLeaf = userHasSignedUp?.hashedLeaf - let userStateTree: SparseMerkleTreeImpl = await genUserStateTreeFromDB([]) - let attestations: IAttestation[] = [] - let transitionedGSTLeaf = await getGSTLeafIndex(startEpoch, GSTLeaf) - - // find all reputation received by the user - for (let e = startEpoch; e <= currentEpoch; e++) { - - // find if user has transitioned - if (e !== startEpoch) { - transitionedGSTLeaf = await getGSTLeafIndex(e, GSTLeaf) - } - - // user transitioned state - const newState: IUserTransitionState = { - transitionedGSTLeafIndex: transitionedGSTLeaf, - fromEpoch: transitionedFromEpoch, - toEpoch: e, - userStateTree: userStateTree, - attestations: attestations, - transitionedPosRep: BigInt(transitionedPosRep), - transitionedNegRep: BigInt(transitionedNegRep), - GSTLeaf: GSTLeaf - } - userStates[e] = newState - - // get all attestations from epoch key generated in the given epoch e - attestations = [] - for (let nonce = 0; nonce < numEpochKeyNoncePerEpoch; nonce++) { - const epochKey = genEpochKey(id.identityNullifier, e, nonce, epochTreeDepth) - const attestationToEpk = await Attestations.findOne({epochKey: epochKey.toString(16)}) - attestationToEpk?.attestations?.map((a) => {attestations.push(a)}) - } - userStateTree = await genUserStateTreeFromDB(attestations) - - // compute user state transition result - transitionedFromEpoch = e - for (const attestation of attestations) { - transitionedPosRep += Number(attestation.posRep) - transitionedNegRep += Number(attestation.negRep) - } - transitionedPosRep += DEFAULT_AIRDROPPED_KARMA - GSTLeaf = add0x(hash5([ - idCommitment, - userStateTree.getRootHash(), - BigInt(transitionedPosRep), - BigInt(transitionedNegRep), - BigInt(0) - ]).toString(16)) - } - - return userStates - -} - -const genProveReputationCircuitInputsFromDB = async ( - epoch: number, - id: any, - epochKeyNonce: number, - proveKarmaAmount: number, - nonceStarter: number, - minRep: number, -) => { - const db = await mongoose.connect( - dbUri, - { useNewUrlParser: true, - useFindAndModify: false, - useUnifiedTopology: true - } - ) - const settings = await Settings.findOne() - if (!settings) { - throw new Error('Error: should save settings first') - } - - const epochTreeDepth = settings.epochTreeDepth - const nullifierTreeDepth = settings.nullifierTreeDepth - - const userState = await genCurrentUserStateFromDB(epoch, id) - if(!userState) return - const epochKey = genEpochKey(id.identityNullifier, epoch, epochKeyNonce, epochTreeDepth) - const nonce = 0 - const userStateTree = await userState[epoch].userStateTree - const GSTree = await genGSTreeFromDB(epoch) - const GSTLeafIndex = await getGSTLeafIndex(epoch, userState[epoch].GSTLeaf) - const GSTreeProof = GSTree.genMerklePath(GSTLeafIndex) - const GSTreeRoot = GSTree.root - const nullifierTree = await genNullifierTreeFromDB() - const nullifierTreeRoot = nullifierTree.getRootHash() - const epkNullifier = genEpochKeyNullifier(id.identityNullifier, epoch, nonce, nullifierTreeDepth) - const epkNullifierProof = await nullifierTree.getMerkleProof(epkNullifier) - const hashedLeaf = hash5([ - genIdentityCommitment(id), - userStateTree.getRootHash(), - BigInt(userState[epoch].transitionedPosRep), - BigInt(userState[epoch].transitionedNegRep), - BigInt(0) - ]) - const selectors: BigInt[] = [] - const nonceList: BigInt[] = [] - for (let i = 0; i < proveKarmaAmount; i++) { - nonceList.push( BigInt(nonceStarter + i) ) - selectors.push(BigInt(1)); - } - for (let i = proveKarmaAmount ; i < MAX_KARMA_BUDGET; i++) { - nonceList.push(BigInt(0)) - selectors.push(BigInt(0)) - } - - db.disconnect(); - - return stringifyBigInts({ - epoch: epoch, - nonce: nonce, - identity_pk: id.keypair.pubKey, - identity_nullifier: id.identityNullifier, - identity_trapdoor: id.identityTrapdoor, - user_tree_root: userStateTree.getRootHash(), - user_state_hash: hashedLeaf, - epoch_key_nonce: epochKeyNonce, - epoch_key: epochKey, - GST_path_index: GSTreeProof.indices, - GST_path_elements: GSTreeProof.pathElements, - GST_root: GSTreeRoot, - nullifier_tree_root: nullifierTreeRoot, - nullifier_path_elements: epkNullifierProof, - selectors: selectors, - positive_karma: userState[epoch].transitionedPosRep, - negative_karma: userState[epoch].transitionedNegRep, - prove_karma_nullifiers: BigInt(Boolean(proveKarmaAmount)), - prove_karma_amount: BigInt(proveKarmaAmount), - karma_nonce: nonceList, - prove_min_rep: BigInt(Boolean(minRep)), - min_rep: BigInt(minRep) - }) -} - -const genProveReputationFromAttesterCircuitInputsFromDB = async ( - epoch: number, - id: any, - attesterId: BigInt, - provePosRep: BigInt, - proveNegRep: BigInt, - proveRepDiff: BigInt, - proveGraffiti: BigInt, - minPosRep: BigInt, - maxNegRep: BigInt, - minRepDiff: BigInt, - graffitiPreImage: BigInt, -) => { - const db = await mongoose.connect( - dbUri, - { useNewUrlParser: true, - useFindAndModify: false, - useUnifiedTopology: true - } - ) - const settings = await Settings.findOne() - if (!settings) { - throw new Error('Error: should save settings first') - } - - const epochTreeDepth = settings.epochTreeDepth - const nullifierTreeDepth = settings.nullifierTreeDepth - const userStateTreeDepth = settings.userStateTreeDepth - - const userState = await genCurrentUserStateFromDB(epoch, id) - if(!userState) return - assert(attesterId > BigInt(0), `attesterId must be greater than zero`) - assert(attesterId < BigInt(2 ** userStateTreeDepth), `attesterId exceeds total number of attesters`) - - const latestGSTLeafIndex = userState[epoch].transitionedGSTLeafIndex - assert(latestGSTLeafIndex > 0, `user haven't transitioned from ${userState[epoch].fromEpoch} epoch`) - - const fromEpoch = userState[epoch].fromEpoch - const transitionedPosRep = userState[epoch].transitionedPosRep - const transitionedNegRep = userState[epoch].transitionedNegRep - const nonce = 0 - const rep = await getRepByAttester(userState[epoch].attestations, attesterId.toString()) - const posRep = rep.posRep - const negRep = rep.negRep - const graffiti = rep.graffiti - const userStateTree = await genUserStateTreeFromDB(userState[epoch].attestations) - const hashedLeaf = hash5([ - genIdentityCommitment(id), - userStateTree.getRootHash(), - BigInt(transitionedPosRep), - BigInt(transitionedNegRep), - BigInt(0) - ]) - const GSTree = await genGSTreeFromDB(epoch) - const GSTreeProof = GSTree.genMerklePath(latestGSTLeafIndex) - const GSTreeRoot = GSTree.root - const nullifierTree = await genNullifierTreeFromDB() - const nullifierTreeRoot = nullifierTree.getRootHash() - const epkNullifier = genEpochKeyNullifier(id.identityNullifier, epoch, nonce, nullifierTreeDepth) - const epkNullifierProof = await nullifierTree.getMerkleProof(epkNullifier) - const USTPathElements = await userStateTree.getMerkleProof(attesterId) - - db.disconnect(); - - return stringifyBigInts({ - epoch: epoch, - nonce: nonce, - identity_pk: id.keypair.pubKey, - identity_nullifier: id.identityNullifier, - identity_trapdoor: id.identityTrapdoor, - user_tree_root: userStateTree.getRootHash(), - user_state_hash: hashedLeaf, - GST_path_index: GSTreeProof.indices, - GST_path_elements: GSTreeProof.pathElements, - GST_root: GSTreeRoot, - nullifier_tree_root: nullifierTreeRoot, - nullifier_path_elements: epkNullifierProof, - attester_id: attesterId, - pos_rep: posRep, - neg_rep: negRep, - graffiti: graffiti, - UST_path_elements: USTPathElements, - positive_karma: BigInt(transitionedPosRep), - negative_karma: BigInt(transitionedNegRep), - prove_pos_rep: provePosRep, - prove_neg_rep: proveNegRep, - prove_rep_diff: proveRepDiff, - prove_graffiti: proveGraffiti, - min_rep_diff: minRepDiff, - min_pos_rep: minPosRep, - max_neg_rep: maxNegRep, - graffiti_pre_image: graffitiPreImage - }) - -} - -const genUserStateTransitionCircuitInputsFromDB = async ( - epoch: number, - id: any, -) => { - const db = await mongoose.connect( - dbUri, - { useNewUrlParser: true, - useFindAndModify: false, - useUnifiedTopology: true - } - ) - const settings = await Settings.findOne() - if (!settings) { - throw new Error('Error: should save settings first') - } - - const globalStateTreeDepth = settings.globalStateTreeDepth - const userStateTreeDepth = settings.userStateTreeDepth - const epochTreeDepth = settings.epochTreeDepth - const nullifierTreeDepth = settings.nullifierTreeDepth - const attestingFee = settings.attestingFee - const epochLength = settings.epochLength - const numEpochKeyNoncePerEpoch = settings.numEpochKeyNoncePerEpoch - const numAttestationsPerEpochKey = settings.numAttestationsPerEpochKey - const DefaultHashchainResult = SMT_ONE_LEAF - - const userState = await genCurrentUserStateFromDB(epoch, id) - if(!userState) return - - const fromEpoch = userState[epoch].fromEpoch - const fromEpochUserStateTree: SparseMerkleTreeImpl = userState[fromEpoch].userStateTree - const intermediateUserStateTreeRoots: BigInt[] = [ - fromEpochUserStateTree.getRootHash() - ] - - // GSTree - const userStateLeafPathElements: any[] = [] - const fromEpochGSTree: IncrementalQuinTree = await genGSTreeFromDB(fromEpoch) - const latestGSTLeafIndex = userState[fromEpoch].transitionedGSTLeafIndex - const GSTreeProof = fromEpochGSTree.genMerklePath(latestGSTLeafIndex) - const GSTreeRoot = fromEpochGSTree.root - - //EpochTree - const fromEpochTree = await genEpochTreeFromDB(fromEpoch) - const epochTreeRoot = fromEpochTree.getRootHash() - const epochKeyPathElements: any[] = [] - const hashChainResults: BigInt[] = [] - - // User state tree - const userStateTreeRoot = userState[fromEpoch].userStateTree.getRootHash() - const transitionedPosRep = userState[fromEpoch].transitionedPosRep - const transitionedNegRep = BigInt(userState[fromEpoch].transitionedNegRep) - - const hashedLeaf = hash5([ - genIdentityCommitment(id), - userStateTreeRoot, - transitionedPosRep, - transitionedNegRep, - BigInt(0) - ]) - - const selectors: number[] = [] - const attesterIds: BigInt[] = [] - const oldPosReps: BigInt[] = [], oldNegReps: BigInt[] = [], oldGraffities: BigInt[] = [] - const posReps: BigInt[] = [], negReps: BigInt[] = [], graffities: BigInt[] = [], overwriteGraffitis: any[] = [] - let newPosRep = Number(userState[fromEpoch].transitionedPosRep) + DEFAULT_AIRDROPPED_KARMA - let newNegRep = Number(userState[fromEpoch].transitionedNegRep) - - for (let nonce = 0; nonce < numEpochKeyNoncePerEpoch; nonce++) { - const epochKey = genEpochKey(id.identityNullifier, fromEpoch, nonce, epochTreeDepth) - - // Attestations - const attestations = await getAttestationsFromDB(epochKey.toString(16)) - for (let i = 0; i < attestations?.length; i++) { - const attestation = attestations[i] - const attesterId = attestation.attesterId - const oldAttestations = userState[fromEpoch].attestations - const rep = await getRepByAttester(oldAttestations, attesterId) - oldPosReps.push(BigInt(rep.posRep)) - oldNegReps.push(BigInt(rep.negRep)) - oldGraffities.push(BigInt(rep.graffiti)) - - // Add UST merkle proof to the list - const USTLeafPathElements = await fromEpochUserStateTree.getMerkleProof(BigInt(attesterId)) - userStateLeafPathElements.push(USTLeafPathElements) - - // TODO: update new Rep by adding - const newRep: IAttestation = { - transactionHash: "0", - epoch: 0, - attester: "0", - attesterId: "0", - posRep: attestation.posRep, - negRep: attestation.negRep, - graffiti: attestation.graffiti, - overwriteGraffiti: attestation.overwriteGraffiti - } - const newRepHash = hash5([ - BigInt(newRep.posRep), - BigInt(newRep.negRep), - BigInt(newRep.graffiti), - BigInt(0), - BigInt(0) - ]) - await fromEpochUserStateTree.update(BigInt(attesterId), newRepHash) - intermediateUserStateTreeRoots.push(fromEpochUserStateTree.getRootHash()) - - selectors.push(1) - attesterIds.push(BigInt(attesterId)) - posReps.push(BigInt(newRep.posRep)) - negReps.push(BigInt(newRep.negRep)) - graffities.push(BigInt(newRep.graffiti)) - overwriteGraffitis.push(attestation.overwriteGraffiti) - newPosRep += Number(newRep.posRep) - newNegRep += Number(newRep.negRep) - } - // Fill in blank data for non-exist attestation - for (let i = 0; i < (numAttestationsPerEpochKey - attestations?.length); i++) { - oldPosReps.push(BigInt(0)) - oldNegReps.push(BigInt(0)) - oldGraffities.push(BigInt(0)) - - const USTLeafZeroPathElements = await fromEpochUserStateTree.getMerkleProof(BigInt(0)) - userStateLeafPathElements.push(USTLeafZeroPathElements) - intermediateUserStateTreeRoots.push(fromEpochUserStateTree.getRootHash()) - - selectors.push(0) - attesterIds.push(BigInt(0)) - posReps.push(BigInt(0)) - negReps.push(BigInt(0)) - graffities.push(BigInt(0)) - overwriteGraffitis.push(false) - } - epochKeyPathElements.push(await fromEpochTree.getMerkleProof(epochKey)) - const epochTreeLeaves = await EpochTreeLeaves.findOne({epoch: fromEpoch}) - let hashChainResult = DefaultHashchainResult - if(epochTreeLeaves){ - for (const leaf of epochTreeLeaves?.epochTreeLeaves) { - if ( leaf.epochKey == epochKey.toString(16)){ - hashChainResult = BigInt(leaf.hashchainResult) - } - } - } - hashChainResults.push(hashChainResult) - } - - db.disconnect(); - - return stringifyBigInts({ - epoch: fromEpoch, - intermediate_user_state_tree_roots: intermediateUserStateTreeRoots, - old_pos_reps: oldPosReps, - old_neg_reps: oldNegReps, - old_graffities: oldGraffities, - UST_path_elements: userStateLeafPathElements, - identity_pk: id.keypair.pubKey, - identity_nullifier: id.identityNullifier, - identity_trapdoor: id.identityTrapdoor, - user_state_hash: hashedLeaf, - old_positive_karma: transitionedPosRep, - old_negative_karma: transitionedNegRep, - GST_path_elements: GSTreeProof.pathElements, - GST_path_index: GSTreeProof.indices, - GST_root: GSTreeRoot, - selectors: selectors, - attester_ids: attesterIds, - pos_reps: posReps, - neg_reps: negReps, - graffities: graffities, - overwrite_graffitis: overwriteGraffitis, - positive_karma: BigInt(newPosRep), - negative_karma: BigInt(newNegRep), - airdropped_karma: DEFAULT_AIRDROPPED_KARMA, - epk_path_elements: epochKeyPathElements, - hash_chain_results: hashChainResults, - epoch_tree_root: epochTreeRoot - }) -} - - -/* -* When a newGSTLeafInserted event comes -* update the database -* @param event newGSTLeafInserted event -*/ - -const updateDBFromNewGSTLeafInsertedEvent = async ( - event: ethers.Event, -) => { - const iface = new ethers.utils.Interface(Unirep.abi) - const decodedData = iface.decodeEventLog("NewGSTLeafInserted",event.data) - - const _transactionHash = event.transactionHash - const _epoch = Number(event?.topics[1]) - const _hashedLeaf = decodedData?._hashedLeaf._hex - - // save the new leaf - const newLeaf: IGSTLeaf = { - transactionHash: _transactionHash, - hashedLeaf: _hashedLeaf - } - - let treeLeaves: IGSTLeaves | null = await GSTLeaves.findOne({epoch: _epoch}) - - if(!treeLeaves){ - treeLeaves = new GSTLeaves({ - epoch: _epoch, - GSTLeaves: [newLeaf], - currentEpochGSTLeafIndexToInsert: 1 - }) - } else { - const nextIndex = treeLeaves.currentEpochGSTLeafIndexToInsert + 1 - treeLeaves.get('GSTLeaves').push(newLeaf) - treeLeaves.set('currentEpochGSTLeafIndexToInsert', nextIndex) - } - - const savedTreeLeavesRes = await treeLeaves?.save() - - // save new user - - const newUser: IUserSignUp = new UserSignUp({ - transactionHash: _transactionHash, - hashedLeaf: _hashedLeaf, - epoch: _epoch - }) - - const savedUserSignUpRes = await newUser.save() - - if( savedTreeLeavesRes && savedUserSignUpRes ){ - console.log('Database: saved user sign up event') - } -} - -/* -* When an AttestationSubmitted event comes -* update the database -* @param event AttestationSubmitted event -*/ -const updateDBFromAttestationEvent = async ( - event: ethers.Event, -) => { - const iface = new ethers.utils.Interface(Unirep.abi) - const _epoch = event.topics[1] - const _epochKey = BigInt(event.topics[2]).toString(16) - const _attester = event.topics[3] - const decodedData = iface.decodeEventLog("AttestationSubmitted",event.data) - - const newAttestation: IAttestation = { - transactionHash: event.transactionHash, - epoch: Number(_epoch), - attester: _attester, - attesterId: decodedData?.attestation?.attesterId?._hex, - posRep: decodedData?.attestation?.posRep?._hex, - negRep: decodedData?.attestation?.negRep?._hex, - graffiti: decodedData?.attestation?.graffiti?._hex, - overwriteGraffiti: decodedData?.attestation?.overwriteGraffiti, - } - - let attestations = await Attestations.findOne({epochKey: _epochKey}) - - if(!attestations){ - attestations = new Attestations({ - epochKey: _epochKey, - attestations: [newAttestation] - }) - } else { - attestations.get('attestations').push(newAttestation) - } - - const res = await attestations?.save() - if(res){ - console.log('Database: saved submitted attestation') - } -} - -/* -* When a PostSubmitted event comes -* update the database -* @param event PostSubmitted event -*/ -const updateDBFromPostSubmittedEvent = async ( - event: ethers.Event, -) => { - const postId = mongoose.Types.ObjectId(event.topics[2].slice(-24)) - - const newPost = await Post.findByIdAndUpdate( - postId, - {$set: { - status: 1, - transactionHash: event.transactionHash - }}, - ) - - if(newPost){ - console.log(`Database: updated ${postId} post`) - } -} - -/* -* When a CommentSubmitted event comes -* update the database -* @param event CommentSubmitted event -*/ -const updateDBFromCommentSubmittedEvent = async ( - event: ethers.Event, -) => { - const commentId = mongoose.Types.ObjectId(event.topics[2].slice(-24)) - - const res = await Post.findOneAndUpdate( - { "comments._id": commentId }, - {$set: { - "comments.$.status": 1, - "comments.$.transactionHash": event.transactionHash - }}, - ) - - if(res) { - console.log(`Database: updated ${commentId} comment`) - } -} - -/* -* When a ReputationNullifierSubmitted event comes -* update the database -* @param event ReputationNullifierSubmitted event -*/ -const updateDBFromReputationNullifierSubmittedEvent = async ( - event: ethers.Event, -) => { - const iface = new ethers.utils.Interface(Unirep.abi) - const decodedData = iface.decodeEventLog("ReputationNullifierSubmitted",event.data) - const default_nullifier = hash5([BigInt(0), BigInt(0), BigInt(0), BigInt(0), BigInt(0)]) - - for (let nullifier of decodedData.karmaNullifiers) { - if ( BigInt(nullifier) != default_nullifier ){ - const newReputationNullifier: IReputationNullifier = new ReputationNullifier({ - transactionHash: event.transactionHash, - action: action[decodedData.actionChoice], - nullifiers: nullifier.toString() - }) - - const res = await newReputationNullifier.save() - if(res) { - console.log('Database: saved reputation nullifiers') - } - } - } -} - -/* -* When an EpochEnded event comes -* update the database -* @param event EpochEnded event -* @param address The address of the Unirep contract -* @param provider An Ethereum provider -*/ -const updateDBFromEpochEndedEvent = async ( - event: ethers.Event, - unirepContract: ethers.Contract, -) => { - // update Unirep state - const epoch = Number(event?.topics[1]) - - // Get epoch tree leaves of the ending epoch - let [epochKeys_, epochKeyHashchains_] = await unirepContract.getEpochTreeLeaves(epoch) - epochKeys_ = epochKeys_.map((epk) => BigInt(epk).toString(16)) - epochKeyHashchains_ = epochKeyHashchains_.map((hc) => BigInt(hc).toString()) - - const epochTreeLeaves: IEpochTreeLeaf[] = [] - for (let i = 0; i < epochKeys_.length; i++) { - const epochTreeLeaf: IEpochTreeLeaf = { - epochKey: epochKeys_[i], - hashchainResult: epochKeyHashchains_[i] - } - epochTreeLeaves.push(epochTreeLeaf) - } - - const newEpochTreeLeaves = new EpochTreeLeaves({ - epoch: epoch, - epochTreeLeaves: epochTreeLeaves - }) - - const EpochEndedEventResult = await newEpochTreeLeaves?.save() - - if(EpochEndedEventResult) { - console.log('Database: saved epoch tree leaves and update current Epoch') - } -} - -/* -* When a UserstateTransitioned event comes -* update the database -* and insert a new leaf into GST -* @param event UserstateTransitioned event -*/ -const updateDBFromUserStateTransitionEvent = async ( - event: ethers.Event -) => { - const _settings = await Settings.findOne() - if (!_settings) { - throw new Error('Error: should save settings first') - } - const iface = new ethers.utils.Interface(Unirep.abi) - const _toEpoch = Number(event.topics[1]) - const decodedUserStateTransitionedData = iface.decodeEventLog("UserStateTransitioned",event.data) - const _transactionHash = event.transactionHash - const _hashedLeaf = decodedUserStateTransitionedData?.userTransitionedData?.newGlobalStateTreeLeaf._hex - - // save new user transitioned state - const newUserState: IUserTransitionedState = new UserTransitionedState({ - transactionHash: _transactionHash, - toEpoch: _toEpoch, - fromEpoch: decodedUserStateTransitionedData?.userTransitionedData?.fromEpoch._hex, - fromGlobalStateTree: decodedUserStateTransitionedData?.userTransitionedData?.fromGlobalStateTree._hex, - fromEpochTree: decodedUserStateTransitionedData?.userTransitionedData?.fromEpochTree._hex, - fromNullifierTreeRoot: decodedUserStateTransitionedData?.userTransitionedData?.fromNullifierTreeRoot._hex, - newGlobalStateTreeLeaf: _hashedLeaf, - proof: decodedUserStateTransitionedData?.userTransitionedData?.proof, - attestationNullifiers: decodedUserStateTransitionedData?.userTransitionedData?.attestationNullifiers, - epkNullifiers: decodedUserStateTransitionedData?.userTransitionedData?.epkNullifiers, - }) - - const UserStateTransitionedResult = await newUserState.save() - - // save the new leaf - const newLeaf: IGSTLeaf = { - transactionHash: _transactionHash, - hashedLeaf: _hashedLeaf - } - - let treeLeaves: IGSTLeaves | null = await GSTLeaves.findOne({epoch: _toEpoch}) - - if(!treeLeaves){ - treeLeaves = new GSTLeaves({ - epoch: _toEpoch, - GSTLeaves: [newLeaf], - currentEpochGSTLeafIndexToInsert: 1 - }) - } else { - const nextIndex = treeLeaves.currentEpochGSTLeafIndexToInsert + 1 - treeLeaves.get('GSTLeaves').push(newLeaf) - treeLeaves.set('currentEpochGSTLeafIndexToInsert', nextIndex) - } - - // save nullifiers - const attestationNullifiers = decodedUserStateTransitionedData?.userTransitionedData?.attestationNullifiers.map((n) => BigInt(n)) - const epkNullifiers = decodedUserStateTransitionedData?.userTransitionedData?.epkNullifiers.map((n) => BigInt(n)) - // Combine nullifiers and mod them - const allNullifiers = attestationNullifiers?.concat(epkNullifiers).map((nullifier) => BigInt(nullifier) % BigInt(2 ** _settings.nullifierTreeDepth)) - - for (let nullifier of allNullifiers) { - if (nullifier > BigInt(0)) { - assert(nullifier < BigInt(2 ** _settings.nullifierTreeDepth), `Nullifier(${nullifier}) larger than max leaf value(2**nullifierTreeDepth)`) - const findNullifier = await NullifierTreeLeaves.findOne({nullifier: nullifier}) - assert(!findNullifier, `Nullifier(${nullifier}) seen before`) - const nullifierLeaf = new NullifierTreeLeaves({ - epoch: _toEpoch, - nullifier: nullifier, - transactionHash: _transactionHash - }) - await nullifierLeaf.save() - } - } - - const NewLeafInsertedResult = await treeLeaves?.save() - - if(NewLeafInsertedResult && UserStateTransitionedResult){ - console.log('Database: saved user transitioned state and inserted a new GST leaf') - } - -} - - - -export { - connectDB, - initDB, - disconnectDB, - saveSettingsFromContract, - genProveReputationCircuitInputsFromDB, - genProveReputationFromAttesterCircuitInputsFromDB, - genUserStateTransitionCircuitInputsFromDB, - updateDBFromNewGSTLeafInsertedEvent, - updateDBFromAttestationEvent, - updateDBFromPostSubmittedEvent, - updateDBFromCommentSubmittedEvent, - updateDBFromReputationNullifierSubmittedEvent, - updateDBFromEpochEndedEvent, - updateDBFromUserStateTransitionEvent, -} \ No newline at end of file diff --git a/package.json b/package.json index 833fb30..9c4b593 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,6 @@ "main": "index.ts", "scripts": { "build": "npm run installZkutil && npm run buildVerifyEpochKeySnark && npm run buildUserStateTransitionSnark && npm run buildProveReputationSnark && npm run buildProveReputationFromAttesterSnark", - "start": "npx hardhat node & npx ts-node database/EventsListeners.ts", "installZkutil": "./scripts/installZkutil.sh", "buildVerifyEpochKeySnark": "./scripts/buildVerifyEpochKeySnark.sh", "buildUserStateTransitionSnark": "./scripts/buildUserStateTransitionSnark.sh", From 140fe7a47bcb804dddc3a751bc1a06efa32ba0c9 Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Fri, 21 May 2021 18:10:11 +0800 Subject: [PATCH 28/38] update README.MD --- README.MD | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.MD b/README.MD index 3e2178e..a40208b 100644 --- a/README.MD +++ b/README.MD @@ -16,8 +16,15 @@ npm run build ``` to build the circuits -## Test cli commands - +## Test +Test all cli commands ``` npm run test-cli -``` \ No newline at end of file +``` + +Integration test +``` +npm run test +``` + +To see how to use Unirep with [mongodb](https://www.mongodb.com/), refer to branch [database](https://github.com/vivianjeng/UniRep/tree/database) \ No newline at end of file From 6c3bb7253ee33fe08b196bf6e484a0c0b2e417d6 Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Tue, 25 May 2021 14:45:47 +0800 Subject: [PATCH 29/38] remove mongoose dependencies --- README.MD | 4 +- cli/leaveComment.ts | 20 +- cli/publishPost.ts | 22 +- database/models/GSTLeaf.ts | 21 -- database/models/attestation.ts | 26 --- database/models/comment.ts | 26 --- database/models/epochTreeLeaf.ts | 20 -- database/models/nullifierTreeLeaf.ts | 16 -- database/models/post.ts | 29 --- database/models/reputationNullifier.ts | 19 -- database/models/settings.ts | 32 --- database/models/userSignUp.ts | 17 -- database/models/userTransitionedState.ts | 31 --- package-lock.json | 284 ++--------------------- package.json | 1 - 15 files changed, 35 insertions(+), 533 deletions(-) delete mode 100644 database/models/GSTLeaf.ts delete mode 100644 database/models/attestation.ts delete mode 100644 database/models/comment.ts delete mode 100644 database/models/epochTreeLeaf.ts delete mode 100644 database/models/nullifierTreeLeaf.ts delete mode 100644 database/models/post.ts delete mode 100644 database/models/reputationNullifier.ts delete mode 100644 database/models/settings.ts delete mode 100644 database/models/userSignUp.ts delete mode 100644 database/models/userTransitionedState.ts diff --git a/README.MD b/README.MD index a40208b..1a95aef 100644 --- a/README.MD +++ b/README.MD @@ -25,6 +25,4 @@ npm run test-cli Integration test ``` npm run test -``` - -To see how to use Unirep with [mongodb](https://www.mongodb.com/), refer to branch [database](https://github.com/vivianjeng/UniRep/tree/database) \ No newline at end of file +``` \ No newline at end of file diff --git a/cli/leaveComment.ts b/cli/leaveComment.ts index 638e90a..47a1253 100644 --- a/cli/leaveComment.ts +++ b/cli/leaveComment.ts @@ -19,10 +19,9 @@ import { genUserStateFromContract } from '../core' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import { reputationProofPrefix, identityPrefix } from './prefix' -import Comment, { IComment } from "../database/models/comment"; import { DEFAULT_COMMENT_KARMA, MAX_KARMA_BUDGET } from '../config/socialMedia' import { formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyProveReputationProof } from '../circuits/utils' -import { stringifyBigInts } from 'maci-crypto' +import { genRandomSalt, stringifyBigInts } from 'maci-crypto' import { genEpochKey } from '../core/utils' const configureSubparser = (subparsers: any) => { @@ -233,23 +232,14 @@ const leaveComment = async (args: any) => { console.log(`Prove minimum reputation: ${minRep}`) } - // generate comment id from mongoose schema - const newComment: IComment = new Comment({ - content: args.text, - // TODO: hashedContent - epochKey: epk, - epkProof: base64url.encode(JSON.stringify(proof)), - proveMinRep: args.min_rep != null ? true : false, - minRep: Number(minRep), - comments: [], - status: 0 - }); + // generate a random comment ID + const commentId = genRandomSalt() let tx try { tx = await unirepContract.leaveComment( - BigInt(add0x(args.post_id)), - BigInt(add0x(newComment._id.toString())), + BigInt(args.post_id), + commentId, epochKey, args.text, publicSignals, diff --git a/cli/publishPost.ts b/cli/publishPost.ts index 3b564d6..fe64917 100644 --- a/cli/publishPost.ts +++ b/cli/publishPost.ts @@ -2,7 +2,7 @@ import base64url from 'base64url' import { ethers as hardhatEthers } from 'hardhat' import { ethers } from 'ethers' import { genIdentityCommitment, unSerialiseIdentity } from 'libsemaphore' -import { stringifyBigInts } from 'maci-crypto' +import { genRandomSalt, stringifyBigInts } from 'maci-crypto' import { promptPwd, @@ -20,7 +20,6 @@ import { genUserStateFromContract } from '../core' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import { identityPrefix, reputationProofPrefix } from './prefix' -import Post, { IPost } from "../database/models/post"; import { DEFAULT_POST_KARMA, MAX_KARMA_BUDGET } from '../config/socialMedia' import { formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyProveReputationProof } from '../circuits/utils' import { genEpochKey } from '../core/utils' @@ -222,23 +221,14 @@ const publishPost = async (args: any) => { if(args.min_rep != null){ console.log(`Prove minimum reputation: ${minRep}`) } - - // generate post id from mongoose schema - const newpost: IPost = new Post({ - content: args.text, - // TODO: hashedContent - epochKey: epk, - epkProof: base64url.encode(JSON.stringify(proof)), - proveMinRep: args.min_rep != null ? true : false, - minRep: Number(minRep), - comments: [], - status: 0 - }); + // generate a random post ID + const postId = genRandomSalt() + let tx try { tx = await unirepContract.publishPost( - BigInt(add0x(newpost._id.toString())), + postId, epochKey, args.text, publicSignals, @@ -254,7 +244,7 @@ const publishPost = async (args: any) => { return } - console.log('Post ID:', newpost._id.toString()) + console.log('Post ID:', postId.toString()) console.log('Transaction hash:', tx.hash) console.log(`Epoch key of epoch ${currentEpoch} and nonce ${epkNonce}: ${epk}`) console.log(reputationProofPrefix + encodedProof) diff --git a/database/models/GSTLeaf.ts b/database/models/GSTLeaf.ts deleted file mode 100644 index 6f8dfe0..0000000 --- a/database/models/GSTLeaf.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as mongoose from 'mongoose'; -import { Schema, Document } from 'mongoose'; - -export interface IGSTLeaf { - transactionHash: string - hashedLeaf: string -} - -export interface IGSTLeaves extends Document { - epoch: number - GSTLeaves: Array - currentEpochGSTLeafIndexToInsert: number -} - -const GSTLeavesSchema: Schema = new Schema({ - epoch: { type: Number }, - GSTLeaves: { type: Array }, - currentEpochGSTLeafIndexToInsert: { type: Number }, -}, { collection: 'GSTLeaves' }) - -export default mongoose.model('GSTLeaves', GSTLeavesSchema); \ No newline at end of file diff --git a/database/models/attestation.ts b/database/models/attestation.ts deleted file mode 100644 index 02474b3..0000000 --- a/database/models/attestation.ts +++ /dev/null @@ -1,26 +0,0 @@ -import * as mongoose from 'mongoose'; -import { Schema, Document } from 'mongoose'; - -export interface IAttestation { - transactionHash: string; - epoch: number - attester: string - attesterId: string - posRep: string - negRep: string - graffiti: string - overwriteGraffiti: boolean -} - -export interface IAttestations extends Document { - epochKey: string - attestations: Array -} - -const AttestationsSchema: Schema = new Schema({ - epochKey: { type: String }, - attestations: { type: Array }, -}, { collection: 'Attestations' }); - - -export default mongoose.model('Attestations', AttestationsSchema); \ No newline at end of file diff --git a/database/models/comment.ts b/database/models/comment.ts deleted file mode 100644 index dba4750..0000000 --- a/database/models/comment.ts +++ /dev/null @@ -1,26 +0,0 @@ -import * as mongoose from 'mongoose'; -import { Schema, Document } from 'mongoose'; - -export interface IComment extends Document { - transactionHash: string - content: string - hashedContent: string - epochKey: string - epkProof: string - proveMinRep: boolean - minRep: number - status: number // 0: pending, 1: on-chain, 2: disabled - } - - const CommentSchema: Schema = new Schema({ - transactionHash: { type: String }, - content: { type: String }, - hashedContent: {type: String}, - epochKey: { type: String, required: true }, - epkProof: { type: String, required: true }, - proveMinRep: { type: Boolean }, - minRep: { type: Number }, - status: { type: Number, required: true }, - }); - - export default mongoose.model('Comment', CommentSchema); \ No newline at end of file diff --git a/database/models/epochTreeLeaf.ts b/database/models/epochTreeLeaf.ts deleted file mode 100644 index fd6aeee..0000000 --- a/database/models/epochTreeLeaf.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { BigNumber } from 'ethers'; -import * as mongoose from 'mongoose'; -import { Schema, Document } from 'mongoose'; - -export interface IEpochTreeLeaf { - epochKey: string; - hashchainResult: string; -} - -export interface IEpochTreeLeaves extends Document { - epoch: number - epochTreeLeaves: Array -} - -const EpochGSTLeavesSchema: Schema = new Schema({ - epoch: { type: Number }, - epochTreeLeaves: { type: Array }, -}, { collection: 'EpochTreeLeaves' }) - -export default mongoose.model('EpochGSTLeaves', EpochGSTLeavesSchema); \ No newline at end of file diff --git a/database/models/nullifierTreeLeaf.ts b/database/models/nullifierTreeLeaf.ts deleted file mode 100644 index 1fdb389..0000000 --- a/database/models/nullifierTreeLeaf.ts +++ /dev/null @@ -1,16 +0,0 @@ -import * as mongoose from 'mongoose'; -import { Schema, Document } from 'mongoose'; - -export interface INullifierTreeLeaves extends Document { - epoch: number - nullifier: string - transactionHash: string -} - -const NullifiertreeLeavesSchema: Schema = new Schema({ - epoch: { type: Number }, - nullifier: { type: String }, - transactionHash: { type: String }, -}, { collection: 'NullifierTreeLeaves' }) - -export default mongoose.model('NullifierTreeLeaves', NullifiertreeLeavesSchema); \ No newline at end of file diff --git a/database/models/post.ts b/database/models/post.ts deleted file mode 100644 index 4df08ba..0000000 --- a/database/models/post.ts +++ /dev/null @@ -1,29 +0,0 @@ -import * as mongoose from 'mongoose'; -import { Schema, Document } from 'mongoose'; -import Comment, { IComment } from './comment'; - -export interface IPost extends Document { - transactionHash: string - content: string - hashedContent: string - epochKey: string - epkProof: string - proveMinRep: boolean - minRep: number - comments: [ IComment ] - status: number // 0: pending, 1: on-chain, 2: disabled - } - - const PostSchema: Schema = new Schema({ - transactionHash: { type: String }, - content: { type: String }, - hashedContent: {type: String }, - epochKey: { type: String, required: true }, - epkProof: { type: String, required: true }, - proveMinRep: { type: Boolean }, - minRep: { type: Number }, - comments: { type: [ ]}, - status: { type: Number, required: true }, - }); - - export default mongoose.model('Post', PostSchema); \ No newline at end of file diff --git a/database/models/reputationNullifier.ts b/database/models/reputationNullifier.ts deleted file mode 100644 index 96a2476..0000000 --- a/database/models/reputationNullifier.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as mongoose from 'mongoose'; -import { Schema, Document } from 'mongoose'; - -export interface IReputationNullifier extends Document { - // on-chain transaction hash - transactionHash: string - // upvote, downvote, post, comment - action: string - // spend nullifiers - nullifiers: string - } - - const ReputationNullifierSchema: Schema = new Schema({ - transactionHash: { type: String }, - action: { type: String, enum: ['UpVote', 'DownVote', 'Post', 'Comment'] }, - nullifiers: { type: String }, - }, { collection: 'ReputationNullifier' }); - - export default mongoose.model('ReputationNullifier', ReputationNullifierSchema); \ No newline at end of file diff --git a/database/models/settings.ts b/database/models/settings.ts deleted file mode 100644 index dee987f..0000000 --- a/database/models/settings.ts +++ /dev/null @@ -1,32 +0,0 @@ -import * as mongoose from 'mongoose'; -import { Schema, Document } from 'mongoose'; -import { ethers } from 'ethers' -import { hashLeftRight } from 'maci-crypto' -import { computeEmptyUserStateRoot } from '../../test/utils' - -export interface ISettings extends Document { - globalStateTreeDepth: number - userStateTreeDepth: number - epochTreeDepth: number - nullifierTreeDepth: number - attestingFee: ethers.BigNumber - epochLength: number - numEpochKeyNoncePerEpoch: number - numAttestationsPerEpochKey: number - defaultGSTLeaf: string -} - -const SettingSchema: Schema = new Schema({ - globalStateTreeDepth: { type: Number }, - userStateTreeDepth: { type: Number }, - epochTreeDepth: { type: Number }, - nullifierTreeDepth: { type: Number }, - attestingFee: { type: {} }, - epochLength: { type: Number }, - numEpochKeyNoncePerEpoch: { type: Number }, - numAttestationsPerEpochKey: { type: Number }, - defaultGSTLeaf: { type: String }, -}, { collection: 'Settings' }); - - -export default mongoose.model('Settings', SettingSchema); \ No newline at end of file diff --git a/database/models/userSignUp.ts b/database/models/userSignUp.ts deleted file mode 100644 index 38510a1..0000000 --- a/database/models/userSignUp.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as mongoose from 'mongoose'; -import { Schema, Document } from 'mongoose'; - - -export interface IUserSignUp extends Document { - transactionHash: string - hashedLeaf: string - epoch: number -} - -const UserSignUpSchema: Schema = new Schema({ - transactionHash: { type: String }, - hashedLeaf: { type: String }, - epoch: { type: Number }, -}, { collection: 'Users' }) - -export default mongoose.model('UserSignUp', UserSignUpSchema); \ No newline at end of file diff --git a/database/models/userTransitionedState.ts b/database/models/userTransitionedState.ts deleted file mode 100644 index fe784ab..0000000 --- a/database/models/userTransitionedState.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { BigNumber } from 'ethers'; -import * as mongoose from 'mongoose'; -import { Schema, Document } from 'mongoose'; - -export interface IUserTransitionedState extends Document { - transactionHash: string - toEpoch: number - fromEpoch: number - newGlobalStateTreeLeaf: BigNumber - fromGlobalStateTree: BigNumber - fromEpochTree: BigNumber - fromNullifierTreeRoot: BigNumber - proof: [ string ] - attestationNullifiers: [ string ] - epkNullifiers: [ string ] - } - - const UserTransitionedStateSchema: Schema = new Schema({ - transactionHash: { type: String }, - toEpoch: { type: Number, required: true }, - fromEpoch: { type: Number, required: true }, - newGlobalStateTreeLeaf: { type: {}, required: true }, - fromGlobalStateTree: { type: {}, required: true }, - fromEpochTree: { type: {}, required: true}, - fromNullifierTreeRoot: { type: {}, required: true }, - proof: { type: [] }, - attestationNullifiers: { type: [] }, - epkNullifiers: { type: [] }, - }, { collection: 'UserTransitionedStates' }); - - export default mongoose.model('UserTransitionedState', UserTransitionedStateSchema); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 398a78e..7cb225c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1343,14 +1343,6 @@ } } }, - "@types/bson": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.3.tgz", - "integrity": "sha512-mVRvYnTOZJz3ccpxhr3wgxVmSeiYinW+zlzQz3SXWaJmD1DuL05Jeq7nKw3SnbKmbleW5qrLG5vdyWe/A9sXhw==", - "requires": { - "@types/node": "*" - } - }, "@types/chai": { "version": "4.2.18", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.18.tgz", @@ -1418,19 +1410,11 @@ "integrity": "sha512-Lwh0lzzqT5Pqh6z61P3c3P5nm6fzQK/MMHl9UKeneAeInVflBSz1O2EkX6gM6xfJd7FBXBY5purtLx7fUiZ7Hw==", "dev": true }, - "@types/mongodb": { - "version": "3.6.16", - "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.6.16.tgz", - "integrity": "sha512-D3tM0iRUet3TiIMAdvovxAIRG9gYqFd4j7visGwmPNdQj8Fq/uFFfRxyGCgEwVXAs0NnJPMI/QGVTADxDwhmSQ==", - "requires": { - "@types/bson": "*", - "@types/node": "*" - } - }, "@types/node": { "version": "14.17.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.0.tgz", - "integrity": "sha512-w8VZUN/f7SSbvVReb9SWp6cJFevxb4/nkG65yLAya//98WgocKm5PLDAtSs5CtJJJM+kHmJjO/6mmYW4MHShZA==" + "integrity": "sha512-w8VZUN/f7SSbvVReb9SWp6cJFevxb4/nkG65yLAya//98WgocKm5PLDAtSs5CtJJJM+kHmJjO/6mmYW4MHShZA==", + "dev": true }, "@types/node-fetch": { "version": "2.5.10", @@ -1844,53 +1828,6 @@ "file-uri-to-path": "1.0.0" } }, - "bl": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", - "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", - "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - } - } - }, "blake-hash": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/blake-hash/-/blake-hash-1.1.1.tgz", @@ -2083,11 +2020,6 @@ "safe-buffer": "^5.1.2" } }, - "bson": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.6.tgz", - "integrity": "sha512-EvVNVeGo4tHxwi8L6bPj3y3itEvStdwvvlojVxxbyYfoaxJ6keLgrTuKdyfEAszFK+H3olzBuafE0yoh0D1gdg==" - }, "buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", @@ -2820,11 +2752,6 @@ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, - "denque": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.0.tgz", - "integrity": "sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ==" - }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -4221,8 +4148,7 @@ }, "@ethersproject/hash": { "version": "5.0.10", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.10.tgz", - "integrity": "sha512-Tf0bvs6YFhw28LuHnhlDWyr0xfcDxSXdwM4TcskeBbmXVSKLv3bJQEEEBFUcRX0fJuslR3gCVySEaSh7vuMx5w==", + "resolved": "", "dev": true, "optional": true, "requires": { @@ -4294,8 +4220,7 @@ "requires": { "@ethersproject/bytes": "^5.0.9", "@ethersproject/logger": "^5.0.8", - "@ethersproject/properties": "^5.0.7", - "elliptic": "6.5.3" + "@ethersproject/properties": "^5.0.7" } }, "@ethersproject/strings": { @@ -4312,8 +4237,7 @@ }, "@ethersproject/transactions": { "version": "5.0.9", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.9.tgz", - "integrity": "sha512-0Fu1yhdFBkrbMjenEr+39tmDxuHmaw0pe9Jb18XuKoItj7Z3p7+UzdHLr2S/okvHDHYPbZE5gtANDdQ3ZL1nBA==", + "resolved": "", "dev": true, "optional": true, "requires": { @@ -6400,21 +6324,6 @@ "integrity": "sha512-Adcvng33sd3gTjNIDNXGD1G4H6qCImIy2euUJAQHtLNplEKU5WEz5KRJxupRNIIT8sD5oFZLTKBWAf12Bsz24A==", "dev": true }, - "elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", - "dev": true, - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -7031,6 +6940,21 @@ "tweetnacl-util": "^0.15.0" }, "dependencies": { + "elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dev": true, + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "ethereumjs-abi": { "version": "0.6.5", "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz", @@ -8954,17 +8878,6 @@ "integrity": "sha1-CH4fELBGky/IWU3Z5tN4r8nR5aw=", "dev": true }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, "home-or-tmp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", @@ -9769,12 +9682,6 @@ "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", "dev": true }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -14315,11 +14222,6 @@ "is-docker": "^2.0.0" } }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -14550,11 +14452,6 @@ "verror": "1.10.0" } }, - "kareem": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.2.tgz", - "integrity": "sha512-STHz9P7X2L4Kwn72fA4rGyqyXdmrMSdxqHx9IXon/FXluXieaFA6KJ2upcHAHxQPQ0LeM/OjLrhFxifHewOALQ==" - }, "keccak": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/keccak/-/keccak-2.1.0.tgz", @@ -15214,12 +15111,6 @@ } } }, - "memory-pager": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", - "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", - "optional": true - }, "memorystream": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", @@ -15446,92 +15337,6 @@ "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.14.0.tgz", "integrity": "sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==" }, - "mongodb": { - "version": "3.6.6", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.6.tgz", - "integrity": "sha512-WlirMiuV1UPbej5JeCMqE93JRfZ/ZzqE7nJTwP85XzjAF4rRSeq2bGCb1cjfoHLOF06+HxADaPGqT0g3SbVT1w==", - "requires": { - "bl": "^2.2.1", - "bson": "^1.1.4", - "denque": "^1.4.1", - "optional-require": "^1.0.2", - "safe-buffer": "^5.1.2", - "saslprep": "^1.0.0" - } - }, - "mongoose": { - "version": "5.12.10", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.12.10.tgz", - "integrity": "sha512-/VmFFEACH2yiuPcJoBjOzVTXozBhCeminVbWI8mxiZwvgCbNu9PQrIABIgeCJncnZH8VT4G7s2IXO5FySxF1XA==", - "requires": { - "@types/mongodb": "^3.5.27", - "bson": "^1.1.4", - "kareem": "2.3.2", - "mongodb": "3.6.6", - "mongoose-legacy-pluralize": "1.0.2", - "mpath": "0.8.3", - "mquery": "3.2.5", - "ms": "2.1.2", - "regexp-clone": "1.0.0", - "safe-buffer": "5.2.1", - "sift": "13.5.2", - "sliced": "1.0.1" - }, - "dependencies": { - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } - } - }, - "mongoose-legacy-pluralize": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", - "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==" - }, - "mpath": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.8.3.tgz", - "integrity": "sha512-eb9rRvhDltXVNL6Fxd2zM9D4vKBxjVVQNLNijlj7uoXUy19zNDsIif5zR+pWmPCWNKwAtqyo4JveQm4nfD5+eA==" - }, - "mquery": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.5.tgz", - "integrity": "sha512-VjOKHHgU84wij7IUoZzFRU07IAxd5kWJaDmyUzQlbjHjyoeK5TNeeo8ZsFDtTYnSgpW6n/nMNIHvE3u8Lbrf4A==", - "requires": { - "bluebird": "3.5.1", - "debug": "3.1.0", - "regexp-clone": "^1.0.0", - "safe-buffer": "5.1.2", - "sliced": "1.0.1" - }, - "dependencies": { - "bluebird": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", - "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - }, "ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -15813,11 +15618,6 @@ "wordwrap": "~0.0.2" } }, - "optional-require": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/optional-require/-/optional-require-1.0.3.tgz", - "integrity": "sha512-RV2Zp2MY2aeYK5G+B/Sps8lW5NHAzE5QClbFP15j+PWmP+T9PxlJXBOOLoSAdgwFvS4t0aMR4vpedMkbHfh0nA==" - }, "optionator": { "version": "0.8.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", @@ -16230,11 +16030,6 @@ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", @@ -16452,11 +16247,6 @@ "resolve": "^1.1.6" } }, - "regexp-clone": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz", - "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw==" - }, "regexpp": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", @@ -16602,15 +16392,6 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, - "saslprep": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", - "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", - "optional": true, - "requires": { - "sparse-bitfield": "^3.0.3" - } - }, "scrypt-js": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", @@ -16954,11 +16735,6 @@ "rechoir": "^0.6.2" } }, - "sift": { - "version": "13.5.2", - "resolved": "https://registry.npmjs.org/sift/-/sift-13.5.2.tgz", - "integrity": "sha512-+gxdEOMA2J+AI+fVsCqeNn7Tgx3M9ZN9jdi95939l1IJ8cZsqS8sqpJyOkic2SJk+1+98Uwryt/gL6XDaV+UZA==" - }, "signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", @@ -17018,18 +16794,13 @@ } } }, - "sliced": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", - "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" - }, "snarkjs": { "version": "0.3.59", "resolved": "https://registry.npmjs.org/snarkjs/-/snarkjs-0.3.59.tgz", "integrity": "sha512-fj8EOtziIz6FvNmcT97L4QM+QNzoCf8zTo4ghpYY4wFf0ZkgX9tSR2SZy1BjtaQnlC+LiF55wOG+jucP9Aw5BA==", "requires": { "@iden3/binfileutils": "0.0.8", - "blake2b-wasm": "blake2b-wasm@git+https://github.com/jbaylina/blake2b-wasm.git", + "blake2b-wasm": "git+https://github.com/jbaylina/blake2b-wasm.git", "circom_runtime": "0.1.13", "fastfile": "0.0.19", "ffjavascript": "0.2.35", @@ -17038,8 +16809,8 @@ }, "dependencies": { "blake2b-wasm": { - "version": "https://git@github.com/jbaylina/blake2b-wasm.git#0d5f024b212429c7f50a7f533aa3a2406b5b42b3", - "from": "blake2b-wasm@git+https://github.com/jbaylina/blake2b-wasm.git", + "version": "git+https://github.com/jbaylina/blake2b-wasm.git#0d5f024b212429c7f50a7f533aa3a2406b5b42b3", + "from": "git+https://github.com/jbaylina/blake2b-wasm.git", "requires": { "nanoassert": "^1.0.0" } @@ -17152,15 +16923,6 @@ "source-map": "^0.6.0" } }, - "sparse-bitfield": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", - "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", - "optional": true, - "requires": { - "memory-pager": "^1.0.2" - } - }, "spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", diff --git a/package.json b/package.json index c82910e..6d5a7a6 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,6 @@ "libsemaphore": "^1.0.15", "maci-config": "^0.7.4", "maci-crypto": "^0.7.4", - "mongoose": "^5.12.10", "n-readlines": "^1.0.1", "prompt-async": "^0.9.9", "shelljs": "^0.8.3", From c3dcb601a1c55f20d513bd8b0fba6e5d962c89bc Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Wed, 2 Jun 2021 11:16:18 +0800 Subject: [PATCH 30/38] update README.md --- README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.MD b/README.MD index 1a95aef..5668eee 100644 --- a/README.MD +++ b/README.MD @@ -1,7 +1,7 @@ # Unirep UniRep is a private and nonrepudiable repuation system. Users can receive positive and negative reputation from attesters, and voluntarily prove that they have at least certain amount of reputation without revealing the exact amount. Moreover, users cannot refuse to receive reputation from an attester. -For more information, refer to the [documentation](https://vivi432.gitbook.io/unirep/) +For more information, refer to the [Unirep Social documentation](https://vivi432.gitbook.io/unirep-social/) ## Install and build From b465db34ba02f4036acdb13bb551e096854a9488 Mon Sep 17 00:00:00 2001 From: "Ya-wen, Jeng" Date: Mon, 7 Jun 2021 13:39:52 +0800 Subject: [PATCH 31/38] Apply suggestions from code review Co-authored-by: NIC Lin --- cli/deploy.ts | 4 ++-- cli/index.ts | 6 +++--- cli/test/testAllCommands.ts | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cli/deploy.ts b/cli/deploy.ts index 8f09880..f0e1bbb 100644 --- a/cli/deploy.ts +++ b/cli/deploy.ts @@ -97,7 +97,7 @@ const deploy = async (args: any) => { const _numAttestationsPerEpochKey = DEFAULT_NUM_ATTESTATIONS_PER_EPOCH_KEY // Default given karma - const _deaultKarma = DEFAULT_AIRDROPPED_KARMA + const _defaultKarma = DEFAULT_AIRDROPPED_KARMA // Epoch length const _epochLength = (args.epoch_length != undefined) ? args.epoch_length : DEFAULT_EPOCH_LENGTH @@ -146,4 +146,4 @@ const deploy = async (args: any) => { export { deploy, configureSubparser, -} \ No newline at end of file +} diff --git a/cli/index.ts b/cli/index.ts index eca1d32..2866f61 100644 --- a/cli/index.ts +++ b/cli/index.ts @@ -116,10 +116,10 @@ const main = async () => { configureSubparserForListAllPosts(subparsers) // Subcommand: leaveComment - configureSubparserForleaveComment(subparsers) + configureSubparserForLeaveComment(subparsers) // Subcommand: vote - configureSubparserForvote(subparsers) + configureSubparserForVote(subparsers) // Subcommand: epochTransition configureSubparserForEpochTransition(subparsers) @@ -171,4 +171,4 @@ const main = async () => { if (require.main === module) { main() -} \ No newline at end of file +} diff --git a/cli/test/testAllCommands.ts b/cli/test/testAllCommands.ts index 8631c33..ea3cff1 100644 --- a/cli/test/testAllCommands.ts +++ b/cli/test/testAllCommands.ts @@ -328,7 +328,7 @@ describe('test all CLI subcommands', function() { describe('upvote CLI subcommand', () => { - it('should upvote to user', async () => { + it('should upvote to user 2', async () => { const command = `npx ts-node cli/index.ts vote` + ` -x ${unirepContract.address} ` + ` -d ${attesterPrivKey} ` + @@ -466,4 +466,4 @@ describe('test all CLI subcommands', function() { expect(verifyRegMatch).not.equal(null) }) }) -}) \ No newline at end of file +}) From d2b7f73da4d56145e505ccb4f44ef785993d7d38 Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Tue, 8 Jun 2021 11:00:18 +0800 Subject: [PATCH 32/38] Apply suggestions from code review, apply DeprecationWarning --- .gitignore | 2 +- cli/attesterSignUp.ts | 30 +++++------ cli/deploy.ts | 42 +++++++-------- cli/epochTransition.ts | 36 ++++++------- cli/genEpochKeyAndProof.ts | 30 +++++------ cli/genReputationProofFromAttester.ts | 50 ++++++++--------- cli/genUnirepIdentity.ts | 4 +- cli/index.ts | 8 +-- cli/leaveComment.ts | 60 ++++++++++----------- cli/listAllPosts.ts | 28 ++++------ cli/publishPost.ts | 54 +++++++++---------- cli/test/testAllCommands.ts | 8 +-- cli/userSignUp.ts | 36 ++++++------- cli/userStateTransition.ts | 40 +++++++------- cli/verifyEpochKeyProof.ts | 32 +++++------ cli/verifyReputationProof.ts | 52 +++++++++--------- cli/verifyReputationProofFromAttester.ts | 54 +++++++++---------- cli/vote.ts | 68 ++++++++++++------------ crypto/SMT/utils.ts | 1 - package-lock.json | 6 ++- scripts/buildSnarks.ts | 44 +++++++-------- test/integration/Integration.ts | 1 + 22 files changed, 338 insertions(+), 348 deletions(-) diff --git a/.gitignore b/.gitignore index 10cf5bc..0beb8e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,10 @@ node_modules +.DS_Store #Buidler files cache artifacts build -mongodb #Verifier solidity contracts EpochKeyValidityVerifier.sol diff --git a/cli/attesterSignUp.ts b/cli/attesterSignUp.ts index 55ab79d..eaed216 100644 --- a/cli/attesterSignUp.ts +++ b/cli/attesterSignUp.ts @@ -14,44 +14,44 @@ import { DEFAULT_ETH_PROVIDER } from './defaults' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" const configureSubparser = (subparsers: any) => { - const parser = subparsers.addParser( + const parser = subparsers.add_parser( 'attesterSignup', - { addHelp: true }, + { add_help: true }, ) - parser.addArgument( - ['-e', '--eth-provider'], + parser.add_argument( + '-e', '--eth-provider', { action: 'store', - type: 'string', + type: 'str', help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, } ) - parser.addArgument( - ['-x', '--contract'], + parser.add_argument( + '-x', '--contract', { required: true, - type: 'string', + type: 'str', help: 'The Unirep contract address', } ) - const privkeyGroup = parser.addMutuallyExclusiveGroup({ required: true }) + const privkeyGroup = parser.add_mutually_exclusive_group({ required: true }) - privkeyGroup.addArgument( - ['-dp', '--prompt-for-eth-privkey'], + privkeyGroup.add_argument( + '-dp', '--prompt-for-eth-privkey', { - action: 'storeTrue', + action: 'store_true', help: 'Whether to prompt for the user\'s Ethereum private key and ignore -d / --eth-privkey', } ) - privkeyGroup.addArgument( - ['-d', '--eth-privkey'], + privkeyGroup.add_argument( + '-d', '--eth-privkey', { action: 'store', - type: 'string', + type: 'str', help: 'The deployer\'s Ethereum private key', } ) diff --git a/cli/deploy.ts b/cli/deploy.ts index f0e1bbb..820d419 100644 --- a/cli/deploy.ts +++ b/cli/deploy.ts @@ -11,41 +11,41 @@ import { } from './utils' const configureSubparser = (subparsers: any) => { - const deployParser = subparsers.addParser( + const deployParser = subparsers.add_parser( 'deploy', - { addHelp: true }, + { add_help: true }, ) - const deployerPrivkeyGroup = deployParser.addMutuallyExclusiveGroup({ required: true }) + const deployerPrivkeyGroup = deployParser.add_mutually_exclusive_group({ required: true }) - deployerPrivkeyGroup.addArgument( - ['-dp', '--prompt-for-deployer-privkey'], + deployerPrivkeyGroup.add_argument( + '-dp', '--prompt-for-deployer-privkey', { - action: 'storeTrue', + action: 'store_true', help: 'Whether to prompt for the deployer\'s Ethereum private key and ignore -d / --deployer-privkey', } ) - deployerPrivkeyGroup.addArgument( - ['-d', '--deployer-privkey'], + deployerPrivkeyGroup.add_argument( + '-d', '--deployer-privkey', { action: 'store', - type: 'string', + type: 'str', help: 'The deployer\'s Ethereum private key', } ) - deployParser.addArgument( - ['-e', '--eth-provider'], + deployParser.add_argument( + '-e', '--eth-provider', { action: 'store', - type: 'string', + type: 'str', help: 'A connection string to an Ethereum provider. Default: http://localhost:8545', } ) - deployParser.addArgument( - ['-l', '--epoch-length'], + deployParser.add_argument( + '-l', '--epoch-length', { action: 'store', type: 'int', @@ -53,20 +53,20 @@ const configureSubparser = (subparsers: any) => { } ) - deployParser.addArgument( - ['-f', '--attesting-fee'], + deployParser.add_argument( + '-f', '--attesting-fee', { action: 'store', - type: 'string', + type: 'str', help: 'The fee to make an attestation. Default: 0.01 eth (i.e., 10 * 16)', } ) - deployParser.addArgument( - ['-td', '--tree-depths-config'], + deployParser.add_argument( + '-td', '--tree-depths-config', { action: 'store', - type: 'string', + type: 'str', help: 'The configuration of tree depths: circuit or contract. Default: circuit', } ) @@ -109,7 +109,7 @@ const deploy = async (args: any) => { 'maxUsers': maxUsers, 'numEpochKeyNoncePerEpoch': _numEpochKeyNoncePerEpoch, 'numAttestationsPerEpochKey': _numAttestationsPerEpochKey, - 'defaultKarma': _deaultKarma, + 'defaultKarma': _defaultKarma, 'epochLength': _epochLength, 'attestingFee': _attestingFee, } diff --git a/cli/epochTransition.ts b/cli/epochTransition.ts index aef8607..5c42976 100644 --- a/cli/epochTransition.ts +++ b/cli/epochTransition.ts @@ -14,52 +14,52 @@ import { DEFAULT_ETH_PROVIDER } from './defaults' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" const configureSubparser = (subparsers: any) => { - const parser = subparsers.addParser( + const parser = subparsers.add_parser( 'epochTransition', - { addHelp: true }, + { add_help: true }, ) - parser.addArgument( - ['-e', '--eth-provider'], + parser.add_argument( + '-e', '--eth-provider', { action: 'store', - type: 'string', + type: 'str', help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, } ) - parser.addArgument( - ['-t', '--is-test'], + parser.add_argument( + '-t', '--is-test', { - action: 'storeTrue', + action: 'store_true', help: 'Indicate if the provider is a testing environment', } ) - parser.addArgument( - ['-x', '--contract'], + parser.add_argument( + '-x', '--contract', { required: true, - type: 'string', + type: 'str', help: 'The Unirep contract address', } ) - const privkeyGroup = parser.addMutuallyExclusiveGroup({ required: true }) + const privkeyGroup = parser.add_mutually_exclusive_group({ required: true }) - privkeyGroup.addArgument( - ['-dp', '--prompt-for-eth-privkey'], + privkeyGroup.add_argument( + '-dp', '--prompt-for-eth-privkey', { - action: 'storeTrue', + action: 'store_true', help: 'Whether to prompt for the user\'s Ethereum private key and ignore -d / --eth-privkey', } ) - privkeyGroup.addArgument( - ['-d', '--eth-privkey'], + privkeyGroup.add_argument( + '-d', '--eth-privkey', { action: 'store', - type: 'string', + type: 'str', help: 'The deployer\'s Ethereum private key', } ) diff --git a/cli/genEpochKeyAndProof.ts b/cli/genEpochKeyAndProof.ts index 0d39c0c..2abcb72 100644 --- a/cli/genEpochKeyAndProof.ts +++ b/cli/genEpochKeyAndProof.ts @@ -19,31 +19,31 @@ import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import { epkProofPrefix, identityPrefix } from './prefix' const configureSubparser = (subparsers: any) => { - const parser = subparsers.addParser( + const parser = subparsers.add_parser( 'genEpochKeyAndProof', - { addHelp: true }, + { add_help: true }, ) - parser.addArgument( - ['-e', '--eth-provider'], + parser.add_argument( + '-e', '--eth-provider', { action: 'store', - type: 'string', + type: 'str', help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, } ) - parser.addArgument( - ['-id', '--identity'], + parser.add_argument( + '-id', '--identity', { required: true, - type: 'string', + type: 'str', help: 'The (serialized) user\'s identity', } ) - parser.addArgument( - ['-n', '--epoch-key-nonce'], + parser.add_argument( + '-n', '--epoch-key-nonce', { required: true, type: 'int', @@ -51,8 +51,8 @@ const configureSubparser = (subparsers: any) => { } ) - parser.addArgument( - ['-b', '--start-block'], + parser.add_argument( + '-b', '--start-block', { action: 'store', type: 'int', @@ -60,11 +60,11 @@ const configureSubparser = (subparsers: any) => { } ) - parser.addArgument( - ['-x', '--contract'], + parser.add_argument( + '-x', '--contract', { required: true, - type: 'string', + type: 'str', help: 'The Unirep contract address', } ) diff --git a/cli/genReputationProofFromAttester.ts b/cli/genReputationProofFromAttester.ts index 24c5996..59515d2 100644 --- a/cli/genReputationProofFromAttester.ts +++ b/cli/genReputationProofFromAttester.ts @@ -16,72 +16,72 @@ import { add0x } from '../crypto/SMT' import { identityPrefix, reputationProofFromAttesterPrefix } from './prefix' const configureSubparser = (subparsers: any) => { - const parser = subparsers.addParser( + const parser = subparsers.add_parser( 'genReputationProofFromAttester', - { addHelp: true }, + { add_help: true }, ) - parser.addArgument( - ['-e', '--eth-provider'], + parser.add_argument( + '-e', '--eth-provider', { action: 'store', - type: 'string', + type: 'str', help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, } ) - parser.addArgument( - ['-id', '--identity'], + parser.add_argument( + '-id', '--identity', { required: true, - type: 'string', + type: 'str', help: 'The (serialized) user\'s identity', } ) - parser.addArgument( - ['-a', '--attester-id'], + parser.add_argument( + '-a', '--attester-id', { required: true, - type: 'string', + type: 'str', help: 'The attester id (in hex representation)', } ) - parser.addArgument( - ['-mp', '--min-pos-rep'], + parser.add_argument( + '-mp', '--min-pos-rep', { type: 'int', help: 'The minimum positive score the attester given to the user', } ) - parser.addArgument( - ['-mn', '--max-neg-rep'], + parser.add_argument( + '-mn', '--max-neg-rep', { type: 'int', help: 'The maximum negative score the attester given to the user', } ) - parser.addArgument( - ['-md', '--min-rep-diff'], + parser.add_argument( + '-md', '--min-rep-diff', { type: 'int', help: 'The difference between positive and negative scores the attester given to the user', } ) - parser.addArgument( - ['-gp', '--graffiti-preimage'], + parser.add_argument( + '-gp', '--graffiti-preimage', { - type: 'string', + type: 'str', help: 'The pre-image of the graffiti for the reputation the attester given to the user (in hex representation)', } ) - parser.addArgument( - ['-b', '--start-block'], + parser.add_argument( + '-b', '--start-block', { action: 'store', type: 'int', @@ -89,11 +89,11 @@ const configureSubparser = (subparsers: any) => { } ) - parser.addArgument( - ['-x', '--contract'], + parser.add_argument( + '-x', '--contract', { required: true, - type: 'string', + type: 'str', help: 'The Unirep contract address', } ) diff --git a/cli/genUnirepIdentity.ts b/cli/genUnirepIdentity.ts index 9eee450..1ee2082 100644 --- a/cli/genUnirepIdentity.ts +++ b/cli/genUnirepIdentity.ts @@ -4,9 +4,9 @@ import { genIdentity, genIdentityCommitment, serialiseIdentity } from 'libsemaph import { identityPrefix, identityCommitmentPrefix } from "./prefix" const configureSubparser = (subparsers: any) => { - subparsers.addParser( + subparsers.add_parser( 'genUnirepIdentity', - { addHelp: true }, + { add_help: true }, ) } diff --git a/cli/index.ts b/cli/index.ts index 2866f61..b7dc1d5 100644 --- a/cli/index.ts +++ b/cli/index.ts @@ -49,12 +49,12 @@ import { import { leaveComment, - configureSubparser as configureSubparserForleaveComment, + configureSubparser as configureSubparserForLeaveComment, } from './leaveComment' import { vote, - configureSubparser as configureSubparserForvote, + configureSubparser as configureSubparserForVote, } from './vote' import { @@ -83,7 +83,7 @@ const main = async () => { description: 'Unirep', }) - const subparsers = parser.addSubparsers({ + const subparsers = parser.add_subparsers({ title: 'Subcommands', dest: 'subcommand', }) @@ -133,7 +133,7 @@ const main = async () => { // Subcommand: verifyReputationProof configureSubparserForVerifyReputationProofFromAttester(subparsers) - const args = parser.parseArgs() + const args = parser.parse_args() // Execute the subcommand method if (args.subcommand === 'genUnirepIdentity') { diff --git a/cli/leaveComment.ts b/cli/leaveComment.ts index 47a1253..3dd70e3 100644 --- a/cli/leaveComment.ts +++ b/cli/leaveComment.ts @@ -25,49 +25,49 @@ import { genRandomSalt, stringifyBigInts } from 'maci-crypto' import { genEpochKey } from '../core/utils' const configureSubparser = (subparsers: any) => { - const parser = subparsers.addParser( + const parser = subparsers.add_parser( 'leaveComment', - { addHelp: true }, + { add_help: true }, ) - parser.addArgument( - ['-e', '--eth-provider'], + parser.add_argument( + '-e', '--eth-provider', { action: 'store', - type: 'string', + type: 'str', help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, } ) - parser.addArgument( - ['-tx', '--text'], + parser.add_argument( + '-tx', '--text', { required: true, - type: 'string', + type: 'str', help: 'The text written in the post', } ) - parser.addArgument( - ['-pid', '--post-id'], + parser.add_argument( + '-pid', '--post-id', { required: true, - type: 'string', + type: 'str', help: 'The post id where the comment replies to (in decimal representation)', } ) - parser.addArgument( - ['-id', '--identity'], + parser.add_argument( + '-id', '--identity', { required: true, - type: 'string', + type: 'str', help: 'The (serialized) user\'s identity', } ) - parser.addArgument( - ['-n', '--epoch-key-nonce'], + parser.add_argument( + '-n', '--epoch-key-nonce', { required: true, type: 'int', @@ -75,8 +75,8 @@ const configureSubparser = (subparsers: any) => { } ) - parser.addArgument( - ['-kn', '--karma-nonce'], + parser.add_argument( + '-kn', '--karma-nonce', { required: true, type: 'int', @@ -84,38 +84,38 @@ const configureSubparser = (subparsers: any) => { } ) - parser.addArgument( - ['-mr', '--min-rep'], + parser.add_argument( + '-mr', '--min-rep', { type: 'int', help: 'The minimum reputation score the user has', } ) - parser.addArgument( - ['-x', '--contract'], + parser.add_argument( + '-x', '--contract', { required: true, - type: 'string', + type: 'str', help: 'The Unirep contract address', } ) - const privkeyGroup = parser.addMutuallyExclusiveGroup({ required: true }) + const privkeyGroup = parser.add_mutually_exclusive_group({ required: true }) - privkeyGroup.addArgument( - ['-dp', '--prompt-for-eth-privkey'], + privkeyGroup.add_argument( + '-dp', '--prompt-for-eth-privkey', { - action: 'storeTrue', + action: 'store_true', help: 'Whether to prompt for the user\'s Ethereum private key and ignore -d / --eth-privkey', } ) - privkeyGroup.addArgument( - ['-d', '--eth-privkey'], + privkeyGroup.add_argument( + '-d', '--eth-privkey', { action: 'store', - type: 'string', + type: 'str', help: 'The deployer\'s Ethereum private key', } ) diff --git a/cli/listAllPosts.ts b/cli/listAllPosts.ts index 0664de4..91505e2 100644 --- a/cli/listAllPosts.ts +++ b/cli/listAllPosts.ts @@ -11,25 +11,25 @@ import { DEFAULT_ETH_PROVIDER } from './defaults' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" const configureSubparser = (subparsers: any) => { - const parser = subparsers.addParser( + const parser = subparsers.add_parser( 'listAllPosts', - { addHelp: true }, + { add_help: true }, ) - parser.addArgument( - ['-e', '--eth-provider'], + parser.add_argument( + '-e', '--eth-provider', { action: 'store', - type: 'string', + type: 'str', help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, } ) - parser.addArgument( - ['-x', '--contract'], + parser.add_argument( + '-x', '--contract', { required: true, - type: 'string', + type: 'str', help: 'The Unirep contract address', } ) @@ -62,16 +62,8 @@ const listAllPosts = async (args: any) => { ) let postEvents - try { - const postFilter = unirepContract.filters.PostSubmitted() - postEvents = await unirepContract.queryFilter(postFilter) - } catch(e) { - console.error('Error: the transaction failed') - if (e.message) { - console.error(e.message) - } - return - } + const postFilter = unirepContract.filters.PostSubmitted() + postEvents = await unirepContract.queryFilter(postFilter) for (let i = 0; i < postEvents.length; i++) { console.log('Post ', postEvents[i].args._postId.toString()) diff --git a/cli/publishPost.ts b/cli/publishPost.ts index fe64917..07bd905 100644 --- a/cli/publishPost.ts +++ b/cli/publishPost.ts @@ -25,40 +25,40 @@ import { formatProofForVerifierContract, genVerifyReputationProofAndPublicSignal import { genEpochKey } from '../core/utils' const configureSubparser = (subparsers: any) => { - const parser = subparsers.addParser( + const parser = subparsers.add_parser( 'publishPost', - { addHelp: true }, + { add_help: true }, ) - parser.addArgument( - ['-e', '--eth-provider'], + parser.add_argument( + '-e', '--eth-provider', { action: 'store', - type: 'string', + type: 'str', help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, } ) - parser.addArgument( - ['-tx', '--text'], + parser.add_argument( + '-tx', '--text', { required: true, - type: 'string', + type: 'str', help: 'The text written in the post', } ) - parser.addArgument( - ['-id', '--identity'], + parser.add_argument( + '-id', '--identity', { required: true, - type: 'string', + type: 'str', help: 'The (serialized) user\'s identity', } ) - parser.addArgument( - ['-n', '--epoch-key-nonce'], + parser.add_argument( + '-n', '--epoch-key-nonce', { required: true, type: 'int', @@ -66,8 +66,8 @@ const configureSubparser = (subparsers: any) => { } ) - parser.addArgument( - ['-kn', '--karma-nonce'], + parser.add_argument( + '-kn', '--karma-nonce', { required: true, type: 'int', @@ -75,38 +75,38 @@ const configureSubparser = (subparsers: any) => { } ) - parser.addArgument( - ['-mr', '--min-rep'], + parser.add_argument( + '-mr', '--min-rep', { type: 'int', help: 'The minimum reputation score the user has', } ) - parser.addArgument( - ['-x', '--contract'], + parser.add_argument( + '-x', '--contract', { required: true, - type: 'string', + type: 'str', help: 'The Unirep contract address', } ) - const privkeyGroup = parser.addMutuallyExclusiveGroup({ required: true }) + const privkeyGroup = parser.add_mutually_exclusive_group({ required: true }) - privkeyGroup.addArgument( - ['-dp', '--prompt-for-eth-privkey'], + privkeyGroup.add_argument( + '-dp', '--prompt-for-eth-privkey', { - action: 'storeTrue', + action: 'store_true', help: 'Whether to prompt for the user\'s Ethereum private key and ignore -d / --eth-privkey', } ) - privkeyGroup.addArgument( - ['-d', '--eth-privkey'], + privkeyGroup.add_argument( + '-d', '--eth-privkey', { action: 'store', - type: 'string', + type: 'str', help: 'The deployer\'s Ethereum private key', } ) diff --git a/cli/test/testAllCommands.ts b/cli/test/testAllCommands.ts index ea3cff1..11a6ca8 100644 --- a/cli/test/testAllCommands.ts +++ b/cli/test/testAllCommands.ts @@ -261,9 +261,7 @@ describe('test all CLI subcommands', function() { postID = idRegMatch[1] const postRegMatch = output.match(/Transaction hash: 0x[a-fA-F0-9]{64}/) expect(postRegMatch).not.equal(null) - if(postRegMatch){ - transactionHash =postRegMatch[0].split('Transaction hash: ')[1] - } + transactionHash =postRegMatch[0].split('Transaction hash: ')[1] const userRepProofRegMatch = output.match(/(Unirep\.reputationProof\.[a-zA-Z0-9\-\_]+)$/) expect(userRepProofRegMatch).not.equal(null) userRepProof = userRepProofRegMatch[1] @@ -348,9 +346,7 @@ describe('test all CLI subcommands', function() { epk = epkRegMatch[1] const txRegMatch = output.match(/Transaction hash: 0x[a-fA-F0-9]{64}/) expect(txRegMatch).not.equal(null) - if(txRegMatch){ - transactionHash = txRegMatch[0].split('Transaction hash: ')[1] - } + transactionHash = txRegMatch[0].split('Transaction hash: ')[1] const userRepProofRegMatch = output.match(/(Unirep\.reputationProof\.[a-zA-Z0-9\-\_]+)$/) expect(userRepProofRegMatch).not.equal(null) userRepProof = userRepProofRegMatch[1] diff --git a/cli/userSignUp.ts b/cli/userSignUp.ts index ba46f26..b7df1dc 100644 --- a/cli/userSignUp.ts +++ b/cli/userSignUp.ts @@ -18,53 +18,53 @@ import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import { identityCommitmentPrefix } from './prefix' const configureSubparser = (subparsers: any) => { - const parser = subparsers.addParser( + const parser = subparsers.add_parser( 'userSignup', - { addHelp: true }, + { add_help: true }, ) - parser.addArgument( - ['-e', '--eth-provider'], + parser.add_argument( + '-e', '--eth-provider', { action: 'store', - type: 'string', + type: 'str', help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, } ) - parser.addArgument( - ['-c', '--identity-commitment'], + parser.add_argument( + '-c', '--identity-commitment', { required: true, - type: 'string', + type: 'str', help: 'The user\'s identity commitment (in hex representation)', } ) - parser.addArgument( - ['-x', '--contract'], + parser.add_argument( + '-x', '--contract', { required: true, - type: 'string', + type: 'str', help: 'The Unirep contract address', } ) - const privkeyGroup = parser.addMutuallyExclusiveGroup({ required: true }) + const privkeyGroup = parser.add_mutually_exclusive_group({ required: true }) - privkeyGroup.addArgument( - ['-dp', '--prompt-for-eth-privkey'], + privkeyGroup.add_argument( + '-dp', '--prompt-for-eth-privkey', { - action: 'storeTrue', + action: 'store_true', help: 'Whether to prompt for the user\'s Ethereum private key and ignore -d / --eth-privkey', } ) - privkeyGroup.addArgument( - ['-d', '--eth-privkey'], + privkeyGroup.add_argument( + '-d', '--eth-privkey', { action: 'store', - type: 'string', + type: 'str', help: 'The deployer\'s Ethereum private key', } ) diff --git a/cli/userStateTransition.ts b/cli/userStateTransition.ts index eb61c7a..8cc2c63 100644 --- a/cli/userStateTransition.ts +++ b/cli/userStateTransition.ts @@ -20,31 +20,31 @@ import { stringifyBigInts } from 'maci-crypto' import { identityPrefix } from './prefix' const configureSubparser = (subparsers: any) => { - const parser = subparsers.addParser( + const parser = subparsers.add_parser( 'userStateTransition', - { addHelp: true }, + { add_help: true }, ) - parser.addArgument( - ['-e', '--eth-provider'], + parser.add_argument( + '-e', '--eth-provider', { action: 'store', - type: 'string', + type: 'str', help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, } ) - parser.addArgument( - ['-id', '--identity'], + parser.add_argument( + '-id', '--identity', { required: true, - type: 'string', + type: 'str', help: 'The (serialized) user\'s identity', } ) - parser.addArgument( - ['-b', '--start-block'], + parser.add_argument( + '-b', '--start-block', { action: 'store', type: 'int', @@ -52,30 +52,30 @@ const configureSubparser = (subparsers: any) => { } ) - parser.addArgument( - ['-x', '--contract'], + parser.add_argument( + '-x', '--contract', { required: true, - type: 'string', + type: 'str', help: 'The Unirep contract address', } ) - const privkeyGroup = parser.addMutuallyExclusiveGroup({ required: true }) + const privkeyGroup = parser.add_mutually_exclusive_group({ required: true }) - privkeyGroup.addArgument( - ['-dp', '--prompt-for-eth-privkey'], + privkeyGroup.add_argument( + '-dp', '--prompt-for-eth-privkey', { - action: 'storeTrue', + action: 'store_true', help: 'Whether to prompt for the user\'s Ethereum private key and ignore -d / --eth-privkey', } ) - privkeyGroup.addArgument( - ['-d', '--eth-privkey'], + privkeyGroup.add_argument( + '-d', '--eth-privkey', { action: 'store', - type: 'string', + type: 'str', help: 'The deployer\'s Ethereum private key', } ) diff --git a/cli/verifyEpochKeyProof.ts b/cli/verifyEpochKeyProof.ts index fa67d04..cb8338d 100644 --- a/cli/verifyEpochKeyProof.ts +++ b/cli/verifyEpochKeyProof.ts @@ -16,40 +16,40 @@ import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import { epkProofPrefix } from './prefix' const configureSubparser = (subparsers: any) => { - const parser = subparsers.addParser( + const parser = subparsers.add_parser( 'verifyEpochKeyProof', - { addHelp: true }, + { add_help: true }, ) - parser.addArgument( - ['-e', '--eth-provider'], + parser.add_argument( + '-e', '--eth-provider', { action: 'store', - type: 'string', + type: 'str', help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, } ) - parser.addArgument( - ['-epk', '--epoch-key'], + parser.add_argument( + '-epk', '--epoch-key', { required: true, - type: 'string', + type: 'str', help: 'The user\'s epoch key (in hex representation)', } ) - parser.addArgument( - ['-pf', '--proof'], + parser.add_argument( + '-pf', '--proof', { required: true, - type: 'string', + type: 'str', help: 'The snark proof of the user\'s epoch key ', } ) - parser.addArgument( - ['-b', '--start-block'], + parser.add_argument( + '-b', '--start-block', { action: 'store', type: 'int', @@ -57,11 +57,11 @@ const configureSubparser = (subparsers: any) => { } ) - parser.addArgument( - ['-x', '--contract'], + parser.add_argument( + '-x', '--contract', { required: true, - type: 'string', + type: 'str', help: 'The Unirep contract address', } ) diff --git a/cli/verifyReputationProof.ts b/cli/verifyReputationProof.ts index 5e32932..2ae5c3f 100644 --- a/cli/verifyReputationProof.ts +++ b/cli/verifyReputationProof.ts @@ -17,22 +17,22 @@ import { reputationProofPrefix } from './prefix' import { hash5 } from 'maci-crypto' const configureSubparser = (subparsers: any) => { - const parser = subparsers.addParser( + const parser = subparsers.add_parser( 'verifyReputationProof', - { addHelp: true }, + { add_help: true }, ) - parser.addArgument( - ['-e', '--eth-provider'], + parser.add_argument( + '-e', '--eth-provider', { action: 'store', - type: 'string', + type: 'str', help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, } ) - parser.addArgument( - ['-ep', '--epoch'], + parser.add_argument( + '-ep', '--epoch', { action: 'store', type: 'int', @@ -40,52 +40,52 @@ const configureSubparser = (subparsers: any) => { } ) - parser.addArgument( - ['-epk', '--epoch-key'], + parser.add_argument( + '-epk', '--epoch-key', { required: true, - type: 'string', + type: 'str', help: 'The user\'s epoch key (in hex representation)', } ) - parser.addArgument( - ['-pf', '--proof'], + parser.add_argument( + '-pf', '--proof', { required: true, - type: 'string', + type: 'str', help: 'The snark proof of the user\'s epoch key and reputation ', } ) - parser.addArgument( - ['-act', '--action'], + parser.add_argument( + '-act', '--action', { required: true, - type: 'string', + type: 'str', help: 'Which action the user spends reputation', } ) - parser.addArgument( - ['-th', '--transaction-hash'], + parser.add_argument( + '-th', '--transaction-hash', { required: true, - type: 'string', + type: 'str', help: 'The transaction hash of where user submit the reputation nullifiers ', } ) - parser.addArgument( - ['-mr', '--min-rep'], + parser.add_argument( + '-mr', '--min-rep', { type: 'int', help: 'The minimum reputation score the user has', } ) - parser.addArgument( - ['-b', '--start-block'], + parser.add_argument( + '-b', '--start-block', { action: 'store', type: 'int', @@ -93,11 +93,11 @@ const configureSubparser = (subparsers: any) => { } ) - parser.addArgument( - ['-x', '--contract'], + parser.add_argument( + '-x', '--contract', { required: true, - type: 'string', + type: 'str', help: 'The Unirep contract address', } ) diff --git a/cli/verifyReputationProofFromAttester.ts b/cli/verifyReputationProofFromAttester.ts index 97567fa..2b81ec1 100644 --- a/cli/verifyReputationProofFromAttester.ts +++ b/cli/verifyReputationProofFromAttester.ts @@ -16,22 +16,22 @@ import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import { reputationProofFromAttesterPrefix } from './prefix' const configureSubparser = (subparsers: any) => { - const parser = subparsers.addParser( + const parser = subparsers.add_parser( 'verifyReputationProofFromAttester', - { addHelp: true }, + { add_help: true }, ) - parser.addArgument( - ['-e', '--eth-provider'], + parser.add_argument( + '-e', '--eth-provider', { action: 'store', - type: 'string', + type: 'str', help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, } ) - parser.addArgument( - ['-ep', '--epoch'], + parser.add_argument( + '-ep', '--epoch', { action: 'store', type: 'int', @@ -39,58 +39,58 @@ const configureSubparser = (subparsers: any) => { } ) - parser.addArgument( - ['-a', '--attester-id'], + parser.add_argument( + '-a', '--attester-id', { required: true, - type: 'string', + type: 'str', help: 'The attester id (in hex representation)', } ) - parser.addArgument( - ['-mp', '--min-pos-rep'], + parser.add_argument( + '-mp', '--min-pos-rep', { type: 'int', help: 'The minimum positive score the attester given to the user', } ) - parser.addArgument( - ['-mn', '--max-neg-rep'], + parser.add_argument( + '-mn', '--max-neg-rep', { type: 'int', help: 'The maximum negative score the attester given to the user', } ) - parser.addArgument( - ['-md', '--min-rep-diff'], + parser.add_argument( + '-md', '--min-rep-diff', { type: 'int', help: 'The difference between positive and negative scores the attester given to the user', } ) - parser.addArgument( - ['-gp', '--graffiti-preimage'], + parser.add_argument( + '-gp', '--graffiti-preimage', { - type: 'string', + type: 'str', help: 'The pre-image of the graffiti for the reputation the attester given to the user (in hex representation)', } ) - parser.addArgument( - ['-pf', '--proof'], + parser.add_argument( + '-pf', '--proof', { required: true, - type: 'string', + type: 'str', help: 'The snark proof of the user\'s epoch key ', } ) - parser.addArgument( - ['-b', '--start-block'], + parser.add_argument( + '-b', '--start-block', { action: 'store', type: 'int', @@ -98,11 +98,11 @@ const configureSubparser = (subparsers: any) => { } ) - parser.addArgument( - ['-x', '--contract'], + parser.add_argument( + '-x', '--contract', { required: true, - type: 'string', + type: 'str', help: 'The Unirep contract address', } ) diff --git a/cli/vote.ts b/cli/vote.ts index becdf2f..3e91047 100644 --- a/cli/vote.ts +++ b/cli/vote.ts @@ -26,40 +26,40 @@ import { reputationProofPrefix, identityPrefix } from './prefix' import { MAX_KARMA_BUDGET } from '../config/socialMedia' const configureSubparser = (subparsers: any) => { - const parser = subparsers.addParser( + const parser = subparsers.add_parser( 'vote', - { addHelp: true }, + { add_help: true }, ) - parser.addArgument( - ['-e', '--eth-provider'], + parser.add_argument( + '-e', '--eth-provider', { action: 'store', - type: 'string', + type: 'str', help: `A connection string to an Ethereum provider. Default: ${DEFAULT_ETH_PROVIDER}`, } ) - parser.addArgument( - ['-epk', '--epoch-key'], + parser.add_argument( + '-epk', '--epoch-key', { required: true, - type: 'string', + type: 'str', help: 'The user\'s epoch key to attest to (in hex representation)', } ) - parser.addArgument( - ['-id', '--identity'], + parser.add_argument( + '-id', '--identity', { required: true, - type: 'string', + type: 'str', help: 'The (serialized) user\'s identity', } ) - parser.addArgument( - ['-n', '--epoch-key-nonce'], + parser.add_argument( + '-n', '--epoch-key-nonce', { required: true, type: 'int', @@ -67,8 +67,8 @@ const configureSubparser = (subparsers: any) => { } ) - parser.addArgument( - ['-kn', '--karma-nonce'], + parser.add_argument( + '-kn', '--karma-nonce', { required: true, type: 'int', @@ -76,63 +76,63 @@ const configureSubparser = (subparsers: any) => { } ) - parser.addArgument( - ['-mr', '--min-rep'], + parser.add_argument( + '-mr', '--min-rep', { type: 'int', help: 'The minimum reputation score the attester has', } ) - parser.addArgument( - ['-uv', '--upvote-value'], + parser.add_argument( + '-uv', '--upvote-value', { type: 'int', help: 'Score of positive reputation to give to the user and substract from attester\'s epoch key', } ) - parser.addArgument( - ['-dv', '--downvote-value'], + parser.add_argument( + '-dv', '--downvote-value', { type: 'int', help: 'Score of negative reputation to give to the user and substract from attester\'s epoch key', } ) - parser.addArgument( - ['-gf', '--graffiti'], + parser.add_argument( + '-gf', '--graffiti', { action: 'store', - type: 'string', + type: 'str', help: 'Graffiti for the reputation given to the user (in hex representation)', } ) - parser.addArgument( - ['-x', '--contract'], + parser.add_argument( + '-x', '--contract', { required: true, - type: 'string', + type: 'str', help: 'The Unirep contract address', } ) - const privkeyGroup = parser.addMutuallyExclusiveGroup({ required: true }) + const privkeyGroup = parser.add_mutually_exclusive_group({ required: true }) - privkeyGroup.addArgument( - ['-dp', '--prompt-for-eth-privkey'], + privkeyGroup.add_argument( + '-dp', '--prompt-for-eth-privkey', { - action: 'storeTrue', + action: 'store_true', help: 'Whether to prompt for the user\'s Ethereum private key and ignore -d / --eth-privkey', } ) - privkeyGroup.addArgument( - ['-d', '--eth-privkey'], + privkeyGroup.add_argument( + '-d', '--eth-privkey', { action: 'store', - type: 'string', + type: 'str', help: 'The deployer\'s Ethereum private key', } ) diff --git a/crypto/SMT/utils.ts b/crypto/SMT/utils.ts index a1cbf1c..fd67c2a 100644 --- a/crypto/SMT/utils.ts +++ b/crypto/SMT/utils.ts @@ -19,7 +19,6 @@ export const remove0x = (str: string): string => { * @returns the string with "0x". */ export const add0x = (str: string): string => { - str = str.padStart(64,"0") return str.startsWith('0x') ? str : '0x' + str } diff --git a/package-lock.json b/package-lock.json index 7cb225c..57458b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4148,7 +4148,8 @@ }, "@ethersproject/hash": { "version": "5.0.10", - "resolved": "", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.10.tgz", + "integrity": "sha512-Tf0bvs6YFhw28LuHnhlDWyr0xfcDxSXdwM4TcskeBbmXVSKLv3bJQEEEBFUcRX0fJuslR3gCVySEaSh7vuMx5w==", "dev": true, "optional": true, "requires": { @@ -4237,7 +4238,8 @@ }, "@ethersproject/transactions": { "version": "5.0.9", - "resolved": "", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.9.tgz", + "integrity": "sha512-0Fu1yhdFBkrbMjenEr+39tmDxuHmaw0pe9Jb18XuKoItj7Z3p7+UzdHLr2S/okvHDHYPbZE5gtANDdQ3ZL1nBA==", "dev": true, "optional": true, "requires": { diff --git a/scripts/buildSnarks.ts b/scripts/buildSnarks.ts index a27e52a..b0ba3b5 100644 --- a/scripts/buildSnarks.ts +++ b/scripts/buildSnarks.ts @@ -20,89 +20,89 @@ const main = () => { description: 'Compile a circom circuit and generate its proving key, verification key, and Solidity verifier' }) - parser.addArgument( - ['-i', '--input'], + parser.add_argument( + '-i', '--input', { help: 'The filepath of the circom file', required: true } ) - parser.addArgument( - ['-j', '--r1cs-out'], + parser.add_argument( + '-j', '--r1cs-out', { help: 'The filepath to save the compiled circom file', required: true } ) - parser.addArgument( - ['-w', '--wasm-out'], + parser.add_argument( + '-w', '--wasm-out', { help: 'The filepath to save the WASM file', required: true } ) - parser.addArgument( - ['-y', '--sym-out'], + parser.add_argument( + '-y', '--sym-out', { help: 'The filepath to save the SYM file', required: true } ) - parser.addArgument( - ['-v', '--vk-out'], + parser.add_argument( + '-v', '--vk-out', { help: 'The filepath to save the verification key', required: true } ) - parser.addArgument( - ['-p', '--pk-out'], + parser.add_argument( + '-p', '--pk-out', { help: 'The filepath to save the proving key (as a .json file)', required: true } ) - parser.addArgument( - ['-s', '--sol-out'], + parser.add_argument( + '-s', '--sol-out', { help: 'The filepath to save the Solidity verifier contract', required: true } ) - parser.addArgument( - ['-r', '--override'], + parser.add_argument( + '-r', '--override', { help: 'Override an existing compiled circuit, proving key, and verifying key if set to true; otherwise (and by default), skip generation if a file already exists', - action: 'storeTrue', + action: 'store_true', required: false, default: false, } ) - parser.addArgument( - ['-vs', '--verifier-name'], + parser.add_argument( + '-vs', '--verifier-name', { help: 'The desired name of the verifier contract', required: true } ) - parser.addArgument( - ['-pr', '--params-out'], + parser.add_argument( + '-pr', '--params-out', { help: 'The filepath to save the params file', required: true } ) - const args = parser.parseArgs() + const args = parser.parse_args() const vkOut = args.vk_out const solOut = args.sol_out const inputFile = args.input diff --git a/test/integration/Integration.ts b/test/integration/Integration.ts index 0de180c..90eb01d 100644 --- a/test/integration/Integration.ts +++ b/test/integration/Integration.ts @@ -304,6 +304,7 @@ describe('Integration', function () { GSTreeLeafIndex = newLeafEvents[i]?.args?._leafIndex.toNumber() } } + expect(GSTreeLeafIndex).to.equal(1) users[1].signUp(latestTransitionedToEpoch, GSTreeLeafIndex) console.log(`Second user signs up with commitment (${commitment}), in epoch ${latestTransitionedToEpoch} and GST leaf ${GSTreeLeafIndex}`) From 1fff4c7d73a5d23e57468e3d0144652891c7799d Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Tue, 8 Jun 2021 11:27:19 +0800 Subject: [PATCH 33/38] Trigger CI From 9eefd8c3701eaca3cc377f124c4ca5c3f3af463c Mon Sep 17 00:00:00 2001 From: "Ya-wen, Jeng" Date: Tue, 8 Jun 2021 11:39:22 +0800 Subject: [PATCH 34/38] Update node.js.yml --- .github/workflows/node.js.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 30b7965..f859c4c 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -3,11 +3,7 @@ name: Node.js CI -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] +on: [push, pull_request] jobs: build: From 0585dfe858d81a682ab7400f154eba72fef41005 Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Wed, 16 Jun 2021 18:38:59 +0800 Subject: [PATCH 35/38] seperate Unirep Social from Unirep --- cli/attesterSignUp.ts | 29 ++- cli/deploy.ts | 47 +++- cli/epochTransition.ts | 23 +- cli/genEpochKeyAndProof.ts | 19 +- cli/genReputationProofFromAttester.ts | 27 +- cli/leaveComment.ts | 42 ++-- cli/listAllPosts.ts | 22 +- cli/publishPost.ts | 39 +-- cli/test/testAllCommands.ts | 18 +- cli/userSignUp.ts | 22 +- cli/userStateTransition.ts | 23 +- cli/verifyEpochKeyProof.ts | 27 +- cli/verifyReputationProof.ts | 46 ++-- cli/verifyReputationProofFromAttester.ts | 29 ++- cli/vote.ts | 42 ++-- contracts/Address.sol | 2 - contracts/DomainObjs.sol | 17 +- contracts/Unirep.sol | 301 ++++++----------------- contracts/UnirepParameters.sol | 1 - contracts/UnirepSocial.sol | 287 +++++++++++++++++++++ core/UnirepState.ts | 12 - core/utils.ts | 111 ++++----- test/contracts/Attesting.ts | 3 +- test/contracts/EpochTransition.ts | 3 +- test/contracts/EventSequencing.ts | 5 +- test/contracts/Posting.ts | 121 +++------ test/contracts/SignUp.ts | 65 +++-- test/contracts/Vote.ts | 116 ++++----- test/integration/Integration.ts | 195 +++++++-------- 29 files changed, 897 insertions(+), 797 deletions(-) create mode 100644 contracts/UnirepSocial.sol diff --git a/cli/attesterSignUp.ts b/cli/attesterSignUp.ts index eaed216..52d109e 100644 --- a/cli/attesterSignUp.ts +++ b/cli/attesterSignUp.ts @@ -12,6 +12,7 @@ import { import { DEFAULT_ETH_PROVIDER } from './defaults' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" +import UnirepSocial from "../artifacts/contracts/UnirepSocial.sol/UnirepSocial.json" const configureSubparser = (subparsers: any) => { const parser = subparsers.add_parser( @@ -33,7 +34,7 @@ const configureSubparser = (subparsers: any) => { { required: true, type: 'str', - help: 'The Unirep contract address', + help: 'The Unirep Social contract address', } ) @@ -59,13 +60,13 @@ const configureSubparser = (subparsers: any) => { const attesterSignup = async (args: any) => { - // Unirep contract + // Unirep Social contract if (!validateEthAddress(args.contract)) { - console.error('Error: invalid Unirep contract address') + console.error('Error: invalid contract address') return } - const unirepAddress = args.contract + const unirepSocialAddress = args.contract // Ethereum provider const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER @@ -93,20 +94,33 @@ const attesterSignup = async (args: any) => { const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) const wallet = new ethers.Wallet(ethSk, provider) - if (! await contractExists(provider, unirepAddress)) { + if (! await contractExists(provider, unirepSocialAddress)) { console.error('Error: there is no contract deployed at the specified address') return } + const unirepSocialContract = new ethers.Contract( + unirepSocialAddress, + UnirepSocial.abi, + wallet, + ) + + const unirepAddress = await unirepSocialContract.unirep() + const unirepContract = new ethers.Contract( unirepAddress, Unirep.abi, - wallet, + provider, ) + + // Sign the message + const message = ethers.utils.solidityKeccak256(["address", "address"], [wallet.address, unirepAddress]) + const attesterSig = await wallet.signMessage(ethers.utils.arrayify(message)) + let tx try { - tx = await unirepContract.attesterSignUp({ gasLimit: 1000000 }) + tx = await unirepSocialContract.attesterSignUp(attesterSig, { gasLimit: 1000000 }) } catch(e) { console.error('Error: the transaction failed') if (e.message) { @@ -114,7 +128,6 @@ const attesterSignup = async (args: any) => { } return } - const ethAddr = ethers.utils.computeAddress(ethSk) const attesterId = await unirepContract.attesters(ethAddr) if (attesterId.toNumber() == 0) { diff --git a/cli/deploy.ts b/cli/deploy.ts index 820d419..a3f0105 100644 --- a/cli/deploy.ts +++ b/cli/deploy.ts @@ -1,12 +1,17 @@ +// @ts-ignore +import { ethers as hardhatEthers } from 'hardhat' import { ethers } from 'ethers' import { DEFAULT_AIRDROPPED_KARMA } from '../config/socialMedia' import { maxUsers } from '../config/testLocal' -import { deployUnirep, getTreeDepthsForTesting } from '../core/utils' +import { deployUnirep, deployUnirepSocial, getTreeDepthsForTesting } from '../core/utils' import { DEFAULT_ATTESTING_FEE, DEFAULT_EPOCH_LENGTH, DEFAULT_ETH_PROVIDER, DEFAULT_MAX_EPOCH_KEY_NONCE, DEFAULT_NUM_ATTESTATIONS_PER_EPOCH_KEY, DEFAULT_TREE_DEPTHS_CONFIG } from './defaults' +import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import { checkDeployerProviderConnection, + contractExists, genJsonRpcDeployer, promptPwd, + validateEthAddress, validateEthSk, } from './utils' @@ -35,6 +40,14 @@ const configureSubparser = (subparsers: any) => { } ) + deployParser.add_argument( + '-x', '--contract', + { + type: 'str', + help: 'Unirep contract address. If it is not provided, a Unirep contract will be created in the process.', + } + ) + deployParser.add_argument( '-e', '--eth-provider', { @@ -126,21 +139,45 @@ const deploy = async (args: any) => { // Ethereum provider const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER + const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) if (! (await checkDeployerProviderConnection(deployerPrivkey, ethProvider))) { console.error('Error: unable to connect to the Ethereum provider at', ethProvider) return } const deployer = genJsonRpcDeployer(deployerPrivkey, ethProvider) - debugger - const contract = await deployUnirep( + let unirepContract + if(args.contract == null){ + unirepContract = await deployUnirep( + deployer.signer, + treeDepths, + settings, + ) + } else { + // Check if Unirep address is valid + if (!validateEthAddress(args.contract)) { + console.error('Error: invalid Unirep contract address') + return + } + + if (! await contractExists(provider, args.contract)) { + console.error('Error: there is no contract deployed at the specified address') + return + } + + unirepContract = new ethers.Contract(args.contract, Unirep.abi) + } + + const unirepSocialContract = await deployUnirepSocial( deployer.signer, - treeDepths, + unirepContract.address, settings, ) - console.log('Unirep:', contract.address) + + console.log('Unirep:', unirepContract.address) + console.log('Unirep Social:', unirepSocialContract.address) } export { diff --git a/cli/epochTransition.ts b/cli/epochTransition.ts index 5c42976..2943186 100644 --- a/cli/epochTransition.ts +++ b/cli/epochTransition.ts @@ -12,6 +12,7 @@ import { import { DEFAULT_ETH_PROVIDER } from './defaults' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" +import UnirepSocial from "../artifacts/contracts/UnirepSocial.sol/UnirepSocial.json" const configureSubparser = (subparsers: any) => { const parser = subparsers.add_parser( @@ -41,7 +42,7 @@ const configureSubparser = (subparsers: any) => { { required: true, type: 'str', - help: 'The Unirep contract address', + help: 'The Unirep Social contract address', } ) @@ -67,13 +68,13 @@ const configureSubparser = (subparsers: any) => { const epochTransition = async (args: any) => { - // Unirep contract + // Unirep Social contract if (!validateEthAddress(args.contract)) { - console.error('Error: invalid Unirep contract address') + console.error('Error: invalid contract address') return } - const unirepAddress = args.contract + const unirepSocialAddress = args.contract // Ethereum provider const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER @@ -101,15 +102,23 @@ const epochTransition = async (args: any) => { const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) const wallet = new ethers.Wallet(ethSk, provider) - if (! await contractExists(provider, unirepAddress)) { + if (! await contractExists(provider, unirepSocialAddress)) { console.error('Error: there is no contract deployed at the specified address') return } + const unirepSocialContract = new ethers.Contract( + unirepSocialAddress, + UnirepSocial.abi, + wallet, + ) + + const unirepAddress = await unirepSocialContract.unirep() + const unirepContract = new ethers.Contract( unirepAddress, Unirep.abi, - wallet, + provider, ) // Fast-forward to end of epoch if in test environment @@ -122,7 +131,7 @@ const epochTransition = async (args: any) => { let tx try { const numEpochKeysToSeal = await unirepContract.getNumEpochKey(currentEpoch) - tx = await unirepContract.beginEpochTransition( + tx = await unirepSocialContract.beginEpochTransition( numEpochKeysToSeal, { gasLimit: 9000000 } ) diff --git a/cli/genEpochKeyAndProof.ts b/cli/genEpochKeyAndProof.ts index 2abcb72..e6c9c8c 100644 --- a/cli/genEpochKeyAndProof.ts +++ b/cli/genEpochKeyAndProof.ts @@ -16,6 +16,7 @@ import { genUserStateFromContract } from '../core' import { formatProofForVerifierContract, genVerifyEpochKeyProofAndPublicSignals, verifyEPKProof } from '../circuits/utils' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" +import UnirepSocial from "../artifacts/contracts/UnirepSocial.sol/UnirepSocial.json" import { epkProofPrefix, identityPrefix } from './prefix' const configureSubparser = (subparsers: any) => { @@ -65,31 +66,39 @@ const configureSubparser = (subparsers: any) => { { required: true, type: 'str', - help: 'The Unirep contract address', + help: 'The Unirep Social contract address', } ) } const genEpochKeyAndProof = async (args: any) => { - // Unirep contract + // Unirep Social contract if (!validateEthAddress(args.contract)) { - console.error('Error: invalid Unirep contract address') + console.error('Error: invalid contract address') return } - const unirepAddress = args.contract + const unirepSocialAddress = args.contract // Ethereum provider const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) - if (! await contractExists(provider, unirepAddress)) { + if (! await contractExists(provider, unirepSocialAddress)) { console.error('Error: there is no contract deployed at the specified address') return } + const unirepSocialContract = new ethers.Contract( + unirepSocialAddress, + UnirepSocial.abi, + provider, + ) + + const unirepAddress = await unirepSocialContract.unirep() + const unirepContract = new ethers.Contract( unirepAddress, Unirep.abi, diff --git a/cli/genReputationProofFromAttester.ts b/cli/genReputationProofFromAttester.ts index 59515d2..dd55fb7 100644 --- a/cli/genReputationProofFromAttester.ts +++ b/cli/genReputationProofFromAttester.ts @@ -1,5 +1,6 @@ import base64url from 'base64url' import { ethers as hardhatEthers } from 'hardhat' +import { ethers } from 'ethers' import { genIdentityCommitment, unSerialiseIdentity } from 'libsemaphore' import { @@ -10,6 +11,7 @@ import { import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' import { genUserStateFromContract } from '../core' +import UnirepSocial from "../artifacts/contracts/UnirepSocial.sol/UnirepSocial.json" import { formatProofForVerifierContract, genVerifyReputationFromAttesterProofAndPublicSignals, verifyProveReputationFromAttesterProof } from '../circuits/utils' import { stringifyBigInts } from 'maci-crypto' import { add0x } from '../crypto/SMT' @@ -94,7 +96,7 @@ const configureSubparser = (subparsers: any) => { { required: true, type: 'str', - help: 'The Unirep contract address', + help: 'The Unirep Social contract address', } ) } @@ -106,20 +108,20 @@ const genReputationProofFromAttester = async (args: any) => { console.warn('Warning: no reputation and graffiti to prove') } - // Unirep contract + // Unirep Social contract if (!validateEthAddress(args.contract)) { - console.error('Error: invalid Unirep contract address') + console.error('Error: invalid contract address') return } - const unirepAddress = args.contract + const unirepSocialAddress = args.contract // Ethereum provider const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) - if (! await contractExists(provider, unirepAddress)) { + if (! await contractExists(provider, unirepSocialAddress)) { console.error('Error: there is no contract deployed at the specified address') return } @@ -131,6 +133,14 @@ const genReputationProofFromAttester = async (args: any) => { const id = unSerialiseIdentity(decodedIdentity) const commitment = genIdentityCommitment(id) + const unirepSocialContract = new ethers.Contract( + unirepSocialAddress, + UnirepSocial.abi, + provider, + ) + + const unirepAddress = await unirepSocialContract.unirep() + // Gen reputation proof const userState = await genUserStateFromContract( provider, @@ -153,13 +163,6 @@ const genReputationProofFromAttester = async (args: any) => { const circuitInputs = await userState.genProveReputationFromAttesterCircuitInputs(attesterId, provePosRep, proveNegRep, proveRepDiff, proveGraffiti, minPosRep, maxNegRep, minRepDiff, graffitiPreImage) - // console.log('Proving reputation...') - // console.log('----------------------User State----------------------') - // console.log(userState.toJSON(4)) - // console.log('------------------------------------------------------') - // console.log('----------------------Circuit inputs----------------------') - // console.log(circuitInputs) - // console.log('----------------------------------------------------------') const results = await genVerifyReputationFromAttesterProofAndPublicSignals(stringifyBigInts(circuitInputs)) // TODO: Not sure if this validation is necessary diff --git a/cli/leaveComment.ts b/cli/leaveComment.ts index 3dd70e3..cc0974b 100644 --- a/cli/leaveComment.ts +++ b/cli/leaveComment.ts @@ -17,10 +17,11 @@ import { add0x } from '../crypto/SMT' import { genUserStateFromContract } from '../core' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" +import UnirepSocial from "../artifacts/contracts/UnirepSocial.sol/UnirepSocial.json" import { reputationProofPrefix, identityPrefix } from './prefix' -import { DEFAULT_COMMENT_KARMA, MAX_KARMA_BUDGET } from '../config/socialMedia' -import { formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyProveReputationProof } from '../circuits/utils' +import { DEFAULT_COMMENT_KARMA } from '../config/socialMedia' +import { formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, verifyProveReputationProof } from '../circuits/utils' import { genRandomSalt, stringifyBigInts } from 'maci-crypto' import { genEpochKey } from '../core/utils' @@ -44,7 +45,7 @@ const configureSubparser = (subparsers: any) => { { required: true, type: 'str', - help: 'The text written in the post', + help: 'The text written in the comment', } ) @@ -97,7 +98,7 @@ const configureSubparser = (subparsers: any) => { { required: true, type: 'str', - help: 'The Unirep contract address', + help: 'The Unirep Social contract address', } ) @@ -123,13 +124,13 @@ const configureSubparser = (subparsers: any) => { const leaveComment = async (args: any) => { - // Unirep contract + // Unirep Social contract if (!validateEthAddress(args.contract)) { - console.error('Error: invalid Unirep contract address') + console.error('Error: invalid contract address') return } - const unirepAddress = args.contract + const unirepSocialAddress = args.contract // Ethereum provider const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER @@ -157,17 +158,26 @@ const leaveComment = async (args: any) => { const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) const wallet = new ethers.Wallet(ethSk, provider) - if (! await contractExists(provider, unirepAddress)) { + if (! await contractExists(provider, unirepSocialAddress)) { console.error('Error: there is no contract deployed at the specified address') return } const startBlock = (args.start_block) ? args.start_block : DEFAULT_START_BLOCK + const unirepSocialContract = new ethers.Contract( + unirepSocialAddress, + UnirepSocial.abi, + wallet, + ) + + const unirepAddress = await unirepSocialContract.unirep() + const unirepContract = new ethers.Contract( unirepAddress, Unirep.abi, - wallet, + provider, ) + const attestingFee = await unirepContract.attestingFee() // Validate epoch key nonce @@ -208,12 +218,6 @@ const leaveComment = async (args: any) => { ) const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) - const nullifiers: BigInt[] = [] - - for (let i = 0; i < MAX_KARMA_BUDGET; i++) { - const variableName = 'main.karma_nullifiers['+i+']' - nullifiers.push(getSignalByNameViaSym('proveReputation', results['witness'], variableName)) - } // TODO: Not sure if this validation is necessary const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) @@ -235,16 +239,20 @@ const leaveComment = async (args: any) => { // generate a random comment ID const commentId = genRandomSalt() + // Sign the message + const message = ethers.utils.solidityKeccak256(["address", "address"], [wallet.address, unirepAddress]) + const attesterSig = await wallet.signMessage(ethers.utils.arrayify(message)) + let tx try { - tx = await unirepContract.leaveComment( + tx = await unirepSocialContract.leaveComment( + attesterSig, BigInt(args.post_id), commentId, epochKey, args.text, publicSignals, proof, - nullifiers, { value: attestingFee, gasLimit: 1000000 } ) } catch(e) { diff --git a/cli/listAllPosts.ts b/cli/listAllPosts.ts index 91505e2..fa5ea29 100644 --- a/cli/listAllPosts.ts +++ b/cli/listAllPosts.ts @@ -8,7 +8,7 @@ import { import { DEFAULT_ETH_PROVIDER } from './defaults' -import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" +import UnirepSocial from "../artifacts/contracts/UnirepSocial.sol/UnirepSocial.json" const configureSubparser = (subparsers: any) => { const parser = subparsers.add_parser( @@ -30,40 +30,40 @@ const configureSubparser = (subparsers: any) => { { required: true, type: 'str', - help: 'The Unirep contract address', + help: 'The Unirep Social contract address', } ) } const listAllPosts = async (args: any) => { - // Unirep contract + // Unirep Social contract if (!validateEthAddress(args.contract)) { - console.error('Error: invalid Unirep contract address') + console.error('Error: invalid contract address') return } - const unirepAddress = args.contract + const unirepSocialAddress = args.contract // Ethereum provider const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) - if (! await contractExists(provider, unirepAddress)) { + if (! await contractExists(provider, unirepSocialAddress)) { console.error('Error: there is no contract deployed at the specified address') return } - const unirepContract = new ethers.Contract( - unirepAddress, - Unirep.abi, + const unirepSocialContract = new ethers.Contract( + unirepSocialAddress, + UnirepSocial.abi, provider ) let postEvents - const postFilter = unirepContract.filters.PostSubmitted() - postEvents = await unirepContract.queryFilter(postFilter) + const postFilter = unirepSocialContract.filters.PostSubmitted() + postEvents = await unirepSocialContract.queryFilter(postFilter) for (let i = 0; i < postEvents.length; i++) { console.log('Post ', postEvents[i].args._postId.toString()) diff --git a/cli/publishPost.ts b/cli/publishPost.ts index 07bd905..19161d4 100644 --- a/cli/publishPost.ts +++ b/cli/publishPost.ts @@ -18,10 +18,11 @@ import { add0x } from '../crypto/SMT' import { genUserStateFromContract } from '../core' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" +import UnirepSocial from "../artifacts/contracts/UnirepSocial.sol/UnirepSocial.json" import { identityPrefix, reputationProofPrefix } from './prefix' -import { DEFAULT_POST_KARMA, MAX_KARMA_BUDGET } from '../config/socialMedia' -import { formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyProveReputationProof } from '../circuits/utils' +import { DEFAULT_POST_KARMA } from '../config/socialMedia' +import { formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, verifyProveReputationProof } from '../circuits/utils' import { genEpochKey } from '../core/utils' const configureSubparser = (subparsers: any) => { @@ -88,7 +89,7 @@ const configureSubparser = (subparsers: any) => { { required: true, type: 'str', - help: 'The Unirep contract address', + help: 'The Unirep Social contract address', } ) @@ -114,13 +115,13 @@ const configureSubparser = (subparsers: any) => { const publishPost = async (args: any) => { - // Unirep contract + // Unirep Social contract if (!validateEthAddress(args.contract)) { - console.error('Error: invalid Unirep contract address') + console.error('Error: invalid contract address') return } - const unirepAddress = args.contract + const unirepSocialAddress = args.contract // Ethereum provider const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER @@ -148,16 +149,24 @@ const publishPost = async (args: any) => { const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) const wallet = new ethers.Wallet(ethSk, provider) - if (! await contractExists(provider, unirepAddress)) { + if (! await contractExists(provider, unirepSocialAddress)) { console.error('Error: there is no contract deployed at the specified address') return } const startBlock = (args.start_block) ? args.start_block : DEFAULT_START_BLOCK + const unirepSocialContract = new ethers.Contract( + unirepSocialAddress, + UnirepSocial.abi, + wallet, + ) + + const unirepAddress = await unirepSocialContract.unirep() + const unirepContract = new ethers.Contract( unirepAddress, Unirep.abi, - wallet, + provider, ) const attestingFee = await unirepContract.attestingFee() // Validate epoch key nonce @@ -198,12 +207,6 @@ const publishPost = async (args: any) => { ) const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) - const nullifiers: BigInt[] = [] - - for (let i = 0; i < MAX_KARMA_BUDGET; i++) { - const variableName = 'main.karma_nullifiers['+i+']' - nullifiers.push(getSignalByNameViaSym('proveReputation', results['witness'], variableName)) - } // TODO: Not sure if this validation is necessary const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) @@ -224,16 +227,20 @@ const publishPost = async (args: any) => { // generate a random post ID const postId = genRandomSalt() + + // Sign the message + const message = ethers.utils.solidityKeccak256(["address", "address"], [wallet.address, unirepAddress]) + const attesterSig = await wallet.signMessage(ethers.utils.arrayify(message)) let tx try { - tx = await unirepContract.publishPost( + tx = await unirepSocialContract.publishPost( + attesterSig, postId, epochKey, args.text, publicSignals, proof, - nullifiers, { value: attestingFee, gasLimit: 1000000 } ) } catch(e) { diff --git a/cli/test/testAllCommands.ts b/cli/test/testAllCommands.ts index 11a6ca8..010b5cd 100644 --- a/cli/test/testAllCommands.ts +++ b/cli/test/testAllCommands.ts @@ -10,7 +10,7 @@ import { DEFAULT_ETH_PROVIDER } from '../../cli/defaults' import { genUnirepStateFromContract, UnirepState } from '../../core' import { exec } from './utils' -import Unirep from "../../artifacts/contracts/Unirep.sol/Unirep.json" +import UnirepSocial from "../../artifacts/contracts/UnirepSocial.sol/UnirepSocial.json" import { hashOne } from "maci-crypto" import { identityCommitmentPrefix, identityPrefix } from '../prefix' @@ -73,13 +73,15 @@ describe('test all CLI subcommands', function() { console.log(command) console.log(output) - const regMatch = output.match(/Unirep: (0x[a-fA-F0-9]{40})$/) - const unirepAddress = regMatch[1] + const unirepRegMatch = output.match(/Unirep: (0x[a-fA-F0-9]{40})/) + const regMatch = output.match(/Unirep Social: (0x[a-fA-F0-9]{40})$/) + const unirepAddress = unirepRegMatch[1] + const unirepSocialAddress = regMatch[1] const provider = new hardhatEthers.providers.JsonRpcProvider(DEFAULT_ETH_PROVIDER) unirepContract = new ethers.Contract( - unirepAddress, - Unirep.abi, + unirepSocialAddress, + UnirepSocial.abi, provider, ) @@ -274,8 +276,7 @@ describe('test all CLI subcommands', function() { ` -x ${unirepContract.address} ` + ` -epk ${epk} ` + ` -pf ${userRepProof} ` + - ` -th ${transactionHash}` + - ` -act publishPost` + ` -th ${transactionHash}` const output = exec(command).stdout.trim() @@ -359,8 +360,7 @@ describe('test all CLI subcommands', function() { ` -x ${unirepContract.address} ` + ` -epk ${epk} ` + ` -pf ${userRepProof} ` + - ` -th ${transactionHash}` + - ` -act vote` + ` -th ${transactionHash}` const output = exec(command).stdout.trim() diff --git a/cli/userSignUp.ts b/cli/userSignUp.ts index b7df1dc..fb7805f 100644 --- a/cli/userSignUp.ts +++ b/cli/userSignUp.ts @@ -14,7 +14,7 @@ import { DEFAULT_ETH_PROVIDER } from './defaults' import { add0x } from '../crypto/SMT' -import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" +import UnirepSocial from "../artifacts/contracts/UnirepSocial.sol/UnirepSocial.json" import { identityCommitmentPrefix } from './prefix' const configureSubparser = (subparsers: any) => { @@ -46,7 +46,7 @@ const configureSubparser = (subparsers: any) => { { required: true, type: 'str', - help: 'The Unirep contract address', + help: 'The Unirep Social contract address', } ) @@ -72,13 +72,13 @@ const configureSubparser = (subparsers: any) => { const userSignup = async (args: any) => { - // Unirep contract + // Unirep Social contract if (!validateEthAddress(args.contract)) { - console.error('Error: invalid Unirep contract address') + console.error('Error: invalid contract address') return } - const unirepAddress = args.contract + const unirepSocialAddress = args.contract // Ethereum provider const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER @@ -106,14 +106,14 @@ const userSignup = async (args: any) => { const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) const wallet = new ethers.Wallet(ethSk, provider) - if (! await contractExists(provider, unirepAddress)) { + if (! await contractExists(provider, unirepSocialAddress)) { console.error('Error: there is no contract deployed at the specified address') return } - const unirepContract = new ethers.Contract( - unirepAddress, - Unirep.abi, + const unirepSocialContract = new ethers.Contract( + unirepSocialAddress, + UnirepSocial.abi, wallet, ) @@ -123,7 +123,7 @@ const userSignup = async (args: any) => { let tx try { - tx = await unirepContract.userSignUp( + tx = await unirepSocialContract.userSignUp( commitment, { gasLimit: 1000000 } ) @@ -137,7 +137,7 @@ const userSignup = async (args: any) => { } const receipt = await tx.wait() - const epoch = unirepContract.interface.parseLog(receipt.logs[1]).args._epoch + const epoch = unirepSocialContract.interface.parseLog(receipt.logs[2]).args._epoch console.log('Transaction hash:', tx.hash) console.log('Sign up epoch:', epoch.toString()) } diff --git a/cli/userStateTransition.ts b/cli/userStateTransition.ts index 8cc2c63..028fccd 100644 --- a/cli/userStateTransition.ts +++ b/cli/userStateTransition.ts @@ -14,6 +14,7 @@ import { import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" +import UnirepSocial from "../artifacts/contracts/UnirepSocial.sol/UnirepSocial.json" import { genUserStateFromContract } from '../core' import { formatProofForVerifierContract, genVerifyUserStateTransitionProofAndPublicSignals, getSignalByNameViaSym, verifyUserStateTransitionProof } from '../circuits/utils' import { stringifyBigInts } from 'maci-crypto' @@ -57,7 +58,7 @@ const configureSubparser = (subparsers: any) => { { required: true, type: 'str', - help: 'The Unirep contract address', + help: 'The Unirep Social contract address', } ) @@ -83,13 +84,13 @@ const configureSubparser = (subparsers: any) => { const userStateTransition = async (args: any) => { - // Unirep contract + // Unirep Social contract if (!validateEthAddress(args.contract)) { - console.error('Error: invalid Unirep contract address') + console.error('Error: invalid contract address') return } - const unirepAddress = args.contract + const unirepSocialAddress = args.contract // Ethereum provider const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER @@ -117,16 +118,25 @@ const userStateTransition = async (args: any) => { const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) const wallet = new ethers.Wallet(ethSk, provider) - if (! await contractExists(provider, unirepAddress)) { + if (! await contractExists(provider, unirepSocialAddress)) { console.error('Error: there is no contract deployed at the specified address') return } + const unirepSocialContract = new ethers.Contract( + unirepSocialAddress, + UnirepSocial.abi, + wallet, + ) + + const unirepAddress = await unirepSocialContract.unirep() + const unirepContract = new ethers.Contract( unirepAddress, Unirep.abi, wallet, ) + const startBlock = (args.start_block) ? args.start_block : DEFAULT_START_BLOCK const nullifierTreeDepth = BigNumber.from((await unirepContract.treeDepths())["nullifierTreeDepth"]).toNumber() @@ -191,7 +201,7 @@ const userStateTransition = async (args: any) => { let tx try { - tx = await unirepContract.updateUserStateRoot( + tx = await unirepSocialContract.updateUserStateRoot( newGSTLeaf, outputAttestationNullifiers, outputEPKNullifiers, @@ -200,6 +210,7 @@ const userStateTransition = async (args: any) => { epochTreeRoot, nullifierTreeRoot, formatProofForVerifierContract(results['proof']), + { gasLimit: 9000000 } ) } catch(e) { console.error('Error: the transaction failed') diff --git a/cli/verifyEpochKeyProof.ts b/cli/verifyEpochKeyProof.ts index cb8338d..cb588aa 100644 --- a/cli/verifyEpochKeyProof.ts +++ b/cli/verifyEpochKeyProof.ts @@ -12,7 +12,7 @@ import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' import { genUnirepStateFromContract } from '../core' import { add0x } from '../crypto/SMT' -import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" +import UnirepSocial from "../artifacts/contracts/UnirepSocial.sol/UnirepSocial.json" import { epkProofPrefix } from './prefix' const configureSubparser = (subparsers: any) => { @@ -62,32 +62,40 @@ const configureSubparser = (subparsers: any) => { { required: true, type: 'str', - help: 'The Unirep contract address', + help: 'The Unirep Social contract address', } ) } const verifyEpochKeyProof = async (args: any) => { - // Unirep contract + // Unirep Social contract if (!validateEthAddress(args.contract)) { - console.error('Error: invalid Unirep contract address') + console.error('Error: invalid contract address') return } - const unirepAddress = args.contract + const unirepSocialAddress = args.contract // Ethereum provider const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) - if (! await contractExists(provider, unirepAddress)) { + if (! await contractExists(provider, unirepSocialAddress)) { console.error('Error: there is no contract deployed at the specified address') return } const startBlock = (args.start_block) ? args.start_block : DEFAULT_START_BLOCK + + const unirepSocialContract = new ethers.Contract( + unirepSocialAddress, + UnirepSocial.abi, + provider, + ) + + const unirepAddress = unirepSocialContract.unirep() const unirepState = await genUnirepStateFromContract( provider, unirepAddress, @@ -105,12 +113,7 @@ const verifyEpochKeyProof = async (args: any) => { epk, ] - const unirepContract = new ethers.Contract( - unirepAddress, - Unirep.abi, - provider, - ) - const isProofValid = await unirepContract.verifyEpochKeyValidity( + const isProofValid = await unirepSocialContract.verifyEpochKeyValidity( publicInput, proof, ) diff --git a/cli/verifyReputationProof.ts b/cli/verifyReputationProof.ts index 2ae5c3f..db47c0a 100644 --- a/cli/verifyReputationProof.ts +++ b/cli/verifyReputationProof.ts @@ -13,8 +13,10 @@ import { genUnirepStateFromContract } from '../core' import { add0x } from '../crypto/SMT' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" +import UnirepSocial from "../artifacts/contracts/UnirepSocial.sol/UnirepSocial.json" import { reputationProofPrefix } from './prefix' import { hash5 } from 'maci-crypto' +import { MAX_KARMA_BUDGET } from '../config/socialMedia' const configureSubparser = (subparsers: any) => { const parser = subparsers.add_parser( @@ -58,15 +60,6 @@ const configureSubparser = (subparsers: any) => { } ) - parser.add_argument( - '-act', '--action', - { - required: true, - type: 'str', - help: 'Which action the user spends reputation', - } - ) - parser.add_argument( '-th', '--transaction-hash', { @@ -98,49 +91,39 @@ const configureSubparser = (subparsers: any) => { { required: true, type: 'str', - help: 'The Unirep contract address', + help: 'The Unirep Social contract address', } ) } const verifyReputationProof = async (args: any) => { - // Unirep contract + // Unirep Social contract if (!validateEthAddress(args.contract)) { - console.error('Error: invalid Unirep contract address') + console.error('Error: invalid contract address') return } - const unirepAddress = args.contract + const unirepSocialAddress = args.contract // Ethereum provider const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) - if (! await contractExists(provider, unirepAddress)) { + if (! await contractExists(provider, unirepSocialAddress)) { console.error('Error: there is no contract deployed at the specified address') return } - enum actions { - publishPost, - leaveComment, - vote - } - - if (!(args.action in actions)) { - console.error(`Error: there is no such action ${args.action}`) - return - } - - const unirepContract = new ethers.Contract( - unirepAddress, - Unirep.abi, + const unirepSocialContract = new ethers.Contract( + unirepSocialAddress, + UnirepSocial.abi, provider, ) const startBlock = (args.start_block) ? args.start_block : DEFAULT_START_BLOCK + const unirepAddress = await unirepSocialContract.unirep() const unirepState = await genUnirepStateFromContract( provider, unirepAddress, @@ -156,9 +139,8 @@ const verifyReputationProof = async (args: any) => { // get reputation nullifiers from contract const tx = await provider.getTransaction(args.transaction_hash) - const iface = new ethers.utils.Interface(Unirep.abi) - const decodedData = iface.decodeFunctionData(args.action, tx.data) - const nullifiers = decodedData['karmaNullifiers'].map((n) => BigInt(n)) + const decodedData = unirepSocialContract.interface.parseTransaction(tx) + const nullifiers = decodedData.args.publicSignals.slice(0, MAX_KARMA_BUDGET).map((n) => BigInt(n)) const proveKarmaNullifiers = BigInt(1) let proveKarmaAmount: number = 0 @@ -187,7 +169,7 @@ const verifyReputationProof = async (args: any) => { minRep ]) - const isProofValid = await unirepContract.verifyReputation( + const isProofValid = await unirepSocialContract.verifyReputation( publicInput, proof ) diff --git a/cli/verifyReputationProofFromAttester.ts b/cli/verifyReputationProofFromAttester.ts index 2b81ec1..86949a8 100644 --- a/cli/verifyReputationProofFromAttester.ts +++ b/cli/verifyReputationProofFromAttester.ts @@ -12,7 +12,7 @@ import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' import { genUnirepStateFromContract } from '../core' import { add0x } from '../crypto/SMT' -import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" +import UnirepSocial from "../artifacts/contracts/UnirepSocial.sol/UnirepSocial.json" import { reputationProofFromAttesterPrefix } from './prefix' const configureSubparser = (subparsers: any) => { @@ -103,37 +103,39 @@ const configureSubparser = (subparsers: any) => { { required: true, type: 'str', - help: 'The Unirep contract address', + help: 'The Unirep Social contract address', } ) } const verifyReputationProofFromAttester = async (args: any) => { - // Unirep contract + // Unirep Social contract if (!validateEthAddress(args.contract)) { - console.error('Error: invalid Unirep contract address') + console.error('Error: invalid contract address') return } - const unirepAddress = args.contract + const unirepSocialAddress = args.contract // Ethereum provider const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) - if (! await contractExists(provider, unirepAddress)) { + if (! await contractExists(provider, unirepSocialAddress)) { console.error('Error: there is no contract deployed at the specified address') return } - const unirepContract = new ethers.Contract( - unirepAddress, - Unirep.abi, + const unirepSocialContract = new ethers.Contract( + unirepSocialAddress, + UnirepSocial.abi, provider, ) + const unirepAddress = await unirepSocialContract.unirep() + const startBlock = (args.start_block) ? args.start_block : DEFAULT_START_BLOCK const unirepState = await genUnirepStateFromContract( provider, @@ -159,7 +161,8 @@ const verifyReputationProofFromAttester = async (args: any) => { const GSTreeRoot = unirepState.genGSTree(epoch).root const nullifierTree = await unirepState.genNullifierTree() const nullifierTreeRoot = nullifierTree.getRootHash() - const publicInput = [epoch, + const publicInput = [ + epoch, GSTreeRoot, nullifierTreeRoot, attesterId, @@ -170,8 +173,10 @@ const verifyReputationProofFromAttester = async (args: any) => { minRepDiff, minPosRep, maxNegRep, - graffitiPreImage] - const isProofValid = await unirepContract.verifyReputationFromAttester( + graffitiPreImage + ] + + const isProofValid = await unirepSocialContract.verifyReputationFromAttester( publicInput, proof ) diff --git a/cli/vote.ts b/cli/vote.ts index 3e91047..1f6caff 100644 --- a/cli/vote.ts +++ b/cli/vote.ts @@ -16,14 +16,14 @@ import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' import { genEpochKey } from '../core/utils' import { genUserStateFromContract } from '../core' -import { formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyProveReputationProof } from '../test/circuits/utils' +import { formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, verifyProveReputationProof } from '../test/circuits/utils' import { add0x } from '../crypto/SMT' import { Attestation } from '../core' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" +import UnirepSocial from "../artifacts/contracts/UnirepSocial.sol/UnirepSocial.json" import { reputationProofPrefix, identityPrefix } from './prefix' -import { MAX_KARMA_BUDGET } from '../config/socialMedia' const configureSubparser = (subparsers: any) => { const parser = subparsers.add_parser( @@ -114,7 +114,7 @@ const configureSubparser = (subparsers: any) => { { required: true, type: 'str', - help: 'The Unirep contract address', + help: 'The Unirep Social contract address', } ) @@ -140,9 +140,9 @@ const configureSubparser = (subparsers: any) => { const vote = async (args: any) => { - // Unirep contract + // Unirep Social contract if (!validateEthAddress(args.contract)) { - console.error('Error: invalid Unirep contract address') + console.error('Error: invalid contract address') return } @@ -157,7 +157,7 @@ const vote = async (args: any) => { console.error('Error: upvote and downvote cannot be at the same time') return } - const unirepAddress = args.contract + const unirepSocialAddress = args.contract // Ethereum provider const ethProvider = args.eth_provider ? args.eth_provider : DEFAULT_ETH_PROVIDER @@ -185,15 +185,22 @@ const vote = async (args: any) => { const provider = new hardhatEthers.providers.JsonRpcProvider(ethProvider) const wallet = new ethers.Wallet(ethSk, provider) - if (! await contractExists(provider, unirepAddress)) { + if (! await contractExists(provider, unirepSocialAddress)) { console.error('Error: there is no contract deployed at the specified address') return } + const unirepSocialContract = new ethers.Contract( + unirepSocialAddress, + UnirepSocial.abi, + wallet, + ) + const unirepAddress = await unirepSocialContract.unirep() + const unirepContract = new ethers.Contract( unirepAddress, Unirep.abi, - wallet, + provider, ) const startBlock = (args.start_block) ? args.start_block : DEFAULT_START_BLOCK const attestingFee = await unirepContract.attestingFee() @@ -250,12 +257,6 @@ const vote = async (args: any) => { ) const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) - const nullifiers: BigInt[] = [] - - for (let i = 0; i < MAX_KARMA_BUDGET; i++) { - const variableName = 'main.karma_nullifiers['+i+']' - nullifiers.push(getSignalByNameViaSym('proveReputation', results['witness'], variableName)) - } // TODO: Not sure if this validation is necessary const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) @@ -283,17 +284,24 @@ const vote = async (args: any) => { overwriteGraffiti, ) + // Sign the message + const message = ethers.utils.solidityKeccak256(["address", "address"], [wallet.address, unirepAddress]) + const attesterSig = await wallet.signMessage(ethers.utils.arrayify(message)) + + // set vote fee + const voteFee = attestingFee.mul(2) + console.log(`Attesting to epoch key ${args.epoch_key} with pos rep ${upvoteValue}, neg rep ${downvoteValue} and graffiti ${graffiti.toString(16)} (overwrite graffit: ${overwriteGraffiti})`) let tx try { - tx = await unirepContract.vote( + tx = await unirepSocialContract.vote( + attesterSig, attestationToEpochKey, BigInt(add0x(args.epoch_key)), fromEpochKey, publicSignals, proof, - nullifiers, - { value: attestingFee, gasLimit: 1000000 } + { value: voteFee, gasLimit: 3000000 } ) } catch(e) { console.error('Error: the transaction failed') diff --git a/contracts/Address.sol b/contracts/Address.sol index a6edf0d..b2f6fae 100644 --- a/contracts/Address.sol +++ b/contracts/Address.sol @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: MIT - pragma solidity 0.7.6; /** diff --git a/contracts/DomainObjs.sol b/contracts/DomainObjs.sol index 4662132..974e5d8 100644 --- a/contracts/DomainObjs.sol +++ b/contracts/DomainObjs.sol @@ -7,16 +7,16 @@ contract DomainObjs is Hasher { struct StateLeaf { uint256 identityCommitment; uint256 userStateRoot; - uint256 positiveKarma; - uint256 negativeKarma; + uint256 positiveRepScore; + uint256 negativeRepScore; } function hashStateLeaf(StateLeaf memory _stateLeaf) public pure returns (uint256) { uint256[5] memory hashElements; hashElements[0] = _stateLeaf.identityCommitment; hashElements[1] = _stateLeaf.userStateRoot; - hashElements[2] = _stateLeaf.positiveKarma; - hashElements[3] = _stateLeaf.negativeKarma; + hashElements[2] = _stateLeaf.positiveRepScore; + hashElements[3] = _stateLeaf.negativeRepScore; return hash5(hashElements); } @@ -33,14 +33,7 @@ contract DomainObjs is Hasher { bool overwriteGraffiti; } - struct Karma { - // Total positive karma - uint256 positiveKarma; - // Total negative karma - uint256 negativeKarma; - } - - function hashAttestation(Attestation memory attestation) internal returns (uint256) { + function hashAttestation(Attestation memory attestation) internal pure returns (uint256) { uint256 overwriteGraffiti = attestation.overwriteGraffiti ? 1 : 0; uint256[5] memory attestationData; attestationData[0] = attestation.attesterId; diff --git a/contracts/Unirep.sol b/contracts/Unirep.sol index 8bcb5de..7e6e87c 100644 --- a/contracts/Unirep.sol +++ b/contracts/Unirep.sol @@ -48,20 +48,6 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { // The maximum number of signups allowed uint256 immutable public maxUsers; - enum actionChoices { UpVote, DownVote, Post, Comment } - - // The default given karma when users sign up - uint256 immutable public defaultKarma = 20; - - // The amount of karma required to publish a post - uint256 immutable public postKarma = 10; - - // The amount of karma required to submit a comment - uint256 immutable public commentKarma = 5; - - // The amount of karma airdropped to user after user state transition - uint256 immutable public airdroppedKarma = 20; - uint256 public numUserSignUps = 0; uint256 public nextGSTLeafIndex = 0; @@ -94,9 +80,6 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { // This is used to limit number of attestations per epoch key mapping(uint256 => uint8) public numAttestationsToEpochKey; - // Indicate if the karma nullifiers is submitted - mapping(uint256 => bool) public isKarmaNullifierSubmitted; - struct EpochKeyList { uint256 numKeys; mapping(uint256 => uint256) keys; @@ -119,29 +102,6 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { uint256 _hashedLeaf ); - event PostSubmitted( - uint256 indexed _epoch, - uint256 indexed _postId, - uint256 indexed _epochKey, - string _hahsedContent, - ProofsRelated proof - ); - - event CommentSubmitted( - uint256 indexed _epoch, - uint256 indexed _commentId, - uint256 indexed _epochKey, - uint256 _postId, - string _hahsedContent, - ProofsRelated proof - ); - - event ReputationNullifierSubmitted( - uint256 indexed _epoch, - actionChoices actionChoice, - uint256[] karmaNullifiers - ); - event AttestationSubmitted( uint256 indexed _epoch, uint256 indexed _epochKey, @@ -183,7 +143,7 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { uint8 _numAttestationsPerEpochKey, uint256 _epochLength, uint256 _attestingFee - ) public { + ) { treeDepths = _treeDepths; @@ -209,7 +169,6 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { // Calculate and store the empty user state tree root. This value must // be set before we compute empty global state tree root later emptyUserStateRoot = calcEmptyUserStateTreeRoot(_treeDepths.userStateTreeDepth); - emptyGlobalStateTreeRoot = calcEmptyGlobalStateTreeRoot(_treeDepths.globalStateTreeDepth); attestingFee = _attestingFee; @@ -220,7 +179,7 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { * leaf into the state tree. * @param _identityCommitment Commitment of the user's identity which is a semaphore identity. */ - function userSignUp(uint256 _identityCommitment) external { + function userSignUp(uint256 _identityCommitment, uint256 _airdroppedRepScore) external { require(hasUserSignedUp[_identityCommitment] == false, "Unirep: the user has already signed up"); require(numUserSignUps < maxUsers, "Unirep: maximum number of signups reached"); @@ -228,8 +187,8 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { StateLeaf memory stateLeaf; stateLeaf.identityCommitment = _identityCommitment; stateLeaf.userStateRoot = emptyUserStateRoot; - stateLeaf.positiveKarma = defaultKarma; - stateLeaf.negativeKarma = 0; + stateLeaf.positiveRepScore = _airdroppedRepScore; + stateLeaf.negativeRepScore = 0; uint256 hashedLeaf = hashStateLeaf(stateLeaf); hasUserSignedUp[_identityCommitment] = true; @@ -241,16 +200,7 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { nextGSTLeafIndex ++; } - function attesterSignUp() external { - require(attesters[msg.sender] == 0, "Unirep: attester has already signed up"); - - attesters[msg.sender] = nextAttesterId; - nextAttesterId ++; - } - - function attesterSignUpViaRelayer(address attester, bytes calldata signature) external { - require(attesters[attester] == 0, "Unirep: attester has already signed up"); - + function verifySignature(address attester, bytes calldata signature) internal view { // Attester signs over it's own address concatenated with this contract address bytes32 messageHash = keccak256( abi.encodePacked( @@ -264,155 +214,59 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { ECDSA.recover(messageHash, signature) == attester, "Unirep: invalid attester sign up signature" ); - - attesters[attester] = nextAttesterId; - nextAttesterId ++; } - function spendReputation( - uint256 epochKey, - ProofsRelated memory proof, - uint256[] memory karmaNullifiers, - uint256 spendReputationAmount, - actionChoices actionChoice - ) internal { - // Determine if karma nullifiers are submitted before - for (uint i = 0; i < spendReputationAmount; i++) { - require(isKarmaNullifierSubmitted[karmaNullifiers[i]] == false, "Unirep: the nullifier has been submitted"); - isKarmaNullifierSubmitted[karmaNullifiers[i]] = true; - } + function attesterSignUp() external { + require(attesters[msg.sender] == 0, "Unirep: attester has already signed up"); - // Verify the proof - proof.isValid = reputationVerifier.verifyProof(proof.a, proof.b, proof.c, proof.publicSignals); - require(proof.isValid, "Unirep: the proof is not valid"); - - // Verify epoch key and its proof - // Then submit negative attestation to this epoch key - Attestation memory attestation; - attestation.attesterId = attesters[msg.sender]; - attestation.posRep = 0; - attestation.negRep = spendReputationAmount; - attestation.graffiti = 0; - attestation.overwriteGraffiti = false; - submitAttestation(attestation, epochKey); - - emit Sequencer("ReputationNullifierSubmitted"); - emit ReputationNullifierSubmitted( - currentEpoch, - actionChoice, - karmaNullifiers - ); + attesters[msg.sender] = nextAttesterId; + nextAttesterId ++; } - function publishPost( - uint256 postId, - uint256 epochKey, - string calldata hashedContent, - uint256[] calldata _publicSignals, - uint256[8] calldata _proof, - uint256[] calldata karmaNullifiers) external payable { - - ProofsRelated memory proof; - // Unpack the snark proof - ( - proof.publicSignals, - proof.a, - proof.b, - proof.c - ) = unpackProof(_publicSignals, _proof); + function attesterSignUpViaRelayer(address attester, bytes calldata signature) external { + require(attesters[attester] == 0, "Unirep: attester has already signed up"); + verifySignature(attester, signature); - spendReputation(epochKey, proof, karmaNullifiers, postKarma, actionChoices.Post); - - emit Sequencer("PostSubmitted"); - emit PostSubmitted( - currentEpoch, - postId, - epochKey, - hashedContent, - proof - ); + attesters[attester] = nextAttesterId; + nextAttesterId ++; } - function leaveComment( - uint256 postId, - uint256 commentId, - uint256 epochKey, - string calldata hashedContent, - uint256[] calldata _publicSignals, - uint256[8] calldata _proof, - uint256[] calldata karmaNullifiers) external payable { - - ProofsRelated memory proof; - // Unpack the snark proof - ( - proof.publicSignals, - proof.a, - proof.b, - proof.c - ) = unpackProof(_publicSignals, _proof); - - spendReputation(epochKey, proof, karmaNullifiers, commentKarma, actionChoices.Comment); - - emit Sequencer("CommentSubmitted"); - emit CommentSubmitted( - currentEpoch, - commentId, - epochKey, - postId, - hashedContent, - proof - ); + function submitAttestationViaRelayer( + address attester, + bytes calldata signature, + Attestation memory attestation, + uint256 epochKey + ) public payable { + verifySignature(attester, signature); + require(msg.value == attestingFee, "Unirep: no attesting fee or incorrect amount"); + // Add to the cumulated attesting fee + collectedAttestingFee = collectedAttestingFee.add(msg.value); + processAttestation(attester, attestation, epochKey); } - function vote( - Attestation calldata attestation, - uint256 toEpochKey, - uint256 fromEpochKey, - uint256[] calldata _publicSignals, - uint256[8] calldata _proof, - uint256[] calldata karmaNullifiers) external payable { - require((attestation.posRep + attestation.negRep) > 0, "Unirep: should submit a positive vote value"); - require(attestation.posRep * attestation.negRep == 0, "Unirep: should only choose to upvote or to downvote"); - - ProofsRelated memory proof; - // Unpack the snark proof - ( - proof.publicSignals, - proof.a, - proof.b, - proof.c - ) = unpackProof(_publicSignals, _proof); - - actionChoices action; - if(attestation.posRep > 0){ - action = actionChoices.UpVote; - } else{ - action = actionChoices.DownVote; - } - - // Spend attester's reputation - spendReputation(fromEpochKey, proof, karmaNullifiers, attestation.posRep + attestation.negRep, action); - - // Send Reputation to others - submitAttestation(attestation, toEpochKey); + function submitAttestation( + Attestation memory attestation, + uint256 epochKey + ) public payable { + require(msg.value == attestingFee, "Unirep: no attesting fee or incorrect amount"); + // Add to the cumulated attesting fee + collectedAttestingFee = collectedAttestingFee.add(msg.value); + processAttestation(msg.sender, attestation, epochKey); } - function submitAttestation( + function processAttestation( + address attester, Attestation memory attestation, - uint256 epochKey ) public payable { - require(attesters[msg.sender] > 0, "Unirep: attester has not signed up yet"); - require(attesters[msg.sender] == attestation.attesterId, "Unirep: mismatched attesterId"); + uint256 epochKey ) internal { + require(attesters[attester] > 0, "Unirep: attester has not signed up yet"); + require(attesters[attester] == attestation.attesterId, "Unirep: mismatched attesterId"); require(isEpochKeyHashChainSealed[epochKey] == false, "Unirep: hash chain of this epoch key has been sealed"); - require(attestationsMade[epochKey][msg.sender] == false, "Unirep: attester has already attested to this epoch key"); + require(attestationsMade[epochKey][attester] == false, "Unirep: attester has already attested to this epoch key"); require(numAttestationsToEpochKey[epochKey] < numAttestationsPerEpochKey, "Unirep: no more attestations to the epoch key is allowed"); - require(msg.value == attestingFee, "Unirep: no attesting fee or incorrect amount"); - + // Before attesting to a given epoch key, an attester must // verify validity of the epoch key using `verifyEpochKeyValidity` function. - // Add to the cumulated attesting fee - collectedAttestingFee = collectedAttestingFee.add(msg.value); - // Add the epoch key to epoch key list of current epoch // if it is been attested to the first time. uint256 index; @@ -433,13 +287,13 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { ); numAttestationsToEpochKey[epochKey] += 1; - attestationsMade[epochKey][msg.sender] = true; + attestationsMade[epochKey][attester] = true; emit Sequencer("AttestationSubmitted"); emit AttestationSubmitted( currentEpoch, epochKey, - msg.sender, + attester, attestation ); } @@ -490,7 +344,7 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { require(_transitionFromEpoch < currentEpoch, "Can not transition from epoch that's greater or equal to current epoch"); require(_attestationNullifiers.length == numAttestationsPerEpoch, "Unirep: invalid number of nullifiers"); require(_epkNullifiers.length == numEpochKeyNoncePerEpoch, "Unirep: invalid number of epk nullifiers"); - + UserTransitionedRelated memory userTransitionedData; userTransitionedData.fromEpoch = _transitionFromEpoch; userTransitionedData.fromGlobalStateTree = _fromGlobalStateTree; @@ -517,7 +371,7 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { // uint256 _globalStateTree, // uint256 _epoch, // uint256 _epochKey, - uint256[] memory _publicSignals, + uint256[] memory publicSignals, uint256[8] memory _proof) public view returns (bool) { // Before attesting to a given epoch key, an attester must verify validity of the epoch key: // 1. user has signed up @@ -533,9 +387,9 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { // Ensure that each public input is within range of the snark scalar // field. // TODO: consider having more granular revert reasons - for (uint8 i = 0; i < _publicSignals.length; i++) { + for (uint8 i = 0; i < publicSignals.length; i++) { require( - _publicSignals[i] < SNARK_SCALAR_FIELD, + publicSignals[i] < SNARK_SCALAR_FIELD, "Unirep: each public signal must be lt the snark scalar field" ); } @@ -543,14 +397,13 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { ProofsRelated memory proof; // Unpack the snark proof ( - proof.publicSignals, proof.a, proof.b, proof.c - ) = unpackProof(_publicSignals, _proof); + ) = unpackProof(_proof); // Verify the proof - proof.isValid = epkValidityVerifier.verifyProof(proof.a, proof.b, proof.c, proof.publicSignals); + proof.isValid = epkValidityVerifier.verifyProof(proof.a, proof.b, proof.c, publicSignals); return proof.isValid; } @@ -560,6 +413,7 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { uint256[] calldata _epkNullifiers, uint256 _transitionFromEpoch, uint256 _fromGlobalStateTree, + uint256 _airdroppedReputation, uint256 _fromEpochTree, uint256[8] calldata _proof) external view returns (bool) { // Verify validity of new user state: @@ -581,7 +435,7 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { } _publicSignals[2 + numAttestationsPerEpoch + numEpochKeyNoncePerEpoch - 1] = _transitionFromEpoch; _publicSignals[3 + numAttestationsPerEpoch + numEpochKeyNoncePerEpoch - 1] = _fromGlobalStateTree; - _publicSignals[4 + numAttestationsPerEpoch + numEpochKeyNoncePerEpoch - 1] = airdroppedKarma; + _publicSignals[4 + numAttestationsPerEpoch + numEpochKeyNoncePerEpoch - 1] = _airdroppedReputation; _publicSignals[5 + numAttestationsPerEpoch + numEpochKeyNoncePerEpoch - 1] = _fromEpochTree; // Ensure that each public input is within range of the snark scalar @@ -593,24 +447,22 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { "Unirep: each public signal must be lt the snark scalar field" ); } - ProofsRelated memory proof; // Unpack the snark proof - ( - proof.publicSignals, + ( proof.a, proof.b, proof.c - ) = unpackProof(_publicSignals, _proof); + ) = unpackProof(_proof); // Verify the proof - proof.isValid = userStateTransitionVerifier.verifyProof(proof.a, proof.b, proof.c, proof.publicSignals); + proof.isValid = userStateTransitionVerifier.verifyProof(proof.a, proof.b, proof.c, _publicSignals); return proof.isValid; } function verifyReputation( - uint256[] calldata _publicSignals, - uint256[8] calldata _proof) external view returns (bool) { + uint256[] memory publicSignals, + uint256[8] memory _proof) public view returns (bool) { // User prove his reputation by an attester: // 1. User exists in GST // 2. It is the latest state user transition to @@ -621,30 +473,29 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { // Ensure that each public input is within range of the snark scalar // field. // TODO: consider having more granular revert reasons - for (uint8 i = 0; i < _publicSignals.length; i++) { + for (uint8 i = 0; i < publicSignals.length; i++) { require( - _publicSignals[i] < SNARK_SCALAR_FIELD, + publicSignals[i] < SNARK_SCALAR_FIELD, "Unirep: each public signal must be lt the snark scalar field" ); } ProofsRelated memory proof; // Unpack the snark proof - ( - proof.publicSignals, + ( proof.a, proof.b, proof.c - ) = unpackProof(_publicSignals, _proof); + ) = unpackProof(_proof); // Verify the proof - proof.isValid = reputationVerifier.verifyProof(proof.a, proof.b, proof.c, proof.publicSignals); + proof.isValid = reputationVerifier.verifyProof(proof.a, proof.b, proof.c, publicSignals); return proof.isValid; } function verifyReputationFromAttester( - uint256[] calldata _publicSignals, - uint256[8] calldata _proof) external view returns (bool) { + uint256[] memory publicSignals, + uint256[8] memory _proof) public view returns (bool) { // User prove his reputation by an attester: // 1. User exists in GST // 2. It is the latest state user transition to @@ -655,24 +506,23 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { // Ensure that each public input is within range of the snark scalar // field. // TODO: consider having more granular revert reasons - for (uint8 i = 0; i < _publicSignals.length; i++) { + for (uint8 i = 0; i < publicSignals.length; i++) { require( - _publicSignals[i] < SNARK_SCALAR_FIELD, + publicSignals[i] < SNARK_SCALAR_FIELD, "Unirep: each public signal must be lt the snark scalar field" ); } ProofsRelated memory proof; // Unpack the snark proof - ( - proof.publicSignals, + ( proof.a, proof.b, proof.c - ) = unpackProof(_publicSignals, _proof); + ) = unpackProof(_proof); // Verify the proof - proof.isValid = reputationFromAttesterVerifier.verifyProof(proof.a, proof.b, proof.c, proof.publicSignals); + proof.isValid = reputationFromAttesterVerifier.verifyProof(proof.a, proof.b, proof.c, publicSignals); return proof.isValid; } @@ -689,17 +539,14 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { * and c array values that the zk-SNARK verifier's verifyProof accepts. */ function unpackProof( - uint256[] memory _publicSignals, uint256[8] memory _proof ) public pure returns ( - uint256[] memory, uint256[2] memory, uint256[2][2] memory, uint256[2] memory ) { return ( - _publicSignals, [_proof[0], _proof[1]], [ [_proof[2], _proof[3]], @@ -713,9 +560,8 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { StateLeaf memory stateLeaf = StateLeaf({ identityCommitment: 0, userStateRoot: emptyUserStateRoot, - // DefaultKarma - positiveKarma: 20, - negativeKarma: 0 + positiveRepScore: 0, + negativeRepScore: 0 }); return hashStateLeaf(stateLeaf); @@ -732,7 +578,14 @@ contract Unirep is DomainObjs, ComputeRoot, UnirepParameters { function calcEmptyGlobalStateTreeRoot(uint8 _levels) internal view returns (uint256) { // Compute the hash of a blank state leaf - uint256 h = hashedBlankStateLeaf(); + StateLeaf memory stateLeaf = StateLeaf({ + identityCommitment: 0, + userStateRoot: emptyUserStateRoot, + positiveRepScore: 0, + negativeRepScore: 0 + }); + + uint256 h = hashStateLeaf(stateLeaf); return computeEmptyRoot(_levels, h); } diff --git a/contracts/UnirepParameters.sol b/contracts/UnirepParameters.sol index 5246365..3e8ce39 100644 --- a/contracts/UnirepParameters.sol +++ b/contracts/UnirepParameters.sol @@ -16,7 +16,6 @@ contract UnirepParameters { } struct ProofsRelated { - uint256[] publicSignals; uint256[2] a; uint256[2][2] b; uint256[2] c; diff --git a/contracts/UnirepSocial.sol b/contracts/UnirepSocial.sol new file mode 100644 index 0000000..35ba26b --- /dev/null +++ b/contracts/UnirepSocial.sol @@ -0,0 +1,287 @@ +pragma abicoder v2; +pragma solidity 0.7.6; + +import "@openzeppelin/contracts/cryptography/ECDSA.sol"; +import "@openzeppelin/contracts/math/SafeMath.sol"; +import "@openzeppelin/contracts/utils/Address.sol"; +import { Unirep } from './Unirep.sol'; + +contract UnirepSocial { + using SafeMath for uint256; + + Unirep public unirep; + + enum actionChoices { UpVote, DownVote, Post, Comment } + + // The amount of karma required to publish a post + uint256 immutable public postReputation; + + // The amount of karma required to submit a comment + uint256 immutable public commentReputation; + + // The amount of karma airdropped to user when user signs up and executes user state transition + uint256 immutable public airdroppedReputation; + + // Indicate if the reputation nullifiers is submitted + mapping(uint256 => bool) public isReputationNullifierSubmitted; + + // Unirep Social Events + event Sequencer( + string _event + ); + + // help Unirep Social track event + event UserSignedUp( + uint256 indexed _epoch, + uint256 _leafIndex + ); + + event PostSubmitted( + uint256 indexed _epoch, + uint256 indexed _postId, + uint256 indexed _epochKey, + string _hahsedContent, + uint256[] publicSignals, + uint256[8] proof + ); + + event CommentSubmitted( + uint256 indexed _epoch, + uint256 indexed _commentId, + uint256 indexed _epochKey, + uint256 _postId, + string _hahsedContent, + uint256[] publicSignals, + uint256[8] proof + ); + + event VoteSubmitted( + uint256 indexed _epoch, + uint256 indexed _fromEpochKey, + uint256 indexed _toEpochKey, + Unirep.Attestation attestation, + uint256[] publicSignals, + uint256[8] proof + ); + + event ReputationNullifierSubmitted( + uint256 indexed _epoch, + uint256 spendReputationAmount, + uint256[] reputationNullifiers + ); + + + constructor( + Unirep _unirepContract, + uint256 _postReputation, + uint256 _commentReputation, + uint256 _airdroppedReputation + ) { + // Set the unirep contracts + unirep = _unirepContract; + + postReputation = _postReputation; + commentReputation = _commentReputation; + airdroppedReputation = _airdroppedReputation; + } + + /* + * Call Unirep contract to perform user signing up + * @param _identityCommitment Commitment of the user's identity which is a semaphore identity. + */ + function userSignUp(uint256 _identityCommitment) external { + unirep.userSignUp(_identityCommitment, airdroppedReputation); + + emit UserSignedUp( + unirep.currentEpoch(), + unirep.nextGSTLeafIndex() - 1 + ); + } + + function attesterSignUp(bytes calldata signature) external { + unirep.attesterSignUpViaRelayer(msg.sender, signature); + } + + function spendReputation( + bytes memory signature, + uint256 epochKey, + uint256[] memory publicSignals, + uint256[8] memory _proof, + uint256 spendReputationAmount + ) public payable { + // Determine if repuataion nullifiers are submitted before + // The first spendRepuatationAmount of public signals are valid repuation nullifiers + uint256[] memory reputationNullifiers = new uint256[](spendReputationAmount); + for (uint i = 0; i < spendReputationAmount; i++) { + require(isReputationNullifierSubmitted[publicSignals[i]] == false, "Unirep Social: the nullifier has been submitted"); + isReputationNullifierSubmitted[publicSignals[i]] = true; + reputationNullifiers[i] = publicSignals[i]; + } + + bool proofIsValid = unirep.verifyReputation(publicSignals, _proof); + require(proofIsValid, "Unirep Social: the proof is not valid"); + + // Verify epoch key and its proof + // Then submit negative attestation to this epoch key + Unirep.Attestation memory attestation; + attestation.attesterId = unirep.attesters(msg.sender); + attestation.posRep = 0; + attestation.negRep = spendReputationAmount; + attestation.graffiti = 0; + attestation.overwriteGraffiti = false; + unirep.submitAttestationViaRelayer{value: unirep.attestingFee()}(msg.sender, signature, attestation, epochKey); + + emit Sequencer("ReputationNullifierSubmitted"); + emit ReputationNullifierSubmitted( + unirep.currentEpoch(), + spendReputationAmount, + reputationNullifiers + ); + } + + function publishPost( + bytes calldata signature, + uint256 postId, + uint256 epochKey, + string calldata hashedContent, + uint256[] calldata publicSignals, + uint256[8] calldata proof) external payable { + + // Call Unirep contract to perform reputation spending + spendReputation(signature, epochKey, publicSignals, proof, postReputation); + + emit PostSubmitted( + unirep.currentEpoch(), + postId, + epochKey, + hashedContent, + publicSignals, + proof + ); + } + + function leaveComment( + bytes calldata signature, + uint256 postId, + uint256 commentId, + uint256 epochKey, + string calldata hashedContent, + uint256[] calldata publicSignals, + uint256[8] calldata proof) external payable { + + // Call Unirep contract to perform reputation spending + spendReputation(signature, epochKey, publicSignals, proof, commentReputation); + + emit CommentSubmitted( + unirep.currentEpoch(), + commentId, + epochKey, + postId, + hashedContent, + publicSignals, + proof + ); + } + + function vote( + bytes memory signature, + Unirep.Attestation memory attestation, + uint256 toEpochKey, + uint256 fromEpochKey, + uint256[] memory publicSignals, + uint256[8] memory proof ) public payable { + uint256 voteValue = attestation.posRep + attestation.negRep; + require(voteValue > 0, "Unirep Social: should submit a positive vote value"); + require(attestation.posRep * attestation.negRep == 0, "Unirep Social: should only choose to upvote or to downvote"); + + // Spend attester's reputation + // Call Unirep contract to perform reputation spending + spendReputation(signature, fromEpochKey, publicSignals, proof, voteValue); + + // Send Reputation to others + unirep.submitAttestationViaRelayer{value: unirep.attestingFee()}(msg.sender, signature, attestation, toEpochKey); + + emit VoteSubmitted( + unirep.currentEpoch(), + fromEpochKey, + toEpochKey, + attestation, + publicSignals, + proof + ); + } + + function beginEpochTransition(uint256 numEpochKeysToSeal) external { + unirep.beginEpochTransition(numEpochKeysToSeal); + } + + function updateUserStateRoot( + uint256 _newGlobalStateTreeLeaf, + uint256[] memory _attestationNullifiers, + uint256[] memory _epkNullifiers, + uint256 _transitionFromEpoch, + uint256 _fromGlobalStateTree, + uint256 _fromEpochTree, + uint256 _fromNullifierTreeRoot, + uint256[8] memory _proof) external { + unirep.updateUserStateRoot(_newGlobalStateTreeLeaf, _attestationNullifiers, _epkNullifiers, _transitionFromEpoch, _fromGlobalStateTree, _fromEpochTree, _fromNullifierTreeRoot, _proof); + + } + + + function verifyEpochKeyValidity( + uint256[] memory _publicSignals, + uint256[8] memory _proof) public view returns (bool) { + return unirep.verifyEpochKeyValidity(_publicSignals, _proof); + } + + function verifyUserStateTransition( + uint256 _newGlobalStateTreeLeaf, + uint256[] memory _attestationNullifiers, + uint256[] memory _epkNullifiers, + uint256 _transitionFromEpoch, + uint256 _fromGlobalStateTree, + uint256 _fromEpochTree, + uint256[8] memory _proof) public view returns (bool) { + return unirep.verifyUserStateTransition(_newGlobalStateTreeLeaf, _attestationNullifiers, _epkNullifiers, _transitionFromEpoch, airdroppedReputation, _fromGlobalStateTree, _fromEpochTree, _proof); + } + + function verifyReputation( + uint256[] memory _publicSignals, + uint256[8] memory _proof) public view returns (bool) { + return unirep.verifyReputation(_publicSignals, _proof); + } + + function verifyReputationFromAttester( + uint256[] memory _publicSignals, + uint256[8] memory _proof) public view returns (bool) { + return unirep.verifyReputationFromAttester(_publicSignals, _proof); + } + + function min(uint a, uint b) internal pure returns (uint) { + if (a > b) { + return b; + } else { + return a; + } + } + + function hashedBlankStateLeaf() public view returns (uint256) { + return unirep.hashedBlankStateLeaf(); + } + + function getEpochTreeLeaves(uint256 epoch) external view returns (uint256[] memory epochKeyList, uint256[] memory epochKeyHashChainList) { + return unirep.getEpochTreeLeaves(epoch); + } + + /* + * Functions to burn fee and collect compenstation. + */ + function burnAttestingFee() external { + unirep.burnAttestingFee(); + } + + function collectEpochTransitionCompensation() external { + unirep.collectEpochTransitionCompensation(); + } +} \ No newline at end of file diff --git a/core/UnirepState.ts b/core/UnirepState.ts index 1d401e3..b39733e 100644 --- a/core/UnirepState.ts +++ b/core/UnirepState.ts @@ -86,7 +86,6 @@ class UnirepState { private epochKeyToHashchainMap: {[key: string]: BigInt} = {} private epochKeyToAttestationsMap: {[key: string]: IAttestation[]} = {} - public karmaNullifiersMap: {[key: string]: boolean} = {} constructor( _globalStateTreeDepth: number, @@ -198,17 +197,6 @@ class UnirepState { this.epochKeyToAttestationsMap[epochKey].push(attestation) } - /* - * Add karma nullifiers to the map state - */ - public addKarmaNullifiers = ( - nullifiers: BigInt[] - ) => { - for(const nullifier of nullifiers){ - this.karmaNullifiersMap[nullifier.toString()] = true - } - } - /* * Computes the global state tree of given epoch */ diff --git a/core/utils.ts b/core/utils.ts index 2e2cd1a..2e96084 100644 --- a/core/utils.ts +++ b/core/utils.ts @@ -7,13 +7,14 @@ import Keyv from "keyv" import assert from 'assert' import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" +import UnirepSocial from "../artifacts/contracts/UnirepSocial.sol/UnirepSocial.json" import PoseidonT3 from "../artifacts/contracts/Poseidon.sol/PoseidonT3.json" import PoseidonT6 from "../artifacts/contracts/Poseidon.sol/PoseidonT6.json" import { attestingFee, circuitEpochTreeDepth, circuitGlobalStateTreeDepth, circuitNullifierTreeDepth, circuitUserStateTreeDepth, epochLength, epochTreeDepth, globalStateTreeDepth, maxUsers, nullifierTreeDepth, numAttestationsPerEpochKey, numEpochKeyNoncePerEpoch, userStateTreeDepth } from '../config/testLocal' import { Attestation, IEpochTreeLeaf, UnirepState } from './UnirepState' import { IUserStateLeaf, UserState } from './UserState' import { hash5, hashLeftRight, IncrementalQuinTree, SnarkBigInt } from 'maci-crypto' -import { DEFAULT_AIRDROPPED_KARMA } from '../config/socialMedia' +import { DEFAULT_AIRDROPPED_KARMA, DEFAULT_COMMENT_KARMA, DEFAULT_POST_KARMA } from '../config/socialMedia' import { ATTESTATION_NULLIFIER_DOMAIN, EPOCH_KEY_NULLIFIER_DOMAIN, KARMA_NULLIFIER_DOMAIN } from '../config/nullifierDomainSeparator' import { SparseMerkleTreeImpl } from '../crypto/SMT' @@ -150,6 +151,43 @@ const deployUnirep = async ( return c } +const deployUnirepSocial = async ( + deployer: ethers.Signer, + UnirepAddr: string, + _settings?: any): Promise => { + + console.log('Deploying Unirep Social') + + const _defaultAirdroppedRep = DEFAULT_AIRDROPPED_KARMA + const _postReputation = DEFAULT_POST_KARMA + const _commentReputation = DEFAULT_COMMENT_KARMA + + const f = await hardhatEthers.getContractFactory( + "UnirepSocial", + { + signer: deployer, + } + ) + const c = await (f.deploy( + UnirepAddr, + _postReputation, + _commentReputation, + _defaultAirdroppedRep, + { + gasLimit: 9000000, + } + )) + + // Print out deployment info + console.log("-----------------------------------------------------------------") + console.log("Bytecode size of Unirep Social:", Math.floor(UnirepSocial.bytecode.length / 2), "bytes") + let receipt = await c.provider.getTransactionReceipt(c.deployTransaction.hash) + console.log("Gas cost of deploying Unirep Social:", receipt.gasUsed.toString()) + console.log("-----------------------------------------------------------------") + + return c +} + const genEpochKey = (identityNullifier: SnarkBigInt, epoch: number, nonce: number, _epochTreeDepth: number = epochTreeDepth): SnarkBigInt => { const values: any[] = [ identityNullifier, @@ -237,15 +275,6 @@ const genUnirepStateFromContract = async ( const attestationSubmittedFilter = unirepContract.filters.AttestationSubmitted() const attestationSubmittedEvents = await unirepContract.queryFilter(attestationSubmittedFilter, startBlock) - const postSubmittedFilter = unirepContract.filters.PostSubmitted() - const postSubmittedEvents = await unirepContract.queryFilter(postSubmittedFilter, startBlock) - - const commentSubmittedFilter = unirepContract.filters.CommentSubmitted() - const commentSubmittedEvents = await unirepContract.queryFilter(commentSubmittedFilter, startBlock) - - const reputationSubmittedFilter = unirepContract.filters.ReputationNullifierSubmitted() - const reputationSubmittedEvents = await unirepContract.queryFilter(reputationSubmittedFilter, startBlock) - const epochEndedFilter = unirepContract.filters.EpochEnded() const epochEndedEvents = await unirepContract.queryFilter(epochEndedFilter, startBlock) @@ -258,9 +287,6 @@ const genUnirepStateFromContract = async ( // Reverse the events so pop() can start from the first event newGSTLeafInsertedEvents.reverse() attestationSubmittedEvents.reverse() - postSubmittedEvents.reverse() - commentSubmittedEvents.reverse() - reputationSubmittedEvents.reverse() epochEndedEvents.reverse() userStateTransitionedEvents.reverse() for (let i = 0; i < sequencerEvents.length; i++) { @@ -290,26 +316,6 @@ const genUnirepStateFromContract = async ( _attestation.overwriteGraffiti ) unirepState.addAttestation(attestationEvent.args?._epochKey.toString(), attestation) - } else if (occurredEvent === "PostSubmitted") { - const postEvent = postSubmittedEvents.pop() - assert(postEvent !== undefined, `Event sequence mismatch: missing postSubmittedEvent`) - const epoch = postEvent.args?._epoch.toNumber() - assert( - epoch === unirepState.currentEpoch, - `Post epoch (${epoch}) does not match current epoch (${unirepState.currentEpoch})` - ) - } else if (occurredEvent === "CommentSubmitted") { - const commentEvent = commentSubmittedEvents.pop() - assert(commentEvent !== undefined, `Event sequence mismatch: missing commentSubmittedEvent`) - const epoch = commentEvent.args?._epoch.toNumber() - assert( - epoch === unirepState.currentEpoch, - `Comment epoch (${epoch}) does not match current epoch (${unirepState.currentEpoch})` - ) - } else if (occurredEvent === "ReputationNullifierSubmitted") { - const reputationEvent = reputationSubmittedEvents.pop() - assert(reputationEvent !== undefined, `Event sequence mismatch: missing ReputationNullifierSubmitted`) - unirepState.addKarmaNullifiers(reputationEvent.args?.karmaNullifiers.map((n) => BigInt(n))) } else if (occurredEvent === "EpochEnded") { const epochEndedEvent = epochEndedEvents.pop() assert(epochEndedEvent !== undefined, `Event sequence mismatch: missing epochEndedEvent`) @@ -334,8 +340,6 @@ const genUnirepStateFromContract = async ( unirepState.epochTransition(epoch, epochTreeLeaves) } else if (occurredEvent === "UserStateTransitioned") { - // const newLeafEvent = newGSTLeafInsertedEvents.pop() - // assert(newLeafEvent !== undefined, `Event sequence mismatch: missing newGSTLeafInsertedEvent`) const userStateTransitionedEvent = userStateTransitionedEvents.pop() assert(userStateTransitionedEvent !== undefined, `Event sequence mismatch: missing userStateTransitionedEvent`) @@ -347,6 +351,7 @@ const genUnirepStateFromContract = async ( userStateTransitionedEvent.args?.userTransitionedData.epkNullifiers, userStateTransitionedEvent.args?.userTransitionedData.fromEpoch, userStateTransitionedEvent.args?.userTransitionedData.fromGlobalStateTree, + DEFAULT_AIRDROPPED_KARMA, userStateTransitionedEvent.args?.userTransitionedData.fromEpochTree, userStateTransitionedEvent.args?.userTransitionedData.proof, ) @@ -488,15 +493,6 @@ const _genUserStateFromContract = async ( const attestationSubmittedFilter = unirepContract.filters.AttestationSubmitted() const attestationSubmittedEvents = await unirepContract.queryFilter(attestationSubmittedFilter, startBlock) - const postSubmittedFilter = unirepContract.filters.PostSubmitted() - const postSubmittedEvents = await unirepContract.queryFilter(postSubmittedFilter, startBlock) - - const commentSubmittedFilter = unirepContract.filters.CommentSubmitted() - const commentSubmittedEvents = await unirepContract.queryFilter(commentSubmittedFilter, startBlock) - - const reputationSubmittedFilter = unirepContract.filters.ReputationNullifierSubmitted() - const reputationSubmittedEvents = await unirepContract.queryFilter(reputationSubmittedFilter, startBlock) - const epochEndedFilter = unirepContract.filters.EpochEnded() const epochEndedEvents = await unirepContract.queryFilter(epochEndedFilter, startBlock) @@ -509,9 +505,6 @@ const _genUserStateFromContract = async ( // Reverse the events so pop() can start from the first event newGSTLeafInsertedEvents.reverse() attestationSubmittedEvents.reverse() - postSubmittedEvents.reverse() - commentSubmittedEvents.reverse() - reputationSubmittedEvents.reverse() epochEndedEvents.reverse() userStateTransitionedEvents.reverse() // Variables used to keep track of data required for user to transition @@ -557,26 +550,6 @@ const _genUserStateFromContract = async ( if(userHasSignedUp){ userState.updateAttestation(epochKey, attestation.posRep, attestation.negRep) } - } else if (occurredEvent === "PostSubmitted") { - const postEvent = postSubmittedEvents.pop() - assert(postEvent !== undefined, `Event sequence mismatch: missing postSubmittedEvent`) - const epoch = postEvent.args?._epoch.toNumber() - assert( - epoch === unirepState.currentEpoch, - `Post epoch (${epoch}) does not match current epoch (${unirepState.currentEpoch})` - ) - } else if (occurredEvent === "CommentSubmitted") { - const commentEvent = commentSubmittedEvents.pop() - assert(commentEvent !== undefined, `Event sequence mismatch: missing commentSubmittedEvent`) - const epoch = commentEvent.args?._epoch.toNumber() - assert( - epoch === unirepState.currentEpoch, - `Comment epoch (${epoch}) does not match current epoch (${unirepState.currentEpoch})` - ) - } else if (occurredEvent === "ReputationNullifierSubmitted") { - const reputationEvent = reputationSubmittedEvents.pop() - assert(reputationEvent !== undefined, `Event sequence mismatch: missing ReputationNullifierSubmitted`) - unirepState.addKarmaNullifiers(reputationEvent.args?.karmaNullifiers.map((n) => BigInt(n))) } else if (occurredEvent === "EpochEnded") { const epochEndedEvent = epochEndedEvents.pop() assert(epochEndedEvent !== undefined, `Event sequence mismatch: missing epochEndedEvent`) @@ -611,8 +584,6 @@ const _genUserStateFromContract = async ( // Epoch ends, reset (next) GST leaf index currentEpochGSTLeafIndexToInsert = 0 } else if (occurredEvent === "UserStateTransitioned") { - // const newLeafEvent = newGSTLeafInsertedEvents.pop() - // assert(newLeafEvent !== undefined, `Event sequence mismatch: missing newGSTLeafInsertedEvent`) const userStateTransitionedEvent = userStateTransitionedEvents.pop() assert(userStateTransitionedEvent !== undefined, `Event sequence mismatch: missing userStateTransitionedEvent`) @@ -624,6 +595,7 @@ const _genUserStateFromContract = async ( userStateTransitionedEvent.args?.userTransitionedData.epkNullifiers, userStateTransitionedEvent.args?.userTransitionedData.fromEpoch, userStateTransitionedEvent.args?.userTransitionedData.fromGlobalStateTree, + DEFAULT_AIRDROPPED_KARMA, userStateTransitionedEvent.args?.userTransitionedData.fromEpochTree, userStateTransitionedEvent.args?.userTransitionedData.proof, ) @@ -721,6 +693,7 @@ export { computeEmptyUserStateRoot, getTreeDepthsForTesting, deployUnirep, + deployUnirepSocial, genEpochKey, genAttestationNullifier, genEpochKeyNullifier, diff --git a/test/contracts/Attesting.ts b/test/contracts/Attesting.ts index 2926c08..87218f8 100644 --- a/test/contracts/Attesting.ts +++ b/test/contracts/Attesting.ts @@ -10,6 +10,7 @@ const { expect } = chai import Unirep from "../../artifacts/contracts/Unirep.sol/Unirep.json" import { Attestation } from "../../core" +import { DEFAULT_AIRDROPPED_KARMA } from '../../config/socialMedia' describe('Attesting', () => { @@ -40,7 +41,7 @@ describe('Attesting', () => { console.log('User sign up') userId = genIdentity() userCommitment = genIdentityCommitment(userId) - let tx = await unirepContract.userSignUp(userCommitment) + let tx = await unirepContract.userSignUp(userCommitment, DEFAULT_AIRDROPPED_KARMA) let receipt = await tx.wait() expect(receipt.status).equal(1) diff --git a/test/contracts/EpochTransition.ts b/test/contracts/EpochTransition.ts index c64d5a8..1f4a162 100644 --- a/test/contracts/EpochTransition.ts +++ b/test/contracts/EpochTransition.ts @@ -9,6 +9,7 @@ import { deployUnirep, genEpochKey, getTreeDepthsForTesting } from '../utils' const { expect } = chai import Unirep from "../../artifacts/contracts/Unirep.sol/Unirep.json" +import { DEFAULT_AIRDROPPED_KARMA } from '../../config/socialMedia' describe('Epoch Transition', () => { @@ -31,7 +32,7 @@ describe('Epoch Transition', () => { console.log('User sign up') userId = genIdentity() userCommitment = genIdentityCommitment(userId) - let tx = await unirepContract.userSignUp(userCommitment) + let tx = await unirepContract.userSignUp(userCommitment, DEFAULT_AIRDROPPED_KARMA) let receipt = await tx.wait() expect(receipt.status).equal(1) diff --git a/test/contracts/EventSequencing.ts b/test/contracts/EventSequencing.ts index 81f7780..e085c26 100644 --- a/test/contracts/EventSequencing.ts +++ b/test/contracts/EventSequencing.ts @@ -10,6 +10,7 @@ const { expect } = chai import Unirep from "../../artifacts/contracts/Unirep.sol/Unirep.json" import { Attestation } from "../../core" +import { DEFAULT_AIRDROPPED_KARMA } from '../../config/socialMedia' describe('EventSequencing', () => { @@ -35,7 +36,7 @@ describe('EventSequencing', () => { let userCommitment = genIdentityCommitment(userId) userIds.push(userId) userCommitments.push(userCommitment) - let tx = await unirepContract.userSignUp(userCommitment) + let tx = await unirepContract.userSignUp(userCommitment, DEFAULT_AIRDROPPED_KARMA) let receipt = await tx.wait() expect(receipt.status).equal(1) expectedEventsInOrder.push(events[0]) @@ -74,7 +75,7 @@ describe('EventSequencing', () => { userCommitment = genIdentityCommitment(userId) userIds.push(userId) userCommitments.push(userCommitment) - tx = await unirepContract.userSignUp(userCommitment) + tx = await unirepContract.userSignUp(userCommitment, DEFAULT_AIRDROPPED_KARMA) receipt = await tx.wait() expect(receipt.status).equal(1) expectedEventsInOrder.push(events[0]) diff --git a/test/contracts/Posting.ts b/test/contracts/Posting.ts index 2931924..655535b 100644 --- a/test/contracts/Posting.ts +++ b/test/contracts/Posting.ts @@ -5,10 +5,11 @@ import { attestingFee, epochLength, circuitEpochTreeDepth, circuitGlobalStateTre import { genIdentity, genIdentityCommitment } from 'libsemaphore' import { genRandomSalt, IncrementalQuinTree, stringifyBigInts } from 'maci-crypto' import { deployUnirep, genEpochKey, genNewUserStateTree, getTreeDepthsForTesting } from '../utils' +import { deployUnirepSocial } from '../../core/utils' const { expect } = chai -import Unirep from "../../artifacts/contracts/Unirep.sol/Unirep.json" +import UnirepSocial from "../../artifacts/contracts/UnirepSocial.sol/UnirepSocial.json" import { DEFAULT_AIRDROPPED_KARMA, DEFAULT_COMMENT_KARMA, DEFAULT_POST_KARMA, MAX_KARMA_BUDGET } from '../../config/socialMedia' import { UnirepState, UserState } from '../../core' import { formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyProveReputationProof } from '../circuits/utils' @@ -20,6 +21,7 @@ describe('Post', function () { let circuit let unirepContract + let unirepSocialContract let GSTree let emptyUserStateRoot const ids = new Array(2) @@ -30,8 +32,9 @@ describe('Post', function () { let attesterAddresses = new Array(2) let accounts: ethers.Signer[] + let attesterSig: string[] = new Array(2) let provider - let unirepContractCalledByAttesters = new Array(2) + let contractCalledByAttesters = new Array(2) const epochKeyNonce = 0 let proof @@ -47,6 +50,7 @@ describe('Post', function () { const _treeDepths = getTreeDepthsForTesting('circuit') unirepContract = await deployUnirep(accounts[0], _treeDepths) + unirepSocialContract = await deployUnirepSocial(accounts[0], unirepContract.address) const blankGSLeaf = await unirepContract.hashedBlankStateLeaf() GSTree = new IncrementalQuinTree(circuitGlobalStateTreeDepth, blankGSLeaf, 2) @@ -71,6 +75,15 @@ describe('Post', function () { expect(circuitGlobalStateTreeDepth).equal(treeDepths_.globalStateTreeDepth) expect(circuitNullifierTreeDepth).equal(treeDepths_.nullifierTreeDepth) expect(circuitUserStateTreeDepth).equal(treeDepths_.userStateTreeDepth) + + const postReputation_ = await unirepSocialContract.postReputation() + expect(postReputation_).equal(DEFAULT_POST_KARMA) + const commentReputation_ = await unirepSocialContract.commentReputation() + expect(commentReputation_).equal(DEFAULT_COMMENT_KARMA) + const airdroppedReputation_ = await unirepSocialContract.airdroppedReputation() + expect(airdroppedReputation_).equal(DEFAULT_AIRDROPPED_KARMA) + const unirepAddress_ = await unirepSocialContract.unirep() + expect(unirepAddress_).equal(unirepContract.address) }) it('should have the correct default value', async () => { @@ -100,7 +113,7 @@ describe('Post', function () { for (let i = 0; i < 2; i++) { ids[i] = genIdentity() commitments[i] = genIdentityCommitment(ids[i]) - const tx = await unirepContract.userSignUp(commitments[i]) + const tx = await unirepSocialContract.userSignUp(commitments[i]) const receipt = await tx.wait() expect(receipt.status).equal(1) @@ -146,8 +159,10 @@ describe('Post', function () { for (let i = 0; i < 2; i++) { attesters[i] = accounts[i+1] attesterAddresses[i] = await attesters[i].getAddress() - unirepContractCalledByAttesters[i] = await hardhatEthers.getContractAt(Unirep.abi, unirepContract.address, attesters[i]) - const tx = await unirepContractCalledByAttesters[i].attesterSignUp() + contractCalledByAttesters[i] = await hardhatEthers.getContractAt(UnirepSocial.abi, unirepSocialContract.address, attesters[i]) + const message = ethers.utils.solidityKeccak256(["address", "address"], [attesterAddresses[i], unirepContract.address]) + attesterSig[i] = await attesters[i].signMessage(ethers.utils.arrayify(message)) + const tx = await contractCalledByAttesters[i].attesterSignUp(attesterSig[i]) const receipt = await tx.wait() expect(receipt.status).equal(1) @@ -181,7 +196,7 @@ describe('Post', function () { }) it('reputation proof should be verified valid on-chain', async() => { - const isProofValid = await unirepContract.verifyReputation( + const isProofValid = await unirepSocialContract.verifyReputation( publicSignals, formatProofForVerifierContract(proof) ) @@ -194,20 +209,14 @@ describe('Post', function () { const currentEpoch = (await unirepContract.currentEpoch()).toNumber() const epochKeyNonce = 0 const epk = genEpochKey(ids[0].identityNullifier, currentEpoch, epochKeyNonce) - const nullifiers: BigInt[] = [] - - for (let i = 0; i < MAX_KARMA_BUDGET; i++) { - const variableName = 'main.karma_nullifiers['+i+']' - nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) - } - const tx = await unirepContractCalledByAttesters[0].publishPost( + const tx = await contractCalledByAttesters[0].publishPost( + attesterSig[0], postId, epk, text, publicSignals, formatProofForVerifierContract(proof), - nullifiers, { value: attestingFee, gasLimit: 1000000 } ) const receipt = await tx.wait() @@ -240,22 +249,15 @@ describe('Post', function () { ) expect(isProofValid, "proof is not valid").to.be.true - const nullifiers: BigInt[] = [] - - for (let i = 0; i < MAX_KARMA_BUDGET; i++) { - const variableName = 'main.karma_nullifiers['+i+']' - nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) - } - - await expect(unirepContractCalledByAttesters[0].publishPost( + await expect(contractCalledByAttesters[0].publishPost( + attesterSig[0], postId, epk, text, publicSignals, formatProofForVerifierContract(proof), - nullifiers, { value: attestingFee, gasLimit: 1000000 } - )).to.be.revertedWith('Unirep: the nullifier has been submitted') + )).to.be.revertedWith('Unirep Social: the nullifier has been submitted') }) it('submit a post with the same epoch key should fail', async() => { @@ -285,20 +287,13 @@ describe('Post', function () { ) expect(isProofValid, "proof is not valid").to.be.true - const nullifiers: BigInt[] = [] - - for (let i = 0; i < MAX_KARMA_BUDGET; i++) { - const variableName = 'main.karma_nullifiers['+i+']' - nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) - } - - await expect(unirepContractCalledByAttesters[0].publishPost( + await expect(contractCalledByAttesters[0].publishPost( + attesterSig[0], postId, epk, text, publicSignals, formatProofForVerifierContract(proof), - nullifiers, { value: attestingFee, gasLimit: 1000000 } )).to.be.revertedWith('Unirep: attester has already attested to this epoch key') }) @@ -328,22 +323,15 @@ describe('Post', function () { ) expect(isProofValid, "proof is valid").to.be.false - const nullifiers: BigInt[] = [] - - for (let i = 0; i < MAX_KARMA_BUDGET; i++) { - const variableName = 'main.karma_nullifiers['+i+']' - nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) - } - - await expect(unirepContractCalledByAttesters[0].publishPost( + await expect(contractCalledByAttesters[0].publishPost( + attesterSig[0], postId, epk, text, publicSignals, formatProofForVerifierContract(proof), - nullifiers, { value: attestingFee, gasLimit: 1000000 } - )).to.be.revertedWith('Unirep: the proof is not valid') + )).to.be.revertedWith('Unirep Social: the proof is not valid') }) }) @@ -377,21 +365,15 @@ describe('Post', function () { it('submit comment should succeed', async() => { const currentEpoch = (await unirepContract.currentEpoch()).toNumber() const epk = genEpochKey(ids[1].identityNullifier, currentEpoch, epochKeyNonce) - const nullifiers: BigInt[] = [] - - for (let i = 0; i < MAX_KARMA_BUDGET; i++) { - const variableName = 'main.karma_nullifiers['+i+']' - nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) - } - const tx = await unirepContractCalledByAttesters[1].leaveComment( + const tx = await contractCalledByAttesters[1].leaveComment( + attesterSig[1], postId, commentId, epk, text, publicSignals, formatProofForVerifierContract(proof), - nullifiers, { value: attestingFee, gasLimit: 1000000 } ) const receipt = await tx.wait() @@ -424,23 +406,16 @@ describe('Post', function () { ) expect(isProofValid, "proof is not valid").to.be.true - const nullifiers: BigInt[] = [] - - for (let i = 0; i < MAX_KARMA_BUDGET; i++) { - const variableName = 'main.karma_nullifiers['+i+']' - nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) - } - - await expect(unirepContractCalledByAttesters[1].leaveComment( + await expect(contractCalledByAttesters[1].leaveComment( + attesterSig[1], postId, commentId, epk, text, publicSignals, formatProofForVerifierContract(proof), - nullifiers, { value: attestingFee, gasLimit: 1000000 } - )).to.be.revertedWith('Unirep: the nullifier has been submitted') + )).to.be.revertedWith('Unirep Social: the nullifier has been submitted') }) it('submit a comment with the same epoch key should fail', async() => { @@ -470,21 +445,14 @@ describe('Post', function () { ) expect(isProofValid, "proof is not valid").to.be.true - const nullifiers: BigInt[] = [] - - for (let i = 0; i < MAX_KARMA_BUDGET; i++) { - const variableName = 'main.karma_nullifiers['+i+']' - nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) - } - - await expect(unirepContractCalledByAttesters[1].leaveComment( + await expect(contractCalledByAttesters[1].leaveComment( + attesterSig[1], postId, commentId, epk, text, publicSignals, formatProofForVerifierContract(proof), - nullifiers, { value: attestingFee, gasLimit: 1000000 } )).to.be.revertedWith('Unirep: attester has already attested to this epoch key') }) @@ -514,23 +482,16 @@ describe('Post', function () { ) expect(isProofValid, "proof is valid").to.be.false - const nullifiers: BigInt[] = [] - - for (let i = 0; i < MAX_KARMA_BUDGET; i++) { - const variableName = 'main.karma_nullifiers['+i+']' - nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) - } - - await expect(unirepContractCalledByAttesters[1].leaveComment( + await expect(contractCalledByAttesters[1].leaveComment( + attesterSig[1], postId, commentId, epk, text, publicSignals, formatProofForVerifierContract(proof), - nullifiers, { value: attestingFee, gasLimit: 1000000 } - )).to.be.revertedWith('Unirep: the proof is not valid') + )).to.be.revertedWith('Unirep Social: the proof is not valid') }) }) }) \ No newline at end of file diff --git a/test/contracts/SignUp.ts b/test/contracts/SignUp.ts index 0fd0231..4587cee 100644 --- a/test/contracts/SignUp.ts +++ b/test/contracts/SignUp.ts @@ -8,12 +8,14 @@ import { deployUnirep, genNewUserStateTree, getTreeDepthsForTesting } from '../u const { expect } = chai -import Unirep from "../../artifacts/contracts/Unirep.sol/Unirep.json" -import { DEFAULT_AIRDROPPED_KARMA } from '../../config/socialMedia' +import UnirepSocial from "../../artifacts/contracts/UnirepSocial.sol/UnirepSocial.json" +import { DEFAULT_AIRDROPPED_KARMA, DEFAULT_COMMENT_KARMA, DEFAULT_POST_KARMA } from '../../config/socialMedia' +import { deployUnirepSocial } from '../../core/utils' describe('Signup', () => { let unirepContract + let unirepSocialContract let GSTree let emptyUserStateRoot @@ -24,6 +26,7 @@ describe('Signup', () => { const _treeDepths = getTreeDepthsForTesting("contract") unirepContract = await deployUnirep(accounts[0], _treeDepths) + unirepSocialContract = await deployUnirepSocial(accounts[0], unirepContract.address) const blankGSLeaf = await unirepContract.hashedBlankStateLeaf() GSTree = new IncrementalQuinTree(globalStateTreeDepth, blankGSLeaf, 2) @@ -48,6 +51,15 @@ describe('Signup', () => { expect(globalStateTreeDepth).equal(treeDepths_.globalStateTreeDepth) expect(nullifierTreeDepth).equal(treeDepths_.nullifierTreeDepth) expect(userStateTreeDepth).equal(treeDepths_.userStateTreeDepth) + + const postReputation_ = await unirepSocialContract.postReputation() + expect(postReputation_).equal(DEFAULT_POST_KARMA) + const commentReputation_ = await unirepSocialContract.commentReputation() + expect(commentReputation_).equal(DEFAULT_COMMENT_KARMA) + const airdroppedReputation_ = await unirepSocialContract.airdroppedReputation() + expect(airdroppedReputation_).equal(DEFAULT_AIRDROPPED_KARMA) + const unirepAddress_ = await unirepSocialContract.unirep() + expect(unirepAddress_).equal(unirepContract.address) }) it('should have the correct default value', async () => { @@ -64,7 +76,7 @@ describe('Signup', () => { const commitment = genIdentityCommitment(id) it('sign up should succeed', async () => { - const tx = await unirepContract.userSignUp(commitment) + const tx = await unirepSocialContract.userSignUp(commitment) const receipt = await tx.wait() expect(receipt.status).equal(1) @@ -84,19 +96,19 @@ describe('Signup', () => { }) it('double sign up should fail', async () => { - await expect(unirepContract.userSignUp(commitment)) + await expect(unirepSocialContract.userSignUp(commitment)) .to.be.revertedWith('Unirep: the user has already signed up') }) it('sign up should fail if max capacity reached', async () => { for (let i = 1; i < maxUsers; i++) { - let tx = await unirepContract.userSignUp( + let tx = await unirepSocialContract.userSignUp( genIdentityCommitment(genIdentity()) ) let receipt = await tx.wait() expect(receipt.status).equal(1) } - await expect(unirepContract.userSignUp(genIdentityCommitment(genIdentity()))) + await expect(unirepSocialContract.userSignUp(genIdentityCommitment(genIdentity()))) .to.be.revertedWith('Unirep: maximum number of signups reached') }) }) @@ -105,15 +117,17 @@ describe('Signup', () => { let attester let attesterAddress let attester2 - let attester2Address - let attester2Sig - let unirepContractCalledByAttester + let attesterSig + let contractCalledByAttester + let contractCalledByAttester2 it('sign up should succeed', async () => { attester = accounts[1] attesterAddress = await attester.getAddress() - unirepContractCalledByAttester = await hardhatEthers.getContractAt(Unirep.abi, unirepContract.address, attester) - const tx = await unirepContractCalledByAttester.attesterSignUp() + contractCalledByAttester = await hardhatEthers.getContractAt(UnirepSocial.abi, unirepSocialContract.address, attester) + const message = ethers.utils.solidityKeccak256(["address", "address"], [attesterAddress, unirepContract.address]) + attesterSig = await attester.signMessage(ethers.utils.arrayify(message)) + const tx = await contractCalledByAttester.attesterSignUp(attesterSig) const receipt = await tx.wait() expect(receipt.status).equal(1) @@ -125,36 +139,15 @@ describe('Signup', () => { expect(2).equal(nextAttesterId_) }) - it('sign up via relayer should succeed', async () => { - let relayer = accounts[0] - attester2 = accounts[2] - attester2Address = await attester2.getAddress() - - let message = ethers.utils.solidityKeccak256(["address", "address"], [attester2Address, unirepContract.address]) - attester2Sig = await attester2.signMessage(ethers.utils.arrayify(message)) - const tx = await unirepContract.attesterSignUpViaRelayer(attester2Address, attester2Sig) - const receipt = await tx.wait() - - expect(receipt.status).equal(1) - - const attesterId = await unirepContract.attesters(attester2Address) - expect(2).equal(attesterId) - const nextAttesterId_ = await unirepContract.nextAttesterId() - expect(3).equal(nextAttesterId_) - }) - it('sign up with invalid signature should fail', async () => { - let attester3 = accounts[3] - let attester3Address = await attester3.getAddress() - await expect(unirepContract.attesterSignUpViaRelayer(attester3Address, attester2Sig)) + attester2 = accounts[2] + contractCalledByAttester2 = await hardhatEthers.getContractAt(UnirepSocial.abi, unirepSocialContract.address, attester2) + await expect(contractCalledByAttester2.attesterSignUp(attesterSig)) .to.be.revertedWith('Unirep: invalid attester sign up signature') }) it('double sign up should fail', async () => { - await expect(unirepContractCalledByAttester.attesterSignUp()) - .to.be.revertedWith('Unirep: attester has already signed up') - - await expect(unirepContract.attesterSignUpViaRelayer(attester2Address, attester2Sig)) + await expect(contractCalledByAttester.attesterSignUp(attesterSig)) .to.be.revertedWith('Unirep: attester has already signed up') }) }) diff --git a/test/contracts/Vote.ts b/test/contracts/Vote.ts index d65708f..5ad44ee 100644 --- a/test/contracts/Vote.ts +++ b/test/contracts/Vote.ts @@ -9,10 +9,13 @@ import { deployUnirep, genEpochKey, genNewUserStateTree, getTreeDepthsForTesting const { expect } = chai import Unirep from "../../artifacts/contracts/Unirep.sol/Unirep.json" -import { DEFAULT_AIRDROPPED_KARMA, MAX_KARMA_BUDGET } from '../../config/socialMedia' +import UnirepSocial from "../../artifacts/contracts/UnirepSocial.sol/UnirepSocial.json" +import { DEFAULT_AIRDROPPED_KARMA, DEFAULT_COMMENT_KARMA, DEFAULT_POST_KARMA, MAX_KARMA_BUDGET } from '../../config/socialMedia' import { Attestation, UnirepState, UserState } from '../../core' import { formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, getSignalByNameViaSym, verifyProveReputationProof } from '../circuits/utils' import { DEFAULT_ETH_PROVIDER } from '../../cli/defaults' +import { deployUnirepSocial } from '../../core/utils' +import { vote } from '../../cli/vote' describe('Vote', function () { @@ -20,6 +23,7 @@ describe('Vote', function () { let circuit let unirepContract + let unirepSocialContract let GSTree let emptyUserStateRoot let userNum = 4 @@ -29,10 +33,11 @@ describe('Vote', function () { let unirepState let attesters = new Array(userNum) let attesterAddresses = new Array(userNum) - + let attesterSigs = new Array(userNum) + let accounts: ethers.Signer[] let provider - let unirepContractCalledByAttesters = new Array(userNum) + let contractCalledByAttesters = new Array(userNum) let proof let publicSignals @@ -54,6 +59,7 @@ describe('Vote', function () { const _treeDepths = getTreeDepthsForTesting('circuit') unirepContract = await deployUnirep(accounts[0], _treeDepths) + unirepSocialContract = await deployUnirepSocial(accounts[0], unirepContract.address) const blankGSLeaf = await unirepContract.hashedBlankStateLeaf() GSTree = new IncrementalQuinTree(circuitGlobalStateTreeDepth, blankGSLeaf, 2) @@ -78,6 +84,15 @@ describe('Vote', function () { expect(circuitGlobalStateTreeDepth).equal(treeDepths_.globalStateTreeDepth) expect(circuitNullifierTreeDepth).equal(treeDepths_.nullifierTreeDepth) expect(circuitUserStateTreeDepth).equal(treeDepths_.userStateTreeDepth) + + const postReputation_ = await unirepSocialContract.postReputation() + expect(postReputation_).equal(DEFAULT_POST_KARMA) + const commentReputation_ = await unirepSocialContract.commentReputation() + expect(commentReputation_).equal(DEFAULT_COMMENT_KARMA) + const airdroppedReputation_ = await unirepSocialContract.airdroppedReputation() + expect(airdroppedReputation_).equal(DEFAULT_AIRDROPPED_KARMA) + const unirepAddress_ = await unirepSocialContract.unirep() + expect(unirepAddress_).equal(unirepContract.address) }) it('should have the correct default value', async () => { @@ -107,7 +122,7 @@ describe('Vote', function () { for (let i = 0; i < userNum; i++) { ids[i] = genIdentity() commitments[i] = genIdentityCommitment(ids[i]) - const tx = await unirepContract.userSignUp(commitments[i]) + const tx = await unirepSocialContract.userSignUp(commitments[i]) const receipt = await tx.wait() expect(receipt.status).equal(1) @@ -153,8 +168,10 @@ describe('Vote', function () { for (let i = 0; i < userNum; i++) { attesters[i] = accounts[i+1] attesterAddresses[i] = await attesters[i].getAddress() - unirepContractCalledByAttesters[i] = await hardhatEthers.getContractAt(Unirep.abi, unirepContract.address, attesters[i]) - const tx = await unirepContractCalledByAttesters[i].attesterSignUp() + contractCalledByAttesters[i] = await hardhatEthers.getContractAt(UnirepSocial.abi, unirepSocialContract.address, attesters[i]) + const message = ethers.utils.solidityKeccak256(["address", "address"], [attesterAddresses[i], unirepContract.address]) + attesterSigs[i] = await attesters[i].signMessage(ethers.utils.arrayify(message)) + const tx = await contractCalledByAttesters[i].attesterSignUp(attesterSigs[i]) const receipt = await tx.wait() expect(receipt.status).equal(1) @@ -209,6 +226,7 @@ describe('Vote', function () { ) const fromUser = 0 const toUser = 1 + const voteFee = attestingFee.mul(2) it('submit upvote should succeed', async() => { currentEpoch = (await unirepContract.currentEpoch()).toNumber() @@ -217,21 +235,14 @@ describe('Vote', function () { toEpk = genEpochKey(ids[toUser].identityNullifier, currentEpoch, epochKeyNonce) - const nullifiers: BigInt[] = [] - - for (let i = 0; i < MAX_KARMA_BUDGET; i++) { - const variableName = 'main.karma_nullifiers['+i+']' - nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) - } - - const tx = await unirepContractCalledByAttesters[fromUser].vote( + const tx = await contractCalledByAttesters[fromUser].vote( + attesterSigs[fromUser], attestation, toEpk, fromEpk, publicSignals, formatProofForVerifierContract(proof), - nullifiers, - { value: attestingFee, gasLimit: 1000000 } + { value: voteFee, gasLimit: 3000000 } ) const receipt = await tx.wait() expect(receipt.status, 'Submit vote failed').to.equal(1) @@ -264,22 +275,15 @@ describe('Vote', function () { ) expect(isProofValid, "proof is not valid").to.be.true - const nullifiers: BigInt[] = [] - - for (let i = 0; i < MAX_KARMA_BUDGET; i++) { - const variableName = 'main.karma_nullifiers['+i+']' - nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) - } - - await expect(unirepContractCalledByAttesters[fromUser].vote( + await expect(contractCalledByAttesters[fromUser].vote( + attesterSigs[fromUser], attestation, toEpk, fromEpk, publicSignals, formatProofForVerifierContract(proof), - nullifiers, - { value: attestingFee, gasLimit: 1000000 } - )).to.be.revertedWith('Unirep: the nullifier has been submitted') + { value: voteFee, gasLimit: 3000000 } + )).to.be.revertedWith('Unirep Social: the nullifier has been submitted') }) it('submit upvote from the same epoch key should fail', async() => { @@ -309,21 +313,14 @@ describe('Vote', function () { ) expect(isProofValid, "proof is not valid").to.be.true - const nullifiers: BigInt[] = [] - - for (let i = 0; i < MAX_KARMA_BUDGET; i++) { - const variableName = 'main.karma_nullifiers['+i+']' - nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) - } - - await expect(unirepContractCalledByAttesters[fromUser].vote( + await expect(contractCalledByAttesters[fromUser].vote( + attesterSigs[fromUser], attestation, toEpk, fromEpk, publicSignals, formatProofForVerifierContract(proof), - nullifiers, - { value: attestingFee, gasLimit: 1000000 } + { value: voteFee, gasLimit: 3000000 } )).to.be.revertedWith('Unirep: attester has already attested to this epoch key') }) @@ -354,22 +351,15 @@ describe('Vote', function () { ) expect(isProofValid, "proof is valid").to.be.false - const nullifiers: BigInt[] = [] - - for (let i = 0; i < MAX_KARMA_BUDGET; i++) { - const variableName = 'main.karma_nullifiers['+i+']' - nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) - } - - await expect(unirepContractCalledByAttesters[fromUser].vote( + await expect(contractCalledByAttesters[fromUser].vote( + attesterSigs[fromUser], attestation, toEpk, fromEpk, publicSignals, formatProofForVerifierContract(proof), - nullifiers, - { value: attestingFee, gasLimit: 1000000 } - )).to.be.revertedWith('Unirep: the proof is not valid') + { value: voteFee, gasLimit: 3000000 } + )).to.be.revertedWith('Unirep Social: the proof is not valid') }) it('submit vote with 0 value should fail', async() => { @@ -382,22 +372,15 @@ describe('Vote', function () { overwriteGraffiti, ) - const nullifiers: BigInt[] = [] - - for (let i = 0; i < MAX_KARMA_BUDGET; i++) { - const variableName = 'main.karma_nullifiers['+i+']' - nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) - } - - await expect(unirepContractCalledByAttesters[fromUser].vote( + await expect(contractCalledByAttesters[fromUser].vote( + attesterSigs[fromUser], zeroAttestation, toEpk, fromEpk, publicSignals, formatProofForVerifierContract(proof), - nullifiers, - { value: attestingFee, gasLimit: 1000000 } - )).to.be.revertedWith('Unirep: should submit a positive vote value') + { value: voteFee, gasLimit: 3000000 } + )).to.be.revertedWith('Unirep Social: should submit a positive vote value') }) it('submit vote with both upvote value and downvote value should fail', async() => { @@ -410,22 +393,15 @@ describe('Vote', function () { overwriteGraffiti, ) - const nullifiers: BigInt[] = [] - - for (let i = 0; i < MAX_KARMA_BUDGET; i++) { - const variableName = 'main.karma_nullifiers['+i+']' - nullifiers.push(getSignalByNameViaSym('proveReputation', witness, variableName)) - } - - await expect(unirepContractCalledByAttesters[fromUser].vote( + await expect(contractCalledByAttesters[fromUser].vote( + attesterSigs[fromUser], invalidAttestation, toEpk, fromEpk, publicSignals, formatProofForVerifierContract(proof), - nullifiers, - { value: attestingFee, gasLimit: 1000000 } - )).to.be.revertedWith('Unirep: should only choose to upvote or to downvote') + { value: voteFee, gasLimit: 3000000 } + )).to.be.revertedWith('Unirep Social: should only choose to upvote or to downvote') }) }) }) \ No newline at end of file diff --git a/test/integration/Integration.ts b/test/integration/Integration.ts index 90eb01d..974a512 100644 --- a/test/integration/Integration.ts +++ b/test/integration/Integration.ts @@ -13,6 +13,7 @@ import { formatProofForVerifierContract, genVerifyEpochKeyProofAndPublicSignals, genVerifyUserStateTransitionProofAndPublicSignals, getSignalByNameViaSym, verifyEPKProof, verifyProveReputationProof, verifyUserStateTransitionProof, verifyProveReputationFromAttesterProof } from "../circuits/utils" import { DEFAULT_AIRDROPPED_KARMA, DEFAULT_COMMENT_KARMA, DEFAULT_POST_KARMA } from '../../config/socialMedia' import { add0x } from '../../crypto/SMT' +import { deployUnirepSocial } from '../../core/utils' describe('Integration', function () { this.timeout(500000) @@ -20,14 +21,21 @@ describe('Integration', function () { let unirepState: UnirepState let users: UserState[] = new Array(2) let attesters = new Array(2) + let attesterSigs = new Array(2) + const firstUser = 0 + const secondUser = 1 + const firstAttester = 0 + const secondAttester = 1 // Data that are needed for verifying proof let userStateLeavesAfterTransition: IUserStateLeaf[][] = new Array(2) let graffitiPreImageMap = new Array(2) let unirepContract: ethers.Contract - let unirepContractCalledByFirstAttester, unirepContractCalledBySecondAttester + let unirepSocialContract: ethers.Contract + let contractCalledByFirstAttester, contractCalledBySecondAttester let _treeDepths + const voteFee = attestingFee.mul(2) let prevEpoch: ethers.BigNumber let currentEpoch: ethers.BigNumber @@ -48,6 +56,7 @@ describe('Integration', function () { _treeDepths = getTreeDepthsForTesting("circuit") unirepContract = await deployUnirep(accounts[0], _treeDepths) + unirepSocialContract = await deployUnirepSocial(accounts[0], unirepContract.address) currentEpoch = await unirepContract.currentEpoch() emptyUserStateRoot = computeEmptyUserStateRoot(circuitUserStateTreeDepth) @@ -70,7 +79,7 @@ describe('Integration', function () { const id = genIdentity() const commitment = genIdentityCommitment(id) - const tx = await unirepContract.userSignUp(commitment) + const tx = await unirepSocialContract.userSignUp(commitment) const receipt = await tx.wait() expect(receipt.status, 'User sign up failed').to.equal(1) @@ -83,7 +92,7 @@ describe('Integration', function () { ] ) unirepState.signUp(currentEpoch.toNumber(), BigInt(hashedStateLeaf)) - users[0] = new UserState( + users[firstUser] = new UserState( unirepState, id, commitment, @@ -101,25 +110,26 @@ describe('Integration', function () { } expect(GSTreeLeafIndex).to.equal(0) - users[0].signUp(latestTransitionedToEpoch, GSTreeLeafIndex) + users[firstUser].signUp(latestTransitionedToEpoch, GSTreeLeafIndex) console.log(`First user signs up with commitment (${commitment}), in epoch ${latestTransitionedToEpoch} and GST leaf ${GSTreeLeafIndex}`) console.log('----------------------User State----------------------') - console.log(users[0].toJSON(4)) + console.log(users[firstUser].toJSON(4)) console.log('------------------------------------------------------') }) it('First attester signs up', async () => { - attesters[0] = new Object() - attesters[0]['acct'] = accounts[1] - attesters[0]['addr'] = await attesters[0]['acct'].getAddress() - unirepContractCalledByFirstAttester = unirepContract.connect(attesters[0]['acct']) - - const tx = await unirepContractCalledByFirstAttester.attesterSignUp() + attesters[firstAttester] = new Object() + attesters[firstAttester]['acct'] = accounts[1] + attesters[firstAttester]['addr'] = await attesters[firstAttester]['acct'].getAddress() + contractCalledByFirstAttester = unirepSocialContract.connect(attesters[firstAttester]['acct']) + const message = ethers.utils.solidityKeccak256(["address", "address"], [attesters[firstAttester]['addr'], unirepContract.address]) + attesterSigs[firstAttester] = await attesters[firstAttester]['acct'].signMessage(ethers.utils.arrayify(message)) + const tx = await contractCalledByFirstAttester.attesterSignUp(attesterSigs[firstAttester]) const receipt = await tx.wait() expect(receipt.status, 'Attester sign up failed').to.equal(1) - attesters[0].id = BigInt(await unirepContract.attesters(attesters[0]['addr'])) - console.log(`First attester signs up, attester id: ${attesters[0].id}`) + attesters[firstAttester].id = BigInt(await unirepContract.attesters(attesters[firstAttester]['addr'])) + console.log(`First attester signs up, attester id: ${attesters[firstAttester].id}`) }) it('Global state tree built from events should match', async () => { @@ -160,7 +170,7 @@ describe('Integration', function () { await hardhatEthers.provider.send("evm_increaseTime", [epochLength]) // Begin epoch transition const numEpochKeysToSeal = await unirepContract.getNumEpochKey(currentEpoch) - let tx = await unirepContract.beginEpochTransition(numEpochKeysToSeal) + let tx = await unirepSocialContract.beginEpochTransition(numEpochKeysToSeal) let receipt = await tx.wait() expect(receipt.status, 'Epoch transition failed').to.equal(1) console.log(`Gas cost of epoch transition(sealing hash chain of ${numEpochKeysToSeal} epoch keys): ${receipt.gasUsed.toString()}`) @@ -175,20 +185,20 @@ describe('Integration', function () { }) it('First user transition from first epoch', async () => { - const fromEpoch = users[0].latestTransitionedEpoch + const fromEpoch = users[firstUser].latestTransitionedEpoch const fromEpochGSTree: IncrementalQuinTree = unirepState.genGSTree(fromEpoch) const GSTreeRoot = fromEpochGSTree.root const fromEpochTree = await unirepState.genEpochTree(fromEpoch) const epochTreeRoot = fromEpochTree.getRootHash() const nullifierTreeRoot = (await unirepState.genNullifierTree()).getRootHash() - const attestationNullifiers = users[0].getAttestationNullifiers(fromEpoch) - const epkNullifiers = users[0].getEpochKeyNullifiers(fromEpoch) + const attestationNullifiers = users[firstUser].getAttestationNullifiers(fromEpoch) + const epkNullifiers = users[firstUser].getEpochKeyNullifiers(fromEpoch) console.log('Processing first user\'s transition: ') console.log(`from epoch ${fromEpoch}, GSTreeRoot ${GSTreeRoot}, epochTreeRoot ${epochTreeRoot}, nullifierTreeRoot ${nullifierTreeRoot}`) console.log(`and attestationNullifiers [${attestationNullifiers}]`) console.log(`and epkNullifiers [${epkNullifiers}]`) - const circuitInputs = await users[0].genUserStateTransitionCircuitInputs() + const circuitInputs = await users[firstUser].genUserStateTransitionCircuitInputs() const results = await genVerifyUserStateTransitionProofAndPublicSignals(stringifyBigInts(circuitInputs)) const isValid = await verifyUserStateTransitionProof(results['proof'], results['publicSignals']) expect(isValid, 'Verify user transition circuit off-chain failed').to.be.true @@ -210,10 +220,10 @@ describe('Integration', function () { outputEPKNullifiers.push(outputNullifier) } // Verify new state state outputted by circuit is the same as the one computed off-chain - const newState = await users[0].genNewUserStateAfterTransition() + const newState = await users[firstUser].genNewUserStateAfterTransition() expect(newGSTLeaf, 'Computed new GST leaf should match').to.equal(newState.newGSTLeaf) - userStateLeavesAfterTransition[0] = newState.newUSTLeaves - let tx = await unirepContract.updateUserStateRoot( + userStateLeavesAfterTransition[firstUser] = newState.newUSTLeaves + let tx = await unirepSocialContract.updateUserStateRoot( newGSTLeaf, outputAttestationNullifiers, outputEPKNullifiers, @@ -232,13 +242,7 @@ describe('Integration', function () { const stateTransitionByEpochEvent = await unirepContract.queryFilter(stateTransitionByEpochFilter) expect(stateTransitionByEpochEvent.length, 'Number of state transition events current epoch should be 1').to.equal(1) - // const newGSTLeafByEpochFilter = unirepContract.filters.NewGSTLeafInserted(currentEpoch) - // const newGSTLeafByEpochEvent = await unirepContract.queryFilter(newGSTLeafByEpochFilter) - // console.log(newGSTLeafByEpochEvent) - // expect(newGSTLeafByEpochEvent.length, 'Number of new GST leaves should be 1').to.equal(1) - const stateTransitionArgs: any = stateTransitionByEpochEvent[0]['args'] - // const newGSTLeafArgs: any = stateTransitionByEpochEvent[0]['args'] // Verify on-chain const isProofValid = await unirepContract.verifyUserStateTransition( @@ -247,8 +251,8 @@ describe('Integration', function () { stateTransitionArgs['userTransitionedData']['epkNullifiers'], stateTransitionArgs['userTransitionedData']['fromEpoch'], stateTransitionArgs['userTransitionedData']['fromGlobalStateTree'], + DEFAULT_AIRDROPPED_KARMA, stateTransitionArgs['userTransitionedData']['fromEpochTree'], - // stateTransitionArgs['userTransitionedData']['_fromNullifierTreeRoot'], stateTransitionArgs['userTransitionedData']['proof'], ) expect(isProofValid, 'Verify user state transition on-chain failed').to.be.true @@ -259,15 +263,15 @@ describe('Integration', function () { const allNullifiers = attestationNullifiers.concat(epkNullifiers).map((nullifier) => BigInt(nullifier) % BigInt(2 ** circuitNullifierTreeDepth)) const latestUserStateLeaves = userStateLeavesAfterTransition[0] // Leaves should be empty as no reputations are given yet - users[0].transition(latestUserStateLeaves) + users[firstUser].transition(latestUserStateLeaves) console.log(`First user finish state transition. AttesterIds in UST: [${latestUserStateLeaves.map((l) => l.attesterId.toString())}]`) - expect(users[0].latestTransitionedEpoch, 'First user should transition to current epoch').to.equal(currentEpoch.toNumber()) + expect(users[firstUser].latestTransitionedEpoch, 'First user should transition to current epoch').to.equal(currentEpoch.toNumber()) unirepState.userStateTransition(currentEpoch.toNumber(), BigInt(stateTransitionArgs['userTransitionedData']['newGlobalStateTreeLeaf']), allNullifiers) console.log('User state transition off-chain: ') console.log(`newGSTLeaf ${BigInt(stateTransitionArgs['userTransitionedData']['newGlobalStateTreeLeaf'])}, attestation attestationNullifiers [${attestationNullifiers}] and epk nullifier ${epkNullifiers}`) console.log('----------------------User State----------------------') - console.log(users[0].toJSON(4)) + console.log(users[firstUser].toJSON(4)) console.log('------------------------------------------------------') }) @@ -275,7 +279,7 @@ describe('Integration', function () { const id = genIdentity() const commitment = genIdentityCommitment(id) - const tx = await unirepContract.userSignUp(commitment) + const tx = await unirepSocialContract.userSignUp(commitment) const receipt = await tx.wait() expect(receipt.status, 'User sign up failed').to.equal(1) @@ -288,7 +292,7 @@ describe('Integration', function () { ] ) unirepState.signUp(currentEpoch.toNumber(), BigInt(hashedStateLeaf.toString())) - users[1] = new UserState( + users[secondUser] = new UserState( unirepState, id, commitment, @@ -306,32 +310,33 @@ describe('Integration', function () { } expect(GSTreeLeafIndex).to.equal(1) - users[1].signUp(latestTransitionedToEpoch, GSTreeLeafIndex) + users[secondUser].signUp(latestTransitionedToEpoch, GSTreeLeafIndex) console.log(`Second user signs up with commitment (${commitment}), in epoch ${latestTransitionedToEpoch} and GST leaf ${GSTreeLeafIndex}`) console.log('----------------------User State----------------------') - console.log(users[1].toJSON(4)) + console.log(users[secondUser].toJSON(4)) console.log('------------------------------------------------------') }) it('Second attester signs up', async () => { - attesters[1] = new Object() - attesters[1]['acct'] = accounts[2] - attesters[1]['addr'] = await attesters[1]['acct'].getAddress() - unirepContractCalledBySecondAttester = unirepContract.connect(attesters[1]['acct']) - - const tx = await unirepContractCalledBySecondAttester.attesterSignUp() + attesters[secondAttester] = new Object() + attesters[secondAttester]['acct'] = accounts[2] + attesters[secondAttester]['addr'] = await attesters[secondAttester]['acct'].getAddress() + contractCalledBySecondAttester = unirepSocialContract.connect(attesters[secondAttester]['acct']) + const message = ethers.utils.solidityKeccak256(["address", "address"], [attesters[secondAttester]['addr'], unirepContract.address]) + attesterSigs[secondAttester] = await attesters[secondAttester]['acct'].signMessage(ethers.utils.arrayify(message)) + const tx = await contractCalledBySecondAttester.attesterSignUp(attesterSigs[secondAttester]) const receipt = await tx.wait() expect(receipt.status, 'Attester sign up failed').to.equal(1) - attesters[1].id = BigInt(await unirepContract.attesters(attesters[1]['addr'])) - console.log(`First attester signs up, attester id: ${attesters[0].id}`) + attesters[secondAttester].id = BigInt(await unirepContract.attesters(attesters[secondAttester]['addr'])) + console.log(`First attester signs up, attester id: ${attesters[secondAttester].id}`) }) it('first user generate an epoch key and verify it', async () => { const epochKeyNonce = 0 - const epk = genEpochKey(users[0].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth).toString(16) + const epk = genEpochKey(users[firstUser].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth).toString(16) - const circuitInputs = await users[0].genVerifyEpochKeyCircuitInputs( + const circuitInputs = await users[firstUser].genVerifyEpochKeyCircuitInputs( epochKeyNonce, // generate epoch key from epoch nonce ) const results = await genVerifyEpochKeyProofAndPublicSignals(stringifyBigInts(circuitInputs)) @@ -355,7 +360,7 @@ describe('Integration', function () { it('first user publish a post and generate epoch key', async () => { const epochKeyNonce = 0 - const epk = genEpochKey(users[0].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth).toString(16) + const epk = genEpochKey(users[firstUser].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth).toString(16) // gen nullifier nonce list const proveKarmaAmount = DEFAULT_POST_KARMA @@ -372,12 +377,6 @@ describe('Integration', function () { ) const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) - const nullifiers: BigInt[] = [] - - for (let i = 0; i < DEFAULT_POST_KARMA; i++) { - const variableName = 'main.karma_nullifiers['+i+']' - nullifiers.push(getSignalByNameViaSym('proveReputation', results['witness'], variableName) % BigInt(2 ** circuitNullifierTreeDepth) ) - } const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) expect(isValid, 'Verify reputation proof off-chain failed').to.be.true @@ -387,7 +386,7 @@ describe('Integration', function () { const publicSignals = results['publicSignals'] const firstUserEpochKey = genEpochKey(users[0].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth) - const isProofValid = await unirepContract.verifyReputation( + const isProofValid = await unirepSocialContract.verifyReputation( publicSignals, proof ) @@ -402,13 +401,13 @@ describe('Integration', function () { false, ) - const tx = await unirepContractCalledByFirstAttester.publishPost( + const tx = await contractCalledByFirstAttester.publishPost( + attesterSigs[firstAttester], BigInt(add0x(postId)), epochKey, postText, publicSignals, proof, - nullifiers, { value: attestingFee, gasLimit: 1000000 } ) @@ -424,9 +423,9 @@ describe('Integration', function () { it('Second attester upvote to first user', async () => { const nonce = 0 - const firstUserEpochKey = genEpochKey(users[0].id.identityNullifier, currentEpoch.toNumber(), nonce, circuitEpochTreeDepth) + const firstUserEpochKey = genEpochKey(users[firstUser].id.identityNullifier, currentEpoch.toNumber(), nonce, circuitEpochTreeDepth) const graffitiPreImage = genRandomSalt() - const secondUserEpochKey = genEpochKey(users[1].id.identityNullifier, currentEpoch.toNumber(), nonce, circuitEpochTreeDepth) + const secondUserEpochKey = genEpochKey(users[secondUser].id.identityNullifier, currentEpoch.toNumber(), nonce, circuitEpochTreeDepth) // gen nullifier nonce list const voteValue = 3 @@ -439,11 +438,11 @@ describe('Integration', function () { // Add graffiti pre-image to graffitiPreImageMap graffitiPreImageMap[0] = new Object() - graffitiPreImageMap[0][attesters[1].id] = graffitiPreImage + graffitiPreImageMap[0][attesters[secondAttester].id] = graffitiPreImage console.log(`Attester attest to epk ${firstUserEpochKey} with vote value ${voteValue}`) // generating reputation proof - const circuitInputs = await users[1].genProveReputationCircuitInputs( + const circuitInputs = await users[secondUser].genProveReputationCircuitInputs( nonce, // generate epoch key from epoch nonce proveKarmaAmount, // the amount of output karma nullifiers nonceStarter, // nonce to generate karma nullifiers @@ -452,14 +451,6 @@ describe('Integration', function () { const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) - // generating onchain nullifiers - const nullifiers: BigInt[] = [] - - for (let i = 0; i < voteValue; i++) { - const variableName = 'main.karma_nullifiers['+i+']' - nullifiers.push(getSignalByNameViaSym('proveReputation', results['witness'], variableName) % BigInt(2 ** _treeDepths.nullifierTreeDepth) ) - } - // verify reputation proof const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) expect(isValid, 'verify reputation circuit failed').to.equal(true) @@ -470,7 +461,7 @@ describe('Integration', function () { const publicSignals = results['publicSignals'] const attestationToEpochKey = new Attestation( - BigInt(attesters[1].id), + BigInt(attesters[secondAttester].id), BigInt(upvoteValue), BigInt(0), hashOne(graffitiPreImage), @@ -478,21 +469,21 @@ describe('Integration', function () { ) const attestationToAttester = new Attestation( - BigInt(attesters[1].id), + BigInt(attesters[secondAttester].id), BigInt(0), BigInt(upvoteValue), BigInt(0), false, ) - const tx = await unirepContractCalledBySecondAttester.vote( + const tx = await contractCalledBySecondAttester.vote( + attesterSigs[secondAttester], attestationToEpochKey, firstUserEpochKey, fromEpochKey, publicSignals, proof, - nullifiers, - { value: attestingFee } + { value: voteFee } ) const receipt = await tx.wait() expect(receipt.status, 'Submit attestation failed').to.equal(1) @@ -517,9 +508,9 @@ describe('Integration', function () { for (let attester of attesters) { let attestationsByAttesterFilter = unirepContract.filters.AttestationSubmitted(null, null, attester['addr']) let attestationsByAttesterEvent = await unirepContract.queryFilter(attestationsByAttesterFilter) - if (attester.id == 1) { + if (attester.id == attesters[firstAttester].id) { expect(attestationsByAttesterEvent.length, 'Number of attestations from first attester should be 1').to.equal(1) - } else if (attester.id == 2) { + } else if (attester.id == attesters[secondAttester].id) { expect(attestationsByAttesterEvent.length, 'Number of attestations from second attester should be 2').to.equal(2) } else { throw new Error(`Invalid attester id ${attester.id}`) @@ -615,20 +606,20 @@ describe('Integration', function () { }) it('First user transition from second epoch', async () => { - const fromEpoch = users[0].latestTransitionedEpoch + const fromEpoch = users[firstUser].latestTransitionedEpoch const fromEpochGSTree: IncrementalQuinTree = unirepState.genGSTree(fromEpoch) const GSTreeRoot = fromEpochGSTree.root const fromEpochTree = await unirepState.genEpochTree(fromEpoch) const epochTreeRoot = fromEpochTree.getRootHash() const nullifierTreeRoot = (await unirepState.genNullifierTree()).getRootHash() - const attestationNullifiers = users[0].getAttestationNullifiers(fromEpoch) + const attestationNullifiers = users[firstUser].getAttestationNullifiers(fromEpoch) const epkNullifiers = users[0].getEpochKeyNullifiers(fromEpoch) console.log('Processing first user\'s transition: ') console.log(`from epoch ${fromEpoch}, GSTreeRoot ${GSTreeRoot}, epochTreeRoot ${epochTreeRoot}, nullifierTreeRoot ${nullifierTreeRoot}`) console.log(`and attestationNullifiers [${attestationNullifiers}]`) console.log(`and epkNullifiers [${epkNullifiers}]`) - const circuitInputs = await users[0].genUserStateTransitionCircuitInputs() + const circuitInputs = await users[firstUser].genUserStateTransitionCircuitInputs() const results = await genVerifyUserStateTransitionProofAndPublicSignals(stringifyBigInts(circuitInputs)) const isValid = await verifyUserStateTransitionProof(results['proof'], results['publicSignals']) expect(isValid, 'Verify user transition circuit off-chain failed').to.be.true @@ -650,9 +641,9 @@ describe('Integration', function () { outputEPKNullifiers.push(outputNullifier) } // Verify new state state outputted by circuit is the same as the one computed off-chain - const newState = await users[0].genNewUserStateAfterTransition() + const newState = await users[firstUser].genNewUserStateAfterTransition() expect(newGSTLeaf, 'Computed new GST leaf should match').to.equal(newState.newGSTLeaf) - userStateLeavesAfterTransition[0] = newState.newUSTLeaves + userStateLeavesAfterTransition[firstUser] = newState.newUSTLeaves let tx = await unirepContract.updateUserStateRoot( newGSTLeaf, outputAttestationNullifiers, @@ -684,10 +675,6 @@ describe('Integration', function () { const stateTransitionByEpochEvent = await unirepContract.queryFilter(stateTransitionByEpochFilter) expect(stateTransitionByEpochEvent.length, 'Number of state transition events current epoch should be 1').to.equal(1) - // const newGSTLeafByEpochFilter = unirepContract.filters.NewGSTLeafInserted(currentEpoch) - // const newGSTLeafByEpochEvent = await unirepContract.queryFilter(newGSTLeafByEpochFilter) - // expect(newGSTLeafByEpochEvent.length, 'Number of new GST leaves should be 1').to.equal(1) - const stateTransitionArgs: any = stateTransitionByEpochEvent[0]['args'] const newGSTLeaf: any = stateTransitionArgs['userTransitionedData']['newGlobalStateTreeLeaf'] @@ -698,8 +685,8 @@ describe('Integration', function () { stateTransitionArgs['userTransitionedData']['epkNullifiers'], stateTransitionArgs['userTransitionedData']['fromEpoch'], stateTransitionArgs['userTransitionedData']['fromGlobalStateTree'], + DEFAULT_AIRDROPPED_KARMA, stateTransitionArgs['userTransitionedData']['fromEpochTree'], - // stateTransitionArgs['userTransitionedData']['_fromNullifierTreeRoot'], stateTransitionArgs['userTransitionedData']['proof'], ) expect(isProofValid, 'Verify user state transition on-chain failed').to.be.true @@ -710,7 +697,7 @@ describe('Integration', function () { const allNullifiers = attestationNullifiers.concat(epkNullifiers).map((nullifier) => BigInt(nullifier) % BigInt(2 ** circuitNullifierTreeDepth)) const latestUserStateLeaves = userStateLeavesAfterTransition[0] - users[0].transition(latestUserStateLeaves) + users[firstUser].transition(latestUserStateLeaves) console.log(`First user finish state transition. AttesterIds in UST: [${latestUserStateLeaves.map((l) => l.attesterId.toString())}]`) expect(users[0].latestTransitionedEpoch, 'First user should transition to current epoch').to.equal(currentEpoch.toNumber()) @@ -718,12 +705,12 @@ describe('Integration', function () { console.log('User state transition off-chain: ') console.log(`newGSTLeaf ${BigInt(newGSTLeaf)}, attestation attestationNullifiers [${attestationNullifiers}] and epk nullifier ${epkNullifiers}`) console.log('----------------------User State----------------------') - console.log(users[0].toJSON(4)) + console.log(users[firstUser].toJSON(4)) console.log('------------------------------------------------------') }) it('First user prove his reputation', async () => { - const attesterId = attesters[1].id // Prove reputation received from first attester + const attesterId = attesters[secondAttester].id // Prove reputation received from first attester const provePosRep = BigInt(1) const proveNegRep = BigInt(1) const proveRepDiff = BigInt(1) @@ -733,7 +720,7 @@ describe('Integration', function () { const minRepDiff = BigInt(0) const graffitiPreImage = graffitiPreImageMap[0][attesterId.toString()] console.log(`Proving reputation from attester ${attesterId} with minPosRep ${minPosRep}, maxNegRep ${maxNegRep} and graffitiPreimage ${graffitiPreImage}`) - const circuitInputs = await users[0].genProveReputationFromAttesterCircuitInputs(attesterId, provePosRep, proveNegRep, proveRepDiff, proveGraffiti, minPosRep, maxNegRep, minRepDiff, graffitiPreImage) + const circuitInputs = await users[firstUser].genProveReputationFromAttesterCircuitInputs(attesterId, provePosRep, proveNegRep, proveRepDiff, proveGraffiti, minPosRep, maxNegRep, minRepDiff, graffitiPreImage) const startTime = new Date().getTime() const results = await genVerifyReputationFromAttesterProofAndPublicSignals(stringifyBigInts(circuitInputs)) const endTime = new Date().getTime() @@ -746,7 +733,7 @@ describe('Integration', function () { const nullifierTree = await unirepState.genNullifierTree() const nullifierTreeRoot = nullifierTree.getRootHash() const publicInput = [ - users[0].latestTransitionedEpoch, + users[firstUser].latestTransitionedEpoch, GSTreeRoot, nullifierTreeRoot, attesterId, @@ -768,7 +755,7 @@ describe('Integration', function () { it('first user leave a comment and generate epoch key', async () => { const epochKeyNonce = 0 - const epk = genEpochKey(users[0].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth).toString(16) + const epk = genEpochKey(users[firstUser].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth).toString(16) // gen nullifier nonce list const proveKarmaAmount = DEFAULT_COMMENT_KARMA @@ -777,7 +764,7 @@ describe('Integration', function () { // gen minRep proof const minRep = 0 - const circuitInputs = await users[0].genProveReputationCircuitInputs( + const circuitInputs = await users[firstUser].genProveReputationCircuitInputs( epochKeyNonce, // generate epoch key from epoch nonce proveKarmaAmount, // the amount of output karma nullifiers nonceStarter, // nonce to generate karma nullifiers @@ -785,12 +772,6 @@ describe('Integration', function () { ) const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) - const nullifiers: BigInt[] = [] - - for (let i = 0; i < DEFAULT_COMMENT_KARMA; i++) { - const variableName = 'main.karma_nullifiers['+i+']' - nullifiers.push(getSignalByNameViaSym('proveReputation', results['witness'], variableName) % BigInt(2 ** circuitNullifierTreeDepth) ) - } const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) expect(isValid, 'Verify reputation proof off-chain failed').to.be.true @@ -799,7 +780,7 @@ describe('Integration', function () { const epochKey = BigInt(add0x(epk)) const publicSignals = results['publicSignals'] - const firstUserEpochKey = genEpochKey(users[0].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth) + const firstUserEpochKey = genEpochKey(users[firstUser].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth) const isProofValid = await unirepContract.verifyReputation( publicSignals, proof @@ -808,21 +789,21 @@ describe('Integration', function () { expect(isProofValid, 'Verify reputation proof on-chain failed').to.be.true const attestationToEpochKey = new Attestation( - BigInt(attesters[0].id), + BigInt(attesters[firstAttester].id), BigInt(0), BigInt(DEFAULT_COMMENT_KARMA), BigInt(0), false, ) - const tx = await unirepContractCalledByFirstAttester.leaveComment( + const tx = await contractCalledByFirstAttester.leaveComment( + attesterSigs[firstAttester], BigInt(add0x(postId)), BigInt(add0x(commentId)), epochKey, commentText, publicSignals, proof, - nullifiers, { value: attestingFee, gasLimit: 1000000 } ) @@ -837,7 +818,7 @@ describe('Integration', function () { }) it('First user submits duplicated state transition proof', async () => { - let tx = await unirepContract.updateUserStateRoot( + let tx = await unirepSocialContract.updateUserStateRoot( duplicatedProofInputs["newGSTLeaf"], duplicatedProofInputs["attestationNullifiers"], duplicatedProofInputs["epkNullifiers"], @@ -856,14 +837,14 @@ describe('Integration', function () { hardhatEthers.provider, unirepContract.address, 0, - users[0].id, - users[0].commitment, + users[firstUser].id, + users[firstUser].commitment, ) // Check user state matches - expect(users[0].latestTransitionedEpoch, 'First user latest transitioned epoch mismatch').to.equal(userStateFromContract.latestTransitionedEpoch) - expect(users[0].latestGSTLeafIndex, 'First user latest GST leaf index mismatch').to.equal(userStateFromContract.latestGSTLeafIndex) - expect((await users[0].genUserStateTree()).getRootHash(), 'First user UST mismatch').to.equal((await userStateFromContract.genUserStateTree()).getRootHash()) + expect(users[firstUser].latestTransitionedEpoch, 'First user latest transitioned epoch mismatch').to.equal(userStateFromContract.latestTransitionedEpoch) + expect(users[firstUser].latestGSTLeafIndex, 'First user latest GST leaf index mismatch').to.equal(userStateFromContract.latestGSTLeafIndex) + expect((await users[firstUser].genUserStateTree()).getRootHash(), 'First user UST mismatch').to.equal((await userStateFromContract.genUserStateTree()).getRootHash()) // Check unirep state matches expect(unirepState.currentEpoch, 'Unirep state current epoch mismatch').to.equal(userStateFromContract.getUnirepStateCurrentEpoch()) From e25c0c21f21fb3ed1d48b07551c0c98c3d00405d Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Thu, 17 Jun 2021 20:34:58 +0800 Subject: [PATCH 36/38] update EventSequencing test, fix reused `i` in loop --- test/contracts/EventSequencing.ts | 398 +++++++++++++++++++++++------- test/contracts/Posting.ts | 6 +- test/contracts/Vote.ts | 6 +- 3 files changed, 312 insertions(+), 98 deletions(-) diff --git a/test/contracts/EventSequencing.ts b/test/contracts/EventSequencing.ts index e085c26..2599761 100644 --- a/test/contracts/EventSequencing.ts +++ b/test/contracts/EventSequencing.ts @@ -1,96 +1,283 @@ import { ethers as hardhatEthers } from 'hardhat' import { ethers } from 'ethers' import chai from "chai" -import { attestingFee, epochLength, numAttestationsPerEpochKey, numEpochKeyNoncePerEpoch } from '../../config/testLocal' +import { attestingFee, circuitEpochTreeDepth, circuitGlobalStateTreeDepth, circuitNullifierTreeDepth, circuitUserStateTreeDepth, epochLength, numAttestationsPerEpochKey, numEpochKeyNoncePerEpoch } from '../../config/testLocal' import { genRandomSalt } from '../../crypto/crypto' import { genIdentity, genIdentityCommitment } from 'libsemaphore' import { deployUnirep, genEpochKey, getTreeDepthsForTesting } from '../utils' const { expect } = chai -import Unirep from "../../artifacts/contracts/Unirep.sol/Unirep.json" -import { Attestation } from "../../core" -import { DEFAULT_AIRDROPPED_KARMA } from '../../config/socialMedia' +import UnirepSocial from "../../artifacts/contracts/UnirepSocial.sol/UnirepSocial.json" +import { Attestation, UnirepState, UserState } from "../../core" +import { DEFAULT_AIRDROPPED_KARMA, DEFAULT_POST_KARMA } from '../../config/socialMedia' +import { deployUnirepSocial } from '../../core/utils' +import { IncrementalQuinTree, stringifyBigInts } from 'maci-crypto' +import { formatProofForVerifierContract, genVerifyReputationProofAndPublicSignals, verifyProveReputationProof } from '../../circuits/utils' +import { getSignalByNameViaSym } from '../circuits/utils' describe('EventSequencing', () => { - const events = ["UserSignUp", "AttestationSubmitted", "EpochEnded", "UserStateTransitioned"] - let expectedEventsInOrder: string[] = [] + enum unirepEvents { + UserSignUp, + AttestationSubmitted, + EpochEnded, + UserStateTransitioned + } + + let expectedUnirepEventsInOrder: number[] = [] + let expectedSignUpEventsLength: number = 0 + let expectedPostEventsLength: number = 0 + let expectedCommentEventsLength: number = 0 + let expectedVoteEventsLength: number = 0 let unirepContract + let unirepSocialContract let accounts: ethers.Signer[] + let currentEpoch + let GSTree + let GSTreeLeafIndex: number = 0 + let emptyUserStateRoot + let unirepState + let users: any[] = [] let userIds: any[] = [], userCommitments: any[] = [] + const postId = genRandomSalt() + const commentId = genRandomSalt() + const voteFee = attestingFee.mul(2) - let attester, attesterAddress, attesterId, unirepContractCalledByAttester + let attester, attesterAddress, attesterId, attesterSig, contractCalledByAttester before(async () => { accounts = await hardhatEthers.getSigners() - const _treeDepths = getTreeDepthsForTesting() + const _treeDepths = getTreeDepthsForTesting('circuit') unirepContract = await deployUnirep(accounts[0], _treeDepths) + unirepSocialContract = await deployUnirepSocial(accounts[0], unirepContract.address) + console.log(unirepContract.address) + console.log(unirepSocialContract.address) + }) - // 1. Fisrt user sign up - let userId = genIdentity() - let userCommitment = genIdentityCommitment(userId) + it('should sign up first user', async () => { + const userId = genIdentity() + const userCommitment = genIdentityCommitment(userId) userIds.push(userId) userCommitments.push(userCommitment) - let tx = await unirepContract.userSignUp(userCommitment, DEFAULT_AIRDROPPED_KARMA) - let receipt = await tx.wait() + const tx = await unirepSocialContract.userSignUp(userCommitment) + const receipt = await tx.wait() expect(receipt.status).equal(1) - expectedEventsInOrder.push(events[0]) + expectedUnirepEventsInOrder.push(unirepEvents.UserSignUp) + expectedSignUpEventsLength++ + }) - // Attester sign up, no events emitted + it('should sign up attester', async () => { attester = accounts[1] attesterAddress = await attester.getAddress() - unirepContractCalledByAttester = await hardhatEthers.getContractAt(Unirep.abi, unirepContract.address, attester) - tx = await unirepContractCalledByAttester.attesterSignUp() - receipt = await tx.wait() + contractCalledByAttester = await hardhatEthers.getContractAt(UnirepSocial.abi, unirepSocialContract.address, attester) + const message = ethers.utils.solidityKeccak256(["address", "address"], [attesterAddress, unirepContract.address]) + attesterSig = await attester.signMessage(ethers.utils.arrayify(message)) + const tx = await contractCalledByAttester.attesterSignUp(attesterSig) + const receipt = await tx.wait() expect(receipt.status).equal(1) attesterId = await unirepContract.attesters(attesterAddress) + }) - // 2. Attest to first user - let currentEpoch = await unirepContract.currentEpoch() + it('should publish a post by first user', async () => { let epochKeyNonce = 0 - let epochKey = genEpochKey(userIds[0].identityNullifier, currentEpoch.toNumber(), epochKeyNonce) - let attestation: Attestation = new Attestation( + const nonceStarter = 0 + + currentEpoch = await unirepContract.currentEpoch() + emptyUserStateRoot = await unirepContract.emptyUserStateRoot() + unirepState = new UnirepState( + circuitGlobalStateTreeDepth, + circuitUserStateTreeDepth, + circuitEpochTreeDepth, + circuitNullifierTreeDepth, + attestingFee, + epochLength, + numEpochKeyNoncePerEpoch, + numAttestationsPerEpochKey, + ) + + const hashedStateLeaf = await unirepContract.hashStateLeaf( + [ + userCommitments[0], + emptyUserStateRoot, + BigInt(DEFAULT_AIRDROPPED_KARMA), + BigInt(0) + ] + ) + const blankGSLeaf = await unirepContract.hashedBlankStateLeaf() + GSTree = new IncrementalQuinTree(circuitGlobalStateTreeDepth, blankGSLeaf, 2) + GSTree.insert(hashedStateLeaf) + + unirepState.signUp(currentEpoch.toNumber(), BigInt(hashedStateLeaf)) + const userState = new UserState( + unirepState, + userIds[0], + userCommitments[0], + false + ) + users.push(userState) + users[0].signUp(currentEpoch, GSTreeLeafIndex) + GSTreeLeafIndex ++ + + const circuitInputs = await users[0].genProveReputationCircuitInputs( + epochKeyNonce, + DEFAULT_POST_KARMA, + nonceStarter, + 0 + ) + + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) + expect(isValid, 'reputation proof is not valid').to.be.true + + const proof = formatProofForVerifierContract(results['proof']) + const epochKey = getSignalByNameViaSym('proveReputation', results['witness'], 'main.epoch_key') + const publicSignals = results['publicSignals'] + + const tx = await contractCalledByAttester.publishPost( + attesterSig, + postId, + epochKey, + 'postText', + publicSignals, + proof, + { value: attestingFee, gasLimit: 1000000 } + ) + const receipt = await tx.wait() + expect(receipt.status, 'Submit post failed').to.equal(1) + expectedUnirepEventsInOrder.push(unirepEvents.AttestationSubmitted) + expectedPostEventsLength++ + }) + + it('should sign up seconde user', async () => { + const userId = genIdentity() + const userCommitment = genIdentityCommitment(userId) + userIds.push(userId) + userCommitments.push(userCommitment) + const tx = await unirepSocialContract.userSignUp(userCommitment) + const receipt = await tx.wait() + expect(receipt.status).equal(1) + expectedUnirepEventsInOrder.push(unirepEvents.UserSignUp) + expectedSignUpEventsLength++ + }) + + it('should leave a comment by seconde user', async () => { + const hashedStateLeaf = await unirepContract.hashStateLeaf( + [ + userCommitments[1], + emptyUserStateRoot, + BigInt(DEFAULT_AIRDROPPED_KARMA), + BigInt(0) + ] + ) + GSTree.insert(hashedStateLeaf) + + unirepState.signUp(currentEpoch.toNumber(), BigInt(hashedStateLeaf)) + const user2State = new UserState( + unirepState, + userIds[1], + userCommitments[1], + false + ) + users.push(user2State) + users[1].signUp(currentEpoch, GSTreeLeafIndex) + GSTreeLeafIndex ++ + + let epochKeyNonce = 0 + const nonceStarter = 0 + + const circuitInputs = await users[1].genProveReputationCircuitInputs( + epochKeyNonce, + DEFAULT_POST_KARMA, + nonceStarter, + 0 + ) + + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) + expect(isValid, 'reputation proof is not valid').to.be.true + + const proof = formatProofForVerifierContract(results['proof']) + const epochKey = getSignalByNameViaSym('proveReputation', results['witness'], 'main.epoch_key') + const publicSignals = results['publicSignals'] + + const tx = await contractCalledByAttester.leaveComment( + attesterSig, + postId, + commentId, + epochKey, + 'commentText', + publicSignals, + proof, + { value: attestingFee, gasLimit: 1000000 } + ) + const receipt = await tx.wait() + expect(receipt.status, 'Submit comment failed').to.equal(1) + expectedUnirepEventsInOrder.push(unirepEvents.AttestationSubmitted) + expectedCommentEventsLength++ + }) + + it('first user should upvote second user', async () => { + let voteValue = 3 + let epochKeyNonce = 1 + const nonceStarter = 10 + const epochKey = genEpochKey(userIds[1].identityNullifier, currentEpoch, epochKeyNonce) + + let attestation = new Attestation( BigInt(attesterId), - BigInt(1), + BigInt(voteValue), BigInt(0), genRandomSalt(), true, ) - tx = await unirepContractCalledByAttester.submitAttestation( + + const circuitInputs = await users[0].genProveReputationCircuitInputs( + epochKeyNonce, + DEFAULT_POST_KARMA, + nonceStarter, + 0 + ) + + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) + expect(isValid, 'reputation proof is not valid').to.be.true + + const proof = formatProofForVerifierContract(results['proof']) + const fromEpochKey = getSignalByNameViaSym('proveReputation', results['witness'], 'main.epoch_key') + const publicSignals = results['publicSignals'] + + const tx = await contractCalledByAttester.vote( + attesterSig, attestation, epochKey, - {value: attestingFee} + fromEpochKey, + publicSignals, + proof, + { value: voteFee, gasLimit: 3000000 } ) - receipt = await tx.wait() - expect(receipt.status).equal(1) - expectedEventsInOrder.push(events[1]) - - // 3. Second user sign up - userId = genIdentity() - userCommitment = genIdentityCommitment(userId) - userIds.push(userId) - userCommitments.push(userCommitment) - tx = await unirepContract.userSignUp(userCommitment, DEFAULT_AIRDROPPED_KARMA) - receipt = await tx.wait() - expect(receipt.status).equal(1) - expectedEventsInOrder.push(events[0]) + const receipt = await tx.wait() + expect(receipt.status, 'Submit upvote failed').to.equal(1) + expectedUnirepEventsInOrder.push(unirepEvents.AttestationSubmitted) + expectedUnirepEventsInOrder.push(unirepEvents.AttestationSubmitted) + expectedVoteEventsLength++ + }) - // 4. First epoch end + it('first epoch ended', async () => { + let currentEpoch = unirepContract.currentEpoch() let numEpochKey = await unirepContract.getNumEpochKey(currentEpoch) - expect(numEpochKey).equal(1) await hardhatEthers.provider.send("evm_increaseTime", [epochLength]) // Fast-forward epochLength of seconds - tx = await unirepContract.beginEpochTransition(numEpochKey) - receipt = await tx.wait() + const tx = await unirepSocialContract.beginEpochTransition(numEpochKey) + const receipt = await tx.wait() expect(receipt.status).equal(1) currentEpoch = await unirepContract.currentEpoch() - expectedEventsInOrder.push(events[2]) + expectedUnirepEventsInOrder.push(unirepEvents.EpochEnded) + }) - // 5. Second user transition + it('Second user should perform transition', async () => { let transitionFromEpoch = 1 const numAttestationsPerEpoch = numEpochKeyNoncePerEpoch * numAttestationsPerEpochKey const attestationNullifiers: BigInt[] = [] @@ -105,7 +292,7 @@ describe('EventSequencing', () => { for (let i = 0; i < 8; i++) { proof.push(BigInt(0)) } - tx = await unirepContract.updateUserStateRoot( + const tx = await unirepContract.updateUserStateRoot( genRandomSalt(), attestationNullifiers, epkNullifiers, @@ -115,52 +302,48 @@ describe('EventSequencing', () => { genRandomSalt(), proof, ) - receipt = await tx.wait() - expect(receipt.status).equal(1) - expectedEventsInOrder.push(events[3]) - - // 6. Attest to second user - epochKeyNonce = 0 - epochKey = genEpochKey(userIds[1].identityNullifier, currentEpoch.toNumber(), epochKeyNonce) - attestation = new Attestation( - BigInt(attesterId), - BigInt(2), - BigInt(1), - genRandomSalt(), - true, - ) - tx = await unirepContractCalledByAttester.submitAttestation( - attestation, - epochKey, - {value: attestingFee} - ) - receipt = await tx.wait() + const receipt = await tx.wait() expect(receipt.status).equal(1) - expectedEventsInOrder.push(events[1]) + expectedUnirepEventsInOrder.push(unirepEvents.UserStateTransitioned) + }) - // 7. Second epoch end - numEpochKey = await unirepContract.getNumEpochKey(currentEpoch) - expect(numEpochKey).equal(1) + + it('second epoch ended', async () => { + const numEpochKey = await unirepContract.getNumEpochKey(currentEpoch) await hardhatEthers.provider.send("evm_increaseTime", [epochLength]) // Fast-forward epochLength of seconds - tx = await unirepContract.beginEpochTransition(numEpochKey) - receipt = await tx.wait() + const tx = await unirepContract.beginEpochTransition(numEpochKey) + const receipt = await tx.wait() expect(receipt.status).equal(1) currentEpoch = await unirepContract.currentEpoch() - expectedEventsInOrder.push(events[2]) - - // 8. Third epoch end - numEpochKey = await unirepContract.getNumEpochKey(currentEpoch) - expect(numEpochKey).equal(0) + expectedUnirepEventsInOrder.push(unirepEvents.EpochEnded) + }) + + it('Third epoch ended', async () => { + const numEpochKey = await unirepContract.getNumEpochKey(currentEpoch) await hardhatEthers.provider.send("evm_increaseTime", [epochLength]) // Fast-forward epochLength of seconds - tx = await unirepContract.beginEpochTransition(numEpochKey) - receipt = await tx.wait() + const tx = await unirepContract.beginEpochTransition(numEpochKey) + const receipt = await tx.wait() expect(receipt.status).equal(1) currentEpoch = await unirepContract.currentEpoch() - expectedEventsInOrder.push(events[2]) + expectedUnirepEventsInOrder.push(unirepEvents.EpochEnded) + }) - // 9. First user transition - transitionFromEpoch = 1 - tx = await unirepContract.updateUserStateRoot( + it('First user should perform transition', async () => { + const transitionFromEpoch = 1 + const numAttestationsPerEpoch = numEpochKeyNoncePerEpoch * numAttestationsPerEpochKey + const attestationNullifiers: BigInt[] = [] + for (let i = 0; i < numAttestationsPerEpoch; i++) { + attestationNullifiers.push(BigInt(16 + i)) + } + const epkNullifiers: BigInt[] = [] + for (let i = 0; i < numEpochKeyNoncePerEpoch; i++) { + epkNullifiers.push(BigInt(255)) + } + const proof: BigInt[] = [] + for (let i = 0; i < 8; i++) { + proof.push(BigInt(0)) + } + const tx = await unirepContract.updateUserStateRoot( genRandomSalt(), attestationNullifiers, epkNullifiers, @@ -170,13 +353,27 @@ describe('EventSequencing', () => { genRandomSalt(), proof, ) - receipt = await tx.wait() + const receipt = await tx.wait() expect(receipt.status).equal(1) - expectedEventsInOrder.push(events[3]) + expectedUnirepEventsInOrder.push(unirepEvents.UserStateTransitioned) + }) - // 10. Second user transition - transitionFromEpoch = 2 - tx = await unirepContract.updateUserStateRoot( + it('Second user should perform transition', async () => { + const transitionFromEpoch = 1 + const numAttestationsPerEpoch = numEpochKeyNoncePerEpoch * numAttestationsPerEpochKey + const attestationNullifiers: BigInt[] = [] + for (let i = 0; i < numAttestationsPerEpoch; i++) { + attestationNullifiers.push(BigInt(16 + i)) + } + const epkNullifiers: BigInt[] = [] + for (let i = 0; i < numEpochKeyNoncePerEpoch; i++) { + epkNullifiers.push(BigInt(255)) + } + const proof: BigInt[] = [] + for (let i = 0; i < 8; i++) { + proof.push(BigInt(0)) + } + const tx = await unirepContract.updateUserStateRoot( genRandomSalt(), attestationNullifiers, epkNullifiers, @@ -186,20 +383,37 @@ describe('EventSequencing', () => { genRandomSalt(), proof, ) - receipt = await tx.wait() + const receipt = await tx.wait() expect(receipt.status).equal(1) - expectedEventsInOrder.push(events[3]) + expectedUnirepEventsInOrder.push(unirepEvents.UserStateTransitioned) }) - it('Events order should match sequencer order', async () => { + it('Unirep events order should match sequencer order', async () => { const sequencerFilter = unirepContract.filters.Sequencer() const sequencerEvents = await unirepContract.queryFilter(sequencerFilter) - expect(sequencerEvents.length).to.be.equal(10) for (let i = 0; i < sequencerEvents.length; i++) { const event = sequencerEvents[i] - expect(event.args._event).equal(expectedEventsInOrder[i]) + expect(event.args._event).equal(unirepEvents[expectedUnirepEventsInOrder[i]]) } + }) + + it('Unirep Social events should match all actions', async () => { + const userSignUpFilter = unirepSocialContract.filters.UserSignedUp() + const userSignUpEvents = await unirepSocialContract.queryFilter(userSignUpFilter) + expect(userSignUpEvents.length).equal(expectedSignUpEventsLength) + + const postFilter = unirepSocialContract.filters.PostSubmitted() + const postEvents = await unirepSocialContract.queryFilter(postFilter) + expect(postEvents.length).equal(expectedPostEventsLength) + + const commentFilter = unirepSocialContract.filters.CommentSubmitted() + const commentEvents = await unirepSocialContract.queryFilter(commentFilter) + expect(commentEvents.length).equal(expectedCommentEventsLength) + + const voteFilter = unirepSocialContract.filters.VoteSubmitted() + const voteEvents = await unirepSocialContract.queryFilter(voteFilter) + expect(voteEvents.length).equal(expectedVoteEventsLength) }) }) \ No newline at end of file diff --git a/test/contracts/Posting.ts b/test/contracts/Posting.ts index 655535b..924821c 100644 --- a/test/contracts/Posting.ts +++ b/test/contracts/Posting.ts @@ -144,9 +144,9 @@ describe('Post', function () { const newLeafEvents = await unirepContract.queryFilter(newLeafFilter) - for (let i = 0; i < newLeafEvents.length; i++) { - if(BigInt(newLeafEvents[i]?.args?._hashedLeaf) == BigInt(hashedStateLeaf)){ - GSTreeLeafIndex = newLeafEvents[i]?.args?._leafIndex.toNumber() + for (let j = 0; j < newLeafEvents.length; j++) { + if(BigInt(newLeafEvents[j]?.args?._hashedLeaf) == BigInt(hashedStateLeaf)){ + GSTreeLeafIndex = newLeafEvents[j]?.args?._leafIndex.toNumber() } } expect(GSTreeLeafIndex).to.equal(i) diff --git a/test/contracts/Vote.ts b/test/contracts/Vote.ts index 5ad44ee..6e39f11 100644 --- a/test/contracts/Vote.ts +++ b/test/contracts/Vote.ts @@ -153,9 +153,9 @@ describe('Vote', function () { const newLeafEvents = await unirepContract.queryFilter(newLeafFilter) - for (let i = 0; i < newLeafEvents.length; i++) { - if(BigInt(newLeafEvents[i]?.args?._hashedLeaf) == BigInt(hashedStateLeaf)){ - GSTreeLeafIndex = newLeafEvents[i]?.args?._leafIndex.toNumber() + for (let j = 0; j < newLeafEvents.length; j++) { + if(BigInt(newLeafEvents[j]?.args?._hashedLeaf) == BigInt(hashedStateLeaf)){ + GSTreeLeafIndex = newLeafEvents[j]?.args?._leafIndex.toNumber() } } expect(GSTreeLeafIndex).to.equal(i) From 49347d087d9dc96897f3e6647a651323e37d7d21 Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Mon, 21 Jun 2021 15:31:47 +0800 Subject: [PATCH 37/38] update test script --- contracts/UnirepSocial.sol | 18 ++- test/integration/Integration.ts | 216 +++++++++++++++++++++----------- 2 files changed, 156 insertions(+), 78 deletions(-) diff --git a/contracts/UnirepSocial.sol b/contracts/UnirepSocial.sol index 35ba26b..481ee4c 100644 --- a/contracts/UnirepSocial.sol +++ b/contracts/UnirepSocial.sol @@ -47,9 +47,9 @@ contract UnirepSocial { event CommentSubmitted( uint256 indexed _epoch, - uint256 indexed _commentId, + uint256 indexed _postId, uint256 indexed _epochKey, - uint256 _postId, + uint256 _commentId, string _hahsedContent, uint256[] publicSignals, uint256[8] proof @@ -70,6 +70,11 @@ contract UnirepSocial { uint256[] reputationNullifiers ); + event UserStateTransitioned( + uint256 indexed _epoch, + uint256 _leafIndex + ); + constructor( Unirep _unirepContract, @@ -174,9 +179,9 @@ contract UnirepSocial { emit CommentSubmitted( unirep.currentEpoch(), - commentId, - epochKey, postId, + epochKey, + commentId, hashedContent, publicSignals, proof @@ -226,6 +231,11 @@ contract UnirepSocial { uint256[8] memory _proof) external { unirep.updateUserStateRoot(_newGlobalStateTreeLeaf, _attestationNullifiers, _epkNullifiers, _transitionFromEpoch, _fromGlobalStateTree, _fromEpochTree, _fromNullifierTreeRoot, _proof); + emit UserStateTransitioned( + unirep.currentEpoch(), + unirep.nextGSTLeafIndex() - 1 + ); + } diff --git a/test/integration/Integration.ts b/test/integration/Integration.ts index 974a512..8a8af8c 100644 --- a/test/integration/Integration.ts +++ b/test/integration/Integration.ts @@ -41,6 +41,8 @@ describe('Integration', function () { let currentEpoch: ethers.BigNumber let emptyUserStateRoot: BigInt let blankGSLeaf: BigInt + let userStateTransitionedNum: {[key: number]: ethers.BigNumber[]} = {} + let epochKeys: {[key: string]: boolean} = {} let accounts: ethers.Signer[] @@ -108,8 +110,17 @@ describe('Integration', function () { GSTreeLeafIndex = newLeafEvents[i]?.args?._leafIndex.toNumber() } } - expect(GSTreeLeafIndex).to.equal(0) + + // User sign up through Unirep Social should be found in Unirep Social Events + const userSignUpFilter = unirepSocialContract.filters.UserSignedUp(currentEpoch) + const userSignUpEvents = await unirepSocialContract.queryFilter(userSignUpFilter) + let foundIdx = false + for (let i = 0; i < userSignUpEvents.length; i++) { + if(userSignUpEvents[i]?.args?._leafIndex == GSTreeLeafIndex) foundIdx = true + } + expect(foundIdx).to.be.true + users[firstUser].signUp(latestTransitionedToEpoch, GSTreeLeafIndex) console.log(`First user signs up with commitment (${commitment}), in epoch ${latestTransitionedToEpoch} and GST leaf ${GSTreeLeafIndex}`) console.log('----------------------User State----------------------') @@ -164,6 +175,8 @@ describe('Integration', function () { describe('Second epoch', () => { const secondEpochEpochKeys: string[] = [] + let attestationsFromFirstAttester: number = 0 + let attestationsFromSecondAttester: number = 0 it('begin first epoch epoch transition', async () => { prevEpoch = currentEpoch // Fast-forward epochLength of seconds @@ -182,6 +195,8 @@ describe('Integration', function () { console.log('----------------------Unirep State----------------------') console.log(unirepState.toJSON(4)) console.log('------------------------------------------------------') + + userStateTransitionedNum[currentEpoch.toNumber()] = [] }) it('First user transition from first epoch', async () => { @@ -235,12 +250,13 @@ describe('Integration', function () { ) let receipt = await tx.wait() expect(receipt.status, 'Submit user state transition proof failed').to.equal(1) + userStateTransitionedNum[currentEpoch.toNumber()].push(newGSTLeaf) }) it('Verify state transition of first user\'s epoch transition', async () => { const stateTransitionByEpochFilter = unirepContract.filters.UserStateTransitioned(currentEpoch) const stateTransitionByEpochEvent = await unirepContract.queryFilter(stateTransitionByEpochFilter) - expect(stateTransitionByEpochEvent.length, 'Number of state transition events current epoch should be 1').to.equal(1) + expect(stateTransitionByEpochEvent.length, `Number of state transition events current epoch should be ${userStateTransitionedNum[currentEpoch.toNumber()].length}`).to.equal(userStateTransitionedNum[currentEpoch.toNumber()].length) const stateTransitionArgs: any = stateTransitionByEpochEvent[0]['args'] @@ -273,6 +289,15 @@ describe('Integration', function () { console.log('----------------------User State----------------------') console.log(users[firstUser].toJSON(4)) console.log('------------------------------------------------------') + + // User state transition through Unirep Social should be found in Unirep Social Events + const userStateTransitionFilter = unirepSocialContract.filters.UserStateTransitioned(currentEpoch) + const userStateTransitionEvents = await unirepSocialContract.queryFilter(userStateTransitionFilter) + let foundIdx = false + for (let i = 0; i < userStateTransitionEvents.length; i++) { + if(userStateTransitionEvents[i]?.args?._leafIndex.eq(stateTransitionArgs['_leafIndex'])) foundIdx = true + } + expect(foundIdx).to.be.true }) it('Second user signs up', async () => { @@ -310,6 +335,15 @@ describe('Integration', function () { } expect(GSTreeLeafIndex).to.equal(1) + // User sign up through Unirep Social should be found in Unirep Social Events + const userSignUpFilter = unirepSocialContract.filters.UserSignedUp(currentEpoch) + const userSignUpEvents = await unirepSocialContract.queryFilter(userSignUpFilter) + let foundIdx = false + for (let i = 0; i < userSignUpEvents.length; i++) { + if(userSignUpEvents[i]?.args?._leafIndex == GSTreeLeafIndex) foundIdx = true + } + expect(foundIdx).to.be.true + users[secondUser].signUp(latestTransitionedToEpoch, GSTreeLeafIndex) console.log(`Second user signs up with commitment (${commitment}), in epoch ${latestTransitionedToEpoch} and GST leaf ${GSTreeLeafIndex}`) console.log('----------------------User State----------------------') @@ -414,11 +448,18 @@ describe('Integration', function () { const receipt = await tx.wait() expect(receipt.status, 'Submit post failed').to.equal(1) + // User submit a post through Unirep Social should be found in Unirep Social Events + const postFilter = unirepSocialContract.filters.PostSubmitted(currentEpoch, BigInt(add0x(postId)), epochKey) + const postEvents = await unirepSocialContract.queryFilter(postFilter) + expect(postEvents.length).to.equal(1) + secondEpochEpochKeys.push(firstUserEpochKey.toString()) unirepState.addAttestation(firstUserEpochKey.toString(), attestationToEpochKey) for(const user of users){ user.updateAttestation(firstUserEpochKey, attestationToEpochKey.posRep, attestationToEpochKey.negRep) } + attestationsFromFirstAttester++ + epochKeys[epochKey.toString()] = true }) it('Second attester upvote to first user', async () => { @@ -488,6 +529,11 @@ describe('Integration', function () { const receipt = await tx.wait() expect(receipt.status, 'Submit attestation failed').to.equal(1) + // User submit a vote through Unirep Social should be found in Unirep Social Events + const voteFilter = unirepSocialContract.filters.VoteSubmitted(currentEpoch, fromEpochKey, firstUserEpochKey) + const voteEvents = await unirepSocialContract.queryFilter(voteFilter) + expect(voteEvents.length).to.equal(1) + secondEpochEpochKeys.push(secondUserEpochKey.toString()) unirepState.addAttestation(secondUserEpochKey.toString(), attestationToAttester) @@ -496,22 +542,97 @@ describe('Integration', function () { user.updateAttestation(secondUserEpochKey, attestationToAttester.posRep, attestationToAttester.negRep) user.updateAttestation(firstUserEpochKey, attestationToEpochKey.posRep, attestationToEpochKey.negRep) } + attestationsFromSecondAttester += 2 + epochKeys[firstUserEpochKey.toString()] = true + epochKeys[fromEpochKey.toString()] = true + }) + + it('first user leave a comment and generate epoch key', async () => { + const epochKeyNonce = 1 + const epk = genEpochKey(users[firstUser].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth).toString(16) + + // gen nullifier nonce list + const proveKarmaAmount = DEFAULT_COMMENT_KARMA + const nonceStarter: number = 10 + + // gen minRep proof + const minRep = 0 + + const circuitInputs = await users[firstUser].genProveReputationCircuitInputs( + epochKeyNonce, // generate epoch key from epoch nonce + proveKarmaAmount, // the amount of output karma nullifiers + nonceStarter, // nonce to generate karma nullifiers + minRep // the amount of minimum reputation the user wants to prove + ) + const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) + + const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) + expect(isValid, 'Verify reputation proof off-chain failed').to.be.true + + // Verify on-chain + const proof = formatProofForVerifierContract(results['proof']) + const epochKey = BigInt(add0x(epk)) + const publicSignals = results['publicSignals'] + + const firstUserEpochKey = genEpochKey(users[firstUser].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth) + const isProofValid = await unirepContract.verifyReputation( + publicSignals, + proof + ) + console.log(`Verifying epk proof with epoch ${currentEpoch} and epk ${firstUserEpochKey}`) + expect(isProofValid, 'Verify reputation proof on-chain failed').to.be.true + + const attestationToEpochKey = new Attestation( + BigInt(attesters[firstAttester].id), + BigInt(0), + BigInt(DEFAULT_COMMENT_KARMA), + BigInt(0), + false, + ) + + const tx = await contractCalledByFirstAttester.leaveComment( + attesterSigs[firstAttester], + BigInt(add0x(postId)), + BigInt(add0x(commentId)), + epochKey, + commentText, + publicSignals, + proof, + { value: attestingFee, gasLimit: 1000000 } + ) + + const receipt = await tx.wait() + expect(receipt.status, 'Submit comment failed').to.equal(1) + + // User submit a comment through Unirep Social should be found in Unirep Social Events + const commentFilter = unirepSocialContract.filters.CommentSubmitted(currentEpoch, BigInt(add0x(postId)), epochKey) + const commentEvents = await unirepSocialContract.queryFilter(commentFilter) + expect(commentEvents.length).to.equal(1) + + secondEpochEpochKeys.push(firstUserEpochKey.toString()) + unirepState.addAttestation(firstUserEpochKey.toString(), attestationToEpochKey) + for(const user of users){ + user.updateAttestation(firstUserEpochKey, attestationToEpochKey.posRep, attestationToEpochKey.negRep) + } + attestationsFromFirstAttester++ + epochKeys[epochKey.toString()] = true }) it('Attestations gathered from events should match', async () => { // First filter by epoch const attestationsByEpochFilter = unirepContract.filters.AttestationSubmitted(currentEpoch) const attestationsByEpochEvent = await unirepContract.queryFilter(attestationsByEpochFilter) - expect(attestationsByEpochEvent.length, 'Number of attestations submitted should be 3').to.equal(3) + const attestationNum = attestationsFromFirstAttester + attestationsFromSecondAttester + expect(attestationsByEpochEvent.length, `Number of attestations submitted should be ${attestationNum}`).to.equal(attestationNum) // Second filter by attester for (let attester of attesters) { let attestationsByAttesterFilter = unirepContract.filters.AttestationSubmitted(null, null, attester['addr']) let attestationsByAttesterEvent = await unirepContract.queryFilter(attestationsByAttesterFilter) if (attester.id == attesters[firstAttester].id) { - expect(attestationsByAttesterEvent.length, 'Number of attestations from first attester should be 1').to.equal(1) + expect(attestationsByAttesterEvent.length, `Number of attestations from first attester should be ${attestationsFromFirstAttester}`).to.equal(attestationsFromFirstAttester) } else if (attester.id == attesters[secondAttester].id) { - expect(attestationsByAttesterEvent.length, 'Number of attestations from second attester should be 2').to.equal(2) + expect(attestationsByAttesterEvent.length, `Number of attestations from second attester should be ${attestationsFromSecondAttester}`).to.equal(attestationsFromSecondAttester) } else { throw new Error(`Invalid attester id ${attester.id}`) } @@ -568,7 +689,6 @@ describe('Integration', function () { }) describe('Third epoch', () => { - const thirdEpochEpochKeys: string[] = [] it('begin second epoch epoch transition', async () => { prevEpoch = currentEpoch // Fast-forward epochLength of seconds @@ -584,7 +704,7 @@ describe('Integration', function () { expect(currentEpoch, 'Current epoch should be 3').to.equal(3) let [epochKeys_, epochKeyHashchains_] = await unirepContract.getEpochTreeLeaves(prevEpoch) - expect(epochKeys_.length, 'Number of epoch keys last epoch should be 2').to.equal(2) + expect(epochKeys_.length, `Number of epoch keys last epoch should be ${Object.keys(epochKeys).length}`).to.equal(Object.keys(epochKeys).length) epochKeys_ = epochKeys_.map((epk) => epk.toString()) epochKeyHashchains_ = epochKeyHashchains_.map((hc) => hc.toString()) @@ -603,6 +723,8 @@ describe('Integration', function () { console.log('----------------------Unirep State----------------------') console.log(unirepState.toJSON(4)) console.log('------------------------------------------------------') + + userStateTransitionedNum[currentEpoch.toNumber()] = [] }) it('First user transition from second epoch', async () => { @@ -644,7 +766,7 @@ describe('Integration', function () { const newState = await users[firstUser].genNewUserStateAfterTransition() expect(newGSTLeaf, 'Computed new GST leaf should match').to.equal(newState.newGSTLeaf) userStateLeavesAfterTransition[firstUser] = newState.newUSTLeaves - let tx = await unirepContract.updateUserStateRoot( + let tx = await unirepSocialContract.updateUserStateRoot( newGSTLeaf, outputAttestationNullifiers, outputEPKNullifiers, @@ -656,6 +778,7 @@ describe('Integration', function () { ) let receipt = await tx.wait() expect(receipt.status, 'Submit user state transition proof failed').to.equal(1) + userStateTransitionedNum[currentEpoch.toNumber()].push(newGSTLeaf) // Record state transition proof inputs to be used to submit duplicated proof duplicatedProofInputs = { @@ -673,7 +796,7 @@ describe('Integration', function () { it('Verify state transition of first user\'s epoch transition', async () => { const stateTransitionByEpochFilter = unirepContract.filters.UserStateTransitioned(currentEpoch) const stateTransitionByEpochEvent = await unirepContract.queryFilter(stateTransitionByEpochFilter) - expect(stateTransitionByEpochEvent.length, 'Number of state transition events current epoch should be 1').to.equal(1) + expect(stateTransitionByEpochEvent.length, `Number of state transition events current epoch should be ${userStateTransitionedNum[currentEpoch.toNumber()].length}`).to.equal(userStateTransitionedNum[currentEpoch.toNumber()].length) const stateTransitionArgs: any = stateTransitionByEpochEvent[0]['args'] const newGSTLeaf: any = stateTransitionArgs['userTransitionedData']['newGlobalStateTreeLeaf'] @@ -707,6 +830,15 @@ describe('Integration', function () { console.log('----------------------User State----------------------') console.log(users[firstUser].toJSON(4)) console.log('------------------------------------------------------') + + // User state transition through Unirep Social should be found in Unirep Social Events + const userStateTransitionFilter = unirepSocialContract.filters.UserStateTransitioned(currentEpoch) + const userStateTransitionEvents = await unirepSocialContract.queryFilter(userStateTransitionFilter) + let foundIdx = false + for (let i = 0; i < userStateTransitionEvents.length; i++) { + if(userStateTransitionEvents[i]?.args?._leafIndex.eq(stateTransitionArgs['_leafIndex'])) foundIdx = true + } + expect(foundIdx).to.be.true }) it('First user prove his reputation', async () => { @@ -746,77 +878,13 @@ describe('Integration', function () { maxNegRep, graffitiPreImage ] - const isProofValid = await unirepContract.verifyReputationFromAttester( + const isProofValid = await unirepSocialContract.verifyReputationFromAttester( publicInput, formatProofForVerifierContract(results['proof']), ) expect(isProofValid, 'Verify reputation on-chain failed').to.be.true }) - it('first user leave a comment and generate epoch key', async () => { - const epochKeyNonce = 0 - const epk = genEpochKey(users[firstUser].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth).toString(16) - - // gen nullifier nonce list - const proveKarmaAmount = DEFAULT_COMMENT_KARMA - const nonceStarter: number = 0 - - // gen minRep proof - const minRep = 0 - - const circuitInputs = await users[firstUser].genProveReputationCircuitInputs( - epochKeyNonce, // generate epoch key from epoch nonce - proveKarmaAmount, // the amount of output karma nullifiers - nonceStarter, // nonce to generate karma nullifiers - minRep // the amount of minimum reputation the user wants to prove - ) - const results = await genVerifyReputationProofAndPublicSignals(stringifyBigInts(circuitInputs)) - - const isValid = await verifyProveReputationProof(results['proof'], results['publicSignals']) - expect(isValid, 'Verify reputation proof off-chain failed').to.be.true - - // Verify on-chain - const proof = formatProofForVerifierContract(results['proof']) - const epochKey = BigInt(add0x(epk)) - const publicSignals = results['publicSignals'] - - const firstUserEpochKey = genEpochKey(users[firstUser].id.identityNullifier, currentEpoch.toNumber(), epochKeyNonce, circuitEpochTreeDepth) - const isProofValid = await unirepContract.verifyReputation( - publicSignals, - proof - ) - console.log(`Verifying epk proof with epoch ${currentEpoch} and epk ${firstUserEpochKey}`) - expect(isProofValid, 'Verify reputation proof on-chain failed').to.be.true - - const attestationToEpochKey = new Attestation( - BigInt(attesters[firstAttester].id), - BigInt(0), - BigInt(DEFAULT_COMMENT_KARMA), - BigInt(0), - false, - ) - - const tx = await contractCalledByFirstAttester.leaveComment( - attesterSigs[firstAttester], - BigInt(add0x(postId)), - BigInt(add0x(commentId)), - epochKey, - commentText, - publicSignals, - proof, - { value: attestingFee, gasLimit: 1000000 } - ) - - const receipt = await tx.wait() - expect(receipt.status, 'Submit comment failed').to.equal(1) - - thirdEpochEpochKeys.push(firstUserEpochKey.toString()) - unirepState.addAttestation(firstUserEpochKey.toString(), attestationToEpochKey) - for(const user of users){ - user.updateAttestation(firstUserEpochKey, attestationToEpochKey.posRep, attestationToEpochKey.negRep) - } - }) - it('First user submits duplicated state transition proof', async () => { let tx = await unirepSocialContract.updateUserStateRoot( duplicatedProofInputs["newGSTLeaf"], From 8a01445b29f2123ecb74410303fb073c56fb1640 Mon Sep 17 00:00:00 2001 From: vivianjeng Date: Thu, 22 Jul 2021 20:34:34 +0800 Subject: [PATCH 38/38] use `unirepSocialContract` in cli tests --- cli/test/testAllCommands.ts | 44 ++++++++++++++++++------------------ cli/verifyReputationProof.ts | 1 - core/utils.ts | 2 +- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/cli/test/testAllCommands.ts b/cli/test/testAllCommands.ts index 010b5cd..c578618 100644 --- a/cli/test/testAllCommands.ts +++ b/cli/test/testAllCommands.ts @@ -33,7 +33,7 @@ describe('test all CLI subcommands', function() { const commentNonce = 10 const attestNonce = 15 const epochLength = 5 - let unirepContract: ethers.Contract + let unirepSocialContract: ethers.Contract let unirepState: UnirepState let userIdentity1, userIdentityCommitment1, userIdentity2, userIdentityCommitment2 @@ -74,12 +74,12 @@ describe('test all CLI subcommands', function() { console.log(output) const unirepRegMatch = output.match(/Unirep: (0x[a-fA-F0-9]{40})/) - const regMatch = output.match(/Unirep Social: (0x[a-fA-F0-9]{40})$/) + const socialRegMatch = output.match(/Unirep Social: (0x[a-fA-F0-9]{40})$/) const unirepAddress = unirepRegMatch[1] - const unirepSocialAddress = regMatch[1] + const unirepSocialAddress = socialRegMatch[1] const provider = new hardhatEthers.providers.JsonRpcProvider(DEFAULT_ETH_PROVIDER) - unirepContract = new ethers.Contract( + unirepSocialContract = new ethers.Contract( unirepSocialAddress, UnirepSocial.abi, provider, @@ -146,7 +146,7 @@ describe('test all CLI subcommands', function() { describe('userSignup CLI subcommand', () => { it('should sign user 1 up', async () => { const command = `npx ts-node cli/index.ts userSignup` + - ` -x ${unirepContract.address} ` + + ` -x ${unirepSocialContract.address} ` + ` -c ${userIdentityCommitment1} ` + ` -d ${userPrivKey} ` @@ -161,7 +161,7 @@ describe('test all CLI subcommands', function() { it('should sign user 2 up', async () => { const command = `npx ts-node cli/index.ts userSignup` + - ` -x ${unirepContract.address} ` + + ` -x ${unirepSocialContract.address} ` + ` -c ${userIdentityCommitment2} ` + ` -d ${userPrivKey} ` @@ -178,7 +178,7 @@ describe('test all CLI subcommands', function() { describe('attesterSignup CLI subcommand', () => { it('should sign attester up', async () => { const command = `npx ts-node cli/index.ts attesterSignup` + - ` -x ${unirepContract.address} ` + + ` -x ${unirepSocialContract.address} ` + ` -d ${attesterPrivKey} ` const output = exec(command).stdout.trim() @@ -192,7 +192,7 @@ describe('test all CLI subcommands', function() { it('should sign user up', async () => { const command = `npx ts-node cli/index.ts attesterSignup` + - ` -x ${unirepContract.address} ` + + ` -x ${unirepSocialContract.address} ` + ` -d ${userPrivKey} ` const output = exec(command).stdout.trim() @@ -208,7 +208,7 @@ describe('test all CLI subcommands', function() { describe('genEpochKeyAndProof CLI subcommand', () => { it('should generate epoch key proof', async () => { const command = `npx ts-node cli/index.ts genEpochKeyAndProof` + - ` -x ${unirepContract.address} ` + + ` -x ${unirepSocialContract.address} ` + ` -id ${userIdentity1} ` + ` -n ${epochKeyNonce} ` @@ -227,7 +227,7 @@ describe('test all CLI subcommands', function() { describe('verifyEpochKeyProof CLI subcommand', () => { it('should verify epoch key proof', async () => { const command = `npx ts-node cli/index.ts verifyEpochKeyProof` + - ` -x ${unirepContract.address} ` + + ` -x ${unirepSocialContract.address} ` + ` -epk ${epk} ` + ` -pf ${epkProof} ` @@ -244,7 +244,7 @@ describe('test all CLI subcommands', function() { describe('publishPost CLI subcommand', () => { it('should publish a post', async () => { const command = `npx ts-node cli/index.ts publishPost` + - ` -x ${unirepContract.address} ` + + ` -x ${unirepSocialContract.address} ` + ` -tx ${text}` + ` -d ${userPrivKey}` + ` -id ${userIdentity1}` + @@ -273,7 +273,7 @@ describe('test all CLI subcommands', function() { describe('verifyReputationProof CLI subcommand', () => { it('should verify epoch key proof', async () => { const command = `npx ts-node cli/index.ts verifyReputationProof` + - ` -x ${unirepContract.address} ` + + ` -x ${unirepSocialContract.address} ` + ` -epk ${epk} ` + ` -pf ${userRepProof} ` + ` -th ${transactionHash}` @@ -291,7 +291,7 @@ describe('test all CLI subcommands', function() { describe('listAllPosts CLI subcommand', () => { it('should list all posts', async () => { const command = `npx ts-node cli/index.ts listAllPosts` + - ` -x ${unirepContract.address} ` + ` -x ${unirepSocialContract.address} ` const output = exec(command).stdout.trim() @@ -306,7 +306,7 @@ describe('test all CLI subcommands', function() { describe('leaveComment CLI subcommand', () => { it('should leave a comment', async () => { const command = `npx ts-node cli/index.ts leaveComment` + - ` -x ${unirepContract.address} ` + + ` -x ${unirepSocialContract.address} ` + ` -pid ${postID} ` + ` -tx ${text2}` + ` -d ${userPrivKey}` + @@ -327,9 +327,9 @@ describe('test all CLI subcommands', function() { describe('upvote CLI subcommand', () => { - it('should upvote to user 2', async () => { + it('should upvote to user 1', async () => { const command = `npx ts-node cli/index.ts vote` + - ` -x ${unirepContract.address} ` + + ` -x ${unirepSocialContract.address} ` + ` -d ${attesterPrivKey} ` + ` -epk ${epk} ` + ` -id ${userIdentity2}` + @@ -357,7 +357,7 @@ describe('test all CLI subcommands', function() { describe('verifyReputationProof CLI subcommand', () => { it('should verify epoch key proof', async () => { const command = `npx ts-node cli/index.ts verifyReputationProof` + - ` -x ${unirepContract.address} ` + + ` -x ${unirepSocialContract.address} ` + ` -epk ${epk} ` + ` -pf ${userRepProof} ` + ` -th ${transactionHash}` @@ -375,7 +375,7 @@ describe('test all CLI subcommands', function() { describe('epochTransition CLI subcommand', () => { it('should transition to next epoch', async () => { const command = `npx ts-node cli/index.ts epochTransition` + - ` -x ${unirepContract.address} ` + + ` -x ${unirepSocialContract.address} ` + ` -d ${deployerPrivKey} ` + ` -t ` @@ -392,7 +392,7 @@ describe('test all CLI subcommands', function() { describe('userStateTransition CLI subcommand', () => { it('should transition user 1 state', async () => { const command = `npx ts-node cli/index.ts userStateTransition` + - ` -x ${unirepContract.address} ` + + ` -x ${unirepSocialContract.address} ` + ` -d ${userPrivKey} ` + ` -id ${userIdentity1} ` @@ -407,7 +407,7 @@ describe('test all CLI subcommands', function() { it('should transition user 2 state', async () => { const command = `npx ts-node cli/index.ts userStateTransition` + - ` -x ${unirepContract.address} ` + + ` -x ${unirepSocialContract.address} ` + ` -d ${userPrivKey} ` + ` -id ${userIdentity2} ` @@ -424,7 +424,7 @@ describe('test all CLI subcommands', function() { describe('genReputationProofFromAttester CLI subcommand', () => { it('should generate user reputation proof', async () => { const command = `npx ts-node cli/index.ts genReputationProofFromAttester` + - ` -x ${unirepContract.address} ` + + ` -x ${unirepSocialContract.address} ` + ` -id ${userIdentity1} ` + ` -a ${attesterId} ` + // ` -mp ${minPosRep} ` + @@ -445,7 +445,7 @@ describe('test all CLI subcommands', function() { describe('verifyReputationProofFromAttester CLI subcommand', () => { it('should verify user reputation proof', async () => { const command = `npx ts-node cli/index.ts verifyReputationProofFromAttester` + - ` -x ${unirepContract.address} ` + + ` -x ${unirepSocialContract.address} ` + ` -a ${attesterId} ` + // ` -mp ${minPosRep} ` + ` -mn ${maxNegRep} ` + diff --git a/cli/verifyReputationProof.ts b/cli/verifyReputationProof.ts index db47c0a..07fe694 100644 --- a/cli/verifyReputationProof.ts +++ b/cli/verifyReputationProof.ts @@ -12,7 +12,6 @@ import { DEFAULT_ETH_PROVIDER, DEFAULT_START_BLOCK } from './defaults' import { genUnirepStateFromContract } from '../core' import { add0x } from '../crypto/SMT' -import Unirep from "../artifacts/contracts/Unirep.sol/Unirep.json" import UnirepSocial from "../artifacts/contracts/UnirepSocial.sol/UnirepSocial.json" import { reputationProofPrefix } from './prefix' import { hash5 } from 'maci-crypto' diff --git a/core/utils.ts b/core/utils.ts index 2e96084..ff7aba5 100644 --- a/core/utils.ts +++ b/core/utils.ts @@ -198,7 +198,7 @@ const genEpochKey = (identityNullifier: SnarkBigInt, epoch: number, nonce: numbe ] let epochKey = hash5(values) // Adjust epoch key size according to epoch tree depth - const epochKeyModed = BigInt(epochKey) % BigInt(2 ** _epochTreeDepth) + const epochKeyModed = BigInt(epochKey.toString()) % BigInt(2 ** _epochTreeDepth) return epochKeyModed }