diff --git a/JsClients/ERC20/.env b/JsClients/ERC20/.env new file mode 100644 index 00000000..66c2f7e5 --- /dev/null +++ b/JsClients/ERC20/.env @@ -0,0 +1,39 @@ +CHAIN_NAME=casper-test +NODE_ADDRESS=http://144.76.97.151:7777/rpc +EVENT_STREAM_ADDRESS=http://144.76.97.151:7777/events/main +WASM_PATH=./wasm/erc20-token.wasm +MASTER_KEY_PAIR_PATH=keys/ +RECEIVER_ACCOUNT_ONE=017e82abcc9539a01cfd9d63ae8c9c8b3a752a6f75ba1ab148714eea03e9be69a7 + +CONTRACT_NAME=erc20 +TOKEN_NAME=ERC20 +TOKEN_SYMBOL=erc +DECIMALS=18 +TOTAL_SUPPLY=1000 + +INSTALL_PAYMENT_AMOUNT=200000000000 + +MINT_PAYMENT_AMOUNT=5000000000 +MINT_AMOUNT=50 + +BURN_PAYMENT_AMOUNT=5000000000 +BURN_AMOUNT=10 + +APPROVE_PAYMENT_AMOUNT=5000000000 +APPROVE_AMOUNT=50 + +TRANSFER_PAYMENT_AMOUNT=5000000000 +TRANSFER_AMOUNT=5 + +TRANSFER_FROM_PAYMENT_AMOUNT=5000000000 +TRANSFER_FROM_AMOUNT=5 + +# balanceof + +# transfer + +# transferfrom + +# approve + +# mint diff --git a/JsClients/ERC20/src/constants.ts b/JsClients/ERC20/src/constants.ts new file mode 100644 index 00000000..88d85ede --- /dev/null +++ b/JsClients/ERC20/src/constants.ts @@ -0,0 +1,12 @@ +export enum ERC20Events { + MintOne = "erc20_mint_one", + TransferToken = "erc20_transfer_token", + BurnOne = "erc20_burn_one", + MetadataUpdate = 'erc20_metadata_update', + Approve = 'approve', + Transfer = 'transfer', + TransferFrom = 'transfer_from', + Mint = 'mint', + Burn = 'burn', + Permit = 'permit', +} diff --git a/JsClients/ERC20/src/erc20.ts b/JsClients/ERC20/src/erc20.ts new file mode 100644 index 00000000..e956cf4a --- /dev/null +++ b/JsClients/ERC20/src/erc20.ts @@ -0,0 +1,595 @@ +import { + CasperClient, + CLPublicKey, + CLAccountHash, + CLByteArray, + CLKey, + CLString, + CLTypeBuilder, + CLValue, + CLValueBuilder, + CLValueParsers, + CLMap, + DeployUtil, + EventName, + EventStream, + Keys, + RuntimeArgs, +} from "casper-js-sdk"; +import { Some, None } from "ts-results"; +import { ERC20Events } from "./constants"; +import * as utils from "./utils"; +import { RecipientType, IPendingDeploy } from "./types"; + +class ERC20Client { + private contractName: string = "erc20"; + private contractHash: string; + private contractPackageHash: string; + private namedKeys: { + balances: string; + metadata: string; + nonces: string; + allowances: string; + ownedTokens: string; + owners: string; + paused: string; + }; + private isListening = false; + private pendingDeploys: IPendingDeploy[] = []; + + constructor( + private nodeAddress: string, + private chainName: string, + private eventStreamAddress?: string + ) { } + + public async install( + keys: Keys.AsymmetricKey, + tokenName: string, + tokenSymbol: string, + decimals: string, + totalSupply: string, + contractName: string, + paymentAmount: string, + wasmPath: string + ) { + const runtimeArgs = RuntimeArgs.fromMap({ + name: CLValueBuilder.string(tokenName), + symbol: CLValueBuilder.string(tokenSymbol), + decimals: CLValueBuilder.u8(decimals), + initial_supply: CLValueBuilder.u256(totalSupply), + contract_name: CLValueBuilder.string(contractName), + }); + + const deployHash = await installWasmFile({ + chainName: this.chainName, + paymentAmount, + nodeAddress: this.nodeAddress, + keys, + pathToContract: wasmPath, + runtimeArgs, + }); + + if (deployHash !== null) { + return deployHash; + } else { + throw Error("Problem with installation"); + } + } + + public async setContractHash(hash: string) { + const stateRootHash = await utils.getStateRootHash(this.nodeAddress); + const contractData = await utils.getContractData( + this.nodeAddress, + stateRootHash, + hash + ); + + const { contractPackageHash, namedKeys } = contractData.Contract!; + this.contractHash = hash; + this.contractPackageHash = contractPackageHash.replace( + "contract-package-wasm", + "" + ); + const LIST_OF_NAMED_KEYS = [ + 'balances', + 'nonces', + 'allowances', + `${this.contractName}_package_hash`, + `${this.contractName}_package_hash_wrapped`, + `${this.contractName}_contract_hash`, + `${this.contractName}_contract_hash_wrapped`, + `${this.contractName}_package_access_token`, + ]; + // @ts-ignore + this.namedKeys = namedKeys.reduce((acc, val) => { + if (LIST_OF_NAMED_KEYS.includes(val.name)) { + return { ...acc, [utils.camelCased(val.name)]: val.key }; + } + return acc; + }, {}); + } + + public async name() { + const result = await contractSimpleGetter( + this.nodeAddress, + this.contractHash, + ["name"] + ); + return result.value(); + } + + public async symbol() { + const result = await contractSimpleGetter( + this.nodeAddress, + this.contractHash, + ["symbol"] + ); + return result.value(); + } + + public async balanceOf(account: CLPublicKey) { + const accountHash = Buffer.from(account.toAccountHash()).toString("hex"); + const result = await utils.contractDictionaryGetter( + this.nodeAddress, + accountHash, + this.namedKeys.balances + ); + const maybeValue = result.value().unwrap(); + return maybeValue.value().toString(); + } + + public async nonce(account: CLPublicKey) { + const accountHash = Buffer.from(account.toAccountHash()).toString("hex"); + const result = await utils.contractDictionaryGetter( + this.nodeAddress, + accountHash, + this.namedKeys.nonces + ); + const maybeValue = result.value().unwrap(); + return maybeValue.value().toString(); + } + + public async allowance(owner: CLPublicKey, spender: CLPublicKey) { + const ownerAccountHash = Buffer.from(owner.toAccountHash()).toString("hex"); + const spenderAccountHash = Buffer.from(spender.toAccountHash()).toString("hex"); + const accountHash: string = `${ownerAccountHash}_${spenderAccountHash}`; + const result = await utils.contractDictionaryGetter( + this.nodeAddress, + accountHash, + this.namedKeys.allowances + ); + const maybeValue = result.value().unwrap(); + return maybeValue.value().toString(); + } + + public async totalSupply() { + const result = await contractSimpleGetter( + this.nodeAddress, + this.contractHash, + ["total_supply"] + ); + return result.value(); + } + + public async approve( + keys: Keys.AsymmetricKey, + spender: RecipientType, + amount: string, + paymentAmount: string + ) { + + const runtimeArgs = RuntimeArgs.fromMap({ + spender: utils.createRecipientAddress(spender), + amount: CLValueBuilder.u256(amount) + }); + + + const deployHash = await contractCall({ + chainName: this.chainName, + contractHash: this.contractHash, + entryPoint: "approve", + keys, + nodeAddress: this.nodeAddress, + paymentAmount, + runtimeArgs, + }); + + if (deployHash !== null) { + this.addPendingDeploy(ERC20Events.Approve, deployHash); + return deployHash; + } else { + throw Error("Invalid Deploy"); + } + } + public async transfer( + keys: Keys.AsymmetricKey, + recipient: RecipientType, + amount: string, + paymentAmount: string + ) { + + const runtimeArgs = RuntimeArgs.fromMap({ + recipient: utils.createRecipientAddress(recipient), + amount: CLValueBuilder.u256(amount) + }); + + + const deployHash = await contractCall({ + chainName: this.chainName, + contractHash: this.contractHash, + entryPoint: "transfer", + keys, + nodeAddress: this.nodeAddress, + paymentAmount, + runtimeArgs, + }); + + if (deployHash !== null) { + this.addPendingDeploy(ERC20Events.Transfer, deployHash); + return deployHash; + } else { + throw Error("Invalid Deploy"); + } + } + public async transferFrom( + keys: Keys.AsymmetricKey, + owner: RecipientType, + recipient: RecipientType, + amount: string, + paymentAmount: string + ) { + + const runtimeArgs = RuntimeArgs.fromMap({ + owner: utils.createRecipientAddress(owner), + recipient: utils.createRecipientAddress(recipient), + amount: CLValueBuilder.u256(amount) + }); + + + const deployHash = await contractCall({ + chainName: this.chainName, + contractHash: this.contractHash, + entryPoint: "transfer_from", + keys, + nodeAddress: this.nodeAddress, + paymentAmount, + runtimeArgs, + }); + + if (deployHash !== null) { + this.addPendingDeploy(ERC20Events.Transfer, deployHash); + return deployHash; + } else { + throw Error("Invalid Deploy"); + } + } + public async mint( + keys: Keys.AsymmetricKey, + to: RecipientType, + amount: string, + paymentAmount: string + ) { + + const runtimeArgs = RuntimeArgs.fromMap({ + to: utils.createRecipientAddress(to), + amount: CLValueBuilder.u256(amount) + }); + + + const deployHash = await contractCall({ + chainName: this.chainName, + contractHash: this.contractHash, + entryPoint: "mint", + keys, + nodeAddress: this.nodeAddress, + paymentAmount, + runtimeArgs, + }); + + if (deployHash !== null) { + this.addPendingDeploy(ERC20Events.Mint, deployHash); + return deployHash; + } else { + throw Error("Invalid Deploy"); + } + } + public async burn( + keys: Keys.AsymmetricKey, + from: RecipientType, + amount: string, + paymentAmount: string + ) { + + const runtimeArgs = RuntimeArgs.fromMap({ + from: utils.createRecipientAddress(from), + amount: CLValueBuilder.u256(amount) + }); + + + const deployHash = await contractCall({ + chainName: this.chainName, + contractHash: this.contractHash, + entryPoint: "burn", + keys, + nodeAddress: this.nodeAddress, + paymentAmount, + runtimeArgs, + }); + + if (deployHash !== null) { + this.addPendingDeploy(ERC20Events.Burn, deployHash); + return deployHash; + } else { + throw Error("Invalid Deploy"); + } + } + public async permit( + keys: Keys.AsymmetricKey, + publicKey: string, + signature: string, + owner: RecipientType, + spender: RecipientType, + amount: string, + deadline: string, + paymentAmount: string + ) { + + const runtimeArgs = RuntimeArgs.fromMap({ + public: CLValueBuilder.string(publicKey), + signature: CLValueBuilder.string(signature), + owner: utils.createRecipientAddress(owner), + spender: utils.createRecipientAddress(spender), + value: CLValueBuilder.u256(amount), + deadline: CLValueBuilder.u64(deadline) + }); + + + const deployHash = await contractCall({ + chainName: this.chainName, + contractHash: this.contractHash, + entryPoint: "permit", + keys, + nodeAddress: this.nodeAddress, + paymentAmount, + runtimeArgs, + }); + + if (deployHash !== null) { + this.addPendingDeploy(ERC20Events.Permit, deployHash); + return deployHash; + } else { + throw Error("Invalid Deploy"); + } + } + + public onEvent( + eventNames: ERC20Events[], + callback: ( + eventName: ERC20Events, + deployStatus: { + deployHash: string; + success: boolean; + error: string | null; + }, + result: any | null + ) => void + ): any { + if (!this.eventStreamAddress) { + throw Error("Please set eventStreamAddress before!"); + } + if (this.isListening) { + throw Error( + "Only one event listener can be create at a time. Remove the previous one and start new." + ); + } + const es = new EventStream(this.eventStreamAddress); + this.isListening = true; + + es.subscribe(EventName.DeployProcessed, (value: any) => { + const deployHash = value.body.DeployProcessed.deploy_hash; + + const pendingDeploy = this.pendingDeploys.find( + (pending) => pending.deployHash === deployHash + ); + + if (!pendingDeploy) { + return; + } + + if ( + !value.body.DeployProcessed.execution_result.Success && + value.body.DeployProcessed.execution_result.Failure + ) { + callback( + pendingDeploy.deployType, + { + deployHash, + error: + value.body.DeployProcessed.execution_result.Failure.error_message, + success: false, + }, + null + ); + } else { + const { transforms } = + value.body.DeployProcessed.execution_result.Success.effect; + + const ERC20Events = transforms.reduce((acc: any, val: any) => { + if ( + val.transform.hasOwnProperty("WriteCLValue") && + typeof val.transform.WriteCLValue.parsed === "object" && + val.transform.WriteCLValue.parsed !== null + ) { + const maybeCLValue = CLValueParsers.fromJSON( + val.transform.WriteCLValue + ); + const clValue = maybeCLValue.unwrap(); + if (clValue && clValue instanceof CLMap) { + const hash = clValue.get( + CLValueBuilder.string("contract_package_hash") + ); + const event = clValue.get(CLValueBuilder.string("event_type")); + if ( + hash && + hash.value() === this.contractPackageHash && + event && + eventNames.includes(event.value()) + ) { + acc = [...acc, { name: event.value(), clValue }]; + } + } + } + return acc; + }, []); + + ERC20Events.forEach((d: any) => + callback( + d.name, + { deployHash, error: null, success: true }, + d.clValue + ) + ); + } + + this.pendingDeploys = this.pendingDeploys.filter( + (pending) => pending.deployHash !== deployHash + ); + }); + es.start(); + + return { + stopListening: () => { + es.unsubscribe(EventName.DeployProcessed); + es.stop(); + this.isListening = false; + this.pendingDeploys = []; + }, + }; + } + + private addPendingDeploy(deployType: ERC20Events, deployHash: string) { + this.pendingDeploys = [...this.pendingDeploys, { deployHash, deployType }]; + } +} + +interface IInstallParams { + nodeAddress: string; + keys: Keys.AsymmetricKey; + chainName: string; + pathToContract: string; + runtimeArgs: RuntimeArgs; + paymentAmount: string; +} + +const installWasmFile = async ({ + nodeAddress, + keys, + chainName, + pathToContract, + runtimeArgs, + paymentAmount, +}: IInstallParams): Promise => { + const client = new CasperClient(nodeAddress); + + // Set contract installation deploy (unsigned). + let deploy = DeployUtil.makeDeploy( + new DeployUtil.DeployParams( + CLPublicKey.fromHex(keys.publicKey.toHex()), + chainName + ), + DeployUtil.ExecutableDeployItem.newModuleBytes( + utils.getBinary(pathToContract), + runtimeArgs + ), + DeployUtil.standardPayment(paymentAmount) + ); + + // Sign deploy. + deploy = client.signDeploy(deploy, keys); + + // Dispatch deploy to node. + return await client.putDeploy(deploy); +}; + +interface IContractCallParams { + nodeAddress: string; + keys: Keys.AsymmetricKey; + chainName: string; + entryPoint: string; + runtimeArgs: RuntimeArgs; + paymentAmount: string; + contractHash: string; +} + +const contractCall = async ({ + nodeAddress, + keys, + chainName, + contractHash, + entryPoint, + runtimeArgs, + paymentAmount, +}: IContractCallParams) => { + const client = new CasperClient(nodeAddress); + const contractHashAsByteArray = utils.contractHashToByteArray(contractHash); + + let deploy = DeployUtil.makeDeploy( + new DeployUtil.DeployParams(keys.publicKey, chainName), + DeployUtil.ExecutableDeployItem.newStoredContractByHash( + contractHashAsByteArray, + entryPoint, + runtimeArgs + ), + DeployUtil.standardPayment(paymentAmount) + ); + + // Sign deploy. + deploy = client.signDeploy(deploy, keys); + + // Dispatch deploy to node. + const deployHash = await client.putDeploy(deploy); + + return deployHash; +}; + +const contractSimpleGetter = async ( + nodeAddress: string, + contractHash: string, + key: string[] +) => { + const stateRootHash = await utils.getStateRootHash(nodeAddress); + const clValue = await utils.getContractData( + nodeAddress, + stateRootHash, + contractHash, + key + ); + + if (clValue && clValue.CLValue instanceof CLValue) { + return clValue.CLValue!; + } else { + throw Error("Invalid stored value"); + } +}; + +const toCLMap = (map: Map) => { + const clMap = CLValueBuilder.map([ + CLTypeBuilder.string(), + CLTypeBuilder.string(), + ]); + for (const [key, value] of Array.from(map.entries())) { + clMap.set(CLValueBuilder.string(key), CLValueBuilder.string(value)); + } + return clMap; +}; + +const fromCLMap = (map: Map) => { + const jsMap = new Map(); + for (const [key, value] of Array.from(map.entries())) { + jsMap.set(key.value(), value.value()); + } + return jsMap; +}; + +export default ERC20Client; diff --git a/JsClients/ERC20/src/index.ts b/JsClients/ERC20/src/index.ts new file mode 100644 index 00000000..2c10e006 --- /dev/null +++ b/JsClients/ERC20/src/index.ts @@ -0,0 +1,9 @@ +import ERC20Client from "./erc20"; +import * as utils from "./utils"; +import * as constants from "./constants"; + +export { + ERC20Client, + utils, + constants +}; diff --git a/JsClients/ERC20/src/types.d.ts b/JsClients/ERC20/src/types.d.ts new file mode 100644 index 00000000..8f5fd913 --- /dev/null +++ b/JsClients/ERC20/src/types.d.ts @@ -0,0 +1,8 @@ +import { CLAccountHash, CLByteArray, CLPublicKey } from "casper-js-sdk"; + +export type RecipientType = CLPublicKey | CLAccountHash | CLByteArray; + +export interface IPendingDeploy { + deployHash: string; + deployType: ERC20Events; +} diff --git a/JsClients/ERC20/src/utils.ts b/JsClients/ERC20/src/utils.ts new file mode 100644 index 00000000..909a7d64 --- /dev/null +++ b/JsClients/ERC20/src/utils.ts @@ -0,0 +1,125 @@ +import { + CasperServiceByJsonRPC, + CLValue, + CLKey, + CLAccountHash, + Keys, + CLPublicKey, +} from "casper-js-sdk"; +import fs from "fs"; + +import { RecipientType } from "./types"; + +export const camelCased = (myString: string) => + myString.replace(/_([a-z])/g, (g) => g[1].toUpperCase()); + +export const createRecipientAddress = (recipient: RecipientType): CLKey => { + if (recipient instanceof CLPublicKey) { + return new CLKey(new CLAccountHash(recipient.toAccountHash())); + } else { + return new CLKey(recipient); + } +}; + +/** + * Returns an ECC key pair mapped to an NCTL faucet account. + * @param pathToFaucet - Path to NCTL faucet directory. + */ +export const getKeyPairOfContract = (pathToFaucet: string) => + Keys.Ed25519.parseKeyFiles( + `${pathToFaucet}/public_key.pem`, + `${pathToFaucet}/secret_key.pem` + ); + +/** + * Returns a binary as u8 array. + * @param pathToBinary - Path to binary file to be loaded into memory. + * @return Uint8Array Byte array. + */ +export const getBinary = (pathToBinary: string) => { + return new Uint8Array(fs.readFileSync(pathToBinary, null).buffer); +}; + +/** + * Returns global state root hash at current block. + * @param {Object} client - JS SDK client for interacting with a node. + * @return {String} Root hash of global state at most recent block. + */ +export const getStateRootHash = async (nodeAddress: string) => { + const client = new CasperServiceByJsonRPC(nodeAddress); + const { block } = await client.getLatestBlockInfo(); + if (block) { + return block.header.state_root_hash; + } else { + throw Error("Problem when calling getLatestBlockInfo"); + } +}; + +export const getAccountInfo = async ( + nodeAddress: string, + publicKey: CLPublicKey +) => { + const stateRootHash = await getStateRootHash(nodeAddress); + const client = new CasperServiceByJsonRPC(nodeAddress); + const accountHash = publicKey.toAccountHashStr(); + const blockState = await client.getBlockState(stateRootHash, accountHash, []); + return blockState.Account; +}; + +/** + * Returns a value under an on-chain account's storage. + * @param accountInfo - On-chain account's info. + * @param namedKey - A named key associated with an on-chain account. + */ +export const getAccountNamedKeyValue = (accountInfo: any, namedKey: string) => { + const found = accountInfo.namedKeys.find((i: any) => i.name === namedKey); + if (found) { + return found.key; + } + return undefined; +}; + +export const getContractData = async ( + nodeAddress: string, + stateRootHash: string, + contractHash: string, + path: string[] = [] +) => { + const client = new CasperServiceByJsonRPC(nodeAddress); + const blockState = await client.getBlockState( + stateRootHash, + `hash-${contractHash}`, + path + ); + return blockState; +}; + +export const contractDictionaryGetter = async ( + nodeAddress: string, + dictionaryItemKey: string, + seedUref: string, +) => { + const stateRootHash = await getStateRootHash(nodeAddress); + + const client = new CasperServiceByJsonRPC(nodeAddress); + + const storedValue = await client.getDictionaryItemByURef( + stateRootHash, + dictionaryItemKey, + seedUref + ); + + if (storedValue && storedValue.CLValue instanceof CLValue) { + return storedValue.CLValue!; + } else { + throw Error("Invalid stored value"); + } +}; + + +export const contractHashToByteArray = (contractHash: string) => + Uint8Array.from(Buffer.from(contractHash, "hex")); + +export const sleep = (num: number) => { + return new Promise((resolve) => setTimeout(resolve, num)); +}; diff --git a/JsClients/ERC20/test/install.ts b/JsClients/ERC20/test/install.ts new file mode 100644 index 00000000..afc75674 --- /dev/null +++ b/JsClients/ERC20/test/install.ts @@ -0,0 +1,67 @@ +import { config } from "dotenv"; +config(); +import { ERC20Client, utils, constants } from "../src"; +import { parseTokenMeta, sleep, getDeploy } from "./utils"; + +import { + Keys, +} from "casper-js-sdk"; + +const { + NODE_ADDRESS, + EVENT_STREAM_ADDRESS, + CHAIN_NAME, + WASM_PATH, + MASTER_KEY_PAIR_PATH, + INSTALL_PAYMENT_AMOUNT, + CONTRACT_NAME, + TOKEN_NAME, + TOKEN_SYMBOL, + DECIMALS, + TOTAL_SUPPLY +} = process.env; + +const KEYS = Keys.Ed25519.parseKeyFiles( + `${MASTER_KEY_PAIR_PATH}/public_key.pem`, + `${MASTER_KEY_PAIR_PATH}/secret_key.pem` +); + +const test = async () => { + const erc20 = new ERC20Client( + NODE_ADDRESS!, + CHAIN_NAME!, + EVENT_STREAM_ADDRESS! + ); + + const installDeployHash = await erc20.install( + KEYS, + TOKEN_NAME!, + TOKEN_SYMBOL!, + DECIMALS!, + TOTAL_SUPPLY!, + CONTRACT_NAME!, + INSTALL_PAYMENT_AMOUNT!, + WASM_PATH! + ); + + console.log(`... Contract installation deployHash: ${installDeployHash}`); + + await getDeploy(NODE_ADDRESS!, installDeployHash); + + console.log(`... Contract installed successfully.`); + + let accountInfo = await utils.getAccountInfo(NODE_ADDRESS!, KEYS.publicKey); + + console.log(`... Account Info: `); + console.log(JSON.stringify(accountInfo, null, 2)); + + const contractHash = await utils.getAccountNamedKeyValue( + accountInfo, + `${CONTRACT_NAME!}_contract_hash` + ); + + console.log(`... Contract Hash: ${contractHash}`); + +}; + +test(); diff --git a/JsClients/ERC20/test/installed.ts b/JsClients/ERC20/test/installed.ts new file mode 100644 index 00000000..c6db90d4 --- /dev/null +++ b/JsClients/ERC20/test/installed.ts @@ -0,0 +1,181 @@ +import { config } from "dotenv"; +config(); +import { ERC20Client, utils, constants } from "../src"; +import { sleep, getDeploy } from "./utils"; + +import { + CLValueBuilder, + Keys, + CLPublicKey, + CLAccountHash, + CLPublicKeyType, +} from "casper-js-sdk"; + +const { ERC20Events } = constants; + +const { + NODE_ADDRESS, + EVENT_STREAM_ADDRESS, + CHAIN_NAME, + WASM_PATH, + MASTER_KEY_PAIR_PATH, + RECEIVER_ACCOUNT_ONE, + INSTALL_PAYMENT_AMOUNT, + CONTRACT_NAME, + MINT_PAYMENT_AMOUNT, + MINT_AMOUNT, + BURN_PAYMENT_AMOUNT, + BURN_AMOUNT, + APPROVE_PAYMENT_AMOUNT, + APPROVE_AMOUNT, + TRANSFER_PAYMENT_AMOUNT, + TRANSFER_AMOUNT, + TRANSFER_FROM_PAYMENT_AMOUNT, + TRANSFER_FROM_AMOUNT +} = process.env; + + +const KEYS = Keys.Ed25519.parseKeyFiles( + `${MASTER_KEY_PAIR_PATH}/public_key.pem`, + `${MASTER_KEY_PAIR_PATH}/secret_key.pem` +); + +const test = async () => { + const erc20 = new ERC20Client( + NODE_ADDRESS!, + CHAIN_NAME!, + EVENT_STREAM_ADDRESS! + ); + + const listener = erc20.onEvent( + [ + ERC20Events.Approve, + ERC20Events.Transfer, + ERC20Events.TransferFrom, + ERC20Events.Mint, + ], + (eventName, deploy, result) => { + if (deploy.success) { + console.log(`Successfull deploy of: ${eventName}, deployHash: ${deploy.deployHash}`); + console.log(result.value()); + } else { + console.log(`Failed deploy of ${eventName}, deployHash: ${deploy.deployHash}`); + console.log(`Error: ${deploy.error}`); + } + } + ); + + await sleep(5 * 1000); + + let accountInfo = await utils.getAccountInfo(NODE_ADDRESS!, KEYS.publicKey); + + console.log(`... Account Info: `); + console.log(JSON.stringify(accountInfo, null, 2)); + + const contractHash = await utils.getAccountNamedKeyValue( + accountInfo, + `${CONTRACT_NAME!}_contract_hash` + ); + + console.log(`... Contract Hash: ${contractHash}`); + + // We don't need hash- prefix so i'm removing it + await erc20.setContractHash(contractHash.slice(5)); + + //name + const name = await erc20.name(); + console.log(`... Contract name: ${name}`); + + //symbol + const symbol = await erc20.symbol(); + console.log(`... Contract symbol: ${symbol}`); + + //decimal + // const decimal = await erc20.decimal(); + // console.log(`... Contract decimal: ${decimal}`); + + //totalsupply + let totalSupply = await erc20.totalSupply(); + console.log(`... Total supply: ${totalSupply}`); + + // //balanceof + let balance = await erc20.balanceOf(KEYS.publicKey); + // console.log(`... Balance of account ${KEYS.publicKey.toAccountHashStr()}`); + console.log(`... Balance: ${balance}`); + + //balanceof + let nonce = await erc20.nonce(KEYS.publicKey); + console.log(`... Nonce: ${nonce}`); + + // //allowance + // let allowance = await erc20.allowance(KEYS.publicKey,KEYS.publicKey); + // console.log(`... Allowance: ${allowance}`); + + //mint + const mintDeployHash = await erc20.mint( + KEYS, + KEYS.publicKey, + MINT_AMOUNT!, + MINT_PAYMENT_AMOUNT! + ); + console.log("... Mint deploy hash: ", mintDeployHash); + + await getDeploy(NODE_ADDRESS!, mintDeployHash); + console.log("... Token minted successfully"); + + //burn + const burnDeployHash = await erc20.burn( + KEYS, + KEYS.publicKey, + BURN_AMOUNT!, + BURN_PAYMENT_AMOUNT! + ); + console.log("... Burn deploy hash: ", burnDeployHash); + + await getDeploy(NODE_ADDRESS!, burnDeployHash); + console.log("... Token burned successfully"); + + //totalsupply + totalSupply = await erc20.totalSupply(); + console.log(`... Total supply: ${totalSupply}`); + + //approve + const approveDeployHash = await erc20.approve( + KEYS, + KEYS.publicKey, + APPROVE_AMOUNT!, + APPROVE_PAYMENT_AMOUNT! + ); + console.log("... Approve deploy hash: ", approveDeployHash); + + await getDeploy(NODE_ADDRESS!, approveDeployHash); + console.log("... Token approved successfully"); + + //transfer + const transferDeployHash = await erc20.transfer( + KEYS, + KEYS.publicKey, + TRANSFER_AMOUNT!, + TRANSFER_PAYMENT_AMOUNT! + ); + console.log("... Transfer deploy hash: ", transferDeployHash); + + await getDeploy(NODE_ADDRESS!, transferDeployHash); + console.log("... Token transfer successfully"); + + //transfer_from + const transferfromDeployHash = await erc20.transferFrom( + KEYS, + KEYS.publicKey, + KEYS.publicKey, + TRANSFER_FROM_AMOUNT!, + TRANSFER_FROM_PAYMENT_AMOUNT! + ); + console.log("... TransferFrom deploy hash: ", transferfromDeployHash); + + await getDeploy(NODE_ADDRESS!, transferfromDeployHash); + console.log("... Token transfer successfully"); + +}; + +test(); diff --git a/JsClients/ERC20/test/utils.ts b/JsClients/ERC20/test/utils.ts new file mode 100644 index 00000000..d258b38a --- /dev/null +++ b/JsClients/ERC20/test/utils.ts @@ -0,0 +1,32 @@ +import { CasperClient } from "casper-js-sdk"; + +export const parseTokenMeta = (str: string): Array<[string, string]> => str.split(",").map(s => { + const map = s.split(" "); + return [map[0], map[1]] +}); + +export const sleep = (ms: number) => { + return new Promise(resolve => setTimeout(resolve, ms)); +} + +export const getDeploy = async (NODE_URL: string, deployHash: string) => { + const client = new CasperClient(NODE_URL); + let i = 300; + while (i != 0) { + const [deploy, raw] = await client.getDeploy(deployHash); + if (raw.execution_results.length !== 0){ + // @ts-ignore + if (raw.execution_results[0].result.Success) { + return deploy; + } else { + // @ts-ignore + throw Error("Contract execution: " + raw.execution_results[0].result.Failure.error_message); + } + } else { + i--; + await sleep(1000); + continue; + } + } + throw Error('Timeout after ' + i + 's. Something\'s wrong'); +} diff --git a/JsClients/ERC20/wasm/erc20-token.wasm b/JsClients/ERC20/wasm/erc20-token.wasm new file mode 100644 index 00000000..1ed4deda Binary files /dev/null and b/JsClients/ERC20/wasm/erc20-token.wasm differ diff --git a/JsClients/FACTORY/.env b/JsClients/FACTORY/.env new file mode 100644 index 00000000..985be420 --- /dev/null +++ b/JsClients/FACTORY/.env @@ -0,0 +1,18 @@ +CHAIN_NAME=casper-test +NODE_ADDRESS=http://144.76.97.151:7777/rpc +EVENT_STREAM_ADDRESS=http://144.76.97.151:7777/events/main +WASM_PATH=./wasm/factory.wasm +MASTER_KEY_PAIR_PATH=keys/ +RECEIVER_ACCOUNT_ONE=017e82abcc9539a01cfd9d63ae8c9c8b3a752a6f75ba1ab148714eea03e9be69a7 + +CONTRACT_NAME=Factory + +INSTALL_PAYMENT_AMOUNT=220000000000 + +SET_FEE_TO_PAYMENT_AMOUNT=20000000000 +SET_FEE_TO_SETTER_PAYMENT_AMOUNT=20000000000 +CREATE_PAIR_PAYMENT_AMOUNT=20000000000 + +PAIR_CONTRACT=11f6e1b2d9566ab6d796f026b1d4bd36b71664c4ee8805fbc9cdca406607cd59 +TOKEN0_CONTRACT=51254d70d183f4b1e59ee5d5b0c76d3c3a81d0366278beecc05b546d49a9835c +TOKEN1_CONTRACT=96b0431770a34f5b651a43c830f3c8537e7c44f2cb8191d7efbcca2379785cda diff --git a/JsClients/FACTORY/src/constants.ts b/JsClients/FACTORY/src/constants.ts new file mode 100644 index 00000000..55a1156d --- /dev/null +++ b/JsClients/FACTORY/src/constants.ts @@ -0,0 +1,5 @@ +export enum FACTORYEvents { + SetFeeTo = "factory_set_fee_to", + SetFeeToSetter = "factory_set_fee_to_setter", + CreatePair = "factory_create_pair" +} diff --git a/JsClients/FACTORY/src/factory.ts b/JsClients/FACTORY/src/factory.ts new file mode 100644 index 00000000..31679690 --- /dev/null +++ b/JsClients/FACTORY/src/factory.ts @@ -0,0 +1,439 @@ +import { + CasperClient, + CLPublicKey, + CLAccountHash, + CLByteArray, + CLKey, + CLString, + CLTypeBuilder, + CLValue, + CLValueBuilder, + CLValueParsers, + CLMap, + DeployUtil, + EventName, + EventStream, + Keys, + RuntimeArgs, +} from "casper-js-sdk"; +import { FACTORYEvents } from "./constants"; +import * as utils from "./utils"; +import { RecipientType, IPendingDeploy } from "./types"; + +class FACTORYClient { + private contractHash: string; + private contractPackageHash: string; + + private isListening = false; + private pendingDeploys: IPendingDeploy[] = []; + + constructor( + private nodeAddress: string, + private chainName: string, + private eventStreamAddress?: string + ) { } + + public async install( + keys: Keys.AsymmetricKey, + contractName: string, + // feeTo: RecipientType, + feeToSetter: RecipientType, + paymentAmount: string, + wasmPath: string + ) { + const runtimeArgs = RuntimeArgs.fromMap({ + contract_name: CLValueBuilder.string(contractName), + // fee_to: utils.createRecipientAddress(feeTo), + fee_to_setter: utils.createRecipientAddress(feeToSetter), + + }); + + const deployHash = await installWasmFile({ + chainName: this.chainName, + paymentAmount, + nodeAddress: this.nodeAddress, + keys, + pathToContract: wasmPath, + runtimeArgs, + }); + + if (deployHash !== null) { + return deployHash; + } else { + throw Error("Problem with installation"); + } + } + + public async setContractHash(hash: string) { + const stateRootHash = await utils.getStateRootHash(this.nodeAddress); + const contractData = await utils.getContractData( + this.nodeAddress, + stateRootHash, + hash + ); + + const { contractPackageHash, namedKeys } = contractData.Contract!; + this.contractHash = hash; + this.contractPackageHash = contractPackageHash.replace( + "contract-package-wasm", + "" + ); + + } + + public async feeTo() { + const result = await contractSimpleGetter( + this.nodeAddress, + this.contractHash, + ["fee_to"] + ); + return result.value().toString(); + } + + public async feeToSetter() { + const result = await contractSimpleGetter( + this.nodeAddress, + this.contractHash, + ["fee_to_setter"] + ); + return result.value().toString(); + } + + public async allPairs() { + const result = await contractSimpleGetter( + this.nodeAddress, + this.contractHash, + ["all_pairs"] + ); + return result.value(); + } + + public async allPairsLength() { + const result = await contractSimpleGetter( + this.nodeAddress, + this.contractHash, + ["all_pairs_length"] + ); + return result.value(); + } + + public async getPair(tokenA: String, tokenB: String) { + + const tokenAContractHash = new CLByteArray(Uint8Array.from(Buffer.from(tokenA, 'hex'))); + const tokenBContractHash = new CLByteArray(Uint8Array.from(Buffer.from(tokenB, 'hex'))); + + const ContractHash: string = `${tokenAContractHash}_${tokenBContractHash}`; + + const result = await utils.contractDictionaryGetter( + this.nodeAddress, + ContractHash, + "get_pair" + ); + const maybeValue = result.value().unwrap(); + return maybeValue.value().toString(); + } + + public async setFeeTo( + keys: Keys.AsymmetricKey, + feeTo: RecipientType, + paymentAmount: string + ) { + + const runtimeArgs = RuntimeArgs.fromMap({ + fee_to: utils.createRecipientAddress(feeTo), + }); + + const deployHash = await contractCall({ + chainName: this.chainName, + contractHash: this.contractHash, + entryPoint: "set_fee_to", + paymentAmount, + nodeAddress: this.nodeAddress, + keys: keys, + runtimeArgs, + }); + + if (deployHash !== null) { + this.addPendingDeploy(FACTORYEvents.SetFeeTo, deployHash); + return deployHash; + } else { + throw Error("Invalid Deploy"); + } + } + public async setFeeToSetter( + keys: Keys.AsymmetricKey, + feeToSetter: RecipientType, + paymentAmount: string + ) { + + const runtimeArgs = RuntimeArgs.fromMap({ + fee_to_setter: utils.createRecipientAddress(feeToSetter), + }); + + const deployHash = await contractCall({ + chainName: this.chainName, + contractHash: this.contractHash, + entryPoint: "set_fee_to_setter", + paymentAmount, + nodeAddress: this.nodeAddress, + keys: keys, + runtimeArgs, + }); + + if (deployHash !== null) { + this.addPendingDeploy(FACTORYEvents.SetFeeToSetter, deployHash); + return deployHash; + } else { + throw Error("Invalid Deploy"); + } + } + + public async createPair( + keys: Keys.AsymmetricKey, + tokenA: String, + tokenB: String, + pairContract: String, + paymentAmount: string + ) { + const tokenAContractHash = new CLByteArray(Uint8Array.from(Buffer.from(tokenA, 'hex'))); + const tokenBContractHash = new CLByteArray(Uint8Array.from(Buffer.from(tokenB, 'hex'))); + const pairContractHash = new CLByteArray(Uint8Array.from(Buffer.from(pairContract, 'hex'))); + + + const runtimeArgs = RuntimeArgs.fromMap({ + token_a: CLValueBuilder.key(tokenAContractHash), + token_b: CLValueBuilder.key(tokenBContractHash), + pair_hash: CLValueBuilder.key(pairContractHash), + }); + + const deployHash = await contractCall({ + chainName: this.chainName, + contractHash: this.contractHash, + entryPoint: "create_pair", + paymentAmount, + nodeAddress: this.nodeAddress, + keys: keys, + runtimeArgs, + }); + + if (deployHash !== null) { + this.addPendingDeploy(FACTORYEvents.CreatePair, deployHash); + return deployHash; + } else { + throw Error("Invalid Deploy"); + } + } + + public onEvent( + eventNames: FACTORYEvents[], + callback: ( + eventName: FACTORYEvents, + deployStatus: { + deployHash: string; + success: boolean; + error: string | null; + }, + result: any | null + ) => void + ): any { + if (!this.eventStreamAddress) { + throw Error("Please set eventStreamAddress before!"); + } + if (this.isListening) { + throw Error( + "Only one event listener can be create at a time. Remove the previous one and start new." + ); + } + const es = new EventStream(this.eventStreamAddress); + this.isListening = true; + + es.subscribe(EventName.DeployProcessed, (value: any) => { + const deployHash = value.body.DeployProcessed.deploy_hash; + + const pendingDeploy = this.pendingDeploys.find( + (pending) => pending.deployHash === deployHash + ); + + if (!pendingDeploy) { + return; + } + + if ( + !value.body.DeployProcessed.execution_result.Success && + value.body.DeployProcessed.execution_result.Failure + ) { + callback( + pendingDeploy.deployType, + { + deployHash, + error: + value.body.DeployProcessed.execution_result.Failure.error_message, + success: false, + }, + null + ); + } else { + const { transforms } = + value.body.DeployProcessed.execution_result.Success.effect; + + const factoryEvents = transforms.reduce((acc: any, val: any) => { + if ( + val.transform.hasOwnProperty("WriteCLValue") && + typeof val.transform.WriteCLValue.parsed === "object" && + val.transform.WriteCLValue.parsed !== null + ) { + const maybeCLValue = CLValueParsers.fromJSON( + val.transform.WriteCLValue + ); + const clValue = maybeCLValue.unwrap(); + if (clValue && clValue instanceof CLMap) { + const hash = clValue.get( + CLValueBuilder.string("contract_package_hash") + ); + const event = clValue.get(CLValueBuilder.string("event_type")); + if ( + hash && + hash.value() === this.contractPackageHash && + event && + eventNames.includes(event.value()) + ) { + acc = [...acc, { name: event.value(), clValue }]; + } + } + } + return acc; + }, []); + + factoryEvents.forEach((d: any) => + callback( + d.name, + { deployHash, error: null, success: true }, + d.clValue + ) + ); + } + + this.pendingDeploys = this.pendingDeploys.filter( + (pending) => pending.deployHash !== deployHash + ); + }); + es.start(); + + return { + stopListening: () => { + es.unsubscribe(EventName.DeployProcessed); + es.stop(); + this.isListening = false; + this.pendingDeploys = []; + }, + }; + } + + private addPendingDeploy(deployType: FACTORYEvents, deployHash: string) { + this.pendingDeploys = [...this.pendingDeploys, { deployHash, deployType }]; + } +} + +interface IInstallParams { + nodeAddress: string; + keys: Keys.AsymmetricKey; + chainName: string; + pathToContract: string; + runtimeArgs: RuntimeArgs; + paymentAmount: string; +} + +const installWasmFile = async ({ + nodeAddress, + keys, + chainName, + pathToContract, + runtimeArgs, + paymentAmount, +}: IInstallParams): Promise => { + const client = new CasperClient(nodeAddress); + + // Set contract installation deploy (unsigned). + let deploy = DeployUtil.makeDeploy( + new DeployUtil.DeployParams( + CLPublicKey.fromHex(keys.publicKey.toHex()), + chainName + ), + DeployUtil.ExecutableDeployItem.newModuleBytes( + utils.getBinary(pathToContract), + runtimeArgs + ), + DeployUtil.standardPayment(paymentAmount) + ); + + // Sign deploy. + deploy = client.signDeploy(deploy, keys); + + // Dispatch deploy to node. + return await client.putDeploy(deploy); +}; + +interface IContractCallParams { + nodeAddress: string; + keys: Keys.AsymmetricKey; + chainName: string; + entryPoint: string; + runtimeArgs: RuntimeArgs; + paymentAmount: string; + contractHash: string; +} + +const contractCall = async ({ + nodeAddress, + keys, + chainName, + contractHash, + entryPoint, + runtimeArgs, + paymentAmount, +}: IContractCallParams) => { + const client = new CasperClient(nodeAddress); + const contractHashAsByteArray = utils.contractHashToByteArray(contractHash); + + let deploy = DeployUtil.makeDeploy( + new DeployUtil.DeployParams(keys.publicKey, chainName), + DeployUtil.ExecutableDeployItem.newStoredContractByHash( + contractHashAsByteArray, + entryPoint, + runtimeArgs + ), + DeployUtil.standardPayment(paymentAmount) + ); + + // Sign deploy. + deploy = client.signDeploy(deploy, keys); + + // Dispatch deploy to node. + const deployHash = await client.putDeploy(deploy); + + return deployHash; +}; + +const contractSimpleGetter = async ( + nodeAddress: string, + contractHash: string, + key: string[] +) => { + const stateRootHash = await utils.getStateRootHash(nodeAddress); + const clValue = await utils.getContractData( + nodeAddress, + stateRootHash, + contractHash, + key + ); + + if (clValue && clValue.CLValue instanceof CLValue) { + return clValue.CLValue!; + } else { + throw Error("Invalid stored value"); + } +}; + + + +export default FACTORYClient; diff --git a/JsClients/FACTORY/src/index.ts b/JsClients/FACTORY/src/index.ts new file mode 100644 index 00000000..68c565dd --- /dev/null +++ b/JsClients/FACTORY/src/index.ts @@ -0,0 +1,9 @@ +import FACTORYClient from "./factory"; +import * as utils from "./utils"; +import * as constants from "./constants"; + +export { + FACTORYClient, + utils, + constants +}; diff --git a/JsClients/FACTORY/src/types.d.ts b/JsClients/FACTORY/src/types.d.ts new file mode 100644 index 00000000..2e4ae4e1 --- /dev/null +++ b/JsClients/FACTORY/src/types.d.ts @@ -0,0 +1,8 @@ +import { CLAccountHash, CLByteArray, CLPublicKey } from "casper-js-sdk"; + +export type RecipientType = CLPublicKey | CLAccountHash | CLByteArray; + +export interface IPendingDeploy { + deployHash: string; + deployType: FACTORYEvents; +} diff --git a/JsClients/FACTORY/src/utils.ts b/JsClients/FACTORY/src/utils.ts new file mode 100644 index 00000000..909a7d64 --- /dev/null +++ b/JsClients/FACTORY/src/utils.ts @@ -0,0 +1,125 @@ +import { + CasperServiceByJsonRPC, + CLValue, + CLKey, + CLAccountHash, + Keys, + CLPublicKey, +} from "casper-js-sdk"; +import fs from "fs"; + +import { RecipientType } from "./types"; + +export const camelCased = (myString: string) => + myString.replace(/_([a-z])/g, (g) => g[1].toUpperCase()); + +export const createRecipientAddress = (recipient: RecipientType): CLKey => { + if (recipient instanceof CLPublicKey) { + return new CLKey(new CLAccountHash(recipient.toAccountHash())); + } else { + return new CLKey(recipient); + } +}; + +/** + * Returns an ECC key pair mapped to an NCTL faucet account. + * @param pathToFaucet - Path to NCTL faucet directory. + */ +export const getKeyPairOfContract = (pathToFaucet: string) => + Keys.Ed25519.parseKeyFiles( + `${pathToFaucet}/public_key.pem`, + `${pathToFaucet}/secret_key.pem` + ); + +/** + * Returns a binary as u8 array. + * @param pathToBinary - Path to binary file to be loaded into memory. + * @return Uint8Array Byte array. + */ +export const getBinary = (pathToBinary: string) => { + return new Uint8Array(fs.readFileSync(pathToBinary, null).buffer); +}; + +/** + * Returns global state root hash at current block. + * @param {Object} client - JS SDK client for interacting with a node. + * @return {String} Root hash of global state at most recent block. + */ +export const getStateRootHash = async (nodeAddress: string) => { + const client = new CasperServiceByJsonRPC(nodeAddress); + const { block } = await client.getLatestBlockInfo(); + if (block) { + return block.header.state_root_hash; + } else { + throw Error("Problem when calling getLatestBlockInfo"); + } +}; + +export const getAccountInfo = async ( + nodeAddress: string, + publicKey: CLPublicKey +) => { + const stateRootHash = await getStateRootHash(nodeAddress); + const client = new CasperServiceByJsonRPC(nodeAddress); + const accountHash = publicKey.toAccountHashStr(); + const blockState = await client.getBlockState(stateRootHash, accountHash, []); + return blockState.Account; +}; + +/** + * Returns a value under an on-chain account's storage. + * @param accountInfo - On-chain account's info. + * @param namedKey - A named key associated with an on-chain account. + */ +export const getAccountNamedKeyValue = (accountInfo: any, namedKey: string) => { + const found = accountInfo.namedKeys.find((i: any) => i.name === namedKey); + if (found) { + return found.key; + } + return undefined; +}; + +export const getContractData = async ( + nodeAddress: string, + stateRootHash: string, + contractHash: string, + path: string[] = [] +) => { + const client = new CasperServiceByJsonRPC(nodeAddress); + const blockState = await client.getBlockState( + stateRootHash, + `hash-${contractHash}`, + path + ); + return blockState; +}; + +export const contractDictionaryGetter = async ( + nodeAddress: string, + dictionaryItemKey: string, + seedUref: string, +) => { + const stateRootHash = await getStateRootHash(nodeAddress); + + const client = new CasperServiceByJsonRPC(nodeAddress); + + const storedValue = await client.getDictionaryItemByURef( + stateRootHash, + dictionaryItemKey, + seedUref + ); + + if (storedValue && storedValue.CLValue instanceof CLValue) { + return storedValue.CLValue!; + } else { + throw Error("Invalid stored value"); + } +}; + + +export const contractHashToByteArray = (contractHash: string) => + Uint8Array.from(Buffer.from(contractHash, "hex")); + +export const sleep = (num: number) => { + return new Promise((resolve) => setTimeout(resolve, num)); +}; diff --git a/JsClients/FACTORY/test/install.ts b/JsClients/FACTORY/test/install.ts new file mode 100644 index 00000000..a88c52bf --- /dev/null +++ b/JsClients/FACTORY/test/install.ts @@ -0,0 +1,64 @@ +import { config } from "dotenv"; +config(); +import { FACTORYClient, utils, constants } from "../src"; +import { parseTokenMeta, sleep, getDeploy } from "./utils"; + +import { + Keys, +} from "casper-js-sdk"; + +const { + NODE_ADDRESS, + EVENT_STREAM_ADDRESS, + CHAIN_NAME, + WASM_PATH, + MASTER_KEY_PAIR_PATH, + TOKEN_NAME, + TOKEN_SYMBOL, + CONTRACT_HASH, + INSTALL_PAYMENT_AMOUNT, + CONTRACT_NAME +} = process.env; + +const KEYS = Keys.Ed25519.parseKeyFiles( + `${MASTER_KEY_PAIR_PATH}/public_key.pem`, + `${MASTER_KEY_PAIR_PATH}/secret_key.pem` +); + +const test = async () => { + const factory = new FACTORYClient( + NODE_ADDRESS!, + CHAIN_NAME!, + EVENT_STREAM_ADDRESS! + ); + + const installDeployHash = await factory.install( + KEYS, + CONTRACT_NAME!, + KEYS.publicKey!, + // KEYS.publicKey, + INSTALL_PAYMENT_AMOUNT!, + WASM_PATH! + ); + + console.log(`... Contract installation deployHash: ${installDeployHash}`); + + await getDeploy(NODE_ADDRESS!, installDeployHash); + + console.log(`... Contract installed successfully.`); + + let accountInfo = await utils.getAccountInfo(NODE_ADDRESS!, KEYS.publicKey); + + console.log(`... Account Info: `); + console.log(JSON.stringify(accountInfo, null, 2)); + + const contractHash = await utils.getAccountNamedKeyValue( + accountInfo, + `${CONTRACT_NAME!}_contract_hash` + + ); + + console.log(`... Contract Hash: ${contractHash}`); +}; + +test(); diff --git a/JsClients/FACTORY/test/installed.ts b/JsClients/FACTORY/test/installed.ts new file mode 100644 index 00000000..136457bf --- /dev/null +++ b/JsClients/FACTORY/test/installed.ts @@ -0,0 +1,146 @@ +import { config } from "dotenv"; +config(); +import { FACTORYClient, utils, constants } from "../src"; +import { parseTokenMeta, sleep, getDeploy } from "./utils"; + +import { + CLValueBuilder, + Keys, + CLPublicKey, + CLAccountHash, + CLPublicKeyType, +} from "casper-js-sdk"; + +const { FACTORYEvents } = constants; + +const { + NODE_ADDRESS, + EVENT_STREAM_ADDRESS, + CHAIN_NAME, + WASM_PATH, + MASTER_KEY_PAIR_PATH, + RECEIVER_ACCOUNT_ONE, + INSTALL_PAYMENT_AMOUNT, + SET_FEE_TO_PAYMENT_AMOUNT, + SET_FEE_TO_SETTER_PAYMENT_AMOUNT, + CREATE_PAIR_PAYMENT_AMOUNT, + CONTRACT_NAME, + TOKEN0_CONTRACT, + TOKEN1_CONTRACT, + PAIR_CONTRACT, +} = process.env; + +const KEYS = Keys.Ed25519.parseKeyFiles( + `${MASTER_KEY_PAIR_PATH}/public_key.pem`, + `${MASTER_KEY_PAIR_PATH}/secret_key.pem` +); + +const test = async () => { + const factory = new FACTORYClient( + NODE_ADDRESS!, + CHAIN_NAME!, + EVENT_STREAM_ADDRESS! + ); + + const listener = factory.onEvent( + [ + FACTORYEvents.SetFeeTo, + FACTORYEvents.SetFeeToSetter, + FACTORYEvents.CreatePair + ], + (eventName, deploy, result) => { + if (deploy.success) { + console.log(`Successfull deploy of: ${eventName}, deployHash: ${deploy.deployHash}`); + console.log(result.value()); + } else { + console.log(`Failed deploy of ${eventName}, deployHash: ${deploy.deployHash}`); + console.log(`Error: ${deploy.error}`); + } + } + ); + + await sleep(5 * 1000); + + let accountInfo = await utils.getAccountInfo(NODE_ADDRESS!, KEYS.publicKey); + + console.log(`... Account Info: `); + console.log(JSON.stringify(accountInfo, null, 2)); + + const contractHash = await utils.getAccountNamedKeyValue( + accountInfo, + `${CONTRACT_NAME!}_contract_hash` + ); + + console.log(`... Contract Hash: ${contractHash}`); + + // We don't need hash- prefix so i'm removing it + await factory.setContractHash(contractHash.slice(5)); + + + //feetosetter + const feetosetter = await factory.feeToSetter(); + console.log(`... Contract feetosetter: ${feetosetter.toString()}`); + + //allpairs + const allpairs = await factory.allPairs(); + console.log(`... Contract allpairs: ${allpairs}`); + + //createpair + const createpairDeployHash = await factory.createPair( + KEYS, + TOKEN0_CONTRACT!, + TOKEN1_CONTRACT!, + PAIR_CONTRACT!, + CREATE_PAIR_PAYMENT_AMOUNT! + ); + console.log("... CreatePair deploy hash: ", createpairDeployHash); + + await getDeploy(NODE_ADDRESS!, createpairDeployHash); + console.log("... Pair created successfully"); + + + //allpairs + const allPairs = await factory.allPairs(); + console.log(`... Contract allpairs: ${allPairs}`); + // //allpairslength + const allpairslength = await factory.allPairsLength(); + console.log(`... Contract allpairslength: ${allpairslength}`); + + //pair + let pair = await factory.getPair(TOKEN0_CONTRACT!, TOKEN1_CONTRACT!); + console.log(`... Pair: ${pair}`); + + //setfeeto + const setfeetoDeployHash = await factory.setFeeTo( + KEYS, + KEYS.publicKey, + SET_FEE_TO_PAYMENT_AMOUNT! + ); + console.log("... Setfeeto deploy hash: ", setfeetoDeployHash); + + await getDeploy(NODE_ADDRESS!, setfeetoDeployHash); + console.log("... Setfeeto functionality successfull"); + + + // feeto + const feeto = await factory.feeTo(); + console.log(`... Contract feeto: ${feeto.toString()}`); + + //setfeetosetter + const setfeetosetterDeployHash = await factory.setFeeToSetter( + KEYS, + KEYS.publicKey, + SET_FEE_TO_SETTER_PAYMENT_AMOUNT! + ); + console.log("... SetfeetosetterDeployHash deploy hash: ", setfeetosetterDeployHash); + + await getDeploy(NODE_ADDRESS!, setfeetosetterDeployHash); + console.log("... SetfeetoSetter functionality successfull"); + + //feetosetter + const feeTosSetter = await factory.feeToSetter(); + console.log(`... Contract feetosetter: ${feeTosSetter.toString()}`); + +}; + +test(); diff --git a/JsClients/FACTORY/test/utils.ts b/JsClients/FACTORY/test/utils.ts new file mode 100644 index 00000000..28564dd8 --- /dev/null +++ b/JsClients/FACTORY/test/utils.ts @@ -0,0 +1,34 @@ +import { CasperClient } from "casper-js-sdk"; + +export const parseTokenMeta = (str: string): Array<[string, string]> => str.split(",").map(s => { + const map = s.split(" "); + return [map[0], map[1]] +}); + +export const sleep = (ms: number) => { + return new Promise(resolve => setTimeout(resolve, ms)); +} + +export const getDeploy = async (NODE_URL: string, deployHash: string) => { + const client = new CasperClient(NODE_URL); + let i = 300; + while (i != 0) { + console.log("i :", i); + + const [deploy, raw] = await client.getDeploy(deployHash); + if (raw.execution_results.length !== 0) { + // @ts-ignore + if (raw.execution_results[0].result.Success) { + return deploy; + } else { + // @ts-ignore + throw Error("Contract execution: " + raw.execution_results[0].result.Failure.error_message); + } + } else { + i--; + await sleep(1000); + continue; + } + } + throw Error('Timeout after ' + i + 's. Something\'s wrong'); +} diff --git a/JsClients/FACTORY/wasm/factory.wasm b/JsClients/FACTORY/wasm/factory.wasm new file mode 100644 index 00000000..9a987e8f Binary files /dev/null and b/JsClients/FACTORY/wasm/factory.wasm differ diff --git a/JsClients/PAIR/.env b/JsClients/PAIR/.env new file mode 100644 index 00000000..492d1afb --- /dev/null +++ b/JsClients/PAIR/.env @@ -0,0 +1,42 @@ +CHAIN_NAME=casper-test +NODE_ADDRESS=http://144.76.97.151:7777/rpc +EVENT_STREAM_ADDRESS=http://144.76.97.151:7777/events/main +WASM_PATH=./wasm/pair-token.wasm +MASTER_KEY_PAIR_PATH=keys/ +RECEIVER_ACCOUNT_ONE=017e82abcc9539a01cfd9d63ae8c9c8b3a752a6f75ba1ab148714eea03e9be69a7 + +CONTRACT_NAME=pair +TOKEN_NAME=PAIR +TOKEN_SYMBOL=pair +DECIMALS=18 +TOTAL_SUPPLY=1000 + +INSTALL_PAYMENT_AMOUNT=220000000000 + +MINT_PAYMENT_AMOUNT=70000000000 + +BURN_PAYMENT_AMOUNT=70000000000 + +APPROVE_PAYMENT_AMOUNT=7000000000 +APPROVE_AMOUNT=50 + +TRANSFER_PAYMENT_AMOUNT=7000000000 +TRANSFER_AMOUNT=5 + +TRANSFER_FROM_PAYMENT_AMOUNT=7000000000 +TRANSFER_FROM_AMOUNT=5 + +SKIM_PAYMENT_AMOUNT=70000000000 + +SYNC_PAYMENT_AMOUNT=70000000000 + +SWAP_PAYMENT_AMOUNT=70000000000 + +INITIALIZE_PAYMENT_AMOUNT=70000000000 + +SET_TREASURY_FEE_PERCENT_PAYMENT_AMOUNT=70000000000 + +FACTORY_CONTRACT=c9d0268ecea8c57ed456bf56e4fba4bf285a4588fd817832230b8fd86b71c30f +CALLEE_CONTRACT=fbfeda8b97f056f526f20c2fc2b486d9bdbfb3e46b9a164527e57c0c86e68612 +TOKEN0_CONTRACT=51254d70d183f4b1e59ee5d5b0c76d3c3a81d0366278beecc05b546d49a9835c +TOKEN1_CONTRACT=96b0431770a34f5b651a43c830f3c8537e7c44f2cb8191d7efbcca2379785cda diff --git a/JsClients/PAIR/src/constants.ts b/JsClients/PAIR/src/constants.ts new file mode 100644 index 00000000..43837875 --- /dev/null +++ b/JsClients/PAIR/src/constants.ts @@ -0,0 +1,12 @@ +export enum PAIREvents { + Approve = 'approve', + Transfer = 'transfer', + TransferFrom = 'transfer_from', + Mint = 'mint', + Burn = 'burn', + Permit = 'permit', + Skim = 'skim', + Sync = 'sync', + Swap = 'swap', + +} diff --git a/JsClients/PAIR/src/index.ts b/JsClients/PAIR/src/index.ts new file mode 100644 index 00000000..fd84d677 --- /dev/null +++ b/JsClients/PAIR/src/index.ts @@ -0,0 +1,9 @@ +import PAIRClient from "./pair"; +import * as utils from "./utils"; +import * as constants from "./constants"; + +export { + PAIRClient, + utils, + constants +}; diff --git a/JsClients/PAIR/src/pair.ts b/JsClients/PAIR/src/pair.ts new file mode 100644 index 00000000..0477795c --- /dev/null +++ b/JsClients/PAIR/src/pair.ts @@ -0,0 +1,850 @@ +import { + CasperClient, + CLPublicKey, + CLAccountHash, + CLByteArray, + CLKey, + CLString, + CLTypeBuilder, + CLValue, + CLValueBuilder, + CLValueParsers, + CLMap, + DeployUtil, + EventName, + EventStream, + Keys, + RuntimeArgs, +} from "casper-js-sdk"; +import { PAIREvents } from "./constants"; +import * as utils from "./utils"; +import { RecipientType, IPendingDeploy } from "./types"; + +class PAIRClient { + private contractName: string = "pair"; + private contractHash: string; + private contractPackageHash: string; + private namedKeys: { + balances: string; + metadata: string; + nonces: string; + allowances: string; + ownedTokens: string; + owners: string; + paused: string; + }; + private isListening = false; + private pendingDeploys: IPendingDeploy[] = []; + + constructor( + private nodeAddress: string, + private chainName: string, + private eventStreamAddress?: string + ) { } + + public async install( + keys: Keys.AsymmetricKey, + contractName: string, + tokenName: string, + tokenSymbol: string, + decimals: string, + totalSupply: string, + factoryContractHash: String, + calleeContractHash: String, + paymentAmount: string, + wasmPath: string + ) { + + // convert string addresses to 8 bits hex arrays + const _factoryContractHash = new CLByteArray(Uint8Array.from(Buffer.from(factoryContractHash, 'hex'))); + const _calleeContractHash = new CLByteArray(Uint8Array.from(Buffer.from(calleeContractHash, 'hex'))); + + // const runtimeArgs = RuntimeArgs.fromMap({ + // contract_name: CLValueBuilder.string(contractName), + // factory_hash: CLValueBuilder.key(_factoryContractHash), + // callee_contract_hash: CLValueBuilder.key(_calleeContractHash), + // }); + + const runtimeArgs = RuntimeArgs.fromMap({ + contract_name: CLValueBuilder.string(contractName), + name: CLValueBuilder.string(tokenName), + symbol: CLValueBuilder.string(tokenSymbol), + decimals: CLValueBuilder.u8(decimals), + initial_supply: CLValueBuilder.u256(totalSupply), + factory_hash: CLValueBuilder.key(_factoryContractHash), + callee_contract_hash: CLValueBuilder.key(_calleeContractHash), + }); + + const deployHash = await installWasmFile({ + chainName: this.chainName, + paymentAmount, + nodeAddress: this.nodeAddress, + keys, + pathToContract: wasmPath, + runtimeArgs, + }); + + if (deployHash !== null) { + return deployHash; + } else { + throw Error("Problem with installation"); + } + } + + public async setContractHash(hash: string) { + const stateRootHash = await utils.getStateRootHash(this.nodeAddress); + const contractData = await utils.getContractData( + this.nodeAddress, + stateRootHash, + hash + ); + + const { contractPackageHash, namedKeys } = contractData.Contract!; + this.contractHash = hash; + this.contractPackageHash = contractPackageHash.replace( + "contract-package-wasm", + "" + ); + const LIST_OF_NAMED_KEYS = [ + 'balances', + 'nonces', + 'allowances', + `${this.contractName}_package_hash`, + `${this.contractName}_package_hash_wrapped`, + `${this.contractName}_contract_hash`, + `${this.contractName}_contract_hash_wrapped`, + `${this.contractName}_package_access_token`, + ]; + // @ts-ignore + this.namedKeys = namedKeys.reduce((acc, val) => { + if (LIST_OF_NAMED_KEYS.includes(val.name)) { + return { ...acc, [utils.camelCased(val.name)]: val.key }; + } + return acc; + }, {}); + } + + public async name() { + const result = await contractSimpleGetter( + this.nodeAddress, + this.contractHash, + ["name"] + ); + return result.value(); + } + + public async symbol() { + const result = await contractSimpleGetter( + this.nodeAddress, + this.contractHash, + ["symbol"] + ); + return result.value(); + } + + public async balanceOf(account: CLPublicKey) { + const accountHash = Buffer.from(account.toAccountHash()).toString("hex"); + const result = await utils.contractDictionaryGetter( + this.nodeAddress, + accountHash, + this.namedKeys.balances + ); + const maybeValue = result.value().unwrap(); + return maybeValue.value().toString(); + } + + + public async nonce(account: CLPublicKey) { + const accountHash = Buffer.from(account.toAccountHash()).toString("hex"); + const result = await utils.contractDictionaryGetter( + this.nodeAddress, + accountHash, + this.namedKeys.nonces + ); + const maybeValue = result.value().unwrap(); + return maybeValue.value().toString(); + } + + public async allowance(owner: CLPublicKey, spender: CLPublicKey) { + const ownerAccountHash = Buffer.from(owner.toAccountHash()).toString("hex"); + const spenderAccountHash = Buffer.from(spender.toAccountHash()).toString("hex"); + const accountHash: string = `${ownerAccountHash}_${spenderAccountHash}`; + const result = await utils.contractDictionaryGetter( + this.nodeAddress, + accountHash, + this.namedKeys.allowances + ); + const maybeValue = result.value().unwrap(); + return maybeValue.value().toString(); + } + + + public async totalSupply() { + const result = await contractSimpleGetter( + this.nodeAddress, + this.contractHash, + ["total_supply"] + ); + return result.value(); + } + public async treasuryFee() { + const result = await contractSimpleGetter( + this.nodeAddress, + this.contractHash, + ["treasury_fee"] + ); + return result.value(); + } + public async token0() { + const result = await contractSimpleGetter( + this.nodeAddress, + this.contractHash, + ["token0"] + ); + return result.value(); + } + public async token1() { + const result = await contractSimpleGetter( + this.nodeAddress, + this.contractHash, + ["token1"] + ); + return result.value(); + } + public async approve( + keys: Keys.AsymmetricKey, + spender: RecipientType, + amount: string, + paymentAmount: string + ) { + + const runtimeArgs = RuntimeArgs.fromMap({ + spender: utils.createRecipientAddress(spender), + amount: CLValueBuilder.u256(amount) + }); + + + const deployHash = await contractCall({ + chainName: this.chainName, + contractHash: this.contractHash, + entryPoint: "approve", + keys, + nodeAddress: this.nodeAddress, + paymentAmount, + runtimeArgs, + }); + + if (deployHash !== null) { + this.addPendingDeploy(PAIREvents.Approve, deployHash); + return deployHash; + } else { + throw Error("Invalid Deploy"); + } + } + + public async transfer( + keys: Keys.AsymmetricKey, + recipient: RecipientType, + amount: string, + paymentAmount: string + ) { + + const runtimeArgs = RuntimeArgs.fromMap({ + recipient: utils.createRecipientAddress(recipient), + amount: CLValueBuilder.u256(amount) + }); + + + const deployHash = await contractCall({ + chainName: this.chainName, + contractHash: this.contractHash, + entryPoint: "transfer", + keys, + nodeAddress: this.nodeAddress, + paymentAmount, + runtimeArgs, + }); + + if (deployHash !== null) { + this.addPendingDeploy(PAIREvents.Transfer, deployHash); + return deployHash; + } else { + throw Error("Invalid Deploy"); + } + } + public async transferFrom( + keys: Keys.AsymmetricKey, + owner: RecipientType, + recipient: RecipientType, + amount: string, + paymentAmount: string + ) { + + const runtimeArgs = RuntimeArgs.fromMap({ + owner: utils.createRecipientAddress(owner), + recipient: utils.createRecipientAddress(recipient), + amount: CLValueBuilder.u256(amount) + }); + + + const deployHash = await contractCall({ + chainName: this.chainName, + contractHash: this.contractHash, + entryPoint: "transfer_from", + keys, + nodeAddress: this.nodeAddress, + paymentAmount, + runtimeArgs, + }); + + if (deployHash !== null) { + this.addPendingDeploy(PAIREvents.Transfer, deployHash); + return deployHash; + } else { + throw Error("Invalid Deploy"); + } + } + public async mint( + keys: Keys.AsymmetricKey, + to: RecipientType, + paymentAmount: string + ) { + + const runtimeArgs = RuntimeArgs.fromMap({ + to: utils.createRecipientAddress(to), + }); + + + const deployHash = await contractCall({ + chainName: this.chainName, + contractHash: this.contractHash, + entryPoint: "mint", + keys, + nodeAddress: this.nodeAddress, + paymentAmount, + runtimeArgs, + }); + + if (deployHash !== null) { + this.addPendingDeploy(PAIREvents.Mint, deployHash); + return deployHash; + } else { + throw Error("Invalid Deploy"); + } + } + public async burn( + keys: Keys.AsymmetricKey, + to: RecipientType, + paymentAmount: string + ) { + + const runtimeArgs = RuntimeArgs.fromMap({ + from: utils.createRecipientAddress(to), + }); + + const deployHash = await contractCall({ + chainName: this.chainName, + contractHash: this.contractHash, + entryPoint: "burn", + keys, + nodeAddress: this.nodeAddress, + paymentAmount, + runtimeArgs, + }); + + if (deployHash !== null) { + this.addPendingDeploy(PAIREvents.Burn, deployHash); + return deployHash; + } else { + throw Error("Invalid Deploy"); + } + } + public async permit( + keys: Keys.AsymmetricKey, + publicKey: string, + signature: string, + owner: RecipientType, + spender: RecipientType, + amount: string, + deadline: string, + paymentAmount: string + ) { + + const runtimeArgs = RuntimeArgs.fromMap({ + public: CLValueBuilder.string(publicKey), + signature: CLValueBuilder.string(signature), + owner: utils.createRecipientAddress(owner), + spender: utils.createRecipientAddress(spender), + value: CLValueBuilder.u256(amount), + deadline: CLValueBuilder.u64(deadline) + }); + + + const deployHash = await contractCall({ + chainName: this.chainName, + contractHash: this.contractHash, + entryPoint: "permit", + keys, + nodeAddress: this.nodeAddress, + paymentAmount, + runtimeArgs, + }); + + if (deployHash !== null) { + this.addPendingDeploy(PAIREvents.Permit, deployHash); + return deployHash; + } else { + throw Error("Invalid Deploy"); + } + } + public async skim( + keys: Keys.AsymmetricKey, + to: RecipientType, + paymentAmount: string + ) { + + const runtimeArgs = RuntimeArgs.fromMap({ + to: utils.createRecipientAddress(to), + }); + + + const deployHash = await contractCall({ + chainName: this.chainName, + contractHash: this.contractHash, + entryPoint: "skim", + keys, + nodeAddress: this.nodeAddress, + paymentAmount, + runtimeArgs, + }); + + if (deployHash !== null) { + this.addPendingDeploy(PAIREvents.Skim, deployHash); + return deployHash; + } else { + throw Error("Invalid Deploy"); + } + } + public async erc20Mint( + keys: Keys.AsymmetricKey, + to: String, + amount: string, + paymentAmount: string + ) { + + const _to = new CLByteArray(Uint8Array.from(Buffer.from(to, 'hex'))); + const runtimeArgs = RuntimeArgs.fromMap({ + to: CLValueBuilder.key(_to), + amount: CLValueBuilder.u256(amount), + }); + + + const deployHash = await contractCall({ + chainName: this.chainName, + contractHash: this.contractHash, + entryPoint: "erc20_mint", + keys, + nodeAddress: this.nodeAddress, + paymentAmount, + runtimeArgs, + }); + + if (deployHash !== null) { + this.addPendingDeploy(PAIREvents.Mint, deployHash); + return deployHash; + } else { + throw Error("Invalid Deploy"); + } + } + public async sync( + keys: Keys.AsymmetricKey, + to: RecipientType, + paymentAmount: string + ) { + + const runtimeArgs = RuntimeArgs.fromMap({ + to: utils.createRecipientAddress(to), + }); + + + const deployHash = await contractCall({ + chainName: this.chainName, + contractHash: this.contractHash, + entryPoint: "sync", + keys, + nodeAddress: this.nodeAddress, + paymentAmount, + runtimeArgs, + }); + + if (deployHash !== null) { + this.addPendingDeploy(PAIREvents.Sync, deployHash); + return deployHash; + } else { + throw Error("Invalid Deploy"); + } + } + public async swap( + keys: Keys.AsymmetricKey, + amount0_out: string, + amount1_out: string, + to: RecipientType, + data: string, + paymentAmount: string + ) { + + const runtimeArgs = RuntimeArgs.fromMap({ + amount0_out: CLValueBuilder.u256(amount0_out), + amount1_out: CLValueBuilder.u256(amount1_out), + to: utils.createRecipientAddress(to), + data: CLValueBuilder.string(data) + }); + + + const deployHash = await contractCall({ + chainName: this.chainName, + contractHash: this.contractHash, + entryPoint: "swap", + keys, + nodeAddress: this.nodeAddress, + paymentAmount, + runtimeArgs, + }); + + if (deployHash !== null) { + this.addPendingDeploy(PAIREvents.Sync, deployHash); + return deployHash; + } else { + throw Error("Invalid Deploy"); + } + } + public async initialize( + keys: Keys.AsymmetricKey, + token0: String, + token1: String, + factory_hash: String, + paymentAmount: string + ) { + + const _token0 = new CLByteArray(Uint8Array.from(Buffer.from(token0, 'hex'))); + const _token1 = new CLByteArray(Uint8Array.from(Buffer.from(token1, 'hex'))); + const _factory_hash = new CLByteArray(Uint8Array.from(Buffer.from(factory_hash, 'hex'))); + + const runtimeArgs = RuntimeArgs.fromMap({ + token0: CLValueBuilder.key(_token0), + token1: CLValueBuilder.key(_token1), + factory_hash: CLValueBuilder.key(_factory_hash), + }); + + + const deployHash = await contractCall({ + chainName: this.chainName, + contractHash: this.contractHash, + entryPoint: "initialize", + keys, + nodeAddress: this.nodeAddress, + paymentAmount, + runtimeArgs, + }); + + if (deployHash !== null) { + this.addPendingDeploy(PAIREvents.Approve, deployHash); + return deployHash; + } else { + throw Error("Invalid Deploy"); + } + } + + public async erc20MintMethod( + keys: Keys.AsymmetricKey, + erc20: string, + amount: string, + paymentAmount: string + ) { + + const _to = new CLByteArray(Uint8Array.from(Buffer.from(this.contractHash, 'hex'))); + const runtimeArgs = RuntimeArgs.fromMap({ + to: CLValueBuilder.key(_to), + amount: CLValueBuilder.u256(amount), + }); + + + const deployHash = await contractCall({ + chainName: this.chainName, + contractHash: erc20, + entryPoint: "mint", + keys, + nodeAddress: this.nodeAddress, + paymentAmount, + runtimeArgs, + }); + + if (deployHash !== null) { + this.addPendingDeploy(PAIREvents.Mint, deployHash); + return deployHash; + } else { + throw Error("Invalid Deploy"); + } + } + + public async setTreasuryFeePercent( + keys: Keys.AsymmetricKey, + amount: string, + paymentAmount: string + ) { + + const runtimeArgs = RuntimeArgs.fromMap({ + treasury_fee: CLValueBuilder.u256(amount), + }); + + + const deployHash = await contractCall({ + chainName: this.chainName, + contractHash: this.contractHash, + entryPoint: "set_treasury_fee_percent", + keys, + nodeAddress: this.nodeAddress, + paymentAmount, + runtimeArgs, + }); + + if (deployHash !== null) { + this.addPendingDeploy(PAIREvents.Sync, deployHash); + return deployHash; + } else { + throw Error("Invalid Deploy"); + } + } + + + + public onEvent( + eventNames: PAIREvents[], + callback: ( + eventName: PAIREvents, + deployStatus: { + deployHash: string; + success: boolean; + error: string | null; + }, + result: any | null + ) => void + ): any { + if (!this.eventStreamAddress) { + throw Error("Please set eventStreamAddress before!"); + } + if (this.isListening) { + throw Error( + "Only one event listener can be create at a time. Remove the previous one and start new." + ); + } + const es = new EventStream(this.eventStreamAddress); + this.isListening = true; + + es.subscribe(EventName.DeployProcessed, (value: any) => { + const deployHash = value.body.DeployProcessed.deploy_hash; + + const pendingDeploy = this.pendingDeploys.find( + (pending) => pending.deployHash === deployHash + ); + + if (!pendingDeploy) { + return; + } + + if ( + !value.body.DeployProcessed.execution_result.Success && + value.body.DeployProcessed.execution_result.Failure + ) { + callback( + pendingDeploy.deployType, + { + deployHash, + error: + value.body.DeployProcessed.execution_result.Failure.error_message, + success: false, + }, + null + ); + } else { + const { transforms } = + value.body.DeployProcessed.execution_result.Success.effect; + + const PAIREvents = transforms.reduce((acc: any, val: any) => { + if ( + val.transform.hasOwnProperty("WriteCLValue") && + typeof val.transform.WriteCLValue.parsed === "object" && + val.transform.WriteCLValue.parsed !== null + ) { + const maybeCLValue = CLValueParsers.fromJSON( + val.transform.WriteCLValue + ); + const clValue = maybeCLValue.unwrap(); + if (clValue && clValue instanceof CLMap) { + const hash = clValue.get( + CLValueBuilder.string("contract_package_hash") + ); + const event = clValue.get(CLValueBuilder.string("event_type")); + if ( + hash && + hash.value() === this.contractPackageHash && + event && + eventNames.includes(event.value()) + ) { + acc = [...acc, { name: event.value(), clValue }]; + } + } + } + return acc; + }, []); + + PAIREvents.forEach((d: any) => + callback( + d.name, + { deployHash, error: null, success: true }, + d.clValue + ) + ); + } + + this.pendingDeploys = this.pendingDeploys.filter( + (pending) => pending.deployHash !== deployHash + ); + }); + es.start(); + + return { + stopListening: () => { + es.unsubscribe(EventName.DeployProcessed); + es.stop(); + this.isListening = false; + this.pendingDeploys = []; + }, + }; + } + + private addPendingDeploy(deployType: PAIREvents, deployHash: string) { + this.pendingDeploys = [...this.pendingDeploys, { deployHash, deployType }]; + } +} + +interface IInstallParams { + nodeAddress: string; + keys: Keys.AsymmetricKey; + chainName: string; + pathToContract: string; + runtimeArgs: RuntimeArgs; + paymentAmount: string; +} + +const installWasmFile = async ({ + nodeAddress, + keys, + chainName, + pathToContract, + runtimeArgs, + paymentAmount, +}: IInstallParams): Promise => { + const client = new CasperClient(nodeAddress); + + // Set contract installation deploy (unsigned). + let deploy = DeployUtil.makeDeploy( + new DeployUtil.DeployParams( + CLPublicKey.fromHex(keys.publicKey.toHex()), + chainName + ), + DeployUtil.ExecutableDeployItem.newModuleBytes( + utils.getBinary(pathToContract), + runtimeArgs + ), + DeployUtil.standardPayment(paymentAmount) + ); + + // Sign deploy. + deploy = client.signDeploy(deploy, keys); + + // Dispatch deploy to node. + return await client.putDeploy(deploy); +}; + +interface IContractCallParams { + nodeAddress: string; + keys: Keys.AsymmetricKey; + chainName: string; + entryPoint: string; + runtimeArgs: RuntimeArgs; + paymentAmount: string; + contractHash: string; +} + +const contractCall = async ({ + nodeAddress, + keys, + chainName, + contractHash, + entryPoint, + runtimeArgs, + paymentAmount, +}: IContractCallParams) => { + const client = new CasperClient(nodeAddress); + const contractHashAsByteArray = utils.contractHashToByteArray(contractHash); + + let deploy = DeployUtil.makeDeploy( + new DeployUtil.DeployParams(keys.publicKey, chainName), + DeployUtil.ExecutableDeployItem.newStoredContractByHash( + contractHashAsByteArray, + entryPoint, + runtimeArgs + ), + DeployUtil.standardPayment(paymentAmount) + ); + + // Sign deploy. + deploy = client.signDeploy(deploy, keys); + + // Dispatch deploy to node. + const deployHash = await client.putDeploy(deploy); + + return deployHash; +}; + +const contractSimpleGetter = async ( + nodeAddress: string, + contractHash: string, + key: string[] +) => { + const stateRootHash = await utils.getStateRootHash(nodeAddress); + const clValue = await utils.getContractData( + nodeAddress, + stateRootHash, + contractHash, + key + ); + + if (clValue && clValue.CLValue instanceof CLValue) { + return clValue.CLValue!; + } else { + throw Error("Invalid stored value"); + } +}; + +const toCLMap = (map: Map) => { + const clMap = CLValueBuilder.map([ + CLTypeBuilder.string(), + CLTypeBuilder.string(), + ]); + for (const [key, value] of Array.from(map.entries())) { + clMap.set(CLValueBuilder.string(key), CLValueBuilder.string(value)); + } + return clMap; +}; + +const fromCLMap = (map: Map) => { + const jsMap = new Map(); + for (const [key, value] of Array.from(map.entries())) { + jsMap.set(key.value(), value.value()); + } + return jsMap; +}; + +export default PAIRClient; diff --git a/JsClients/PAIR/src/types.d.ts b/JsClients/PAIR/src/types.d.ts new file mode 100644 index 00000000..80536910 --- /dev/null +++ b/JsClients/PAIR/src/types.d.ts @@ -0,0 +1,8 @@ +import { CLAccountHash, CLByteArray, CLPublicKey } from "casper-js-sdk"; + +export type RecipientType = CLPublicKey | CLAccountHash | CLByteArray; + +export interface IPendingDeploy { + deployHash: string; + deployType: PAIREvents; +} diff --git a/JsClients/PAIR/src/utils.ts b/JsClients/PAIR/src/utils.ts new file mode 100644 index 00000000..a8fb6228 --- /dev/null +++ b/JsClients/PAIR/src/utils.ts @@ -0,0 +1,132 @@ +import { + CasperServiceByJsonRPC, + CLValue, + CLKey, + CLAccountHash, + Keys, + CLPublicKey, +} from "casper-js-sdk"; +import fs from "fs"; + +import { RecipientType } from "./types"; + +export const camelCased = (myString: string) => + myString.replace(/_([a-z])/g, (g) => g[1].toUpperCase()); + +export const createRecipientAddress = (recipient: RecipientType): CLKey => { + if (recipient instanceof CLPublicKey) { + return new CLKey(new CLAccountHash(recipient.toAccountHash())); + } else { + return new CLKey(recipient); + } +}; + +/** + * Returns an ECC key pair mapped to an NCTL faucet account. + * @param pathToFaucet - Path to NCTL faucet directory. + */ +export const getKeyPairOfContract = (pathToFaucet: string) => + Keys.Ed25519.parseKeyFiles( + `${pathToFaucet}/public_key.pem`, + `${pathToFaucet}/secret_key.pem` + ); + +/** + * Returns a binary as u8 array. + * @param pathToBinary - Path to binary file to be loaded into memory. + * @return Uint8Array Byte array. + */ +export const getBinary = (pathToBinary: string) => { + return new Uint8Array(fs.readFileSync(pathToBinary, null).buffer); +}; + +/** + * Returns global state root hash at current block. + * @param {Object} client - JS SDK client for interacting with a node. + * @return {String} Root hash of global state at most recent block. + */ +export const getStateRootHash = async (nodeAddress: string) => { + const client = new CasperServiceByJsonRPC(nodeAddress); + const { block } = await client.getLatestBlockInfo(); + if (block) { + return block.header.state_root_hash; + } else { + throw Error("Problem when calling getLatestBlockInfo"); + } +}; + +export const getAccountInfo = async ( + nodeAddress: string, + publicKey: CLPublicKey +) => { + // console.log("nodeAddress", nodeAddress); + // console.log("publicKey", publicKey); + + const stateRootHash = await getStateRootHash(nodeAddress); + // console.log("stateRootHash", stateRootHash); + const client = new CasperServiceByJsonRPC(nodeAddress); + // console.log("client", client); + const accountHash = publicKey.toAccountHashStr(); + // console.log("accountHash", accountHash); + const blockState = await client.getBlockState(stateRootHash, accountHash, []); + // console.log("blockState", blockState); + return blockState.Account; +}; + +/** + * Returns a value under an on-chain account's storage. + * @param accountInfo - On-chain account's info. + * @param namedKey - A named key associated with an on-chain account. + */ +export const getAccountNamedKeyValue = (accountInfo: any, namedKey: string) => { + const found = accountInfo.namedKeys.find((i: any) => i.name === namedKey); + if (found) { + return found.key; + } + return undefined; +}; + +export const getContractData = async ( + nodeAddress: string, + stateRootHash: string, + contractHash: string, + path: string[] = [] +) => { + const client = new CasperServiceByJsonRPC(nodeAddress); + const blockState = await client.getBlockState( + stateRootHash, + `hash-${contractHash}`, + path + ); + return blockState; +}; + +export const contractDictionaryGetter = async ( + nodeAddress: string, + dictionaryItemKey: string, + seedUref: string, +) => { + const stateRootHash = await getStateRootHash(nodeAddress); + + const client = new CasperServiceByJsonRPC(nodeAddress); + + const storedValue = await client.getDictionaryItemByURef( + stateRootHash, + dictionaryItemKey, + seedUref + ); + + if (storedValue && storedValue.CLValue instanceof CLValue) { + return storedValue.CLValue!; + } else { + throw Error("Invalid stored value"); + } +}; + + +export const contractHashToByteArray = (contractHash: string) => + Uint8Array.from(Buffer.from(contractHash, "hex")); + +export const sleep = (num: number) => { + return new Promise((resolve) => setTimeout(resolve, num)); +}; diff --git a/JsClients/PAIR/test/install.ts b/JsClients/PAIR/test/install.ts new file mode 100644 index 00000000..bb1118b6 --- /dev/null +++ b/JsClients/PAIR/test/install.ts @@ -0,0 +1,73 @@ +import { config } from "dotenv"; +config(); +import { PAIRClient, utils, constants } from "../src"; +import { parseTokenMeta, sleep, getDeploy } from "./utils"; + +import { + Keys, +} from "casper-js-sdk"; + +const { + NODE_ADDRESS, + EVENT_STREAM_ADDRESS, + CHAIN_NAME, + WASM_PATH, + MASTER_KEY_PAIR_PATH, + INSTALL_PAYMENT_AMOUNT, + TOKEN_NAME, + TOKEN_SYMBOL, + DECIMALS, + TOTAL_SUPPLY, + FACTORY_CONTRACT, + CALLEE_CONTRACT, + CONTRACT_NAME, +} = process.env; + +const KEYS = Keys.Ed25519.parseKeyFiles( + `${MASTER_KEY_PAIR_PATH}/public_key.pem`, + `${MASTER_KEY_PAIR_PATH}/secret_key.pem` +); + +const test = async () => { + const pair = new PAIRClient( + NODE_ADDRESS!, + CHAIN_NAME!, + EVENT_STREAM_ADDRESS! + ); + + const installDeployHash = await pair.install( + KEYS, + CONTRACT_NAME!, + TOKEN_NAME!, + TOKEN_SYMBOL!, + DECIMALS!, + TOTAL_SUPPLY!, + FACTORY_CONTRACT!, + CALLEE_CONTRACT!, + // KEYS.publicKey, + // KEYS.publicKey, + INSTALL_PAYMENT_AMOUNT!, + WASM_PATH! + ); + + console.log(`... Contract installation deployHash: ${installDeployHash}`); + + await getDeploy(NODE_ADDRESS!, installDeployHash); + + console.log(`... Contract installed successfully.`); + + let accountInfo = await utils.getAccountInfo(NODE_ADDRESS!, KEYS.publicKey); + + console.log(`... Account Info: `); + console.log(JSON.stringify(accountInfo, null, 2)); + + const contractHash = await utils.getAccountNamedKeyValue( + accountInfo, + `${CONTRACT_NAME!}_contract_hash` + ); + + console.log(`... Contract Hash: ${contractHash}`); + +}; + +test(); diff --git a/JsClients/PAIR/test/installed.ts b/JsClients/PAIR/test/installed.ts new file mode 100644 index 00000000..5fc97db5 --- /dev/null +++ b/JsClients/PAIR/test/installed.ts @@ -0,0 +1,322 @@ +import { config } from "dotenv"; +config(); +import { PAIRClient, utils, constants } from "../src"; +import { parseTokenMeta, sleep, getDeploy } from "./utils"; + +import { + CLValueBuilder, + Keys, + CLPublicKey, + CLAccountHash, + CLPublicKeyType, +} from "casper-js-sdk"; + +const { PAIREvents } = constants; + +const { + NODE_ADDRESS, + EVENT_STREAM_ADDRESS, + CHAIN_NAME, + WASM_PATH, + MASTER_KEY_PAIR_PATH, + RECEIVER_ACCOUNT_ONE, + INSTALL_PAYMENT_AMOUNT, + INITIALIZE_PAYMENT_AMOUNT, + MINT_PAYMENT_AMOUNT, + BURN_PAYMENT_AMOUNT, + APPROVE_PAYMENT_AMOUNT, + APPROVE_AMOUNT, + TRANSFER_PAYMENT_AMOUNT, + TRANSFER_AMOUNT, + TRANSFER_FROM_PAYMENT_AMOUNT, + TRANSFER_FROM_AMOUNT, + SKIM_PAYMENT_AMOUNT, + SYNC_PAYMENT_AMOUNT, + SWAP_PAYMENT_AMOUNT, + SET_TREASURY_FEE_PERCENT_PAYMENT_AMOUNT, + FACTORY_CONTRACT, + TOKEN0_CONTRACT, + TOKEN1_CONTRACT, + CONTRACT_NAME +} = process.env; + +// const TOKEN_META = new Map(parseTokenMeta(process.env.TOKEN_META!)); + +const KEYS = Keys.Ed25519.parseKeyFiles( + `${MASTER_KEY_PAIR_PATH}/public_key.pem`, + `${MASTER_KEY_PAIR_PATH}/secret_key.pem` +); + +const test = async () => { + const pair = new PAIRClient( + NODE_ADDRESS!, + CHAIN_NAME!, + EVENT_STREAM_ADDRESS! + ); + + const listener = pair.onEvent( + [ + PAIREvents.Approve, + PAIREvents.Transfer, + PAIREvents.TransferFrom, + PAIREvents.Mint, + PAIREvents.Burn, + PAIREvents.Permit, + PAIREvents.Skim, + PAIREvents.Sync, + PAIREvents.Swap, + ], + (eventName, deploy, result) => { + if (deploy.success) { + console.log(`Successfull deploy of: ${eventName}, deployHash: ${deploy.deployHash}`); + console.log(result.value()); + } else { + console.log(`Failed deploy of ${eventName}, deployHash: ${deploy.deployHash}`); + console.log(`Error: ${deploy.error}`); + } + } + ); + + await sleep(5 * 1000); + + let accountInfo = await utils.getAccountInfo(NODE_ADDRESS!, KEYS.publicKey); + + console.log(`... Account Info: `); + console.log(JSON.stringify(accountInfo, null, 2)); + + const contractHash = await utils.getAccountNamedKeyValue( + accountInfo, + `${CONTRACT_NAME!}_contract_hash` + ); + + console.log(`... Contract Hash: ${contractHash}`); + + // We don't need hash- prefix so i'm removing it + await pair.setContractHash(contractHash.slice(5)); + + //name + const name = await pair.name(); + console.log(`... Contract name: ${name}`); + + //symbol + const symbol = await pair.symbol(); + console.log(`... Contract symbol: ${symbol}`); + + //initialize + const initializeDeployHash = await pair.initialize( + KEYS, + TOKEN0_CONTRACT!, + TOKEN1_CONTRACT!, + FACTORY_CONTRACT!, + INITIALIZE_PAYMENT_AMOUNT! + ); + console.log("... Initialize deploy hash: ", initializeDeployHash); + + await getDeploy(NODE_ADDRESS!, initializeDeployHash); + console.log("... Token Initialized successfully"); + + + //erc20mint + const erc20MintToken0DeployHash = await pair.erc20MintMethod( + KEYS, + TOKEN0_CONTRACT!, + "1000"!, + MINT_PAYMENT_AMOUNT! + ); + console.log("...ERC20 Mint deploy hash: ", erc20MintToken0DeployHash); + + + await getDeploy(NODE_ADDRESS!, erc20MintToken0DeployHash); + console.log("...ERC20 Token minted successfully"); + + + //erc20mint + const erc20MintToken1DeployHash = await pair.erc20MintMethod( + KEYS, + TOKEN1_CONTRACT!, + "1000"!, + MINT_PAYMENT_AMOUNT! + ); + console.log("...ERC20 Mint deploy hash: ", erc20MintToken1DeployHash); + + await getDeploy(NODE_ADDRESS!, erc20MintToken1DeployHash); + console.log("...ERC20 Token minted successfully"); + + //token0 + const token0 = await pair.token0(); + console.log(`... Contract token0: ${token0}`); + + //token1 + const token1 = await pair.token1(); + console.log(`... Contract token1: ${token1}`); + + //treasuryfee + const treasuryfee = await pair.treasuryFee(); + console.log(`... Contract treasuryfee: ${treasuryfee}`); + + //totalsupply + let totalSupply = await pair.totalSupply(); + console.log(`... Total supply: ${totalSupply}`); + + //balanceof + let balance = await pair.balanceOf(KEYS.publicKey); + console.log(`... Balance of account ${KEYS.publicKey.toAccountHashStr()}`); + console.log(`... Balance: ${balance}`); + + //balanceof + let nonce = await pair.nonce(KEYS.publicKey); + console.log(`... Nonce: ${nonce}`); + + //allowance + // let allowance = await pair.allowance(KEYS.publicKey, KEYS.publicKey); + // console.log(`... Allowance: ${allowance}`); + + //erc20_mint + //mint + const erc20mint0DeployHash = await pair.erc20Mint( + KEYS, + TOKEN0_CONTRACT!, + "1000"!, + MINT_PAYMENT_AMOUNT! + ); + console.log("... Mint deploy hash: ", erc20mint0DeployHash); + + await getDeploy(NODE_ADDRESS!, erc20mint0DeployHash); + console.log("... Token minted successfully"); + + + //erc20mint + const erc20mint1DeployHash = await pair.erc20Mint( + KEYS, + TOKEN1_CONTRACT!, + "1000"!, + MINT_PAYMENT_AMOUNT! + ); + console.log("... Mint deploy hash: ", erc20mint1DeployHash); + + await getDeploy(NODE_ADDRESS!, erc20mint1DeployHash); + console.log("... Token minted successfully"); + + + + //sync + const syncDeployHash = await pair.sync( + KEYS, + KEYS.publicKey, + SYNC_PAYMENT_AMOUNT! + ); + console.log("... sync deploy hash: ", syncDeployHash); + + + + await getDeploy(NODE_ADDRESS!, syncDeployHash); + console.log("... Sync functionality successfull"); + + + //mint + // const mintDeployHash = await pair.mint( + // KEYS, + // KEYS.publicKey, + // MINT_PAYMENT_AMOUNT! + // ); + // console.log("... Mint deploy hash: ", mintDeployHash); + + // await getDeploy(NODE_ADDRESS!, mintDeployHash); + // console.log("... Token minted successfully"); + + // //burn + // const burnDeployHash = await pair.burn( + // KEYS, + // KEYS.publicKey, + // BURN_PAYMENT_AMOUNT! + // ); + // console.log("... Burn deploy hash: ", burnDeployHash); + + // await getDeploy(NODE_ADDRESS!, burnDeployHash); + // console.log("... Token burned successfully"); + + //totalsupply + totalSupply = await pair.totalSupply(); + console.log(`... Total supply: ${totalSupply}`); + + //approve + const approveDeployHash = await pair.approve( + KEYS, + KEYS.publicKey, + APPROVE_AMOUNT!, + APPROVE_PAYMENT_AMOUNT! + ); + console.log("... Approve deploy hash: ", approveDeployHash); + + await getDeploy(NODE_ADDRESS!, approveDeployHash); + console.log("... Token approved successfully"); + + //transfer + const transferDeployHash = await pair.transfer( + KEYS, + KEYS.publicKey, + TRANSFER_AMOUNT!, + TRANSFER_PAYMENT_AMOUNT! + ); + console.log("... Transfer deploy hash: ", transferDeployHash); + + await getDeploy(NODE_ADDRESS!, transferDeployHash); + console.log("... Token transfer successfully"); + + //transfer_from + const transferfromDeployHash = await pair.transferFrom( + KEYS, + KEYS.publicKey, + KEYS.publicKey, + TRANSFER_FROM_AMOUNT!, + TRANSFER_FROM_PAYMENT_AMOUNT! + ); + console.log("... TransferFrom deploy hash: ", transferfromDeployHash); + + await getDeploy(NODE_ADDRESS!, transferfromDeployHash); + console.log("... Token transfer successfully"); + + //skim + const skimDeployHash = await pair.skim( + KEYS, + KEYS.publicKey, + SKIM_PAYMENT_AMOUNT! + ); + console.log("... skim deploy hash: ", skimDeployHash); + + await getDeploy(NODE_ADDRESS!, skimDeployHash); + console.log("... Skim functionality successfull"); + + + //swap + const swapDeployHash = await pair.swap( + KEYS, + "10", + "20", + KEYS.publicKey, + "", + SWAP_PAYMENT_AMOUNT! + ); + console.log("... swap deploy hash: ", swapDeployHash); + + await getDeploy(NODE_ADDRESS!, swapDeployHash); + console.log("... Swap functionality successfull"); + + //settreasuryfeepercent + const settreasuryfeepercentDeployHash = await pair.setTreasuryFeePercent( + KEYS, + "10", + SET_TREASURY_FEE_PERCENT_PAYMENT_AMOUNT! + ); + console.log("... setTreasuryFeePercent deploy hash: ", settreasuryfeepercentDeployHash); + + await getDeploy(NODE_ADDRESS!, settreasuryfeepercentDeployHash); + console.log("... setTreasuryFeePercent functionality successfull"); + + //treasuryfee + const treasuryFee = await pair.treasuryFee(); + console.log(`... Contract treasuryfee: ${treasuryFee}`); + +}; + +test(); diff --git a/JsClients/PAIR/test/utils.ts b/JsClients/PAIR/test/utils.ts new file mode 100644 index 00000000..487cdcec --- /dev/null +++ b/JsClients/PAIR/test/utils.ts @@ -0,0 +1,34 @@ +import { CasperClient } from "casper-js-sdk"; + +export const parseTokenMeta = (str: string): Array<[string, string]> => str.split(",").map(s => { + const map = s.split(" "); + return [map[0], map[1]] +}); + +export const sleep = (ms: number) => { + return new Promise(resolve => setTimeout(resolve, ms)); +} + +export const getDeploy = async (NODE_URL: string, deployHash: string) => { + const client = new CasperClient(NODE_URL); + let i = 1000; + while (i != 0) { + console.log('i', i); + + const [deploy, raw] = await client.getDeploy(deployHash); + if (raw.execution_results.length !== 0) { + // @ts-ignore + if (raw.execution_results[0].result.Success) { + return deploy; + } else { + // @ts-ignore + throw Error("Contract execution: " + raw.execution_results[0].result.Failure.error_message); + } + } else { + i--; + await sleep(1000); + continue; + } + } + throw Error('Timeout after ' + i + 's. Something\'s wrong'); +} diff --git a/JsClients/PAIR/wasm/pair-token.wasm b/JsClients/PAIR/wasm/pair-token.wasm new file mode 100644 index 00000000..250f1de4 Binary files /dev/null and b/JsClients/PAIR/wasm/pair-token.wasm differ diff --git a/package-lock.json b/package-lock.json index a5ad0f64..15df1ba5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,1369 +1,244 @@ { "name": "graphql", "version": "0.0.0", - "lockfileVersion": 2, + "lockfileVersion": 1, "requires": true, - "packages": { - "": { - "version": "0.0.0", - "dependencies": { - "cookie-parser": "~1.4.4", - "debug": "~2.6.9", - "dotenv": "^10.0.0", - "express": "~4.16.1", - "express-graphql": "^0.12.0", - "graphql": "^15.6.0", - "http-errors": "~1.6.3", - "jade": "~1.11.0", - "mongoose": "^6.0.8", - "morgan": "~1.9.1" - } - }, - "node_modules/@types/node": { - "version": "16.10.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.2.tgz", - "integrity": "sha512-zCclL4/rx+W5SQTzFs9wyvvyCwoK9QtBpratqz2IYJ3O8Umrn0m3nsTv0wQBk9sRGpvUe9CwPDrQFB10f1FIjQ==" - }, - "node_modules/@types/webidl-conversions": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz", - "integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q==" - }, - "node_modules/@types/whatwg-url": { - "version": "8.2.1", - "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.1.tgz", - "integrity": "sha512-2YubE1sjj5ifxievI5Ge1sckb9k/Er66HyR2c+3+I6VDUUg1TLPdYYTEbQ+DjRkS4nTxMJhgWfSfMRD2sl2EYQ==", - "dependencies": { - "@types/node": "*", - "@types/webidl-conversions": "*" + "dependencies": { + "@babel/code-frame": { + "version": "7.15.8", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.15.8.tgz", + "integrity": "sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==", + "requires": { + "@babel/highlight": "^7.14.5" } }, - "node_modules/accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", - "dependencies": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - }, - "engines": { - "node": ">= 0.6" - } + "@babel/helper-validator-identifier": { + "version": "7.15.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", + "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==" }, - "node_modules/acorn": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz", - "integrity": "sha1-q259nYhqrKiwhbwzEreaGYQz8Oc=", - "bin": { - "acorn": "bin/acorn" + "@babel/highlight": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", + "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "requires": { + "@babel/helper-validator-identifier": "^7.14.5", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-globals": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-1.0.9.tgz", - "integrity": "sha1-VbtemGkVB7dFedBRNBMhfDgMVM8=", - "dependencies": { - "acorn": "^2.1.0" - } - }, - "node_modules/align-text": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dependencies": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "engines": { - "node": ">=0.4.2" - } - }, - "node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" - }, - "node_modules/asap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/asap/-/asap-1.0.0.tgz", - "integrity": "sha1-sqRdpf36ILBJb8N2jMJ8EvqRan0=" - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/basic-auth": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", - "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", - "dependencies": { - "safe-buffer": "5.1.2" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/body-parser": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", - "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", - "dependencies": { - "bytes": "3.0.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "~1.6.3", - "iconv-lite": "0.4.23", - "on-finished": "~2.3.0", - "qs": "6.5.2", - "raw-body": "2.3.3", - "type-is": "~1.6.16" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/bson": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/bson/-/bson-4.5.2.tgz", - "integrity": "sha512-8CEMJpwc7qlQtrn2rney38jQSEeMar847lz0LyitwRmVknAW8iHXrzW4fTjHfyWm0E3sukyD/zppdH+QU1QefA==", - "dependencies": { - "buffer": "^5.6.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, - { - "type": "consulting", - "url": "https://feross.org/support" + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/center-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", - "dependencies": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/character-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/character-parser/-/character-parser-1.2.1.tgz", - "integrity": "sha1-wN3kqxgnE7kZuXCVmhI+zBow/NY=" - }, - "node_modules/clean-css": { - "version": "3.4.28", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-3.4.28.tgz", - "integrity": "sha1-vxlF6C/ICPVWlebd6uwBQA79A/8=", - "dependencies": { - "commander": "2.8.x", - "source-map": "0.4.x" - }, - "bin": { - "cleancss": "bin/cleancss" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/clean-css/node_modules/commander": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", - "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", - "dependencies": { - "graceful-readlink": ">= 1.0.0" - }, - "engines": { - "node": ">= 0.6.x" - } - }, - "node_modules/cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", - "dependencies": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - } - }, - "node_modules/commander": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.6.0.tgz", - "integrity": "sha1-nfflL7Kgyw+4kFjugMMQQiXzfh0=", - "engines": { - "node": ">= 0.6.x" } }, - "node_modules/constantinople": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-3.0.2.tgz", - "integrity": "sha1-S5RdmTeQe82Y7ldRIsOBdRZUQUE=", - "deprecated": "Please update to at least constantinople 3.1.1", - "dependencies": { - "acorn": "^2.1.0" - } - }, - "node_modules/content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", - "engines": { - "node": ">= 0.6" - } + "@cspotcode/source-map-consumer": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", + "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==" }, - "node_modules/content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "engines": { - "node": ">= 0.6" + "@cspotcode/source-map-support": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", + "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", + "requires": { + "@cspotcode/source-map-consumer": "0.8.0" } }, - "node_modules/cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", - "engines": { - "node": ">= 0.6" + "@ethersproject/bignumber": { + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.4.2.tgz", + "integrity": "sha512-oIBDhsKy5bs7j36JlaTzFgNPaZjiNDOXsdSgSpXRucUl+UA6L/1YLlFeI3cPAoodcenzF4nxNPV13pcy7XbWjA==", + "requires": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "bn.js": "^4.11.9" } }, - "node_modules/cookie-parser": { - "version": "1.4.5", - "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.5.tgz", - "integrity": "sha512-f13bPUj/gG/5mDr+xLmSxxDsB9DQiTIfhJS/sqjrmfAWiAN+x2O4i/XguTL9yDZ+/IFDanJ+5x7hC4CXT9Tdzw==", - "dependencies": { - "cookie": "0.4.0", - "cookie-signature": "1.0.6" - }, - "engines": { - "node": ">= 0.8.0" + "@ethersproject/bytes": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.4.0.tgz", + "integrity": "sha512-H60ceqgTHbhzOj4uRc/83SCN9d+BSUnOkrr2intevqdtEMO1JFVZ1XL84OEZV+QjV36OaZYxtnt4lGmxcGsPfA==", + "requires": { + "@ethersproject/logger": "^5.4.0" } }, - "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" - }, - "node_modules/css": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/css/-/css-1.0.8.tgz", - "integrity": "sha1-k4aBHKgrzMnuf7WnMrHioxfIo+c=", - "dependencies": { - "css-parse": "1.0.4", - "css-stringify": "1.0.5" + "@ethersproject/constants": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.4.0.tgz", + "integrity": "sha512-tzjn6S7sj9+DIIeKTJLjK9WGN2Tj0P++Z8ONEIlZjyoTkBuODN+0VfhAyYksKi43l1Sx9tX2VlFfzjfmr5Wl3Q==", + "requires": { + "@ethersproject/bignumber": "^5.4.0" } }, - "node_modules/css-parse": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.0.4.tgz", - "integrity": "sha1-OLBQP7+dqfVOnB29pg4UXHcRe90=" - }, - "node_modules/css-stringify": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/css-stringify/-/css-stringify-1.0.5.tgz", - "integrity": "sha1-sNBClG2ylTu50pKQCmy19tASIDE=" - }, - "node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } + "@ethersproject/logger": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.4.1.tgz", + "integrity": "sha512-DZ+bRinnYLPw1yAC64oRl0QyVZj43QeHIhVKfD/+YwSz4wsv1pfwb5SOFjz+r710YEWzU6LrhuSjpSO+6PeE4A==" }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "engines": { - "node": ">=0.10.0" + "@open-rpc/client-js": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@open-rpc/client-js/-/client-js-1.7.1.tgz", + "integrity": "sha512-DycSYZUGSUwFl+k9T8wLBSGA8f2hYkvS5A9AB94tBOuU8QlP468NS5ZtAxy72dF4g2WW0genwNJdfeFnHnaxXQ==", + "requires": { + "isomorphic-fetch": "^3.0.0", + "isomorphic-ws": "^4.0.1", + "strict-event-emitter-types": "^2.0.0", + "ws": "^7.0.0" } }, - "node_modules/denque": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz", - "integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ==", - "engines": { - "node": ">=0.10" - } + "@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==" }, - "node_modules/depd": { + "@szmarczak/http-timer": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "engines": { - "node": ">= 0.6" + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "requires": { + "defer-to-connect": "^1.0.1" } }, - "node_modules/destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + "@tsconfig/node10": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", + "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==" }, - "node_modules/dotenv": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", - "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==", - "engines": { - "node": ">=10" - } + "@tsconfig/node12": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz", + "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==" }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + "@tsconfig/node14": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz", + "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==" }, - "node_modules/encodeurl": { + "@tsconfig/node16": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", + "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==" }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "engines": { - "node": ">= 0.6" + "@types/bn.js": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", + "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", + "requires": { + "@types/node": "*" } }, - "node_modules/express": { - "version": "4.16.4", - "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", - "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", - "dependencies": { - "accepts": "~1.3.5", - "array-flatten": "1.1.1", - "body-parser": "1.18.3", - "content-disposition": "0.5.2", - "content-type": "~1.0.4", - "cookie": "0.3.1", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.1.1", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.4", - "qs": "6.5.2", - "range-parser": "~1.2.0", - "safe-buffer": "5.1.2", - "send": "0.16.2", - "serve-static": "1.13.2", - "setprototypeof": "1.1.0", - "statuses": "~1.4.0", - "type-is": "~1.6.16", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/express-graphql": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/express-graphql/-/express-graphql-0.12.0.tgz", - "integrity": "sha512-DwYaJQy0amdy3pgNtiTDuGGM2BLdj+YO2SgbKoLliCfuHv3VVTt7vNG/ZqK2hRYjtYHE2t2KB705EU94mE64zg==", - "dependencies": { - "accepts": "^1.3.7", - "content-type": "^1.0.4", - "http-errors": "1.8.0", - "raw-body": "^2.4.1" - }, - "engines": { - "node": ">= 10.x" - }, - "peerDependencies": { - "graphql": "^14.7.0 || ^15.3.0" - } - }, - "node_modules/express-graphql/node_modules/bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/express-graphql/node_modules/http-errors": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.0.tgz", - "integrity": "sha512-4I8r0C5JDhT5VkvI47QktDW75rNlGVsUf/8hzjCC/wkWI/jdTRmBb9aI7erSG82r1bjKY3F6k28WnsVxB1C73A==", - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/express-graphql/node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/express-graphql/node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/express-graphql/node_modules/raw-body": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.1.tgz", - "integrity": "sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA==", - "dependencies": { - "bytes": "3.1.0", - "http-errors": "1.7.3", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/express-graphql/node_modules/raw-body/node_modules/http-errors": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", - "integrity": "sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==", - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.4", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/express-graphql/node_modules/raw-body/node_modules/setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" - }, - "node_modules/express-graphql/node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" - }, - "node_modules/express-graphql/node_modules/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/express/node_modules/cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/finalhandler": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", - "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.4.0", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/graceful-readlink": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", - "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=" - }, - "node_modules/graphql": { - "version": "15.6.0", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-15.6.0.tgz", - "integrity": "sha512-WJR872Zlc9hckiEPhXgyUftXH48jp2EjO5tgBBOyNMRJZ9fviL2mJBD6CAysk6N5S0r9BTs09Qk39nnJBkvOXQ==", - "license": "MIT", - "engines": { - "node": ">= 10.x" - } - }, - "node_modules/http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - }, - "node_modules/is-promise": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", - "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" - }, - "node_modules/jade": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/jade/-/jade-1.11.0.tgz", - "integrity": "sha1-nIDlOMEtP7lcjZu5VZ+gzAQEBf0=", - "deprecated": "Jade has been renamed to pug, please install the latest version of pug instead of jade", - "license": "MIT", - "dependencies": { - "character-parser": "1.2.1", - "clean-css": "^3.1.9", - "commander": "~2.6.0", - "constantinople": "~3.0.1", - "jstransformer": "0.0.2", - "mkdirp": "~0.5.0", - "transformers": "2.1.0", - "uglify-js": "^2.4.19", - "void-elements": "~2.0.1", - "with": "~4.0.0" - }, - "bin": { - "jade": "bin/jade.js" - } - }, - "node_modules/jstransformer": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-0.0.2.tgz", - "integrity": "sha1-eq4pqQPRls+glz2IXT5HlH7Ndqs=", - "dependencies": { - "is-promise": "^2.0.0", - "promise": "^6.0.1" - } - }, - "node_modules/kareem": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.2.tgz", - "integrity": "sha512-STHz9P7X2L4Kwn72fA4rGyqyXdmrMSdxqHx9IXon/FXluXieaFA6KJ2upcHAHxQPQ0LeM/OjLrhFxifHewOALQ==" - }, - "node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/memory-pager": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", - "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", - "optional": true - }, - "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" - }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", - "bin": { - "mime": "cli.js" - } - }, - "node_modules/mime-db": { - "version": "1.50.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz", - "integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.33", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz", - "integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==", - "dependencies": { - "mime-db": "1.50.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/mongodb": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.1.2.tgz", - "integrity": "sha512-pHCKDoOy1h6mVurziJmXmTMPatYWOx8pbnyFgSgshja9Y36Q+caHUzTDY6rrIy9HCSrjnbXmx3pCtvNZHmR8xg==", - "dependencies": { - "bson": "^4.5.2", - "denque": "^2.0.1", - "mongodb-connection-string-url": "^2.0.0" - }, - "engines": { - "node": ">=12.9.0" - }, - "optionalDependencies": { - "saslprep": "^1.0.3" - } - }, - "node_modules/mongodb-connection-string-url": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.1.0.tgz", - "integrity": "sha512-Qf9Zw7KGiRljWvMrrUFDdVqo46KIEiDuCzvEN97rh/PcKzk2bd6n9KuzEwBwW9xo5glwx69y1mI6s+jFUD/aIQ==", - "dependencies": { - "@types/whatwg-url": "^8.2.1", - "whatwg-url": "^9.1.0" - } - }, - "node_modules/mongoose": { - "version": "6.0.9", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.0.9.tgz", - "integrity": "sha512-j9wcL8sltyIPBzMv785HFuGOdO8a5b70HX+e1q5QOogJxFofEXQoCcuurGlFSOe6j8M25qxHLzeVeKVcITeviQ==", - "dependencies": { - "bson": "^4.2.2", - "kareem": "2.3.2", - "mongodb": "4.1.2", - "mpath": "0.8.4", - "mquery": "4.0.0", - "ms": "2.1.2", - "regexp-clone": "1.0.0", - "sift": "13.5.2", - "sliced": "1.0.1" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mongoose" - } - }, - "node_modules/mongoose/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/morgan": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.9.1.tgz", - "integrity": "sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA==", - "dependencies": { - "basic-auth": "~2.0.0", - "debug": "2.6.9", - "depd": "~1.1.2", - "on-finished": "~2.3.0", - "on-headers": "~1.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/mpath": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.8.4.tgz", - "integrity": "sha512-DTxNZomBcTWlrMW76jy1wvV37X/cNNxPW1y2Jzd4DZkAaC5ZGsm8bfGfNOthcDuRJujXLqiuS6o3Tpy0JEoh7g==", - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/mquery": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mquery/-/mquery-4.0.0.tgz", - "integrity": "sha512-nGjm89lHja+T/b8cybAby6H0YgA4qYC/lx6UlwvHGqvTq8bDaNeCwl1sY8uRELrNbVWJzIihxVd+vphGGn1vBw==", - "dependencies": { - "debug": "4.x", - "regexp-clone": "^1.0.0", - "sliced": "1.0.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/mquery/node_modules/debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/mquery/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "node_modules/negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/optimist": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", - "integrity": "sha1-yQlBrVnkJzMokjB00s8ufLxuwNk=", - "dependencies": { - "wordwrap": "~0.0.2" - } - }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" - }, - "node_modules/promise": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/promise/-/promise-6.1.0.tgz", - "integrity": "sha1-LOcp9rlLRcJoka0GAsXJDgTG7vY=", - "dependencies": { - "asap": "~1.0.0" - } - }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "engines": { - "node": ">=6" - } - }, - "node_modules/qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", - "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", - "dependencies": { - "bytes": "3.0.0", - "http-errors": "1.6.3", - "iconv-lite": "0.4.23", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/regexp-clone": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz", - "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw==" - }, - "node_modules/repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "engines": { - "node": ">=0.10" - } - }, - "node_modules/right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", - "dependencies": { - "align-text": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "node_modules/saslprep": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", - "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", - "optional": true, - "dependencies": { - "sparse-bitfield": "^3.0.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/send": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", - "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", - "dependencies": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.6.2", - "mime": "1.4.1", - "ms": "2.0.0", - "on-finished": "~2.3.0", - "range-parser": "~1.2.0", - "statuses": "~1.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/serve-static": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", - "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.2", - "send": "0.16.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" - }, - "node_modules/sift": { - "version": "13.5.2", - "resolved": "https://registry.npmjs.org/sift/-/sift-13.5.2.tgz", - "integrity": "sha512-+gxdEOMA2J+AI+fVsCqeNn7Tgx3M9ZN9jdi95939l1IJ8cZsqS8sqpJyOkic2SJk+1+98Uwryt/gL6XDaV+UZA==" - }, - "node_modules/sliced": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", - "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" - }, - "node_modules/source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dependencies": { - "amdefine": ">=0.0.4" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/sparse-bitfield": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", - "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", - "optional": true, - "dependencies": { - "memory-pager": "^1.0.2" - } - }, - "node_modules/statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/tr46": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", - "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", - "dependencies": { - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/transformers": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/transformers/-/transformers-2.1.0.tgz", - "integrity": "sha1-XSPLNVYd2F3Gf7hIIwm0fVPM6ac=", - "deprecated": "Deprecated, use jstransformer", - "dependencies": { - "css": "~1.0.8", - "promise": "~2.0", - "uglify-js": "~2.2.5" - } - }, - "node_modules/transformers/node_modules/is-promise": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-1.0.1.tgz", - "integrity": "sha1-MVc3YcBX4zwukaq56W2gjO++duU=" - }, - "node_modules/transformers/node_modules/promise": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/promise/-/promise-2.0.0.tgz", - "integrity": "sha1-RmSKqdYFr10ucMMCS/WUNtoCuA4=", - "dependencies": { - "is-promise": "~1" - } - }, - "node_modules/transformers/node_modules/source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", - "dependencies": { - "amdefine": ">=0.0.4" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/transformers/node_modules/uglify-js": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.2.5.tgz", - "integrity": "sha1-puAqcNg5eSuXgEiLe4sYTAlcmcc=", - "dependencies": { - "optimist": "~0.3.5", - "source-map": "~0.1.7" - }, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", - "dependencies": { - "source-map": "~0.5.1", - "yargs": "~3.10.0" - }, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - }, - "optionalDependencies": { - "uglify-to-browserify": "~1.0.0" - } - }, - "node_modules/uglify-js/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "optional": true - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/void-elements": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", - "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/webidl-conversions": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", - "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", - "engines": { - "node": ">=10.4" - } - }, - "node_modules/whatwg-url": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-9.1.0.tgz", - "integrity": "sha512-CQ0UcrPHyomtlOCot1TL77WyMIm/bCwrJ2D6AOKGwEczU9EpyoqAokfqrf/MioU9kHcMsmJZcg1egXix2KYEsA==", - "dependencies": { - "tr46": "^2.1.0", - "webidl-conversions": "^6.1.0" - }, - "engines": { - "node": ">=12" + "@types/eccrypto": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@types/eccrypto/-/eccrypto-1.1.3.tgz", + "integrity": "sha512-3O0qER6JMYReqVbcQTGmXeMHdw3O+rVps63tlo5g5zoB3altJS8yzSvboSivwVWeYO9o5jSATu7P0UIqYZPgow==", + "requires": { + "@types/expect": "^1.20.4", + "@types/node": "*" } }, - "node_modules/window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", - "engines": { - "node": ">= 0.8.0" + "@types/elliptic": { + "version": "6.4.13", + "resolved": "https://registry.npmjs.org/@types/elliptic/-/elliptic-6.4.13.tgz", + "integrity": "sha512-e8iyLJ8vMLpWxXpVWrIt0ujqsfHWgVe5XAz9IMhBYoDirK6th7J+mHjzp797OLc62ZX419nrlwwzsNAA0a0mKg==", + "requires": { + "@types/bn.js": "*" } }, - "node_modules/with": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/with/-/with-4.0.3.tgz", - "integrity": "sha1-7v0VTp550sjTQXtkeo8U2f7M4U4=", - "dependencies": { - "acorn": "^1.0.1", - "acorn-globals": "^1.0.3" + "@types/eslint": { + "version": "7.28.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.28.1.tgz", + "integrity": "sha512-XhZKznR3i/W5dXqUhgU9fFdJekufbeBd5DALmkuXoeFcjbQcPk+2cL+WLHf6Q81HWAnM2vrslIHpGVyCAviRwg==", + "requires": { + "@types/estree": "*", + "@types/json-schema": "*" } }, - "node_modules/with/node_modules/acorn": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz", - "integrity": "sha1-yM4n3grMdtiW0rH6099YjZ6C8BQ=", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" + "@types/eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha512-SCFeogqiptms4Fg29WpOTk5nHIzfpKCemSN63ksBQYKTcXoJEmJagV+DhVmbapZzY4/5YaOV1nZwrsU79fFm1g==", + "requires": { + "@types/eslint": "*", + "@types/estree": "*" } }, - "node_modules/wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "engines": { - "node": ">=0.4.0" + "@types/estree": { + "version": "0.0.50", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz", + "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==" + }, + "@types/expect": { + "version": "1.20.4", + "resolved": "https://registry.npmjs.org/@types/expect/-/expect-1.20.4.tgz", + "integrity": "sha512-Q5Vn3yjTDyCMV50TB6VRIbQNxSE4OmZR86VSbGaNpfUolm0iePBB4KdEEHmxoY5sT2+2DIvXW0rvMDP2nHZ4Mg==" + }, + "@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==" + }, + "@types/node": { + "version": "16.11.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.1.tgz", + "integrity": "sha512-PYGcJHL9mwl1Ek3PLiYgyEKtwTMmkMw4vbiyz/ps3pfdRYLVv+SN7qHVAImrjdAXxgluDEw6Ph4lyv+m9UpRmA==" + }, + "@types/pbkdf2": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", + "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", + "requires": { + "@types/node": "*" } }, - "node_modules/yargs": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", - "dependencies": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" + "@types/secp256k1": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.3.tgz", + "integrity": "sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==", + "requires": { + "@types/node": "*" } - } - }, - "dependencies": { - "@types/node": { - "version": "16.10.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.2.tgz", - "integrity": "sha512-zCclL4/rx+W5SQTzFs9wyvvyCwoK9QtBpratqz2IYJ3O8Umrn0m3nsTv0wQBk9sRGpvUe9CwPDrQFB10f1FIjQ==" }, "@types/webidl-conversions": { "version": "6.1.1", @@ -1379,6 +254,152 @@ "@types/webidl-conversions": "*" } }, + "@webassemblyjs/ast": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", + "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "requires": { + "@webassemblyjs/helper-numbers": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", + "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==" + }, + "@webassemblyjs/helper-api-error": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", + "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==" + }, + "@webassemblyjs/helper-buffer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", + "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==" + }, + "@webassemblyjs/helper-numbers": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", + "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "requires": { + "@webassemblyjs/floating-point-hex-parser": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", + "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==" + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", + "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1" + } + }, + "@webassemblyjs/ieee754": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", + "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "requires": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", + "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "requires": { + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/utf8": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", + "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==" + }, + "@webassemblyjs/wasm-edit": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", + "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/helper-wasm-section": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-opt": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "@webassemblyjs/wast-printer": "1.11.1" + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", + "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", + "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", + "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", + "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==" + }, + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + }, "accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", @@ -1389,9 +410,9 @@ } }, "acorn": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz", - "integrity": "sha1-q259nYhqrKiwhbwzEreaGYQz8Oc=" + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==" }, "acorn-globals": { "version": "1.0.9", @@ -1399,8 +420,41 @@ "integrity": "sha1-VbtemGkVB7dFedBRNBMhfDgMVM8=", "requires": { "acorn": "^2.1.0" + }, + "dependencies": { + "acorn": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz", + "integrity": "sha1-q259nYhqrKiwhbwzEreaGYQz8Oc=" + } + } + }, + "acorn-import-assertions": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", + "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==" + }, + "acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==" + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" } }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==" + }, "align-text": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", @@ -1416,6 +470,49 @@ "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" }, + "ansi-align": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", + "requires": { + "string-width": "^4.1.0" + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -1426,6 +523,30 @@ "resolved": "https://registry.npmjs.org/asap/-/asap-1.0.0.tgz", "integrity": "sha1-sqRdpf36ILBJb8N2jMJ8EvqRan0=" }, + "asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "base-x": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", + "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, "base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -1437,8 +558,48 @@ "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", "requires": { "safe-buffer": "5.1.2" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "bip66": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", + "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", + "optional": true, + "requires": { + "safe-buffer": "^5.0.1" } }, + "blakejs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.1.tgz", + "integrity": "sha512-bLG6PHOCZJKNshTjGRBvET0vTciwQE6zFKOKKXPDJfwFBd4Ac0yBfPZqcGvGJap50l7ktvlpFqc2jGVaUgbJgg==" + }, + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "body-parser": { "version": "1.18.3", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", @@ -1456,10 +617,97 @@ "type-is": "~1.6.16" } }, + "boxen": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", + "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", + "requires": { + "ansi-align": "^3.0.0", + "camelcase": "^6.2.0", + "chalk": "^4.1.0", + "cli-boxes": "^2.2.1", + "string-width": "^4.2.2", + "type-fest": "^0.20.2", + "widest-line": "^3.1.0", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "camelcase": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==" + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "requires": { + "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": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.4.tgz", + "integrity": "sha512-Zg7RpbZpIJRW3am9Lyckue7PLytvVxxhJj1CaJVlCWENsGEAOlnlt8X0ZxGRPp7Bt9o8tIRM5SEXy4BCPMJjLQ==", + "requires": { + "caniuse-lite": "^1.0.30001265", + "electron-to-chromium": "^1.3.867", + "escalade": "^3.1.1", + "node-releases": "^2.0.0", + "picocolors": "^1.0.0" + } + }, + "bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", + "requires": { + "base-x": "^3.0.2" + } + }, + "bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "requires": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, "bson": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/bson/-/bson-4.5.2.tgz", - "integrity": "sha512-8CEMJpwc7qlQtrn2rney38jQSEeMar847lz0LyitwRmVknAW8iHXrzW4fTjHfyWm0E3sukyD/zppdH+QU1QefA==", + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/bson/-/bson-4.5.3.tgz", + "integrity": "sha512-qVX7LX79Mtj7B3NPLzCfBiCP6RAsjiV8N63DjlaVVpZW+PFoDTxQ4SeDbSpcqgE6mXksM5CAwZnXxxxn/XwC0g==", "requires": { "buffer": "^5.6.0" } @@ -1473,16 +721,90 @@ "ieee754": "^1.1.13" } }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" + }, "bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" }, + "cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" + }, + "dependencies": { + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "requires": { + "pump": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" + } + } + }, "camelcase": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=" }, + "caniuse-lite": { + "version": "1.0.30001269", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001269.tgz", + "integrity": "sha512-UOy8okEVs48MyHYgV+RdW1Oiudl1H6KolybD6ZquD0VcrPSgj25omXO1S7rDydjpqaISCwA8Pyx+jUQKZwWO5w==" + }, + "casper-js-sdk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/casper-js-sdk/-/casper-js-sdk-2.4.1.tgz", + "integrity": "sha512-89EZdwL8OAWP/SROWC7p6YzDKaCErOHlPRrkxvTnFw65QB2r4ow7BKNkYqJ8j69PBhKjPAk43mYRED3dIPM2Sg==", + "requires": { + "@ethersproject/bignumber": "^5.0.8", + "@ethersproject/bytes": "^5.0.5", + "@ethersproject/constants": "^5.0.5", + "@open-rpc/client-js": "^1.6.2", + "@types/eccrypto": "^1.1.2", + "blakejs": "^1.1.0", + "eccrypto": "^1.1.6", + "eslint-plugin-prettier": "^3.4.0", + "ethereum-cryptography": "^0.1.3", + "glob": "^7.1.6", + "humanize-duration": "^3.24.0", + "key-encoder": "^2.0.3", + "reflect-metadata": "^0.1.13", + "ts-results": "^3.2.1", + "tweetnacl-ts": "^1.0.3", + "tweetnacl-util": "^0.15.0", + "typedjson": "^1.6.0-rc2", + "webpack": "^5.24.3" + } + }, "center-align": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", @@ -1492,11 +814,64 @@ "lazy-cache": "^1.0.3" } }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "character-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/character-parser/-/character-parser-1.2.1.tgz", "integrity": "sha1-wN3kqxgnE7kZuXCVmhI+zBow/NY=" }, + "chokidar": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", + "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, + "chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==" + }, + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "clean-css": { "version": "3.4.28", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-3.4.28.tgz", @@ -1513,9 +888,22 @@ "requires": { "graceful-readlink": ">= 1.0.0" } + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "requires": { + "amdefine": ">=0.0.4" + } } } }, + "cli-boxes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==" + }, "cliui": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", @@ -1524,12 +912,58 @@ "center-align": "^0.1.1", "right-align": "^0.1.1", "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" + } + } + }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "requires": { + "mimic-response": "^1.0.0" } }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, "commander": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.6.0.tgz", - "integrity": "sha1-nfflL7Kgyw+4kFjugMMQQiXzfh0=" + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "configstore": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", + "requires": { + "dot-prop": "^5.2.0", + "graceful-fs": "^4.1.2", + "make-dir": "^3.0.0", + "unique-string": "^2.0.0", + "write-file-atomic": "^3.0.0", + "xdg-basedir": "^4.0.0" + } }, "constantinople": { "version": "3.0.2", @@ -1537,6 +971,13 @@ "integrity": "sha1-S5RdmTeQe82Y7ldRIsOBdRZUQUE=", "requires": { "acorn": "^2.1.0" + }, + "dependencies": { + "acorn": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz", + "integrity": "sha1-q259nYhqrKiwhbwzEreaGYQz8Oc=" + } } }, "content-disposition": { @@ -1568,6 +1009,41 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" + }, + "crypto-random-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==" + }, "css": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/css/-/css-1.0.8.tgz", @@ -1600,6 +1076,24 @@ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "requires": { + "mimic-response": "^1.0.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" + }, + "defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==" + }, "denque": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz", @@ -1615,31 +1109,228 @@ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" + }, + "dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", + "requires": { + "is-obj": "^2.0.0" + } + }, "dotenv": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==" }, + "drbg.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", + "integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=", + "optional": true, + "requires": { + "browserify-aes": "^1.0.6", + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4" + } + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" + }, + "eccrypto": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/eccrypto/-/eccrypto-1.1.6.tgz", + "integrity": "sha512-d78ivVEzu7Tn0ZphUUaL43+jVPKTMPFGtmgtz1D0LrFn7cY3K8CdrvibuLz2AAkHBLKZtR8DMbB2ukRYFk987A==", + "requires": { + "acorn": "7.1.1", + "elliptic": "6.5.4", + "es6-promise": "4.2.8", + "nan": "2.14.0", + "secp256k1": "3.7.1" + } + }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, + "electron-to-chromium": { + "version": "1.3.871", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.871.tgz", + "integrity": "sha512-qcLvDUPf8DSIMWarHT2ptgcqrYg62n3vPA7vhrOF24d8UNzbUBaHu2CySiENR3nEDzYgaN60071t0F6KLYMQ7Q==" + }, + "elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "requires": { + "once": "^1.4.0" + } + }, + "enhanced-resolve": { + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz", + "integrity": "sha512-EGAbGvH7j7Xt2nc0E7D99La1OiEs8LnyimkRgwExpUMScN6O+3x9tIWs7PLQZVNx4YD+00skHXPXi1yQHpAmZA==", + "requires": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + } + }, + "es-module-lexer": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", + "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==" + }, + "es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + }, + "escape-goat": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==" + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "eslint-plugin-prettier": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.1.tgz", + "integrity": "sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==", + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" + }, "etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, + "ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "requires": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + }, + "dependencies": { + "secp256k1": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", + "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", + "requires": { + "elliptic": "^6.5.2", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + } + } + } + }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, "express": { "version": "4.16.4", "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", @@ -1681,6 +1372,11 @@ "version": "0.3.1", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" } } }, @@ -1720,11 +1416,6 @@ "safer-buffer": ">= 2.1.2 < 3" } }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, "raw-body": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.1.tgz", @@ -1767,6 +1458,35 @@ } } }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==" + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "optional": true + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, "finalhandler": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", @@ -1791,15 +1511,148 @@ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "requires": { + "pump": "^3.0.0" + } + }, + "glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "requires": { + "is-glob": "^4.0.1" + } + }, + "glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" + }, + "global-dirs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", + "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", + "requires": { + "ini": "2.0.0" + } + }, + "got": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "requires": { + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" + } + }, + "graceful-fs": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" + }, "graceful-readlink": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=" }, "graphql": { - "version": "15.6.0", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-15.6.0.tgz", - "integrity": "sha512-WJR872Zlc9hckiEPhXgyUftXH48jp2EjO5tgBBOyNMRJZ9fviL2mJBD6CAysk6N5S0r9BTs09Qk39nnJBkvOXQ==" + "version": "15.6.1", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-15.6.1.tgz", + "integrity": "sha512-3i5lu0z6dRvJ48QP9kFxBkJ7h4Kso7PS8eahyTFz5Jm6CvQfLtNIE8LX9N6JLnXTuwR+sIYnXzaWp6anOg0QQw==" + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "has-yarn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==" + }, + "hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "requires": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" }, "http-errors": { "version": "1.6.3", @@ -1810,8 +1663,20 @@ "inherits": "2.0.3", "setprototypeof": "1.1.0", "statuses": ">= 1.4.0 < 2" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + } } }, + "humanize-duration": { + "version": "3.27.0", + "resolved": "https://registry.npmjs.org/humanize-duration/-/humanize-duration-3.27.0.tgz", + "integrity": "sha512-qLo/08cNc3Tb0uD7jK0jAcU5cnqCM0n568918E7R2XhMr/+7F37p4EY062W/stg7tmzvknNn9b/1+UhVRzsYrQ==" + }, "iconv-lite": { "version": "0.4.23", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", @@ -1825,26 +1690,150 @@ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" }, + "ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=" + }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=" + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==" }, "ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "requires": { + "binary-extensions": "^2.0.0" + } + }, "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "requires": { + "ci-info": "^2.0.0" + } + }, + "is-core-module": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", + "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", + "requires": { + "has": "^1.0.3" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-installed-globally": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", + "requires": { + "global-dirs": "^3.0.0", + "is-path-inside": "^3.0.2" + } + }, + "is-npm": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", + "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==" + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==" + }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==" + }, "is-promise": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "is-yarn-global": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==" + }, + "isomorphic-fetch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz", + "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==", + "requires": { + "node-fetch": "^2.6.1", + "whatwg-fetch": "^3.4.1" + } + }, + "isomorphic-ws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", + "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==" + }, "jade": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/jade/-/jade-1.11.0.tgz", @@ -1860,8 +1849,54 @@ "uglify-js": "^2.4.19", "void-elements": "~2.0.1", "with": "~4.0.0" + }, + "dependencies": { + "commander": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.6.0.tgz", + "integrity": "sha1-nfflL7Kgyw+4kFjugMMQQiXzfh0=" + } + } + }, + "jest-worker": { + "version": "27.3.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.3.0.tgz", + "integrity": "sha512-xTTvvJqOjKBqE1AmwDHiQN8qzp9VoT981LtfXA+XiJVxHn4435vpnrzVcJ6v/ESiuB+IXPjZakn/ppT00xBCWA==", + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" } }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, "jstransformer": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-0.0.2.tgz", @@ -1876,6 +1911,35 @@ "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.2.tgz", "integrity": "sha512-STHz9P7X2L4Kwn72fA4rGyqyXdmrMSdxqHx9IXon/FXluXieaFA6KJ2upcHAHxQPQ0LeM/OjLrhFxifHewOALQ==" }, + "keccak": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.2.tgz", + "integrity": "sha512-PyKKjkH53wDMLGrvmRGSNWgmSxZOUqbnXwKL9tmgbFYA1iAYqW21kfR7mZXV0MlESiefxQQE9X9fTa3X+2MPDQ==", + "requires": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0", + "readable-stream": "^3.6.0" + } + }, + "key-encoder": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/key-encoder/-/key-encoder-2.0.3.tgz", + "integrity": "sha512-fgBtpAGIr/Fy5/+ZLQZIPPhsZEcbSlYu/Wu96tNDFNSjSACw5lEIOFeaVdQ/iwrb8oxjlWi6wmWdH76hV6GZjg==", + "requires": { + "@types/elliptic": "^6.4.9", + "asn1.js": "^5.0.1", + "bn.js": "^4.11.8", + "elliptic": "^6.4.1" + } + }, + "keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "requires": { + "json-buffer": "3.0.0" + } + }, "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", @@ -1884,16 +1948,72 @@ "is-buffer": "^1.1.5" } }, + "latest-version": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", + "requires": { + "package-json": "^6.3.0" + } + }, "lazy-cache": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" }, + "loader-runner": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.2.0.tgz", + "integrity": "sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==" + }, "longest": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "requires": { + "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -1910,6 +2030,11 @@ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -1933,6 +2058,29 @@ "mime-db": "1.50.0" } }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, "minimist": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", @@ -1964,12 +2112,36 @@ "requires": { "@types/whatwg-url": "^8.2.1", "whatwg-url": "^9.1.0" + }, + "dependencies": { + "tr46": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", + "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", + "requires": { + "punycode": "^2.1.1" + } + }, + "webidl-conversions": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", + "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==" + }, + "whatwg-url": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-9.1.0.tgz", + "integrity": "sha512-CQ0UcrPHyomtlOCot1TL77WyMIm/bCwrJ2D6AOKGwEczU9EpyoqAokfqrf/MioU9kHcMsmJZcg1egXix2KYEsA==", + "requires": { + "tr46": "^2.1.0", + "webidl-conversions": "^6.1.0" + } + } } }, "mongoose": { - "version": "6.0.9", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.0.9.tgz", - "integrity": "sha512-j9wcL8sltyIPBzMv785HFuGOdO8a5b70HX+e1q5QOogJxFofEXQoCcuurGlFSOe6j8M25qxHLzeVeKVcITeviQ==", + "version": "6.0.11", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.0.11.tgz", + "integrity": "sha512-ESLnGIZB15xpqAbtjL/wcx+NEmzewlNuST/Dp/md4eqirVGTuEeN+IhS4qr3D5GFhnQAGdadpGlTfrWj5Ggykw==", "requires": { "bson": "^4.2.2", "kareem": "2.3.2", @@ -2031,15 +2203,111 @@ } } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "nan": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" + }, + "node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" + }, + "node-fetch": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.5.tgz", + "integrity": "sha512-mmlIVHJEu5rnIxgEgez6b9GgWXbkZj5YZ7fx+2r94a2E+Uirsp6HsPTPlomfdHtpt/B0cdKviwkoaM6pyvUOpQ==", + "requires": { + "whatwg-url": "^5.0.0" + } + }, + "node-gyp-build": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.3.0.tgz", + "integrity": "sha512-iWjXZvmboq0ja1pUGULQBexmxq8CV4xBhX7VDOTbL7ZR4FOowwY/VOtRxBN/yKxmdGoIp4j5ysNT4u3S2pDQ3Q==" + }, + "node-releases": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.0.tgz", + "integrity": "sha512-aA87l0flFYMzCHpTM3DERFSYxc6lv/BltdbRTOMZuxZ0cwZCD3mejE5n9vLhSJCN++/eOqr77G1IO5uXxlQYWA==" + }, + "nodemon": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.13.tgz", + "integrity": "sha512-UMXMpsZsv1UXUttCn6gv8eQPhn6DR4BW+txnL3IN5IHqrCwcrT/yWHfL35UsClGXknTH79r5xbu+6J1zNHuSyA==", + "requires": { + "chokidar": "^3.2.2", + "debug": "^3.2.6", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.0.4", + "pstree.remy": "^1.1.7", + "semver": "^5.7.1", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.3", + "update-notifier": "^5.1.0" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", + "requires": { + "abbrev": "1" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" }, - "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + "normalize-url": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==" }, "on-finished": { "version": "2.3.0", @@ -2054,6 +2322,14 @@ "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, "optimist": { "version": "0.3.7", "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", @@ -2062,16 +2338,97 @@ "wordwrap": "~0.0.2" } }, + "p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==" + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "package-json": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", + "requires": { + "got": "^9.6.0", + "registry-auth-token": "^4.0.0", + "registry-url": "^5.0.0", + "semver": "^6.2.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, + "pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + }, + "picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" + }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" + }, + "prettier": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.1.tgz", + "integrity": "sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==" + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "requires": { + "fast-diff": "^1.1.2" + } + }, "promise": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/promise/-/promise-6.1.0.tgz", @@ -2089,16 +2446,46 @@ "ipaddr.js": "1.9.1" } }, + "pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==" + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, + "pupa": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "requires": { + "escape-goat": "^2.0.0" + } + }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "requires": { + "safe-buffer": "^5.1.0" + } + }, "range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -2115,16 +2502,90 @@ "unpipe": "1.0.0" } }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + } + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "requires": { + "picomatch": "^2.2.1" + } + }, + "reflect-metadata": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", + "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==" + }, "regexp-clone": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz", "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw==" }, + "registry-auth-token": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", + "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", + "requires": { + "rc": "^1.2.8" + } + }, + "registry-url": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", + "requires": { + "rc": "^1.2.8" + } + }, "repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" }, + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "requires": { + "lowercase-keys": "^1.0.0" + } + }, "right-align": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", @@ -2133,10 +2594,19 @@ "align-text": "^0.1.1" } }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, "safer-buffer": { "version": "2.1.2", @@ -2152,6 +2622,57 @@ "sparse-bitfield": "^3.0.3" } }, + "schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + }, + "scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" + }, + "secp256k1": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.7.1.tgz", + "integrity": "sha512-1cf8sbnRreXrQFdH6qsg2H71Xw91fCCS9Yp021GnUNJzWJS/py96fS4lHbnTnouLp08Xj6jBoBB6V78Tdbdu5g==", + "optional": true, + "requires": { + "bindings": "^1.5.0", + "bip66": "^1.1.5", + "bn.js": "^4.11.8", + "create-hash": "^1.2.0", + "drbg.js": "^1.0.1", + "elliptic": "^6.4.1", + "nan": "^2.14.0", + "safe-buffer": "^5.1.2" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "semver-diff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", + "requires": { + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, "send": { "version": "0.16.2", "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", @@ -2172,6 +2693,14 @@ "statuses": "~1.4.0" } }, + "serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "requires": { + "randombytes": "^2.1.0" + } + }, "serve-static": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", @@ -2183,27 +2712,52 @@ "send": "0.16.2" } }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, "setprototypeof": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "sift": { "version": "13.5.2", "resolved": "https://registry.npmjs.org/sift/-/sift-13.5.2.tgz", "integrity": "sha512-+gxdEOMA2J+AI+fVsCqeNn7Tgx3M9ZN9jdi95939l1IJ8cZsqS8sqpJyOkic2SJk+1+98Uwryt/gL6XDaV+UZA==" }, + "signal-exit": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", + "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==" + }, "sliced": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" }, "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "source-map-support": { + "version": "0.5.20", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", + "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", "requires": { - "amdefine": ">=0.0.4" + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" } }, "sparse-bitfield": { @@ -2215,24 +2769,126 @@ "memory-pager": "^1.0.2" } }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, "statuses": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" }, + "strict-event-emitter-types": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strict-event-emitter-types/-/strict-event-emitter-types-2.0.0.tgz", + "integrity": "sha512-Nk/brWYpD85WlOgzw5h173aci0Teyv8YdIAEtV+N88nDB0dLlazZyJMIsN6eo1/AR61l+p6CJTG1JIyFaoNEEA==" + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "requires": { + "has-flag": "^4.0.0" + } + }, + "tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==" + }, + "terser": { + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.9.0.tgz", + "integrity": "sha512-h5hxa23sCdpzcye/7b8YqbE5OwKca/ni0RQz1uRX3tGh8haaGHqcuSqbGRybuAKNdntZ0mDgFNXPJ48xQ2RXKQ==", + "requires": { + "commander": "^2.20.0", + "source-map": "~0.7.2", + "source-map-support": "~0.5.20" + }, + "dependencies": { + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==" + } + } + }, + "terser-webpack-plugin": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.2.4.tgz", + "integrity": "sha512-E2CkNMN+1cho04YpdANyRrn8CyN4yMy+WdFKZIySFZrGXZxJwJP6PMNGGc/Mcr6qygQHUUqRxnAPmi0M9f00XA==", + "requires": { + "jest-worker": "^27.0.6", + "p-limit": "^3.1.0", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.0", + "source-map": "^0.6.1", + "terser": "^5.7.2" + } + }, + "to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==" + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + }, "toidentifier": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" }, - "tr46": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", - "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", + "touch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", "requires": { - "punycode": "^2.1.1" + "nopt": "~1.0.10" } }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + }, "transformers": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/transformers/-/transformers-2.1.0.tgz", @@ -2275,6 +2931,139 @@ } } }, + "ts-node": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.3.0.tgz", + "integrity": "sha512-RYIy3i8IgpFH45AX4fQHExrT8BxDeKTdC83QFJkNzkvt8uFB6QJ8XMyhynYiKMLxt9a7yuXaDBZNOYS3XjDcYw==", + "requires": { + "@cspotcode/source-map-support": "0.7.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "yn": "3.1.1" + }, + "dependencies": { + "acorn": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", + "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==" + } + } + }, + "ts-results": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ts-results/-/ts-results-3.3.0.tgz", + "integrity": "sha512-FWqxGX2NHp5oCyaMd96o2y2uMQmSu8Dey6kvyuFdRJ2AzfmWo3kWa4UsPlCGlfQ/qu03m09ZZtppMoY8EMHuiA==" + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "tslint": { + "version": "5.20.1", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.20.1.tgz", + "integrity": "sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg==", + "requires": { + "@babel/code-frame": "^7.0.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^4.0.1", + "glob": "^7.1.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.8.0", + "tsutils": "^2.29.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "tslint-config-prettier": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz", + "integrity": "sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg==" + }, + "tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "requires": { + "tslib": "^1.8.1" + } + }, + "tweetnacl-ts": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl-ts/-/tweetnacl-ts-1.0.3.tgz", + "integrity": "sha512-C5I/dWf6xjAXaCDlf84T4HvozU/8ycAlq5WRllF1hAeeq5390tfXD+bNas5bhEV0HMSOx8bsQYpLjPl8wfnEeQ==", + "requires": { + "tslib": "^1" + } + }, + "tweetnacl-util": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", + "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==" + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" + }, "type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -2284,6 +3073,34 @@ "mime-types": "~2.1.24" } }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "requires": { + "is-typedarray": "^1.0.0" + } + }, + "typedjson": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/typedjson/-/typedjson-1.8.0.tgz", + "integrity": "sha512-taVJVGebQDagEmVc3Cu6vVVLkWLnxqPcTrkVgbpAsI02ZDDrnHy5zvt1JVqXv4/yztBgZAX1oR07+bkiusGJLQ==", + "requires": { + "tslib": "^2.0.1" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + } + } + }, + "typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==" + }, "uglify-js": { "version": "2.8.29", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", @@ -2307,11 +3124,76 @@ "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", "optional": true }, + "undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==" + }, + "unique-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", + "requires": { + "crypto-random-string": "^2.0.0" + } + }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" }, + "update-notifier": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", + "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", + "requires": { + "boxen": "^5.0.0", + "chalk": "^4.1.0", + "configstore": "^5.0.1", + "has-yarn": "^2.1.0", + "import-lazy": "^2.1.0", + "is-ci": "^2.0.0", + "is-installed-globally": "^0.4.0", + "is-npm": "^5.0.0", + "is-yarn-global": "^0.3.0", + "latest-version": "^5.1.0", + "pupa": "^2.1.1", + "semver": "^7.3.4", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" + }, + "dependencies": { + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "requires": { + "prepend-http": "^2.0.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, "utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", @@ -2327,18 +3209,83 @@ "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=" }, + "watchpack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.2.0.tgz", + "integrity": "sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA==", + "requires": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + } + }, "webidl-conversions": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", - "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + }, + "webpack": { + "version": "5.58.2", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.58.2.tgz", + "integrity": "sha512-3S6e9Vo1W2ijk4F4PPWRIu6D/uGgqaPmqw+av3W3jLDujuNkdxX5h5c+RQ6GkjVR+WwIPOfgY8av+j5j4tMqJw==", + "requires": { + "@types/eslint-scope": "^3.7.0", + "@types/estree": "^0.0.50", + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/wasm-edit": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "acorn": "^8.4.1", + "acorn-import-assertions": "^1.7.6", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.8.3", + "es-module-lexer": "^0.9.0", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.4", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.1.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.1.3", + "watchpack": "^2.2.0", + "webpack-sources": "^3.2.0" + }, + "dependencies": { + "acorn": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", + "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==" + } + } + }, + "webpack-sources": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.1.tgz", + "integrity": "sha512-t6BMVLQ0AkjBOoRTZgqrWm7xbXMBzD+XDq2EZ96+vMfn3qKgsvdXZhbPZ4ElUOpdv4u+iiGe+w3+J75iy/bYGA==" + }, + "whatwg-fetch": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz", + "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==" }, "whatwg-url": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-9.1.0.tgz", - "integrity": "sha512-CQ0UcrPHyomtlOCot1TL77WyMIm/bCwrJ2D6AOKGwEczU9EpyoqAokfqrf/MioU9kHcMsmJZcg1egXix2KYEsA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", "requires": { - "tr46": "^2.1.0", - "webidl-conversions": "^6.1.0" + "string-width": "^4.0.0" } }, "window-size": { @@ -2363,9 +3310,50 @@ } }, "wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "requires": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "ws": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz", + "integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==" + }, + "xdg-basedir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==" + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "yargs": { "version": "3.10.0", @@ -2377,6 +3365,16 @@ "decamelize": "^1.0.0", "window-size": "0.1.0" } + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" } } } diff --git a/package.json b/package.json index 257ba802..caef5c1b 100644 --- a/package.json +++ b/package.json @@ -3,21 +3,26 @@ "version": "0.0.0", "private": true, "scripts": { - "start": "nodemon ./bin/www" + "start": "ts-node ./bin/www" }, "dependencies": { "cookie-parser": "~1.4.4", "debug": "~2.6.9", - "dotenv": "^10.0.0", "express": "~4.16.1", "express-graphql": "^0.12.0", "graphql": "^15.6.0", "http-errors": "~1.6.3", "jade": "~1.11.0", "mongoose": "^6.0.8", - "morgan": "~1.9.1" - }, - "devdependencies": { + "morgan": "~1.9.1", + "casper-js-sdk": "2.4.1", + "ts-results": "^3.3.0", + "dotenv": "^10.0.0", + "prettier": "^2.3.2", + "ts-node": "^10.1.0", + "tslint": "^5.12.1", + "tslint-config-prettier": "^1.18.0", + "typescript": "^3.3.3", "nodemon": "^2.0.13" } }