From 446e71bedca9b7b176a8f3b2570aafc6497970e3 Mon Sep 17 00:00:00 2001 From: Jon La Marr Date: Fri, 6 Dec 2019 11:53:30 -0500 Subject: [PATCH] Remove reference to eosjs-ecc and add tests for new logic some change Refactor New version Fix linting --- package.json | 11 +- src/LedgerUtils.test.ts | 58 ++++++++ src/LedgerUtils.ts | 13 +- tsconfig.json | 1 - yarn.lock | 305 +++++++++++++--------------------------- 5 files changed, 173 insertions(+), 215 deletions(-) create mode 100644 src/LedgerUtils.test.ts diff --git a/package.json b/package.json index 01d3d17..42d1318 100644 --- a/package.json +++ b/package.json @@ -25,20 +25,21 @@ "@babel/core": "7.6.0", "@babel/preset-env": "7.2.3", "@babel/preset-react": "7.0.0", - "@ledgerhq/hw-transport": "4.48.0", - "@ledgerhq/hw-transport-u2f": "4.48.0", + "@ledgerhq/hw-transport": "5.0.0-babel7.3", + "@ledgerhq/hw-transport-u2f": "5.0.0-babel7.3", + "@types/elliptic": "^6.4.10", + "@types/jest": "^23.3.9", "asn1-ber": "1.0.9", "bip32-path": "0.4.2", "buffer": "5.2.1", - "eosjs": "20.0.0", - "eosjs-ecc": "4.0.4" + "eosjs": "20.0.4-67ee21f.0", + "elliptic": "^6.5.0" }, "devDependencies": { "@babel/cli": "^7.6.0", "@babel/plugin-proposal-class-properties": "^7.3.0", "@blockone/tslint-config-blockone": "^4.0.0", "@types/node": "^11.9.4", - "babel-polyfill": "^6.26.0", "jest": "^24.1.0", "ts-jest": "^23.10.4", "tslib": "^1.9.3", diff --git a/src/LedgerUtils.test.ts b/src/LedgerUtils.test.ts new file mode 100644 index 0000000..fd90679 --- /dev/null +++ b/src/LedgerUtils.test.ts @@ -0,0 +1,58 @@ +import { Signature } from 'eosjs/dist/eosjs-jssig' +import { convertSignatures } from './LedgerUtils' + +const mockedConvertedSignatureValue = 'mockedConvertedSignatureValue' + +describe('JsSignatureProvider', () => { + it('should not convert signature given string with length < 130 characters', async () => { + const signature = 'someSignature' + const result = convertSignatures([signature], mockConvertSignature) + + expect(result[0]).toBe(signature) + }) + + it('should not convert signature given string with length > 130 characters', async () => { + const signature = '4cf0909aa10f10341cd7ca013630492d09b65e50c80974e962d94bbc95df635e90afb2e4dd22eb254cb451ca26a6aeb0b88e9b031a2233b2a16d56252dba83f9632-more-than-130-characters' + const result = convertSignatures([signature], mockConvertSignature) + + expect(result[0]).toBe(signature) + }) + + it('should convert signature given string with length === 130 characters', () => { + const signature = 'SIG_K1_HKkqi3zray76i63ZQwAHWMjoLk3wTa1ajZWPcUnrhgmSWQYEHDJsxkny6VDTWEmVdfktxpGoTA81qe6QuCrDmazeQndmxhktxpGoTA81qe6QuCrDmazeQndmxhD' + const result = convertSignatures([signature], mockConvertSignature) + + expect(result[0]).toBe(mockedConvertedSignatureValue) + }) + + it('should convert signature given string with length === 130 characters, but not another signature with length < 130 characters', () => { + const signature1 = 'SIG_K1_HKkqi3zray76i63ZQwAHWMjoLk3wTa1ajZWPcUnrhgmSWQYEHDJsxkny6VDTWEmVdfktxpGoTA81qe6QuCrDmazeQndmxhktxpGoTA81qe6QuCrDmazeQndmxhD' + const signature2 = 'someSignature' + const result = convertSignatures([signature1, signature2], mockConvertSignature) + + expect(result[0]).toBe(mockedConvertedSignatureValue) + expect(result[1]).toBe(signature2) + }) + + it('should convert signature given string with length === 130 characters, but not another signature with length > 130 characters', () => { + const signature1 = 'SIG_K1_HKkqi3zray76i63ZQwAHWMjoLk3wTa1ajZWPcUnrhgmSWQYEHDJsxkny6VDTWEmVdfktxpGoTA81qe6QuCrDmazeQndmxhktxpGoTA81qe6QuCrDmazeQndmxhD' + const signature2 = '4cf0909aa10f10341cd7ca013630492d09b65e50c80974e962d94bbc95df635e90afb2e4dd22eb254cb451ca26a6aeb0b88e9b031a2233b2a16d56252dba83f9632-more-than-130-characters' + const result = convertSignatures([signature1, signature2], mockConvertSignature) + + expect(result[0]).toBe(mockedConvertedSignatureValue) + expect(result[1]).toBe(signature2) + }) + + it('should convert multiple signatures given string with length === 130 characters', () => { + const signature1 = 'SIG_K1_HKkqi3zray76i63ZQwAHWMjoLk3wTa1ajZWPcUnrhgmSWQYEHDJsxkny6VDTWEmVdfktxpGoTA81qe6QuCrDmazeQndmxhktxpGoTA81qe6QuCrDmazeQndmxhD' + const signature2 = 'SIG_K1_HKkqi3zray76i63ZQwAHWMjoLk3wTa1ajZWPcUnrhgmSWQYEHDJsxkny6VDTWEmVdfktxpGoTA81qe6QuCrDmazeQndmxhktxpGoTA81qe6QuCrDmazeQndmxhD' + const result = convertSignatures([signature1, signature2], mockConvertSignature) + + expect(result[0]).toBe(mockedConvertedSignatureValue) + expect(result[1]).toBe(mockedConvertedSignatureValue) + }) +}) + +function mockConvertSignature(signature: string) { + return mockedConvertedSignatureValue +} diff --git a/src/LedgerUtils.ts b/src/LedgerUtils.ts index 2f14243..468d5ce 100644 --- a/src/LedgerUtils.ts +++ b/src/LedgerUtils.ts @@ -1,8 +1,6 @@ import Transport from '@ledgerhq/hw-transport-u2f' import { Api, JsonRpc, Serialize } from 'eosjs' -import { JsSignatureProvider } from 'eosjs/dist/eosjs-jssig' - -import ecc from 'eosjs-ecc' +import { JsSignatureProvider, Signature } from 'eosjs/dist/eosjs-jssig' import asn1 from 'asn1-ber' import Buff from 'buffer/' @@ -32,7 +30,8 @@ export async function getTransport() { return cachedTransport } -export const convertSignatures = (sigs: string[]): string[] => { +export const convertSignatures = (sigs: string[], + signatureConversion: (signature: string) => string = convertSignature): string[] => { if (!Array.isArray(sigs)) { sigs = [sigs] } @@ -42,7 +41,7 @@ export const convertSignatures = (sigs: string[]): string[] => { for (let i = 0; i < sigs.length; i++) { const sig = sigs[i] if (typeof sig === 'string' && sig.length === 130) { - sigs[i] = ecc.Signature.from(sig).toString() + sigs[i] = signatureConversion(sig) } } @@ -117,3 +116,7 @@ const createNewBuffer = (api: Api, type: string, data: any) => { const encode = (writer: any , buffer: Uint8Array) => { writer.writeBuffer(Buff.Buffer.from(buffer), asn1.Ber.OctetString) } + +const convertSignature = (sig: string): string => { + return Signature.fromString(sig).toString() +} diff --git a/tsconfig.json b/tsconfig.json index b951653..cf245a9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,7 +12,6 @@ "esModuleInterop": true, "skipLibCheck": true, "jsx": "react", - "types": [], "lib": ["es2015", "dom"] }, "include": [ diff --git a/yarn.lock b/yarn.lock index 23aa33b..a01fd47 100644 --- a/yarn.lock +++ b/yarn.lock @@ -850,51 +850,43 @@ "@types/istanbul-reports" "^1.1.1" "@types/yargs" "^13.0.0" -"@ledgerhq/devices@^4.48.0", "@ledgerhq/devices@^4.70.0": - version "4.70.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-4.70.0.tgz#db335f555851cd575edc9e08c4c7d8b468710d61" - integrity sha512-xgcPls2BJivdG4pK8l4RFBf0CaMUNApP0sb+Izr9OlwbOH9iyLcLL2XC9AJuvoHGO1DUkDrCM2TkXJIx3Ui+Xg== +"@ledgerhq/devices@^5.0.0-babel7.3+8372cbd": + version "5.0.0-babel7.3" + resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-5.0.0-babel7.3.tgz#5cc3768acb10eada3b0b6d2023bb9374d8f15c48" + integrity sha512-5HvXYPPN5P46zBuGMkGsAfT5xaWV1yDm3dhzte1rg2GKndtBNDzV7GT4xZoED0LkSX36mGDkR7U1cUtwhnXWYQ== dependencies: - "@ledgerhq/errors" "^4.70.0" - "@ledgerhq/logs" "^4.70.0" + "@ledgerhq/errors" "^5.0.0-babel7.3+8372cbd" + "@ledgerhq/logs" "^5.0.0-babel7.3+8372cbd" rxjs "^6.5.3" -"@ledgerhq/errors@^4.48.0", "@ledgerhq/errors@^4.70.0": - version "4.70.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-4.70.0.tgz#3ec196ed8f1211ed2f4e84969c26e9e97a3a4bc0" - integrity sha512-XFFuVGJ34dhkIfqTUGudPvnSx3cRGuZ+oVr8lR4UFuc29TwDVjf1X4GJ5wQU4XUqS4rNe+I+Tq7BK7V1DFX9lQ== +"@ledgerhq/errors@^5.0.0-babel7.3+8372cbd": + version "5.0.0-babel7.3" + resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-5.0.0-babel7.3.tgz#6653abfd5de0335d1c6009192355a0cf387b738f" + integrity sha512-mzCghdxPfi+IiLck4KJIzee7a5zBxg1ljtHOJxZVfalwn/OCVm8tYVapsyzBQSlm6VFUGmjNa4TIz7BiI8kYxQ== -"@ledgerhq/hw-transport-u2f@4.48.0": - version "4.48.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-u2f/-/hw-transport-u2f-4.48.0.tgz#0419f7d54c989d6119450d9e505aa54a5d701c1f" - integrity sha512-qqKlLWDDibwKGWIcL3c9DLr9DdA+71AS5GwWGIJaKaOyGYeMK6uuJrqPphXO2xvHkPNG1B56vpAFy3ojp1mtMA== +"@ledgerhq/hw-transport-u2f@5.0.0-babel7.3": + version "5.0.0-babel7.3" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-u2f/-/hw-transport-u2f-5.0.0-babel7.3.tgz#d8e520b8ec9130e736cef96dcd8ecc53b4c93515" + integrity sha512-cCgS1OwL84PZbpYLmrCdXP3NTutyL69DyklBj4f2PMnwdAAqU3u38wJfuV0j4IW+gW7I5dTsi+tPAFkM3/t9uA== dependencies: - "@ledgerhq/errors" "^4.48.0" - "@ledgerhq/hw-transport" "^4.48.0" + "@ledgerhq/errors" "^5.0.0-babel7.3+8372cbd" + "@ledgerhq/hw-transport" "^5.0.0-babel7.3+8372cbd" + "@ledgerhq/logs" "^5.0.0-babel7.3+8372cbd" u2f-api "0.2.7" -"@ledgerhq/hw-transport@4.48.0": - version "4.48.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-4.48.0.tgz#8fa09e46d9d9aab35db5679e0970e7fed2ee73bf" - integrity sha512-dZH/3dTXlhe3IFl+MRFePcC0TnSeQcaBuiq5t3yDA68qw7WZCbON9GKSO5Rex4yNx5v6BCHyzz1myBFJ7895iw== +"@ledgerhq/hw-transport@5.0.0-babel7.3", "@ledgerhq/hw-transport@^5.0.0-babel7.3+8372cbd": + version "5.0.0-babel7.3" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-5.0.0-babel7.3.tgz#9efcac3b9a5af41905bf7a8844ddea43ad5df39e" + integrity sha512-lRMQZQXScgFKjfGJLFceTSlbwi0scDiBqxufLWSFMOlA5ae+Skszg4s3RQG8nYWwcSY6pAbR4n4ddJb6fwUqvA== dependencies: - "@ledgerhq/devices" "^4.48.0" - "@ledgerhq/errors" "^4.48.0" + "@ledgerhq/devices" "^5.0.0-babel7.3+8372cbd" + "@ledgerhq/errors" "^5.0.0-babel7.3+8372cbd" events "^3.0.0" -"@ledgerhq/hw-transport@^4.48.0": - version "4.70.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-4.70.0.tgz#2733b83c6d600f8d3c5ffb588d010e40b9d0bcc3" - integrity sha512-kl3TGlpy6iH3byVT+9Df9ObN3Ahi7O6eg8FHAWORO4jGUHROPiI8FYL03DTEvBXG5GqyKN1NfvvcKyC3N2dL2w== - dependencies: - "@ledgerhq/devices" "^4.70.0" - "@ledgerhq/errors" "^4.70.0" - events "^3.0.0" - -"@ledgerhq/logs@^4.70.0": - version "4.70.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-4.70.0.tgz#b5176430ccb5a81becce25fcbbd8afcfa91a4388" - integrity sha512-hyMppU1b2tBDRyKJiV71RnN51Tkkriv/7DHQF9thAmrwEDFmfmEwAQaS2VyeIogir0HD7aDcKg7DnHqgiWe/8g== +"@ledgerhq/logs@^5.0.0-babel7.3+8372cbd": + version "5.0.0-babel7.3" + resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-5.0.0-babel7.3.tgz#b59b2c99aa87f0757fe7e2847aa450d361813791" + integrity sha512-3pjLRfACLS4e3IJtc7gbuN0xdEedUIwidn5Tb+/ZFFdlBLg4lOHP80PqfkS7hEo41IXCmCK1m8ovOy34tDQqsA== "@types/babel__core@^7.1.0": version "7.1.3" @@ -929,6 +921,20 @@ dependencies: "@babel/types" "^7.3.0" +"@types/bn.js@*": + version "4.11.5" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.5.tgz#40e36197433f78f807524ec623afcf0169ac81dc" + integrity sha512-AEAZcIZga0JgVMHNtl1CprA/hXX7/wPt79AgR4XqaDt7jyj3QWYw6LPoOiznPtugDmlubUnAahMs2PFxGcQrng== + dependencies: + "@types/node" "*" + +"@types/elliptic@^6.4.10": + version "6.4.10" + resolved "https://registry.yarnpkg.com/@types/elliptic/-/elliptic-6.4.10.tgz#352078ebc911484e30fc0d1eca3e3c865bf0e8f8" + integrity sha512-9h+Bw+aNiLzcq9DGstHccNxSsJ5iNId7mzruid7+kwm7F1IGvb4rBOOPo3+twt9ZPhI3y+JJ2m1UfgU8cOEJuQ== + dependencies: + "@types/bn.js" "*" + "@types/events@*": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" @@ -982,6 +988,11 @@ "@types/istanbul-lib-coverage" "*" "@types/istanbul-lib-report" "*" +"@types/jest@^23.3.9": + version "23.3.14" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-23.3.14.tgz#37daaf78069e7948520474c87b80092ea912520a" + integrity sha512-Q5hTcfdudEL2yOmluA1zaSyPbzWPmJ3XfSWeP3RyoYvS9hnje1ZyagrZOuQ6+1nQC1Gw+7gap3pLNL3xL6UBug== + "@types/lodash@^4.14.110": version "4.14.138" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.138.tgz#34f52640d7358230308344e579c15b378d91989e" @@ -1249,15 +1260,6 @@ babel-plugin-jest-hoist@^24.9.0: dependencies: "@types/babel__traverse" "^7.0.6" -babel-polyfill@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" - integrity sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM= - dependencies: - babel-runtime "^6.26.0" - core-js "^2.5.0" - regenerator-runtime "^0.10.5" - babel-preset-jest@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-24.9.0.tgz#192b521e2217fb1d1f67cf73f70c336650ad3cdc" @@ -1266,7 +1268,7 @@ babel-preset-jest@^24.9.0: "@babel/plugin-syntax-object-rest-spread" "^7.0.0" babel-plugin-jest-hoist "^24.9.0" -babel-runtime@6.26.0, babel-runtime@^6.26.0: +babel-runtime@6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= @@ -1279,13 +1281,6 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= -base-x@^3.0.2: - version "3.0.7" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.7.tgz#1c5a7fafe8f66b4114063e8da102799d4e7c408f" - integrity sha512-zAKJGuQPihXW22fkrfOclUUZXM2g92z5GzlSMHxhO6r6Qj+Nm0ccaGNBzDZojzwOMkpjAv4J0fOv1U4go+a4iw== - dependencies: - safe-buffer "^5.0.1" - base64-js@^1.0.2: version "1.3.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" @@ -1311,11 +1306,6 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -bigi@^1.1.0, bigi@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/bigi/-/bigi-1.4.2.tgz#9c665a95f88b8b08fc05cfd731f561859d725825" - integrity sha1-nGZalfiLiwj8Bc/XMfVhhZ1yWCU= - binary-extensions@^1.0.0: version "1.13.1" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" @@ -1326,6 +1316,11 @@ bip32-path@0.4.2: resolved "https://registry.yarnpkg.com/bip32-path/-/bip32-path-0.4.2.tgz#5db0416ad6822712f077836e2557b8697c0c7c99" integrity sha1-XbBBataCJxLwd4NuJVe4aXwMfJk= +bn.js@^4.4.0: + version "4.11.8" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -1350,6 +1345,11 @@ braces@^2.3.1, braces@^2.3.2: split-string "^3.0.2" to-regex "^3.0.1" +brorand@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + browser-process-hrtime@^0.1.2: version "0.1.3" resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz#616f00faef1df7ec1b5bf9cfe2bdc3170f26c7b4" @@ -1362,18 +1362,6 @@ browser-resolve@^1.11.3: dependencies: resolve "1.1.7" -browserify-aes@^1.0.6: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - 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" - browserslist@^4.3.4: version "4.7.0" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.0.tgz#9ee89225ffc07db03409f2fee524dc8227458a17" @@ -1390,13 +1378,6 @@ bs-logger@0.x: dependencies: fast-json-stable-stringify "2.x" -bs58@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" - integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo= - dependencies: - base-x "^3.0.2" - bser@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.0.tgz#65fc784bf7f87c009b973c12db6546902fa9c7b5" @@ -1409,11 +1390,6 @@ buffer-from@1.x, buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= - buffer@5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.2.1.tgz#dd57fa0f109ac59c602479044dca7b8b3d0b71d6" @@ -1427,13 +1403,6 @@ builtin-modules@^1.1.1: resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= -bytebuffer@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/bytebuffer/-/bytebuffer-5.0.1.tgz#582eea4b1a873b6d020a48d58df85f0bba6cfddd" - integrity sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0= - dependencies: - long "~3" - cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -1519,14 +1488,6 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" @@ -1615,7 +1576,7 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= -core-js@^2.4.0, core-js@^2.5.0: +core-js@^2.4.0: version "2.6.9" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2" integrity sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A== @@ -1625,29 +1586,6 @@ core-util-is@1.0.2, core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -create-hash@^1.1.0, create-hash@^1.1.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - 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@^1.1.6: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - 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@^6.0.0: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -1810,19 +1748,24 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -ecurve@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/ecurve/-/ecurve-1.0.6.tgz#dfdabbb7149f8d8b78816be5a7d5b83fcf6de797" - integrity sha512-/BzEjNfiSuB7jIWKcS/z8FK9jNjmEWvUV2YZ4RLSmcDtP7Lq0m6FvDuSnJpBlDpGRpfRQeTLGLBI8H+kEv0r+w== - dependencies: - bigi "^1.1.0" - safe-buffer "^5.0.1" - electron-to-chromium@^1.3.247: version "1.3.255" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.255.tgz#9f4b4f9ffd559dd7a81fef962186fc918d118b66" integrity sha512-SZ6NlaNw3h4WR5kA1BK8XltdJCax02P+lW+z78RYoLDqmpyYuDQ5bS+/O6MCJ/j761qoZIFox2qYYt+UwqGA5w== +elliptic@^6.5.0: + version "6.5.2" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" + integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw== + dependencies: + 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@^7.0.1: version "7.0.3" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" @@ -1835,27 +1778,12 @@ end-of-stream@^1.1.0: dependencies: once "^1.4.0" -eosjs-ecc@4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/eosjs-ecc/-/eosjs-ecc-4.0.4.tgz#431450f30a6f73088ff5d7ba1ebdfe967a5ca4ab" - integrity sha512-9wAYefts4TidHOu+eN9nAisZdWpUzlUimZrB63oP7+/s4xRNJEn2Vvep2ICRODpxpidbshM1L7WaSYW9oiV5gA== - dependencies: - bigi "^1.4.2" - browserify-aes "^1.0.6" - bs58 "^4.0.1" - bytebuffer "^5.0.1" - create-hash "^1.1.3" - create-hmac "^1.1.6" - ecurve "^1.0.5" - randombytes "^2.0.5" - -eosjs@20.0.0: - version "20.0.0" - resolved "https://registry.yarnpkg.com/eosjs/-/eosjs-20.0.0.tgz#43940abfe15cd191ce4027d60294036e914613e9" - integrity sha512-Ak9CPtZgCFayUmq43X3Nsn4v67lkLfSzEdTUfMk1XAWA5s4HRn7lBTeTeDCzJ/rggi+dZ170VeJwc5T3gPk4HQ== +eosjs@20.0.4-67ee21f.0: + version "20.0.4-67ee21f.0" + resolved "https://registry.yarnpkg.com/eosjs/-/eosjs-20.0.4-67ee21f.0.tgz#b430c98988f033ba40282d349c0987f6cb89e6a0" + integrity sha512-RvX2Eyx6cvMeT9gncHxampRtJGs3IO1q58l7sDYzzxxVaWXxPw6YTSVOL2sE0PatQ+pUuHXy2i/Z8VIcLgYVwg== dependencies: babel-runtime "6.26.0" - eosjs-ecc "4.0.4" text-encoding "0.7.0" error-ex@^1.3.1: @@ -1937,14 +1865,6 @@ events@^3.0.0: resolved "https://registry.yarnpkg.com/events/-/events-3.0.0.tgz#9a0a0dfaf62893d92b875b8f2698ca4114973e88" integrity sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA== -evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - exec-sh@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.2.tgz#6738de2eb7c8e671d0366aea0b0db8c6f7d7391b" @@ -2291,19 +2211,28 @@ has@^1.0.1, has@^1.0.3: dependencies: function-bind "^1.1.1" -hash-base@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" - integrity sha1-X8hoaEfs1zSZQDMZprCj8/auSRg= +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" + inherits "^2.0.3" + minimalistic-assert "^1.0.1" highlight.js@^9.0.0: version "9.15.10" resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.15.10.tgz#7b18ed75c90348c045eef9ed08ca1319a2219ad2" integrity sha512-RoV7OkQm0T3os3Dd2VHLNMoaoDVx77Wygln3n9l5YV172XonWG6rgQD3XnF/BuFFZw9A0TJgmMSO8FEWQgvcXw== +hmac-drbg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + hosted-git-info@^2.1.4: version "2.8.4" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.4.tgz#44119abaf4bc64692a16ace34700fed9c03e2546" @@ -3183,11 +3112,6 @@ lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.13: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== -long@~3: - version "3.2.0" - resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b" - integrity sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s= - loose-envify@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -3232,15 +3156,6 @@ marked@^0.4.0: resolved "https://registry.yarnpkg.com/marked/-/marked-0.4.0.tgz#9ad2c2a7a1791f10a852e0112f77b571dce10c66" integrity sha512-tMsdNBgOsrUophCAFQl0XPe6Zqk/uy9gnue+jIIKhykO51hxyu6uNx7zBPy0+y/WKYVZZMspV9YeXLNdKk+iYw== -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -3277,6 +3192,16 @@ mime-types@^2.1.12, mime-types@~2.1.19: dependencies: mime-db "1.40.0" +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= + minimatch@^3.0.0, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" @@ -3805,13 +3730,6 @@ qs@~6.5.2: resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== -randombytes@^2.0.5: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - rc@^1.2.7: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" @@ -3892,11 +3810,6 @@ regenerate@^1.4.0: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== -regenerator-runtime@^0.10.5: - version "0.10.5" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" - integrity sha1-M2w+/BIgrc7dosn6tntaeVWjNlg= - regenerator-runtime@^0.11.0: version "0.11.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" @@ -4049,14 +3962,6 @@ rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.3: dependencies: glob "^7.1.3" -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - rsvp@^4.8.4: version "4.8.5" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" @@ -4069,7 +3974,7 @@ rxjs@^6.5.3: dependencies: tslib "^1.9.0" -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2: +safe-buffer@^5.0.1, safe-buffer@^5.1.2: version "5.2.0" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== @@ -4136,14 +4041,6 @@ set-value@^2.0.0, set-value@^2.0.1: is-plain-object "^2.0.3" split-string "^3.0.1" -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"