From 27d986ea65145e1fe5c5fb9893a465e0ee908f38 Mon Sep 17 00:00:00 2001 From: librelois <c@elo.tf> Date: Sun, 25 Jul 2021 16:17:37 +0200 Subject: [PATCH] chore: split into 3 runtimes: gdev, gtest and g1 --- Cargo.lock | 240 +- Cargo.toml | 4 +- node/Cargo.toml | 58 +- node/src/chain_spec.rs | 237 +- node/src/chain_spec/g1.rs | 21 + node/src/chain_spec/gdev.rs | 147 + node/src/chain_spec/gtest.rs | 264 ++ node/src/cli.rs | 50 + node/src/command.rs | 152 +- node/src/lib.rs | 17 + node/src/main.rs | 20 +- node/src/rpc.rs | 37 +- node/src/service.rs | 356 +- node/src/service/client.rs | 308 ++ runtime/common/Cargo.toml | 83 + runtime/common/src/apis.rs | 190 + runtime/{ => common}/src/authorizations.rs | 67 +- runtime/common/src/constants.rs | 41 + runtime/{ => common}/src/entities.rs | 0 runtime/common/src/fees.rs | 38 + runtime/common/src/handlers.rs | 137 + runtime/common/src/lib.rs | 60 + runtime/{ => g1}/Cargo.toml | 29 +- runtime/{ => g1}/build.rs | 0 runtime/{ => g1}/src/lib.rs | 292 +- runtime/gdev/Cargo.toml | 234 + runtime/gdev/build.rs | 25 + runtime/gdev/src/lib.rs | 392 ++ runtime/gtest/Cargo.toml | 243 + runtime/gtest/build.rs | 25 + runtime/gtest/src/lib.rs | 421 ++ runtime/src/handlers.rs | 105 - tests/README.md | 88 + tests/constants.ts | 6 + tests/dev-node.ts | 131 + tests/package-lock.json | 4870 ++++++++++++++++++++ tests/package.json | 57 + tests/tsconfig.json | 7 + 38 files changed, 8679 insertions(+), 773 deletions(-) create mode 100644 node/src/chain_spec/g1.rs create mode 100644 node/src/chain_spec/gdev.rs create mode 100644 node/src/chain_spec/gtest.rs create mode 100644 node/src/service/client.rs create mode 100644 runtime/common/Cargo.toml create mode 100644 runtime/common/src/apis.rs rename runtime/{ => common}/src/authorizations.rs (61%) create mode 100644 runtime/common/src/constants.rs rename runtime/{ => common}/src/entities.rs (100%) create mode 100644 runtime/common/src/fees.rs create mode 100644 runtime/common/src/handlers.rs create mode 100644 runtime/common/src/lib.rs rename runtime/{ => g1}/Cargo.toml (91%) rename runtime/{ => g1}/build.rs (100%) rename runtime/{ => g1}/src/lib.rs (59%) create mode 100644 runtime/gdev/Cargo.toml create mode 100644 runtime/gdev/build.rs create mode 100644 runtime/gdev/src/lib.rs create mode 100644 runtime/gtest/Cargo.toml create mode 100644 runtime/gtest/build.rs create mode 100644 runtime/gtest/src/lib.rs delete mode 100644 runtime/src/handlers.rs create mode 100644 tests/README.md create mode 100644 tests/constants.ts create mode 100644 tests/dev-node.ts create mode 100644 tests/package-lock.json create mode 100644 tests/package.json create mode 100644 tests/tsconfig.json diff --git a/Cargo.lock b/Cargo.lock index cf72eb9c2..828bb6ba0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -162,6 +162,12 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d6e24d2cce90c53b948c46271bfb053e4bdc2db9b5d3f65e20f8cf28a1b7fc3" +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + [[package]] name = "async-channel" version = "1.6.1" @@ -807,6 +813,24 @@ dependencies = [ "bitflags", ] +[[package]] +name = "common-runtime" +version = "0.8.0-dev" +dependencies = [ + "frame-support", + "frame-system", + "pallet-certification", + "pallet-identity", + "pallet-ud-accounts-storage", + "parity-scale-codec", + "serde", + "smallvec 1.6.1", + "sp-arithmetic", + "sp-core", + "sp-runtime", + "sp-std", +] + [[package]] name = "concurrent-queue" version = "1.2.2" @@ -1892,12 +1916,94 @@ dependencies = [ "slab", ] +[[package]] +name = "g1-runtime" +version = "3.0.0" +dependencies = [ + "common-runtime", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "hex-literal", + "pallet-aura", + "pallet-balances", + "pallet-certification", + "pallet-grandpa", + "pallet-identity", + "pallet-randomness-collective-flip", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-ud-accounts-storage", + "pallet-universal-dividend", + "parity-scale-codec", + "serde", + "smallvec 1.6.1", + "sp-api", + "sp-arithmetic", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-inherents", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-transaction-pool", + "sp-version", + "substrate-wasm-builder", +] + [[package]] name = "gcc" version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" +[[package]] +name = "gdev-runtime" +version = "3.0.0" +dependencies = [ + "common-runtime", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "hex-literal", + "pallet-aura", + "pallet-balances", + "pallet-certification", + "pallet-grandpa", + "pallet-identity", + "pallet-randomness-collective-flip", + "pallet-sudo", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-ud-accounts-storage", + "pallet-universal-dividend", + "parity-scale-codec", + "serde", + "sp-api", + "sp-arithmetic", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-inherents", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-transaction-pool", + "sp-version", + "substrate-wasm-builder", +] + [[package]] name = "generic-array" version = "0.12.4" @@ -1992,6 +2098,48 @@ dependencies = [ "web-sys", ] +[[package]] +name = "gtest-runtime" +version = "3.0.0" +dependencies = [ + "common-runtime", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "hex-literal", + "pallet-aura", + "pallet-balances", + "pallet-certification", + "pallet-grandpa", + "pallet-identity", + "pallet-randomness-collective-flip", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-ud-accounts-storage", + "pallet-universal-dividend", + "parity-scale-codec", + "serde", + "smallvec 1.6.1", + "sp-api", + "sp-arithmetic", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-inherents", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-transaction-pool", + "sp-version", + "substrate-wasm-builder", +] + [[package]] name = "h2" version = "0.1.26" @@ -2693,17 +2841,27 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" name = "lc-core" version = "3.0.0" dependencies = [ + "async-io", + "common-runtime", "frame-benchmarking", "frame-benchmarking-cli", + "futures 0.3.15", + "g1-runtime", + "gdev-runtime", + "gtest-runtime", "jsonrpc-core", - "lc-core-runtime", + "log", "maplit", + "pallet-grandpa", "pallet-transaction-payment-rpc", + "pallet-transaction-payment-rpc-runtime-api", "sc-basic-authorship", + "sc-chain-spec", "sc-cli", "sc-client-api", "sc-consensus", "sc-consensus-aura", + "sc-consensus-manual-seal", "sc-executor", "sc-finality-grandpa", "sc-keystore", @@ -2721,55 +2879,18 @@ dependencies = [ "sp-core", "sp-finality-grandpa", "sp-inherents", + "sp-offchain", "sp-runtime", + "sp-session", + "sp-storage", "sp-timestamp", "sp-transaction-pool", + "sp-trie", "structopt", "substrate-build-script-utils", "substrate-frame-rpc-system", ] -[[package]] -name = "lc-core-runtime" -version = "3.0.0" -dependencies = [ - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "hex-literal", - "pallet-aura", - "pallet-balances", - "pallet-certification", - "pallet-grandpa", - "pallet-identity", - "pallet-randomness-collective-flip", - "pallet-sudo", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-ud-accounts-storage", - "pallet-universal-dividend", - "parity-scale-codec", - "serde", - "smallvec 1.6.1", - "sp-api", - "sp-arithmetic", - "sp-block-builder", - "sp-consensus-aura", - "sp-core", - "sp-inherents", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-transaction-pool", - "sp-version", - "substrate-wasm-builder", -] - [[package]] name = "leb128" version = "0.2.4" @@ -5475,6 +5596,41 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "sc-consensus-manual-seal" +version = "0.9.0" +source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-07#83808aa815a9fbc528b76cd25ae1dec57e269771" +dependencies = [ + "assert_matches", + "async-trait", + "derive_more", + "futures 0.3.15", + "jsonrpc-core", + "jsonrpc-core-client", + "jsonrpc-derive", + "log", + "parity-scale-codec", + "parking_lot 0.11.1", + "sc-client-api", + "sc-consensus-babe", + "sc-consensus-epochs", + "sc-transaction-pool", + "serde", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-keyring", + "sp-keystore", + "sp-runtime", + "sp-timestamp", + "sp-transaction-pool", + "substrate-prometheus-endpoint", +] + [[package]] name = "sc-consensus-slots" version = "0.9.0" diff --git a/Cargo.toml b/Cargo.toml index d286a46fe..857702b7a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,9 @@ members = [ 'pallets/identity', 'pallets/ud-accounts-storage', 'pallets/universal-dividend', - 'runtime', + 'runtime/common', + 'runtime/gdev', + 'runtime/gtest' ] [profile.dev] opt-level = 3 diff --git a/node/Cargo.toml b/node/Cargo.toml index 1bd7bcc7c..5e126997e 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -1,6 +1,5 @@ [features] -default = [] -runtime-benchmarks = ['lc-core-runtime/runtime-benchmarks'] +runtime-benchmarks = ['gdev-runtime/runtime-benchmarks'] [build-dependencies.substrate-build-script-utils] git = 'https://github.com/paritytech/substrate.git' @@ -8,7 +7,7 @@ tag = 'monthly-2021-07' version = '3.0.0' [package] -authors = ['Substrate DevHub <https://github.com/substrate-developer-hub>'] +authors = ['Axiom-Team Developers <https://axiom-team.fr>'] build = 'build.rs' description = 'A fresh FRAME-based Substrate node, ready for hacking.' edition = '2018' @@ -17,11 +16,20 @@ license = 'AGPL-3.0' name = 'lc-core' repository = 'https://git.duniter.org/nodes/rust/lc-core-substrate' version = '3.0.0' + [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] [dependencies] +async-io = "1.3" +futures = { version = "0.3.1", features = ["compat"] } jsonrpc-core = '15.1.0' +log = "0.4" +maplit = '1.0.2' +common-runtime = { path = '../runtime/common' } +g1-runtime = { path = '../runtime/g1' } +gdev-runtime = { path = '../runtime/gdev' } +gtest-runtime = { path = '../runtime/gtest' } structopt = '0.3.8' [dependencies.frame-benchmarking] @@ -34,23 +42,32 @@ git = 'https://github.com/paritytech/substrate.git' tag = 'monthly-2021-07' version = '3.0.0' -[dependencies.lc-core-runtime] -path = '../runtime' +[dependencies.pallet-grandpa] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' version = '3.0.0' -[dependencies.maplit] -version = "1.0.2" - [dependencies.pallet-transaction-payment-rpc] git = 'https://github.com/paritytech/substrate.git' tag = 'monthly-2021-07' version = '3.0.0' +[dependencies.pallet-transaction-payment-rpc-runtime-api] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + [dependencies.sc-basic-authorship] git = 'https://github.com/paritytech/substrate.git' tag = 'monthly-2021-07' version = '0.9.0' +[dependencies.sc-chain-spec] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + [dependencies.sc-cli] features = ['wasmtime'] git = 'https://github.com/paritytech/substrate.git' @@ -72,6 +89,11 @@ git = 'https://github.com/paritytech/substrate.git' tag = 'monthly-2021-07' version = '0.9.0' +[dependencies.sc-consensus-manual-seal] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '0.9.0' + [dependencies.sc-executor] features = ['wasmtime'] git = 'https://github.com/paritytech/substrate.git' @@ -152,6 +174,11 @@ git = 'https://github.com/paritytech/substrate.git' tag = 'monthly-2021-07' version = '3.0.0' +[dependencies.sp-offchain] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + [dependencies.sp-inherents] git = 'https://github.com/paritytech/substrate.git' tag = 'monthly-2021-07' @@ -162,6 +189,16 @@ git = 'https://github.com/paritytech/substrate.git' tag = 'monthly-2021-07' version = '3.0.0' +[dependencies.sp-session] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.sp-storage] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + [dependencies.sp-timestamp] git = 'https://github.com/paritytech/substrate.git' tag = 'monthly-2021-07' @@ -172,6 +209,11 @@ git = 'https://github.com/paritytech/substrate.git' tag = 'monthly-2021-07' version = '3.0.0' +[dependencies.sp-trie] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + [dependencies.substrate-frame-rpc-system] git = 'https://github.com/paritytech/substrate.git' tag = 'monthly-2021-07' diff --git a/node/src/chain_spec.rs b/node/src/chain_spec.rs index a0a53294a..082286774 100644 --- a/node/src/chain_spec.rs +++ b/node/src/chain_spec.rs @@ -1,23 +1,33 @@ -use lc_core_runtime::{ - AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig, IdentityConfig, IdtyDid, - IdtyIndex, IdtyRight, IdtyValue, Planet, Signature, StrongCertConfig, SudoConfig, SystemConfig, - UdAccountsStorageConfig, UniversalDividendConfig, WASM_BINARY, +// Copyright 2021 Axiom-Team +// +// This file is part of Substrate-Libre-Currency. +// +// Substrate-Libre-Currency is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Substrate-Libre-Currency is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. + +pub mod g1; +pub mod gdev; +pub mod gtest; + +use common_runtime::IdtyIndex; +use common_runtime::{ + entities::{IdtyDid, Planet}, + AccountId, Signature, }; -use maplit::btreemap; -use sc_service::ChainType; -use sp_consensus_aura::sr25519::AuthorityId as AuraId; -use sp_core::{sr25519, Pair, Public}; -use sp_finality_grandpa::AuthorityId as GrandpaId; +use sp_core::{Pair, Public}; use sp_runtime::traits::{IdentifyAccount, Verify}; use std::collections::{BTreeMap, BTreeSet}; -/// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type. -pub type ChainSpec = sc_service::GenericChainSpec<GenesisConfig>; - -const TOKEN_DECIMALS: usize = 2; -const TOKEN_SYMBOL: &str = "ÄžT"; -// The URL for the telemetry server. -// const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/"; +pub type AccountPublic = <Signature as Verify>::Signer; /// Generate a crypto pair from seed. pub fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public { @@ -26,7 +36,13 @@ pub fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Pu .public() } -type AccountPublic = <Signature as Verify>::Signer; +/*/// Generate an account ID from pain. +pub fn get_account_id_from_pair<TPublic: Public>(pair: TPublic::Pair) -> AccountId +where + AccountPublic: From<<TPublic::Pair as Pair>::Public>, +{ + AccountPublic::from(pair.public()).into_account() +}*/ /// Generate an account ID from seed. pub fn get_account_id_from_seed<TPublic: Public>(seed: &str) -> AccountId @@ -36,183 +52,6 @@ where AccountPublic::from(get_from_seed::<TPublic>(seed)).into_account() } -/// Generate an Aura authority key. -pub fn authority_keys_from_seed(s: &str) -> (AuraId, GrandpaId) { - (get_from_seed::<AuraId>(s), get_from_seed::<GrandpaId>(s)) -} - -/// Create a fake did (for dev and testnet) -fn did(u8_: u8) -> IdtyDid { - IdtyDid { - hash: sp_core::H256::repeat_byte(u8_), - planet: Planet::Earth, - latitude: 0, - longitude: 0, - } -} - -pub fn development_config() -> Result<ChainSpec, String> { - let wasm_binary = WASM_BINARY.ok_or_else(|| "Development wasm not available".to_string())?; - - Ok(ChainSpec::from_genesis( - // Name - "Development", - // ID - "dev", - ChainType::Development, - move || { - testnet_genesis( - wasm_binary, - // Initial PoA authorities - vec![authority_keys_from_seed("Alice")], - // Inital identities - btreemap![ - did(1) => get_account_id_from_seed::<sr25519::Public>("Alice"), - did(2) => get_account_id_from_seed::<sr25519::Public>("Bob"), - did(3) => get_account_id_from_seed::<sr25519::Public>("Charlie"), - ], - // Sudo account - get_account_id_from_seed::<sr25519::Public>("Alice"), - true, - ) - }, - // Bootnodes - vec![], - // Telemetry - None, - // Protocol ID - None, - // Properties - Some( - serde_json::json!({ - "tokenDecimals": TOKEN_DECIMALS, - "tokenSymbol": TOKEN_SYMBOL, - }) - .as_object() - .expect("must be a map") - .clone(), - ), - // Extensions - None, - )) -} - -pub fn local_testnet_config() -> Result<ChainSpec, String> { - let wasm_binary = WASM_BINARY.ok_or_else(|| "Development wasm not available".to_string())?; - - Ok(ChainSpec::from_genesis( - // Name - "Local Testnet", - // ID - "local_testnet", - ChainType::Local, - move || { - testnet_genesis( - wasm_binary, - // Initial PoA authorities - vec![ - authority_keys_from_seed("Alice"), - authority_keys_from_seed("Bob"), - ], - // Initial identities - btreemap![ - did(1) => get_account_id_from_seed::<sr25519::Public>("Alice"), - did(2) => get_account_id_from_seed::<sr25519::Public>("Bob"), - did(3) => get_account_id_from_seed::<sr25519::Public>("Charlie"), - did(4) => get_account_id_from_seed::<sr25519::Public>("Dave"), - did(5) => get_account_id_from_seed::<sr25519::Public>("Eve"), - did(6) => get_account_id_from_seed::<sr25519::Public>("Ferdie"), - ], - // Sudo account - get_account_id_from_seed::<sr25519::Public>("Alice"), - true, - ) - }, - // Bootnodes - vec![], - // Telemetry - None, - // Protocol ID - None, - // Properties - Some( - serde_json::json!({ - "tokenDecimals": TOKEN_DECIMALS, - "tokenSymbol": TOKEN_SYMBOL, - }) - .as_object() - .expect("must be a map") - .clone(), - ), - // Extensions - None, - )) -} - -/// Configure initial storage state for FRAME modules. -fn testnet_genesis( - wasm_binary: &[u8], - initial_authorities: Vec<(AuraId, GrandpaId)>, - initial_identities: BTreeMap<IdtyDid, AccountId>, - root_key: AccountId, - _enable_println: bool, -) -> GenesisConfig { - GenesisConfig { - system: SystemConfig { - // Add Wasm runtime to storage. - code: wasm_binary.to_vec(), - changes_trie_config: Default::default(), - }, - balances: BalancesConfig { - // Configure endowed accounts with initial balance of INITIAL_BALANCE. - balances: Vec::with_capacity(0), - }, - aura: AuraConfig { - authorities: initial_authorities.iter().map(|x| (x.0.clone())).collect(), - }, - grandpa: GrandpaConfig { - authorities: initial_authorities - .iter() - .map(|x| (x.1.clone(), 1)) - .collect(), - }, - sudo: SudoConfig { - // Assign network admin rights. - key: root_key, - }, - identity: IdentityConfig { - identities: initial_identities - .iter() - .map(|(did, account)| IdtyValue { - did: *did, - expire_on: lc_core_runtime::MaxInactivityPeriod::get(), - owner_key: account.clone(), - removable_on: 0, - renewable_on: lc_core_runtime::StrongCertRenewablePeriod::get(), - rights: vec![ - (IdtyRight::CreateIdty, None), - (IdtyRight::StrongCert, None), - (IdtyRight::Ud, None), - ], - status: lc_core_runtime::IdtyStatus::Validated, - data: Default::default(), - }) - .collect(), - }, - strong_cert: StrongCertConfig { - certs_by_issuer: clique_wot(initial_identities.len()), - phantom: std::marker::PhantomData, - }, - ud_accounts_storage: UdAccountsStorageConfig { - ud_accounts: initial_identities.values().cloned().collect(), - }, - universal_dividend: UniversalDividendConfig { - first_ud: 1_000, - initial_monetary_mass: 0, - }, - } -} - fn clique_wot(initial_identities_len: usize) -> BTreeMap<IdtyIndex, BTreeSet<IdtyIndex>> { let mut certs_by_issuer = BTreeMap::new(); for i in 1..=initial_identities_len { @@ -225,3 +64,13 @@ fn clique_wot(initial_identities_len: usize) -> BTreeMap<IdtyIndex, BTreeSet<Idt } certs_by_issuer } + +/// Create a fake did (for dev and testnet) +fn did(u8_: u8) -> IdtyDid { + IdtyDid { + hash: sp_core::H256::repeat_byte(u8_), + planet: Planet::Earth, + latitude: 0, + longitude: 0, + } +} diff --git a/node/src/chain_spec/g1.rs b/node/src/chain_spec/g1.rs new file mode 100644 index 000000000..e556f7fd1 --- /dev/null +++ b/node/src/chain_spec/g1.rs @@ -0,0 +1,21 @@ +// Copyright 2021 Axiom-Team +// +// This file is part of Substrate-Libre-Currency. +// +// Substrate-Libre-Currency is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Substrate-Libre-Currency is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. + +pub type ChainSpec = sc_service::GenericChainSpec<g1_runtime::GenesisConfig>; + +pub fn development_chain_spec() -> Result<ChainSpec, String> { + todo!() +} diff --git a/node/src/chain_spec/gdev.rs b/node/src/chain_spec/gdev.rs new file mode 100644 index 000000000..254baa853 --- /dev/null +++ b/node/src/chain_spec/gdev.rs @@ -0,0 +1,147 @@ +// Copyright 2021 Axiom-Team +// +// This file is part of Substrate-Libre-Currency. +// +// Substrate-Libre-Currency is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Substrate-Libre-Currency is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. + +use super::*; +use gdev_runtime::{ + AccountId, BalancesConfig, GenesisConfig, GrandpaConfig, IdentityConfig, IdtyDid, IdtyRight, + IdtyValue, StrongCertConfig, SudoConfig, SystemConfig, UdAccountsStorageConfig, + UniversalDividendConfig, WASM_BINARY, +}; +use maplit::btreemap; +use sc_service::ChainType; +use sp_core::sr25519; +use sp_finality_grandpa::AuthorityId as GrandpaId; +use std::collections::BTreeMap; + +pub type ChainSpec = sc_service::GenericChainSpec<GenesisConfig>; + +const TOKEN_DECIMALS: usize = 2; +const TOKEN_SYMBOL: &str = "ÄžD"; +// The URL for the telemetry server. +// const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/"; + +/// Generate an Aura authority key. +pub fn authority_keys_from_seed(s: &str) -> (sp_consensus_aura::sr25519::AuthorityId, GrandpaId) { + ( + get_from_seed::<sp_consensus_aura::sr25519::AuthorityId>(s), + get_from_seed::<GrandpaId>(s), + ) +} + +pub fn development_chain_spec() -> Result<ChainSpec, String> { + let wasm_binary = WASM_BINARY.ok_or_else(|| "Development wasm not available".to_string())?; + + Ok(ChainSpec::from_genesis( + // Name + "Development", + // ID + "gdev", + ChainType::Development, + move || { + devnet_genesis( + wasm_binary, + // Initial PoA authorities + vec![authority_keys_from_seed("Alice")], + // Inital identities + btreemap![ + did(1) => get_account_id_from_seed::<sr25519::Public>("Alice"), + did(2) => get_account_id_from_seed::<sr25519::Public>("Bob"), + did(3) => get_account_id_from_seed::<sr25519::Public>("Charlie"), + ], + // Sudo account + get_account_id_from_seed::<sr25519::Public>("Alice"), + true, + ) + }, + // Bootnodes + vec![], + // Telemetry + None, + // Protocol ID + None, + // Properties + Some( + serde_json::json!({ + "tokenDecimals": TOKEN_DECIMALS, + "tokenSymbol": TOKEN_SYMBOL, + }) + .as_object() + .expect("must be a map") + .clone(), + ), + // Extensions + None, + )) +} + +fn devnet_genesis( + wasm_binary: &[u8], + initial_authorities: Vec<(sp_consensus_aura::sr25519::AuthorityId, GrandpaId)>, + initial_identities: BTreeMap<IdtyDid, AccountId>, + root_key: AccountId, + _enable_println: bool, +) -> gdev_runtime::GenesisConfig { + gdev_runtime::GenesisConfig { + system: SystemConfig { + // Add Wasm runtime to storage. + code: wasm_binary.to_vec(), + changes_trie_config: Default::default(), + }, + balances: BalancesConfig { + balances: Vec::with_capacity(0), + }, + grandpa: GrandpaConfig { + authorities: initial_authorities + .iter() + .map(|x| (x.1.clone(), 1)) + .collect(), + }, + sudo: SudoConfig { + // Assign network admin rights. + key: root_key, + }, + identity: IdentityConfig { + identities: initial_identities + .iter() + .map(|(did, account)| IdtyValue { + did: *did, + expire_on: gdev_runtime::MaxInactivityPeriod::get(), + owner_key: account.clone(), + removable_on: 0, + renewable_on: gdev_runtime::StrongCertRenewablePeriod::get(), + rights: vec![ + (IdtyRight::CreateIdty, None), + (IdtyRight::StrongCert, None), + (IdtyRight::Ud, None), + ], + status: gdev_runtime::IdtyStatus::Validated, + data: Default::default(), + }) + .collect(), + }, + strong_cert: StrongCertConfig { + certs_by_issuer: clique_wot(initial_identities.len()), + phantom: std::marker::PhantomData, + }, + ud_accounts_storage: UdAccountsStorageConfig { + ud_accounts: initial_identities.values().cloned().collect(), + }, + universal_dividend: UniversalDividendConfig { + first_ud: 1_000, + initial_monetary_mass: 0, + }, + } +} diff --git a/node/src/chain_spec/gtest.rs b/node/src/chain_spec/gtest.rs new file mode 100644 index 000000000..100e251a5 --- /dev/null +++ b/node/src/chain_spec/gtest.rs @@ -0,0 +1,264 @@ +// Copyright 2021 Axiom-Team +// +// This file is part of Substrate-Libre-Currency. +// +// Substrate-Libre-Currency is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Substrate-Libre-Currency is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. + +use super::*; +use gtest_runtime::{ + AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig, IdentityConfig, IdtyDid, + IdtyRight, IdtyValue, StrongCertConfig, SudoConfig, SystemConfig, UdAccountsStorageConfig, + UniversalDividendConfig, WASM_BINARY, +}; +use maplit::btreemap; +use sc_service::ChainType; +use sp_consensus_aura::sr25519::AuthorityId as AuraId; +use sp_core::sr25519; +use sp_finality_grandpa::AuthorityId as GrandpaId; +use std::collections::BTreeMap; + +pub type ChainSpec = sc_service::GenericChainSpec<GenesisConfig>; + +const TOKEN_DECIMALS: usize = 2; +const TOKEN_SYMBOL: &str = "ÄžT"; +// The URL for the telemetry server. +// const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/"; + +/// Generate an Aura authority key. +pub fn authority_keys_from_seed(s: &str) -> (AuraId, GrandpaId) { + (get_from_seed::<AuraId>(s), get_from_seed::<GrandpaId>(s)) +} + +pub fn development_chain_spec() -> Result<ChainSpec, String> { + let wasm_binary = WASM_BINARY.ok_or_else(|| "Development wasm not available".to_string())?; + + Ok(ChainSpec::from_genesis( + // Name + "Äžtest Development", + // ID + "gtest_dev", + ChainType::Development, + move || { + devnet_genesis( + wasm_binary, + // Initial PoA authorities + vec![authority_keys_from_seed("Alice")], + // Inital identities + btreemap![ + did(1) => get_account_id_from_seed::<sr25519::Public>("Alice"), + did(2) => get_account_id_from_seed::<sr25519::Public>("Bob"), + did(3) => get_account_id_from_seed::<sr25519::Public>("Charlie"), + ], + // Sudo account + get_account_id_from_seed::<sr25519::Public>("Alice"), + true, + ) + }, + // Bootnodes + vec![], + // Telemetry + None, + // Protocol ID + None, + // Properties + Some( + serde_json::json!({ + "tokenDecimals": TOKEN_DECIMALS, + "tokenSymbol": TOKEN_SYMBOL, + }) + .as_object() + .expect("must be a map") + .clone(), + ), + // Extensions + None, + )) +} + +pub fn local_testnet_config() -> Result<ChainSpec, String> { + let wasm_binary = WASM_BINARY.ok_or_else(|| "Development wasm not available".to_string())?; + + Ok(ChainSpec::from_genesis( + // Name + "Äžtest Local Testnet", + // ID + "gtest_local_testnet", + ChainType::Local, + move || { + testnet_genesis( + wasm_binary, + // Initial PoA authorities + vec![ + authority_keys_from_seed("Alice"), + authority_keys_from_seed("Bob"), + ], + // Initial identities + btreemap![ + did(1) => get_account_id_from_seed::<sr25519::Public>("Alice"), + did(2) => get_account_id_from_seed::<sr25519::Public>("Bob"), + did(3) => get_account_id_from_seed::<sr25519::Public>("Charlie"), + did(4) => get_account_id_from_seed::<sr25519::Public>("Dave"), + did(5) => get_account_id_from_seed::<sr25519::Public>("Eve"), + did(6) => get_account_id_from_seed::<sr25519::Public>("Ferdie"), + ], + // Sudo account + get_account_id_from_seed::<sr25519::Public>("Alice"), + true, + ) + }, + // Bootnodes + vec![], + // Telemetry + None, + // Protocol ID + None, + // Properties + Some( + serde_json::json!({ + "tokenDecimals": TOKEN_DECIMALS, + "tokenSymbol": TOKEN_SYMBOL, + }) + .as_object() + .expect("must be a map") + .clone(), + ), + // Extensions + None, + )) +} + +fn devnet_genesis( + wasm_binary: &[u8], + initial_authorities: Vec<(AuraId, GrandpaId)>, + initial_identities: BTreeMap<IdtyDid, AccountId>, + root_key: AccountId, + _enable_println: bool, +) -> GenesisConfig { + GenesisConfig { + system: SystemConfig { + // Add Wasm runtime to storage. + code: wasm_binary.to_vec(), + changes_trie_config: Default::default(), + }, + balances: BalancesConfig { + // Configure endowed accounts with initial balance of INITIAL_BALANCE. + balances: Vec::with_capacity(0), + }, + aura: AuraConfig { + authorities: initial_authorities.iter().map(|x| (x.0.clone())).collect(), + }, + grandpa: GrandpaConfig { + authorities: initial_authorities + .iter() + .map(|x| (x.1.clone(), 1)) + .collect(), + }, + sudo: SudoConfig { + // Assign network admin rights. + key: root_key, + }, + identity: IdentityConfig { + identities: initial_identities + .iter() + .map(|(did, account)| IdtyValue { + did: *did, + expire_on: gtest_runtime::MaxInactivityPeriod::get(), + owner_key: account.clone(), + removable_on: 0, + renewable_on: gtest_runtime::StrongCertRenewablePeriod::get(), + rights: vec![ + (IdtyRight::CreateIdty, None), + (IdtyRight::StrongCert, None), + (IdtyRight::Ud, None), + ], + status: gtest_runtime::IdtyStatus::Validated, + data: Default::default(), + }) + .collect(), + }, + strong_cert: StrongCertConfig { + certs_by_issuer: clique_wot(initial_identities.len()), + phantom: std::marker::PhantomData, + }, + ud_accounts_storage: UdAccountsStorageConfig { + ud_accounts: initial_identities.values().cloned().collect(), + }, + universal_dividend: UniversalDividendConfig { + first_ud: 1_000, + initial_monetary_mass: 0, + }, + } +} + +fn testnet_genesis( + wasm_binary: &[u8], + initial_authorities: Vec<(AuraId, GrandpaId)>, + initial_identities: BTreeMap<IdtyDid, AccountId>, + root_key: AccountId, + _enable_println: bool, +) -> GenesisConfig { + GenesisConfig { + system: SystemConfig { + // Add Wasm runtime to storage. + code: wasm_binary.to_vec(), + changes_trie_config: Default::default(), + }, + balances: BalancesConfig { + // Configure endowed accounts with initial balance of INITIAL_BALANCE. + balances: Vec::with_capacity(0), + }, + aura: AuraConfig { + authorities: initial_authorities.iter().map(|x| (x.0.clone())).collect(), + }, + grandpa: GrandpaConfig { + authorities: initial_authorities + .iter() + .map(|x| (x.1.clone(), 1)) + .collect(), + }, + sudo: SudoConfig { + // Assign network admin rights. + key: root_key, + }, + identity: IdentityConfig { + identities: initial_identities + .iter() + .map(|(did, account)| IdtyValue { + did: *did, + expire_on: gtest_runtime::MaxInactivityPeriod::get(), + owner_key: account.clone(), + removable_on: 0, + renewable_on: gtest_runtime::StrongCertRenewablePeriod::get(), + rights: vec![ + (IdtyRight::CreateIdty, None), + (IdtyRight::StrongCert, None), + (IdtyRight::Ud, None), + ], + status: gtest_runtime::IdtyStatus::Validated, + data: Default::default(), + }) + .collect(), + }, + strong_cert: StrongCertConfig { + certs_by_issuer: clique_wot(initial_identities.len()), + phantom: std::marker::PhantomData, + }, + ud_accounts_storage: UdAccountsStorageConfig { + ud_accounts: initial_identities.values().cloned().collect(), + }, + universal_dividend: UniversalDividendConfig { + first_ud: 1_000, + initial_monetary_mass: 0, + }, + } +} diff --git a/node/src/cli.rs b/node/src/cli.rs index c6f35151a..12d504002 100644 --- a/node/src/cli.rs +++ b/node/src/cli.rs @@ -1,4 +1,21 @@ +// Copyright 2021 Axiom-Team +// +// This file is part of Substrate-Libre-Currency. +// +// Substrate-Libre-Currency is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Substrate-Libre-Currency is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. + use sc_cli::RunCmd; +use std::str::FromStr; use structopt::StructOpt; #[derive(Debug, StructOpt)] @@ -8,6 +25,12 @@ pub struct Cli { #[structopt(flatten)] pub run: RunCmd, + + /// When blocks should be sealed in the dev service. + /// + /// Options are "instant", "manual", or timer interval in milliseconds + #[structopt(long, default_value = "6000")] + pub sealing: Sealing, } #[derive(Debug, StructOpt)] @@ -39,3 +62,30 @@ pub enum Subcommand { #[structopt(name = "benchmark", about = "Benchmark runtime pallets.")] Benchmark(frame_benchmarking_cli::BenchmarkCmd), } + +/// Block authoring scheme to be used by the dev service. +#[derive(Debug)] +pub enum Sealing { + /// Author a block immediately upon receiving a transaction into the transaction pool + Instant, + /// Author a block upon receiving an RPC command + Manual, + /// Author blocks at a regular interval specified in milliseconds + Interval(u64), +} + +impl FromStr for Sealing { + type Err = String; + + fn from_str(s: &str) -> Result<Self, Self::Err> { + Ok(match s { + "instant" => Self::Instant, + "manual" => Self::Manual, + s => { + let millis = + u64::from_str_radix(s, 10).map_err(|_| "couldn't decode sealing param")?; + Self::Interval(millis) + } + }) + } +} diff --git a/node/src/command.rs b/node/src/command.rs index da3062c92..3423ddd6b 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -16,10 +16,10 @@ // limitations under the License. use crate::cli::{Cli, Subcommand}; +use crate::service::{GDevExecutor, GTestExecutor, IdentifyVariant}; use crate::{chain_spec, service}; -use lc_core_runtime::Block; +use gdev_runtime::Block; use sc_cli::{ChainSpec, Role, RuntimeVersion, SubstrateCli}; -use sc_service::PartialComponents; impl SubstrateCli for Cli { fn impl_name() -> String { @@ -43,21 +43,50 @@ impl SubstrateCli for Cli { } fn copyright_start_year() -> i32 { - 2017 + 2021 } fn load_spec(&self, id: &str) -> Result<Box<dyn sc_service::ChainSpec>, String> { Ok(match id { - "dev" => Box::new(chain_spec::development_config()?), - "" | "local" => Box::new(chain_spec::local_testnet_config()?), - path => Box::new(chain_spec::ChainSpec::from_json_file( - std::path::PathBuf::from(path), - )?), + "dev" | "gdev" => Box::new(chain_spec::gdev::development_chain_spec()?), + "gtest_dev" => Box::new(chain_spec::gtest::development_chain_spec()?), + "local" | "gtest_local" => Box::new(chain_spec::gtest::local_testnet_config()?), + // Specs provided as json specify which runtime to use in their file name. For example, + // `g1-custom.json` uses the g1 runtime. + // `gdev-workshop.json` uses the gdev runtime. + path => { + let path = std::path::PathBuf::from(path); + + let starts_with = |prefix: &str| { + path.file_name() + .map(|f| f.to_str().map(|s| s.starts_with(&prefix))) + .flatten() + .unwrap_or(false) + }; + + if starts_with("g1") { + Box::new(chain_spec::g1::ChainSpec::from_json_file(path)?) + } else if starts_with("gtest") { + Box::new(chain_spec::gtest::ChainSpec::from_json_file(path)?) + } else if starts_with("gdev") { + Box::new(chain_spec::gdev::ChainSpec::from_json_file(path)?) + } else { + panic!("unknown runtime") + } + } }) } - fn native_runtime_version(_: &Box<dyn ChainSpec>) -> &'static RuntimeVersion { - &lc_core_runtime::VERSION + fn native_runtime_version(spec: &Box<dyn ChainSpec>) -> &'static RuntimeVersion { + if spec.is_main() { + todo!() //return &g1_runtime::VERSION; + } else if spec.is_test() { + >est_runtime::VERSION + } else if spec.is_dev() { + &gdev_runtime::VERSION + } else { + panic!("unknown runtime") + } } } @@ -69,51 +98,56 @@ pub fn run() -> sc_cli::Result<()> { Some(Subcommand::Key(cmd)) => cmd.run(&cli), Some(Subcommand::BuildSpec(cmd)) => { let runner = cli.create_runner(cmd)?; - runner.sync_run(|config| cmd.run(config.chain_spec, config.network)) + runner.sync_run(|config| { + if cmd.shared_params.dev { + if config.chain_spec.is_main() { + cmd.run( + Box::new(chain_spec::g1::development_chain_spec()?), + config.network, + ) + } else if config.chain_spec.is_test() { + cmd.run( + Box::new(chain_spec::gtest::development_chain_spec()?), + config.network, + ) + } else if config.chain_spec.is_dev() { + cmd.run( + Box::new(chain_spec::gdev::development_chain_spec()?), + config.network, + ) + } else { + panic!("unknown runtime") + } + } else { + cmd.run(config.chain_spec, config.network) + } + }) } Some(Subcommand::CheckBlock(cmd)) => { let runner = cli.create_runner(cmd)?; - runner.async_run(|config| { - let PartialComponents { - client, - task_manager, - import_queue, - .. - } = service::new_partial(&config)?; + runner.async_run(|mut config| { + let (client, _, import_queue, task_manager) = service::new_chain_ops(&mut config)?; Ok((cmd.run(client, import_queue), task_manager)) }) } Some(Subcommand::ExportBlocks(cmd)) => { let runner = cli.create_runner(cmd)?; - runner.async_run(|config| { - let PartialComponents { - client, - task_manager, - .. - } = service::new_partial(&config)?; + runner.async_run(|mut config| { + let (client, _, _, task_manager) = service::new_chain_ops(&mut config)?; Ok((cmd.run(client, config.database), task_manager)) }) } Some(Subcommand::ExportState(cmd)) => { let runner = cli.create_runner(cmd)?; - runner.async_run(|config| { - let PartialComponents { - client, - task_manager, - .. - } = service::new_partial(&config)?; + runner.async_run(|mut config| { + let (client, _, _, task_manager) = service::new_chain_ops(&mut config)?; Ok((cmd.run(client, config.chain_spec), task_manager)) }) } Some(Subcommand::ImportBlocks(cmd)) => { let runner = cli.create_runner(cmd)?; - runner.async_run(|config| { - let PartialComponents { - client, - task_manager, - import_queue, - .. - } = service::new_partial(&config)?; + runner.async_run(|mut config| { + let (client, _, import_queue, task_manager) = service::new_chain_ops(&mut config)?; Ok((cmd.run(client, import_queue), task_manager)) }) } @@ -123,21 +157,25 @@ pub fn run() -> sc_cli::Result<()> { } Some(Subcommand::Revert(cmd)) => { let runner = cli.create_runner(cmd)?; - runner.async_run(|config| { - let PartialComponents { - client, - task_manager, - backend, - .. - } = service::new_partial(&config)?; + runner.async_run(|mut config| { + let (client, backend, _, task_manager) = service::new_chain_ops(&mut config)?; Ok((cmd.run(client, backend), task_manager)) }) } Some(Subcommand::Benchmark(cmd)) => { if cfg!(feature = "runtime-benchmarks") { let runner = cli.create_runner(cmd)?; + let chain_spec = &runner.config().chain_spec; - runner.sync_run(|config| cmd.run::<Block, service::Executor>(config)) + if chain_spec.is_main() { + todo!() + } else if chain_spec.is_test() { + runner.sync_run(|config| cmd.run::<Block, GTestExecutor>(config)) + } else if chain_spec.is_dev() { + runner.sync_run(|config| cmd.run::<Block, GDevExecutor>(config)) + } else { + unreachable!() + } } else { Err("Benchmarking wasn't enabled when building the node. \ You can enable it with `--features runtime-benchmarks`." @@ -147,11 +185,27 @@ pub fn run() -> sc_cli::Result<()> { None => { let runner = cli.create_runner(&cli.run)?; runner.run_node_until_exit(|config| async move { - match config.role { - Role::Light => service::new_light(config), - _ => service::new_full(config), + if config.chain_spec.is_main() { + todo!() + } else if config.chain_spec.is_test() { + match config.role { + Role::Light => { + service::new_light::<gtest_runtime::RuntimeApi, GTestExecutor>(config) + } + _ => service::new_full::<gtest_runtime::RuntimeApi, GTestExecutor>( + config, None, + ), + } + .map_err(sc_cli::Error::Service) + } else if config.chain_spec.is_dev() { + service::new_full::<gdev_runtime::RuntimeApi, GDevExecutor>( + config, + Some(cli.sealing), + ) + .map_err(sc_cli::Error::Service) + } else { + Err(sc_cli::Error::Application("unknown runtime".into())) } - .map_err(sc_cli::Error::Service) }) } } diff --git a/node/src/lib.rs b/node/src/lib.rs index f117b8aae..c40443396 100644 --- a/node/src/lib.rs +++ b/node/src/lib.rs @@ -1,3 +1,20 @@ +// Copyright 2021 Axiom-Team +// +// This file is part of Substrate-Libre-Currency. +// +// Substrate-Libre-Currency is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Substrate-Libre-Currency is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. + pub mod chain_spec; +pub mod cli; pub mod rpc; pub mod service; diff --git a/node/src/main.rs b/node/src/main.rs index a4182cd57..83da51fd4 100644 --- a/node/src/main.rs +++ b/node/src/main.rs @@ -1,10 +1,26 @@ -//! Substrate Node Template CLI library. +// Copyright 2021 Axiom-Team +// +// This file is part of Substrate-Libre-Currency. +// +// Substrate-Libre-Currency is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Substrate-Libre-Currency is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. + +//! lc-core CLI library. #![warn(missing_docs)] mod chain_spec; #[macro_use] mod service; -mod cli; +pub(crate) mod cli; mod command; mod rpc; diff --git a/node/src/rpc.rs b/node/src/rpc.rs index f1819a3bf..1e1c9a177 100644 --- a/node/src/rpc.rs +++ b/node/src/rpc.rs @@ -1,3 +1,19 @@ +// Copyright 2021 Axiom-Team +// +// This file is part of Substrate-Libre-Currency. +// +// Substrate-Libre-Currency is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Substrate-Libre-Currency is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. + //! A collection of node-specific RPC methods. //! Substrate provides the `sc-rpc` crate, which defines the core RPC layer //! used by Substrate nodes. This file extends those RPC definitions with @@ -5,14 +21,16 @@ #![warn(missing_docs)] -use std::sync::Arc; - -use lc_core_runtime::{opaque::Block, AccountId, Balance, Index}; pub use sc_rpc_api::DenyUnsafe; + +use common_runtime::Block; +use common_runtime::{AccountId, Balance, Index}; +use sc_consensus_manual_seal::rpc::{ManualSeal, ManualSealApi}; use sp_api::ProvideRuntimeApi; use sp_block_builder::BlockBuilder; use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; use sp_transaction_pool::TransactionPool; +use std::sync::Arc; /// Full client dependencies. pub struct FullDeps<C, P> { @@ -22,6 +40,10 @@ pub struct FullDeps<C, P> { pub pool: Arc<P>, /// Whether to deny unsafe calls pub deny_unsafe: DenyUnsafe, + /// Manual seal command sink + pub command_sink_opt: Option< + futures::channel::mpsc::Sender<sc_consensus_manual_seal::EngineCommand<sp_core::H256>>, + >, } /// Instantiate all full RPC extensions. @@ -43,6 +65,7 @@ where client, pool, deny_unsafe, + command_sink_opt, } = deps; io.extend_with(SystemApi::to_delegate(FullSystem::new( @@ -55,6 +78,14 @@ where client, ))); + if let Some(command_sink) = command_sink_opt { + io.extend_with( + // We provide the rpc handler with the sending end of the channel to allow the rpc + // send EngineCommands to the background block authorship task. + ManualSealApi::to_delegate(ManualSeal::new(command_sink)), + ); + }; + // Extend this RPC with a custom API by using the following syntax. // `YourRpcStruct` should have a reference to a client, which is needed // to call into the runtime. diff --git a/node/src/service.rs b/node/src/service.rs index 25e0e810b..0716854e0 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -1,53 +1,173 @@ +// Copyright 2021 Axiom-Team +// +// This file is part of Substrate-Libre-Currency. +// +// Substrate-Libre-Currency is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Substrate-Libre-Currency is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. + //! Service and ServiceFactory implementation. Specialized wrapper over substrate service. -use lc_core_runtime::{self, opaque::Block, RuntimeApi}; +mod client; + +pub use sc_executor::NativeExecutor; + +use self::client::{Client, RuntimeApiCollection}; +use async_io::Timer; +use common_runtime::Block; +use futures::{Stream, StreamExt}; use sc_client_api::{ExecutorProvider, RemoteBackend}; use sc_consensus_aura::{ImportQueueParams, SlotProportion, StartAuraParams}; +use sc_consensus_manual_seal::{run_manual_seal, EngineCommand, ManualSealParams}; use sc_executor::native_executor_instance; -pub use sc_executor::NativeExecutor; use sc_finality_grandpa::SharedVoterState; use sc_keystore::LocalKeystore; -use sc_service::{error::Error as ServiceError, Configuration, TaskManager}; +use sc_service::{error::Error as ServiceError, Configuration, PartialComponents, TaskManager}; use sc_telemetry::{Telemetry, TelemetryWorker}; use sp_consensus::SlotData; use sp_consensus_aura::sr25519::AuthorityPair as AuraPair; +use sp_core::H256; +use sp_runtime::traits::BlakeTwo256; use std::{sync::Arc, time::Duration}; -// Our native executor instance. +type FullClient<RuntimeApi, Executor> = sc_service::TFullClient<Block, RuntimeApi, Executor>; +type FullBackend = sc_service::TFullBackend<Block>; +type FullSelectChain = sc_consensus::LongestChain<FullBackend, Block>; + +type LightClient<RuntimeApi, Executor> = + sc_service::TLightClientWithBackend<Block, RuntimeApi, Executor, LightBackend>; +type LightBackend = sc_service::TLightBackendWithHash<Block, sp_runtime::traits::BlakeTwo256>; + native_executor_instance!( - pub Executor, - lc_core_runtime::api::dispatch, - lc_core_runtime::native_version, + pub GDevExecutor, + gdev_runtime::api::dispatch, + gdev_runtime::native_version, frame_benchmarking::benchmarking::HostFunctions, ); -type FullClient = sc_service::TFullClient<Block, RuntimeApi, Executor>; -type FullBackend = sc_service::TFullBackend<Block>; -type FullSelectChain = sc_consensus::LongestChain<FullBackend, Block>; +native_executor_instance!( + pub GTestExecutor, + gtest_runtime::api::dispatch, + gtest_runtime::native_version, + frame_benchmarking::benchmarking::HostFunctions, +); + +/// Can be called for a `Configuration` to check if it is a configuration for +/// a particular network. +pub trait IdentifyVariant { + /// Returns `true` if this is a configuration for the `main` network. + fn is_main(&self) -> bool; + + /// Returns `true` if this is a configuration for the `test` network. + fn is_test(&self) -> bool; + + /// Returns `true` if this is a configuration for a dev network. + fn is_dev(&self) -> bool; +} +impl IdentifyVariant for Box<dyn sc_chain_spec::ChainSpec> { + fn is_main(&self) -> bool { + self.id().starts_with("g1") + } + + fn is_test(&self) -> bool { + self.id().starts_with("gtest") + } + + fn is_dev(&self) -> bool { + self.id().starts_with("dev") || self.id().starts_with("gdev") + } +} + +/// Builds a new object suitable for chain operations. #[allow(clippy::type_complexity)] -pub fn new_partial( +pub fn new_chain_ops( + config: &mut Configuration, +) -> Result< + ( + Arc<Client>, + Arc<FullBackend>, + sp_consensus::import_queue::BasicQueue<Block, sp_trie::PrefixedMemoryDB<BlakeTwo256>>, + TaskManager, + ), + ServiceError, +> { + if config.chain_spec.is_main() { + todo!() + } else if config.chain_spec.is_test() { + let PartialComponents { + client, + backend, + import_queue, + task_manager, + .. + } = new_partial::<gtest_runtime::RuntimeApi, GTestExecutor>(config, false)?; + Ok(( + Arc::new(Client::GTest(client)), + backend, + import_queue, + task_manager, + )) + } else if config.chain_spec.is_dev() { + let PartialComponents { + client, + backend, + import_queue, + task_manager, + .. + } = new_partial::<gdev_runtime::RuntimeApi, GDevExecutor>(config, true)?; + Ok(( + Arc::new(Client::GDev(client)), + backend, + import_queue, + task_manager, + )) + } else { + unreachable!() + } +} + +#[allow(clippy::type_complexity)] +pub fn new_partial<RuntimeApi, Executor>( config: &Configuration, + consensus_manual: bool, ) -> Result< sc_service::PartialComponents< - FullClient, + FullClient<RuntimeApi, Executor>, FullBackend, FullSelectChain, - sp_consensus::DefaultImportQueue<Block, FullClient>, - sc_transaction_pool::FullPool<Block, FullClient>, + sp_consensus::DefaultImportQueue<Block, FullClient<RuntimeApi, Executor>>, + sc_transaction_pool::FullPool<Block, FullClient<RuntimeApi, Executor>>, ( sc_finality_grandpa::GrandpaBlockImport< FullBackend, Block, - FullClient, + FullClient<RuntimeApi, Executor>, FullSelectChain, >, - sc_finality_grandpa::LinkHalf<Block, FullClient, FullSelectChain>, + sc_finality_grandpa::LinkHalf<Block, FullClient<RuntimeApi, Executor>, FullSelectChain>, Option<Telemetry>, ), >, ServiceError, -> { +> +where + RuntimeApi: sp_api::ConstructRuntimeApi<Block, FullClient<RuntimeApi, Executor>> + + Send + + Sync + + 'static, + RuntimeApi::RuntimeApi: + RuntimeApiCollection<StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>, + Executor: sc_executor::NativeExecutionDispatch + 'static, +{ if config.keystore_remote.is_some() { return Err(ServiceError::Other( "Remote Keystores are not supported.".to_owned(), @@ -94,9 +214,14 @@ pub fn new_partial( telemetry.as_ref().map(|x| x.handle()), )?; - let slot_duration = sc_consensus_aura::slot_duration(&*client)?.slot_duration(); - - let import_queue = + let import_queue = if consensus_manual { + sc_consensus_manual_seal::import_queue( + Box::new(grandpa_block_import.clone()), + &task_manager.spawn_essential_handle(), + config.prometheus_registry(), + ) + } else { + let slot_duration = sc_consensus_aura::slot_duration(&*client)?.slot_duration(); sc_consensus_aura::import_queue::<AuraPair, _, _, _, _, _, _>(ImportQueueParams { block_import: grandpa_block_import.clone(), justification_import: Some(Box::new(grandpa_block_import.clone())), @@ -119,7 +244,8 @@ pub fn new_partial( registry: config.prometheus_registry(), check_for_equivocation: Default::default(), telemetry: telemetry.as_ref().map(|x| x.handle()), - })?; + })? + }; Ok(sc_service::PartialComponents { client, @@ -141,7 +267,19 @@ fn remote_keystore(_url: &str) -> Result<Arc<LocalKeystore>, &'static str> { } /// Builds a new service for a full client. -pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError> { +pub fn new_full<RuntimeApi, Executor>( + mut config: Configuration, + sealing_opt: Option<crate::cli::Sealing>, +) -> Result<TaskManager, ServiceError> +where + RuntimeApi: sp_api::ConstructRuntimeApi<Block, FullClient<RuntimeApi, Executor>> + + Send + + Sync + + 'static, + RuntimeApi::RuntimeApi: + RuntimeApiCollection<StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>, + Executor: sc_executor::NativeExecutionDispatch + 'static, +{ let sc_service::PartialComponents { client, backend, @@ -151,7 +289,7 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError> select_chain, transaction_pool, other: (block_import, grandpa_link, mut telemetry), - } = new_partial(&config)?; + } = new_partial::<RuntimeApi, Executor>(&config, sealing_opt.is_some())?; if let Some(url) = &config.keystore_remote { match remote_keystore(url) { @@ -197,6 +335,108 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError> let enable_grandpa = !config.disable_grandpa; let prometheus_registry = config.prometheus_registry().cloned(); + let mut command_sink_opt = None; + if role.is_authority() { + let proposer_factory = sc_basic_authorship::ProposerFactory::new( + task_manager.spawn_handle(), + client.clone(), + transaction_pool.clone(), + prometheus_registry.as_ref(), + telemetry.as_ref().map(|x| x.handle()), + ); + + if let Some(sealing) = sealing_opt { + let commands_stream: Box<dyn Stream<Item = EngineCommand<H256>> + Send + Sync + Unpin> = + match sealing { + crate::cli::Sealing::Instant => { + Box::new( + // This bit cribbed from the implementation of instant seal. + transaction_pool + .pool() + .validated_pool() + .import_notification_stream() + .map(|_| EngineCommand::SealNewBlock { + create_empty: false, + finalize: false, + parent_hash: None, + sender: None, + }), + ) + } + crate::cli::Sealing::Manual => { + let (sink, stream) = futures::channel::mpsc::channel(1000); + // Keep a reference to the other end of the channel. It goes to the RPC. + command_sink_opt = Some(sink); + Box::new(stream) + } + crate::cli::Sealing::Interval(millis) => Box::new(StreamExt::map( + Timer::interval(Duration::from_millis(millis)), + |_| EngineCommand::SealNewBlock { + create_empty: true, + finalize: false, + parent_hash: None, + sender: None, + }, + )), + }; + + task_manager.spawn_essential_handle().spawn_blocking( + "authorship_task", + run_manual_seal(ManualSealParams { + block_import, + env: proposer_factory, + client: client.clone(), + pool: transaction_pool.pool().clone(), + commands_stream, + select_chain, + consensus_data_provider: None, + create_inherent_data_providers: move |_, ()| async move { Ok(()) }, + }), + ); + } else { + let slot_duration = sc_consensus_aura::slot_duration(&*client)?; + let raw_slot_duration = slot_duration.slot_duration(); + let can_author_with = + sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()); + + let aura = sc_consensus_aura::start_aura::<AuraPair, _, _, _, _, _, _, _, _, _, _, _>( + StartAuraParams { + slot_duration, + client: client.clone(), + select_chain, + block_import, + proposer_factory, + create_inherent_data_providers: move |_, ()| async move { + let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); + + let slot = + sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration( + *timestamp, + raw_slot_duration, + ); + + Ok((timestamp, slot)) + }, + force_authoring, + backoff_authoring_blocks, + keystore: keystore_container.sync_keystore(), + can_author_with, + sync_oracle: network.clone(), + justification_sync_link: network.clone(), + block_proposal_slot_portion: SlotProportion::new(2f32 / 3f32), + max_block_proposal_slot_portion: None, + telemetry: telemetry.as_ref().map(|x| x.handle()), + }, + )?; + + // the AURA authoring task is considered essential, i.e. if it + // fails we take down the service with it. + task_manager + .spawn_essential_handle() + .spawn_blocking("aura", aura); + } + } + let rpc_extensions_builder = { let client = client.clone(); let pool = transaction_pool.clone(); @@ -206,6 +446,7 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError> client: client.clone(), pool: pool.clone(), deny_unsafe, + command_sink_opt: command_sink_opt.clone(), }; crate::rpc::create_full(deps) @@ -214,10 +455,10 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError> let _rpc_handlers = sc_service::spawn_tasks(sc_service::SpawnTasksParams { network: network.clone(), - client: client.clone(), + client, keystore: keystore_container.sync_keystore(), task_manager: &mut task_manager, - transaction_pool: transaction_pool.clone(), + transaction_pool, rpc_extensions_builder, on_demand: None, remote_blockchain: None, @@ -227,58 +468,6 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError> telemetry: telemetry.as_mut(), })?; - if role.is_authority() { - let proposer_factory = sc_basic_authorship::ProposerFactory::new( - task_manager.spawn_handle(), - client.clone(), - transaction_pool, - prometheus_registry.as_ref(), - telemetry.as_ref().map(|x| x.handle()), - ); - - let can_author_with = - sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()); - - let slot_duration = sc_consensus_aura::slot_duration(&*client)?; - let raw_slot_duration = slot_duration.slot_duration(); - - let aura = sc_consensus_aura::start_aura::<AuraPair, _, _, _, _, _, _, _, _, _, _, _>( - StartAuraParams { - slot_duration, - client, - select_chain, - block_import, - proposer_factory, - create_inherent_data_providers: move |_, ()| async move { - let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration( - *timestamp, - raw_slot_duration, - ); - - Ok((timestamp, slot)) - }, - force_authoring, - backoff_authoring_blocks, - keystore: keystore_container.sync_keystore(), - can_author_with, - sync_oracle: network.clone(), - justification_sync_link: network.clone(), - block_proposal_slot_portion: SlotProportion::new(2f32 / 3f32), - max_block_proposal_slot_portion: None, - telemetry: telemetry.as_ref().map(|x| x.handle()), - }, - )?; - - // the AURA authoring task is considered essential, i.e. if it - // fails we take down the service with it. - task_manager - .spawn_essential_handle() - .spawn_blocking("aura", aura); - } - // if the node isn't actively participating in consensus then it doesn't // need a keystore, regardless of which protocol we use below. let keystore = if role.is_authority() { @@ -328,7 +517,18 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError> } /// Builds a new service for a light client. -pub fn new_light(mut config: Configuration) -> Result<TaskManager, ServiceError> { +pub fn new_light<RuntimeApi, Executor>( + mut config: Configuration, +) -> Result<TaskManager, ServiceError> +where + RuntimeApi: sp_api::ConstructRuntimeApi<Block, LightClient<RuntimeApi, Executor>> + + Send + + Sync + + 'static, + RuntimeApi::RuntimeApi: + RuntimeApiCollection<StateBackend = sc_client_api::StateBackendFor<LightBackend, Block>>, + Executor: sc_executor::NativeExecutionDispatch + 'static, +{ let telemetry = config .telemetry_endpoints .clone() diff --git a/node/src/service/client.rs b/node/src/service/client.rs new file mode 100644 index 000000000..0b8c387dd --- /dev/null +++ b/node/src/service/client.rs @@ -0,0 +1,308 @@ +// Copyright 2021 Axiom-Team +// +// This file is part of Substrate-Libre-Currency. +// +// Substrate-Libre-Currency is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Substrate-Libre-Currency is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. + +use common_runtime::{AccountId, Balance, Block, BlockNumber, Hash, Header, Index}; +use sc_client_api::KeyIterator; +use sp_api::NumberFor; +use sp_consensus::BlockStatus; +use sp_runtime::{ + generic::{BlockId, SignedBlock}, + traits::{BlakeTwo256, Block as BlockT}, + Justifications, +}; +use sp_storage::{ChildInfo, PrefixedStorageKey, StorageData, StorageKey}; +use std::sync::Arc; + +/// A client instance. +#[derive(Clone)] +pub enum Client { + //G1(Arc<super::FullClient<g1_runtime::RuntimeApi, super::G1Executor>>), + GTest(Arc<super::FullClient<gtest_runtime::RuntimeApi, super::GTestExecutor>>), + GDev(Arc<super::FullClient<gdev_runtime::RuntimeApi, super::GDevExecutor>>), +} + +impl sc_client_api::UsageProvider<Block> for Client { + fn usage_info(&self) -> sc_client_api::ClientInfo<Block> { + match self { + Self::GTest(client) => client.usage_info(), + Self::GDev(client) => client.usage_info(), + } + } +} + +impl sc_client_api::BlockBackend<Block> for Client { + fn block_body( + &self, + id: &BlockId<Block>, + ) -> sp_blockchain::Result<Option<Vec<<Block as BlockT>::Extrinsic>>> { + match self { + Self::GTest(client) => client.block_body(id), + Self::GDev(client) => client.block_body(id), + } + } + + fn block_indexed_body( + &self, + id: &BlockId<Block>, + ) -> sp_blockchain::Result<Option<Vec<Vec<u8>>>> { + match self { + Self::GTest(client) => client.block_indexed_body(id), + Self::GDev(client) => client.block_indexed_body(id), + } + } + + fn block(&self, id: &BlockId<Block>) -> sp_blockchain::Result<Option<SignedBlock<Block>>> { + match self { + Self::GTest(client) => client.block(id), + Self::GDev(client) => client.block(id), + } + } + + fn block_status(&self, id: &BlockId<Block>) -> sp_blockchain::Result<BlockStatus> { + match self { + Self::GTest(client) => client.block_status(id), + Self::GDev(client) => client.block_status(id), + } + } + + fn justifications(&self, id: &BlockId<Block>) -> sp_blockchain::Result<Option<Justifications>> { + match self { + Self::GTest(client) => client.justifications(id), + Self::GDev(client) => client.justifications(id), + } + } + + fn block_hash( + &self, + number: NumberFor<Block>, + ) -> sp_blockchain::Result<Option<<Block as BlockT>::Hash>> { + match self { + Self::GTest(client) => client.block_hash(number), + Self::GDev(client) => client.block_hash(number), + } + } + + fn indexed_transaction( + &self, + hash: &<Block as BlockT>::Hash, + ) -> sp_blockchain::Result<Option<Vec<u8>>> { + match self { + Self::GTest(client) => client.indexed_transaction(hash), + Self::GDev(client) => client.indexed_transaction(hash), + } + } + + fn has_indexed_transaction( + &self, + hash: &<Block as BlockT>::Hash, + ) -> sp_blockchain::Result<bool> { + match self { + Self::GTest(client) => client.has_indexed_transaction(hash), + Self::GDev(client) => client.has_indexed_transaction(hash), + } + } +} + +impl sc_client_api::StorageProvider<Block, super::FullBackend> for Client { + fn storage( + &self, + id: &BlockId<Block>, + key: &StorageKey, + ) -> sp_blockchain::Result<Option<StorageData>> { + match self { + Self::GTest(client) => client.storage(id, key), + Self::GDev(client) => client.storage(id, key), + } + } + + fn storage_keys( + &self, + id: &BlockId<Block>, + key_prefix: &StorageKey, + ) -> sp_blockchain::Result<Vec<StorageKey>> { + match self { + Self::GTest(client) => client.storage_keys(id, key_prefix), + Self::GDev(client) => client.storage_keys(id, key_prefix), + } + } + + fn storage_hash( + &self, + id: &BlockId<Block>, + key: &StorageKey, + ) -> sp_blockchain::Result<Option<<Block as BlockT>::Hash>> { + match self { + Self::GTest(client) => client.storage_hash(id, key), + Self::GDev(client) => client.storage_hash(id, key), + } + } + + fn storage_pairs( + &self, + id: &BlockId<Block>, + key_prefix: &StorageKey, + ) -> sp_blockchain::Result<Vec<(StorageKey, StorageData)>> { + match self { + Self::GTest(client) => client.storage_pairs(id, key_prefix), + Self::GDev(client) => client.storage_pairs(id, key_prefix), + } + } + + fn storage_keys_iter<'a>( + &self, + id: &BlockId<Block>, + prefix: Option<&'a StorageKey>, + start_key: Option<&StorageKey>, + ) -> sp_blockchain::Result< + KeyIterator<'a, <super::FullBackend as sc_client_api::Backend<Block>>::State, Block>, + > { + match self { + Self::GTest(client) => client.storage_keys_iter(id, prefix, start_key), + Self::GDev(client) => client.storage_keys_iter(id, prefix, start_key), + } + } + + fn child_storage( + &self, + id: &BlockId<Block>, + child_info: &ChildInfo, + key: &StorageKey, + ) -> sp_blockchain::Result<Option<StorageData>> { + match self { + Self::GTest(client) => client.child_storage(id, child_info, key), + Self::GDev(client) => client.child_storage(id, child_info, key), + } + } + + fn child_storage_keys( + &self, + id: &BlockId<Block>, + child_info: &ChildInfo, + key_prefix: &StorageKey, + ) -> sp_blockchain::Result<Vec<StorageKey>> { + match self { + Self::GTest(client) => client.child_storage_keys(id, child_info, key_prefix), + Self::GDev(client) => client.child_storage_keys(id, child_info, key_prefix), + } + } + + fn child_storage_hash( + &self, + id: &BlockId<Block>, + child_info: &ChildInfo, + key: &StorageKey, + ) -> sp_blockchain::Result<Option<<Block as BlockT>::Hash>> { + match self { + Self::GTest(client) => client.child_storage_hash(id, child_info, key), + Self::GDev(client) => client.child_storage_hash(id, child_info, key), + } + } + + fn max_key_changes_range( + &self, + first: NumberFor<Block>, + last: BlockId<Block>, + ) -> sp_blockchain::Result<Option<(NumberFor<Block>, BlockId<Block>)>> { + match self { + Self::GTest(client) => client.max_key_changes_range(first, last), + Self::GDev(client) => client.max_key_changes_range(first, last), + } + } + + fn key_changes( + &self, + first: NumberFor<Block>, + last: BlockId<Block>, + storage_key: Option<&PrefixedStorageKey>, + key: &StorageKey, + ) -> sp_blockchain::Result<Vec<(NumberFor<Block>, u32)>> { + match self { + Self::GTest(client) => client.key_changes(first, last, storage_key, key), + Self::GDev(client) => client.key_changes(first, last, storage_key, key), + } + } +} + +impl sp_blockchain::HeaderBackend<Block> for Client { + fn header(&self, id: BlockId<Block>) -> sp_blockchain::Result<Option<Header>> { + match self { + Self::GTest(client) => client.header(&id), + Self::GDev(client) => client.header(&id), + } + } + fn info(&self) -> sp_blockchain::Info<Block> { + match self { + Self::GTest(client) => client.info(), + Self::GDev(client) => client.info(), + } + } + + fn status(&self, id: BlockId<Block>) -> sp_blockchain::Result<sp_blockchain::BlockStatus> { + match self { + Self::GTest(client) => client.status(id), + Self::GDev(client) => client.status(id), + } + } + + fn number(&self, hash: Hash) -> sp_blockchain::Result<Option<BlockNumber>> { + match self { + Self::GTest(client) => client.number(hash), + Self::GDev(client) => client.number(hash), + } + } + + fn hash(&self, number: BlockNumber) -> sp_blockchain::Result<Option<Hash>> { + match self { + Self::GTest(client) => client.hash(number), + Self::GDev(client) => client.hash(number), + } + } +} + +/// A set of APIs that runtimes must implement. +/// +/// This trait has no methods or associated type. It is a concise marker for all the trait bounds +/// that it contains. +pub trait RuntimeApiCollection: + sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> + + sp_api::ApiExt<Block> + + sp_block_builder::BlockBuilder<Block> + + substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Index> + + pallet_grandpa::fg_primitives::GrandpaApi<Block> + + pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> + + sp_api::Metadata<Block> + + sp_consensus_aura::AuraApi<Block, sp_consensus_aura::sr25519::AuthorityId> + + sp_offchain::OffchainWorkerApi<Block> + + sp_session::SessionKeys<Block> +where + <Self as sp_api::ApiExt<Block>>::StateBackend: sp_api::StateBackend<BlakeTwo256>, +{ +} +impl<Api> RuntimeApiCollection for Api +where + Api: sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> + + sp_api::ApiExt<Block> + + sp_block_builder::BlockBuilder<Block> + + substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Index> + + pallet_grandpa::fg_primitives::GrandpaApi<Block> + + pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> + + sp_api::Metadata<Block> + + sp_consensus_aura::AuraApi<Block, sp_consensus_aura::sr25519::AuthorityId> + + sp_offchain::OffchainWorkerApi<Block> + + sp_session::SessionKeys<Block>, + <Self as sp_api::ApiExt<Block>>::StateBackend: sp_api::StateBackend<BlakeTwo256>, +{ +} diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml new file mode 100644 index 000000000..37e10404c --- /dev/null +++ b/runtime/common/Cargo.toml @@ -0,0 +1,83 @@ +[package] +name = 'common-runtime' +description = 'Common code shared between runtimes' +license = 'GPL-3.0-only' +version = '0.8.0-dev' +authors = ['Axiom-Team Developers <https://axiom-team.fr>'] +edition = '2018' + +[features] +runtime-benchmarks = [ + 'frame-support/runtime-benchmarks', + 'frame-system/runtime-benchmarks', + 'pallet-certification/runtime-benchmarks', + 'pallet-identity/runtime-benchmarks', + 'pallet-ud-accounts-storage/runtime-benchmarks', + 'sp-runtime/runtime-benchmarks', +] +std = [ + 'codec/std', + 'frame-support/std', + 'frame-system/std', + 'pallet-certification/std', + 'pallet-identity/std', + 'pallet-ud-accounts-storage/std', + 'serde', + 'sp-arithmetic/std', + 'sp-core/std', + 'sp-runtime/std', + 'sp-std/std' +] + +[dependencies] +pallet-certification = { path = '../../pallets/certification', default-features = false } +pallet-identity = { path = '../../pallets/identity', default-features = false } +pallet-ud-accounts-storage = { path = '../../pallets/ud-accounts-storage', default-features = false } +smallvec = "1.6.1" + +[dependencies.codec] +default-features = false +features = ['derive'] +package = 'parity-scale-codec' +version = '2.1.0' + +[dependencies.frame-support] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.frame-system] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.serde] +version = "1.0.101" +optional = true +features = ["derive"] + +[dependencies.sp-arithmetic] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.sp-core] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.sp-runtime] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.sp-std] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' diff --git a/runtime/common/src/apis.rs b/runtime/common/src/apis.rs new file mode 100644 index 000000000..85cd92746 --- /dev/null +++ b/runtime/common/src/apis.rs @@ -0,0 +1,190 @@ +// Copyright 2021 Axiom-Team +// +// This file is part of Substrate-Libre-Currency. +// +// Substrate-Libre-Currency is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Substrate-Libre-Currency is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. + +#[macro_export] +macro_rules! impl_runtime_apis_plus_common { + {$($custom:tt)*} => { + impl_runtime_apis! { + $($custom)* + + impl sp_api::Core<Block> for Runtime { + fn version() -> RuntimeVersion { + VERSION + } + + fn execute_block(block: Block) { + Executive::execute_block(block) + } + + fn initialize_block(header: &<Block as BlockT>::Header) { + Executive::initialize_block(header) + } + } + + impl sp_api::Metadata<Block> for Runtime { + fn metadata() -> OpaqueMetadata { + Runtime::metadata().into() + } + } + + impl sp_block_builder::BlockBuilder<Block> for Runtime { + fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult { + Executive::apply_extrinsic(extrinsic) + } + + fn finalize_block() -> <Block as BlockT>::Header { + Executive::finalize_block() + } + + fn inherent_extrinsics( + data: sp_inherents::InherentData, + ) -> Vec<<Block as BlockT>::Extrinsic> { + data.create_extrinsics() + } + + fn check_inherents( + block: Block, + data: sp_inherents::InherentData, + ) -> sp_inherents::CheckInherentsResult { + data.check_extrinsics(&block) + } + } + + impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime { + fn validate_transaction( + source: TransactionSource, + tx: <Block as BlockT>::Extrinsic, + ) -> TransactionValidity { + Executive::validate_transaction(source, tx) + } + } + + impl sp_offchain::OffchainWorkerApi<Block> for Runtime { + fn offchain_worker(header: &<Block as BlockT>::Header) { + Executive::offchain_worker(header) + } + } + + impl sp_session::SessionKeys<Block> for Runtime { + fn decode_session_keys( + encoded: Vec<u8>, + ) -> Option<Vec<(Vec<u8>, KeyTypeId)>> { + opaque::SessionKeys::decode_into_raw_public_keys(&encoded) + } + + fn generate_session_keys(seed: Option<Vec<u8>>) -> Vec<u8> { + opaque::SessionKeys::generate(seed) + } + } + + impl fg_primitives::GrandpaApi<Block> for Runtime { + fn grandpa_authorities() -> GrandpaAuthorityList { + Grandpa::grandpa_authorities() + } + + fn submit_report_equivocation_unsigned_extrinsic( + _equivocation_proof: fg_primitives::EquivocationProof< + <Block as BlockT>::Hash, + NumberFor<Block>, + >, + _key_owner_proof: fg_primitives::OpaqueKeyOwnershipProof, + ) -> Option<()> { + None + } + + fn generate_key_ownership_proof( + _set_id: fg_primitives::SetId, + _authority_id: GrandpaId, + ) -> Option<fg_primitives::OpaqueKeyOwnershipProof> { + // NOTE: this is the only implementation possible since we've + // defined our key owner proof type as a bottom type (i.e. a type + // with no values). + None + } + } + + impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime { + fn account_nonce(account: AccountId) -> Index { + System::account_nonce(account) + } + } + + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> + for Runtime { + fn query_info( + uxt: <Block as BlockT>::Extrinsic, + len: u32, + ) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo<Balance> { + TransactionPayment::query_info(uxt, len) + } + + fn query_fee_details( + uxt: <Block as BlockT>::Extrinsic, + len: u32, + ) -> pallet_transaction_payment::FeeDetails<Balance> { + TransactionPayment::query_fee_details(uxt, len) + } + } + + #[cfg(feature = "runtime-benchmarks")] + impl frame_benchmarking::Benchmark<Block> for Runtime { + fn dispatch_benchmark( + config: frame_benchmarking::BenchmarkConfig, + ) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> { + use frame_benchmarking::{ + add_benchmark, BenchmarkBatch, Benchmarking, TrackedStorageKey, + }; + + use frame_system_benchmarking::Pallet as SystemBench; + impl frame_system_benchmarking::Config for Runtime {} + + use pallet_crowdloan_rewards::Pallet as PalletCrowdloanRewardsBench; + use parachain_staking::Pallet as ParachainStakingBench; + use pallet_author_mapping::Pallet as PalletAuthorMappingBench; + let whitelist: Vec<TrackedStorageKey> = vec![]; + + let mut batches = Vec::<BenchmarkBatch>::new(); + let params = (&config, &whitelist); + + add_benchmark!( + params, + batches, + parachain_staking, + ParachainStakingBench::<Runtime> + ); + // add_benchmark!( + // params, + // batches, + // pallet_crowdloan_rewards, + // PalletCrowdloanRewardsBench::<Runtime> + // ); + add_benchmark!( + params, + batches, + pallet_author_mapping, + PalletAuthorMappingBench::<Runtime> + ); + add_benchmark!(params, batches, frame_system, SystemBench::<Runtime>); + + if batches.is_empty() { + return Err("Benchmark not found for this pallet.".into()); + } + Ok(batches) + } + } + } + }; +} diff --git a/runtime/src/authorizations.rs b/runtime/common/src/authorizations.rs similarity index 61% rename from runtime/src/authorizations.rs rename to runtime/common/src/authorizations.rs index 61dbac0aa..4a4a6e591 100644 --- a/runtime/src/authorizations.rs +++ b/runtime/common/src/authorizations.rs @@ -14,49 +14,58 @@ // You should have received a copy of the GNU Affero General Public License // along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. -use crate::{ - AccountId, BlockNumber, Identity, IdtyData, IdtyDid, IdtyIndex, IdtyRight, Origin, Runtime, - StrongCert, System, -}; +use crate::entities::{IdtyData, IdtyDid, IdtyRight}; +use crate::{BlockNumber, IdtyIndex}; use frame_support::pallet_prelude::DispatchError; use frame_support::traits::EnsureOrigin; use pallet_identity::IdtyStatus; -const IDTY_CREATE_PERIOD: BlockNumber = 100; - -pub struct EnsureIdtyCallAllowedImpl; -impl pallet_identity::traits::EnsureIdtyCallAllowed<Runtime> for EnsureIdtyCallAllowedImpl { +pub struct EnsureIdtyCallAllowedImpl<Runtime, const IDTY_CREATE_PERIOD: BlockNumber>( + core::marker::PhantomData<Runtime>, +); +impl< + Runtime: frame_system::Config<BlockNumber = BlockNumber> + + pallet_identity::Config< + IdtyData = IdtyData, + IdtyDid = IdtyDid, + IdtyIndex = IdtyIndex, + IdtyRight = IdtyRight, + > + pallet_certification::Config<IdtyIndex = IdtyIndex>, + const IDTY_CREATE_PERIOD: BlockNumber, + > pallet_identity::traits::EnsureIdtyCallAllowed<Runtime> + for EnsureIdtyCallAllowedImpl<Runtime, IDTY_CREATE_PERIOD> +{ fn create_identity( - origin: Origin, + origin: Runtime::Origin, creator: IdtyIndex, _idty_did: &IdtyDid, - _idty_owner_key: &AccountId, + _idty_owner_key: &Runtime::AccountId, ) -> Result<IdtyData, DispatchError> { - let block_number = System::block_number(); + let block_number = frame_system::Pallet::<Runtime>::block_number(); let creator_idty_data = IdtyData { can_create_on: block_number + IDTY_CREATE_PERIOD, }; let new_idty_data = IdtyData { can_create_on: 0 }; match origin.into() { Ok(frame_system::RawOrigin::Root) => { - Identity::set_idty_data(creator, creator_idty_data); + pallet_identity::Pallet::<Runtime>::set_idty_data(creator, creator_idty_data); Ok(new_idty_data) } Ok(frame_system::RawOrigin::Signed(signer)) => { - let creator_idty = Identity::identity(creator); + let creator_idty = pallet_identity::Pallet::<Runtime>::identity(creator); if let Some(authorized_key) = creator_idty.get_right_key(IdtyRight::CreateIdty) { if signer != authorized_key { frame_support::runtime_print!("signer != authorized_key"); Err(DispatchError::Other("signer != authorized_key")) - } else if !StrongCert::is_idty_allowed_to_create_cert(creator) { + } else if !pallet_certification::Pallet::<Runtime>::is_idty_allowed_to_create_cert(creator) { frame_support::runtime_print!("not allowed to create cert"); Err(DispatchError::Other("not allowed to create cert")) - } else if creator_idty.data.can_create_on > System::block_number() { + } else if creator_idty.data.can_create_on > frame_system::Pallet::<Runtime>::block_number() { frame_support::runtime_print!("Not respect IdtyCreatePeriod"); Err(DispatchError::Other("Not respect IdtyCreatePeriod")) } else { - Identity::set_idty_data(creator, creator_idty_data); + pallet_identity::Pallet::<Runtime>::set_idty_data(creator, creator_idty_data); Ok(new_idty_data) } } else { @@ -72,20 +81,22 @@ impl pallet_identity::traits::EnsureIdtyCallAllowed<Runtime> for EnsureIdtyCallA } } -pub struct AddStrongCertOrigin; -impl EnsureOrigin<(Origin, IdtyIndex, IdtyIndex)> for AddStrongCertOrigin { +pub struct AddStrongCertOrigin<Runtime>(core::marker::PhantomData<Runtime>); +impl<Runtime: pallet_identity::Config<IdtyIndex = IdtyIndex, IdtyRight = IdtyRight>> + EnsureOrigin<(Runtime::Origin, IdtyIndex, IdtyIndex)> for AddStrongCertOrigin<Runtime> +{ type Success = (); fn try_origin( - o: (Origin, IdtyIndex, IdtyIndex), - ) -> Result<Self::Success, (Origin, IdtyIndex, IdtyIndex)> { + o: (Runtime::Origin, IdtyIndex, IdtyIndex), + ) -> Result<Self::Success, (Runtime::Origin, IdtyIndex, IdtyIndex)> { match o.0.clone().into() { Ok(frame_system::RawOrigin::Root) => Ok(()), Ok(frame_system::RawOrigin::Signed(who)) => { - let issuer = Identity::identity(o.1); + let issuer = pallet_identity::Pallet::<Runtime>::identity(o.1); if let Some(allowed_key) = issuer.get_right_key(IdtyRight::StrongCert) { if who == allowed_key { - let receiver = Identity::identity(o.2); + let receiver = pallet_identity::Pallet::<Runtime>::identity(o.2); match receiver.status { IdtyStatus::ConfirmedByOwner | IdtyStatus::Validated => Ok(()), IdtyStatus::Created | IdtyStatus::Expired => Err(o), @@ -104,15 +115,17 @@ impl EnsureOrigin<(Origin, IdtyIndex, IdtyIndex)> for AddStrongCertOrigin { } } -pub struct DelStrongCertOrigin; -impl EnsureOrigin<(Origin, IdtyIndex, IdtyIndex)> for DelStrongCertOrigin { +pub struct DelStrongCertOrigin<Runtime>(core::marker::PhantomData<Runtime>); +impl<Runtime: frame_system::Config> EnsureOrigin<(Runtime::Origin, IdtyIndex, IdtyIndex)> + for DelStrongCertOrigin<Runtime> +{ type Success = (); fn try_origin( - o: (Origin, IdtyIndex, IdtyIndex), - ) -> Result<Self::Success, (Origin, IdtyIndex, IdtyIndex)> { + o: (Runtime::Origin, IdtyIndex, IdtyIndex), + ) -> Result<Self::Success, (Runtime::Origin, IdtyIndex, IdtyIndex)> { match o.0.clone().into() { - Ok(frame_system::RawOrigin::Root) => Ok(()), + Ok(frame_system::Origin::<Runtime>::Root) => Ok(()), _ => Err(o), } } diff --git a/runtime/common/src/constants.rs b/runtime/common/src/constants.rs new file mode 100644 index 000000000..94f2f7f2b --- /dev/null +++ b/runtime/common/src/constants.rs @@ -0,0 +1,41 @@ +// Copyright 2021 Axiom-Team +// +// This file is part of Substrate-Libre-Currency. +// +// Substrate-Libre-Currency is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Substrate-Libre-Currency is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. + +use crate::BlockNumber; +use sp_runtime::Perbill; + +/// This determines the average expected block time that we are targeting. +/// Blocks will be produced at a minimum duration defined by `SLOT_DURATION`. +/// `SLOT_DURATION` is picked up by `pallet_timestamp` which is in turn picked +/// up by `pallet_aura` to implement `fn slot_duration()`. +/// +/// Change this to adjust the block time. +pub const MILLISECS_PER_BLOCK: u64 = 6000; +pub const SECS_PER_BLOCK: u64 = MILLISECS_PER_BLOCK / 1_000; + +// NOTE: Currently it is not possible to change the slot duration after the chain has started. +// Attempting to do so will brick block production. +pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; + +// Time is measured by number of blocks. +pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); +pub const HOURS: BlockNumber = MINUTES * 60; +pub const DAYS: BlockNumber = HOURS * 24; +const SECS_PER_YEAR: u64 = 31_557_600; // (365.25 * 24 * 60 * 60) +pub const MONTHS: BlockNumber = (SECS_PER_YEAR / (12 * SECS_PER_BLOCK)) as BlockNumber; +pub const YEARS: BlockNumber = (SECS_PER_YEAR / SECS_PER_BLOCK) as BlockNumber; + +pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); diff --git a/runtime/src/entities.rs b/runtime/common/src/entities.rs similarity index 100% rename from runtime/src/entities.rs rename to runtime/common/src/entities.rs diff --git a/runtime/common/src/fees.rs b/runtime/common/src/fees.rs new file mode 100644 index 000000000..f4093e6ad --- /dev/null +++ b/runtime/common/src/fees.rs @@ -0,0 +1,38 @@ +// Copyright 2021 Axiom-Team +// +// This file is part of Substrate-Libre-Currency. +// +// Substrate-Libre-Currency is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Substrate-Libre-Currency is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. + +pub use frame_support::weights::{ + Weight, WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial, +}; +use sp_arithmetic::traits::{BaseArithmetic, Unsigned}; + +pub struct WeightToFeeImpl<T>(sp_std::marker::PhantomData<T>); + +impl<T> WeightToFeePolynomial for WeightToFeeImpl<T> +where + T: BaseArithmetic + From<u32> + Copy + Unsigned, +{ + type Balance = T; + + fn polynomial() -> WeightToFeeCoefficients<Self::Balance> { + smallvec::smallvec!(WeightToFeeCoefficient { + coeff_integer: 0u32.into(), + coeff_frac: sp_runtime::Perbill::from_parts(1), + negative: false, + degree: 1, + }) + } +} diff --git a/runtime/common/src/handlers.rs b/runtime/common/src/handlers.rs new file mode 100644 index 000000000..ce0e11543 --- /dev/null +++ b/runtime/common/src/handlers.rs @@ -0,0 +1,137 @@ +// Copyright 2021 Axiom-Team +// +// This file is part of Substrate-Libre-Currency. +// +// Substrate-Libre-Currency is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Substrate-Libre-Currency is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. + +use crate::entities::IdtyRight; +use frame_support::weights::Weight; +use pallet_identity::traits::IdtyEvent; + +type IdtyIndex<T> = <T as pallet_identity::Config>::IdtyIndex; + +pub struct OnIdtyChangeHandler<Runtime>(core::marker::PhantomData<Runtime>); +impl< + II, + Runtime: pallet_identity::Config<IdtyIndex = II> + pallet_certification::Config<IdtyIndex = II>, + > pallet_identity::traits::OnIdtyChange<Runtime> for OnIdtyChangeHandler<Runtime> +{ + fn on_idty_change(idty_index: IdtyIndex<Runtime>, idty_event: IdtyEvent<Runtime>) -> Weight { + let total_weight = 0; + match idty_event { + IdtyEvent::Created { creator } => { + // totad_weight += StrongCert::WeightInfo::add_cert(); + let _ = <pallet_certification::Pallet<Runtime>>::add_cert( + frame_system::Origin::<Runtime>::Root.into(), + creator, + idty_index, + ); + } + IdtyEvent::Confirmed => {} + IdtyEvent::Validated => {} + IdtyEvent::Expired => {} + IdtyEvent::Removed => {} + }; + total_weight + } +} + +pub struct OnRightKeyChangeHandler<Runtime>(core::marker::PhantomData<Runtime>); +impl< + Runtime: pallet_identity::Config<IdtyRight = IdtyRight> + pallet_ud_accounts_storage::Config, + > pallet_identity::traits::OnRightKeyChange<Runtime> for OnRightKeyChangeHandler<Runtime> +{ + fn on_right_key_change( + _idty_index: IdtyIndex<Runtime>, + right: Runtime::IdtyRight, + old_key_opt: Option<Runtime::AccountId>, + new_key_opt: Option<Runtime::AccountId>, + ) { + match right { + IdtyRight::Ud => <pallet_ud_accounts_storage::Pallet<Runtime>>::replace_account( + old_key_opt, + new_key_opt, + ), + IdtyRight::CreateIdty => 0, + IdtyRight::LightCert => 0, + IdtyRight::StrongCert => 0, + }; + } +} + +pub struct OnNewStrongCertHandler< + Runtime, + const MIN_STRONG_CERT_FOR_UD: u32, + const MIN_STRONG_CERT_FOR_STRONG_CERT: u32, +>(core::marker::PhantomData<Runtime>); +impl< + Runtime: pallet_identity::Config<IdtyRight = IdtyRight>, + const MIN_STRONG_CERT_FOR_UD: u32, + const MIN_STRONG_CERT_FOR_STRONG_CERT: u32, + > pallet_certification::traits::OnNewcert<IdtyIndex<Runtime>> + for OnNewStrongCertHandler<Runtime, MIN_STRONG_CERT_FOR_UD, MIN_STRONG_CERT_FOR_STRONG_CERT> +{ + fn on_new_cert( + _issuer: IdtyIndex<Runtime>, + _issuer_issued_count: u8, + receiver: IdtyIndex<Runtime>, + receiver_received_count: u32, + ) -> frame_support::dispatch::Weight { + let total_weight = 0; + if receiver_received_count == MIN_STRONG_CERT_FOR_UD { + // total_weight += Identity::WeightInfo::add_right(); + let _ = <pallet_identity::Pallet<Runtime>>::validate_identity_and_add_rights( + frame_system::Origin::<Runtime>::Root.into(), + receiver, + sp_std::vec![IdtyRight::Ud], + ); + } else if receiver_received_count == MIN_STRONG_CERT_FOR_STRONG_CERT { + // total_weight += Identity::WeightInfo::add_right(); + let _ = <pallet_identity::Pallet<Runtime>>::add_right( + frame_system::Origin::<Runtime>::Root.into(), + receiver, + IdtyRight::StrongCert, + ); + } + total_weight + } +} + +pub struct OnRemovedStrongCertHandler<Runtime, const MIN_STRONG_CERT_FOR_UD: u32>( + core::marker::PhantomData<Runtime>, +); +impl< + Runtime: pallet_identity::Config<IdtyRight = IdtyRight>, + const MIN_STRONG_CERT_FOR_UD: u32, + > pallet_certification::traits::OnRemovedCert<IdtyIndex<Runtime>> + for OnRemovedStrongCertHandler<Runtime, MIN_STRONG_CERT_FOR_UD> +{ + fn on_removed_cert( + _issuer: IdtyIndex<Runtime>, + _issuer_issued_count: u8, + receiver: IdtyIndex<Runtime>, + receiver_received_count: u32, + _expiration: bool, + ) -> frame_support::dispatch::Weight { + let total_weight = 0; + if receiver_received_count < MIN_STRONG_CERT_FOR_UD { + // total_weight += Identity::WeightInfo::del_right(); + let _ = <pallet_identity::Pallet<Runtime>>::del_right( + frame_system::Origin::<Runtime>::Root.into(), + receiver, + IdtyRight::Ud, + ); + } + total_weight + } +} diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs new file mode 100644 index 000000000..a4fd4f3f0 --- /dev/null +++ b/runtime/common/src/lib.rs @@ -0,0 +1,60 @@ +// Copyright 2021 Axiom-Team +// +// This file is part of Substrate-Libre-Currency. +// +// Substrate-Libre-Currency is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Substrate-Libre-Currency is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. + +#![cfg_attr(not(feature = "std"), no_std)] + +mod apis; +pub mod authorizations; +pub mod constants; +pub mod entities; +pub mod fees; +pub mod handlers; + +pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic; + +/// Some way of identifying an account on the chain. We intentionally make it equivalent +/// to the public key of our transaction signing scheme. +pub type AccountId = <<Signature as sp_runtime::traits::Verify>::Signer as sp_runtime::traits::IdentifyAccount>::AccountId; + +/// The address format for describing accounts. +pub type Address = sp_runtime::MultiAddress<AccountId, ()>; + +/// Balance of an account. +pub type Balance = u64; + +/// Bock type. +pub type Block = sp_runtime::generic::Block<Header, UncheckedExtrinsic>; + +/// Block identifier type. +pub type BlockId = sp_runtime::generic::BlockId<Block>; + +/// An index to a block. +pub type BlockNumber = u32; + +/// A hash of some data used by the chain. +pub type Hash = sp_core::H256; + +/// Block header type +pub type Header = sp_runtime::generic::Header<BlockNumber, sp_runtime::traits::BlakeTwo256>; + +/// Index of an identity +pub type IdtyIndex = u64; + +/// Index of a transaction in the chain. +pub type Index = u32; + +/// Alias to 512-bit hash when used in the context of a transaction signature on the chain. +pub type Signature = sp_runtime::MultiSignature; diff --git a/runtime/Cargo.toml b/runtime/g1/Cargo.toml similarity index 91% rename from runtime/Cargo.toml rename to runtime/g1/Cargo.toml index 6787d2e02..f4fa2d37a 100644 --- a/runtime/Cargo.toml +++ b/runtime/g1/Cargo.toml @@ -4,11 +4,11 @@ tag = 'monthly-2021-07' version = '4.0.0' [package] -authors = ['Substrate DevHub <https://github.com/substrate-developer-hub>'] +authors = ['Axiom-Team Developers <https://axiom-team.fr>'] edition = '2018' homepage = 'https://substrate.dev' license = 'AGPL-3.0' -name = 'lc-core-runtime' +name = 'g1-runtime' repository = 'https://git.duniter.org/nodes/rust/lc-core-substrate' version = '3.0.0' [package.metadata.docs.rs] @@ -44,6 +44,7 @@ std = [ 'pallet-timestamp/std', 'pallet-transaction-payment-rpc-runtime-api/std', 'pallet-transaction-payment/std', + 'common-runtime/std', 'serde', 'sp-api/std', 'sp-arithmetic/std', @@ -58,6 +59,14 @@ std = [ 'sp-transaction-pool/std', 'sp-version/std', ] + +[dependencies] +pallet-certification = { path = '../../pallets/certification', default-features = false } +pallet-identity = { path = '../../pallets/identity', default-features = false } +pallet-ud-accounts-storage = { path = '../../pallets/ud-accounts-storage', default-features = false } +pallet-universal-dividend = { path = '../../pallets/universal-dividend', default-features = false } +common-runtime = { path = "../common", default-features = false } + [dependencies.codec] default-features = false features = ['derive'] @@ -118,10 +127,6 @@ git = 'https://github.com/paritytech/substrate.git' tag = 'monthly-2021-07' version = '3.0.0' -[dependencies.pallet-certification] -default-features = false -path = '../pallets/certification' - [dependencies.pallet-grandpa] default-features = false git = 'https://github.com/paritytech/substrate.git' @@ -140,18 +145,6 @@ git = 'https://github.com/paritytech/substrate.git' tag = 'monthly-2021-07' version = '3.0.0' -[dependencies.pallet-identity] -default-features = false -path = '../pallets/identity' - -[dependencies.pallet-ud-accounts-storage] -default-features = false -path = '../pallets/ud-accounts-storage' - -[dependencies.pallet-universal-dividend] -default-features = false -path = '../pallets/universal-dividend' - [dependencies.pallet-timestamp] default-features = false git = 'https://github.com/paritytech/substrate.git' diff --git a/runtime/build.rs b/runtime/g1/build.rs similarity index 100% rename from runtime/build.rs rename to runtime/g1/build.rs diff --git a/runtime/src/lib.rs b/runtime/g1/src/lib.rs similarity index 59% rename from runtime/src/lib.rs rename to runtime/g1/src/lib.rs index 0ddf09043..5801ba073 100644 --- a/runtime/src/lib.rs +++ b/runtime/g1/src/lib.rs @@ -22,11 +22,11 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); -mod authorizations; -mod entities; -mod handlers; - -pub use crate::entities::{IdtyData, IdtyDid, IdtyRight, Planet}; +pub use common_runtime::{ + constants::*, + entities::{IdtyData, IdtyDid, IdtyRight, Planet}, + AccountId, Address, Balance, BlockNumber, Hash, Header, IdtyIndex, Index, Signature, +}; pub use pallet_balances::Call as BalancesCall; pub use pallet_identity::{IdtyStatus, IdtyValue}; pub use pallet_timestamp::Call as TimestampCall; @@ -36,22 +36,24 @@ pub use pallet_universal_dividend; pub use sp_runtime::BuildStorage; pub use sp_runtime::{Perbill, Permill}; -use crate::handlers::OnRightKeyChangeHandler; +use common_runtime::{ + authorizations::{AddStrongCertOrigin, DelStrongCertOrigin, EnsureIdtyCallAllowedImpl}, + handlers::{ + OnIdtyChangeHandler, OnNewStrongCertHandler, OnRemovedStrongCertHandler, + OnRightKeyChangeHandler, + }, +}; use frame_support::traits::Get; use frame_system::EnsureRoot; use pallet_grandpa::fg_primitives; use pallet_grandpa::{AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList}; use sp_api::impl_runtime_apis; -use sp_arithmetic::traits::{BaseArithmetic, Unsigned}; -use sp_consensus_aura::sr25519::AuthorityId as AuraId; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; -use sp_runtime::traits::{ - AccountIdLookup, BlakeTwo256, Block as BlockT, IdentifyAccount, NumberFor, Verify, -}; +use sp_runtime::traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, NumberFor}; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, MultiSignature, + ApplyExtrinsicResult, }; use sp_std::prelude::*; #[cfg(feature = "std")] @@ -69,28 +71,6 @@ pub use frame_support::{ StorageValue, }; -/// An index to a block. -pub type BlockNumber = u32; - -/// Alias to 512-bit hash when used in the context of a transaction signature on the chain. -pub type Signature = MultiSignature; - -/// Some way of identifying an account on the chain. We intentionally make it equivalent -/// to the public key of our transaction signing scheme. -pub type AccountId = <<Signature as Verify>::Signer as IdentifyAccount>::AccountId; - -/// Balance of an account. -pub type Balance = u64; - -/// Index of an identity -pub type IdtyIndex = u64; - -/// Index of a transaction in the chain. -pub type Index = u32; - -/// A hash of some data used by the chain. -pub type Hash = sp_core::H256; - /// Opaque types. These are used by the CLI to instantiate machinery that don't need to know /// the specifics of the runtime. They can then be made to be agnostic over specific formats /// of data like extrinsics, allowing for them to continue syncing the network through upgrades @@ -133,27 +113,6 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { transaction_version: 1, }; -/// This determines the average expected block time that we are targeting. -/// Blocks will be produced at a minimum duration defined by `SLOT_DURATION`. -/// `SLOT_DURATION` is picked up by `pallet_timestamp` which is in turn picked -/// up by `pallet_aura` to implement `fn slot_duration()`. -/// -/// Change this to adjust the block time. -pub const MILLISECS_PER_BLOCK: u64 = 6000; -pub const SECS_PER_BLOCK: u64 = MILLISECS_PER_BLOCK / 1_000; - -// NOTE: Currently it is not possible to change the slot duration after the chain has started. -// Attempting to do so will brick block production. -pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; - -// Time is measured by number of blocks. -pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); -pub const HOURS: BlockNumber = MINUTES * 60; -pub const DAYS: BlockNumber = HOURS * 24; -const SECS_PER_YEAR: u64 = 31_557_600; // (365.25 * 24 * 60 * 60) -pub const MONTHS: BlockNumber = (SECS_PER_YEAR / (12 * SECS_PER_BLOCK)) as BlockNumber; -pub const YEARS: BlockNumber = (SECS_PER_YEAR / SECS_PER_BLOCK) as BlockNumber; - /// The version information used to identify this runtime when compiled natively. #[cfg(feature = "std")] pub fn native_version() -> NativeVersion { @@ -163,8 +122,6 @@ pub fn native_version() -> NativeVersion { } } -const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); - parameter_types! { pub const Version: RuntimeVersion = VERSION; pub const BlockHashCount: BlockNumber = 2400; @@ -232,7 +189,7 @@ impl frame_system::Config for Runtime { impl pallet_randomness_collective_flip::Config for Runtime {} impl pallet_aura::Config for Runtime { - type AuthorityId = AuraId; + type AuthorityId = sp_consensus_aura::sr25519::AuthorityId; } impl pallet_grandpa::Config for Runtime { @@ -289,28 +246,10 @@ parameter_types! { pub const TransactionByteFee: Balance = 0; } -pub struct WeightToFeeImpl<T>(sp_std::marker::PhantomData<T>); - -impl<T> WeightToFeePolynomial for WeightToFeeImpl<T> -where - T: BaseArithmetic + From<u32> + Copy + Unsigned, -{ - type Balance = T; - - fn polynomial() -> WeightToFeeCoefficients<Self::Balance> { - smallvec::smallvec!(WeightToFeeCoefficient { - coeff_integer: 0u32.into(), - coeff_frac: Perbill::from_parts(1), - negative: false, - degree: 1, - }) - } -} - impl pallet_transaction_payment::Config for Runtime { type OnChargeTransaction = CurrencyAdapter<Balances, ()>; type TransactionByteFee = TransactionByteFee; - type WeightToFee = WeightToFeeImpl<Balance>; + type WeightToFee = common_runtime::fees::WeightToFeeImpl<Balance>; type FeeMultiplierUpdate = (); } @@ -321,6 +260,8 @@ impl pallet_sudo::Config for Runtime { // PALLET IDENTITY +const IDTY_CREATE_PERIOD: BlockNumber = 100; + parameter_types! { pub const ConfirmPeriod: BlockNumber = 12 * HOURS; pub const MaxInactivityPeriod: BlockNumber = YEARS; @@ -335,14 +276,14 @@ impl pallet_identity::Config for Runtime { type Event = Event; type AddRightOrigin = EnsureRoot<Self::AccountId>; type DelRightOrigin = EnsureRoot<Self::AccountId>; - type EnsureIdtyCallAllowed = crate::authorizations::EnsureIdtyCallAllowedImpl; + type EnsureIdtyCallAllowed = EnsureIdtyCallAllowedImpl<Runtime, IDTY_CREATE_PERIOD>; type IdtyData = IdtyData; type IdtyDid = IdtyDid; type IdtyIndex = IdtyIndex; type IdtyValidationOrigin = EnsureRoot<Self::AccountId>; type IdtyRight = IdtyRight; - type OnIdtyChange = crate::handlers::OnIdtyChangeHandler; - type OnRightKeyChange = OnRightKeyChangeHandler; + type OnIdtyChange = OnIdtyChangeHandler<Runtime>; + type OnRightKeyChange = OnRightKeyChangeHandler<Runtime>; type MaxInactivityPeriod = MaxInactivityPeriod; type MaxNoRightPeriod = MaxNoRightPeriod; type RenewablePeriod = IdtyRenewablePeriod; @@ -351,6 +292,9 @@ impl pallet_identity::Config for Runtime { // PALLET CERTIFICATION +const MIN_STRONG_CERT_FOR_UD: u32 = 2; +const MIN_STRONG_CERT_FOR_STRONG_CERT: u32 = 3; + parameter_types! { pub const CertPeriod: BlockNumber = 15; pub const MaxByIssuer: u8 = 100; @@ -360,14 +304,15 @@ parameter_types! { /// Configure the pallet certification impl pallet_certification::Config for Runtime { - type AddCertOrigin = crate::authorizations::AddStrongCertOrigin; + type AddCertOrigin = AddStrongCertOrigin<Runtime>; type CertPeriod = CertPeriod; - type DelCertOrigin = crate::authorizations::DelStrongCertOrigin; + type DelCertOrigin = DelStrongCertOrigin<Runtime>; type Event = Event; type IdtyIndex = IdtyIndex; type MaxByIssuer = MaxByIssuer; - type OnNewcert = crate::handlers::OnNewStrongCertHandler; - type OnRemovedCert = crate::handlers::OnRemovedStrongCertHandler; + type OnNewcert = + OnNewStrongCertHandler<Runtime, MIN_STRONG_CERT_FOR_UD, MIN_STRONG_CERT_FOR_STRONG_CERT>; + type OnRemovedCert = OnRemovedStrongCertHandler<Runtime, MIN_STRONG_CERT_FOR_UD>; type RenewablePeriod = StrongCertRenewablePeriod; type ValidityPeriod = ValidityPeriod; } @@ -412,7 +357,7 @@ impl pallet_ud_accounts_storage::Config for Runtime {} construct_runtime!( pub enum Runtime where Block = Block, - NodeBlock = opaque::Block, + NodeBlock = common_runtime::Block, UncheckedExtrinsic = UncheckedExtrinsic { System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, @@ -430,12 +375,10 @@ construct_runtime!( } ); -/// The address format for describing accounts. -pub type Address = sp_runtime::MultiAddress<AccountId, ()>; -/// Block header type as expected by this runtime. -pub type Header = generic::Header<BlockNumber, BlakeTwo256>; /// Block type as expected by this runtime. -pub type Block = generic::Block<Header, UncheckedExtrinsic>; +pub type Block = sp_runtime::generic::Block<Header, UncheckedExtrinsic>; +/// Unchecked extrinsic type as expected by this runtime. +pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>; /// The SignedExtension to the basic transaction logic. pub type SignedExtra = ( frame_system::CheckSpecVersion<Runtime>, @@ -446,8 +389,6 @@ pub type SignedExtra = ( frame_system::CheckWeight<Runtime>, pallet_transaction_payment::ChargeTransactionPayment<Runtime>, ); -/// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>; /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -457,165 +398,24 @@ pub type Executive = frame_executive::Executive< AllPallets, >; -impl_runtime_apis! { - impl sp_api::Core<Block> for Runtime { - fn version() -> RuntimeVersion { - VERSION - } - - fn execute_block(block: Block) { - Executive::execute_block(block); - } - - fn initialize_block(header: &<Block as BlockT>::Header) { - Executive::initialize_block(header) - } - } - - impl sp_api::Metadata<Block> for Runtime { - fn metadata() -> OpaqueMetadata { - Runtime::metadata().into() - } - } - - impl sp_block_builder::BlockBuilder<Block> for Runtime { - fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult { - Executive::apply_extrinsic(extrinsic) - } - - fn finalize_block() -> <Block as BlockT>::Header { - Executive::finalize_block() - } - - fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<<Block as BlockT>::Extrinsic> { - data.create_extrinsics() - } - - fn check_inherents( - block: Block, - data: sp_inherents::InherentData, - ) -> sp_inherents::CheckInherentsResult { - data.check_extrinsics(&block) - } - } - - impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime { - fn validate_transaction( - source: TransactionSource, - tx: <Block as BlockT>::Extrinsic, - ) -> TransactionValidity { - Executive::validate_transaction(source, tx) - } - } - - impl sp_offchain::OffchainWorkerApi<Block> for Runtime { - fn offchain_worker(header: &<Block as BlockT>::Header) { - Executive::offchain_worker(header) - } - } - - impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime { +// All of our runtimes share most of their Runtime API implementations. +// We use a macro to implement this common part and add runtime-specific additional implementations. +// This macro expands to : +// ``` +// impl_runtime_apis! { +// // All impl blocks shared between all runtimes. +// +// // Specific impls provided to the `impl_runtime_apis_plus_common!` macro. +// } +// ``` +common_runtime::impl_runtime_apis_plus_common! { + impl sp_consensus_aura::AuraApi<Block, sp_consensus_aura::sr25519::AuthorityId> for Runtime { fn slot_duration() -> sp_consensus_aura::SlotDuration { sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration()) } - fn authorities() -> Vec<AuraId> { + fn authorities() -> Vec<sp_consensus_aura::sr25519::AuthorityId> { Aura::authorities() } } - - impl sp_session::SessionKeys<Block> for Runtime { - fn generate_session_keys(seed: Option<Vec<u8>>) -> Vec<u8> { - opaque::SessionKeys::generate(seed) - } - - fn decode_session_keys( - encoded: Vec<u8>, - ) -> Option<Vec<(Vec<u8>, KeyTypeId)>> { - opaque::SessionKeys::decode_into_raw_public_keys(&encoded) - } - } - - impl fg_primitives::GrandpaApi<Block> for Runtime { - fn grandpa_authorities() -> GrandpaAuthorityList { - Grandpa::grandpa_authorities() - } - - fn submit_report_equivocation_unsigned_extrinsic( - _equivocation_proof: fg_primitives::EquivocationProof< - <Block as BlockT>::Hash, - NumberFor<Block>, - >, - _key_owner_proof: fg_primitives::OpaqueKeyOwnershipProof, - ) -> Option<()> { - None - } - - fn generate_key_ownership_proof( - _set_id: fg_primitives::SetId, - _authority_id: GrandpaId, - ) -> Option<fg_primitives::OpaqueKeyOwnershipProof> { - // NOTE: this is the only implementation possible since we've - // defined our key owner proof type as a bottom type (i.e. a type - // with no values). - None - } - } - - impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime { - fn account_nonce(account: AccountId) -> Index { - System::account_nonce(account) - } - } - - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> for Runtime { - fn query_info( - uxt: <Block as BlockT>::Extrinsic, - len: u32, - ) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo<Balance> { - TransactionPayment::query_info(uxt, len) - } - fn query_fee_details( - uxt: <Block as BlockT>::Extrinsic, - len: u32, - ) -> pallet_transaction_payment::FeeDetails<Balance> { - TransactionPayment::query_fee_details(uxt, len) - } - } - - #[cfg(feature = "runtime-benchmarks")] - impl frame_benchmarking::Benchmark<Block> for Runtime { - fn dispatch_benchmark( - config: frame_benchmarking::BenchmarkConfig - ) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey}; - - use frame_system_benchmarking::Pallet as SystemBench; - impl frame_system_benchmarking::Config for Runtime {} - - let whitelist: Vec<TrackedStorageKey> = vec![ - // Block Number - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), - // Total Issuance - hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(), - // Execution Phase - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(), - // Event Count - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(), - // System Events - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(), - ]; - - let mut batches = Vec::<BenchmarkBatch>::new(); - let params = (&config, &whitelist); - - add_benchmark!(params, batches, frame_system, SystemBench::<Runtime>); - add_benchmark!(params, batches, pallet_balances, Balances); - add_benchmark!(params, batches, pallet_timestamp, Timestamp); - add_benchmark!(params, batches, pallet_universal_dividend, UniversalDividend); - - if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } - Ok(batches) - } - } } diff --git a/runtime/gdev/Cargo.toml b/runtime/gdev/Cargo.toml new file mode 100644 index 000000000..5aeef4152 --- /dev/null +++ b/runtime/gdev/Cargo.toml @@ -0,0 +1,234 @@ +[build-dependencies.substrate-wasm-builder] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '4.0.0' + +[package] +authors = ['Axiom-Team Developers <https://axiom-team.fr>'] +edition = '2018' +homepage = 'https://substrate.dev' +license = 'AGPL-3.0' +name = 'gdev-runtime' +repository = 'https://git.duniter.org/nodes/rust/lc-core-substrate' +version = '3.0.0' +[package.metadata.docs.rs] +targets = ['x86_64-unknown-linux-gnu'] + +[features] +default = ['std'] +runtime-benchmarks = [ + 'frame-benchmarking', + 'frame-support/runtime-benchmarks', + 'frame-system-benchmarking', + 'frame-system/runtime-benchmarks', + 'hex-literal', + 'pallet-balances/runtime-benchmarks', + 'pallet-identity/runtime-benchmarks', + 'pallet-universal-dividend/runtime-benchmarks', + 'common-runtime/runtime-benchmarks', + 'sp-runtime/runtime-benchmarks', +] +std = [ + 'codec/std', + 'frame-executive/std', + 'frame-support/std', + 'frame-system-rpc-runtime-api/std', + 'frame-system/std', + 'pallet-aura/std', + 'pallet-balances/std', + 'pallet-certification/std', + 'pallet-identity/std', + 'pallet-grandpa/std', + 'pallet-randomness-collective-flip/std', + 'pallet-sudo/std', + 'pallet-universal-dividend/std', + 'pallet-transaction-payment-rpc-runtime-api/std', + 'pallet-transaction-payment/std', + 'common-runtime/std', + 'serde', + 'sp-api/std', + 'sp-arithmetic/std', + 'sp-block-builder/std', + 'sp-consensus-aura/std', + 'sp-core/std', + 'sp-inherents/std', + 'sp-offchain/std', + 'sp-runtime/std', + 'sp-session/std', + 'sp-std/std', + 'sp-transaction-pool/std', + 'sp-version/std', +] + +[dependencies] +pallet-certification = { path = '../../pallets/certification', default-features = false } +pallet-identity = { path = '../../pallets/identity', default-features = false } +pallet-ud-accounts-storage = { path = '../../pallets/ud-accounts-storage', default-features = false } +pallet-universal-dividend = { path = '../../pallets/universal-dividend', default-features = false } +common-runtime = { path = "../common", default-features = false } + +[dependencies.codec] +default-features = false +features = ['derive'] +package = 'parity-scale-codec' +version = '2.1.0' + +[dependencies.frame-benchmarking] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +optional = true +tag = 'monthly-2021-07' +version = '3.1.0' + +[dependencies.frame-executive] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.frame-support] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.frame-system] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.frame-system-benchmarking] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +optional = true +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.frame-system-rpc-runtime-api] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.hex-literal] +optional = true +version = '0.3.1' + +[dependencies.pallet-aura] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.pallet-balances] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.pallet-grandpa] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.1.0' + +[dependencies.pallet-randomness-collective-flip] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.pallet-sudo] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.pallet-transaction-payment] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.pallet-transaction-payment-rpc-runtime-api] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.serde] +version = "1.0.101" +optional = true +features = ["derive"] + +[dependencies.sp-api] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.sp-arithmetic] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' + +[dependencies.sp-block-builder] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.sp-consensus-aura] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '0.9.0' + +[dependencies.sp-core] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.sp-inherents] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.sp-offchain] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.sp-runtime] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.sp-session] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.sp-std] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.sp-transaction-pool] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.sp-version] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' diff --git a/runtime/gdev/build.rs b/runtime/gdev/build.rs new file mode 100644 index 000000000..83edf9ee8 --- /dev/null +++ b/runtime/gdev/build.rs @@ -0,0 +1,25 @@ +// Copyright 2021 Axiom-Team +// +// This file is part of Substrate-Libre-Currency. +// +// Substrate-Libre-Currency is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Substrate-Libre-Currency is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. + +use substrate_wasm_builder::WasmBuilder; + +fn main() { + WasmBuilder::new() + .with_current_project() + .export_heap_base() + .import_memory() + .build() +} diff --git a/runtime/gdev/src/lib.rs b/runtime/gdev/src/lib.rs new file mode 100644 index 000000000..3c2c98e23 --- /dev/null +++ b/runtime/gdev/src/lib.rs @@ -0,0 +1,392 @@ +// Copyright 2021 Axiom-Team +// +// This file is part of Substrate-Libre-Currency. +// +// Substrate-Libre-Currency is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Substrate-Libre-Currency is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. + +#![cfg_attr(not(feature = "std"), no_std)] +// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. +#![recursion_limit = "256"] + +// Make the WASM binary available. +#[cfg(feature = "std")] +include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); + +pub use common_runtime::{ + constants::*, + entities::{IdtyData, IdtyDid, IdtyRight, Planet}, + AccountId, Address, Balance, BlockNumber, Hash, Header, IdtyIndex, Index, Signature, +}; +pub use pallet_balances::Call as BalancesCall; +pub use pallet_identity::{IdtyStatus, IdtyValue}; +use pallet_transaction_payment::CurrencyAdapter; +pub use pallet_universal_dividend; +#[cfg(any(feature = "std", test))] +pub use sp_runtime::BuildStorage; +pub use sp_runtime::{Perbill, Permill}; + +use common_runtime::{ + authorizations::{AddStrongCertOrigin, DelStrongCertOrigin, EnsureIdtyCallAllowedImpl}, + handlers::{ + OnIdtyChangeHandler, OnNewStrongCertHandler, OnRemovedStrongCertHandler, + OnRightKeyChangeHandler, + }, +}; +use frame_support::traits::Get; +use frame_system::EnsureRoot; +use pallet_grandpa::fg_primitives; +use pallet_grandpa::{AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList}; +use sp_api::impl_runtime_apis; +use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; +use sp_runtime::traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, NumberFor}; +use sp_runtime::{ + create_runtime_str, generic, impl_opaque_keys, + transaction_validity::{TransactionSource, TransactionValidity}, + ApplyExtrinsicResult, +}; +use sp_std::prelude::*; +#[cfg(feature = "std")] +use sp_version::NativeVersion; +use sp_version::RuntimeVersion; + +// A few exports that help ease life for downstream crates. +pub use frame_support::{ + construct_runtime, parameter_types, + traits::{KeyOwnerProofSystem, Randomness}, + weights::{ + constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, + Weight, WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial, + }, + StorageValue, +}; + +/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know +/// the specifics of the runtime. They can then be made to be agnostic over specific formats +/// of data like extrinsics, allowing for them to continue syncing the network through upgrades +/// to even the core data structures. +pub mod opaque { + use super::*; + + impl_opaque_keys! { + pub struct SessionKeys { + pub grandpa: Grandpa, + } + } +} + +// To learn more about runtime versioning and what each of the following value means: +// https://substrate.dev/docs/en/knowledgebase/runtime/upgrades#runtime-versioning +#[sp_version::runtime_version] +pub const VERSION: RuntimeVersion = RuntimeVersion { + spec_name: create_runtime_str!("gdev"), + impl_name: create_runtime_str!("gdev"), + authoring_version: 1, + // The version of the runtime specification. A full node will not attempt to use its native + // runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`, + // `spec_version`, and `authoring_version` are the same between Wasm and native. + // This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use + // the compatible custom types. + spec_version: 100, + impl_version: 1, + apis: RUNTIME_API_VERSIONS, + transaction_version: 1, +}; + +/// The version information used to identify this runtime when compiled natively. +#[cfg(feature = "std")] +pub fn native_version() -> NativeVersion { + NativeVersion { + runtime_version: VERSION, + can_author_with: Default::default(), + } +} + +parameter_types! { + pub const Version: RuntimeVersion = VERSION; + pub const BlockHashCount: BlockNumber = 2400; + /// We allow for 2 seconds of compute with a 6 second average block time. + pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights + ::with_sensible_defaults(2 * WEIGHT_PER_SECOND, NORMAL_DISPATCH_RATIO); + pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength + ::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); + pub const SS58Prefix: u8 = 42; +} + +// Configure FRAME pallets to include in runtime. + +impl frame_system::Config for Runtime { + /// The basic call filter to use in dispatchable. + type BaseCallFilter = (); + /// Block & extrinsics weights: base values and limits. + type BlockWeights = BlockWeights; + /// The maximum length of a block (in bytes). + type BlockLength = BlockLength; + /// The identifier used to distinguish between accounts. + type AccountId = AccountId; + /// The aggregated dispatch type that is available for extrinsics. + type Call = Call; + /// The lookup mechanism to get account ID from whatever is passed in dispatchers. + type Lookup = AccountIdLookup<AccountId, ()>; + /// The index type for storing how many extrinsics an account has signed. + type Index = Index; + /// The index type for blocks. + type BlockNumber = BlockNumber; + /// The type for hashing blocks and tries. + type Hash = Hash; + /// The hashing algorithm used. + type Hashing = BlakeTwo256; + /// The header type. + type Header = generic::Header<BlockNumber, BlakeTwo256>; + /// The ubiquitous event type. + type Event = Event; + /// The ubiquitous origin type. + type Origin = Origin; + /// Maximum number of block number to block hash mappings to keep (oldest pruned first). + type BlockHashCount = BlockHashCount; + /// The weight of database operations that the runtime can invoke. + type DbWeight = RocksDbWeight; + /// Version of the runtime. + type Version = Version; + /// Converts a module to the index of the module in `construct_runtime!`. + /// + /// This type is being generated by `construct_runtime!`. + type PalletInfo = PalletInfo; + /// What to do if a new account is created. + type OnNewAccount = (); + /// What to do if an account is fully reaped from the system. + type OnKilledAccount = (); + /// The data to be stored in an account. + type AccountData = pallet_balances::AccountData<Balance>; + /// Weight information for the extrinsics of this pallet. + type SystemWeightInfo = (); + /// This is used as an identifier of the chain. 42 is the generic substrate prefix. + type SS58Prefix = SS58Prefix; + /// The set code logic, just the default since we're not a parachain. + type OnSetCode = (); +} + +impl pallet_randomness_collective_flip::Config for Runtime {} + +impl pallet_grandpa::Config for Runtime { + type Event = Event; + type Call = Call; + + type KeyOwnerProofSystem = (); + + type KeyOwnerProof = + <Self::KeyOwnerProofSystem as KeyOwnerProofSystem<(KeyTypeId, GrandpaId)>>::Proof; + + type KeyOwnerIdentification = <Self::KeyOwnerProofSystem as KeyOwnerProofSystem<( + KeyTypeId, + GrandpaId, + )>>::IdentificationTuple; + + type HandleEquivocation = (); + + type WeightInfo = (); +} + +parameter_types! { + pub const ExistentialDeposit: Balance = 500; + pub const MaxLocks: u32 = 50; +} + +impl pallet_balances::Config for Runtime { + type MaxLocks = MaxLocks; + type MaxReserves = (); + type ReserveIdentifier = [u8; 8]; + /// The type for recording an account's balance. + type Balance = Balance; + /// The ubiquitous event type. + type Event = Event; + type DustRemoval = (); + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type WeightInfo = pallet_balances::weights::SubstrateWeight<Runtime>; +} + +parameter_types! { + pub const TransactionByteFee: Balance = 0; +} + +impl pallet_transaction_payment::Config for Runtime { + type OnChargeTransaction = CurrencyAdapter<Balances, ()>; + type TransactionByteFee = TransactionByteFee; + type WeightToFee = common_runtime::fees::WeightToFeeImpl<Balance>; + type FeeMultiplierUpdate = (); +} + +impl pallet_sudo::Config for Runtime { + type Event = Event; + type Call = Call; +} + +// PALLET IDENTITY + +const IDTY_CREATE_PERIOD: BlockNumber = 100; + +parameter_types! { + pub const ConfirmPeriod: BlockNumber = 12 * HOURS; + pub const MaxInactivityPeriod: BlockNumber = YEARS; + pub const MaxNoRightPeriod: BlockNumber = YEARS; + pub const IdtyRenewablePeriod: BlockNumber = 6 * MONTHS; + pub const ValidationPeriod: BlockNumber = 2 * MONTHS; +} + +/// Configure the pallet identity +impl pallet_identity::Config for Runtime { + type ConfirmPeriod = ConfirmPeriod; + type Event = Event; + type AddRightOrigin = EnsureRoot<Self::AccountId>; + type DelRightOrigin = EnsureRoot<Self::AccountId>; + type EnsureIdtyCallAllowed = EnsureIdtyCallAllowedImpl<Runtime, IDTY_CREATE_PERIOD>; + type IdtyData = IdtyData; + type IdtyDid = IdtyDid; + type IdtyIndex = IdtyIndex; + type IdtyValidationOrigin = EnsureRoot<Self::AccountId>; + type IdtyRight = IdtyRight; + type OnIdtyChange = OnIdtyChangeHandler<Runtime>; + type OnRightKeyChange = OnRightKeyChangeHandler<Runtime>; + type MaxInactivityPeriod = MaxInactivityPeriod; + type MaxNoRightPeriod = MaxNoRightPeriod; + type RenewablePeriod = IdtyRenewablePeriod; + type ValidationPeriod = ValidationPeriod; +} + +// PALLET CERTIFICATION + +const MIN_STRONG_CERT_FOR_UD: u32 = 2; +const MIN_STRONG_CERT_FOR_STRONG_CERT: u32 = 3; + +parameter_types! { + pub const CertPeriod: BlockNumber = 15; + pub const MaxByIssuer: u8 = 100; + pub const StrongCertRenewablePeriod: BlockNumber = 50;//6 * MONTHS; + pub const ValidityPeriod: BlockNumber = 200;//2 * YEARS; +} + +/// Configure the pallet certification +impl pallet_certification::Config for Runtime { + type AddCertOrigin = AddStrongCertOrigin<Runtime>; + type CertPeriod = CertPeriod; + type DelCertOrigin = DelStrongCertOrigin<Runtime>; + type Event = Event; + type IdtyIndex = IdtyIndex; + type MaxByIssuer = MaxByIssuer; + type OnNewcert = + OnNewStrongCertHandler<Runtime, MIN_STRONG_CERT_FOR_UD, MIN_STRONG_CERT_FOR_STRONG_CERT>; + type OnRemovedCert = OnRemovedStrongCertHandler<Runtime, MIN_STRONG_CERT_FOR_UD>; + type RenewablePeriod = StrongCertRenewablePeriod; + type ValidityPeriod = ValidityPeriod; +} + +// PALLET UNIVERSAL DIVIDEND + +parameter_types! { + pub const SquareMoneyGrowthRate: Permill = Permill::one(); + pub const UdCreationPeriod: BlockNumber = 20; + pub const UdReevalPeriod: Balance = 10; + pub const UdReevalPeriodInBlocks: BlockNumber = 20 * 10; +} + +pub struct UdAccountsProvider; +impl Get<u64> for UdAccountsProvider { + fn get() -> u64 { + UdAccountsStorage::ud_accounts_count() + } +} +impl Get<Vec<AccountId>> for UdAccountsProvider { + fn get() -> Vec<AccountId> { + UdAccountsStorage::account_list() + } +} + +/// Configure the pallet universal-dividend in pallets/universal-dividend. +impl pallet_universal_dividend::Config for Runtime { + type Currency = pallet_balances::Pallet<Runtime>; + type Event = Event; + type MembersCount = UdAccountsProvider; + type MembersIds = UdAccountsProvider; + type SquareMoneyGrowthRate = SquareMoneyGrowthRate; + type UdCreationPeriod = UdCreationPeriod; + type UdReevalPeriod = UdReevalPeriod; + type UdReevalPeriodInBlocks = UdReevalPeriodInBlocks; +} + +/// Configure the pallet ud-accounts-storage +impl pallet_ud_accounts_storage::Config for Runtime {} + +// Create the runtime by composing the FRAME pallets that were previously configured. +construct_runtime!( + pub enum Runtime where + Block = Block, + NodeBlock = common_runtime::Block, + UncheckedExtrinsic = UncheckedExtrinsic + { + System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, + RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage}, + Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config, Event}, + Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>}, + TransactionPayment: pallet_transaction_payment::{Pallet, Storage}, + Sudo: pallet_sudo::{Pallet, Call, Config<T>, Storage, Event<T>}, + UdAccountsStorage: pallet_ud_accounts_storage::{Pallet, Config<T>, Storage}, + UniversalDividend: pallet_universal_dividend::{Pallet, Config<T>, Storage, Event<T>}, + Identity: pallet_identity::{Pallet, Call, Config<T>, Storage, Event<T>}, + StrongCert: pallet_certification::{Pallet, Call, Config<T>, Storage, Event<T>}, + } +); + +/// Block type as expected by this runtime. +pub type Block = sp_runtime::generic::Block<Header, UncheckedExtrinsic>; +/// Unchecked extrinsic type as expected by this runtime. +pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>; +/// The SignedExtension to the basic transaction logic. +pub type SignedExtra = ( + frame_system::CheckSpecVersion<Runtime>, + frame_system::CheckTxVersion<Runtime>, + frame_system::CheckGenesis<Runtime>, + frame_system::CheckEra<Runtime>, + frame_system::CheckNonce<Runtime>, + frame_system::CheckWeight<Runtime>, + pallet_transaction_payment::ChargeTransactionPayment<Runtime>, +); +/// Executive: handles dispatch to the various modules. +pub type Executive = frame_executive::Executive< + Runtime, + Block, + frame_system::ChainContext<Runtime>, + Runtime, + AllPallets, +>; + +// All of our runtimes share most of their Runtime API implementations. +// We use a macro to implement this common part and add runtime-specific additional implementations. +// This macro expands to : +// ``` +// impl_runtime_apis! { +// // All impl blocks shared between all runtimes. +// +// // Specific impls provided to the `impl_runtime_apis_plus_common!` macro. +// } +// ``` +common_runtime::impl_runtime_apis_plus_common! { + impl sp_consensus_aura::AuraApi<Block, sp_consensus_aura::sr25519::AuthorityId> for Runtime { + fn slot_duration() -> sp_consensus_aura::SlotDuration { + sp_consensus_aura::SlotDuration::from_millis(0) + } + + fn authorities() -> Vec<sp_consensus_aura::sr25519::AuthorityId> { + Vec::with_capacity(0) + } + } +} diff --git a/runtime/gtest/Cargo.toml b/runtime/gtest/Cargo.toml new file mode 100644 index 000000000..a421447ec --- /dev/null +++ b/runtime/gtest/Cargo.toml @@ -0,0 +1,243 @@ +[build-dependencies.substrate-wasm-builder] +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '4.0.0' + +[package] +authors = ['Axiom-Team Developers <https://axiom-team.fr>'] +edition = '2018' +homepage = 'https://substrate.dev' +license = 'AGPL-3.0' +name = 'gtest-runtime' +repository = 'https://git.duniter.org/nodes/rust/lc-core-substrate' +version = '3.0.0' +[package.metadata.docs.rs] +targets = ['x86_64-unknown-linux-gnu'] + +[features] +default = ['std'] +runtime-benchmarks = [ + 'frame-benchmarking', + 'frame-support/runtime-benchmarks', + 'frame-system-benchmarking', + 'frame-system/runtime-benchmarks', + 'hex-literal', + 'pallet-balances/runtime-benchmarks', + 'pallet-universal-dividend/runtime-benchmarks', + 'pallet-timestamp/runtime-benchmarks', + 'sp-runtime/runtime-benchmarks', +] +std = [ + 'codec/std', + 'frame-executive/std', + 'frame-support/std', + 'frame-system-rpc-runtime-api/std', + 'frame-system/std', + 'pallet-aura/std', + 'pallet-balances/std', + 'pallet-certification/std', + 'pallet-identity/std', + 'pallet-grandpa/std', + 'pallet-randomness-collective-flip/std', + 'pallet-sudo/std', + 'pallet-universal-dividend/std', + 'pallet-timestamp/std', + 'pallet-transaction-payment-rpc-runtime-api/std', + 'pallet-transaction-payment/std', + 'common-runtime/std', + 'serde', + 'sp-api/std', + 'sp-arithmetic/std', + 'sp-block-builder/std', + 'sp-consensus-aura/std', + 'sp-core/std', + 'sp-inherents/std', + 'sp-offchain/std', + 'sp-runtime/std', + 'sp-session/std', + 'sp-std/std', + 'sp-transaction-pool/std', + 'sp-version/std', +] + +[dependencies] +pallet-certification = { path = '../../pallets/certification', default-features = false } +pallet-identity = { path = '../../pallets/identity', default-features = false } +pallet-ud-accounts-storage = { path = '../../pallets/ud-accounts-storage', default-features = false } +pallet-universal-dividend = { path = '../../pallets/universal-dividend', default-features = false } +common-runtime = { path = "../common", default-features = false } + +[dependencies.codec] +default-features = false +features = ['derive'] +package = 'parity-scale-codec' +version = '2.1.0' + +[dependencies.frame-benchmarking] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +optional = true +tag = 'monthly-2021-07' +version = '3.1.0' + +[dependencies.frame-executive] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.frame-support] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.frame-system] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.frame-system-benchmarking] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +optional = true +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.frame-system-rpc-runtime-api] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.hex-literal] +optional = true +version = '0.3.1' + +[dependencies.pallet-aura] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.pallet-balances] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.pallet-grandpa] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.1.0' + +[dependencies.pallet-randomness-collective-flip] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.pallet-sudo] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.pallet-timestamp] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.pallet-transaction-payment] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.pallet-transaction-payment-rpc-runtime-api] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.serde] +version = "1.0.101" +optional = true +features = ["derive"] + +[dependencies.smallvec] +version = "1.6.1" + +[dependencies.sp-api] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.sp-arithmetic] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' + +[dependencies.sp-block-builder] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.sp-consensus-aura] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '0.9.0' + +[dependencies.sp-core] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.sp-inherents] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.sp-offchain] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.sp-runtime] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.sp-session] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.sp-std] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.sp-transaction-pool] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' + +[dependencies.sp-version] +default-features = false +git = 'https://github.com/paritytech/substrate.git' +tag = 'monthly-2021-07' +version = '3.0.0' diff --git a/runtime/gtest/build.rs b/runtime/gtest/build.rs new file mode 100644 index 000000000..83edf9ee8 --- /dev/null +++ b/runtime/gtest/build.rs @@ -0,0 +1,25 @@ +// Copyright 2021 Axiom-Team +// +// This file is part of Substrate-Libre-Currency. +// +// Substrate-Libre-Currency is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Substrate-Libre-Currency is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. + +use substrate_wasm_builder::WasmBuilder; + +fn main() { + WasmBuilder::new() + .with_current_project() + .export_heap_base() + .import_memory() + .build() +} diff --git a/runtime/gtest/src/lib.rs b/runtime/gtest/src/lib.rs new file mode 100644 index 000000000..ee9e25bf8 --- /dev/null +++ b/runtime/gtest/src/lib.rs @@ -0,0 +1,421 @@ +// Copyright 2021 Axiom-Team +// +// This file is part of Substrate-Libre-Currency. +// +// Substrate-Libre-Currency is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Substrate-Libre-Currency is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. + +#![cfg_attr(not(feature = "std"), no_std)] +// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. +#![recursion_limit = "256"] + +// Make the WASM binary available. +#[cfg(feature = "std")] +include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); + +pub use common_runtime::{ + constants::*, + entities::{IdtyData, IdtyDid, IdtyRight, Planet}, + AccountId, Address, Balance, BlockNumber, Hash, Header, IdtyIndex, Index, Signature, +}; +pub use pallet_balances::Call as BalancesCall; +pub use pallet_identity::{IdtyStatus, IdtyValue}; +pub use pallet_timestamp::Call as TimestampCall; +use pallet_transaction_payment::CurrencyAdapter; +pub use pallet_universal_dividend; +#[cfg(any(feature = "std", test))] +pub use sp_runtime::BuildStorage; +pub use sp_runtime::{Perbill, Permill}; + +use common_runtime::{ + authorizations::{AddStrongCertOrigin, DelStrongCertOrigin, EnsureIdtyCallAllowedImpl}, + handlers::{ + OnIdtyChangeHandler, OnNewStrongCertHandler, OnRemovedStrongCertHandler, + OnRightKeyChangeHandler, + }, +}; +use frame_support::traits::Get; +use frame_system::EnsureRoot; +use pallet_grandpa::fg_primitives; +use pallet_grandpa::{AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList}; +use sp_api::impl_runtime_apis; +use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; +use sp_runtime::traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, NumberFor}; +use sp_runtime::{ + create_runtime_str, generic, impl_opaque_keys, + transaction_validity::{TransactionSource, TransactionValidity}, + ApplyExtrinsicResult, +}; +use sp_std::prelude::*; +#[cfg(feature = "std")] +use sp_version::NativeVersion; +use sp_version::RuntimeVersion; + +// A few exports that help ease life for downstream crates. +pub use frame_support::{ + construct_runtime, parameter_types, + traits::{KeyOwnerProofSystem, Randomness}, + weights::{ + constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, + Weight, WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial, + }, + StorageValue, +}; + +/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know +/// the specifics of the runtime. They can then be made to be agnostic over specific formats +/// of data like extrinsics, allowing for them to continue syncing the network through upgrades +/// to even the core data structures. +pub mod opaque { + use super::*; + + pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic; + + /// Opaque block header type. + pub type Header = generic::Header<BlockNumber, BlakeTwo256>; + /// Opaque block type. + pub type Block = generic::Block<Header, UncheckedExtrinsic>; + /// Opaque block identifier type. + pub type BlockId = generic::BlockId<Block>; + + impl_opaque_keys! { + pub struct SessionKeys { + pub aura: Aura, + pub grandpa: Grandpa, + } + } +} + +// To learn more about runtime versioning and what each of the following value means: +// https://substrate.dev/docs/en/knowledgebase/runtime/upgrades#runtime-versioning +#[sp_version::runtime_version] +pub const VERSION: RuntimeVersion = RuntimeVersion { + spec_name: create_runtime_str!("gtest"), + impl_name: create_runtime_str!("gtest"), + authoring_version: 1, + // The version of the runtime specification. A full node will not attempt to use its native + // runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`, + // `spec_version`, and `authoring_version` are the same between Wasm and native. + // This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use + // the compatible custom types. + spec_version: 100, + impl_version: 1, + apis: RUNTIME_API_VERSIONS, + transaction_version: 1, +}; + +/// The version information used to identify this runtime when compiled natively. +#[cfg(feature = "std")] +pub fn native_version() -> NativeVersion { + NativeVersion { + runtime_version: VERSION, + can_author_with: Default::default(), + } +} + +parameter_types! { + pub const Version: RuntimeVersion = VERSION; + pub const BlockHashCount: BlockNumber = 2400; + /// We allow for 2 seconds of compute with a 6 second average block time. + pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights + ::with_sensible_defaults(2 * WEIGHT_PER_SECOND, NORMAL_DISPATCH_RATIO); + pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength + ::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); + pub const SS58Prefix: u8 = 42; +} + +// Configure FRAME pallets to include in runtime. + +impl frame_system::Config for Runtime { + /// The basic call filter to use in dispatchable. + type BaseCallFilter = (); + /// Block & extrinsics weights: base values and limits. + type BlockWeights = BlockWeights; + /// The maximum length of a block (in bytes). + type BlockLength = BlockLength; + /// The identifier used to distinguish between accounts. + type AccountId = AccountId; + /// The aggregated dispatch type that is available for extrinsics. + type Call = Call; + /// The lookup mechanism to get account ID from whatever is passed in dispatchers. + type Lookup = AccountIdLookup<AccountId, ()>; + /// The index type for storing how many extrinsics an account has signed. + type Index = Index; + /// The index type for blocks. + type BlockNumber = BlockNumber; + /// The type for hashing blocks and tries. + type Hash = Hash; + /// The hashing algorithm used. + type Hashing = BlakeTwo256; + /// The header type. + type Header = generic::Header<BlockNumber, BlakeTwo256>; + /// The ubiquitous event type. + type Event = Event; + /// The ubiquitous origin type. + type Origin = Origin; + /// Maximum number of block number to block hash mappings to keep (oldest pruned first). + type BlockHashCount = BlockHashCount; + /// The weight of database operations that the runtime can invoke. + type DbWeight = RocksDbWeight; + /// Version of the runtime. + type Version = Version; + /// Converts a module to the index of the module in `construct_runtime!`. + /// + /// This type is being generated by `construct_runtime!`. + type PalletInfo = PalletInfo; + /// What to do if a new account is created. + type OnNewAccount = (); + /// What to do if an account is fully reaped from the system. + type OnKilledAccount = (); + /// The data to be stored in an account. + type AccountData = pallet_balances::AccountData<Balance>; + /// Weight information for the extrinsics of this pallet. + type SystemWeightInfo = (); + /// This is used as an identifier of the chain. 42 is the generic substrate prefix. + type SS58Prefix = SS58Prefix; + /// The set code logic, just the default since we're not a parachain. + type OnSetCode = (); +} + +impl pallet_randomness_collective_flip::Config for Runtime {} + +impl pallet_aura::Config for Runtime { + type AuthorityId = sp_consensus_aura::sr25519::AuthorityId; +} + +impl pallet_grandpa::Config for Runtime { + type Event = Event; + type Call = Call; + + type KeyOwnerProofSystem = (); + + type KeyOwnerProof = + <Self::KeyOwnerProofSystem as KeyOwnerProofSystem<(KeyTypeId, GrandpaId)>>::Proof; + + type KeyOwnerIdentification = <Self::KeyOwnerProofSystem as KeyOwnerProofSystem<( + KeyTypeId, + GrandpaId, + )>>::IdentificationTuple; + + type HandleEquivocation = (); + + type WeightInfo = (); +} + +parameter_types! { + pub const MinimumPeriod: u64 = SLOT_DURATION / 2; +} + +impl pallet_timestamp::Config for Runtime { + /// A timestamp: milliseconds since the unix epoch. + type Moment = u64; + type OnTimestampSet = Aura; + type MinimumPeriod = MinimumPeriod; + type WeightInfo = (); +} + +parameter_types! { + pub const ExistentialDeposit: Balance = 500; + pub const MaxLocks: u32 = 50; +} + +impl pallet_balances::Config for Runtime { + type MaxLocks = MaxLocks; + type MaxReserves = (); + type ReserveIdentifier = [u8; 8]; + /// The type for recording an account's balance. + type Balance = Balance; + /// The ubiquitous event type. + type Event = Event; + type DustRemoval = (); + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type WeightInfo = pallet_balances::weights::SubstrateWeight<Runtime>; +} + +parameter_types! { + pub const TransactionByteFee: Balance = 0; +} + +impl pallet_transaction_payment::Config for Runtime { + type OnChargeTransaction = CurrencyAdapter<Balances, ()>; + type TransactionByteFee = TransactionByteFee; + type WeightToFee = common_runtime::fees::WeightToFeeImpl<Balance>; + type FeeMultiplierUpdate = (); +} + +impl pallet_sudo::Config for Runtime { + type Event = Event; + type Call = Call; +} + +// PALLET IDENTITY + +const IDTY_CREATE_PERIOD: BlockNumber = 100; + +parameter_types! { + pub const ConfirmPeriod: BlockNumber = 12 * HOURS; + pub const MaxInactivityPeriod: BlockNumber = YEARS; + pub const MaxNoRightPeriod: BlockNumber = YEARS; + pub const IdtyRenewablePeriod: BlockNumber = 6 * MONTHS; + pub const ValidationPeriod: BlockNumber = 2 * MONTHS; +} + +/// Configure the pallet identity +impl pallet_identity::Config for Runtime { + type ConfirmPeriod = ConfirmPeriod; + type Event = Event; + type AddRightOrigin = EnsureRoot<Self::AccountId>; + type DelRightOrigin = EnsureRoot<Self::AccountId>; + type EnsureIdtyCallAllowed = EnsureIdtyCallAllowedImpl<Runtime, IDTY_CREATE_PERIOD>; + type IdtyData = IdtyData; + type IdtyDid = IdtyDid; + type IdtyIndex = IdtyIndex; + type IdtyValidationOrigin = EnsureRoot<Self::AccountId>; + type IdtyRight = IdtyRight; + type OnIdtyChange = OnIdtyChangeHandler<Runtime>; + type OnRightKeyChange = OnRightKeyChangeHandler<Runtime>; + type MaxInactivityPeriod = MaxInactivityPeriod; + type MaxNoRightPeriod = MaxNoRightPeriod; + type RenewablePeriod = IdtyRenewablePeriod; + type ValidationPeriod = ValidationPeriod; +} + +// PALLET CERTIFICATION + +const MIN_STRONG_CERT_FOR_UD: u32 = 2; +const MIN_STRONG_CERT_FOR_STRONG_CERT: u32 = 3; + +parameter_types! { + pub const CertPeriod: BlockNumber = 15; + pub const MaxByIssuer: u8 = 100; + pub const StrongCertRenewablePeriod: BlockNumber = 50;//6 * MONTHS; + pub const ValidityPeriod: BlockNumber = 200;//2 * YEARS; +} + +/// Configure the pallet certification +impl pallet_certification::Config for Runtime { + type AddCertOrigin = AddStrongCertOrigin<Runtime>; + type CertPeriod = CertPeriod; + type DelCertOrigin = DelStrongCertOrigin<Runtime>; + type Event = Event; + type IdtyIndex = IdtyIndex; + type MaxByIssuer = MaxByIssuer; + type OnNewcert = + OnNewStrongCertHandler<Runtime, MIN_STRONG_CERT_FOR_UD, MIN_STRONG_CERT_FOR_STRONG_CERT>; + type OnRemovedCert = OnRemovedStrongCertHandler<Runtime, MIN_STRONG_CERT_FOR_UD>; + type RenewablePeriod = StrongCertRenewablePeriod; + type ValidityPeriod = ValidityPeriod; +} + +// PALLET UNIVERSAL DIVIDEND + +parameter_types! { + pub const SquareMoneyGrowthRate: Permill = Permill::one(); + pub const UdCreationPeriod: BlockNumber = 20; + pub const UdReevalPeriod: Balance = 10; + pub const UdReevalPeriodInBlocks: BlockNumber = 20 * 10; +} + +pub struct UdAccountsProvider; +impl Get<u64> for UdAccountsProvider { + fn get() -> u64 { + UdAccountsStorage::ud_accounts_count() + } +} +impl Get<Vec<AccountId>> for UdAccountsProvider { + fn get() -> Vec<AccountId> { + UdAccountsStorage::account_list() + } +} + +/// Configure the pallet universal-dividend in pallets/universal-dividend. +impl pallet_universal_dividend::Config for Runtime { + type Currency = pallet_balances::Pallet<Runtime>; + type Event = Event; + type MembersCount = UdAccountsProvider; + type MembersIds = UdAccountsProvider; + type SquareMoneyGrowthRate = SquareMoneyGrowthRate; + type UdCreationPeriod = UdCreationPeriod; + type UdReevalPeriod = UdReevalPeriod; + type UdReevalPeriodInBlocks = UdReevalPeriodInBlocks; +} + +/// Configure the pallet ud-accounts-storage +impl pallet_ud_accounts_storage::Config for Runtime {} + +// Create the runtime by composing the FRAME pallets that were previously configured. +construct_runtime!( + pub enum Runtime where + Block = Block, + NodeBlock = common_runtime::Block, + UncheckedExtrinsic = UncheckedExtrinsic + { + System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, + RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage}, + Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, + Aura: pallet_aura::{Pallet, Config<T>}, + Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config, Event}, + Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>}, + TransactionPayment: pallet_transaction_payment::{Pallet, Storage}, + Sudo: pallet_sudo::{Pallet, Call, Config<T>, Storage, Event<T>}, + UdAccountsStorage: pallet_ud_accounts_storage::{Pallet, Config<T>, Storage}, + UniversalDividend: pallet_universal_dividend::{Pallet, Config<T>, Storage, Event<T>}, + Identity: pallet_identity::{Pallet, Call, Config<T>, Storage, Event<T>}, + StrongCert: pallet_certification::{Pallet, Call, Config<T>, Storage, Event<T>}, + } +); + +/// Block type as expected by this runtime. +pub type Block = sp_runtime::generic::Block<Header, UncheckedExtrinsic>; +/// Unchecked extrinsic type as expected by this runtime. +pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>; +/// The SignedExtension to the basic transaction logic. +pub type SignedExtra = ( + frame_system::CheckSpecVersion<Runtime>, + frame_system::CheckTxVersion<Runtime>, + frame_system::CheckGenesis<Runtime>, + frame_system::CheckEra<Runtime>, + frame_system::CheckNonce<Runtime>, + frame_system::CheckWeight<Runtime>, + pallet_transaction_payment::ChargeTransactionPayment<Runtime>, +); +/// Executive: handles dispatch to the various modules. +pub type Executive = frame_executive::Executive< + Runtime, + Block, + frame_system::ChainContext<Runtime>, + Runtime, + AllPallets, +>; + +// All of our runtimes share most of their Runtime API implementations. +// We use a macro to implement this common part and add runtime-specific additional implementations. +// This macro expands to : +// ``` +// impl_runtime_apis! { +// // All impl blocks shared between all runtimes. +// +// // Specific impls provided to the `impl_runtime_apis_plus_common!` macro. +// } +// ``` +common_runtime::impl_runtime_apis_plus_common! { + impl sp_consensus_aura::AuraApi<Block, sp_consensus_aura::sr25519::AuthorityId> for Runtime { + fn slot_duration() -> sp_consensus_aura::SlotDuration { + sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration()) + } + + fn authorities() -> Vec<sp_consensus_aura::sr25519::AuthorityId> { + Aura::authorities() + } + } +} diff --git a/runtime/src/handlers.rs b/runtime/src/handlers.rs deleted file mode 100644 index ea618f102..000000000 --- a/runtime/src/handlers.rs +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright 2021 Axiom-Team -// -// This file is part of Substrate-Libre-Currency. -// -// Substrate-Libre-Currency is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, version 3 of the License. -// -// Substrate-Libre-Currency is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. - -use super::{ - AccountId, Identity, IdtyIndex, IdtyRight, Origin, Runtime, StrongCert, UdAccountsStorage, - Weight, -}; -use pallet_identity::traits::IdtyEvent; - -const MIN_STRONG_CERT_FOR_UD: u32 = 2; -const MIN_STRONG_CERT_FOR_STRONG_CERT: u32 = 3; - -pub struct OnIdtyChangeHandler; -impl pallet_identity::traits::OnIdtyChange<Runtime> for OnIdtyChangeHandler { - fn on_idty_change(idty_index: IdtyIndex, idty_event: IdtyEvent<Runtime>) -> Weight { - let total_weight = 0; - match idty_event { - IdtyEvent::Created { creator } => { - // totad_weight += StrongCert::WeightInfo::add_cert(); - let _ = StrongCert::add_cert(Origin::root(), creator, idty_index); - } - IdtyEvent::Confirmed => {} - IdtyEvent::Validated => {} - IdtyEvent::Expired => {} - IdtyEvent::Removed => {} - }; - total_weight - } -} - -pub struct OnRightKeyChangeHandler; -impl pallet_identity::traits::OnRightKeyChange<Runtime> for OnRightKeyChangeHandler { - fn on_right_key_change( - _idty_index: IdtyIndex, - right: IdtyRight, - old_key_opt: Option<AccountId>, - new_key_opt: Option<AccountId>, - ) { - match right { - IdtyRight::Ud => UdAccountsStorage::replace_account(old_key_opt, new_key_opt), - IdtyRight::CreateIdty => 0, - IdtyRight::LightCert => 0, - IdtyRight::StrongCert => 0, - }; - } -} - -pub struct OnNewStrongCertHandler; -impl pallet_certification::traits::OnNewcert<IdtyIndex> for OnNewStrongCertHandler { - fn on_new_cert( - _issuer: IdtyIndex, - _issuer_issued_count: u8, - receiver: IdtyIndex, - receiver_received_count: u32, - ) -> frame_support::dispatch::Weight { - let total_weight = 0; - match receiver_received_count { - MIN_STRONG_CERT_FOR_UD => { - // total_weight += Identity::WeightInfo::add_right(); - let _ = Identity::validate_identity_and_add_rights( - Origin::root(), - receiver, - sp_std::vec![IdtyRight::Ud], - ); - } - MIN_STRONG_CERT_FOR_STRONG_CERT => { - // total_weight += Identity::WeightInfo::add_right(); - let _ = Identity::add_right(Origin::root(), receiver, IdtyRight::StrongCert); - } - _ => {} - } - total_weight - } -} - -pub struct OnRemovedStrongCertHandler; -impl pallet_certification::traits::OnRemovedCert<IdtyIndex> for OnRemovedStrongCertHandler { - fn on_removed_cert( - _issuer: IdtyIndex, - _issuer_issued_count: u8, - receiver: IdtyIndex, - receiver_received_count: u32, - _expiration: bool, - ) -> frame_support::dispatch::Weight { - let total_weight = 0; - if receiver_received_count < MIN_STRONG_CERT_FOR_UD { - // total_weight += Identity::WeightInfo::del_right(); - let _ = Identity::del_right(Origin::root(), receiver, IdtyRight::Ud); - } - total_weight - } -} diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 000000000..31fff2e09 --- /dev/null +++ b/tests/README.md @@ -0,0 +1,88 @@ +# Functional testing for lc-core + +This folder contains a set of functional tests designed for lc-core. + +It is written in typescript, using Mocha/Chai as Test framework. + +## Test flow + +Each group will start a dev service with the +[development spec](../node/service/src/chain_spec) before executing the tests. + +## Installation + +``` +npm install +``` + +## Run the tests + +``` +npm run test +``` + +and to print more information: + +``` +npm run test-with-logs +``` + +## Write Tests + +## Verbose mode + +You can also add the node's logs to the output using the `LC_CORE_LOG` env variable. Ex: + +``` +LC_CORE_LOG="warn,rpc=trace" npm run test +``` + +The test script will find available ports above 20000 in order to ensure that it doesn't conflict +with any other running services. + +# Debugging a lc-core node + +The repository contains a pre-configured debugger configuration for VSCode with the **CodeLLDB** +(`vadimcn.vscode-lldb`) extension. + +Before debugging, you need to build the node with debug symbols with command +`RUSTFLAGS=-g cargo build --release` (available as a VSCode task). Then go in the **Debug** tab in +the left bar of VSCode and make sure **Launch lc-core Node (Linux)** is selected in the top +dropdown. **Build & Launch lc-core Node (Linux)** will trigger the build before launching the node. + +To launch the debug session click on the green "play" arrow next to the dropdown. It will take some +time before the node starts, but the terminal containing the node output will appear when it is +really starting. The node is listening on ports 19931 (p2p), 19932 (rpc) and 19933 (ws). + +You can explore the code and place a breakpoint on a line by left clicking on the left of the line +number. The execution will pause the next time this line is reached. The debug toolbar contains the +following buttons : + +- Resume/Pause : Resume the execution if paused, pause the execution at the current location + (pretty random) if running. +- Step over : Resume the execution until next line, or go one level up if the end of the current + scope is reached. +- Step into : Resume the execution to go inside the immediatly next function call if any, otherwise + step to next line. +- Step out : Resume the execution until the end of the scope is reached. +- Restart : Kill the program and start a new debuging session. +- Stop : Kill the program and end debugin session. + +Breakpoints stay between debugging sessions. When multiple function calls are made on the same line, +multiple step into, step out, step into, ... can be requiered to go inside one of the chained +calls. + +When paused, content of variables is showed in the debuging tab of VSCode. Some basic types are +displayed correctly (primitive types, Vec, Arc) but more complex types such as HashMap/BTreeMap +are not "smartly" displayed (content of the struct is shown by mapping is hidden in the complexity +of the implementation). + +## Running Typescript tests with a debug node + +By setting the environement variable `DEBUG_MODE=true`, the Typescript tests will not spawn its +own node and instead will connect to an external node running on ports 19931/19932/19933, which +are the ports used by the debug node. + +A VSCode test allow to quickly run the `test-single` test in debug mode. To run another test, +change the command in the `package.json`. Note that you should restart the node after running +one test file. \ No newline at end of file diff --git a/tests/constants.ts b/tests/constants.ts new file mode 100644 index 000000000..386b4a906 --- /dev/null +++ b/tests/constants.ts @@ -0,0 +1,6 @@ + +export const BINARY_PATH = process.env.BINARY_PATH || `../target/release/lc-core`; +export const DEBUG_MODE = process.env.DEBUG_MODE || false; +export const DISPLAY_LOG = process.env.MOONBEAM_LOG || false; +export const LC_CORE_LOG = process.env.LC_CORE_LOG || "info"; +export const SPAWNING_TIME = 10000; diff --git a/tests/dev-node.ts b/tests/dev-node.ts new file mode 100644 index 000000000..c0f741338 --- /dev/null +++ b/tests/dev-node.ts @@ -0,0 +1,131 @@ +import tcpPortUsed from "tcp-port-used"; +import { spawn, ChildProcess } from "child_process"; +import { BINARY_PATH, DISPLAY_LOG, LC_CORE_LOG, SPAWNING_TIME } from "./constants"; +const debug = require("debug")("test:dev-node"); + +export async function findAvailablePorts() { + const availablePorts = await Promise.all( + [null, null, null].map(async (_, index) => { + let selectedPort = 0; + let port = 1024 + index * 20000 + (process.pid % 20000); + let endingPort = 65535; + while (!selectedPort && port < endingPort) { + const inUse = await tcpPortUsed.check(port, "127.0.0.1"); + if (!inUse) { + selectedPort = port; + } + port++; + } + if (!selectedPort) { + throw new Error(`No available port`); + } + return selectedPort; + }) + ); + + return { + p2pPort: availablePorts[0], + rpcPort: availablePorts[1], + wsPort: availablePorts[2], + }; +} + +// Stores if the node has already started. +// It is used when a test file contains multiple describeDevMoonbeam. Those are +// executed within the same PID and so would generate a race condition if started +// at the same time. +let nodeStarted = false; + +// This will start a moonbeam dev node, only 1 at a time (check every 100ms). +// This will prevent race condition on the findAvailablePorts which uses the PID of the process +export async function startMoonbeamDevNode(withWasm?: boolean): Promise<{ + p2pPort: number; + rpcPort: number; + wsPort: number; + runningNode: ChildProcess; +}> { + while (nodeStarted) { + // Wait 100ms to see if the node is free + await new Promise((resolve) => { + setTimeout(resolve, 100); + }); + } + nodeStarted = true; + const { p2pPort, rpcPort, wsPort } = await findAvailablePorts(); + + const cmd = BINARY_PATH; + const args = [ + withWasm ? `--execution=Wasm` : `--execution=Native`, // Faster execution using native + `--no-telemetry`, + `--no-prometheus`, + `--dev`, + `--sealing=manual`, + `-l${LC_CORE_LOG}`, + `--port=${p2pPort}`, + `--rpc-port=${rpcPort}`, + `--ws-port=${wsPort}`, + `--tmp`, + ]; + debug(`Starting dev node: --port=${p2pPort} --rpc-port=${rpcPort} --ws-port=${wsPort}`); + + const onProcessExit = function () { + runningNode && runningNode.kill(); + }; + const onProcessInterrupt = function () { + process.exit(2); + }; + + let runningNode: ChildProcess = null; + process.once("exit", onProcessExit); + process.once("SIGINT", onProcessInterrupt); + runningNode = spawn(cmd, args); + + runningNode.once("exit", () => { + process.removeListener("exit", onProcessExit); + process.removeListener("SIGINT", onProcessInterrupt); + nodeStarted = false; + debug(`Exiting dev node: --port=${p2pPort} --rpc-port=${rpcPort} --ws-port=${wsPort}`); + }); + + runningNode.on("error", (err) => { + if ((err as any).errno == "ENOENT") { + console.error( + `\x1b[31mMissing Moonbeam binary ` + + `(${BINARY_PATH}).\nPlease compile the Moonbeam project\x1b[0m` + ); + } else { + console.error(err); + } + process.exit(1); + }); + + const binaryLogs = []; + await new Promise<void>((resolve) => { + const timer = setTimeout(() => { + console.error(`\x1b[31m Failed to start Moonbeam Test Node.\x1b[0m`); + console.error(`Command: ${cmd} ${args.join(" ")}`); + console.error(`Logs:`); + console.error(binaryLogs.map((chunk) => chunk.toString()).join("\n")); + throw new Error("Failed to launch node"); + }, SPAWNING_TIME - 2000); + + const onData = async (chunk) => { + if (DISPLAY_LOG) { + console.log(chunk.toString()); + } + binaryLogs.push(chunk); + if (chunk.toString().match(/Development Service Ready/)) { + clearTimeout(timer); + if (!DISPLAY_LOG) { + runningNode.stderr.off("data", onData); + runningNode.stdout.off("data", onData); + } + resolve(); + } + }; + runningNode.stderr.on("data", onData); + runningNode.stdout.on("data", onData); + }); + + return { p2pPort, rpcPort, wsPort, runningNode }; +} diff --git a/tests/package-lock.json b/tests/package-lock.json new file mode 100644 index 000000000..95daa7563 --- /dev/null +++ b/tests/package-lock.json @@ -0,0 +1,4870 @@ +{ + "name": "ts-tests", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/runtime": { + "version": "7.14.8", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.14.8.tgz", + "integrity": "sha512-twj3L8Og5SaCRCErB4x4ajbvBIVV77CGeFglHpeg5WC5FF8TZzBWXtTJ4MqaD9QszLYTtr+IsaAL2rEUevb+eg==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@ethereumjs/common": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.4.0.tgz", + "integrity": "sha512-UdkhFWzWcJCZVsj1O/H8/oqj/0RVYjLc1OhPjBrQdALAkQHpCp8xXI4WLnuGTADqTdJZww0NtgwG+TRPkXt27w==", + "requires": { + "crc-32": "^1.2.0", + "ethereumjs-util": "^7.1.0" + } + }, + "@ethereumjs/tx": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.3.0.tgz", + "integrity": "sha512-yTwEj2lVzSMgE6Hjw9Oa1DZks/nKTWM8Wn4ykDNapBPua2f4nXO3qKnni86O6lgDj5fVNRqbDsD0yy7/XNGDEA==", + "requires": { + "@ethereumjs/common": "^2.4.0", + "ethereumjs-util": "^7.1.0" + } + }, + "@ethersproject/abi": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.7.tgz", + "integrity": "sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw==", + "requires": { + "@ethersproject/address": "^5.0.4", + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/constants": "^5.0.4", + "@ethersproject/hash": "^5.0.4", + "@ethersproject/keccak256": "^5.0.3", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.3", + "@ethersproject/strings": "^5.0.4" + } + }, + "@ethersproject/abstract-provider": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.4.0.tgz", + "integrity": "sha512-vPBR7HKUBY0lpdllIn7tLIzNN7DrVnhCLKSzY0l8WAwxz686m/aL7ASDzrVxV93GJtIub6N2t4dfZ29CkPOxgA==", + "requires": { + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/networks": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/transactions": "^5.4.0", + "@ethersproject/web": "^5.4.0" + } + }, + "@ethersproject/abstract-signer": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.4.0.tgz", + "integrity": "sha512-AieQAzt05HJZS2bMofpuxMEp81AHufA5D6M4ScKwtolj041nrfIbIi8ciNW7+F59VYxXq+V4c3d568Q6l2m8ew==", + "requires": { + "@ethersproject/abstract-provider": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0" + } + }, + "@ethersproject/address": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.4.0.tgz", + "integrity": "sha512-SD0VgOEkcACEG/C6xavlU1Hy3m5DGSXW3CUHkaaEHbAPPsgi0coP5oNPsxau8eTlZOk/bpa/hKeCNoK5IzVI2Q==", + "requires": { + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/rlp": "^5.4.0" + } + }, + "@ethersproject/base64": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.4.0.tgz", + "integrity": "sha512-CjQw6E17QDSSC5jiM9YpF7N1aSCHmYGMt9bWD8PWv6YPMxjsys2/Q8xLrROKI3IWJ7sFfZ8B3flKDTM5wlWuZQ==", + "requires": { + "@ethersproject/bytes": "^5.4.0" + } + }, + "@ethersproject/bignumber": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.4.0.tgz", + "integrity": "sha512-OXUu9f9hO3vGRIPxU40cignXZVaYyfx6j9NNMjebKdnaCL3anCLSSy8/b8d03vY6dh7duCC0kW72GEC4tZer2w==", + "requires": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "bn.js": "^4.11.9" + } + }, + "@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" + } + }, + "@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" + } + }, + "@ethersproject/hash": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.4.0.tgz", + "integrity": "sha512-xymAM9tmikKgbktOCjW60Z5sdouiIIurkZUr9oW5NOex5uwxrbsYG09kb5bMcNjlVeJD3yPivTNzViIs1GCbqA==", + "requires": { + "@ethersproject/abstract-signer": "^5.4.0", + "@ethersproject/address": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/strings": "^5.4.0" + } + }, + "@ethersproject/keccak256": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.4.0.tgz", + "integrity": "sha512-FBI1plWet+dPUvAzPAeHzRKiPpETQzqSUWR1wXJGHVWi4i8bOSrpC3NwpkPjgeXG7MnugVc1B42VbfnQikyC/A==", + "requires": { + "@ethersproject/bytes": "^5.4.0", + "js-sha3": "0.5.7" + }, + "dependencies": { + "js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + } + } + }, + "@ethersproject/logger": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.4.0.tgz", + "integrity": "sha512-xYdWGGQ9P2cxBayt64d8LC8aPFJk6yWCawQi/4eJ4+oJdMMjEBMrIcIMZ9AxhwpPVmnBPrsB10PcXGmGAqgUEQ==" + }, + "@ethersproject/networks": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.4.1.tgz", + "integrity": "sha512-8SvowCKz9Uf4xC5DTKI8+il8lWqOr78kmiqAVLYT9lzB8aSmJHQMD1GSuJI0CW4hMAnzocpGpZLgiMdzsNSPig==", + "requires": { + "@ethersproject/logger": "^5.4.0" + } + }, + "@ethersproject/properties": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.4.0.tgz", + "integrity": "sha512-7jczalGVRAJ+XSRvNA6D5sAwT4gavLq3OXPuV/74o3Rd2wuzSL035IMpIMgei4CYyBdialJMrTqkOnzccLHn4A==", + "requires": { + "@ethersproject/logger": "^5.4.0" + } + }, + "@ethersproject/rlp": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.4.0.tgz", + "integrity": "sha512-0I7MZKfi+T5+G8atId9QaQKHRvvasM/kqLyAH4XxBCBchAooH2EX5rL9kYZWwcm3awYV+XC7VF6nLhfeQFKVPg==", + "requires": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0" + } + }, + "@ethersproject/signing-key": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.4.0.tgz", + "integrity": "sha512-q8POUeywx6AKg2/jX9qBYZIAmKSB4ubGXdQ88l40hmATj29JnG5pp331nAWwwxPn2Qao4JpWHNZsQN+bPiSW9A==", + "requires": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "bn.js": "^4.11.9", + "elliptic": "6.5.4", + "hash.js": "1.1.7" + } + }, + "@ethersproject/strings": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.4.0.tgz", + "integrity": "sha512-k/9DkH5UGDhv7aReXLluFG5ExurwtIpUfnDNhQA29w896Dw3i4uDTz01Quaptbks1Uj9kI8wo9tmW73wcIEaWA==", + "requires": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/constants": "^5.4.0", + "@ethersproject/logger": "^5.4.0" + } + }, + "@ethersproject/transactions": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.4.0.tgz", + "integrity": "sha512-s3EjZZt7xa4BkLknJZ98QGoIza94rVjaEed0rzZ/jB9WrIuu/1+tjvYCWzVrystXtDswy7TPBeIepyXwSYa4WQ==", + "requires": { + "@ethersproject/address": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/constants": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/rlp": "^5.4.0", + "@ethersproject/signing-key": "^5.4.0" + } + }, + "@ethersproject/web": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.4.0.tgz", + "integrity": "sha512-1bUusGmcoRLYgMn6c1BLk1tOKUIFuTg8j+6N8lYlbMpDesnle+i3pGSagGNvwjaiLo4Y5gBibwctpPRmjrh4Og==", + "requires": { + "@ethersproject/base64": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/strings": "^5.4.0" + } + }, + "@polkadot/api": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-4.17.1.tgz", + "integrity": "sha512-uuNIKWC+PjM+1AARRu4NLWOEudZE6DW8UOlaubx3uGhPywqPIP+HGWP2I6PqRGYKARBWxxOvca1Q7WoKzpYC8w==", + "requires": { + "@babel/runtime": "^7.14.6", + "@polkadot/api-derive": "4.17.1", + "@polkadot/keyring": "^6.11.1", + "@polkadot/metadata": "4.17.1", + "@polkadot/rpc-core": "4.17.1", + "@polkadot/rpc-provider": "4.17.1", + "@polkadot/types": "4.17.1", + "@polkadot/types-known": "4.17.1", + "@polkadot/util": "^6.11.1", + "@polkadot/util-crypto": "^6.11.1", + "@polkadot/x-rxjs": "^6.11.1", + "eventemitter3": "^4.0.7" + } + }, + "@polkadot/api-derive": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-4.17.1.tgz", + "integrity": "sha512-mgq57F1yAiZjuiA0vrR2zWidyyd+mGe7Kbs4SxVeDWLsNbLc9+eASIfX7Hch2SDHIn3CQpv6DQqJH00uDfw9Lw==", + "requires": { + "@babel/runtime": "^7.14.6", + "@polkadot/api": "4.17.1", + "@polkadot/rpc-core": "4.17.1", + "@polkadot/types": "4.17.1", + "@polkadot/util": "^6.11.1", + "@polkadot/util-crypto": "^6.11.1", + "@polkadot/x-rxjs": "^6.11.1" + } + }, + "@polkadot/keyring": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-6.11.1.tgz", + "integrity": "sha512-rW8INl7pO6Dmaffd6Df1yAYCRWa2RmWQ0LGfJeA/M6seVIkI6J3opZqAd4q2Op+h9a7z4TESQGk8yggOEL+Csg==", + "requires": { + "@babel/runtime": "^7.14.6", + "@polkadot/util": "6.11.1", + "@polkadot/util-crypto": "6.11.1" + } + }, + "@polkadot/metadata": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/@polkadot/metadata/-/metadata-4.17.1.tgz", + "integrity": "sha512-219isiCWVfbu5JxZnOPj+cV4T+S0XHS4+Jal3t3xz9y4nbgr+25Pa4KInEsJPx0u8EZAxMeiUCX3vd5U7oe72g==", + "requires": { + "@babel/runtime": "^7.14.6", + "@polkadot/types": "4.17.1", + "@polkadot/types-known": "4.17.1", + "@polkadot/util": "^6.11.1", + "@polkadot/util-crypto": "^6.11.1" + } + }, + "@polkadot/networks": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/@polkadot/networks/-/networks-6.11.1.tgz", + "integrity": "sha512-0C6Ha2kvr42se3Gevx6UhHzv3KnPHML0N73Amjwvdr4y0HLZ1Nfw+vcm5yqpz5gpiehqz97XqFrsPRauYdcksQ==", + "requires": { + "@babel/runtime": "^7.14.6" + } + }, + "@polkadot/rpc-core": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-4.17.1.tgz", + "integrity": "sha512-1gqYaYuSSQsRmt3ol55jmjBP/euKyAh4PwSj94I2wu0fngK/FZwVZNDJZn/Ib68X/s38TBIgqJ6+YdUdr3z1xw==", + "requires": { + "@babel/runtime": "^7.14.6", + "@polkadot/metadata": "4.17.1", + "@polkadot/rpc-provider": "4.17.1", + "@polkadot/types": "4.17.1", + "@polkadot/util": "^6.11.1", + "@polkadot/x-rxjs": "^6.11.1" + } + }, + "@polkadot/rpc-provider": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-4.17.1.tgz", + "integrity": "sha512-vlU1H5mnfP0Ej8PbjcxwF9ZlT7LtcpekOKI4iYfMnfdelSUKUVyaD5PC8yRGIg9fxkorA6OM5AZs116jAl3TLA==", + "requires": { + "@babel/runtime": "^7.14.6", + "@polkadot/types": "4.17.1", + "@polkadot/util": "^6.11.1", + "@polkadot/util-crypto": "^6.11.1", + "@polkadot/x-fetch": "^6.11.1", + "@polkadot/x-global": "^6.11.1", + "@polkadot/x-ws": "^6.11.1", + "eventemitter3": "^4.0.7" + } + }, + "@polkadot/types": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-4.17.1.tgz", + "integrity": "sha512-rjW4OFdwvFekzN3ATLibC2JPSd8AWt5YepJhmuCPdwH26r3zB8bEC6dM7YQExLVUmygVPvgXk5ffHI6RAdXBMg==", + "requires": { + "@babel/runtime": "^7.14.6", + "@polkadot/metadata": "4.17.1", + "@polkadot/util": "^6.11.1", + "@polkadot/util-crypto": "^6.11.1", + "@polkadot/x-rxjs": "^6.11.1" + } + }, + "@polkadot/types-known": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-4.17.1.tgz", + "integrity": "sha512-YkOwGrO+k9aVrBR8FgYHnfJKhOfpdgC5ZRYNL/xJ9oa7lBYqPts9ENAxeBmJS/5IGeDF9f32MNyrCP2umeCXWg==", + "requires": { + "@babel/runtime": "^7.14.6", + "@polkadot/networks": "^6.11.1", + "@polkadot/types": "4.17.1", + "@polkadot/util": "^6.11.1" + } + }, + "@polkadot/util": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-6.11.1.tgz", + "integrity": "sha512-TEdCetr9rsdUfJZqQgX/vxLuV4XU8KMoKBMJdx+JuQ5EWemIdQkEtMBdL8k8udNGbgSNiYFA6rPppATeIxAScg==", + "requires": { + "@babel/runtime": "^7.14.6", + "@polkadot/x-textdecoder": "6.11.1", + "@polkadot/x-textencoder": "6.11.1", + "@types/bn.js": "^4.11.6", + "bn.js": "^4.11.9", + "camelcase": "^5.3.1", + "ip-regex": "^4.3.0" + } + }, + "@polkadot/util-crypto": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-6.11.1.tgz", + "integrity": "sha512-fWA1Nz17FxWJslweZS4l0Uo30WXb5mYV1KEACVzM+BSZAvG5eoiOAYX6VYZjyw6/7u53XKrWQlD83iPsg3KvZw==", + "requires": { + "@babel/runtime": "^7.14.6", + "@polkadot/networks": "6.11.1", + "@polkadot/util": "6.11.1", + "@polkadot/wasm-crypto": "^4.0.2", + "@polkadot/x-randomvalues": "6.11.1", + "base-x": "^3.0.8", + "base64-js": "^1.5.1", + "blakejs": "^1.1.1", + "bn.js": "^4.11.9", + "create-hash": "^1.2.0", + "elliptic": "^6.5.4", + "hash.js": "^1.1.7", + "js-sha3": "^0.8.0", + "scryptsy": "^2.1.0", + "tweetnacl": "^1.0.3", + "xxhashjs": "^0.2.2" + } + }, + "@polkadot/wasm-crypto": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto/-/wasm-crypto-4.1.2.tgz", + "integrity": "sha512-2EKdOjIrD2xHP2rC+0G/3Qo6926nL/18vCFkd34lBd9zP9YNF2GDEtDY+zAeDIRFKe1sQHTpsKgNdYSWoV2eBg==", + "requires": { + "@babel/runtime": "^7.14.6", + "@polkadot/wasm-crypto-asmjs": "^4.1.2", + "@polkadot/wasm-crypto-wasm": "^4.1.2" + } + }, + "@polkadot/wasm-crypto-asmjs": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-4.1.2.tgz", + "integrity": "sha512-3Q+vVUxDAC2tXgKMM3lKzx2JW+tarDpTjkvdxIKATyi8Ek69KkUqvMyJD0VL/iFZOFZED0YDX9UU4XOJ/astlg==", + "requires": { + "@babel/runtime": "^7.14.6" + } + }, + "@polkadot/wasm-crypto-wasm": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-4.1.2.tgz", + "integrity": "sha512-/l4IBEdQ41szHdHkuF//z1qr+XmWuLHlpBA7s9Eb221m1Fir6AKoCHoh1hp1r3v0ecZYLKvak1B225w6JAU3Fg==", + "requires": { + "@babel/runtime": "^7.14.6" + } + }, + "@polkadot/x-fetch": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/@polkadot/x-fetch/-/x-fetch-6.11.1.tgz", + "integrity": "sha512-qJyLLnm+4SQEZ002UDz2wWnXbnnH84rIS0mLKZ5k82H4lMYY+PQflvzv6sbu463e/lgiEao+6zvWS6DSKv1Yog==", + "requires": { + "@babel/runtime": "^7.14.6", + "@polkadot/x-global": "6.11.1", + "@types/node-fetch": "^2.5.10", + "node-fetch": "^2.6.1" + } + }, + "@polkadot/x-global": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-6.11.1.tgz", + "integrity": "sha512-lsBK/e4KbjfieyRmnPs7bTiGbP/6EoCZz7rqD/voNS5qsJAaXgB9LR+ilubun9gK/TDpebyxgO+J19OBiQPIRw==", + "requires": { + "@babel/runtime": "^7.14.6" + } + }, + "@polkadot/x-randomvalues": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/@polkadot/x-randomvalues/-/x-randomvalues-6.11.1.tgz", + "integrity": "sha512-2MfUfGZSOkuPt7GF5OJkPDbl4yORI64SUuKM25EGrJ22o1UyoBnPOClm9eYujLMD6BfDZRM/7bQqqoLW+NuHVw==", + "requires": { + "@babel/runtime": "^7.14.6", + "@polkadot/x-global": "6.11.1" + } + }, + "@polkadot/x-rxjs": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/@polkadot/x-rxjs/-/x-rxjs-6.11.1.tgz", + "integrity": "sha512-zIciEmij7SUuXXg9g/683Irx6GogxivrQS2pgBir2DI/YZq+um52+Dqg1mqsEZt74N4KMTMnzAZAP6LJOBOMww==", + "requires": { + "@babel/runtime": "^7.14.6", + "rxjs": "^6.6.7" + } + }, + "@polkadot/x-textdecoder": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-6.11.1.tgz", + "integrity": "sha512-DI1Ym2lyDSS/UhnTT2e9WutukevFZ0WGpzj4eotuG2BTHN3e21uYtYTt24SlyRNMrWJf5+TkZItmZeqs1nwAfQ==", + "requires": { + "@babel/runtime": "^7.14.6", + "@polkadot/x-global": "6.11.1" + } + }, + "@polkadot/x-textencoder": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-6.11.1.tgz", + "integrity": "sha512-8ipjWdEuqFo+R4Nxsc3/WW9CSEiprX4XU91a37ZyRVC4e9R1bmvClrpXmRQLVcAQyhRvG8DKOOtWbz8xM+oXKg==", + "requires": { + "@babel/runtime": "^7.14.6", + "@polkadot/x-global": "6.11.1" + } + }, + "@polkadot/x-ws": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/@polkadot/x-ws/-/x-ws-6.11.1.tgz", + "integrity": "sha512-GNu4ywrMlVi0QF6QSpKwYWMK6JRK+kadgN/zEhMoH1z5h8LwpqDLv128j5WspWbQti2teCQtridjf7t2Lzoe8Q==", + "requires": { + "@babel/runtime": "^7.14.6", + "@polkadot/x-global": "6.11.1", + "@types/websocket": "^1.0.3", + "websocket": "^1.0.34" + } + }, + "@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==" + }, + "@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "requires": { + "defer-to-connect": "^1.0.1" + } + }, + "@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "requires": { + "@types/node": "*" + } + }, + "@types/chai": { + "version": "4.2.21", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.21.tgz", + "integrity": "sha512-yd+9qKmJxm496BOV9CMNaey8TWsikaZOwMRwPHQIjcOJM9oV+fi9ZMNw3JsVnbEEbo2gRTDnGEBv8pjyn67hNg==" + }, + "@types/mocha": { + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", + "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==" + }, + "@types/node": { + "version": "16.4.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.4.0.tgz", + "integrity": "sha512-HrJuE7Mlqcjj+00JqMWpZ3tY8w7EUd+S0U3L1+PQSWiXZbOgyQDvi+ogoUxaHApPJq5diKxYBQwA3iIlNcPqOg==" + }, + "@types/node-fetch": { + "version": "2.5.11", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.11.tgz", + "integrity": "sha512-2upCKaqVZETDRb8A2VTaRymqFBEgH8u6yr96b/u3+1uQEPDRo3mJLEiPk7vdXBHRtjwkjqzFYMJXrt0Z9QsYjQ==", + "requires": { + "@types/node": "*", + "form-data": "^3.0.0" + } + }, + "@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": "*" + } + }, + "@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": "*" + } + }, + "@types/websocket": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@types/websocket/-/websocket-1.0.3.tgz", + "integrity": "sha512-ZdoTSwmDsKR7l1I8fpfQtmTI/hUwlOvE3q0iyJsp4tXU0MkdrYowimDzwxjhQvxU4qjhHLd3a6ig0OXRbLgIdw==", + "requires": { + "@types/node": "*" + } + }, + "@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==" + }, + "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", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, + "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" + } + }, + "ansi-align": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", + "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==", + "requires": { + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==" + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "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": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "asn1.js": { + "version": "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" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==" + }, + "async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "available-typed-arrays": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.4.tgz", + "integrity": "sha512-SA5mXJWrId1TaQjfxUYghbqQ/hYioKmLJvPJyDuYRtXXenFNMjj4hSSt1Cf1xsuXSXrtxrVC5Ot4eU6cOtBDdA==" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + }, + "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", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + }, + "dependencies": { + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + } + } + }, + "bignumber.js": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", + "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==" + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" + }, + "blakejs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.1.tgz", + "integrity": "sha512-bLG6PHOCZJKNshTjGRBvET0vTciwQE6zFKOKKXPDJfwFBd4Ac0yBfPZqcGvGJap50l7ktvlpFqc2jGVaUgbJgg==" + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + }, + "bn.js": { + "version": "4.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.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "requires": { + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + } + }, + "boxen": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", + "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==", + "requires": { + "ansi-align": "^3.0.0", + "camelcase": "^5.3.1", + "chalk": "^3.0.0", + "cli-boxes": "^2.2.0", + "string-width": "^4.1.0", + "term-size": "^2.1.0", + "type-fest": "^0.8.1", + "widest-line": "^3.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "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==" + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "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" + } + } + } + }, + "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=" + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==" + }, + "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" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "requires": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + }, + "dependencies": { + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==" + } + } + }, + "browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "requires": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==" + } + } + }, + "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" + } + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + }, + "buffer-to-arraybuffer": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", + "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=" + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, + "bufferutil": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.3.tgz", + "integrity": "sha512-yEYTwGndELGvfXsImMBLop58eaGW+YdONi1fNjTINSY98tmMmFijBG6WXgdkfuLNt4imzQNtIE+eBp1PVpMCSw==", + "requires": { + "node-gyp-build": "^4.2.0" + } + }, + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + }, + "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==" + } + } + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "chai": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", + "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==", + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + } + }, + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "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" + } + } + } + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=" + }, + "chokidar": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", + "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.3.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" + } + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" + }, + "cids": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", + "integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==", + "requires": { + "buffer": "^5.5.0", + "class-is": "^1.1.0", + "multibase": "~0.6.0", + "multicodec": "^1.0.0", + "multihashes": "~0.4.15" + }, + "dependencies": { + "multicodec": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", + "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", + "requires": { + "buffer": "^5.6.0", + "varint": "^5.0.0" + } + } + } + }, + "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" + } + }, + "class-is": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", + "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==" + }, + "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": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "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==" + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "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==" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "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" + } + }, + "content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "requires": { + "safe-buffer": "5.1.2" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "content-hash": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/content-hash/-/content-hash-2.5.2.tgz", + "integrity": "sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==", + "requires": { + "cids": "^0.7.1", + "multicodec": "^0.5.5", + "multihashes": "^0.4.15" + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "cookiejar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, + "crc-32": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.0.tgz", + "integrity": "sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA==", + "requires": { + "exit-on-epipe": "~1.0.1", + "printj": "~1.1.0" + } + }, + "create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "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-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "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==" + }, + "cuint": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz", + "integrity": "sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs=" + }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==" + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "requires": { + "mimic-response": "^1.0.0" + } + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "requires": { + "type-detect": "^4.0.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + }, + "defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==" + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "requires": { + "object-keys": "^1.0.12" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==" + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "dom-walk": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", + "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==" + }, + "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" + } + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "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" + } + }, + "es-abstract": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.3.tgz", + "integrity": "sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw==", + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "is-string": "^1.0.6", + "object-inspect": "^1.10.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "es5-ext": { + "version": "0.10.53", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.3", + "next-tick": "~1.0.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "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": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "eth-ens-namehash": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", + "integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=", + "requires": { + "idna-uts46-hx": "^2.3.1", + "js-sha3": "^0.5.7" + }, + "dependencies": { + "js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + } + } + }, + "eth-lib": { + "version": "0.1.29", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", + "integrity": "sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==", + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "nano-json-stream-parser": "^0.1.2", + "servify": "^0.1.12", + "ws": "^3.0.0", + "xhr-request-promise": "^0.1.2" + } + }, + "ethereum-bloom-filters": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", + "integrity": "sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==", + "requires": { + "js-sha3": "^0.8.0" + } + }, + "ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "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" + } + }, + "ethereumjs-util": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.0.tgz", + "integrity": "sha512-kR+vhu++mUDARrsMMhsjjzPduRVAeundLGXucGRHF3B4oEltOUspfgCVco4kckucj3FMlLaZHUl9n7/kdmr6Tw==", + "requires": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.4" + }, + "dependencies": { + "@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": "*" + } + }, + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==" + } + } + }, + "ethjs-unit": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", + "integrity": "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=", + "requires": { + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + } + } + }, + "ethjs-util": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "requires": { + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" + } + }, + "eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" + }, + "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" + } + }, + "exit-on-epipe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz", + "integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw==" + }, + "express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "requires": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "ext": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "requires": { + "type": "^2.0.0" + }, + "dependencies": { + "type": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", + "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==" + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "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" + } + }, + "filter-console": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/filter-console/-/filter-console-0.1.1.tgz", + "integrity": "sha512-zrXoV1Uaz52DqPs+qEwNJWJFAWZpYJ47UNmpN9q4j+/EYsz85uV0DC9k8tRND5kYmoVzL0W+Y75q4Rg8sRJCdg==" + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + } + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==" + }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "fs-extra": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "requires": { + "minipass": "^2.6.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "2.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-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=" + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "get-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" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.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" + } + }, + "global": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", + "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", + "requires": { + "min-document": "^2.19.0", + "process": "^0.11.10" + } + }, + "global-dirs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.1.0.tgz", + "integrity": "sha512-MG6kdOUh/xBnyo9cJFeIKkLEc1AyFq42QTU4XiX51i2NEdxLxLWXIjEjmqKeSuKR7pAZjTqUVoT2b2huxVLgYQ==", + "requires": { + "ini": "1.3.7" + } + }, + "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.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==" + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==" + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==" + }, + "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-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==" + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" + }, + "has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "requires": { + "has-symbol-support-x": "^1.4.1" + } + }, + "has-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" + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" + }, + "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.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + } + } + }, + "http-https": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", + "integrity": "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=" + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "idna-uts46-hx": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", + "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", + "requires": { + "punycode": "2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", + "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=" + } + } + }, + "ieee754": { + "version": "1.2.1", + "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.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz", + "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==" + }, + "ip-regex": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz", + "integrity": "sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q==" + }, + "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-arguments": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz", + "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==", + "requires": { + "call-bind": "^1.0.0" + } + }, + "is-bigint": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz", + "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==" + }, + "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-boolean-object": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.1.tgz", + "integrity": "sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng==", + "requires": { + "call-bind": "^1.0.2" + } + }, + "is-callable": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", + "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==" + }, + "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-date-object": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz", + "integrity": "sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==" + }, + "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": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "is-function": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", + "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==" + }, + "is-generator-function": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.9.tgz", + "integrity": "sha512-ZJ34p1uvIfptHCN7sFTjGibB9/oBg17sHqzDLfuwhvmN/qLVvIQXRQ8licZQ35WJ8KuEQt/etnnzQFI9C9Ue/A==" + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" + }, + "is-installed-globally": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz", + "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==", + "requires": { + "global-dirs": "^2.0.1", + "is-path-inside": "^3.0.1" + } + }, + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==" + }, + "is-npm": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz", + "integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==" + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "is-number-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.5.tgz", + "integrity": "sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw==" + }, + "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-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", + "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==" + }, + "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-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==" + }, + "is-regex": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz", + "integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==", + "requires": { + "call-bind": "^1.0.2", + "has-symbols": "^1.0.2" + } + }, + "is-retry-allowed": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-string": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz", + "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==" + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "requires": { + "has-symbols": "^1.0.2" + } + }, + "is-typed-array": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.5.tgz", + "integrity": "sha512-S+GRDgJlR3PyEbsX/Fobd9cqpZBuvUS+8asRqYDMLCb2qMzt1oz5m5oxQCxOgUDxiWsOVNi4yaF+/uvdlHlYug==", + "requires": { + "available-typed-arrays": "^1.0.2", + "call-bind": "^1.0.2", + "es-abstract": "^1.18.0-next.2", + "foreach": "^2.0.5", + "has-symbols": "^1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "is-url": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", + "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==" + }, + "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==" + }, + "is2": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/is2/-/is2-2.0.7.tgz", + "integrity": "sha512-4vBQoURAXC6hnLFxD4VW7uc04XiwTTl/8ydYJxKvPwkWQrSjInkuM5VZVg6BGr1/natq69zDuvO9lGpLClJqvA==", + "requires": { + "deep-is": "^0.1.3", + "ip-regex": "^4.1.0", + "is-url": "^1.2.4" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "isurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "requires": { + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" + } + }, + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + }, + "js-yaml": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", + "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", + "requires": { + "argparse": "^2.0.1" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "keccak": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz", + "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", + "requires": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + } + }, + "keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "requires": { + "json-buffer": "3.0.0" + } + }, + "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" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "requires": { + "p-locate": "^5.0.0" + } + }, + "log-symbols": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", + "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "requires": { + "chalk": "^4.0.0" + } + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" + }, + "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", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz", + "integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==" + }, + "mime-types": { + "version": "2.1.31", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz", + "integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==", + "requires": { + "mime-db": "1.48.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==" + }, + "min-document": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", + "requires": { + "dom-walk": "^0.1.0" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "requires": { + "minipass": "^2.9.0" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "mkdirp-promise": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", + "integrity": "sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=", + "requires": { + "mkdirp": "*" + } + }, + "mocha": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz", + "integrity": "sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ==", + "requires": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.1", + "debug": "4.3.1", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.1.6", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "4.0.0", + "log-symbols": "4.0.0", + "minimatch": "3.0.4", + "ms": "2.1.3", + "nanoid": "3.1.20", + "serialize-javascript": "5.0.1", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "which": "2.0.2", + "wide-align": "1.1.3", + "workerpool": "6.1.0", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "requires": { + "ms": "2.1.2" + }, + "dependencies": { + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + } + } + }, + "mock-fs": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.14.0.tgz", + "integrity": "sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "multibase": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.1.tgz", + "integrity": "sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==", + "requires": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + }, + "multicodec": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.7.tgz", + "integrity": "sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==", + "requires": { + "varint": "^5.0.0" + } + }, + "multihashes": { + "version": "0.4.21", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz", + "integrity": "sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==", + "requires": { + "buffer": "^5.5.0", + "multibase": "^0.7.0", + "varint": "^5.0.0" + }, + "dependencies": { + "multibase": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz", + "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==", + "requires": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + } + } + }, + "nano-json-stream-parser": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", + "integrity": "sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=" + }, + "nanoid": { + "version": "3.1.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", + "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==" + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, + "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.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + }, + "node-gyp-build": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz", + "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==" + }, + "nodemon": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.12.tgz", + "integrity": "sha512-egCTmNZdObdBxUBw6ZNwvZ/xzk24CKRs5K6d+5zbmrMr7rOpPmfPeF6OxM3DDpaRx331CQRFEktn+wrFFfBSOA==", + "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": "^4.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==" + }, + "normalize-url": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==" + }, + "npm-watch": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/npm-watch/-/npm-watch-0.9.0.tgz", + "integrity": "sha512-C5Rgh5+jvY33K1EH8Qjr1hfpH9Nhasc90QJ0W+JyKg2ogE0LOCZI4xirC8QmywW7XinyBpynwxlrN6aPfjc3Hw==", + "requires": { + "nodemon": "^2.0.7", + "through2": "^4.0.2" + } + }, + "number-to-bn": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", + "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", + "requires": { + "bn.js": "4.11.6", + "strip-hex-prefix": "1.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + } + } + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==" + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "oboe": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.5.tgz", + "integrity": "sha1-VVQoTFQ6ImbXo48X4HOCH73jk80=", + "requires": { + "http-https": "^1.0.0" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "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-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + }, + "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" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "requires": { + "p-limit": "^3.0.2" + } + }, + "p-timeout": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", + "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", + "requires": { + "p-finally": "^1.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, + "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==" + } + } + }, + "parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "requires": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "parse-headers": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.3.tgz", + "integrity": "sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA==" + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "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-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=" + }, + "pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==" + }, + "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" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" + }, + "polkadot-launch": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/polkadot-launch/-/polkadot-launch-1.7.0.tgz", + "integrity": "sha512-1zn87/erTmTM1BkS04M845IdBZMbxc5x57NeKFCOYR6geuRjoUpa+l6zDxjbWw4r8p/GR4hGdcpwioQAM0ZokA==", + "requires": { + "@polkadot/api": "^4.15.1", + "@polkadot/util": "^6.9.1", + "@polkadot/util-crypto": "^6.9.1", + "filter-console": "^0.1.1", + "typescript": "^4.1.5", + "yargs": "^15.4.1", + "yarn": "^1.22.10" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + } + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "typescript": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", + "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==" + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" + }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" + }, + "printj": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz", + "integrity": "sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ==" + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "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==", + "requires": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + } + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + }, + "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==" + }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "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.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + }, + "query-string": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "requires": { + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, + "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" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "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==" + }, + "raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "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": { + "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=" + } + } + }, + "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.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "requires": { + "picomatch": "^2.2.1" + } + }, + "regenerator-runtime": { + "version": "0.13.7", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==" + }, + "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" + } + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + } + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + }, + "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" + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "requires": { + "glob": "^7.1.3" + } + }, + "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" + } + }, + "rlp": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.6.tgz", + "integrity": "sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg==", + "requires": { + "bn.js": "^4.11.1" + } + }, + "rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "requires": { + "tslib": "^1.9.0" + } + }, + "safe-buffer": { + "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", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" + }, + "scryptsy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz", + "integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==" + }, + "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" + } + }, + "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.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "requires": { + "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.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + } + } + }, + "serialize-javascript": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", + "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "requires": { + "randombytes": "^2.1.0" + } + }, + "serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + } + }, + "servify": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/servify/-/servify-0.1.12.tgz", + "integrity": "sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==", + "requires": { + "body-parser": "^1.16.0", + "cors": "^2.8.1", + "express": "^4.14.0", + "request": "^2.79.0", + "xhr": "^2.3.3" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + }, + "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" + } + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" + }, + "simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" + }, + "simple-get": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", + "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "requires": { + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "source-map": { + "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.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "dependencies": { + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + } + } + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "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": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-hex-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", + "requires": { + "is-hex-prefixed": "1.0.0" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" + }, + "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" + } + }, + "swarm-js": { + "version": "0.1.40", + "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.40.tgz", + "integrity": "sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA==", + "requires": { + "bluebird": "^3.5.0", + "buffer": "^5.0.5", + "eth-lib": "^0.1.26", + "fs-extra": "^4.0.2", + "got": "^7.1.0", + "mime-types": "^2.1.16", + "mkdirp-promise": "^5.0.1", + "mock-fs": "^4.1.0", + "setimmediate": "^1.0.5", + "tar": "^4.0.2", + "xhr-request": "^1.0.1" + }, + "dependencies": { + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "got": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", + "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", + "requires": { + "decompress-response": "^3.2.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-plain-obj": "^1.1.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "p-cancelable": "^0.3.0", + "p-timeout": "^1.1.1", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "url-parse-lax": "^1.0.0", + "url-to-options": "^1.0.1" + } + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" + }, + "p-cancelable": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==" + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "requires": { + "prepend-http": "^1.0.1" + } + } + } + }, + "tar": { + "version": "4.4.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", + "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" + }, + "dependencies": { + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + } + } + }, + "tcp-port-used": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tcp-port-used/-/tcp-port-used-1.0.2.tgz", + "integrity": "sha512-l7ar8lLUD3XS1V2lfoJlCBaeoaWo/2xfYt81hM7VlvR4RrMVFqfmzfhLVk40hAb368uitje5gPtBRL1m/DGvLA==", + "requires": { + "debug": "4.3.1", + "is2": "^2.0.6" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, + "term-size": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", + "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==" + }, + "through2": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", + "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", + "requires": { + "readable-stream": "3" + } + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" + }, + "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==" + }, + "touch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "requires": { + "nopt": "~1.0.10" + } + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "ts-node": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz", + "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==", + "requires": { + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.17", + "yn": "3.1.1" + }, + "dependencies": { + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" + } + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" + }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "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" + } + }, + "typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==" + }, + "ultron": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" + }, + "unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "requires": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + } + }, + "undefsafe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.3.tgz", + "integrity": "sha512-nrXZwwXrD/T/JXeygJqdCO6NZZ1L66HrxM/Z7mIq2oPanoN0F1nLx3lwJMu6AwJY69hdixaFQOuoYsMjE5/C2A==", + "requires": { + "debug": "^2.2.0" + } + }, + "underscore": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", + "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==" + }, + "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" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "update-notifier": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.3.tgz", + "integrity": "sha512-Yld6Z0RyCYGB6ckIjffGOSOmHXj1gMeE7aROz4MG+XMkmixBX4jUngrGXNYz7wPKBmtoD4MnBa2Anu7RSKht/A==", + "requires": { + "boxen": "^4.2.0", + "chalk": "^3.0.0", + "configstore": "^5.0.1", + "has-yarn": "^2.1.0", + "import-lazy": "^2.1.0", + "is-ci": "^2.0.0", + "is-installed-globally": "^0.3.1", + "is-npm": "^4.0.0", + "is-yarn-global": "^0.3.0", + "latest-version": "^5.0.0", + "pupa": "^2.0.1", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" + }, + "dependencies": { + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "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" + } + } + } + }, + "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" + } + }, + "url-set-query": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", + "integrity": "sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=" + }, + "url-to-options": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=" + }, + "utf-8-validate": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.5.tgz", + "integrity": "sha512-+pnxRYsS/axEpkrrEpzYfNZGXp0IjC/9RIxwM5gntY4Koi8SHmUGSfxfWqxZdRxrtaoVstuOzUp/rbs3JSPELQ==", + "requires": { + "node-gyp-build": "^4.2.0" + } + }, + "utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", + "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==" + }, + "util": { + "version": "0.12.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz", + "integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==", + "requires": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "safe-buffer": "^5.1.2", + "which-typed-array": "^1.1.2" + } + }, + "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", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + }, + "varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "web3": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.4.0.tgz", + "integrity": "sha512-faT3pIX+1tuo+wqmUFQPe10MUGaB1UvRYxw9dmVJFLxaRAIfXErSilOf3jFhSwKbbPNkwG0bTiudCLN9JgeS7A==", + "requires": { + "web3-bzz": "1.4.0", + "web3-core": "1.4.0", + "web3-eth": "1.4.0", + "web3-eth-personal": "1.4.0", + "web3-net": "1.4.0", + "web3-shh": "1.4.0", + "web3-utils": "1.4.0" + } + }, + "web3-bzz": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.4.0.tgz", + "integrity": "sha512-KhXmz8hcfGsqhplB7NrekAeNkG2edHjXV4bL3vnXde8RGMWpabpSNxuwiGv+dv/3nWlrHatH0vGooONYCkP5TA==", + "requires": { + "@types/node": "^12.12.6", + "got": "9.6.0", + "swarm-js": "^0.1.40", + "underscore": "1.12.1" + }, + "dependencies": { + "@types/node": { + "version": "12.20.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.16.tgz", + "integrity": "sha512-6CLxw83vQf6DKqXxMPwl8qpF8I7THFZuIwLt4TnNsumxkp1VsRZWT8txQxncT/Rl2UojTsFzWgDG4FRMwafrlA==" + } + } + }, + "web3-core": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.4.0.tgz", + "integrity": "sha512-VRNMNqwzvPeKIet2l9BMApPHoUv0UqwaZH0lZJhG2RBko42w9Xls+pQwfVNSV16j04t/ehm1aLRV2Sx6lzVfRg==", + "requires": { + "@types/bn.js": "^4.11.5", + "@types/node": "^12.12.6", + "bignumber.js": "^9.0.0", + "web3-core-helpers": "1.4.0", + "web3-core-method": "1.4.0", + "web3-core-requestmanager": "1.4.0", + "web3-utils": "1.4.0" + }, + "dependencies": { + "@types/node": { + "version": "12.20.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.16.tgz", + "integrity": "sha512-6CLxw83vQf6DKqXxMPwl8qpF8I7THFZuIwLt4TnNsumxkp1VsRZWT8txQxncT/Rl2UojTsFzWgDG4FRMwafrlA==" + } + } + }, + "web3-core-helpers": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.4.0.tgz", + "integrity": "sha512-8Ebq0nmRfzw7iPoXbIRHEWOuPh+1cOV3OOEvKm5Od3McZOjja914vdk+DM3MgmbSpDzYJRFM6KoF0+Z/U/1bPw==", + "requires": { + "underscore": "1.12.1", + "web3-eth-iban": "1.4.0", + "web3-utils": "1.4.0" + } + }, + "web3-core-method": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.4.0.tgz", + "integrity": "sha512-KW9922fEkgKu8zDcJR8Iikg/epsuWMArAUVTipKVwzAI5TVdvOMRgSe/b7IIDRUIeoeXMARmJ+PrAlx+IU2acQ==", + "requires": { + "@ethersproject/transactions": "^5.0.0-beta.135", + "underscore": "1.12.1", + "web3-core-helpers": "1.4.0", + "web3-core-promievent": "1.4.0", + "web3-core-subscriptions": "1.4.0", + "web3-utils": "1.4.0" + } + }, + "web3-core-promievent": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.4.0.tgz", + "integrity": "sha512-YEwko22kcry7lHwbe0k80BrjXCZ+73jMdvZtptRH5k2B+XZ1XtmXwYL1PFIlZy9V0zgZijdg+3GabCnAHjVXAw==", + "requires": { + "eventemitter3": "4.0.4" + }, + "dependencies": { + "eventemitter3": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", + "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==" + } + } + }, + "web3-core-requestmanager": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.4.0.tgz", + "integrity": "sha512-qIwKJO5T0KkUAIL7y9JRSUkk3+LaCwghdUHK8FzbMvq6R1W9lgCBnccqFGEI76EJjHvsiw4kEKBEXowdB3xenQ==", + "requires": { + "underscore": "1.12.1", + "util": "^0.12.0", + "web3-core-helpers": "1.4.0", + "web3-providers-http": "1.4.0", + "web3-providers-ipc": "1.4.0", + "web3-providers-ws": "1.4.0" + } + }, + "web3-core-subscriptions": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.4.0.tgz", + "integrity": "sha512-/UMC9rSLEd0U+h6Qanx6CM29o/cfUyGWgl/HM6O/AIuth9G+34QBuKDa11Gr2Qg6F8Lr9tSFm8QIGVniOx9i5A==", + "requires": { + "eventemitter3": "4.0.4", + "underscore": "1.12.1", + "web3-core-helpers": "1.4.0" + }, + "dependencies": { + "eventemitter3": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", + "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==" + } + } + }, + "web3-eth": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.4.0.tgz", + "integrity": "sha512-L990eMJeWh4h/Z3M8MJb9HrKq8tqvzdGZ7igdzd6Ba3B/VKgGFAJ/4XIqtLwAJ1Wg5Cj8my60tYY+34c2cLefw==", + "requires": { + "underscore": "1.12.1", + "web3-core": "1.4.0", + "web3-core-helpers": "1.4.0", + "web3-core-method": "1.4.0", + "web3-core-subscriptions": "1.4.0", + "web3-eth-abi": "1.4.0", + "web3-eth-accounts": "1.4.0", + "web3-eth-contract": "1.4.0", + "web3-eth-ens": "1.4.0", + "web3-eth-iban": "1.4.0", + "web3-eth-personal": "1.4.0", + "web3-net": "1.4.0", + "web3-utils": "1.4.0" + } + }, + "web3-eth-abi": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.4.0.tgz", + "integrity": "sha512-FtmWipG/dSSkTGFb72JCwky7Jd0PIvd0kGTInWQwIEZlw5qMOYl61WZ9gwfojFHvHF6q1eKncerQr+MRXHO6zg==", + "requires": { + "@ethersproject/abi": "5.0.7", + "underscore": "1.12.1", + "web3-utils": "1.4.0" + } + }, + "web3-eth-accounts": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.4.0.tgz", + "integrity": "sha512-tETHBvfO3Z7BXZ7HJIwuX7ol6lPefP55X7b4IiX82C1PujHwsxENY7c/3wyxzqKoDyH6zfyEQo17yhxkhsM1oA==", + "requires": { + "@ethereumjs/common": "^2.3.0", + "@ethereumjs/tx": "^3.2.1", + "crypto-browserify": "3.12.0", + "eth-lib": "0.2.8", + "ethereumjs-util": "^7.0.10", + "scrypt-js": "^3.0.1", + "underscore": "1.12.1", + "uuid": "3.3.2", + "web3-core": "1.4.0", + "web3-core-helpers": "1.4.0", + "web3-core-method": "1.4.0", + "web3-utils": "1.4.0" + }, + "dependencies": { + "eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + } + } + }, + "web3-eth-contract": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.4.0.tgz", + "integrity": "sha512-GfIhOzfp/ZXKd+1tFEH3ePq0DEsvq9XO5tOsI0REDtEYUj2GNxO5e/x/Fhekk7iLZ7xAqSzDMweFruDQ1fxn0A==", + "requires": { + "@types/bn.js": "^4.11.5", + "underscore": "1.12.1", + "web3-core": "1.4.0", + "web3-core-helpers": "1.4.0", + "web3-core-method": "1.4.0", + "web3-core-promievent": "1.4.0", + "web3-core-subscriptions": "1.4.0", + "web3-eth-abi": "1.4.0", + "web3-utils": "1.4.0" + } + }, + "web3-eth-ens": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.4.0.tgz", + "integrity": "sha512-jR1KorjU1erpYFpFzsMXAWZnHhqUqWPBq/4+BGVj7/pJ43+A3mrE1eB0zl91Dwc1RTNwOhB02iOj1c9OlpGr3g==", + "requires": { + "content-hash": "^2.5.2", + "eth-ens-namehash": "2.0.8", + "underscore": "1.12.1", + "web3-core": "1.4.0", + "web3-core-helpers": "1.4.0", + "web3-core-promievent": "1.4.0", + "web3-eth-abi": "1.4.0", + "web3-eth-contract": "1.4.0", + "web3-utils": "1.4.0" + } + }, + "web3-eth-iban": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.4.0.tgz", + "integrity": "sha512-YNx748VzwiBe0gvtZjvU9BQsooZ9s9sAlmiDWJOMcvMbUTDhC7SvxA7vV/vrnOxL6oGHRh0U/azsYNxxlKiTBw==", + "requires": { + "bn.js": "^4.11.9", + "web3-utils": "1.4.0" + } + }, + "web3-eth-personal": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.4.0.tgz", + "integrity": "sha512-8Ip6xZ8plmWqAD4ESbKUIPVV9gfTAFFm0ff1FQIw9I9kYvFlBIPzukvm852w2SftGem+/iRH+2+2mK7HvuKXZQ==", + "requires": { + "@types/node": "^12.12.6", + "web3-core": "1.4.0", + "web3-core-helpers": "1.4.0", + "web3-core-method": "1.4.0", + "web3-net": "1.4.0", + "web3-utils": "1.4.0" + }, + "dependencies": { + "@types/node": { + "version": "12.20.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.16.tgz", + "integrity": "sha512-6CLxw83vQf6DKqXxMPwl8qpF8I7THFZuIwLt4TnNsumxkp1VsRZWT8txQxncT/Rl2UojTsFzWgDG4FRMwafrlA==" + } + } + }, + "web3-net": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.4.0.tgz", + "integrity": "sha512-41WkKobL+KnKC0CY0RZ1KhMMyR/hMFGlbHZQac4KtB7ro1UdXeK+RiYX+GzSr1h7j9Dj+dQZqyBs70cxmL9cPQ==", + "requires": { + "web3-core": "1.4.0", + "web3-core-method": "1.4.0", + "web3-utils": "1.4.0" + } + }, + "web3-providers-http": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.4.0.tgz", + "integrity": "sha512-A9nLF4XGZfDb1KYYuKRwHY1H90Ee/0I0CqQQEELI0yuY9eca50qdCHEg3sJhvqBIG44JCm83amOGxR8wi+76tQ==", + "requires": { + "web3-core-helpers": "1.4.0", + "xhr2-cookies": "1.1.0" + } + }, + "web3-providers-ipc": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.4.0.tgz", + "integrity": "sha512-ul/tSNUI5anhdBGBV+FWFH9EJgO73/G21haFDEXvTnSJQa9/byj401H/E2Xd8BXGk+2XB+CCGLZBiuAjhhhtTA==", + "requires": { + "oboe": "2.1.5", + "underscore": "1.12.1", + "web3-core-helpers": "1.4.0" + } + }, + "web3-providers-ws": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.4.0.tgz", + "integrity": "sha512-E5XfF58RLXuCtGiMSXxXEtjceCfPli+I4MDYCKx/J/bDJ6qvLUM2OnnGEmE7pq1Z03h0xh1ZezaB/qoweK3ZIQ==", + "requires": { + "eventemitter3": "4.0.4", + "underscore": "1.12.1", + "web3-core-helpers": "1.4.0", + "websocket": "^1.0.32" + }, + "dependencies": { + "eventemitter3": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", + "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==" + } + } + }, + "web3-shh": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.4.0.tgz", + "integrity": "sha512-OZMkMgo+VZnu1ErhIFXW+5ExnPKQg9v8/2DHGVtNEwuC5OHYuAEF5U7MQgbxYJYwbRmxQCt/hA3VwKjnkbmSAA==", + "requires": { + "web3-core": "1.4.0", + "web3-core-method": "1.4.0", + "web3-core-subscriptions": "1.4.0", + "web3-net": "1.4.0" + } + }, + "web3-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.4.0.tgz", + "integrity": "sha512-b8mEhwh/J928Xk+SQFjtqrR2EGPhpknWLcIt9aCpVPVRXiqjUGo/kpOHKz0azu9c6/onEJ9tWXZt0cVjmH0N5Q==", + "requires": { + "bn.js": "^4.11.9", + "eth-lib": "0.2.8", + "ethereum-bloom-filters": "^1.0.6", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "underscore": "1.12.1", + "utf8": "3.0.0" + }, + "dependencies": { + "eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + } + } + }, + "websocket": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", + "integrity": "sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==", + "requires": { + "bufferutil": "^4.0.1", + "debug": "^2.2.0", + "es5-ext": "^0.10.50", + "typedarray-to-buffer": "^3.1.5", + "utf-8-validate": "^5.0.2", + "yaeti": "^0.0.6" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, + "which-typed-array": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.4.tgz", + "integrity": "sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA==", + "requires": { + "available-typed-arrays": "^1.0.2", + "call-bind": "^1.0.0", + "es-abstract": "^1.18.0-next.1", + "foreach": "^2.0.5", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.1", + "is-typed-array": "^1.1.3" + } + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "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": { + "string-width": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "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==" + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "workerpool": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.0.tgz", + "integrity": "sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==" + }, + "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" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "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==" + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "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": "3.3.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", + "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", + "requires": { + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "xdg-basedir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==" + }, + "xhr": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.6.0.tgz", + "integrity": "sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA==", + "requires": { + "global": "~4.4.0", + "is-function": "^1.0.1", + "parse-headers": "^2.0.0", + "xtend": "^4.0.0" + } + }, + "xhr-request": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz", + "integrity": "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==", + "requires": { + "buffer-to-arraybuffer": "^0.0.5", + "object-assign": "^4.1.1", + "query-string": "^5.0.1", + "simple-get": "^2.7.0", + "timed-out": "^4.0.1", + "url-set-query": "^1.0.0", + "xhr": "^2.0.4" + } + }, + "xhr-request-promise": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz", + "integrity": "sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg==", + "requires": { + "xhr-request": "^1.1.0" + } + }, + "xhr2-cookies": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz", + "integrity": "sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg=", + "requires": { + "cookiejar": "^2.1.1" + } + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, + "xxhashjs": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/xxhashjs/-/xxhashjs-0.2.2.tgz", + "integrity": "sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw==", + "requires": { + "cuint": "^0.2.2" + } + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" + }, + "yaeti": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", + "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=" + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "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==" + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==" + }, + "yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "requires": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "dependencies": { + "camelcase": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==" + } + } + }, + "yarn": { + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/yarn/-/yarn-1.22.10.tgz", + "integrity": "sha512-IanQGI9RRPAN87VGTF7zs2uxkSyQSrSPsju0COgbsKQOOXr5LtcVPeyXWgwVa0ywG3d8dg6kSYKGBuYK021qeA==" + }, + "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/tests/package.json b/tests/package.json new file mode 100644 index 000000000..045c0c487 --- /dev/null +++ b/tests/package.json @@ -0,0 +1,57 @@ +{ + "name": "ts-tests", + "version": "1.0.0", + "description": "", + "main": "index.js", + "watch": { + "build": { + "patterns": [ + "../" + ], + "ignore": [ + "../tests", + "../target", + "../build" + ], + "extensions": "rs", + "quiet": true, + "inherit": true + }, + "test": { + "patterns": [ + "../target/release/lc-core", + "./tests/**" + ], + "extensions": "ts,html,scss", + "quiet": true, + "inherit": true, + "runOnChangeOnly": true + } + }, + "scripts": { + "test-with-logs": "mocha --printlogs -r ts-node/register 'tests/**/test-*.ts'", + "test": "TS_NODE_TRANSPILE_ONLY=true mocha --parallel -r ts-node/register 'tests/**/test-*.ts'", + "watch": "npm-watch", + "build": "cargo build --release", + "test-single": "mocha -r ts-node/register 'tests/test-stake.ts'", + "current-test": "mocha -r ts-node/register", + "lint": "npx prettier --write --ignore-path .gitignore '**/*.(yml|js|ts|json)'" + }, + "author": "", + "license": "ISC", + "dependencies": { + "@polkadot/api": "^4.17.1", + "@polkadot/types": "^4.17.1", + "@types/chai": "^4.2.11", + "@types/mocha": "^8.2.2", + "chai": "^4.3.4", + "mocha": "^8.3.2", + "npm-watch": "^0.9.0", + "polkadot-launch": "^1.6.2", + "rimraf": "^3.0.2", + "tcp-port-used": "^1.0.2", + "ts-node": "9.1", + "typescript": "^3.9.6", + "web3": "^1.3.5" + } +} diff --git a/tests/tsconfig.json b/tests/tsconfig.json new file mode 100644 index 000000000..6f527790e --- /dev/null +++ b/tests/tsconfig.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "target": "ES2020", + "moduleResolution": "node", + "esModuleInterop": true + } +} -- GitLab