From 00408511db60d881c717b9a4abb0f27f62315168 Mon Sep 17 00:00:00 2001 From: peak3d Date: Wed, 22 Feb 2023 09:18:02 +0100 Subject: [PATCH] [Cleanup] Adjust versions / fix errors and linters --- .eslintrc.js | 3 + .github/workflows/e2e.yml | 12 +- e2e_tests/cchain_nomock.test.ts | 14 +- e2e_tests/health_nomock.test.ts | 11 +- e2e_tests/info_nomock.test.ts | 11 +- e2e_tests/keystore_nomock.test.ts | 11 +- e2e_tests/pchain_nomock.test.ts | 18 +- e2e_tests/xchain_nomock.test.ts | 15 +- examples/bintools/privkey.ts | 9 + examples/evm/buildImportTx-PChain.ts | 9 +- examples/evm/buildImportTx-xchain.ts | 2 - examples/mnemonic/validateMnemonic.ts | 2 +- package.json | 23 +- src/apis/avm/api.ts | 2 +- src/apis/avm/interfaces.ts | 4 +- src/apis/avm/keychain.ts | 2 - src/apis/avm/ops.ts | 2 +- src/apis/avm/utxos.ts | 8 +- src/apis/avm/vertex.ts | 3 +- src/apis/evm/api.ts | 5 - src/apis/evm/basetx.ts | 1 + src/apis/evm/interfaces.ts | 2 +- src/apis/evm/keychain.ts | 2 - src/apis/evm/tx.ts | 1 - src/apis/evm/utxos.ts | 6 +- src/apis/health/interfaces.ts | 2 +- src/apis/index/interfaces.ts | 12 +- src/apis/platformvm/addressstatetx.ts | 2 +- src/apis/platformvm/api.ts | 6 +- src/apis/platformvm/builder.ts | 2 +- src/apis/platformvm/inputs.ts | 4 +- src/apis/platformvm/keychain.ts | 2 - src/apis/platformvm/outputs.ts | 4 +- src/apis/platformvm/registernodetx.ts | 2 +- src/apis/platformvm/spender.ts | 2 +- src/apis/platformvm/tx.ts | 3 +- src/apis/platformvm/utxos.ts | 2 +- src/common/assetamount.ts | 2 +- src/common/credentials.ts | 5 +- src/common/jrpcapi.ts | 16 +- src/common/output.ts | 2 +- src/utils/fetchadapter.ts | 2 +- src/utils/mnemonic.ts | 48 ++-- src/utils/serialization.ts | 2 + tests/utils/hdnode.test.ts | 2 +- tests/utils/mnemonic.test.ts | 29 ++- yarn.lock | 310 +++++++++++++++----------- 47 files changed, 382 insertions(+), 257 deletions(-) create mode 100644 examples/bintools/privkey.ts diff --git a/.eslintrc.js b/.eslintrc.js index 1f0b310f7..7dfbaff27 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -7,4 +7,7 @@ module.exports = { sourceType: "module" }, parser: '@typescript-eslint/parser', + rules: { + "@typescript-eslint/no-explicit-any": "off" + }, }; diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 95023c91c..9140dffc9 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -59,12 +59,18 @@ jobs: cd $GOPATH/$CAMPATH git clone https://github.com/chain4travel/camino-network-runner --depth 1 -bv0.2.1-alpha1 - name: Starting Camino Network Runner + env: + CAMINO_NODE_PATH: ${{env.GOPATH}}/${{env.CAMPATH}}/camino-node/build/camino-node + shell: bash run: | cd $GOPATH/$CAMPATH cd camino-network-runner - CAMINO_NODE_PATH=$GOPATH/$CAMPATH/camino-node/build/camino-node go run ./examples/local/fivenodenetwork/main.go & + go run ./examples/local/fivenodenetwork/main.go &>/tmp/cnr.log & - name: CaminoJS E2E Test env: - CAMINOGO_IP: localhost + CAMINOGO_IP: 127.0.0.1 CAMINOGO_PORT: 9650 - run: sleep 60 && yarn test -i --roots e2e_tests + run: | + sleep 90 + cat /tmp/cnr.log + yarn test -i --roots e2e_tests diff --git a/e2e_tests/cchain_nomock.test.ts b/e2e_tests/cchain_nomock.test.ts index f78b5c0f2..c6b4ec436 100644 --- a/e2e_tests/cchain_nomock.test.ts +++ b/e2e_tests/cchain_nomock.test.ts @@ -6,8 +6,18 @@ import { EVMAPI } from "src/apis/evm" describe("CChain", (): void => { const avalanche: Avalanche = getAvalanche() - const cchain: EVMAPI = avalanche.CChain() - const keystore: KeystoreAPI = avalanche.NodeKeys() + var cchain: EVMAPI + var keystore: KeystoreAPI + + beforeAll(() => { + return new Promise((resolve) => { + avalanche.fetchNetworkSettings().then((value) => { + cchain = avalanche.CChain() + keystore = new KeystoreAPI(avalanche) + resolve(value) + }) + }) + }) let exportTxHash = { value: "" } diff --git a/e2e_tests/health_nomock.test.ts b/e2e_tests/health_nomock.test.ts index f6790fbc6..be919c441 100644 --- a/e2e_tests/health_nomock.test.ts +++ b/e2e_tests/health_nomock.test.ts @@ -4,7 +4,16 @@ import Avalanche from "src" describe("Info", (): void => { const avalanche: Avalanche = getAvalanche() - const health: HealthAPI = avalanche.Health() + var health: HealthAPI + + beforeAll(() => { + return new Promise((resolve) => { + avalanche.fetchNetworkSettings().then((value) => { + health = avalanche.Health() + resolve(value) + }) + }) + }) // test_name response_promise resp_fn matcher expected_value/obtained_value const tests_spec: any = [ diff --git a/e2e_tests/info_nomock.test.ts b/e2e_tests/info_nomock.test.ts index 7c8446274..b35d2cf89 100644 --- a/e2e_tests/info_nomock.test.ts +++ b/e2e_tests/info_nomock.test.ts @@ -5,7 +5,16 @@ import Avalanche from "src" describe("Info", (): void => { const avalanche: Avalanche = getAvalanche() - const info: InfoAPI = avalanche.Info() + var info: InfoAPI + + beforeAll(() => { + return new Promise((resolve) => { + avalanche.fetchNetworkSettings().then((value) => { + info = avalanche.Info() + resolve(value) + }) + }) + }) // test_name response_promise resp_fn matcher expected_value/obtained_value const tests_spec: any = [ diff --git a/e2e_tests/keystore_nomock.test.ts b/e2e_tests/keystore_nomock.test.ts index c8ebd96d6..09239f138 100644 --- a/e2e_tests/keystore_nomock.test.ts +++ b/e2e_tests/keystore_nomock.test.ts @@ -11,7 +11,16 @@ describe("Keystore", (): void => { let exportedUser = { value: "" } const avalanche: Avalanche = getAvalanche() - const keystore: KeystoreAPI = avalanche.NodeKeys() + var keystore: KeystoreAPI + + beforeAll(() => { + return new Promise((resolve) => { + avalanche.fetchNetworkSettings().then((value) => { + keystore = new KeystoreAPI(avalanche) + resolve(value) + }) + }) + }) // test_name response_promise resp_fn matcher expected_value/obtained_value const tests_spec: any = [ diff --git a/e2e_tests/pchain_nomock.test.ts b/e2e_tests/pchain_nomock.test.ts index 5ec9bb237..ca6ae5894 100644 --- a/e2e_tests/pchain_nomock.test.ts +++ b/e2e_tests/pchain_nomock.test.ts @@ -1,6 +1,7 @@ import { getAvalanche, createTests, Matcher } from "./e2etestlib" import { KeystoreAPI } from "src/apis/keystore/api" import BN from "bn.js" +import { PlatformVMAPI } from "src/apis/platformvm" describe("PChain", (): void => { let tx = { value: "" } @@ -9,8 +10,18 @@ describe("PChain", (): void => { let createdSubnetID = { value: "" } const avalanche = getAvalanche() - const pchain = avalanche.PChain() - const keystore = new KeystoreAPI(avalanche) + var pchain: PlatformVMAPI + var keystore: KeystoreAPI + + beforeAll(() => { + return new Promise((resolve) => { + avalanche.fetchNetworkSettings().then((value) => { + pchain = avalanche.PChain() + keystore = new KeystoreAPI(avalanche) + resolve(value) + }) + }) + }) const now: number = new Date().getTime() const startTime: Date = new Date(now + 800) @@ -21,13 +32,10 @@ describe("PChain", (): void => { const passwd: string = "avalancheJsP@ssw4rd" const badUser: string = "asdfasdfsa" const badPass: string = "pass" - const memo: string = "hello world" const whaleAddr: string = "P-custom18jma8ppw3nhx5r4ap8clazz0dps7rv5u9xde7p" const key: string = "PrivateKey-ewoqjP7PxY4yr3iLTpLisriqt94hdyDFNgchSxGGztUrTXtNN" const nodeID: string = "NodeID-AK7sPBsZM9rQwse23aLhEEBPHZD5gkLrL" - const subnetID: string = "2bGsYJorY6X7RhjPBFs3kYjiNEHo4zGrD2eeyZbb43T2KKi7fM" - const xChainAddr: string = "X-custom18jma8ppw3nhx5r4ap8clazz0dps7rv5u9xde7p" const avalancheBlockChainID: string = "11111111111111111111111111111111LpoYY" const rewardUTXOTxID: string = diff --git a/e2e_tests/xchain_nomock.test.ts b/e2e_tests/xchain_nomock.test.ts index 89f5212e6..a45376230 100644 --- a/e2e_tests/xchain_nomock.test.ts +++ b/e2e_tests/xchain_nomock.test.ts @@ -1,6 +1,7 @@ import { getAvalanche, createTests, Matcher } from "./e2etestlib" import { KeystoreAPI } from "src/apis/keystore/api" import BN from "bn.js" +import { AVMAPI } from "src/apis/avm" describe("XChain", (): void => { let tx = { value: "" } @@ -9,8 +10,18 @@ describe("XChain", (): void => { let addrC = { value: "" } const avalanche = getAvalanche() - const xchain = avalanche.XChain() - const keystore = new KeystoreAPI(avalanche) + var xchain: AVMAPI + var keystore: KeystoreAPI + + beforeAll(() => { + return new Promise((resolve) => { + avalanche.fetchNetworkSettings().then((value) => { + xchain = avalanche.XChain() + keystore = new KeystoreAPI(avalanche) + resolve(value) + }) + }) + }) const user: string = "avalancheJsXChainUser" const passwd: string = "avalancheJsP1ssw4rd" diff --git a/examples/bintools/privkey.ts b/examples/bintools/privkey.ts new file mode 100644 index 000000000..2540833b0 --- /dev/null +++ b/examples/bintools/privkey.ts @@ -0,0 +1,9 @@ +import { BinTools, Buffer } from "@c4tplatform/caminojs/dist" +const bintools: BinTools = BinTools.getInstance() + +const ethPrivateKey = + "56289e99c94b6912bfc12adc093c9b51124f0dc54ac7a766b2bc5ccf558d8027" +const ethPrivateKeyBuf = Buffer.from(ethPrivateKey, "hex") + +let cPrivKey = `PrivateKey-` + bintools.cb58Encode(ethPrivateKeyBuf) +console.log(cPrivKey) diff --git a/examples/evm/buildImportTx-PChain.ts b/examples/evm/buildImportTx-PChain.ts index 7a7a666a2..816baa3fc 100644 --- a/examples/evm/buildImportTx-PChain.ts +++ b/examples/evm/buildImportTx-PChain.ts @@ -1,8 +1,5 @@ import { Avalanche, BN } from "@c4tplatform/caminojs/dist" -import { - PlatformVMAPI, - KeyChain as PlatformVMKeyChain -} from "@c4tplatform/caminojs/dist/apis/platformvm" +import { PlatformVMAPI } from "@c4tplatform/caminojs/dist/apis/platformvm" import { EVMAPI, KeyChain as EVMKeyChain, @@ -32,7 +29,6 @@ let pchain: PlatformVMAPI let cchain: EVMAPI let pKeychain: PlatformKeyChain let cKeychain: EVMKeyChain -let pAddressStrings: string[] let cAddressStrings: string[] let pChainBlockchainId: string @@ -44,7 +40,6 @@ const InitAvalanche = async () => { cKeychain = cchain.keyChain() pKeychain.importKey(privKey) cKeychain.importKey(privKey) - pAddressStrings = pchain.keyChain().getAddressStrings() cAddressStrings = cchain.keyChain().getAddressStrings() pChainBlockchainId = avalanche.getNetwork().P.blockchainID } @@ -65,7 +60,6 @@ const main = async (): Promise => { cHexAddress, cAddressStrings, pChainBlockchainId, - cAddressStrings, fee ) const importCost: number = costImportTx(avalanche.getNetwork().C, unsignedTx) @@ -76,7 +70,6 @@ const main = async (): Promise => { cHexAddress, cAddressStrings, pChainBlockchainId, - cAddressStrings, fee ) diff --git a/examples/evm/buildImportTx-xchain.ts b/examples/evm/buildImportTx-xchain.ts index c664d7d34..7faebfd4f 100644 --- a/examples/evm/buildImportTx-xchain.ts +++ b/examples/evm/buildImportTx-xchain.ts @@ -62,7 +62,6 @@ const main = async (): Promise => { cHexAddress, cAddressStrings, xChainBlockchainId, - cAddressStrings, fee ) const importCost: number = costImportTx(avalanche.getNetwork().C, unsignedTx) @@ -73,7 +72,6 @@ const main = async (): Promise => { cHexAddress, cAddressStrings, xChainBlockchainId, - cAddressStrings, fee ) diff --git a/examples/mnemonic/validateMnemonic.ts b/examples/mnemonic/validateMnemonic.ts index 4626a6d39..74fe03356 100644 --- a/examples/mnemonic/validateMnemonic.ts +++ b/examples/mnemonic/validateMnemonic.ts @@ -5,7 +5,7 @@ const main = async (): Promise => { const m: string = "output tooth keep tooth bracket fox city sustain blood raise install pond stem reject long scene clap gloom purpose mean music piece unknown light" const wordlist = mnemonic.getWordlists("english") as string[] - const validateMnemonic: string = mnemonic.validateMnemonic(m, wordlist) + const validateMnemonic = mnemonic.validateMnemonic(m, wordlist) console.log(validateMnemonic) } main() diff --git a/package.json b/package.json index 339890ed1..b09f99279 100644 --- a/package.json +++ b/package.json @@ -52,11 +52,10 @@ "@types/create-hash": "1.2.2", "@types/hdkey": "2.0.1", "@types/jest": "27.5.0", - "@types/node": "16.11.12", - "@typescript-eslint/eslint-plugin": "4.33.0", - "@typescript-eslint/parser": "4.33.0", + "@typescript-eslint/eslint-plugin": "^5.4.0", + "@typescript-eslint/parser": "^5.4.0", "clean-webpack-plugin": "4.0.0", - "eslint": "7.32.0", + "eslint": "^7.32.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.2.1", "eslint-plugin-security": "1.5.0", @@ -65,30 +64,30 @@ "jest": "26.6.3", "jest-mock-axios": "4.5.0", "prettier": "2.7.1", - "terser-webpack-plugin": "5.3.5", + "terser-webpack-plugin": "^5.3.1", "ts-jest": "26.5.6", "ts-loader": "9.3.1", "typedoc": "^0.18.0", "typedoc-plugin-external-module-name": "^4.0.3", "typedoc-plugin-markdown": "^2.4.0", "typescript": "4.7.4", - "webpack": "5.74.0", - "webpack-cli": "4.10.0" + "webpack": "^5.54.0", + "webpack-cli": "^4.8.0" }, "engines": { "node": ">=14.0.0" }, "dependencies": { "assert": "2.0.0", - "axios": "0.27.2", + "axios": "^0.26.1", "bech32": "2.0.0", - "bip39": "3.0.4", - "bn.js": "5.2.1", - "buffer": "6.0.3", + "bip39": "^3.0.4", + "bn.js": "5.1.1", + "buffer": "5.4.3", "create-hash": "1.2.0", "crypto-browserify": "3.12.0", "elliptic": "6.5.4", - "ethers": "5.7.0", + "ethers": "^5.7.2", "hdkey": "2.0.1", "isomorphic-ws": "5.0.0", "randombytes": "^2.1.0", diff --git a/src/apis/avm/api.ts b/src/apis/avm/api.ts index cc261931c..73a431ad3 100644 --- a/src/apis/avm/api.ts +++ b/src/apis/avm/api.ts @@ -2035,7 +2035,7 @@ export class AVMAPI extends JRPCAPI { ) { /* istanbul ignore next */ throw new AddressError( - "Error - AVMAPI.${caller}: Invalid address format" + `Error - AVMAPI.${caller}: Invalid address format` ) } addrs.push(addresses[`${i}`] as string) diff --git a/src/apis/avm/interfaces.ts b/src/apis/avm/interfaces.ts index e4ae6f147..73dcc58c0 100644 --- a/src/apis/avm/interfaces.ts +++ b/src/apis/avm/interfaces.ts @@ -31,7 +31,7 @@ export interface iUTXOID { outputIndex: number } -export interface CreateAddressParams extends CredsInterface {} +export type CreateAddressParams = CredsInterface export interface CreateFixedCapAssetParams extends CredsInterface { name: string @@ -73,7 +73,7 @@ export interface ImportParams extends CredsInterface { sourceChain: string } -export interface ListAddressesParams extends CredsInterface {} +export type ListAddressesParams = CredsInterface export interface GetAllBalancesParams { address: string diff --git a/src/apis/avm/keychain.ts b/src/apis/avm/keychain.ts index 8231c15fa..d1cc940b5 100644 --- a/src/apis/avm/keychain.ts +++ b/src/apis/avm/keychain.ts @@ -5,13 +5,11 @@ import { Buffer } from "buffer/" import BinTools from "../../utils/bintools" import { SECP256k1KeyChain, SECP256k1KeyPair } from "../../common/secp256k1" -import { Serialization, SerializedType } from "../../utils" /** * @ignore */ const bintools: BinTools = BinTools.getInstance() -const serialization: Serialization = Serialization.getInstance() /** * Class for representing a private and public keypair on an AVM Chain. diff --git a/src/apis/avm/ops.ts b/src/apis/avm/ops.ts index ca0d13ebb..38d66415c 100644 --- a/src/apis/avm/ops.ts +++ b/src/apis/avm/ops.ts @@ -834,7 +834,7 @@ export class UTXOID extends NBytes { return newbase as this } - create(...args: any[]): this { + create(): this { return new UTXOID() as this } diff --git a/src/apis/avm/utxos.ts b/src/apis/avm/utxos.ts index 55f79c7e0..57ecd4a80 100644 --- a/src/apis/avm/utxos.ts +++ b/src/apis/avm/utxos.ts @@ -144,7 +144,7 @@ export class UTXOSet extends StandardUTXOSet { deserialize(fields: object, encoding: SerializedEncoding = "hex") { super.deserialize(fields, encoding) - let utxos = {} + let utxos: { [key: string]: UTXO } = {} for (let utxoid in fields["utxos"]) { let utxoidCleaned: string = serialization.decoder( utxoid, @@ -158,7 +158,7 @@ export class UTXOSet extends StandardUTXOSet { encoding ) } - let addressUTXOs = {} + let addressUTXOs: { [key: string]: { [key: string]: BN } } = {} for (let address in fields["addressUTXOs"]) { let addressCleaned: string = serialization.decoder( address, @@ -166,7 +166,7 @@ export class UTXOSet extends StandardUTXOSet { "cb58", "hex" ) - let utxobalance: {} = {} + let utxobalance: { [key: string]: BN } = {} for (let utxoid in fields["addressUTXOs"][`${address}`]) { let utxoidCleaned: string = serialization.decoder( utxoid, @@ -203,7 +203,7 @@ export class UTXOSet extends StandardUTXOSet { return utxovar } - create(...args: any[]): this { + create(): this { return new UTXOSet() as this } diff --git a/src/apis/avm/vertex.ts b/src/apis/avm/vertex.ts index 1cfab4d36..2981781ed 100644 --- a/src/apis/avm/vertex.ts +++ b/src/apis/avm/vertex.ts @@ -5,10 +5,9 @@ import { Buffer } from "buffer/" import BinTools from "../../utils/bintools" import { AVMConstants } from "./constants" -import { Tx, UnsignedTx } from "./tx" +import { Tx } from "./tx" import { Serializable, CodecIdError, DefaultNetworkID } from "../../utils" import BN from "bn.js" -import { BaseTx } from "." /** * @ignore diff --git a/src/apis/evm/api.ts b/src/apis/evm/api.ts index 0f7b34589..ffb7a58a4 100644 --- a/src/apis/evm/api.ts +++ b/src/apis/evm/api.ts @@ -577,13 +577,8 @@ export class EVMAPI extends JRPCAPI { toAddress: string, ownerAddresses: string[], sourceChain: Buffer | string, - fromAddresses: string[], fee: BN = new BN(0) ): Promise => { - const from: Buffer[] = this._cleanAddressArray( - fromAddresses, - "buildImportTx" - ).map((a: string): Buffer => bintools.stringToAddress(a)) let srcChain: string = undefined if (typeof sourceChain === "string") { diff --git a/src/apis/evm/basetx.ts b/src/apis/evm/basetx.ts index 11e663889..82f4c8877 100644 --- a/src/apis/evm/basetx.ts +++ b/src/apis/evm/basetx.ts @@ -62,6 +62,7 @@ export class EVMBaseTx extends EVMStandardBaseTx { * * @returns An array of [[Credential]]s */ + // eslint-disable-next-line @typescript-eslint/no-unused-vars sign(msg: Buffer, kc: KeyChain): Credential[] { const creds: Credential[] = [] return creds diff --git a/src/apis/evm/interfaces.ts b/src/apis/evm/interfaces.ts index 6f40e7bcf..aafe86f9d 100644 --- a/src/apis/evm/interfaces.ts +++ b/src/apis/evm/interfaces.ts @@ -40,7 +40,7 @@ export interface ImportAVAXParams extends CredsInterface { sourceChain: string } -export interface ImportParams extends ImportAVAXParams {} +export type ImportParams = ImportAVAXParams export interface ImportKeyParams extends CredsInterface { privateKey: string diff --git a/src/apis/evm/keychain.ts b/src/apis/evm/keychain.ts index 76f24a025..c6ce82cf5 100644 --- a/src/apis/evm/keychain.ts +++ b/src/apis/evm/keychain.ts @@ -6,13 +6,11 @@ import { Buffer } from "buffer/" import BinTools from "../../utils/bintools" import { SECP256k1KeyChain, SECP256k1KeyPair } from "../../common/secp256k1" -import { Serialization, SerializedType } from "../../utils" /** * @ignore */ const bintools: BinTools = BinTools.getInstance() -const serialization: Serialization = Serialization.getInstance() /** * Class for representing a private and public keypair on an AVM Chain. diff --git a/src/apis/evm/tx.ts b/src/apis/evm/tx.ts index ddfc3cbe5..45bc23ba8 100644 --- a/src/apis/evm/tx.ts +++ b/src/apis/evm/tx.ts @@ -15,7 +15,6 @@ import { EVMBaseTx } from "./basetx" import { ImportTx } from "./importtx" import { ExportTx } from "./exporttx" import { SerializedEncoding } from "../../utils/serialization" -import { TransactionError } from "../../utils/errors" /** * @ignore diff --git a/src/apis/evm/utxos.ts b/src/apis/evm/utxos.ts index 6c90c72fc..db56537bd 100644 --- a/src/apis/evm/utxos.ts +++ b/src/apis/evm/utxos.ts @@ -130,7 +130,7 @@ export class UTXOSet extends StandardUTXOSet { deserialize(fields: object, encoding: SerializedEncoding = "hex"): void { super.deserialize(fields, encoding) - const utxos: {} = {} + let utxos: { [key: string]: UTXO } = {} for (let utxoid in fields["utxos"]) { let utxoidCleaned: string = serializer.decoder( utxoid, @@ -144,7 +144,7 @@ export class UTXOSet extends StandardUTXOSet { encoding ) } - let addressUTXOs: {} = {} + let addressUTXOs: { [key: string]: { [key: string]: BN } } = {} for (let address in fields["addressUTXOs"]) { let addressCleaned: string = serializer.decoder( address, @@ -152,7 +152,7 @@ export class UTXOSet extends StandardUTXOSet { "cb58", "hex" ) - let utxobalance: {} = {} + let utxobalance: { [key: string]: BN } = {} for (let utxoid in fields["addressUTXOs"][`${address}`]) { let utxoidCleaned: string = serializer.decoder( utxoid, diff --git a/src/apis/health/interfaces.ts b/src/apis/health/interfaces.ts index 92b5751b7..f38212b35 100644 --- a/src/apis/health/interfaces.ts +++ b/src/apis/health/interfaces.ts @@ -4,7 +4,7 @@ */ export interface Entity { - message?: Object[] + message?: any[] timestamp: string duration: number contiguousFailures?: number diff --git a/src/apis/index/interfaces.ts b/src/apis/index/interfaces.ts index 851059219..2effdec7c 100644 --- a/src/apis/index/interfaces.ts +++ b/src/apis/index/interfaces.ts @@ -15,25 +15,25 @@ export interface BaseIndexResponse { index: string } -export interface GetLastAcceptedParams extends BaseIndexParams {} +export type GetLastAcceptedParams = BaseIndexParams -export interface GetLastAcceptedResponse extends BaseIndexResponse {} +export type GetLastAcceptedResponse = BaseIndexResponse -export interface GetLastVertexParams extends BaseIndexParams {} +export type GetLastVertexParams = BaseIndexParams -export interface GetLastVertexResponse extends BaseIndexResponse {} +export type GetLastVertexResponse = BaseIndexResponse export interface GetContainerByIndexParams extends BaseIndexParams { index: string } -export interface GetContainerByIndexResponse extends BaseIndexResponse {} +export type GetContainerByIndexResponse = BaseIndexResponse export interface GetContainerByIDParams extends BaseIndexParams { id: string } -export interface GetContainerByIDResponse extends BaseIndexResponse {} +export type GetContainerByIDResponse = BaseIndexResponse export interface GetContainerRangeParams extends BaseIndexParams { startIndex: number diff --git a/src/apis/platformvm/addressstatetx.ts b/src/apis/platformvm/addressstatetx.ts index 14700347a..ef6e566fe 100644 --- a/src/apis/platformvm/addressstatetx.ts +++ b/src/apis/platformvm/addressstatetx.ts @@ -74,7 +74,7 @@ export class AddressStateTx extends BaseTx { /** * Returns the state */ - getState(): Number { + getState(): number { return this.state } diff --git a/src/apis/platformvm/api.ts b/src/apis/platformvm/api.ts index 98125f503..41a0bf6ce 100644 --- a/src/apis/platformvm/api.ts +++ b/src/apis/platformvm/api.ts @@ -480,9 +480,9 @@ export class PlatformVMAPI extends JRPCAPI { const result = response.data.result const parseDict = (input: any[]): BalanceDict => { - var dict: BalanceDict = {} + let dict: BalanceDict = {} for (const [k, v] of Object.entries(input)) dict[k] = new BN(v) - return dict + return dict as BalanceDict } if (this.core.getNetwork().P.lockModeBondDeposit) { @@ -2294,7 +2294,7 @@ export class PlatformVMAPI extends JRPCAPI { "undefined" ) { /* istanbul ignore next */ - throw new AddressError("Error - Invalid address format") + throw new AddressError(`Error - Invalid address format (${caller})`) } addrs.push(addresses[`${i}`] as string) } else { diff --git a/src/apis/platformvm/builder.ts b/src/apis/platformvm/builder.ts index ad72d7864..9703db822 100644 --- a/src/apis/platformvm/builder.ts +++ b/src/apis/platformvm/builder.ts @@ -371,7 +371,7 @@ export class Builder { changeThreshold ) - var singleAsset = true + let singleAsset = true if (amountAssetID.toString("hex") === feeAssetID.toString("hex")) { aad.addAssetAmount(amountAssetID, zero, fee.add(amount)) } else { diff --git a/src/apis/platformvm/inputs.ts b/src/apis/platformvm/inputs.ts index c023aa50c..c6ef64fd0 100644 --- a/src/apis/platformvm/inputs.ts +++ b/src/apis/platformvm/inputs.ts @@ -104,8 +104,8 @@ export class TransferableInput extends StandardTransferableInput { } static fromArray(b: Buffer): TransferableInput[] { - var offset = 6 //version + counter - var num = b.readUInt32BE(2) + let offset = 6 //version + counter + let num = b.readUInt32BE(2) const result: TransferableInput[] = [] while (offset < b.length && num-- > 0) { const t = new TransferableInput() diff --git a/src/apis/platformvm/keychain.ts b/src/apis/platformvm/keychain.ts index 5f51c7d1e..e1eb4acf4 100644 --- a/src/apis/platformvm/keychain.ts +++ b/src/apis/platformvm/keychain.ts @@ -5,13 +5,11 @@ import { Buffer } from "buffer/" import BinTools from "../../utils/bintools" import { SECP256k1KeyChain, SECP256k1KeyPair } from "../../common/secp256k1" -import { Serialization, SerializedType } from "../../utils" /** * @ignore */ const bintools: BinTools = BinTools.getInstance() -const serialization: Serialization = Serialization.getInstance() /** * Class for representing a private and public keypair on the Platform Chain. diff --git a/src/apis/platformvm/outputs.ts b/src/apis/platformvm/outputs.ts index 1a7038551..117e12477 100644 --- a/src/apis/platformvm/outputs.ts +++ b/src/apis/platformvm/outputs.ts @@ -73,8 +73,8 @@ export class TransferableOutput extends StandardTransferableOutput { } static fromArray(b: Buffer): TransferableOutput[] { - var offset = 6 //version + counter - var num = b.readUInt32BE(2) + let offset = 6 //version + counter + let num = b.readUInt32BE(2) const result: TransferableOutput[] = [] while (offset < b.length && num-- > 0) { const t = new TransferableOutput() diff --git a/src/apis/platformvm/registernodetx.ts b/src/apis/platformvm/registernodetx.ts index a4c33d3b3..e6c1d1a06 100644 --- a/src/apis/platformvm/registernodetx.ts +++ b/src/apis/platformvm/registernodetx.ts @@ -183,7 +183,7 @@ export class RegisterNodeTx extends BaseTx { */ sign(msg: Buffer, kc: KeyChain): Credential[] { const creds: Credential[] = super.sign(msg, kc) - var cred: Credential = SelectCredentialClass(this.getCredentialID()) + let cred: Credential = SelectCredentialClass(this.getCredentialID()) function addSig(source: Buffer) { const keypair: KeyPair = kc.getKey(source) diff --git a/src/apis/platformvm/spender.ts b/src/apis/platformvm/spender.ts index 685dce7ea..e0b4494ce 100644 --- a/src/apis/platformvm/spender.ts +++ b/src/apis/platformvm/spender.ts @@ -6,7 +6,7 @@ import BN from "bn.js" import { AssetAmountDestination, PlatformVMAPI } from "." -import { FeeAssetError, TimeError } from "../../utils/errors" +import { FeeAssetError } from "../../utils/errors" import { LockMode } from "./builder" diff --git a/src/apis/platformvm/tx.ts b/src/apis/platformvm/tx.ts index 4546c4f27..e34999cfc 100644 --- a/src/apis/platformvm/tx.ts +++ b/src/apis/platformvm/tx.ts @@ -8,7 +8,7 @@ import { PlatformVMConstants } from "./constants" import { SelectCredentialClass } from "./credentials" import { KeyChain, KeyPair } from "./keychain" import { StandardTx, StandardUnsignedTx } from "../../common/tx" -import { Credential, Signature } from "../../common/credentials" +import { Credential } from "../../common/credentials" import createHash from "create-hash" import { BaseTx } from "./basetx" import { ImportTx } from "./importtx" @@ -21,7 +21,6 @@ import { } from "./validationtx" import { CreateSubnetTx } from "./createsubnettx" import { TransactionError } from "../../utils/errors" -import { SECPCredential } from "./credentials" /** * @ignore diff --git a/src/apis/platformvm/utxos.ts b/src/apis/platformvm/utxos.ts index be4f272e8..69189e2ee 100644 --- a/src/apis/platformvm/utxos.ts +++ b/src/apis/platformvm/utxos.ts @@ -285,7 +285,7 @@ export class UTXOSet extends StandardUTXOSet { // We only need to iterate over UTXOs until we have spent sufficient funds // to met the requested amounts. - utxoArray.forEach((utxo: UTXO, index: number) => { + utxoArray.forEach((utxo: UTXO) => { const assetID: Buffer = utxo.getAssetID() const assetKey: string = assetID.toString("hex") const fromAddresses: Buffer[] = aad.getSenders() diff --git a/src/common/assetamount.ts b/src/common/assetamount.ts index a22e849b8..b29893f4d 100644 --- a/src/common/assetamount.ts +++ b/src/common/assetamount.ts @@ -207,7 +207,7 @@ export abstract class StandardAssetAmountDestination< changeAddressesThreshold: number ) { this.destinations = destinations - this, (destinationsThreshold = destinationsThreshold) + this.destinationsThreshold = destinationsThreshold this.changeAddresses = changeAddresses this.changeAddressesThreshold = changeAddressesThreshold this.senders = senders diff --git a/src/common/credentials.ts b/src/common/credentials.ts index 7eff46a92..108cf213c 100644 --- a/src/common/credentials.ts +++ b/src/common/credentials.ts @@ -63,7 +63,7 @@ export class SigIdx extends NBytes { return newbase as this } - create(...args: any[]): this { + create(): this { return new SigIdx() as this } @@ -93,7 +93,7 @@ export class Signature extends NBytes { return newbase as this } - create(...args: any[]): this { + create(): this { return new Signature() as this } @@ -134,6 +134,7 @@ export abstract class Credential extends Serializable { * * @param codecID The codecID to set */ + // eslint-disable-next-line @typescript-eslint/no-unused-vars setCodecID(codecID: number): void {} /** diff --git a/src/common/jrpcapi.ts b/src/common/jrpcapi.ts index 946b820f6..e8d75522c 100644 --- a/src/common/jrpcapi.ts +++ b/src/common/jrpcapi.ts @@ -3,8 +3,7 @@ * @module Common-JRPCAPI */ -import BN from "bn.js" -import { AxiosRequestConfig } from "axios" +import { AxiosError, AxiosRequestConfig } from "axios" import { fetchAdapter } from "../utils" import AvalancheCore from "../camino" import { APIBase, RequestResponseData } from "./apibase" @@ -49,13 +48,12 @@ export class JRPCAPI extends APIBase { adapter: typeof fetch !== "undefined" ? fetchAdapter : undefined } - const resp: RequestResponseData = await this.core.post( - ep, - {}, - JSON.stringify(rpc), - headrs, - axConf - ) + var resp: RequestResponseData + try { + resp = await this.core.post(ep, {}, JSON.stringify(rpc), headrs, axConf) + } catch (e) { + throw e.message + } if (resp.status >= 200 && resp.status < 300) { this.rpcID += 1 diff --git a/src/common/output.ts b/src/common/output.ts index 739464936..7554c7067 100644 --- a/src/common/output.ts +++ b/src/common/output.ts @@ -125,7 +125,7 @@ export class Address extends NBytes { return newbase as this } - create(...args: any[]): this { + create(): this { return new Address() as this } diff --git a/src/utils/fetchadapter.ts b/src/utils/fetchadapter.ts index edc227094..00f4963ad 100644 --- a/src/utils/fetchadapter.ts +++ b/src/utils/fetchadapter.ts @@ -23,7 +23,7 @@ function createRequest(config: AxiosRequestConfig): Request { options.body = config.data } - if (!!config.withCredentials) { + if (config.withCredentials) { options.credentials = config.withCredentials ? "include" : "omit" } diff --git a/src/utils/mnemonic.ts b/src/utils/mnemonic.ts index b38341cdb..e82eaf20f 100644 --- a/src/utils/mnemonic.ts +++ b/src/utils/mnemonic.ts @@ -4,10 +4,19 @@ */ import { Buffer } from "buffer/" -import { Wordlist } from "ethers" import { InvalidEntropy } from "./errors" -const bip39: any = require("bip39") -const randomBytes: any = require("randombytes") +import { + entropyToMnemonic, + getDefaultWordlist, + generateMnemonic, + mnemonicToEntropy, + mnemonicToSeed, + mnemonicToSeedSync, + setDefaultWordlist, + validateMnemonic, + wordlists as bip39_wordlists +} from "bip39" +import randomBytes from "randombytes" /** * BIP39 Mnemonic code for generating deterministic keys. @@ -16,7 +25,7 @@ const randomBytes: any = require("randombytes") export default class Mnemonic { private static instance: Mnemonic private constructor() {} - protected wordlists: string[] = bip39.wordlists + protected wordlists = bip39_wordlists /** * Retrieves the Mnemonic singleton. @@ -35,11 +44,11 @@ export default class Mnemonic { * * @returns A [[Wordlist]] object or array of strings */ - getWordlists(language?: string): string[] | Wordlist { + getWordlists(language?: string): string[] { if (language !== undefined) { return this.wordlists[`${language}`] } else { - return this.wordlists + return this.wordlists[`${getDefaultWordlist()}`] } } @@ -52,7 +61,7 @@ export default class Mnemonic { * @returns A {@link https://github.com/feross/buffer|Buffer} */ mnemonicToSeedSync(mnemonic: string, password: string = ""): Buffer { - const seed: Buffer = bip39.mnemonicToSeedSync(mnemonic, password) + const seed = mnemonicToSeedSync(mnemonic, password) return Buffer.from(seed) } @@ -68,7 +77,7 @@ export default class Mnemonic { mnemonic: string, password: string = "" ): Promise { - const seed: Buffer = await bip39.mnemonicToSeed(mnemonic, password) + const seed = await mnemonicToSeed(mnemonic, password) return Buffer.from(seed) } @@ -81,7 +90,7 @@ export default class Mnemonic { * @returns A string */ mnemonicToEntropy(mnemonic: string, wordlist?: string[]): string { - return bip39.mnemonicToEntropy(mnemonic, wordlist) + return mnemonicToEntropy(mnemonic, wordlist) } /** @@ -93,7 +102,9 @@ export default class Mnemonic { * @returns A string */ entropyToMnemonic(entropy: Buffer | string, wordlist?: string[]): string { - return bip39.entropyToMnemonic(entropy, wordlist) + const param: globalThis.Buffer | string = + typeof entropy === "string" ? entropy : globalThis.Buffer.from(entropy) + return entropyToMnemonic(param, wordlist) } /** @@ -104,8 +115,8 @@ export default class Mnemonic { * * @returns A string */ - validateMnemonic(mnemonic: string, wordlist?: string[]): string { - return bip39.validateMnemonic(mnemonic, wordlist) + validateMnemonic(mnemonic: string, wordlist?: string[]): boolean { + return validateMnemonic(mnemonic, wordlist) } /** @@ -115,7 +126,7 @@ export default class Mnemonic { * */ setDefaultWordlist(language: string): void { - bip39.setDefaultWordlist(language) + setDefaultWordlist(language) } /** @@ -124,7 +135,7 @@ export default class Mnemonic { * @returns A string */ getDefaultWordlist(): string { - return bip39.getDefaultWordlist() + return getDefaultWordlist() } /** @@ -144,7 +155,12 @@ export default class Mnemonic { if (strength % 32 !== 0) { throw new InvalidEntropy("Error - Invalid entropy") } - rng = rng || randomBytes - return bip39.generateMnemonic(strength, rng, wordlist) + var rnGT = rng + ? (size: number) => { + return globalThis.Buffer.from(rng(size)) + } + : undefined + rnGT = rnGT || randomBytes + return generateMnemonic(strength, rnGT, wordlist) } } diff --git a/src/utils/serialization.ts b/src/utils/serialization.ts index 93a70e659..031cb7024 100644 --- a/src/utils/serialization.ts +++ b/src/utils/serialization.ts @@ -87,6 +87,7 @@ export abstract class Serializable { //sometimes the parent class manages the fields //these are so you can say super.serialize(encoding) + // eslint-disable-next-line @typescript-eslint/no-unused-vars serialize(encoding?: SerializedEncoding): object { return { _typeName: xss(this._typeName), @@ -94,6 +95,7 @@ export abstract class Serializable { _codecID: typeof this._codecID === "undefined" ? null : this._codecID } } + // eslint-disable-next-line @typescript-eslint/no-unused-vars deserialize(fields: object, encoding?: SerializedEncoding): void { fields = this.sanitizeObject(fields) if (typeof fields["_typeName"] !== "string") { diff --git a/tests/utils/hdnode.test.ts b/tests/utils/hdnode.test.ts index 65a978f31..91d660f15 100644 --- a/tests/utils/hdnode.test.ts +++ b/tests/utils/hdnode.test.ts @@ -83,7 +83,7 @@ describe("HDNode", (): void => { }) test("BIP44", (): void => { - const seed: Buffer = mnemonic.mnemonicToSeedSync(m) + const seed: Buffer = Buffer.from(mnemonic.mnemonicToSeedSync(m)) const hdnode: HDNode = new HDNode(seed) for (let i: number = 0; i <= 9; i++) { const child: HDNode = hdnode.derive(`m/44'/9000'/0'/0/${i}`) diff --git a/tests/utils/mnemonic.test.ts b/tests/utils/mnemonic.test.ts index ac3f325d7..89d2a65a6 100644 --- a/tests/utils/mnemonic.test.ts +++ b/tests/utils/mnemonic.test.ts @@ -1,7 +1,10 @@ import Mnemonic from "src/utils/mnemonic" import { Buffer } from "buffer/" +import rdb from "randombytes" -const randomBytes: any = require("randombytes") +const randomBytes = (size: number) => { + return Buffer.from(rdb(size)) +} const mnemonic = Mnemonic.getInstance() const entropy: string = "9d7c99e77261acb88a5ed717f625d5d3ed5569e0f60429cc6eb9c4e91f48fb7c" @@ -281,9 +284,8 @@ describe("Mnemonic", () => { ) expect(mnemonicToEntropy).toBe(vector.entropy) const password: string = "TREZOR" - const mnemonicToSeed: Buffer = await mnemonic.mnemonicToSeed( - vector.mnemonic, - password + const mnemonicToSeed: Buffer = Buffer.from( + await mnemonic.mnemonicToSeed(vector.mnemonic, password) ) expect(mnemonicToSeed.toString("hex")).toBe(vector.seed) }) @@ -292,7 +294,7 @@ describe("Mnemonic", () => { test("badMnemonics", (): void => { const wordlist = mnemonic.getWordlists("english") as string[] badMnemonics.forEach((badMnemonic: BadMnemonic, index: number): void => { - const validateMnemonic: string = mnemonic.validateMnemonic( + const validateMnemonic: boolean = mnemonic.validateMnemonic( badMnemonic.mnemonic, wordlist ) @@ -304,7 +306,7 @@ describe("Mnemonic", () => { const wordlist = mnemonic.getWordlists("english") as string[] malformedMnemonics.forEach( (malformedMnemonic: string, index: number): void => { - const validateMnemonic: string = mnemonic.validateMnemonic( + const validateMnemonic = mnemonic.validateMnemonic( malformedMnemonic, wordlist ) @@ -381,9 +383,8 @@ describe("Mnemonic", () => { test("mnemonicToSeed", async (): Promise => { mnemnonics.forEach(async (mnemnnic: string): Promise => { const password: string = "password" - const mnemonicToSeed: Buffer = await mnemonic.mnemonicToSeed( - mnemnnic, - password + const mnemonicToSeed: Buffer = Buffer.from( + await mnemonic.mnemonicToSeed(mnemnnic, password) ) expect(typeof mnemonicToSeed === "object").toBeTruthy() }) @@ -392,9 +393,8 @@ describe("Mnemonic", () => { test("mnemonicToSeedSync", (): void => { mnemnonics.forEach((mnemnnic: string, index: number): void => { const password: string = "password" - const mnemonicToSeedSync: Buffer = mnemonic.mnemonicToSeedSync( - mnemnnic, - password + const mnemonicToSeedSync: Buffer = Buffer.from( + mnemonic.mnemonicToSeedSync(mnemnnic, password) ) expect(mnemonicToSeedSync.toString("hex")).toBe(seeds[index]) }) @@ -403,10 +403,7 @@ describe("Mnemonic", () => { test("validateMnemonic", (): void => { mnemnonics.forEach((mnemnnic: string, index: number): void => { const wordlist = mnemonic.getWordlists(langs[index]) as string[] - const validateMnemonic: string = mnemonic.validateMnemonic( - mnemnnic, - wordlist - ) + const validateMnemonic = mnemonic.validateMnemonic(mnemnnic, wordlist) expect(validateMnemonic).toBeTruthy() }) }) diff --git a/yarn.lock b/yarn.lock index 96fd89afd..5295f0ec8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -483,7 +483,14 @@ resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== -"@ethersproject/networks@5.7.0", "@ethersproject/networks@^5.7.0": +"@ethersproject/networks@5.7.1": + version "5.7.1" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.1.tgz#118e1a981d757d45ccea6bb58d9fd3d9db14ead6" + integrity sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/networks@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.0.tgz#df72a392f1a63a57f87210515695a31a245845ad" integrity sha512-MG6oHSQHd4ebvJrleEQQ4HhVu8Ichr0RDYEfHzsVAVjHNM+w36x9wp9r+hf1JstMXtseXDtkiVoARAG6M959AA== @@ -505,10 +512,10 @@ dependencies: "@ethersproject/logger" "^5.7.0" -"@ethersproject/providers@5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.0.tgz#a885cfc7650a64385e7b03ac86fe9c2d4a9c2c63" - integrity sha512-+TTrrINMzZ0aXtlwO/95uhAggKm4USLm1PbeCBR/3XZ7+Oey+3pMyddzZEyRhizHpy1HXV0FRWRMI1O3EGYibA== +"@ethersproject/providers@5.7.2": + version "5.7.2" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" + integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== dependencies: "@ethersproject/abstract-provider" "^5.7.0" "@ethersproject/abstract-signer" "^5.7.0" @@ -634,7 +641,18 @@ "@ethersproject/transactions" "^5.7.0" "@ethersproject/wordlists" "^5.7.0" -"@ethersproject/web@5.7.0", "@ethersproject/web@^5.7.0": +"@ethersproject/web@5.7.1": + version "5.7.1" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.1.tgz#de1f285b373149bee5928f4eb7bcb87ee5fbb4ae" + integrity sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w== + dependencies: + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/web@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.0.tgz#40850c05260edad8b54827923bbad23d96aac0bc" integrity sha512-ApHcbbj+muRASVDSCl/tgxaH2LBkRMEYfLOLVa0COipx0+nlu0QKet7U2lEg0vdkh8XRSLf2nd1f1Uk9SrVSGA== @@ -1087,7 +1105,7 @@ jest-matcher-utils "^27.0.0" pretty-format "^27.0.0" -"@types/json-schema@*", "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.8": +"@types/json-schema@*", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.11" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== @@ -1107,11 +1125,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-11.11.6.tgz#df929d1bb2eee5afdda598a41930fe50b43eaa6a" integrity sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ== -"@types/node@16.11.12": - version "16.11.12" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.12.tgz#ac7fb693ac587ee182c3780c26eb65546a1a3c10" - integrity sha512-+2Iggwg7PxoO5Kyhvsq9VarmPbIelXP070HMImEpbtGCoyWNINQj4wzjbQCXzdHTRXnqufutJb5KAURZANNBAw== - "@types/normalize-package-data@^2.4.0": version "2.4.1" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" @@ -1122,6 +1135,11 @@ resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.6.0.tgz#efcbd41937f9ae7434c714ab698604822d890759" integrity sha512-G/AdOadiZhnJp0jXCaBQU449W2h716OW/EoXeYkCytxKL06X1WCXB4DZpp8TpZ8eyIJVS1cw4lrlkkSYU21cDw== +"@types/semver@^7.3.12": + version "7.3.13" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91" + integrity sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw== + "@types/stack-utils@^2.0.0": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" @@ -1139,75 +1157,89 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz#c24dc7c8069c7706bc40d99f6fa87edcb2005276" - integrity sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg== +"@typescript-eslint/eslint-plugin@^5.4.0": + version "5.53.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.53.0.tgz#24b8b4a952f3c615fe070e3c461dd852b5056734" + integrity sha512-alFpFWNucPLdUOySmXCJpzr6HKC3bu7XooShWM+3w/EL6J2HIoB2PFxpLnq4JauWVk6DiVeNKzQlFEaE+X9sGw== dependencies: - "@typescript-eslint/experimental-utils" "4.33.0" - "@typescript-eslint/scope-manager" "4.33.0" - debug "^4.3.1" - functional-red-black-tree "^1.0.1" - ignore "^5.1.8" - regexpp "^3.1.0" - semver "^7.3.5" + "@typescript-eslint/scope-manager" "5.53.0" + "@typescript-eslint/type-utils" "5.53.0" + "@typescript-eslint/utils" "5.53.0" + debug "^4.3.4" + grapheme-splitter "^1.0.4" + ignore "^5.2.0" + natural-compare-lite "^1.4.0" + regexpp "^3.2.0" + semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/experimental-utils@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz#6f2a786a4209fa2222989e9380b5331b2810f7fd" - integrity sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q== +"@typescript-eslint/parser@^5.4.0": + version "5.53.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.53.0.tgz#a1f2b9ae73b83181098747e96683f1b249ecab52" + integrity sha512-MKBw9i0DLYlmdOb3Oq/526+al20AJZpANdT6Ct9ffxcV8nKCHz63t/S0IhlTFNsBIHJv+GY5SFJ0XfqVeydQrQ== dependencies: - "@types/json-schema" "^7.0.7" - "@typescript-eslint/scope-manager" "4.33.0" - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/typescript-estree" "4.33.0" - eslint-scope "^5.1.1" - eslint-utils "^3.0.0" + "@typescript-eslint/scope-manager" "5.53.0" + "@typescript-eslint/types" "5.53.0" + "@typescript-eslint/typescript-estree" "5.53.0" + debug "^4.3.4" -"@typescript-eslint/parser@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.33.0.tgz#dfe797570d9694e560528d18eecad86c8c744899" - integrity sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA== - dependencies: - "@typescript-eslint/scope-manager" "4.33.0" - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/typescript-estree" "4.33.0" - debug "^4.3.1" - -"@typescript-eslint/scope-manager@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz#d38e49280d983e8772e29121cf8c6e9221f280a3" - integrity sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ== - dependencies: - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/visitor-keys" "4.33.0" - -"@typescript-eslint/types@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72" - integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ== - -"@typescript-eslint/typescript-estree@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz#0dfb51c2908f68c5c08d82aefeaf166a17c24609" - integrity sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA== - dependencies: - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/visitor-keys" "4.33.0" - debug "^4.3.1" - globby "^11.0.3" - is-glob "^4.0.1" - semver "^7.3.5" +"@typescript-eslint/scope-manager@5.53.0": + version "5.53.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.53.0.tgz#42b54f280e33c82939275a42649701024f3fafef" + integrity sha512-Opy3dqNsp/9kBBeCPhkCNR7fmdSQqA+47r21hr9a14Bx0xnkElEQmhoHga+VoaoQ6uDHjDKmQPIYcUcKJifS7w== + dependencies: + "@typescript-eslint/types" "5.53.0" + "@typescript-eslint/visitor-keys" "5.53.0" + +"@typescript-eslint/type-utils@5.53.0": + version "5.53.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.53.0.tgz#41665449935ba9b4e6a1ba6e2a3f4b2c31d6cf97" + integrity sha512-HO2hh0fmtqNLzTAme/KnND5uFNwbsdYhCZghK2SoxGp3Ifn2emv+hi0PBUjzzSh0dstUIFqOj3bp0AwQlK4OWw== + dependencies: + "@typescript-eslint/typescript-estree" "5.53.0" + "@typescript-eslint/utils" "5.53.0" + debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/visitor-keys@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz#2a22f77a41604289b7a186586e9ec48ca92ef1dd" - integrity sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg== +"@typescript-eslint/types@5.53.0": + version "5.53.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.53.0.tgz#f79eca62b97e518ee124086a21a24f3be267026f" + integrity sha512-5kcDL9ZUIP756K6+QOAfPkigJmCPHcLN7Zjdz76lQWWDdzfOhZDTj1irs6gPBKiXx5/6O3L0+AvupAut3z7D2A== + +"@typescript-eslint/typescript-estree@5.53.0": + version "5.53.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.53.0.tgz#bc651dc28cf18ab248ecd18a4c886c744aebd690" + integrity sha512-eKmipH7QyScpHSkhbptBBYh9v8FxtngLquq292YTEQ1pxVs39yFBlLC1xeIZcPPz1RWGqb7YgERJRGkjw8ZV7w== + dependencies: + "@typescript-eslint/types" "5.53.0" + "@typescript-eslint/visitor-keys" "5.53.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.53.0": + version "5.53.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.53.0.tgz#e55eaad9d6fffa120575ffaa530c7e802f13bce8" + integrity sha512-VUOOtPv27UNWLxFwQK/8+7kvxVC+hPHNsJjzlJyotlaHjLSIgOCKj9I0DBUjwOOA64qjBwx5afAPjksqOxMO0g== dependencies: - "@typescript-eslint/types" "4.33.0" - eslint-visitor-keys "^2.0.0" + "@types/json-schema" "^7.0.9" + "@types/semver" "^7.3.12" + "@typescript-eslint/scope-manager" "5.53.0" + "@typescript-eslint/types" "5.53.0" + "@typescript-eslint/typescript-estree" "5.53.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + semver "^7.3.7" + +"@typescript-eslint/visitor-keys@5.53.0": + version "5.53.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.53.0.tgz#8a5126623937cdd909c30d8fa72f79fa56cc1a9f" + integrity sha512-JqNLnX3leaHFZEN0gCh81sIvgrp/2GOACZNgO4+Tkf64u51kTpAyWFOY8XHx8XuXr3N2C9zgPPHtcpMg6z1g0w== + dependencies: + "@typescript-eslint/types" "5.53.0" + eslint-visitor-keys "^3.3.0" "@webassemblyjs/ast@1.11.1": version "1.11.1" @@ -1578,13 +1610,12 @@ available-typed-arrays@^1.0.5: resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== -axios@0.27.2: - version "0.27.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972" - integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ== +axios@^0.26.1: + version "0.26.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.26.1.tgz#1ede41c51fcf51bbbd6fd43669caaa4f0495aaa9" + integrity sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA== dependencies: - follow-redirects "^1.14.9" - form-data "^4.0.0" + follow-redirects "^1.14.8" babel-jest@^26.6.3: version "26.6.3" @@ -1659,7 +1690,7 @@ base-x@^3.0.2: dependencies: safe-buffer "^5.0.1" -base64-js@^1.3.1: +base64-js@^1.0.2: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== @@ -1687,7 +1718,7 @@ bech32@1.1.4: resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== -bip39@3.0.4: +bip39@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/bip39/-/bip39-3.0.4.tgz#5b11fed966840b5e1b8539f0f54ab6392969b2a0" integrity sha512-YZKQlb752TrUWqHWj7XAwCSjYEgGAk+/Aas3V7NyjQeZYsztO8JnQUaCWhcnL4T+jL8nvB8typ2jRPzTlgugNw== @@ -1697,10 +1728,10 @@ bip39@3.0.4: pbkdf2 "^3.0.9" randombytes "^2.0.1" -bn.js@5.2.1, bn.js@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" - integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== +bn.js@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.1.tgz#48efc4031a9c4041b9c99c6941d903463ab62eb5" + integrity sha512-IUTD/REb78Z2eodka1QZyyEk66pciRcP6Sroka0aI3tG/iwIdYLrBD62RsubR7vqdt3WyX8p4jxeatzmRSphtA== bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9: version "4.12.0" @@ -1712,6 +1743,11 @@ bn.js@^5.0.0, bn.js@^5.1.1: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== +bn.js@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + boolbase@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" @@ -1863,13 +1899,13 @@ buffer-xor@^1.0.3: resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= -buffer@6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" - integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== +buffer@5.4.3: + version "5.4.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.4.3.tgz#3fbc9c69eb713d323e3fc1a895eee0710c072115" + integrity sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A== dependencies: - base64-js "^1.3.1" - ieee754 "^1.2.1" + base64-js "^1.0.2" + ieee754 "^1.1.4" cache-base@^1.0.1: version "1.0.1" @@ -2222,7 +2258,7 @@ data-urls@^2.0.0: whatwg-mimetype "^2.3.0" whatwg-url "^8.0.0" -debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: +debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -2602,7 +2638,12 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -eslint@7.32.0: +eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + +eslint@^7.32.0: version "7.32.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA== @@ -2691,10 +2732,10 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -ethers@5.7.0: - version "5.7.0" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.0.tgz#0055da174b9e076b242b8282638bc94e04b39835" - integrity sha512-5Xhzp2ZQRi0Em+0OkOcRHxPzCfoBfgtOQA+RUylSkuHbhTEaQklnYi2hsWbRgs3ztJsXVXd9VKBcO1ScWL8YfA== +ethers@^5.7.2: + version "5.7.2" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" + integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== dependencies: "@ethersproject/abi" "5.7.0" "@ethersproject/abstract-provider" "5.7.0" @@ -2711,10 +2752,10 @@ ethers@5.7.0: "@ethersproject/json-wallets" "5.7.0" "@ethersproject/keccak256" "5.7.0" "@ethersproject/logger" "5.7.0" - "@ethersproject/networks" "5.7.0" + "@ethersproject/networks" "5.7.1" "@ethersproject/pbkdf2" "5.7.0" "@ethersproject/properties" "5.7.0" - "@ethersproject/providers" "5.7.0" + "@ethersproject/providers" "5.7.2" "@ethersproject/random" "5.7.0" "@ethersproject/rlp" "5.7.0" "@ethersproject/sha2" "5.7.0" @@ -2724,7 +2765,7 @@ ethers@5.7.0: "@ethersproject/transactions" "5.7.0" "@ethersproject/units" "5.7.0" "@ethersproject/wallet" "5.7.0" - "@ethersproject/web" "5.7.0" + "@ethersproject/web" "5.7.1" "@ethersproject/wordlists" "5.7.0" events@^3.2.0: @@ -2927,10 +2968,10 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.5.tgz#76c8584f4fc843db64702a6bd04ab7a8bd666da3" integrity sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg== -follow-redirects@^1.14.9: - version "1.15.0" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.0.tgz#06441868281c86d0dda4ad8bdaead2d02dca89d4" - integrity sha512-aExlJShTV4qOUOL7yF1U5tvLCB0xQuudbf6toyYA0E/acBNw71mvjFTnLaRp50aQaYocMR0a/RMMBIHeZnGyjQ== +follow-redirects@^1.14.8: + version "1.15.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" + integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== for-in@^1.0.2: version "1.0.2" @@ -2951,15 +2992,6 @@ form-data@^3.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" -form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" @@ -3089,7 +3121,7 @@ globals@^13.6.0, globals@^13.9.0: dependencies: type-fest "^0.20.2" -globby@^11.0.3: +globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -3117,6 +3149,11 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== +grapheme-splitter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" + integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== + growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" @@ -3331,7 +3368,7 @@ iconv-lite@0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -ieee754@^1.2.1: +ieee754@^1.1.4: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -3341,7 +3378,7 @@ ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.8, ignore@^5.2.0: +ignore@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== @@ -3543,7 +3580,7 @@ is-generator-function@^1.0.7: dependencies: has-tostringtag "^1.0.0" -is-glob@^4.0.0, is-glob@^4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== @@ -4540,6 +4577,11 @@ nanomatch@^1.2.9: snapdragon "^0.8.1" to-regex "^3.0.1" +natural-compare-lite@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" + integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -5092,7 +5134,7 @@ regexp-tree@~0.1.1: resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.24.tgz#3d6fa238450a4d66e5bc9c4c14bb720e2196829d" integrity sha512-s2aEVuLhvnVJW6s/iPgEGK6R+/xngd2jNQ+xy4bXNDKxZKJH6jpPHY6kVeVv1IeLCHgswRj+Kl3ELaDjG6V1iw== -regexpp@^3.1.0: +regexpp@^3.1.0, regexpp@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== @@ -5297,7 +5339,7 @@ secp256k1@^4.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@7.x, semver@^7.1.1, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5: +semver@7.x, semver@^7.1.1, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4: version "7.3.7" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== @@ -5309,6 +5351,13 @@ semver@^6.0.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^7.3.7: + version "7.3.8" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" + integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== + dependencies: + lru-cache "^6.0.0" + serialize-javascript@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" @@ -5689,7 +5738,7 @@ terminal-link@^2.0.0: ansi-escapes "^4.2.1" supports-hyperlinks "^2.0.0" -terser-webpack-plugin@5.3.5, terser-webpack-plugin@^5.1.3: +terser-webpack-plugin@^5.1.3: version "5.3.5" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.5.tgz#f7d82286031f915a4f8fb81af4bd35d2e3c011bc" integrity sha512-AOEDLDxD2zylUGf/wxHxklEkOe2/r+seuyOWujejFrIxHf11brA1/dWQNIgXa1c6/Wkxgu7zvv0JhOWfc2ELEA== @@ -5700,6 +5749,17 @@ terser-webpack-plugin@5.3.5, terser-webpack-plugin@^5.1.3: serialize-javascript "^6.0.0" terser "^5.14.1" +terser-webpack-plugin@^5.3.1: + version "5.3.6" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.6.tgz#5590aec31aa3c6f771ce1b1acca60639eab3195c" + integrity sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ== + dependencies: + "@jridgewell/trace-mapping" "^0.3.14" + jest-worker "^27.4.5" + schema-utils "^3.1.1" + serialize-javascript "^6.0.0" + terser "^5.14.1" + terser@^5.10.0, terser@^5.14.1: version "5.14.2" resolved "https://registry.yarnpkg.com/terser/-/terser-5.14.2.tgz#9ac9f22b06994d736174f4091aa368db896f1c10" @@ -6068,7 +6128,7 @@ webidl-conversions@^6.1.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== -webpack-cli@4.10.0: +webpack-cli@^4.8.0: version "4.10.0" resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.10.0.tgz#37c1d69c8d85214c5a65e589378f53aec64dab31" integrity sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w== @@ -6099,10 +6159,10 @@ webpack-sources@^3.2.3: resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@5.74.0: - version "5.74.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.74.0.tgz#02a5dac19a17e0bb47093f2be67c695102a55980" - integrity sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA== +webpack@^5.54.0: + version "5.75.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.75.0.tgz#1e440468647b2505860e94c9ff3e44d5b582c152" + integrity sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ== dependencies: "@types/eslint-scope" "^3.7.3" "@types/estree" "^0.0.51"