Compare commits

...

19 Commits

Author SHA1 Message Date
benedettadavico c45e8da43d Merge branch 'develop-with-release-1.1.0-merged-in' into feature/validator-api-tests 2022-11-09 10:15:54 +01:00
benedettadavico 12cc49a734 WIP 2022-11-09 10:05:47 +01:00
benedettadavico 7e56a9e88c WIP 2022-11-08 16:22:39 +01:00
benedettadavico 9790009eac WIP 2022-11-08 12:30:27 +01:00
benedettadavico 379d593daf Updating more tests 2022-11-07 18:37:31 +01:00
benedettadavico ce75b99b6f Merge branch 'release/v1.1.0' into feature/validator-api-tests 2022-11-07 17:36:21 +01:00
benedettadavico bcb7c41fd7 Updating validator api tests for v2 contracts 2022-11-07 17:31:25 +01:00
benedettadavico bb091ce47f Updating validator api tests for v2 contracts 2022-11-07 17:28:13 +01:00
Drazen Urch b28ff17c30 Set default pledge cap to 10% (#1739)
* Set default pledge cap to 10%

* fix clippy beta lints
2022-11-07 14:40:52 +01:00
benedettadavico effed4d7d6 Merge branch 'release/v1.1.0' into feature/validator-api-tests 2022-11-07 09:36:16 +01:00
benedettadavico d480ddb133 fixing failing tests 2022-08-15 15:20:23 +02:00
benedettadavico b119820591 Clean up 2022-08-15 09:25:28 +02:00
benedettadavico e128949dc2 Clean up 2022-08-13 20:40:08 +02:00
benedettadavico 9499b987e5 possible approach to validating address length and proxy type 2022-08-13 20:31:50 +02:00
benedettadavico d6ac786295 adding tests 2022-08-12 15:51:23 +02:00
tommy 4d09d9c3db remove 1-2-1 mapping 2022-08-12 13:30:27 +02:00
tommy 8c9044adf3 remove the need to map to type 2022-08-12 13:26:46 +02:00
tommy 472085ca52 Fix up look sharp
- added missing .git files
- fixed paths
- run the linter
2022-08-12 11:18:17 +02:00
benedettadavico 2f089e80ff adding onto the validator-api tests 2022-08-12 10:12:57 +02:00
24 changed files with 1766 additions and 296 deletions
Vendored
BIN
View File
Binary file not shown.
+32
View File
@@ -0,0 +1,32 @@
name: Tests for validator API
on:
push:
paths:
- "validator-api/tests/**"
defaults:
run:
working-directory: validator-api/tests
jobs:
test:
name: validator api tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Node v18
uses: actions/setup-node@v3
with:
node-version: 18.1.0
- name: Install yarn
run: yarn install
- name: Run yarn
run: yarn
- name: Launch tests
run: yarn test
working-directory: validator-api/tests
+3
View File
@@ -122,3 +122,6 @@ mixnet-opt: wasm
generate-typescript:
cd tools/ts-rs-cli && cargo run && cd ../..
yarn types:lint:fix
run-validator-tests:
cd validator-api/tests/functional_test && yarn test
@@ -85,7 +85,7 @@ impl FromStr for PledgeCap {
impl Default for PledgeCap {
fn default() -> Self {
PledgeCap::Absolute(Uint128::from(100_000_000_000u128))
PledgeCap::Percent(Percent::from_percentage_value(10).expect("This can never fail!"))
}
}
BIN
View File
Binary file not shown.
+3 -3
View File
@@ -160,7 +160,7 @@ mod qa {
pub(crate) const STAKE_DENOM: DenomDetails = DenomDetails::new("unyx", "nyx", 6);
pub(crate) const MIXNET_CONTRACT_ADDRESS: &str =
"n1frq2hzkjtatsupc6jtyaz67ytydk9nya437q92qg76ny3y8fcnjsw806vg";
"n1qa4hswlcjmttulj0q9qa46jf64f93pecl6tydcsjldfe0hy5ju0sdmwzya";
pub(crate) const VESTING_CONTRACT_ADDRESS: &str =
"n14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9sjyvg3g";
pub(crate) const BANDWIDTH_CLAIM_CONTRACT_ADDRESS: &str =
@@ -177,8 +177,8 @@ mod qa {
//pub(crate) const STATISTICS_SERVICE_DOMAIN_ADDRESS: &str = "http://0.0.0.0";
pub(crate) fn validators() -> Vec<ValidatorDetails> {
vec![ValidatorDetails::new(
"https://adv-epoch-qa-validator.qa.nymte.ch/",
Some("https://adv-epoch-qa-val-api.qa.nymte.ch/api"),
"https://v2-env-validator.qa.nymte.ch/",
Some("https://v2-env-val-api.qa.nymte.ch/api/"),
)]
}
BIN
View File
Binary file not shown.
+7
View File
@@ -0,0 +1,7 @@
.vscode
node_modules
build
coverage
dist
.cache
jest.config.js
+32
View File
@@ -0,0 +1,32 @@
{
"root": true,
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"rules": {
"import/extensions": "off",
"no-console": ["warn", { "allow": ["warn", "error"] }],
"import/prefer-default-export": "off",
"prettier/prettier": ["error"]
},
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx"],
"rules": {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"]
}
}
]
}
+6
View File
@@ -0,0 +1,6 @@
node_modules
dist
coverage/
.DS_Store
.idea/
junit.xml
File diff suppressed because one or more lines are too long
@@ -0,0 +1,40 @@
import ContractCache from "../../../src/endpoints/ContractCache";
import ConfigHandler from "../../../src/config/configHandler";
let contract: ContractCache;
let config: ConfigHandler;
describe("Get epoch info", (): void => {
beforeAll(async (): Promise<void> => {
contract = new ContractCache();
config = ConfigHandler.getInstance();
});
it("Get epoch reward params", async (): Promise<void> => {
const response = await contract.getEpochRewardParams();
expect(typeof response.interval.reward_pool).toBe('string');
expect(typeof response.interval.staking_supply_scale_factor).toBe('string');
expect(typeof response.interval.staking_supply).toBe('string');
expect(typeof response.interval.epoch_reward_budget).toBe('string');
expect(typeof response.interval.stake_saturation_point).toBe('string');
expect(typeof response.interval.sybil_resistance).toBe('string');
expect(typeof response.interval.active_set_work_factor).toBe('string');
expect(typeof response.interval.interval_pool_emission).toBe('string');
expect(typeof response.active_set_size).toBe('number');
expect(typeof response.rewarded_set_size).toBe('number');
});
it("Get current epoch", async (): Promise<void> => {
const response = await contract.getCurrentEpoch();
expect(typeof response.id).toBe('number');
expect(typeof response.epochs_in_interval).toBe('number');
expect(typeof response.current_epoch_id).toBe('number');
expect(typeof response.current_epoch_start).toBe('string');
expect(typeof response.epoch_length.secs).toBe('number');
expect(typeof response.epoch_length.nanos).toBe('number');
expect(typeof response.total_elapsed_epochs).toBe('number');
});
});
@@ -0,0 +1,50 @@
import ContractCache from "../../../../src/endpoints/ContractCache";
import ConfigHandler from "../../../../src/config/configHandler";
let contract: ContractCache;
let config: ConfigHandler;
describe("Get gateway data", (): void => {
beforeAll(async (): Promise<void> => {
contract = new ContractCache();
config = ConfigHandler.getInstance();
});
it("Get all gateways", async (): Promise<void> => {
const response = await contract.getGateways();
response.forEach((gateway) => {
//overview
expect(typeof gateway.owner).toBe('string');
expect(typeof gateway.block_height).toBe('number');
if (gateway.proxy === null) {
return true;
}
else {
expect(typeof gateway.proxy).toBe('string');
}
//pledge_amount
expect(typeof gateway.pledge_amount.denom).toBe('string');
expect(typeof gateway.pledge_amount.amount).toBe('string');
//gateway
expect(typeof gateway.gateway.host).toBe('string');
expect(typeof gateway.gateway.mix_port).toBe('number');
expect(typeof gateway.gateway.clients_port).toBe('number');
expect(typeof gateway.gateway.location).toBe('string');
expect(typeof gateway.gateway.sphinx_key).toBe('string');
expect(typeof gateway.gateway.identity_key).toBe('string');
expect(typeof gateway.gateway.version).toBe('string');
});
});
it("Get blacklisted gateways", async (): Promise<void> => {
const response = await contract.getBlacklistedGateways();
response.forEach(function (value) {
expect(typeof value).toBe('string');
});
});
});
@@ -0,0 +1,171 @@
import ContractCache from "../../../../src/endpoints/ContractCache";
import ConfigHandler from "../../../../src/config/configHandler";
let contract: ContractCache;
let config: ConfigHandler;
describe("Get mixnode data", (): void => {
beforeAll(async (): Promise<void> => {
contract = new ContractCache();
config = ConfigHandler.getInstance();
});
it("Get all mixnodes", async (): Promise<void> => {
const response = await contract.getMixnodes();
response.forEach((mixnode) => {
//bond information overview
expect(typeof mixnode.bond_information.mix_id).toBe('number');
expect(typeof mixnode.bond_information.owner).toBe('string');
expect(typeof mixnode.bond_information.original_pledge.amount).toBe('string');
expect(typeof mixnode.bond_information.original_pledge.denom).toBe('string');
expect(typeof mixnode.bond_information.layer).toBe('number');
expect(typeof mixnode.bond_information.bonding_height).toBe('number');
expect(typeof mixnode.bond_information.is_unbonding).toBe('boolean');
if (mixnode.bond_information.proxy === null) {
return true;
}
else {
expect(typeof mixnode.bond_information.proxy).toBe('string');
}
//mixnode
expect(typeof mixnode.bond_information.mix_node.host).toBe('string')
expect(mixnode.bond_information.mix_node.http_api_port).toStrictEqual(8000);
expect(typeof mixnode.bond_information.mix_node.verloc_port).toBe('number')
expect(typeof mixnode.bond_information.mix_node.mix_port).toBe('number')
expect(mixnode.bond_information.mix_node.mix_port).toStrictEqual(1789);
expect(mixnode.bond_information.mix_node.verloc_port).toStrictEqual(1790)
let identitykey = mixnode.bond_information.mix_node.identity_key
if (typeof identitykey === 'string') {
if (identitykey.length === 43) {
return true
}
else expect(identitykey).toHaveLength(44);
}
let sphinx = mixnode.bond_information.mix_node.sphinx_key
if (typeof sphinx === 'string') {
if (sphinx.length === 43) {
return true
}
else expect(sphinx).toHaveLength(44);
}
//rewarding details
expect(typeof mixnode.rewarding_details.cost_params.profit_margin_percent).toBe('string')
expect(typeof mixnode.rewarding_details.cost_params.interval_operating_cost.denom).toBe('string')
expect(typeof mixnode.rewarding_details.cost_params.interval_operating_cost.amount).toBe('string')
expect(typeof mixnode.rewarding_details.operator).toBe('string')
expect(typeof mixnode.rewarding_details.delegates).toBe('string')
expect(typeof mixnode.rewarding_details.total_unit_reward).toBe('string')
expect(typeof mixnode.rewarding_details.unit_delegation).toBe('string')
expect(typeof mixnode.rewarding_details.last_rewarded_epoch).toBe('number')
expect(typeof mixnode.rewarding_details.unique_delegations).toBe('number')
});
});
it("Get all mixnodes detailed", async (): Promise<void> => {
const response = await contract.getMixnodesDetailed();
response.forEach((mixnode) => {
// overview details
expect(typeof mixnode.estimated_delegators_apy).toBe('string');
expect(typeof mixnode.estimated_operator_apy).toBe('string');
expect(typeof mixnode.performance).toBe('string');
expect(typeof mixnode.uncapped_stake_saturation).toBe('string');
expect(typeof mixnode.stake_saturation).toBe('string');
//mixnode details bond info
expect(typeof mixnode.mixnode_details.bond_information.mix_id).toBe('number')
expect(typeof mixnode.mixnode_details.bond_information.owner).toBe('string');
expect(typeof mixnode.mixnode_details.bond_information.original_pledge.amount).toBe('string');
expect(typeof mixnode.mixnode_details.bond_information.original_pledge.denom).toBe('string');
expect(typeof mixnode.mixnode_details.bond_information.layer).toBe('number');
expect(typeof mixnode.mixnode_details.bond_information.bonding_height).toBe('number');
expect(typeof mixnode.mixnode_details.bond_information.is_unbonding).toBe('boolean');
if (mixnode.mixnode_details.bond_information.proxy === null) {
return true;
}
else {
expect(typeof mixnode.mixnode_details.bond_information.proxy).toBe('string');
}
//mixnode
expect(typeof mixnode.mixnode_details.bond_information.mix_node.host).toBe('string')
expect(mixnode.mixnode_details.bond_information.mix_node.http_api_port).toStrictEqual(8000);
expect(typeof mixnode.mixnode_details.bond_information.mix_node.verloc_port).toBe('number')
expect(typeof mixnode.mixnode_details.bond_information.mix_node.mix_port).toBe('number')
expect(mixnode.mixnode_details.bond_information.mix_node.mix_port).toStrictEqual(1789);
expect(mixnode.mixnode_details.bond_information.mix_node.verloc_port).toStrictEqual(1790)
let identitykey2 = mixnode.mixnode_details.bond_information.mix_node.identity_key
if (typeof identitykey2 === 'string') {
if (identitykey2.length === 43) {
return true
}
else expect(identitykey2).toHaveLength(44);
}
let sphinx2 = mixnode.mixnode_details.bond_information.mix_node.sphinx_key
if (typeof sphinx2 === 'string') {
if (sphinx2.length === 43) {
return true
}
else expect(sphinx2).toHaveLength(44);
}
//mixnode rewarding info
expect(typeof mixnode.mixnode_details.rewarding_details.cost_params.profit_margin_percent).toBe('string')
expect(typeof mixnode.mixnode_details.rewarding_details.cost_params.interval_operating_cost.denom).toBe('string')
expect(typeof mixnode.mixnode_details.rewarding_details.cost_params.interval_operating_cost.amount).toBe('string')
expect(typeof mixnode.mixnode_details.rewarding_details.operator).toBe('string')
expect(typeof mixnode.mixnode_details.rewarding_details.delegates).toBe('string')
expect(typeof mixnode.mixnode_details.rewarding_details.total_unit_reward).toBe('string')
expect(typeof mixnode.mixnode_details.rewarding_details.unit_delegation).toBe('string')
expect(typeof mixnode.mixnode_details.rewarding_details.last_rewarded_epoch).toBe('number')
expect(typeof mixnode.mixnode_details.rewarding_details.unique_delegations).toBe('number')
});
});
it("Get active mixnodes", async (): Promise<void> => {
const response = await contract.getActiveMixnodes();
response.forEach(function (mixnode) {
expect(mixnode.rewarding_details.cost_params.profit_margin_percent).toBeTruthy()
});
});
it("Get active mixnodes detailed", async (): Promise<void> => {
const response = await contract.getActiveMixnodesDetailed();
response.forEach(function (mixnode) {
expect(mixnode.mixnode_details.rewarding_details.cost_params.profit_margin_percent).toBeTruthy()
});
});
it("Get rewarded mixnodes", async (): Promise<void> => {
const response = await contract.getRewardedMixnodes();
response.forEach(function (mixnode) {
expect(mixnode.rewarding_details.last_rewarded_epoch).toBeTruthy()
});
});
it("Get rewarded mixnodes detailed", async (): Promise<void> => {
const response = await contract.getRewardedMixnodesDetailed();
response.forEach(function (mixnode) {
expect(mixnode.mixnode_details.rewarding_details.last_rewarded_epoch).toBeTruthy()
});
});
it("Get blacklisted mixnodes", async (): Promise<void> => {
const response = await contract.getBlacklistedMixnodes();
response.forEach(function (value) {
expect(typeof value).toBe('number');
});
});
});
@@ -0,0 +1,46 @@
import Status from "../../../src/endpoints/Status";
import ConfigHandler from "../../../src/config/configHandler";
let status: Status;
let config: ConfigHandler;
describe("Get gateway data", (): void => {
beforeAll(async (): Promise<void> => {
status = new Status();
config = ConfigHandler.getInstance();
});
it("Get a gateway history", async (): Promise<void> => {
const identity_key = config.environmnetConfig.gateway_identity;
const response = await status.getGatewayHistory(identity_key);
response.history.forEach((x) => {
expect(typeof x.date).toBe("string");
expect(typeof x.uptime).toBe("number");
});
expect(identity_key).toStrictEqual(response.identity);
expect(typeof response.owner).toBe("string");
});
it("Get gateway core status count", async (): Promise<void> => {
const identity_key = config.environmnetConfig.gateway_identity;
const response = await status.getGatewayCoreCount(identity_key);
expect(identity_key).toStrictEqual(response.identity);
expect(typeof response.count).toBe("number");
});
it("Get a gateway status report", async (): Promise<void> => {
const identity_key = config.environmnetConfig.gateway_identity;
const response = await status.getGatewayStatusReport(identity_key);
expect(identity_key).toStrictEqual(response.identity);
expect(typeof response.owner).toBe("string");
expect(typeof response.most_recent).toBe("number");
expect(typeof response.last_hour).toBe("number");
expect(typeof response.last_day).toBe("number");
});
});
@@ -11,113 +11,158 @@ describe("Get mixnode data", (): void => {
});
it("Get a mixnode stake saturation", async (): Promise<void> => {
const identity_key = config.environmnetConfig.mixnode_identity;
const response = await status.getMixnodeStakeSaturation(identity_key);
console.log(response.as_at);
console.log(response.saturation);
const mix_id = config.environmnetConfig.mix_id;
const response = await status.getMixnodeStakeSaturation(mix_id);
expect(typeof response.as_at).toBe("number");
expect(typeof response.saturation).toBe("number");
expect(typeof response.saturation).toBe("string");
expect(typeof response.uncapped_saturation).toBe("string");
});
it("Get a mixnode status report", async (): Promise<void> => {
const mix_id = config.environmnetConfig.mix_id;
const response = await status.getMixnodeStatusReport(mix_id);
expect(mix_id).toStrictEqual(response.mix_id);
expect(typeof response.owner).toBe("string");
expect(typeof response.most_recent).toBe("number");
expect(typeof response.last_hour).toBe("number");
expect(typeof response.last_day).toBe("number");
});
it("Get a mixnode average uptime", async (): Promise<void> => {
const identity_key = config.environmnetConfig.mixnode_identity;
const response = await status.getMixnodeAverageUptime(identity_key);
const mix_id = config.environmnetConfig.mix_id;
const response = await status.getMixnodeAverageUptime(mix_id);
console.log(response.avg_uptime);
console.log(response.identity);
expect(identity_key).toStrictEqual(response.identity);
expect(mix_id).toStrictEqual(response.mix_id);
expect(typeof response.avg_uptime).toBe("number");
});
it("Get a mixnode history", async (): Promise<void> => {
const identity_key = config.environmnetConfig.mixnode_identity;
const response = await status.getMixnodeHistory(identity_key);
const mix_id = config.environmnetConfig.mix_id;
const response = await status.getMixnodeHistory(mix_id);
response.history.forEach((x) => {
console.log(x.date);
console.log(x.uptime);
});
console.log(response.identity);
console.log(response.owner);
expect(identity_key).toStrictEqual(response.identity);
expect(typeof x.date).toBe("string");
expect(typeof x.uptime).toBe("number");
});
expect(mix_id).toStrictEqual(response.mix_id);
expect(typeof response.owner).toBe("string");
});
it("Get a gateway history", async (): Promise<void> => {
const identity_key = config.environmnetConfig.gateway_identity;
const response = await status.getGatewayHistory(identity_key);
it("Get mixnode core status count", async (): Promise<void> => {
const mix_id = config.environmnetConfig.mix_id;
const response = await status.getMixnodeCoreCount(mix_id);
response.history.forEach((x) => {
console.log(x.date);
console.log(x.uptime);
});
console.log(response.identity);
console.log(response.owner);
expect(identity_key).toStrictEqual(response.identity);
expect(typeof response.owner).toBe("string");
});
it("Get a gateway history", async (): Promise<void> => {
const identity_key = config.environmnetConfig.gateway_identity;
const response = await status.getGatewayCoreCount(identity_key);
console.log(response.count);
console.log(response.identity);
expect(identity_key).toStrictEqual(response.identity);
expect(typeof response.count).toBe("number");
});
it("Get a gateway history", async (): Promise<void> => {
const identity_key = config.environmnetConfig.mixnode_identity;
const response = await status.getMixnodeCoreCount(identity_key);
console.log(response.count);
console.log(response.identity);
expect(identity_key).toStrictEqual(response.identity);
expect(mix_id).toStrictEqual(response.mix_id);
expect(typeof response.count).toBe("number");
});
it("Get a mixnode status", async (): Promise<void> => {
const identity_key = config.environmnetConfig.mixnode_identity;
const response = await status.getMixnodeStatus(identity_key);
console.log(response.status);
const mix_id = config.environmnetConfig.mix_id;
const response = await status.getMixnodeStatus(mix_id);
expect(response.status).toStrictEqual("active");
});
it("Get a mixnode reward estimation", async (): Promise<void> => {
const identity_key = config.environmnetConfig.mixnode_identity;
const response = await status.getMixnodeRewardComputation(identity_key);
const mix_id = config.environmnetConfig.mix_id;
const response = await status.getMixnodeRewardComputation(mix_id);
//estimation
expect(typeof response.estimation.total_node_reward).toBe("string");
expect(typeof response.estimation.operator).toBe("string");
expect(typeof response.estimation.delegates).toBe("string");
expect(typeof response.estimation.operating_cost).toBe("string");
//reward_params
expect(typeof response.reward_params.interval.reward_pool).toBe("string");
expect(typeof response.reward_params.interval.staking_supply).toBe("string");
expect(typeof response.reward_params.interval.staking_supply_scale_factor).toBe("string");
expect(typeof response.reward_params.interval.epoch_reward_budget).toBe("string");
expect(typeof response.reward_params.interval.stake_saturation_point).toBe("string");
expect(typeof response.reward_params.interval.sybil_resistance).toBe("string");
expect(typeof response.reward_params.interval.active_set_work_factor).toBe("string");
expect(typeof response.reward_params.interval.interval_pool_emission).toBe("string");
expect(typeof response.reward_params.rewarded_set_size).toBe("number");
expect(typeof response.reward_params.active_set_size).toBe("number");
//epoch
expect(typeof response.epoch.id).toBe("number");
expect(typeof response.epoch.epochs_in_interval).toBe("number");
expect(typeof response.epoch.current_epoch_start).toBe("string");
expect(typeof response.epoch.current_epoch_id).toBe("number");
expect(typeof response.epoch.epoch_length.secs).toBe("number");
expect(typeof response.epoch.epoch_length.nanos).toBe("number");
expect(typeof response.epoch.total_elapsed_epochs).toBe("number");
expect(typeof response.as_at).toBe("number");
console.log(response.estimated_delegators_reward);
console.log(response.estimated_node_profit);
console.log(response.estimated_operator_cost);
console.log(response.estimated_operator_reward);
console.log(response.estimated_total_node_reward);
console.log(response.reward_params);
console.log(response.as_at);
console.log(response);
//assertions to come
//expect(response).toStrictEqual('something');
});
it("Get a mixnode inclusion probability", async (): Promise<void> => {
const identity_key = config.environmnetConfig.mixnode_identity;
const response = await status.getMixnodeInclusionProbability(identity_key);
const mix_id = config.environmnetConfig.mix_id;
const response = await status.getMixnodeInclusionProbability(mix_id);
console.log(response.in_active);
console.log(response.in_reserve);
//assertions to come
//expect(response).toStrictEqual('something');
expect(typeof response.in_active).toBe("string");
expect(typeof response.in_reserve).toBe("string");
});
it("Post to compute mixnode reward estimation", async ():Promise<void> => {
const mix_id = config.environmnetConfig.mix_id;
const payload = {"performance": "0.2"}
const response = await status.getMixnodeRewardEstimatedComputation(mix_id, payload);
//estimation
expect(typeof response.estimation.total_node_reward).toBe("string");
expect(typeof response.estimation.operator).toBe("string");
expect(typeof response.estimation.delegates).toBe("string");
expect(typeof response.estimation.operating_cost).toBe("string");
//reward_params
expect(typeof response.reward_params.interval.reward_pool).toBe("string");
expect(typeof response.reward_params.interval.staking_supply).toBe("string");
expect(typeof response.reward_params.interval.staking_supply_scale_factor).toBe("string");
expect(typeof response.reward_params.interval.epoch_reward_budget).toBe("string");
expect(typeof response.reward_params.interval.stake_saturation_point).toBe("string");
expect(typeof response.reward_params.interval.sybil_resistance).toBe("string");
expect(typeof response.reward_params.interval.active_set_work_factor).toBe("string");
expect(typeof response.reward_params.interval.interval_pool_emission).toBe("string");
expect(typeof response.reward_params.rewarded_set_size).toBe("number");
expect(typeof response.reward_params.active_set_size).toBe("number");
//epoch
expect(typeof response.epoch.id).toBe("number");
expect(typeof response.epoch.epochs_in_interval).toBe("number");
expect(typeof response.epoch.current_epoch_start).toBe("string");
expect(typeof response.epoch.current_epoch_id).toBe("number");
expect(typeof response.epoch.epoch_length.secs).toBe("number");
expect(typeof response.epoch.epoch_length.nanos).toBe("number");
expect(typeof response.epoch.total_elapsed_epochs).toBe("number");
expect(typeof response.as_at).toBe("number");
})
it.skip("Post to compute mixnode reward estimation", async ():Promise<void> => {
const mix_id = config.environmnetConfig.mix_id;
const payload = {"performance": "0.7"}
const response = await status.getMixnodeRewardEstimatedComputation(mix_id, payload);
// TO-DO this test needs calculations to ensure than when passing through different performance values, the reward is also changing as expected
expect(response.estimation.total_node_reward).toContain("986360");
})
it("Get mixnode history using identity key", async (): Promise<void> => {
const identity_key = config.environmnetConfig.identity_key;
const response = await status.getMixnodeHistoryWrong(identity_key);
expect(response).toStrictEqual(404)
});
});
+6 -5
View File
@@ -3,13 +3,14 @@ common:
Accept: application/json
Content-Type: application/json
qa:
api_base_url: https://qa-validator-api.nymtech.net/api/v1
mixnode_identity: DLdMKLPywEy1vnu3yPrtXvzY7fw1puiiHpA9n9UQatiQ
gateway_identity: CgQrYP8etksSBf4nALNqp93SHPpgFwEUyTsjBNNLj5WM
log_level: debug
api_base_url: https://qwerty-validator-api.qa.nymte.ch/api/v1
mix_id: 7
identity_key: 4Yr4qmEHd9sgsuQ83191FR2hD88RfsbMmB4tzhhZWriz
gateway_identity: 336yuXAeGEgedRfqTJZsG2YV7P13QH1bHv1SjCZYarc9
log_level: error
prod:
api_base_url: https://qa-validator-api.nymtech.net/api/v1
mixnode_identity: DLdMKLPywEy1vnu3yPrtXvzY7fw1puiiHpA9n9UQatiQ
gateway_identity: CgQrYP8etksSBf4nALNqp93SHPpgFwEUyTsjBNNLj5WM
log_level: debug
log_level: error
time_zone: utc
@@ -16,13 +16,14 @@ class ConfigHandler {
log_level: TLogLevelName;
time_zone: string;
api_base_url: string;
mixnode_identity: string;
mix_id: number;
identity_key: string;
gateway_identity: string;
};
private constructor() {
this.setCommonConfig();
this.setEnvironmentConfig(process.env.TEST_ENV || "prod");
this.setEnvironmentConfig(process.env.TEST_ENV || "qa");
}
public static getInstance(): ConfigHandler {
@@ -0,0 +1,96 @@
import {
MixnodesDetailed,
AllGateways,
AllMixnodes,
EpochRewardParams,
BlacklistedGateways,
BlacklistedMixnodes,
CurrentEpoch,
Mixnode
} from "../types/ContractCacheTypes";
import { APIClient } from "./abstracts/APIClient";
export default class ContractCache extends APIClient {
constructor() {
super("/");
}
public async getMixnodes(): Promise<AllMixnodes[]> {
const response = await this.restClient.sendGet({
route: `mixnodes`,
});
return response.data;
}
public async getMixnodesDetailed(): Promise<MixnodesDetailed[]> {
const response = await this.restClient.sendGet({
route: `mixnodes/detailed`,
});
return response.data;
}
public async getGateways(): Promise<AllGateways[]> {
const response = await this.restClient.sendGet({
route: `gateways`,
});
return response.data;
}
public async getActiveMixnodes(): Promise<AllMixnodes[]> {
const response = await this.restClient.sendGet({
route: `mixnodes/active`,
});
return response.data;
}
public async getActiveMixnodesDetailed(): Promise<MixnodesDetailed[]> {
const response = await this.restClient.sendGet({
route: `mixnodes/active/detailed`,
});
return response.data;
}
public async getRewardedMixnodes(): Promise<AllMixnodes[]> {
const response = await this.restClient.sendGet({
route: `mixnodes/rewarded`,
});
return response.data;
}
public async getRewardedMixnodesDetailed(): Promise<MixnodesDetailed[]> {
const response = await this.restClient.sendGet({
route: `mixnodes/rewarded/detailed`,
});
return response.data;
}
public async getBlacklistedMixnodes(): Promise<BlacklistedMixnodes[]> {
const response = await this.restClient.sendGet({
route: `mixnodes/blacklisted`,
});
return response.data;
}
public async getBlacklistedGateways(): Promise<BlacklistedGateways[]> {
const response = await this.restClient.sendGet({
route: `gateways/blacklisted`,
});
return response.data;
}
public async getEpochRewardParams(): Promise<EpochRewardParams> {
const response = await this.restClient.sendGet({
route: `epoch/reward_params`
});
return response.data;
}
public async getCurrentEpoch(): Promise<CurrentEpoch> {
const response = await this.restClient.sendGet({
route: `epoch/current`
});
return response.data;
}
}
+52 -93
View File
@@ -1,14 +1,15 @@
import { AxiosResponse } from "axios";
import {
ActiveStatus,
AvgUptime,
CoreCount,
GatewayCoreCount,
EstimatedReward,
RewardEstimation,
InclusionProbability,
NodeHistory,
Report,
StakeSaturation,
} from "../../src/interfaces/StatusInterfaces";
} from "../types/StatusTypes";
import { APIClient } from "./abstracts/APIClient";
export default class Status extends APIClient {
@@ -16,18 +17,12 @@ export default class Status extends APIClient {
super("/status");
}
public async getMixnodeStatusReport(identity_key: string): Promise<Report> {
public async getMixnodeStatusReport(mix_id: number): Promise<Report> {
const response = await this.restClient.sendGet({
route: `/mixnode/${identity_key}/report`,
route: `/mixnode/${mix_id}/report`,
});
return <Report>{
identity: response.data.identity,
owner: response.data.owner,
most_recent: response.data.most_recent,
last_hour: response.data.last_hour,
last_day: response.data.last_day,
};
return response.data;
}
public async getGatewayStatusReport(identity_key: string): Promise<Report> {
@@ -35,13 +30,7 @@ export default class Status extends APIClient {
route: `/gateway/${identity_key}/report`,
});
return <Report>{
identity: response.data.identity,
owner: response.data.owner,
most_recent: response.data.most_recent,
last_hour: response.data.last_hour,
last_day: response.data.last_day,
};
return response.data;
}
public async getGatewayHistory(identity_key: string): Promise<NodeHistory> {
@@ -49,129 +38,99 @@ export default class Status extends APIClient {
route: `/gateway/${identity_key}/history`,
});
return <NodeHistory>{
identity: response.data.identity,
owner: response.data.owner,
history: response.data.history,
};
return response.data;
}
public async getMixnodeHistory(mix_id: number): Promise<NodeHistory> {
const response = await this.restClient.sendGet({
route: `/mixnode/${mix_id}/history`,
});
return response.data;
}
public async getMixnodeStakeSaturation(
identity_key: string
mix_id: number
): Promise<StakeSaturation> {
const response = await this.restClient.sendGet({
route: `/mixnode/${identity_key}/stake-saturation`,
route: `/mixnode/${mix_id}/stake-saturation`,
});
return <StakeSaturation>{
as_at: response.data.as_at,
saturation: response.data.saturation,
};
return response.data;
}
public async getMixnodeCoreCount(identity_key: string): Promise<CoreCount> {
public async getMixnodeCoreCount(mix_id: number): Promise<CoreCount> {
const response = await this.restClient.sendGet({
route: `/mixnode/${identity_key}/core-status-count`,
route: `/mixnode/${mix_id}/core-status-count`,
});
return <CoreCount>{
identity: response.data.identity,
count: response.data.count,
};
return response.data;
}
public async getGatewayCoreCount(identity_key: string): Promise<CoreCount> {
public async getGatewayCoreCount(identity_key: string): Promise<GatewayCoreCount> {
const response = await this.restClient.sendGet({
route: `/gateway/${identity_key}/core-status-count`,
});
return <CoreCount>{
identity: response.data.identity,
count: response.data.count,
};
return response.data;
}
public async getMixnodeRewardComputation(
identity_key: string
): Promise<EstimatedReward> {
mix_id: number
): Promise<RewardEstimation> {
const response = await this.restClient.sendGet({
route: `/mixnode/${identity_key}/reward-estimation`,
route: `/mixnode/${mix_id}/reward-estimation`,
});
return <EstimatedReward>{
estimated_total_node_reward: response.data.estimated_total_node_reward,
estimated_operator_reward: response.data.estimated_operator_reward,
estimated_delegators_reward: response.data.estimated_delegators_reward,
estimated_node_profit: response.data.estimated_node_profit,
estimated_operator_cost: response.data.estimated_operator_cost,
reward_params: response.data.reward_params,
as_at: response.data.as_at,
};
return response.data;
}
public async getMixnodeRewardEstimatedComputation(
identity_key: string
): Promise<EstimatedReward> {
mix_id: number,
payload: object
): Promise<RewardEstimation> {
const response = await this.restClient.sendPost({
route: `/mixnode/${identity_key}/compute-reward-estimation`,
route: `/mixnode/${mix_id}/compute-reward-estimation`,
data: payload
});
return <EstimatedReward>{
estimated_total_node_reward: response.data.estimated_total_node_reward,
estimated_operator_reward: response.data.estimated_operator_reward,
estimated_delegators_reward: response.data.estimated_delegators_reward,
estimated_node_profit: response.data.estimated_node_profit,
estimated_operator_cost: response.data.estimated_operator_cost,
reward_params: response.data.reward_params,
as_at: response.data.as_at,
};
}
public async getMixnodeHistory(identity_key: string): Promise<NodeHistory> {
const response = await this.restClient.sendGet({
route: `/mixnode/${identity_key}/history`,
});
return <NodeHistory>{
identity: response.data.identity,
owner: response.data.owner,
history: response.data.history,
};
return response.data;
}
public async getMixnodeAverageUptime(
identity_key: string
mix_id: number
): Promise<AvgUptime> {
const response = await this.restClient.sendGet({
route: `/mixnode/${identity_key}/avg_uptime`,
route: `/mixnode/${mix_id}/avg_uptime`,
});
return <AvgUptime>{
identity: response.data.identity,
avg_uptime: response.data.avg_uptime,
};
return response.data;
}
public async getMixnodeInclusionProbability(
identity_key: string
mix_id: number
): Promise<InclusionProbability> {
const response = await this.restClient.sendGet({
route: `/mixnode/${identity_key}/inclusion-probability`,
route: `/mixnode/${mix_id}/inclusion-probability`,
});
return <InclusionProbability>{
in_active: response.data.in_active,
in_reserve: response.data.in_reserve,
};
return response.data;
}
public async getMixnodeStatus(identity_key: string): Promise<ActiveStatus> {
public async getMixnodeHistoryWrong(
identity_key: string
): Promise<NodeHistory> {
const response = await this.restClient.sendGet({
route: `/mixnode/${identity_key}/status`,
route: `/status/mixnode/${identity_key}/history`,
});
return response.status;
}
public async getMixnodeStatus(mix_id: number): Promise<ActiveStatus> {
const response = await this.restClient.sendGet({
route: `/mixnode/${mix_id}/status`,
});
return <ActiveStatus>{
status: response.data.status,
};
return response.data;
}
}
@@ -1,72 +0,0 @@
export type Epoch = {
epoch_reward_pool: string;
rewarded_set_size: string;
active_set_size: string;
staking_supply: string;
sybil_resistance_percent: number;
active_set_work_factor: number;
};
export type Node = {
reward_blockstamp: number;
uptime: string;
in_active_set: boolean;
};
export type RewardParams = {
epoch: Epoch;
node: Node;
};
export type EstimatedReward = {
estimated_total_node_reward: number;
estimated_operator_reward: number;
estimated_delegators_reward: number;
estimated_node_profit: number;
estimated_operator_cost: number;
reward_params: RewardParams;
as_at: number;
};
export type StakeSaturation = {
saturation: number;
as_at: number;
};
export type AvgUptime = {
identity: string;
avg_uptime: number;
};
export type InclusionProbability = {
in_active: string;
in_reserve: string;
};
export type Report = {
identity: string;
owner: string;
most_recent: number;
last_hour: number;
last_day: number;
};
export type History = {
date: string;
uptime: number;
};
export type NodeHistory = {
identity: string;
owner: string;
history: History[];
};
export type CoreCount = {
identity: string;
count: number;
};
export type ActiveStatus = {
status: string;
};
@@ -0,0 +1,131 @@
export type AllMixnodes = {
bond_information: BondInformation;
rewarding_details: RewardingDetails;
};
export type BondInformation = {
mix_id: number;
owner: string;
original_pledge: OriginalPledge;
layer: string;
mix_node: Mixnode;
proxy: string;
bonding_height: number;
is_unbonding: boolean;
}
export type RewardingDetails = {
cost_params: CostParams;
operator: string;
delegates: string;
total_unit_reward: string;
unit_delegation: string;
last_rewarded_epoch: number;
unique_delegations: number;
}
export type CostParams = {
profit_margin_percent: string;
interval_operating_cost: IntervalOperatingCost;
}
export type IntervalOperatingCost = {
denom: string;
amount: string;
}
export type OriginalPledge = {
denom: string;
amount: string;
}
export type TotalDelegation = {
denom: string;
amount: string;
};
export type Mixnode = {
host: string;
mix_port: number;
verloc_port: number;
http_api_port: number;
sphinx_key: string;
identity_key: string;
version: string;
};
export type MixnodeBond = {
pledge_amount: OriginalPledge;
total_delegation: TotalDelegation;
owner: string;
layer: string;
block_height: string;
mix_node: Mixnode;
proxy: string;
accumulated_rewards: string;
}
export type MixnodesDetailed = {
mixnode_details: AllMixnodes;
stake_saturation: string;
uncapped_stake_saturation: string;
performance: string;
estimated_operator_apy: string
estimated_delegators_apy: string;
};
export type BlacklistedMixnodes = {
};
export type BlacklistedGateways = {
};
export interface Gateway {
host: string;
mix_port: number;
clients_port: number;
location: string;
sphinx_key: string;
identity_key: string;
version: string;
}
export interface AllGateways {
pledge_amount: OriginalPledge;
owner: string;
block_height: number;
gateway: Gateway;
proxy: string;
}
export type EpochRewardParams = {
interval: Interval;
rewarded_set_size: number;
active_set_size: number;
};
export type Interval = {
reward_pool: string;
staking_supply: string;
staking_supply_scale_factor: string;
epoch_reward_budget: string;
stake_saturation_point: string;
sybil_resistance: string;
active_set_work_factor: string;
interval_pool_emission: string;
}
export type CurrentEpoch = {
id: number;
epochs_in_interval: number;
current_epoch_start: string;
current_epoch_id: number;
epoch_length: EpochLength;
total_elapsed_epochs: number;
};
export type EpochLength = {
secs: number;
nanos: number;
};
@@ -0,0 +1,139 @@
export interface Estimation {
total_node_reward: string;
operator: string;
delegates: string;
operating_cost: string;
}
export interface Interval {
reward_pool: string;
staking_supply: string;
staking_supply_scale_factor: string;
epoch_reward_budget: string;
stake_saturation_point: string;
sybil_resistance: string;
active_set_work_factor: string;
interval_pool_emission: string;
}
export interface RewardParams {
interval: Interval;
rewarded_set_size: number;
active_set_size: number;
}
export interface EpochLength {
secs: number;
nanos: number;
}
export interface Epoch {
id: number;
epochs_in_interval: number;
current_epoch_start: string;
current_epoch_id: number;
epoch_length: EpochLength;
total_elapsed_epochs: number;
}
export interface RewardEstimation {
estimation: Estimation;
reward_params: RewardParams;
epoch: Epoch;
as_at: number;
}
export type EstimatedReward = {
estimated_total_node_reward: number;
estimated_operator_reward: number;
estimated_delegators_reward: number;
estimated_node_profit: number;
estimated_operator_cost: number;
reward_params: RewardParams;
as_at: number;
};
export type StakeSaturation = {
saturation: string;
uncapped_saturation: string;
as_at: number;
};
export type AvgUptime = {
mix_id: number;
avg_uptime: number;
};
export type Report = {
mix_id: number
identity: string;
owner: string;
most_recent: number;
last_hour: number;
last_day: number;
};
export type GatewayReport = {
identity: string;
owner: string;
most_recent: number;
last_hour: number;
last_day: number;
};
export type History = {
date: string;
uptime: number;
};
export type NodeHistory = {
mix_id: number;
identity: string;
owner: string;
history: History[];
};
export type GatewayHistory = {
identity: string;
owner: string;
history: History[];
};
export type CoreCount = {
mix_id: number;
count: number;
};
export type GatewayCoreCount = {
identity: string;
count: number;
};
export type ActiveStatus = {
status: string;
};
export interface InclusionProbabilities {
inclusion_probabilities: InclusionProbability[];
samples: number;
elapsed: Elapsed;
delta_max: number;
delta_l2: number;
as_at: number;
}
export interface InclusionProbability {
mix_id: number;
in_active: number;
in_reserve: number;
}
export interface Elapsed {
secs: number;
nanos: number;
}
export interface SingleInclusionProbability {
in_active: number;
in_reserve: number;
}
+45 -45
View File
@@ -292,7 +292,7 @@
"@eslint/eslintrc@^1.3.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.0.tgz#29f92c30bb3e771e4a2048c95fa6855392dfac4f"
resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz"
integrity sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==
dependencies:
ajv "^6.12.4"
@@ -307,7 +307,7 @@
"@humanwhocodes/config-array@^0.10.4":
version "0.10.4"
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.10.4.tgz#01e7366e57d2ad104feea63e72248f22015c520c"
resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz"
integrity sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==
dependencies:
"@humanwhocodes/object-schema" "^1.2.1"
@@ -316,12 +316,12 @@
"@humanwhocodes/gitignore-to-minimatch@^1.0.2":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz#316b0a63b91c10e53f242efb4ace5c3b34e8728d"
resolved "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz"
integrity sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==
"@humanwhocodes/object-schema@^1.2.1":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45"
resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz"
integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==
"@istanbuljs/load-nyc-config@^1.0.0":
@@ -734,7 +734,7 @@
"@typescript-eslint/parser@^5.33.0":
version "5.33.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.33.0.tgz#26ec3235b74f0667414613727cb98f9b69dc5383"
resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.33.0.tgz"
integrity sha512-cgM5cJrWmrDV2KpvlcSkelTBASAs1mgqq+IUGKJvFxWrapHpaRy5EXPQz9YaKF3nZ8KY18ILTiVpUtbIac86/w==
dependencies:
"@typescript-eslint/scope-manager" "5.33.0"
@@ -799,17 +799,17 @@
acorn-jsx@^5.3.2:
version "5.3.2"
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937"
resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz"
integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==
acorn@^8.8.0:
version "8.8.0"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8"
resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz"
integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==
ajv@^6.10.0, ajv@^6.12.4:
version "6.12.6"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4"
resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz"
integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==
dependencies:
fast-deep-equal "^3.1.1"
@@ -865,7 +865,7 @@ argparse@^1.0.7:
argparse@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz"
integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
array-union@^2.1.0:
@@ -1140,7 +1140,7 @@ dedent@^0.7.0:
deep-is@^0.1.3:
version "0.1.4"
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831"
resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz"
integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==
deepmerge@^4.2.2:
@@ -1172,7 +1172,7 @@ dir-glob@^3.0.1:
doctrine@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961"
resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz"
integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==
dependencies:
esutils "^2.0.2"
@@ -1216,7 +1216,7 @@ escape-string-regexp@^2.0.0:
escape-string-regexp@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz"
integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
eslint-config-prettier@^8.4.0:
@@ -1241,7 +1241,7 @@ eslint-scope@^5.1.1:
eslint-scope@^7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642"
resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz"
integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==
dependencies:
esrecurse "^4.3.0"
@@ -1311,7 +1311,7 @@ eslint@^8.21.0:
espree@^9.3.2, espree@^9.3.3:
version "9.3.3"
resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.3.tgz#2dd37c4162bb05f433ad3c1a52ddf8a49dc08e9d"
resolved "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz"
integrity sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==
dependencies:
acorn "^8.8.0"
@@ -1325,7 +1325,7 @@ esprima@^4.0.0:
esquery@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5"
resolved "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz"
integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==
dependencies:
estraverse "^5.1.0"
@@ -1349,7 +1349,7 @@ estraverse@^5.1.0, estraverse@^5.2.0:
esutils@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz"
integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
execa@^5.0.0:
@@ -1411,7 +1411,7 @@ fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0:
fast-levenshtein@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz"
integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==
fastq@^1.6.0:
@@ -1430,7 +1430,7 @@ fb-watchman@^2.0.0:
file-entry-cache@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027"
resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz"
integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==
dependencies:
flat-cache "^3.0.4"
@@ -1452,7 +1452,7 @@ find-up@^4.0.0, find-up@^4.1.0:
find-up@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc"
resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz"
integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==
dependencies:
locate-path "^6.0.0"
@@ -1460,7 +1460,7 @@ find-up@^5.0.0:
flat-cache@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11"
resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz"
integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==
dependencies:
flatted "^3.1.0"
@@ -1468,7 +1468,7 @@ flat-cache@^3.0.4:
flatted@^3.1.0:
version "3.2.6"
resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.6.tgz#022e9218c637f9f3fc9c35ab9c9193f05add60b2"
resolved "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz"
integrity sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==
follow-redirects@^1.14.9:
@@ -1492,7 +1492,7 @@ fs.realpath@^1.0.0:
fsevents@^2.3.2:
version "2.3.2"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz"
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
function-bind@^1.1.1:
@@ -1534,7 +1534,7 @@ glob-parent@^5.1.2:
glob-parent@^6.0.1:
version "6.0.2"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3"
resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz"
integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==
dependencies:
is-glob "^4.0.3"
@@ -1558,7 +1558,7 @@ globals@^11.1.0:
globals@^13.15.0:
version "13.17.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-13.17.0.tgz#902eb1e680a41da93945adbdcb5a9f361ba69bd4"
resolved "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz"
integrity sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==
dependencies:
type-fest "^0.20.2"
@@ -1582,7 +1582,7 @@ graceful-fs@^4.2.9:
grapheme-splitter@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e"
resolved "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz"
integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==
has-flag@^3.0.0:
@@ -1619,7 +1619,7 @@ ignore@^5.2.0:
import-fresh@^3.0.0, import-fresh@^3.2.1:
version "3.3.0"
resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b"
resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz"
integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==
dependencies:
parent-module "^1.0.0"
@@ -2130,7 +2130,7 @@ js-yaml@^3.13.1:
js-yaml@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz"
integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==
dependencies:
argparse "^2.0.1"
@@ -2147,12 +2147,12 @@ json-parse-even-better-errors@^2.3.0:
json-schema-traverse@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz"
integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
json-stable-stringify-without-jsonify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz"
integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==
json-stringify-safe@5.0.1:
@@ -2177,7 +2177,7 @@ leven@^3.1.0:
levn@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade"
resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz"
integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==
dependencies:
prelude-ls "^1.2.1"
@@ -2197,7 +2197,7 @@ locate-path@^5.0.0:
locate-path@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286"
resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz"
integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==
dependencies:
p-locate "^5.0.0"
@@ -2209,7 +2209,7 @@ lodash.memoize@4.x:
lodash.merge@^4.6.2:
version "4.6.2"
resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz"
integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
lru-cache@^6.0.0:
@@ -2333,7 +2333,7 @@ onetime@^5.1.2:
optionator@^0.9.1:
version "0.9.1"
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499"
resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz"
integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==
dependencies:
deep-is "^0.1.3"
@@ -2366,7 +2366,7 @@ p-locate@^4.1.0:
p-locate@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834"
resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz"
integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==
dependencies:
p-limit "^3.0.2"
@@ -2378,7 +2378,7 @@ p-try@^2.0.0:
parent-module@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2"
resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz"
integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==
dependencies:
callsites "^3.0.0"
@@ -2442,7 +2442,7 @@ pkg-dir@^4.2.0:
prelude-ls@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
prettier-linter-helpers@^1.0.0:
@@ -2482,7 +2482,7 @@ prompts@^2.0.1:
punycode@^2.1.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz"
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
queue-microtask@^1.2.2:
@@ -2514,7 +2514,7 @@ resolve-cwd@^3.0.0:
resolve-from@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz"
integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
resolve-from@^5.0.0:
@@ -2724,7 +2724,7 @@ test-exclude@^6.0.0:
text-table@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz"
integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==
tmpl@1.0.5:
@@ -2779,7 +2779,7 @@ tsutils@^3.21.0:
type-check@^0.4.0, type-check@~0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"
resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz"
integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==
dependencies:
prelude-ls "^1.2.1"
@@ -2791,7 +2791,7 @@ type-detect@4.0.8:
type-fest@^0.20.2:
version "0.20.2"
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4"
resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz"
integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==
type-fest@^0.21.3:
@@ -2801,7 +2801,7 @@ type-fest@^0.21.3:
typescript@^4.7.4:
version "4.7.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235"
resolved "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz"
integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==
update-browserslist-db@^1.0.5:
@@ -2814,7 +2814,7 @@ update-browserslist-db@^1.0.5:
uri-js@^4.2.2:
version "4.4.1"
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e"
resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz"
integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==
dependencies:
punycode "^2.1.0"
@@ -2834,7 +2834,7 @@ uuidv4@^6.2.12:
v8-compile-cache@^2.0.3:
version "2.3.0"
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee"
resolved "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz"
integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==
v8-to-istanbul@^9.0.1:
@@ -2862,7 +2862,7 @@ which@^2.0.1:
word-wrap@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz"
integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==
wrap-ansi@^7.0.0: