diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..8046443 --- /dev/null +++ b/.env.example @@ -0,0 +1,17 @@ +# Path to the secret key of the account that will be used +# to deploy the contracts. +# We're using .keys folder so we don't accidentally commit +# the secret key to the repository. +ODRA_CASPER_LIVENET_SECRET_KEY_PATH=./net-1/faucet/secret_key.pem + +# RPC address of the node that will be used to deploy the contracts. +ODRA_CASPER_LIVENET_NODE_ADDRESS=http://localhost:11101 + +# Chain name of the network. Known values: +# - integration-test +ODRA_CASPER_LIVENET_CHAIN_NAME=casper-net-1 + +# Paths to the secret keys of the additional accounts. +# Main secret key will be 0th account. +ODRA_CASPER_LIVENET_KEY_1=./net-1/faucet/secret_key.pem +ODRA_CASPER_LIVENET_KEY_2=./net-1/faucet/secret_key.pem diff --git a/.github/workflows/update-plantuml-pngs.yaml b/.github/workflows/update-plantuml-pngs.yaml index f78720d..dfb6d62 100644 --- a/.github/workflows/update-plantuml-pngs.yaml +++ b/.github/workflows/update-plantuml-pngs.yaml @@ -13,14 +13,15 @@ jobs: name: plantuml steps: - name: checkout - uses: actions/checkout@v1 + uses: actions/checkout@v4 with: fetch-depth: 1 - - name: plantuml - id: plantuml - uses: grassedge/generate-plantuml-action@v1.5 + + - name: Generate UML diagrams + run: | + docker run --rm -v ${{ github.workspace }}/docs/sequence-diagrams/puml:/workspace plantuml/plantuml -tpng /workspace/*.puml + - name: Update Repo - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "Render PlantUML files" - diff --git a/.gitignore b/.gitignore index 014d22b..13e8a21 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,9 @@ Cargo.lock .builder* /wasm .env -.DS_Store \ No newline at end of file +.env15 +.env20 +.DS_Store +/.idea +casper-name-contracts/wasm +net-1 diff --git a/Cargo.toml b/Cargo.toml index 3dd2bc7..f9ffcbd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,53 +1,19 @@ -[package] -name = "casper-name" -version = "0.1.0" -edition = "2021" - -[dependencies] -odra = { path = "../odra3/odra", features = [], default-features = false } -odra-modules = { path = "../odra3/modules", features = [], default-features = false } -hex = { version = "0.4.3", default-features = false } -odra-casper-livenet-env = { path = "../odra3/odra-casper/livenet-env", optional = true } -serde = { version = "1.0.80", default-features = false } -serde_json = { version = "1.0.99", default-features = false } -serde-json-wasm = { version = "1.0.1", default-features = false } - -[dev-dependencies] -odra-test = { path = "../odra3/odra-test", features = [], default-features = false } -blake2 = "0.10.6" -hex = "0.4.3" - -[build-dependencies] -odra-build = { path = "../odra3/odra-build", features = [], default-features = false } - -[features] -default = [] -livenet = ["odra-casper-livenet-env"] - -[[bin]] -name = "casper_name_build_contract" -path = "bin/build_contract.rs" -test = false - -[[bin]] -name = "casper_name_build_schema" -path = "bin/build_schema.rs" -test = false - -[[bin]] -name = "deploy-example" -path = "bin/deploy_example.rs" -required-features = ["livenet"] -test = false - -[[bin]] -name = "test-schema" -path = "bin/test_schema.rs" -test = false - -[[test]] -name = "test_register" -path = "tests/test_register.rs" +[workspace] +members = [ + "casper-name-cli", + "casper-name-contracts", +] + +resolver = "2" + +[workspace.dependencies] +odra = { version = "2.1.0" } +odra-cli = { version = "2.1.0" } +odra-modules = { version = "2.1.0" } +odra-test = { version = "2.1.0" } +odra-build = { version = "2.1.0" } +odra-bdd = { version = "2.1.0" } +odra-casper-livenet-env = { version = "2.1.0" } [profile.release] codegen-units = 1 diff --git a/NOTES.md b/NOTES.md deleted file mode 100644 index e059ba3..0000000 --- a/NOTES.md +++ /dev/null @@ -1 +0,0 @@ -- No `tokenURI`, as it is not part of the CEP78 standard. In Solidity version it comes from ERC721. diff --git a/Odra.toml b/Odra.toml index 0da852a..32b939a 100644 --- a/Odra.toml +++ b/Odra.toml @@ -1,2 +1,17 @@ [[contracts]] -fqn = "casper_name::register::Register" +fqn = "casper_name_contracts::contracts::registrar::Registrar" + +[[contracts]] +fqn = "casper_name_contracts::contracts::name_token::NameToken" + +[[contracts]] +fqn = "casper_name_contracts::contracts::controller::Controller" + +[[contracts]] +fqn = "casper_name_contracts::contracts::resolver::DefaultResolver" + +[[contracts]] +fqn = "casper_name_contracts::contracts::marketplace::SecondaryMarket" + +[[contracts]] +fqn = "casper_name_contracts::contracts::reverse_resolver::ReverseResolver" diff --git a/README.md b/README.md index f93a599..aa32286 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,25 @@ It's recommended to install [cargo-odra](https://github.com/odradev/cargo-odra) first. +### Prerequisites + +Install wasm-opt tool (it is needed for building contracts) +``` +$ cargo install wasm-opt --locked +``` + +if you run casper node localy (nctl), you need to copy files to have access to the accounts keys from the host +``` +$ docker run --rm -it --name mynctl -d -p 11101:11101 -p 14101:14101 -p 18101:18101 makesoftware/casper-nctl + +$ docker cp mynctl:/home/casper/casper-node/utils/nctl/assets/net-1 . +``` + +Copy example env file and make appropriate adjustments (default values work with nctl) +``` +$ cp .env.example .env +``` + ### Build ``` @@ -16,6 +35,12 @@ The result files will be placed in `${project-root}/wasm` directory. $ cargo odra build -b casper ``` +### Deploy + +``` +$ cargo run -p casper-name-cli deploy +``` + ### Test To run test on your local machine, you can basically execute the command: diff --git a/bin/build_schema.rs b/bin/build_schema.rs deleted file mode 100644 index f66454a..0000000 --- a/bin/build_schema.rs +++ /dev/null @@ -1,69 +0,0 @@ -#![doc = "Binary for building schema definitions from odra contracts."] -#[allow(unused_imports)] -use casper_name; - -#[cfg(not(target_arch = "wasm32"))] -extern "Rust" { - fn module_schema() -> odra::contract_def::ContractBlueprint; - fn casper_contract_schema() -> odra::schema::casper_contract_schema::ContractSchema; -} - -#[cfg(not(target_arch = "wasm32"))] -fn main() { - let module = std::env::var("ODRA_MODULE").expect("ODRA_MODULE environment variable is not set"); - let module = to_snake_case(&module); - - let contract_schema = unsafe { crate::casper_contract_schema() }; - let module_schema = unsafe { crate::module_schema() }; - - write_schema_file( - "resources/casper_contract_schemas", - &module, - contract_schema - .as_json() - .expect("Failed to convert schema to JSON"), - ); - - write_schema_file( - "resources/legacy", - &module, - module_schema - .as_json() - .expect("Failed to convert schema to JSON"), - ); -} - -fn write_schema_file(path: &str, module: &str, json: String) { - if !std::path::Path::new(path).exists() { - std::fs::create_dir_all(path).expect("Failed to create resources directory"); - } - let filename = format!("{}/{}_schema.json", path, module); - let mut schema_file = std::fs::File::create(filename).expect("Failed to create schema file"); - - std::io::Write::write_all(&mut schema_file, &json.into_bytes()) - .expect("Failed to write to schema file"); -} - -fn to_snake_case(s: &str) -> String { - let mut result = String::with_capacity(s.len()); - let mut chars = s.chars().peekable(); - let mut is_first = true; - - while let Some(c) = chars.next() { - if c.is_uppercase() { - if !is_first { - if let Some(next) = chars.peek() { - if next.is_lowercase() { - result.push('_'); - } - } - } - result.push(c.to_lowercase().next().unwrap()); - } else { - result.push(c); - } - is_first = false; - } - - result -} diff --git a/bin/test_schema.rs b/bin/test_schema.rs deleted file mode 100644 index 5fa6724..0000000 --- a/bin/test_schema.rs +++ /dev/null @@ -1,8 +0,0 @@ -use casper_name::register::Register; - -fn main() { - let events = ::event_schemas(); - for event in events { - println!("Event: {:?}", event); - } -} \ No newline at end of file diff --git a/casper-name-cli/Cargo.toml b/casper-name-cli/Cargo.toml new file mode 100644 index 0000000..6a64d2a --- /dev/null +++ b/casper-name-cli/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "casper-name-cli" +version = "0.1.0" +edition = "2021" + +[dependencies] +odra = { workspace = true } +odra-casper-livenet-env = { workspace = true } +odra-cli = { workspace = true } +odra-modules = { workspace = true } +casper-name-contracts = { path = "../casper-name-contracts" } +clap = { version = "4.5.4", features = ["derive"] } +prettycli = "0.1.1" +chrono = { version = "0.4", features = ["serde"] } +serde = { version = "1.0", features = ["derive"] } +serde_derive = { version = "1.0", features = ["default"] } +serde_json = "1.0" +toml = "0.8.13" +blake2 = "0.10.6" +hex = "0.4.3" + +[[bin]] +name = "casper-name-cli" +path = "bin/main.rs" diff --git a/casper-name-cli/bin/main.rs b/casper-name-cli/bin/main.rs new file mode 100644 index 0000000..2a6320b --- /dev/null +++ b/casper-name-cli/bin/main.rs @@ -0,0 +1,3 @@ +pub fn main() { + casper_name_cli::odra_cli::cli(); +} diff --git a/casper-name-cli/src/lib.rs b/casper-name-cli/src/lib.rs new file mode 100644 index 0000000..ff23ae9 --- /dev/null +++ b/casper-name-cli/src/lib.rs @@ -0,0 +1 @@ +pub mod odra_cli; diff --git a/casper-name-cli/src/odra_cli.rs b/casper-name-cli/src/odra_cli.rs new file mode 100644 index 0000000..7494353 --- /dev/null +++ b/casper-name-cli/src/odra_cli.rs @@ -0,0 +1,28 @@ +use casper_name_contracts::contracts::{ + controller::Controller, marketplace::SecondaryMarket, name_token::NameToken, + registrar::Registrar, resolver::DefaultResolver, reverse_resolver::ReverseResolver, +}; +use deploy::DeployScript; +use odra_cli::OdraCli; +use scenario::{CalculateSignature, CalculateTokenHash, RegisterTokenScenario, SetConfigScript}; + +mod deploy; +mod scenario; + +pub fn cli() { + OdraCli::new() + .about("Casper Name Service CLI") + .deploy(DeployScript) + .contract::() + .contract::() + .contract::() + .contract::() + .contract::() + .contract::() + .scenario(SetConfigScript) + .scenario(RegisterTokenScenario) + .scenario(CalculateTokenHash) + .scenario(CalculateSignature) + .build() + .run(); +} diff --git a/casper-name-cli/src/odra_cli/deploy.rs b/casper-name-cli/src/odra_cli/deploy.rs new file mode 100644 index 0000000..7190a15 --- /dev/null +++ b/casper-name-cli/src/odra_cli/deploy.rs @@ -0,0 +1,84 @@ +use casper_name_contracts::contracts::{ + controller::{Controller, ControllerInitArgs}, + marketplace::{SecondaryMarket, SecondaryMarketInitArgs}, + name_token::{NameToken, NameTokenInitArgs}, + registrar::{Registrar, RegistrarInitArgs}, + resolver::{DefaultResolver, DefaultResolverInitArgs}, + reverse_resolver::{ReverseResolver, ReverseResolverInitArgs}, +}; +use odra::host::HostEnv; +use odra::prelude::*; +use odra_cli::{deploy::Error, DeployedContractsContainer, DeployerExt}; + +pub struct DeployScript; + +impl odra_cli::deploy::DeployScript for DeployScript { + fn deploy( + &self, + env: &HostEnv, + container: &mut DeployedContractsContainer, + ) -> Result<(), Error> { + let admin = env.get_account(0); + let token = NameToken::load_or_deploy( + &env, + NameTokenInitArgs { + name: "008_CN".to_string(), + symbol: "008_CN".to_string(), + max_supply: 1_000_000, + }, + container, + 500_000_000_000, + )?; + + _ = DefaultResolver::load_or_deploy( + &env, + DefaultResolverInitArgs { + name_token: token.address(), + }, + container, + 300_000_000_000, + )?; + + let registrar = Registrar::load_or_deploy( + &env, + RegistrarInitArgs { + name_token: token.address(), + }, + container, + 500_000_000_000, + )?; + + _ = Controller::load_or_deploy( + &env, + ControllerInitArgs { + registrar: registrar.address(), + treasury: admin, + signer: env.public_key(&admin), + }, + container, + 500_000_000_000, + )?; + + _ = SecondaryMarket::load_or_deploy( + &env, + SecondaryMarketInitArgs { + signer: env.public_key(&admin), + treasury: admin, + name_token: token.address(), + }, + container, + 500_000_000_000, + )?; + + _ = ReverseResolver::load_or_deploy( + &env, + ReverseResolverInitArgs { + name_token: token.address(), + }, + container, + 300_000_000_000, + )?; + + Ok(()) + } +} diff --git a/casper-name-cli/src/odra_cli/scenario.rs b/casper-name-cli/src/odra_cli/scenario.rs new file mode 100644 index 0000000..c2a3ead --- /dev/null +++ b/casper-name-cli/src/odra_cli/scenario.rs @@ -0,0 +1,224 @@ +use blake2::{digest::VariableOutput, Blake2bVar}; +use casper_name_contracts::{ + contracts::{ + controller::Controller, + marketplace::SecondaryMarket, + name_token::NameToken, + registrar::{Registrar, CONTROLLER_ROLE}, + resolver::DefaultResolver, + }, + data_structures::{NameMintInfo, PaymentVoucher, TokenizationVoucher}, +}; +use odra::{ + casper_types::{ + bytesrepr::{Bytes, ToBytes}, + U512, + }, + host::HostEnv, + prelude::*, + schema::casper_contract_schema::NamedCLType, +}; +use odra_cli::{ + scenario::{Args, Error as ScenarioError, Scenario, ScenarioMetadata}, + CommandArg, ContractProvider, DeployedContractsContainer, +}; +use odra_modules::access::DEFAULT_ADMIN_ROLE; +use std::io::Write; + +const ONE_DAY: u64 = 86400000; +const GRACE_PERIOD: u64 = ONE_DAY * 2; +const EXPIRATION: u64 = ONE_DAY * 365; + +pub struct SetConfigScript; + +impl ScenarioMetadata for SetConfigScript { + const NAME: &'static str = "config"; + const DESCRIPTION: &'static str = "Sets dependencies between contracts"; +} + +impl Scenario for SetConfigScript { + fn run( + &self, + env: &HostEnv, + container: &DeployedContractsContainer, + _args: Args, + ) -> Result<(), ScenarioError> { + let resolver_address = container.contract_ref::(env)?.address(); + let controller_address = container.contract_ref::(env)?.address(); + let marketplace_address = container.contract_ref::(env)?.address(); + + let mut registrar = container.contract_ref::(env)?; + let mut name_token = container.contract_ref::(env)?; + let mut resolver = container.contract_ref::(env)?; + + // Set default resolver. + env.set_gas(20_000_000_000); + name_token.whitelist(env.get_account(0)); + name_token.set_default_resolver(resolver_address); + + // // Whitelist the registrar in the name token. + env.set_gas(20_000_000_000); + name_token.whitelist(registrar.address()); + + // Whitelist controllers in the registrar. + env.set_gas(10_000_000_000); + registrar.grant_role(&CONTROLLER_ROLE, &controller_address); + env.set_gas(10_000_000_000); + registrar.grant_role(&CONTROLLER_ROLE, &marketplace_address); + + // Set the grace period. + env.set_gas(10_000_000_000); + registrar.set_grace_period(GRACE_PERIOD); + + // Set the name token permissions in the resolver. + env.set_gas(10_000_000_000); + resolver.grant_role(&DEFAULT_ADMIN_ROLE, &name_token.address()); + + Ok(()) + } +} + +pub struct RegisterTokenScenario; + +impl ScenarioMetadata for RegisterTokenScenario { + const NAME: &'static str = "register-token"; + const DESCRIPTION: &'static str = "Registers a token"; +} + +impl Scenario for RegisterTokenScenario { + fn run( + &self, + env: &HostEnv, + container: &DeployedContractsContainer, + args: Args, + ) -> Result<(), ScenarioError> { + let owner = args.get_single::
("buyer")?; + let token_validity = to_mills(args.get_single::("token_validity").ok()); + + let token_expiration = now() + token_validity.unwrap_or(EXPIRATION); + let voucher_expiration = now() + ONE_DAY; + let names = vec![NameMintInfo::new( + &args.get_single::("name")?, + owner, + token_expiration, + "", + )]; + let voucher = TokenizationVoucher::new(names, voucher_expiration); + + env.set_gas(10_000_000_000); + container + .contract_ref::(env)? + .controller_register(voucher); + Ok(()) + } + + fn args(&self) -> Vec { + vec![ + CommandArg::new("name", "Name to register", NamedCLType::String).required(), + CommandArg::new("buyer", "Address of the buyer", NamedCLType::Key).required(), + CommandArg::new( + "token_validity", + "Token validity in seconds", + NamedCLType::U64, + ), + ] + } +} + +fn to_mills(seconds: Option) -> Option { + seconds + .map(|s| std::time::Duration::from_secs(s)) + .map(|d| d.as_millis() as u64) +} + +pub struct CalculateTokenHash; + +impl ScenarioMetadata for CalculateTokenHash { + const NAME: &'static str = "token-hash"; + const DESCRIPTION: &'static str = "Calculates the hash of a token"; +} + +impl Scenario for CalculateTokenHash { + fn run( + &self, + _env: &HostEnv, + _container: &DeployedContractsContainer, + args: Args, + ) -> Result<(), ScenarioError> { + let token_name = args.get_single::("token_name")?; + prettycli::info(&blake2b(token_name)); + Ok(()) + } + + fn args(&self) -> Vec { + vec![CommandArg::new("token_name", "Name of the token", NamedCLType::String).required()] + } +} + +pub struct CalculateSignature; + +impl ScenarioMetadata for CalculateSignature { + const NAME: &'static str = "signature"; + const DESCRIPTION: &'static str = "Calculates the signature of a token"; +} + +impl Scenario for CalculateSignature { + fn run( + &self, + env: &HostEnv, + _container: &DeployedContractsContainer, + args: Args, + ) -> Result<(), ScenarioError> { + let admin = env.get_account(0); + + let name = NameMintInfo { + label: args.get_single::("voucher.names.label")?, + owner: args.get_single::
("voucher.names.owner")?, + token_expiration: args.get_single::("voucher.names.token_expiration")?, + asset_uri: args.get_single::("voucher.names.asset_uri")?, + }; + + let voucher = PaymentVoucher::new( + args.get_single::("voucher.payment.amount")?, + args.get_single::("voucher.payment.payment_id")? + .as_str(), + args.get_single::
("voucher.payment.buyer")?, + vec![name], + args.get_single::("voucher.voucher_expiration")?, + ); + + let bytes: Bytes = voucher.to_bytes().unwrap().into(); + let signature = env.sign_message(&bytes, &admin); + + let msg = format!("Signature: {:?}", hex::encode(signature)); + prettycli::info(&msg); + Ok(()) + } + + fn args(&self) -> Vec { + vec![ + CommandArg::new("voucher.payment.buyer", "", NamedCLType::Key).required(), + CommandArg::new("voucher.payment.payment_id", "", NamedCLType::String).required(), + CommandArg::new("voucher.payment.amount", "", NamedCLType::U512).required(), + CommandArg::new("voucher.names.label", "", NamedCLType::String).required(), + CommandArg::new("voucher.names.owner", "", NamedCLType::Key).required(), + CommandArg::new("voucher.names.token_expiration", "", NamedCLType::U64).required(), + CommandArg::new("voucher.voucher_expiration", "", NamedCLType::U64).required(), + CommandArg::new("voucher.names.asset_uri", "", NamedCLType::String).required(), + ] + } +} + +fn now() -> u64 { + chrono::Utc::now().timestamp_millis() as u64 +} + +fn blake2b>(data: T) -> String { + let mut result = [0u8; 32]; + let mut hasher = ::new(32).expect("should create hasher"); + let _ = hasher.write(data.as_ref()); + hasher + .finalize_variable(&mut result) + .expect("should copy hash to the result array"); + hex::encode(result) +} diff --git a/casper-name-contracts/Cargo.toml b/casper-name-contracts/Cargo.toml new file mode 100644 index 0000000..4a3e41c --- /dev/null +++ b/casper-name-contracts/Cargo.toml @@ -0,0 +1,47 @@ +[package] +name = "casper-name-contracts" +version = "0.1.0" +edition = "2021" + +[dependencies] +odra = { workspace = true } +odra-modules = { workspace = true } +hex = { version = "0.4.3", default-features = false } +serde = { version = "1.0.80", default-features = false } +serde-json-wasm = { version = "1.0.1", default-features = false } + +[target.'cfg(not(target_arch = "wasm32"))'.dependencies] +odra-build = { workspace = true } + +[dev-dependencies] +odra-test = { workspace = true } +blake2 = "0.10.6" +hex = "0.4.3" + +[build-dependencies] +odra-build = { workspace = true } + +[[bin]] +name = "casper_name_contracts_build_contract" +path = "bin/build_contract.rs" +test = false + +[[bin]] +name = "casper-name-contracts_build_schema" +path = "bin/build_schema.rs" +test = false + +[[bin]] +name = "structs-as-bytes" +path = "bin/structs_as_bytes.rs" +test = false + +[[bin]] +name = "serialize-structs" +path = "bin/serialize_structs.rs" +test = false + +# [[test]] +# name = "test_register" +# path = "tests/test_register.rs" + diff --git a/bin/build_contract.rs b/casper-name-contracts/bin/build_contract.rs similarity index 84% rename from bin/build_contract.rs rename to casper-name-contracts/bin/build_contract.rs index 612c140..e49a447 100644 --- a/bin/build_contract.rs +++ b/casper-name-contracts/bin/build_contract.rs @@ -2,4 +2,4 @@ #![no_std] #![no_main] #![allow(unused_imports, clippy::single_component_path_imports)] -use casper_name; +use casper_name_contracts; diff --git a/casper-name-contracts/bin/build_schema.rs b/casper-name-contracts/bin/build_schema.rs new file mode 100644 index 0000000..ad89108 --- /dev/null +++ b/casper-name-contracts/bin/build_schema.rs @@ -0,0 +1,19 @@ +#![doc = "Binary for building schema definitions from odra contracts."] +#[allow(unused_imports, clippy::single_component_path_imports)] +use odra_modules; + +#[allow(unused_imports, clippy::single_component_path_imports)] +use casper_name_contracts; + +#[cfg(not(target_arch = "wasm32"))] +extern "Rust" { + fn module_schema() -> odra::contract_def::ContractBlueprint; + fn casper_contract_schema() -> odra::schema::casper_contract_schema::ContractSchema; +} + +#[cfg(not(target_arch = "wasm32"))] +fn main() { + odra_build::schema(unsafe { crate::module_schema() }, unsafe { + crate::casper_contract_schema() + }); +} diff --git a/bin/deploy_example.rs b/casper-name-contracts/bin/deploy_example.rs similarity index 98% rename from bin/deploy_example.rs rename to casper-name-contracts/bin/deploy_example.rs index 27af41f..110ec2a 100644 --- a/bin/deploy_example.rs +++ b/casper-name-contracts/bin/deploy_example.rs @@ -1,6 +1,6 @@ use std::str::FromStr; -use casper_name::register::*; +use casper_name::name_token::*; use odra::host::HostEnv; use odra::{ host::{Deployer, HostRef, HostRefLoader}, diff --git a/casper-name-contracts/bin/serialize_structs.rs b/casper-name-contracts/bin/serialize_structs.rs new file mode 100644 index 0000000..1e61eca --- /dev/null +++ b/casper-name-contracts/bin/serialize_structs.rs @@ -0,0 +1,34 @@ +use casper_name_contracts::data_structures::NameMintInfo; +use odra::{ + casper_types::{bytesrepr::ToBytes, CLTyped}, + prelude::Address, +}; + +pub fn main() { + let names: Vec = vec![NameMintInfo { + label: String::from("my_token_1"), + owner: Address::new( + "account-hash-3a4751fd7ae4ad2060e68667b395f217af21ebb41780ea4ead07b64ce2e33be0", + ) + .unwrap(), + token_expiration: 6401000000000000, + asset_uri: String::from("https://example.com/asset"), + }]; + + println!("Type:\n{:?}\n", Vec::::cl_type()); + + let bytes = names.to_bytes().unwrap(); + println!("Full bytes:\n{}\n", hex::encode(bytes)); + + let bytes = names[0].to_bytes().unwrap(); + println!("Single struct:\n{}\n", hex::encode(bytes)); + + let bytes = names[0].label.to_bytes().unwrap(); + println!("Label:\n{}\n", hex::encode(bytes)); + + let bytes = names[0].owner.to_bytes().unwrap(); + println!("Owner:\n{}\n", hex::encode(bytes)); + + let bytes = names[0].token_expiration.to_bytes().unwrap(); + println!("Token expiration:\n{}\n", hex::encode(bytes)); +} diff --git a/casper-name-contracts/bin/structs_as_bytes.rs b/casper-name-contracts/bin/structs_as_bytes.rs new file mode 100644 index 0000000..eccaa5f --- /dev/null +++ b/casper-name-contracts/bin/structs_as_bytes.rs @@ -0,0 +1,82 @@ +use std::fmt::Debug; + +use casper_name_contracts::data_structures::*; +use odra::{ + casper_types::{bytesrepr::ToBytes, U256, U512}, + prelude::Address, +}; + +pub fn main() { + print_struct(example_payment_info()); + print_struct(example_name_mint_info()); + print_struct(example_payment_voucher()); + print_struct(example_tokenization_voucher()); + print_struct(example_token_renewal_info()); + print_struct(example_renewal_payment_voucher()); + print_struct(example_renewal_voucher()); +} + +fn print_struct(s: T) { + println!("STRUCT:\n{:#?}\n", s); + println!("HEX:\n{}\n\n", hex::encode(s.to_bytes().unwrap())); +} + +fn example_payment_info() -> PaymentInfo { + PaymentInfo { + buyer: Address::new( + "hash-15f4765f54755d38d0b191a01dbc08923f402e5da2251cb6a8a6bfec019ed05e", + ) + .unwrap(), + payment_id: String::from("test-payment-id"), + amount: U512::from(100), + } +} + +fn example_name_mint_info() -> NameMintInfo { + NameMintInfo { + label: String::from("test-label"), + owner: Address::new( + "account-hash-38d0b191a01dbc0892338d0b191a01dbc08923f402e5da2251cb6a8a6bfec019", + ) + .unwrap(), + token_expiration: 123124, + asset_uri: String::from("https://example.com/asset"), + } +} + +fn example_payment_voucher() -> PaymentVoucher { + PaymentVoucher { + payment: example_payment_info(), + names: vec![example_name_mint_info(), example_name_mint_info()], + voucher_expiration: 2435, + } +} + +fn example_tokenization_voucher() -> TokenizationVoucher { + TokenizationVoucher { + names: vec![example_name_mint_info(), example_name_mint_info()], + voucher_expiration: 2435, + } +} + +fn example_token_renewal_info() -> TokenRenewalInfo { + TokenRenewalInfo { + token_id: U256::from(123), + token_expiration: 999999, + } +} + +fn example_renewal_payment_voucher() -> RenewalPaymentVoucher { + RenewalPaymentVoucher { + payment: example_payment_info(), + tokens: vec![example_token_renewal_info(), example_token_renewal_info()], + voucher_expiration: 66666666, + } +} + +fn example_renewal_voucher() -> RenewalVoucher { + RenewalVoucher { + tokens: vec![example_token_renewal_info(), example_token_renewal_info()], + voucher_expiration: 66666666, + } +} diff --git a/casper-name-contracts/bin/test_schema.rs b/casper-name-contracts/bin/test_schema.rs new file mode 100644 index 0000000..7e5ecd9 --- /dev/null +++ b/casper-name-contracts/bin/test_schema.rs @@ -0,0 +1,8 @@ +use casper_name_contracts::contracts::name_token::NameToken; + +fn main() { + let events = ::event_schemas(); + for event in events { + println!("Event: {:?}", event); + } +} diff --git a/build.rs b/casper-name-contracts/build.rs similarity index 100% rename from build.rs rename to casper-name-contracts/build.rs diff --git a/casper-name-contracts/src/contracts/controller.rs b/casper-name-contracts/src/contracts/controller.rs new file mode 100644 index 0000000..80fe48f --- /dev/null +++ b/casper-name-contracts/src/contracts/controller.rs @@ -0,0 +1,551 @@ +use super::registrar::RegistrarContractRef; +use crate::data_structures::{Payment, PaymentVoucher, RenewalPaymentVoucher}; +use odra::{ + casper_types::{ + bytesrepr::{Bytes, ToBytes}, + PublicKey, U512, + }, + prelude::*, +}; +use odra_modules::{ + access::{AccessControl, Role, DEFAULT_ADMIN_ROLE}, + security::Pauseable, +}; + +/// Event with the payment information. +#[odra::event] +pub struct PaymentFulfilled { + payment_id: String, + buyer: Address, + amount: U512, +} + +/// Event emitted when the signer public key is changed. +#[odra::event] +pub struct SignerPublicKeyChanged { + new_signer_public_key: PublicKey, +} + +/// Event emitted when the treasury address is changed. +#[odra::event] +pub struct TreasuryAddressChanged { + new_treasury_address: Address, +} + +/// Controller smart contract. It handles payments and talks to the [Registrar +/// Contract](super::registrar::Registrar). +#[odra::module] +pub struct Controller { + controller: SubModule, + registrar: External, +} + +#[odra::module] +impl Controller { + delegate! { + to self.controller { + fn has_role(&self, role: &Role, address: &Address) -> bool; + fn grant_role(&mut self, role: &Role, address: &Address); + fn revoke_role(&mut self, role: &Role, address: &Address); + fn set_signer_public_key(&mut self, signer: PublicKey); + fn set_treasury(&mut self, treasury: Address); + fn signer_public_key(&self) -> PublicKey; + fn pause(&mut self); + fn unpause(&mut self); + fn is_paused(&self) -> bool; + } + } + + /// Initializes the controller with the registrar contract address, the + /// signer public key and the treasury address. + pub fn init(&mut self, registrar: Address, signer: PublicKey, treasury: Address) { + if !registrar.is_contract() { + self.revert(ControllerError::ContractAddressExpected); + } + self.registrar.set(registrar); + self.controller.init(signer, treasury); + } + + /// Payable. Buys new name tokens. + #[odra(payable)] + pub fn buy(&mut self, voucher: PaymentVoucher, signature: Bytes) { + self.controller.require_not_paused(); + self.controller.process_payment_voucher(&voucher, signature); + self.registrar.controller_register(voucher.into()); + } + + /// Payable. Renews name tokens. + #[odra(payable)] + pub fn renew(&mut self, voucher: RenewalPaymentVoucher, signature: Bytes) { + self.controller.require_not_paused(); + self.controller.process_payment_voucher(&voucher, signature); + self.registrar.controller_prolong(voucher.into()); + } + + /// Payable. Buys new name tokens and renews existing ones. + #[odra(payable)] + pub fn buy_and_renew( + &mut self, + payment_voucher: PaymentVoucher, + payment_signature: Bytes, + renewal_voucher: RenewalPaymentVoucher, + renewal_signature: Bytes, + ) { + self.controller.require_not_paused(); + self.controller + .process_payment_voucher(&payment_voucher, payment_signature); + self.controller + .process_payment_voucher(&renewal_voucher, renewal_signature); + self.registrar + .controller_prolong_and_register(renewal_voucher.into(), payment_voucher.into()); + } + + /// Try to resolve a full domain name to an address. + pub fn resolve(&self, full_domain: String) -> Option
{ + self.registrar.resolve(full_domain) + } +} + +/// Base for all controllers. It handles access control, treasury and signer +/// public key. +#[odra::module( + errors = ControllerError, + events = [PaymentFulfilled, SignerPublicKeyChanged, TreasuryAddressChanged] +)] +pub struct BaseController { + signer_public_key: Var, + treasury: Var
, + access_control: SubModule, + pausable: SubModule, +} + +#[odra::module] +impl BaseController { + delegate! { + to self.access_control { + fn has_role(&self, role: &Role, address: &Address) -> bool; + fn grant_role(&mut self, role: &Role, address: &Address); + fn revoke_role(&mut self, role: &Role, address: &Address); + } + + to self.pausable { + fn is_paused(&self) -> bool; + fn require_not_paused(&self); + } + } +} + +impl BaseController { + /// Initializes the controller. + /// It assigns the deployer as the admin. + pub fn init(&mut self, signer: PublicKey, treasury: Address) { + self.signer_public_key.set(signer); + self.treasury.set(treasury); + + // Setup roles. + let admin = self.env().caller(); + self.access_control + .unchecked_grant_role(&DEFAULT_ADMIN_ROLE, &admin); + } + + /// Temporarily stops the contract. + pub fn pause(&mut self) { + self.assert_caller_is_admin(); + self.pausable.pause(); + } + + /// Returns to normal operation. + pub fn unpause(&mut self) { + self.assert_caller_is_admin(); + self.pausable.unpause(); + } + + /// Admin only. Sets the public key of the signer. + pub fn set_signer_public_key(&mut self, signer: PublicKey) { + self.assert_caller_is_admin(); + self.signer_public_key.set(signer.clone()); + self.env().emit_event(SignerPublicKeyChanged { + new_signer_public_key: signer, + }); + } + + /// Admin only. Sets the treasury address. + pub fn set_treasury(&mut self, treasury: Address) { + self.assert_caller_is_admin(); + self.treasury.set(treasury); + self.env().emit_event(TreasuryAddressChanged { + new_treasury_address: treasury, + }); + } + + /// Returns the public key of the signer. + pub fn signer_public_key(&self) -> PublicKey { + self.signer_public_key.get().unwrap_or_revert(self) + } + + #[inline] + fn assert_caller_is_admin(&self) { + self.access_control + .check_role(&DEFAULT_ADMIN_ROLE, &self.env().caller()); + } + + fn assert_caller_is_buyer(&self, voucher: &P) { + if self.env().caller() != voucher.payment_info().buyer { + self.revert(ControllerError::BuyerMustBeCaller); + } + } + + /// Validate the payment voucher and process the payment. + pub fn process_payment_voucher(&self, voucher: &P, signature: Bytes) { + self.assert_caller_is_buyer(voucher); + self.verify_signature(voucher, &signature); + self.collect_cspr_payment(voucher); + } + + fn collect_cspr_payment(&self, voucher: &P) { + let fee_collector = self + .treasury + .get_or_revert_with(ControllerError::FeeCollectorNotSet); + let payment_info = voucher.payment_info(); + let attached_value = self.env().attached_value(); + if attached_value < payment_info.amount { + self.revert(ControllerError::InsufficientPayment); + } + if attached_value > payment_info.amount { + self.revert(ControllerError::PaymentTooLarge); + } + self.env() + .transfer_tokens(&fee_collector, &payment_info.amount); + self.env().emit_event(PaymentFulfilled { + payment_id: payment_info.payment_id.clone(), + buyer: payment_info.buyer, + amount: payment_info.amount, + }); + } + + fn verify_signature(&self, data: &T, signature: &Bytes) { + let public_key = self.signer_public_key(); + let bytes: Bytes = data.to_bytes().unwrap_or_revert(self).into(); + let verified = self.env().verify_signature(&bytes, signature, &public_key); + if !verified { + self.revert(ControllerError::InvalidSignature); + } + } +} + +/// Controller errors. +#[odra::odra_error] +pub enum ControllerError { + InvalidSignature = 1101, + FeeCollectorNotSet = 1102, + RegistrarNotSet = 1103, + BuyerMustBeCaller = 1104, + InsufficientPayment = 1105, + PaymentTooLarge = 1106, + ContractAddressExpected = 1107, +} + +#[cfg(test)] +mod tests { + use odra::{ + casper_event_standard::EventInstance, + casper_types::U512, + host::{Deployer, HostRef}, + }; + + use crate::{ + contracts::controller::{ + Controller, ControllerInitArgs, SignerPublicKeyChanged, TreasuryAddressChanged, + }, + data_structures::{NameMintInfo, PaymentVoucher, RenewalPaymentVoucher, TokenRenewalInfo}, + test_context::{generate_token_id, TestContext, INIT_TIME, TOKEN_EXPIRATION, TOKEN_NAME}, + }; + + #[test] + fn deploy_fails_if_account_set_as_registrar() { + let env = odra_test::env(); + let signer = env.get_account(10); + let treasury = env.get_account(11); + let result = Controller::try_deploy( + &env, + ControllerInitArgs { + registrar: env.get_account(1), + signer: env.public_key(&signer), + treasury, + }, + ); + assert!(result.is_err()); + } + + #[test] + fn test_controller() { + let mut ctx = TestContext::install_and_setup(); + let (fee_collector, alice) = (ctx.treasury, ctx.alice); + + // Prepare a payment voucher. + let token_expiration = ctx.token_expiration_time(); + let voucher_expiration = ctx.token_expiration_time(); + let amount = U512::from(2000); + + let names = vec![NameMintInfo::new(TOKEN_NAME, alice, token_expiration, "")]; + let voucher = PaymentVoucher::new(amount, "id_1", alice, names, voucher_expiration); + let signature = ctx.sign(&voucher); + + // CSPR balances before the purchase. + let fee_collector_balance = ctx.balance_of(&fee_collector); + let alice_balance = ctx.balance_of(&alice); + + // But the voucher. + ctx.set_caller(alice); + ctx.controller + .with_tokens(amount) + .buy(voucher, signature.clone()); + + // Token was minted. + assert_eq!(ctx.token.balance_of(alice), 1.into()); + + // CSPR balances after the purchase. + assert_eq!( + ctx.balance_of(&fee_collector), + fee_collector_balance + amount + ); + assert_eq!(ctx.balance_of(&alice), alice_balance - amount); + } + + #[test] + fn test_renew() { + let mut ctx = TestContext::install_and_setup(); + let (admin, fee_collector, alice) = (ctx.admin, ctx.treasury, ctx.alice); + ctx.with_name_registered(admin, alice, TOKEN_NAME); + + // Prepare a payment voucher. + let token_expiration = INIT_TIME + 2 * TOKEN_EXPIRATION; + let voucher_expiration = INIT_TIME + TOKEN_EXPIRATION + 100; + let amount = U512::from(2000); + + let names = vec![TokenRenewalInfo::new( + generate_token_id(TOKEN_NAME), + token_expiration, + )]; + let voucher = RenewalPaymentVoucher::new(amount, "id_1", alice, names, voucher_expiration); + let signature = ctx.sign(&voucher); + + // CSPR balances before the purchase. + let fee_collector_balance = ctx.balance_of(&fee_collector); + let alice_balance = ctx.balance_of(&alice); + + ctx.advance_block_time(TOKEN_EXPIRATION + 1); + // But the voucher. + ctx.set_caller(alice); + ctx.controller + .with_tokens(amount) + .renew(voucher, signature.clone()); + + // Token was minted. + assert_eq!(ctx.token.balance_of(alice), 1.into()); + + // CSPR balances after the purchase. + assert_eq!( + ctx.balance_of(&fee_collector), + fee_collector_balance + amount + ); + assert_eq!(ctx.balance_of(&alice), alice_balance - amount); + } + + #[test] + fn test_only_admin_can_pause() { + let mut ctx = TestContext::install_and_setup(); + // Given a contract with an admin and a user. + let (admin, alice) = (ctx.admin, ctx.alice); + + // When a non-admin tries to pause it. + ctx.set_caller(alice); + let result = ctx.controller.try_pause(); + // Then it should fail and the contract should not be paused. + assert!(result.is_err()); + assert!(!ctx.controller.is_paused()); + + // When the admin tries to pause it. + ctx.set_caller(admin); + ctx.controller.pause(); + + // Then the contract should be paused. + assert!(ctx.controller.is_paused()); + } + + #[test] + fn test_only_admin_can_unpause() { + let mut ctx = TestContext::install_and_setup(); + // Given a paused contract. + let (admin, alice) = (ctx.admin, ctx.alice); + ctx.controller.pause(); + assert!(ctx.controller.is_paused()); + + // When a non-admin tries to unpause it. + ctx.set_caller(alice); + let result = ctx.controller.try_unpause(); + // Then it should fail. + assert!(result.is_err()); + assert!(ctx.controller.is_paused()); + + // When the admin tries to unpause it. + ctx.set_caller(admin); + ctx.controller.unpause(); + + // Then the contract should be unpaused. + assert!(!ctx.controller.is_paused()); + } + + #[test] + fn test_buy_require_not_paused() { + let mut ctx = TestContext::install_and_setup(); + // Given a paused contract. + ctx.controller.pause(); + assert!(ctx.controller.is_paused()); + + // When a user tries to buy a name. + ctx.set_caller(ctx.alice); + let voucher = PaymentVoucher::new( + U512::from(2000), + "id_1", + ctx.alice, + vec![NameMintInfo::new( + TOKEN_NAME, + ctx.alice, + ctx.token_expiration_time(), + "", + )], + ctx.token_expiration_time(), + ); + let signature = ctx.sign(&voucher); + let result = ctx.controller.try_buy(voucher, signature); + + // Then it should fail. + assert_eq!( + result, + Err(odra_modules::security::errors::Error::UnpausedRequired.into()) + ); + } + + #[test] + fn test_renew_require_not_paused() { + let mut ctx = TestContext::install_and_setup(); + // Given a paused contract. + ctx.controller.pause(); + assert!(ctx.controller.is_paused()); + + // When a user tries to renew a name. + ctx.set_caller(ctx.alice); + let voucher = RenewalPaymentVoucher::new( + U512::from(2000), + "id_1", + ctx.alice, + vec![TokenRenewalInfo::new( + generate_token_id(TOKEN_NAME), + ctx.token_expiration_time(), + )], + ctx.token_expiration_time(), + ); + let signature = ctx.sign(&voucher); + let result = ctx.controller.try_renew(voucher, signature); + + // Then it should fail. + assert_eq!( + result, + Err(odra_modules::security::errors::Error::UnpausedRequired.into()) + ); + } + + #[test] + fn test_buy_and_renew_require_not_paused() { + let mut ctx = TestContext::install_and_setup(); + // Given a paused contract. + ctx.controller.pause(); + assert!(ctx.controller.is_paused()); + + // When a user tries to buy and renew names. + ctx.set_caller(ctx.alice); + let payment_voucher = PaymentVoucher::new( + U512::from(2000), + "id_1", + ctx.alice, + vec![NameMintInfo::new( + TOKEN_NAME, + ctx.alice, + ctx.token_expiration_time(), + "", + )], + ctx.token_expiration_time(), + ); + let renewal_voucher = RenewalPaymentVoucher::new( + U512::from(2000), + "id_2", + ctx.alice, + vec![TokenRenewalInfo::new( + generate_token_id(TOKEN_NAME), + ctx.token_expiration_time(), + )], + ctx.token_expiration_time(), + ); + let payment_signature = ctx.sign(&payment_voucher); + let renewal_signature = ctx.sign(&renewal_voucher); + let result = ctx.controller.try_buy_and_renew( + payment_voucher, + payment_signature, + renewal_voucher, + renewal_signature, + ); + + // Then it should fail. + assert_eq!( + result, + Err(odra_modules::security::errors::Error::UnpausedRequired.into()) + ); + } + + #[test] + fn test_set_signer_public_key() { + let mut ctx = TestContext::install_and_setup(); + // Given a contract with an admin and a user. + let (admin, user) = (ctx.admin, ctx.alice); + // When the admin sets the signer public key. + ctx.set_caller(admin); + let result = ctx + .controller + .try_set_signer_public_key(ctx.env.public_key(&user)); + // Then it should succeed and emit an event. + assert!(result.is_ok()); + assert!(ctx + .env + .emitted(&ctx.controller, SignerPublicKeyChanged::name())); + + // When a non-admin tries to set the signer public key. + ctx.set_caller(user); + let result = ctx + .controller + .try_set_signer_public_key(ctx.env.public_key(&user)); + // Then it should fail. + assert!(result.is_err()); + } + + #[test] + fn test_set_treasury() { + let mut ctx = TestContext::install_and_setup(); + // Given a contract with an admin and two users. + let (admin, alice, bob) = (ctx.admin, ctx.alice, ctx.bob); + // When the admin sets the treasury address. + ctx.set_caller(admin); + let result = ctx.controller.try_set_treasury(alice); + // Then it should succeed and emit an event. + assert!(result.is_ok()); + assert!(ctx + .env + .emitted(&ctx.controller, TreasuryAddressChanged::name())); + + // When a non-admin tries to set the treasury address. + ctx.set_caller(alice); + let result = ctx.controller.try_set_treasury(bob); + // Then it should fail. + assert!(result.is_err()); + } +} diff --git a/casper-name-contracts/src/contracts/marketplace.rs b/casper-name-contracts/src/contracts/marketplace.rs new file mode 100644 index 0000000..7e416ec --- /dev/null +++ b/casper-name-contracts/src/contracts/marketplace.rs @@ -0,0 +1,81 @@ +use odra::{ + casper_types::{bytesrepr::Bytes, PublicKey}, + prelude::*, +}; +use odra_modules::access::Role; + +use crate::{ + contracts::{controller::ControllerError, token_id::ToTokenId}, + data_structures::SecondarySaleVoucher, +}; + +use super::{controller::BaseController, name_token::NameTokenContractRef}; + +/// Secondary market smart contract. It handles the secondary market operations. +#[odra::module] +pub struct SecondaryMarket { + controller: SubModule, + name_token: External, +} + +#[odra::module] +impl SecondaryMarket { + delegate! { + to self.controller { + fn has_role(&self, role: &Role, address: &Address) -> bool; + fn grant_role(&mut self, role: &Role, address: &Address); + fn revoke_role(&mut self, role: &Role, address: &Address); + fn set_signer_public_key(&mut self, signer: PublicKey); + fn set_treasury(&mut self, treasury: Address); + fn signer_public_key(&self) -> PublicKey; + fn pause(&mut self); + fn unpause(&mut self); + fn is_paused(&self) -> bool; + } + } + + /// Initializes the secondary market with the signer public key, the treasury + /// address and the name token contract address. + pub fn init(&mut self, signer: PublicKey, treasury: Address, name_token: Address) { + if !name_token.is_contract() { + self.revert(ControllerError::ContractAddressExpected); + } + self.controller.init(signer, treasury); + self.name_token.set(name_token); + } + + /// Payable. Buys name tokens from the secondary market. + #[odra(payable)] + pub fn buy(&mut self, voucher: SecondarySaleVoucher, signature: Bytes) { + self.controller.require_not_paused(); + self.controller.process_payment_voucher(&voucher, signature); + for name in voucher.names { + let token_id = self.token_id(name.label); + let to = self.env().caller(); + let from = name.owner; + self.name_token.transfer_from(from, to, token_id); + } + } +} + +#[cfg(test)] +mod tests { + use crate::contracts::marketplace::{SecondaryMarket, SecondaryMarketInitArgs}; + use odra::host::Deployer; + + #[test] + fn deploy_fails_if_account_set_as_name_token() { + let env = odra_test::env(); + let signer = env.get_account(10); + let treasury = env.get_account(11); + let result = SecondaryMarket::try_deploy( + &env, + SecondaryMarketInitArgs { + signer: env.public_key(&signer), + treasury, + name_token: env.get_account(12), // Using an account instead of a contract address + }, + ); + assert!(result.is_err()); + } +} diff --git a/casper-name-contracts/src/contracts/mod.rs b/casper-name-contracts/src/contracts/mod.rs new file mode 100644 index 0000000..592ee33 --- /dev/null +++ b/casper-name-contracts/src/contracts/mod.rs @@ -0,0 +1,8 @@ +pub mod controller; +pub mod marketplace; +pub mod name_token; +pub mod registrar; +pub mod resolver; +pub mod reverse_resolver; +pub mod token_id; +pub(crate) mod utils; diff --git a/casper-name-contracts/src/contracts/name_token.rs b/casper-name-contracts/src/contracts/name_token.rs new file mode 100644 index 0000000..961c956 --- /dev/null +++ b/casper-name-contracts/src/contracts/name_token.rs @@ -0,0 +1,658 @@ +#![allow(unused_variables)] +use crate::data_structures::NameTokenMetadata; +use odra::casper_types::bytesrepr::Bytes; +use odra::casper_types::U256; +use odra::module::Revertible; +use odra::{prelude::*, ContractRef}; +use odra_modules::access::Ownable2Step; +use odra_modules::cep95::{CEP95Interface, Cep95, Error as Cep95Error}; + +use super::resolver::ResolverContractRef; + +/// NameToken contract. It is a CEP95 token with additional functionalities. +#[odra::module(errors = NameTokenError)] +pub struct NameToken { + token: SubModule, + ownable: SubModule, + default_resolver: External, + max_supply: Var, + minted_tokens_count: Var, + whitelist: Mapping, +} + +#[odra::module] +impl NameToken { + delegate! { + to self.token { + fn name(&self) -> String; + fn symbol(&self) -> String; + fn balance_of(&self, owner: Address) -> U256; + fn owner_of(&self, token_id: U256) -> Option
; + fn safe_transfer_from(&mut self, from: Address, to: Address, token_id: U256, data: Option); + fn approve(&mut self, spender: Address, token_id: U256); + fn revoke_approval(&mut self, token_id: U256); + fn approved_for(&self, token_id: U256) -> Option
; + fn approve_for_all(&mut self, operator: Address); + fn revoke_approval_for_all(&mut self, operator: Address); + fn is_approved_for_all(&self, owner: Address, operator: Address) -> bool; + fn token_metadata(&self, token_id: U256) -> Vec<(String, String)>; + } + + to self.ownable { + fn get_owner(&self) -> Address; + fn get_pending_owner(&self) -> Option
; + fn transfer_ownership(&mut self, new_owner: &Address); + fn accept_ownership(&mut self); + fn renounce_ownership(&mut self); + } + } + + /// Initializes CEP95 with the given name and symbol. + pub fn init(&mut self, name: String, symbol: String, max_supply: u64) { + let caller = self.env().caller(); + + self.token.symbol.set(symbol); + self.token.name.set(name); + self.max_supply.set(max_supply); + self.ownable.init(caller); + } + + pub fn token_exists(&self, token_id: U256) -> bool { + self.token.exists(&token_id) + } + + pub fn mint( + &mut self, + recipient: Address, + token_id: U256, + token_metadata: Vec<(String, String)>, + ) { + let caller = self.env().caller(); + self.assert_whitelisted(&caller); + + let minted_tokens_count = self.minted_tokens_count.get_or_default(); + if minted_tokens_count >= self.max_supply.get_or_default() { + self.revert(NameTokenError::TokenSupplyDepleted); + } + if self.token.exists(&token_id) { + self.revert(NameTokenError::InvalidTokenIdentifier); + } + // mint the token + self.token.mint(recipient, token_id, token_metadata); + // increment the minted tokens count + self.minted_tokens_count.set(minted_tokens_count + 1); + } + + pub fn burn(&mut self, token_id: U256) { + let caller = self.env().caller(); + self.assert_whitelisted(&caller); + + // invalidate resolutions if the resolver is the default resolver and update metadata + let mut metadata = self.wrapped_metadata(token_id); + if let Some(resolver) = metadata.resolver().unwrap_or_revert(self) { + if &resolver == self.default_resolver.address() { + self.default_resolver.invalidate_resolutions(token_id); + } + } + metadata.clear_resolver(); + self.set_token_metadata(token_id, metadata.to_vec()); + + // burn the token + self.token.burn(token_id); + } + + pub fn admin_transfer(&mut self, recipient: Address, token_ids: Vec) { + let caller = self.env().caller(); + self.assert_whitelisted(&caller); + + for token_id in token_ids { + if !self.is_token_valid(token_id) { + self.revert(NameTokenError::ExpiredTokenTransfer); + } + + let owner = self + .token + .owner_of(token_id) + .unwrap_or_revert_with(self, Cep95Error::ValueNotSet); + self.token.raw_transfer_from(owner, recipient, token_id); + // if called by an operator + if caller != owner { + self.cleanup(token_id); + } + } + } + + pub fn transfer_from(&mut self, from: Address, to: Address, token_id: U256) { + if !self.is_token_valid(token_id) { + self.revert(NameTokenError::ExpiredTokenTransfer); + } + + let caller = self.env().caller(); + let owner = self + .token + .owner_of(token_id) + .unwrap_or_revert_with(self, Cep95Error::ValueNotSet); + // if called by an operator + self.token.transfer_from(from, to, token_id); + if caller != owner { + self.cleanup(token_id); + } + } + + pub fn set_token_metadata(&mut self, token_id: U256, token_metadata: Vec<(String, String)>) { + let caller = self.env().caller(); + self.assert_whitelisted(&caller); + self.token.set_metadata(token_id, token_metadata); + } + + pub fn resolver(&self, token_id: U256) -> Option
{ + let metadata: NameTokenMetadata = self.wrapped_metadata(token_id); + metadata.resolver().unwrap_or_revert(self) + } + + pub fn set_resolver(&mut self, token_id: U256, resolver: Address) { + if self.token.owner_of(token_id) != Some(self.env().caller()) { + self.revert(NameTokenError::InvalidTokenOwner); + } + let mut metadata: NameTokenMetadata = self.wrapped_metadata(token_id); + metadata.set_resolver(resolver); + self.token.set_metadata(token_id, metadata.to_vec()); + } + + pub fn assert_is_owner(&self, token_id: U256, address: Address) { + let owner = self.token.owner_of(token_id); + if owner != Some(address) { + self.revert(NameTokenError::InvalidTokenOwner); + } + } + + pub fn is_token_valid(&self, token_id: U256) -> bool { + if !self.token.exists(&token_id) { + return false; + } + + let metadata: NameTokenMetadata = self.wrapped_metadata(token_id); + if metadata.expiration() < self.env().get_block_time() { + return false; + } + true + } + + /// Only admin. Set the default resolver. + pub fn set_default_resolver(&mut self, resolver: Address) { + let caller = self.env().caller(); + self.assert_whitelisted(&caller); + if !resolver.is_contract() { + self.revert(NameTokenError::InvalidResolver); + } + self.default_resolver.set(resolver); + } + + /// Get the default resolver. + pub fn get_default_resolver(&self) -> Address { + *self.default_resolver.address() + } + + pub fn whitelist(&mut self, address: Address) { + let caller = self.env().caller(); + self.ownable.assert_owner(&caller); + if self.is_whitelisted(&address) { + self.revert(NameTokenError::WhitelistedAlready); + } + self.whitelist.set(&address, true); + } + + pub fn revoke_whitelist(&mut self, address: Address) { + let caller = self.env().caller(); + self.ownable.assert_owner(&caller); + if !self.is_whitelisted(&address) { + self.revert(NameTokenError::NotWhitelisted); + } + self.whitelist.set(&address, false); + } +} + +impl NameToken { + #[inline] + pub fn wrapped_metadata(&self, token_id: U256) -> NameTokenMetadata { + let metadata = self.token.token_metadata(token_id); + NameTokenMetadata::try_from(metadata).unwrap_or_revert(self) + } + + #[inline] + fn is_whitelisted(&self, address: &Address) -> bool { + self.whitelist.get(address).unwrap_or_default() + } + + #[inline] + fn assert_whitelisted(&self, address: &Address) { + if !self.is_whitelisted(address) { + self.revert(NameTokenError::NotWhitelisted); + } + } + + fn cleanup(&mut self, token_id: U256) { + let mut metadata = self.wrapped_metadata(token_id); + let resolver = metadata.resolver().unwrap_or_revert(self); + let default_resolver_address = *self.default_resolver.address(); + if resolver != Some(default_resolver_address) { + metadata.set_resolver(default_resolver_address); + self.token.set_metadata(token_id, metadata.to_vec()); + } + self.default_resolver.invalidate_resolutions(token_id); + } +} + +#[odra::odra_error] +pub enum NameTokenError { + NotWhitelisted = 1301, + InvalidTokenOwner = 1302, + ExpiredTokenTransfer = 1303, + InvalidTokenIdentifier = 1304, + InvalidResolver = 1305, + TokenSupplyDepleted = 1306, + WhitelistedAlready = 1307, +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::test_context::{generate_token_id, TestContext, INIT_TIME, TOKEN_EXPIRATION}; + + #[test] + fn test_supply_depletion() { + // Given a token with max supply of 10 + let max_supply = 10u64; + let mut ctx = TestContext::install_raw_with_supply(max_supply); + ctx.whitelist_admin_in_name_token(); + let token_hash = "token_hash"; + + for i in 0..max_supply { + // When minting a token + ctx.token.mint(ctx.alice, i.into(), vec![]); + } + // When trying to mint a new token + let result = ctx.token.try_mint(ctx.alice, max_supply.into(), vec![]); + // Then it should fail with TokenSupplyDepleted error + assert_eq!( + result.unwrap_err(), + NameTokenError::TokenSupplyDepleted.into() + ); + } + + #[test] + fn test_token_exists() { + let mut ctx = TestContext::install_raw(); + ctx.whitelist_admin_in_name_token(); + let token_hash = "token_hash"; + let token_id = generate_token_id(token_hash); + // Token should not exist + assert_eq!(ctx.token.token_exists(token_id), false); + + // Mint a token + let token_owner = ctx.alice; + mint_for(&mut ctx, token_owner, token_hash); + // Then the token should exist + assert_eq!(ctx.token.token_exists(token_id), true); + + // Burn the token + whitelist_accounts(&mut ctx, vec![token_owner]); + ctx.set_caller(token_owner); + assert!(try_burn(&mut ctx, token_hash).is_ok()); + // Then the token should not exist anymore + assert_eq!(ctx.token.token_exists(token_id), false); + } + + #[test] + fn owner_cannot_burn_until_whitelisted() { + let mut ctx = TestContext::install_raw(); + ctx.whitelist_admin_in_name_token(); + // Given a token owned by alice + let token_hash = "token_hash"; + let token_id = generate_token_id(token_hash); + let token_owner = ctx.alice; + mint_for(&mut ctx, token_owner, token_hash); + + // Then burning token by the owner fails + ctx.set_caller(token_owner); + let result = try_burn(&mut ctx, token_hash); + assert_eq!(result.err(), Some(NameTokenError::NotWhitelisted.into())); + + // When whitelist the token owner + whitelist_accounts(&mut ctx, vec![token_owner]); + // Then the token owner should be able to burn the token + ctx.set_caller(token_owner); + let result = try_burn(&mut ctx, token_hash); + assert!(result.is_ok()); + } + + #[test] + fn anyone_whitelisted_can_burn() { + let mut ctx = TestContext::install_raw(); + ctx.whitelist_admin_in_name_token(); + let (token_owner, anyone) = (ctx.alice, ctx.anyone); + // Given a token owned by the token owner + let token_hash = "token_hash"; + mint_for(&mut ctx, token_owner, token_hash); + + // Then anyone should not be able to burn the token + ctx.set_caller(anyone); + let result = try_burn(&mut ctx, token_hash); + assert_eq!(result.err(), Some(NameTokenError::NotWhitelisted.into())); + + // When whitelist the anyone account + whitelist_accounts(&mut ctx, vec![anyone]); + // Then the anyone account should be able to burn the token + ctx.set_caller(anyone); + let result = try_burn(&mut ctx, token_hash); + assert!(result.is_ok()); + } + + #[test] + fn burning_burnt_token_should_fail() { + let mut ctx = TestContext::install_raw(); + ctx.whitelist_admin_in_name_token(); + // Given a token owned by alice + let alice = ctx.alice; + let token_hash = "token hash"; + let token_id = generate_token_id(token_hash); + mint_for(&mut ctx, alice, token_hash); + // When whitelist the token owner + whitelist_accounts(&mut ctx, vec![alice]); + assert!(ctx.token.token_exists(token_id)); + ctx.set_caller(alice); + // Then the token owner should be able to burn the token + assert!(try_burn(&mut ctx, token_hash).is_ok()); + // Then burning the token again should fail + assert!(try_burn(&mut ctx, token_hash).is_err()); + } + + #[test] + fn burning_non_existent_token_should_fail() { + let mut ctx = TestContext::install_raw(); + let alice = ctx.alice; + // Given a non existent token + let token_hash = "token hash"; + let token_id = generate_token_id(token_hash); + assert!(!ctx.token.token_exists(token_id)); + + // Then burning the token should fail + whitelist_accounts(&mut ctx, vec![alice]); + ctx.set_caller(alice); + assert!(try_burn(&mut ctx, token_hash).is_err()); + } + + #[test] + fn admin_transfer_of_multiple_tokens_should_work() { + let mut ctx = TestContext::install_raw(); + ctx.whitelist_admin_in_name_token(); + let (alice, bob) = (ctx.alice, ctx.bob); + // Given two tokens owned by alice + let token_hashes = vec!["token_hash1".to_string(), "token_hash2".to_string()]; + let token_ids = token_hashes + .iter() + .map(|token_hash| generate_token_id(token_hash)) + .collect::>(); + mint_for(&mut ctx, alice, &token_hashes[0]); + mint_for(&mut ctx, alice, &token_hashes[1]); + + // When admin transfer the tokens to bob + whitelist_accounts(&mut ctx, vec![alice]); + ctx.set_caller(alice); + ctx.token.admin_transfer(bob, token_ids.clone()); + // Then bob should be the owner of the tokens + assert!(ctx.token.try_assert_is_owner(token_ids[0], bob).is_ok()); + assert!(ctx.token.try_assert_is_owner(token_ids[1], bob).is_ok()); + } + + #[test] + fn admin_transfer_of_multiple_tokens_should_not_work_for_non_whitelisted_account() { + let mut ctx = TestContext::install_raw(); + ctx.whitelist_admin_in_name_token(); + let (alice, bob) = (ctx.alice, ctx.bob); + // Given two tokens owned by alice + let token_hashes = vec!["token_hash1".to_string(), "token_hash2".to_string()]; + let token_ids = token_hashes + .iter() + .map(|token_hash| generate_token_id(token_hash)) + .collect::>(); + mint_for(&mut ctx, alice, &token_hashes[0]); + mint_for(&mut ctx, alice, &token_hashes[1]); + + // When non whitelisted account tries to transfer the tokens + ctx.set_caller(alice); + assert_eq!( + ctx.token.try_admin_transfer(bob, token_ids.clone()), + Err(NameTokenError::NotWhitelisted.into()) + ); + + // Then bob should not be the owner of the tokens + assert!(ctx.token.try_assert_is_owner(token_ids[0], bob).is_err()); + assert!(ctx.token.try_assert_is_owner(token_ids[1], bob).is_err()); + } + + #[test] + fn admin_transfer_of_non_existent_token_should_fail() { + let mut ctx = TestContext::install_raw(); + ctx.whitelist_admin_in_name_token(); + let (alice, bob) = (ctx.alice, ctx.bob); + // Given two tokens owned by alice + let token_hashes = vec![ + "token_hash1".to_string(), + "token_hash2".to_string(), + "token_hash3".to_string(), + ]; + let token_ids = token_hashes + .iter() + .map(|token_hash| generate_token_id(token_hash)) + .collect::>(); + mint_for(&mut ctx, alice, &token_hashes[0]); + mint_for(&mut ctx, alice, &token_hashes[1]); + + // When admin transfer the tokens to bob + whitelist_accounts(&mut ctx, vec![alice]); + ctx.set_caller(alice); + // Then the transfer fails + assert!(ctx + .token + .try_admin_transfer(bob, token_ids.clone()) + .is_err()); + // Then the existing tokens should not be transferred + assert!(ctx.token.try_assert_is_owner(token_ids[0], bob).is_err()); + assert!(ctx.token.try_assert_is_owner(token_ids[1], bob).is_err()); + } + + #[test] + fn only_owner_can_set_resolver() { + let mut ctx = TestContext::install_raw(); + ctx.whitelist_admin_in_name_token(); + let (alice, bob) = (ctx.alice, ctx.bob); + // Given a token owned by alice + let token_hash = "token_hash"; + let token_id = generate_token_id(token_hash); + mint_for(&mut ctx, alice, token_hash); + // Then the token has no resolver + assert_eq!(ctx.token.resolver(token_id), None); + + // When bob tries to set the resolver + let resolver = bob; + ctx.set_caller(bob); + // Then the operation should fail + assert_eq!( + ctx.token.try_set_resolver(token_id, resolver), + Err(NameTokenError::InvalidTokenOwner.into()) + ); + // When alice sets the resolver + ctx.set_caller(alice); + ctx.token.set_resolver(token_id, resolver); + // Then the resolver should be set + assert_eq!(ctx.token.resolver(token_id), Some(resolver)); + } + + #[test] + fn test_is_token_valid() { + let mut ctx = TestContext::install_raw(); + ctx.whitelist_admin_in_name_token(); + let alice = ctx.alice; + + // Given a token with expiration time in furure + let token_hash = "token_hash"; + let token_id = generate_token_id(token_hash); + let expiration = INIT_TIME + 100; + let asset_uri = "https://example.com/asset"; + ctx.set_caller(ctx.admin); + let token_meta_data = + NameTokenMetadata::with_no_resolver(token_hash, expiration, asset_uri); + ctx.token.mint(alice, token_id, token_meta_data.to_vec()); + // Then the token should be valid + assert!(ctx.token.is_token_valid(token_id)); + // When the expiration time is passed + ctx.advance_block_time(expiration + 1); + // Then the token should not be valid + assert!(!ctx.token.is_token_valid(token_id)); + } + + #[test] + fn burnt_token_is_invalid() { + let mut ctx = TestContext::install_raw(); + ctx.whitelist_admin_in_name_token(); + let alice = ctx.alice; + + // Given a token with expiration time in furure + let name = "token hash"; + let token_id = generate_token_id(name); + let expiration = INIT_TIME + 100; + let asset_uri = "https://example.com/asset"; + ctx.set_caller(ctx.admin); + let token_meta_data = NameTokenMetadata::with_no_resolver(name, expiration, asset_uri); + ctx.token.mint(alice, token_id, token_meta_data.to_vec()); + // Then the token should be valid + assert!(ctx.token.is_token_valid(token_id)); + + // When the token is burnt + whitelist_accounts(&mut ctx, vec![alice]); + ctx.set_caller(alice); + assert!(try_burn(&mut ctx, name).is_ok()); + // Then the token should not be valid + assert!(!ctx.token.is_token_valid(token_id)); + } + + #[test] + fn only_whitelisted_user_can_set_default_resolver() { + let mut ctx = TestContext::install_raw(); + + let resolver = + Address::new("hash-7ba9daac84bebee8111c186588f21ebca35550b6cf1244e71768bd871938be6a") + .unwrap(); + assert!(ctx.token.try_set_default_resolver(resolver).is_err()); + + ctx.whitelist_admin_in_name_token(); + assert!(ctx.token.try_set_default_resolver(resolver).is_ok()); + + assert_eq!(ctx.token.get_default_resolver(), resolver); + } + + #[test] + fn transfer_from_operator_resets_resolver() { + let mut ctx = TestContext::install_and_setup(); + let (alice, bob, anyone) = (ctx.alice, ctx.bob, ctx.anyone); + let token_label = "token-label"; + let full_domain = format!("{}.cspr", token_label); + + // Given Alice has a token. + mint_for(&mut ctx, alice, token_label); + + // Alice sets the resolver. + ctx.set_caller(alice); + ctx.default_resolver + .set_resolution(full_domain.clone(), Some(anyone)); + + // Then the resolver points at some address. + assert_eq!( + ctx.default_resolver.resolve(full_domain.clone()), + Some(anyone) + ); + + // Given Alice sets Bob as an operator. + ctx.token.approve_for_all(bob); + + // Then Bob is an operator for Alice. + assert!(ctx.token.is_approved_for_all(alice, bob)); + + // When Bob transfers the token to himself. + let token_id = generate_token_id(token_label); + ctx.set_caller(bob); + ctx.token.transfer_from(alice, bob, token_id); + assert!(ctx.token.try_assert_is_owner(token_id, bob).is_ok()); + + // Then the resolver is reset. + assert_eq!( + ctx.default_resolver.resolve(full_domain), + None, + "Resolver should be reset after transfer from operator" + ); + } + + #[test] + fn test_revoke_whitelist() { + let mut ctx = TestContext::install_raw(); + ctx.whitelist_admin_in_name_token(); + let alice = ctx.alice; + + // Given Alice is whitelisted + whitelist_accounts(&mut ctx, vec![alice]); + + // When admin revokes Alice's whitelist + ctx.set_caller(ctx.admin); + let result = ctx.token.try_revoke_whitelist(alice); + // Then it should succeed + assert!(result.is_ok()); + + // When admin tries to revoke Alice's whitelist again + let result = ctx.token.try_revoke_whitelist(alice); + // Then it should fail with NotWhitelisted error + assert_eq!(result.err(), Some(NameTokenError::NotWhitelisted.into())); + } + + #[test] + fn test_whitelist() { + let mut ctx = TestContext::install_raw(); + ctx.whitelist_admin_in_name_token(); + let alice = ctx.alice; + + // When admin tries to whitelist Alice + ctx.set_caller(ctx.admin); + let result = ctx.token.try_whitelist(alice); + // Then it should succeed + assert!(result.is_ok()); + + // When admin tries to whitelist Alice again + let result = ctx.token.try_whitelist(alice); + // Then it should fail with WhitelistedAlready error + assert_eq!( + result.err(), + Some(NameTokenError::WhitelistedAlready.into()) + ); + } + + fn mint_for(ctx: &mut TestContext, owner: Address, name: &str) -> U256 { + ctx.set_caller(ctx.admin); + let token_metadata = + NameTokenMetadata::with_no_resolver(name, INIT_TIME + TOKEN_EXPIRATION, ""); + let token_id = generate_token_id(name); + ctx.token.mint(owner, token_id, token_metadata.to_vec()); + token_id + } + + fn whitelist_accounts(ctx: &mut TestContext, accounts: Vec
) { + ctx.set_caller(ctx.admin); + for account in accounts { + ctx.token.whitelist(account); + } + } + + fn try_burn(ctx: &mut TestContext, token_hash: &str) -> OdraResult<()> { + let token_id = generate_token_id(token_hash); + ctx.token.try_burn(token_id) + } +} diff --git a/casper-name-contracts/src/contracts/registrar.rs b/casper-name-contracts/src/contracts/registrar.rs new file mode 100644 index 0000000..57a0511 --- /dev/null +++ b/casper-name-contracts/src/contracts/registrar.rs @@ -0,0 +1,997 @@ +use core::ops::DerefMut; +use odra::casper_types::U256; +use odra::module::Revertible; +use odra::prelude::*; +use odra::ContractRef; +use odra_modules::access::{AccessControl, Role, DEFAULT_ADMIN_ROLE}; +use odra_modules::security::Pauseable; + +use crate::{ + contracts::{name_token::NameTokenContractRef, token_id::ToTokenId}, + data_structures::{ + ExpirableVoucher, NameMintInfo, NameTokenMetadata, RenewalVoucher, TokenRenewalInfo, + TokenizationVoucher, + }, +}; + +use super::resolver::ResolverContractRef; +use super::utils; + +pub const CONTROLLER_ROLE: Role = [2u8; 32]; +// Reminting should be possible after 5 days. +const PENDING_DELETE_PERIOD: u64 = 5 * 24 * 60 * 60 * 1000; // 5 days +const MAX_GRACE_PERIOD: u64 = 365 * 24 * 60 * 60 * 1000; // 365 days + +/// Event emitted when the grace period is changed. +#[odra::event] +pub struct GracePeriodChanged { + new_grace_period: u64, +} + +/// Registrar smart contract. It handles the registration and expiration of name tokens. +#[odra::module(errors = RegistrarError, events = [GracePeriodChanged])] +pub struct Registrar { + name_token: External, + access_control: SubModule, + grace_period: Var, + pauseable: SubModule, +} + +#[odra::module] +impl Registrar { + delegate! { + to self.access_control { + fn has_role(&self, role: &Role, address: &Address) -> bool; + fn grant_role(&mut self, role: &Role, address: &Address); + fn revoke_role(&mut self, role: &Role, address: &Address); + } + + to self.pauseable { + fn is_paused(&self) -> bool; + } + } + + /// Initializes the registrar with the name token contract address. + pub fn init(&mut self, name_token: Address) { + if !name_token.is_contract() { + self.revert(RegistrarError::NameTokenIsNotValid); + } + let caller = self.env().caller(); + + // Set NameToken address. + self.name_token.set(name_token); + + // Init grace period to 0. + self.grace_period.set(0); + + // Setup roles. + self.access_control + .unchecked_grant_role(&DEFAULT_ADMIN_ROLE, &caller); + self.access_control + .unchecked_grant_role(&CONTROLLER_ROLE, &caller); + } + + /// Temporarily stops the contract. + pub fn pause(&mut self) { + self.assert_caller_is_admin(); + self.pauseable.pause(); + } + + /// Returns to normal operation. + pub fn unpause(&mut self) { + self.assert_caller_is_admin(); + self.pauseable.unpause(); + } + + /// Returns the grace period. + pub fn grace_period(&self) -> u64 { + self.grace_period.get().unwrap_or_revert(self) + } + + /// Try to resolve a full domain name to an address. + pub fn resolve(&self, full_domain: String) -> Option
{ + let token_name = utils::extract_token_name(&full_domain)?; + let token_id = self.token_id(token_name); + if !self.name_token.is_token_valid(token_id) { + return None; + } + + match self.name_token.resolver(token_id) { + Some(address) => self.resolver(address).resolve(full_domain), + None => None, + } + } + + // Public functions. + + /// Expire a list of tokens if they are expired. + pub fn expire(&mut self, token_ids: Vec) { + self.pauseable.require_not_paused(); + let block_time = self.env().get_block_time(); + let grace_period = self.grace_period(); + for token_id in token_ids { + self.expire_single(token_id, block_time, grace_period); + } + } + + /// Admin only. Sets the grace period. + pub fn set_grace_period(&mut self, period: u64) { + self.assert_caller_is_admin(); + if period > MAX_GRACE_PERIOD { + self.revert(RegistrarError::GracePeriodTooLong); + } + self.grace_period.set(period); + self.env().emit_event(GracePeriodChanged { + new_grace_period: period, + }); + } + + /// Admin only. Transfer ownership of a list of tokens. + pub fn admin_transfer(&mut self, new_owner: Address, token_ids: Vec) { + self.assert_caller_is_admin(); + self.name_token.admin_transfer(new_owner, token_ids); + } + + /// Admin only. Burn a list of tokens. + pub fn admin_burn(&mut self, token_ids: Vec) { + self.assert_caller_is_admin(); + let name_token = self.name_token.deref_mut(); + for id in token_ids { + name_token.burn(id); + } + } + + /// Admin only. Prolong the expiration date of a list of tokens. + pub fn admin_prolong(&mut self, tokens: Vec) { + self.assert_caller_is_admin(); + self.prolong(tokens); + } + + /// Admin only. Register a list of tokens. + pub fn admin_register(&mut self, names: Vec) { + self.assert_caller_is_admin(); + self.register(names); + } + + /// Admin only. Prolong the expiration date of a list of tokens and register a list of tokens. + pub fn admin_prolong_and_register( + &mut self, + renewal_tokens: Vec, + new_tokens: Vec, + ) { + self.assert_caller_is_admin(); + self.prolong(renewal_tokens); + self.register(new_tokens); + } + + /// Controller only. Prolong the expiration date of a list of tokens. + pub fn controller_prolong(&mut self, voucher: RenewalVoucher) { + self.pauseable.require_not_paused(); + self.assert_caller_is_controller(); + self.assert_voucher_not_expired(&voucher); + self.prolong(voucher.tokens); + } + + /// Controller only. Register a list of tokens. + pub fn controller_register(&mut self, voucher: TokenizationVoucher) { + self.pauseable.require_not_paused(); + self.assert_voucher_not_expired(&voucher); + self.assert_caller_is_controller(); + self.register(voucher.names); + } + + /// Controller only. Prolong the expiration date of a list of tokens and register a list of tokens. + pub fn controller_prolong_and_register( + &mut self, + renewal_voucher: RenewalVoucher, + tokenization_voucher: TokenizationVoucher, + ) { + self.pauseable.require_not_paused(); + self.assert_caller_is_controller(); + self.assert_voucher_not_expired(&renewal_voucher); + self.assert_voucher_not_expired(&tokenization_voucher); + self.prolong(renewal_voucher.tokens); + self.register(tokenization_voucher.names); + } +} + +impl Registrar { + fn assert_caller_is_controller(&self) { + self.access_control + .check_role(&CONTROLLER_ROLE, &self.env().caller()); + } + + fn assert_caller_is_admin(&self) { + self.access_control + .check_role(&DEFAULT_ADMIN_ROLE, &self.env().caller()); + } + + fn assert_in_renewal_period(&mut self, expiration: u64) { + let grace_period = self.grace_period(); + let block_time = self.env().get_block_time(); + if block_time > expiration + grace_period { + self.revert(RegistrarError::GracePeriodExpired); + } + } + + fn assert_token_expires_in_future(&self, token_expiration: u64, block_time: u64) { + if token_expiration < block_time { + self.revert(RegistrarError::ExpirationDateInThePast); + } + } + + fn expire_single(&mut self, token_id: U256, block_time: u64, grace_period: u64) { + let metadata = self.wrapped_metadata(token_id); + let token_expiration = metadata.expiration(); + if self.is_token_expired(token_expiration, grace_period, block_time) { + self.name_token.burn(token_id); + } + } + + #[inline] + fn assert_token_expired(&self, token_expiration: u64, block_time: u64) { + let grace_period = self.grace_period(); + if !self.is_token_expired(token_expiration, grace_period, block_time) { + self.revert(RegistrarError::TokenNotExpired); + } + } + + #[inline] + fn assert_voucher_not_expired(&self, voucher: &T) { + let block_time = self.env().get_block_time(); + if voucher.expiration_time() < block_time { + self.revert(RegistrarError::VoucherExpired); + } + } + + #[inline] + fn resolver(&self, address: Address) -> ResolverContractRef { + ResolverContractRef::new(self.env(), address) + } + + #[inline] + fn wrapped_metadata(&self, token_id: U256) -> NameTokenMetadata { + self.name_token + .token_metadata(token_id) + .try_into() + .unwrap_or_revert(self) + } + + #[inline] + fn is_token_expired(&self, token_expiration: u64, grace_period: u64, block_time: u64) -> bool { + block_time > token_expiration + grace_period + PENDING_DELETE_PERIOD + } + + fn prolong(&mut self, tokens: Vec) { + let block_time = self.env().get_block_time(); + for token in tokens { + // verify the new expiration date is in the future + self.assert_token_expires_in_future(token.token_expiration, block_time); + // Compute token hash. + let token_id = token.token_id; + // get the token metadata + let mut metadata = self.wrapped_metadata(token_id); + // check if the time for the renewal does not elapsed + let expiration = metadata.expiration(); + self.assert_in_renewal_period(expiration); + metadata.set_expiration(token.token_expiration); + + self.name_token + .set_token_metadata(token_id, metadata.to_vec()); + } + } + + fn register(&mut self, names: Vec) { + let block_time = self.env().get_block_time(); + for info in names { + self.assert_token_expires_in_future(info.token_expiration, block_time); + if !utils::is_label_valid(&info.label) { + self.revert(RegistrarError::TokenNameIsNotValid); + } + let metadata = NameTokenMetadata::with_resolver( + &info.label, + info.token_expiration, + &info.asset_uri, + self.name_token.get_default_resolver(), + ); + // Compute token hash. + let token_id = self.token_id(info.label); + + // Check if token already exists. + let token_exists = self.name_token.token_exists(token_id); + + // If token exists and is expired and grace period is over, burn it. + if token_exists { + let metadata = self.wrapped_metadata(token_id); + self.assert_token_expired(metadata.expiration(), block_time); + self.name_token.burn(token_id); + } + + // Mint token. + self.name_token + .mint(info.owner, token_id, metadata.to_vec()); + } + } +} + +#[odra::odra_error] +pub enum RegistrarError { + ExpirationDateInThePast = 1201, + TokenNotExpired = 1202, + GracePeriodExpired = 1203, + VoucherExpired = 1204, + TokenDoesNotExist = 1205, + GracePeriodTooLong = 1206, + NameTokenIsNotValid = 1207, + TokenNameIsNotValid = 1208, +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::{ + data_structures::TokenRenewalInfo, + test_context::{ + generate_token_id, TestContext, GRACE_PERIOD, INIT_TIME, TOKEN_EXPIRATION, TOKEN_NAME, + }, + }; + use odra::{ + casper_event_standard::EventInstance, + host::{Deployer, HostRef}, + }; + use odra_modules::{access::errors::Error as AccessControlError, cep95::Burn}; + + #[test] + fn deploy_fails_if_account_set_as_name_token() { + let env = odra_test::env(); + let result = Registrar::try_deploy( + &env, + RegistrarInitArgs { + name_token: env.get_account(1), + }, + ); + assert!(result.is_err()); + } + + #[test] + fn test_admin_can_manage_controller_role() { + let mut ctx = TestContext::install_raw(); + let (env, reg) = (ctx.env, &mut ctx.registrar); + let (admin, alice) = (ctx.admin, ctx.alice); + + // Alice has no role. + assert!(!reg.has_role(&CONTROLLER_ROLE, &alice)); + + // Alice can't grant roles. + env.set_caller(alice); + let result = reg.try_grant_role(&CONTROLLER_ROLE, &alice); + assert_eq!(result.unwrap_err(), AccessControlError::MissingRole.into()); + + // Admin can grant roles. + env.set_caller(admin); + reg.grant_role(&CONTROLLER_ROLE, &alice); + assert!(reg.has_role(&CONTROLLER_ROLE, &alice)); + + // Alice can't revoke roles. + env.set_caller(alice); + let result = reg.try_revoke_role(&CONTROLLER_ROLE, &alice); + assert_eq!(result.unwrap_err(), AccessControlError::MissingRole.into()); + + // Admin can revoke roles. + env.set_caller(admin); + reg.revoke_role(&CONTROLLER_ROLE, &alice); + assert!(!reg.has_role(&CONTROLLER_ROLE, &alice)); + } + + #[test] + fn test_admin_can_manage_grace_period() { + let mut ctx = TestContext::install_raw(); + let (env, reg) = (ctx.env, &mut ctx.registrar); + let (admin, alice) = (ctx.admin, ctx.alice); + + // Given the initial grace period is 0. + assert_eq!(reg.grace_period(), 0); + + // When Admin sets grace period. + env.set_caller(admin); + reg.set_grace_period(100); + + // Then grace period is changed. + assert_eq!(reg.grace_period(), 100); + + // When Alice tries to set grace period. + env.set_caller(alice); + let result = reg.try_set_grace_period(200); + assert_eq!(result, Err(AccessControlError::MissingRole.into())); + + // Then grace period is not changed. + assert_eq!(reg.grace_period(), 100); + } + + #[test] + fn test_grace_period_too_long() { + let mut ctx = TestContext::install_raw(); + let (env, reg) = (ctx.env, &mut ctx.registrar); + let admin = ctx.admin; + + // When Admin sets too long grace period. + env.set_caller(admin); + let result = reg.try_set_grace_period(MAX_GRACE_PERIOD + 1); + + // Then it fails with error. + assert_eq!(result, Err(RegistrarError::GracePeriodTooLong.into())); + } + + #[test] + fn test_set_grace_period_emits_event() { + let mut ctx = TestContext::install_raw(); + let (env, reg) = (ctx.env, &mut ctx.registrar); + let admin = ctx.admin; + + // When Admin sets grace period. + env.set_caller(admin); + reg.set_grace_period(MAX_GRACE_PERIOD); + + // Then the contract emits GracePeriodChanged event. + assert!(env.emitted(reg, GracePeriodChanged::name())); + } + + #[test] + fn register_with_past_expiration_time_fails() { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice) = (ctx.admin, ctx.alice); + + // When Admin try to register with expiration time in past. + let token_expiration = INIT_TIME - 1; + let voucher_expiration = ctx.voucher_expiration_time(); + let result = ctx.try_name_register( + admin, + alice, + TOKEN_NAME, + token_expiration, + voucher_expiration, + ); + + // Then registration fails. + assert_eq!(result, Err(RegistrarError::ExpirationDateInThePast.into())); + } + + #[test] + fn register_with_expired_voucher_fails() { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice) = (ctx.admin, ctx.alice); + + // When Admin try to register with expiration time in past. + let token_expiration = ctx.token_expiration_time(); + let voucher_expiration = INIT_TIME - 1; + let result = ctx.try_name_register( + admin, + alice, + TOKEN_NAME, + token_expiration, + voucher_expiration, + ); + + // Then registration fails. + assert_eq!(result, Err(RegistrarError::VoucherExpired.into())); + } + + #[test] + fn register_invalid_label_fails() { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice) = (ctx.admin, ctx.alice); + let invalid_name = "invalid-label-"; + + // When Admin tries to register an invalid label. + let result = ctx.try_name_register( + admin, + alice, + invalid_name, + ctx.token_expiration_time(), + ctx.voucher_expiration_time(), + ); + + // Then registration fails. + assert_eq!( + result.unwrap_err(), + OdraError::from(RegistrarError::TokenNameIsNotValid) + ); + } + + #[test] + fn test_register_successful_mint() { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice) = (ctx.admin, ctx.alice); + + // When Admin try to register with expiration time in future. + ctx.with_name_registered(admin, alice, TOKEN_NAME); + + // Then token is minted. + ctx.expect_name_is_registered(alice, TOKEN_NAME); + } + + #[test] + fn register_the_same_name_before_expiration() { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice) = (ctx.admin, ctx.alice); + + // Given Alice has a token. + ctx.with_name_registered(admin, alice, TOKEN_NAME); + + // And token not expired. + ctx.advance_block_time(TOKEN_EXPIRATION / 2); + + // When Admin tries to register the same token again. + let result = ctx.try_name_register( + admin, + alice, + TOKEN_NAME, + ctx.token_expiration_time(), + ctx.voucher_expiration_time(), + ); + + // Then registration fails. + assert_eq!(result, Err(RegistrarError::TokenNotExpired.into())); + } + + #[test] + fn register_the_same_name_before_grace_period() { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice) = (ctx.admin, ctx.alice); + + // Given Alice has a token. + ctx.with_name_registered(admin, alice, TOKEN_NAME); + + // And token expired, but within grace period. + ctx.advance_block_time(TOKEN_EXPIRATION + GRACE_PERIOD + PENDING_DELETE_PERIOD - 1); + + // When Admin tries to register the same token again. + let result = ctx.try_name_register( + admin, + alice, + TOKEN_NAME, + ctx.token_expiration_time(), + ctx.voucher_expiration_time(), + ); + + // Then registration fails. + assert_eq!(result, Err(RegistrarError::TokenNotExpired.into())); + } + + #[test] + fn register_the_same_name_after_grace_period() { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice, bob) = (ctx.admin, ctx.alice, ctx.bob); + // Given Alice has a token. + ctx.with_name_registered(admin, alice, TOKEN_NAME); + + // And token expired, and grace period is over. + ctx.advance_block_time(TOKEN_EXPIRATION + GRACE_PERIOD + PENDING_DELETE_PERIOD + 1); + + // When Admin tries to register the same token again. + ctx.with_name_registered(admin, bob, TOKEN_NAME); + + // Then Alice's token is burned. + let event: Burn = ctx.token.get_event(-4).unwrap(); + let expected = Burn { + from: alice, + token_id: generate_token_id(TOKEN_NAME), + }; + assert_eq!(event, expected); + + // And Bob's token is minted. + ctx.expect_name_is_registered(bob, TOKEN_NAME); + } + + #[test] + fn test_token_expiration_after_grace_period() { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice) = (ctx.admin, ctx.alice); + + // Given Alice has a token. + ctx.with_name_registered(admin, alice, TOKEN_NAME); + + // And is after grace period. + ctx.advance_block_time(TOKEN_EXPIRATION + GRACE_PERIOD + PENDING_DELETE_PERIOD + 1); + + // When anyone tries to expire the token. + ctx.with_name_expired(TOKEN_NAME); + + // Then token is burned. + assert_eq!(ctx.token.balance_of(alice), U256::zero()); + } + + #[test] + fn on_expiration_default_resolver_is_invalidated() { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice) = (ctx.admin, ctx.alice); + + let full_domain = format!("{}.cspr", TOKEN_NAME); + + // Given Alice has a token. + ctx.with_name_registered(admin, alice, TOKEN_NAME); + // And a resolution for the token is set. + ctx.set_caller(alice); + ctx.default_resolver + .set_resolution(full_domain.clone(), Some(alice)); + assert_eq!( + ctx.default_resolver.resolve(full_domain.clone()), + Some(alice) + ); + assert_eq!( + ctx.token.resolver(generate_token_id(TOKEN_NAME)), + Some(ctx.default_resolver.address()) + ); + + // And is after grace period. + ctx.advance_block_time(TOKEN_EXPIRATION + GRACE_PERIOD + PENDING_DELETE_PERIOD + 1); + + // When anyone tries to expire the token. + ctx.with_name_expired(TOKEN_NAME); + + // Then the resolution is cleared. + assert_eq!(ctx.default_resolver.resolve(full_domain), None); + } + + #[test] + fn test_multi_tokens_expiration_after_grace_period() { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice) = (ctx.admin, ctx.alice); + let tokens = vec!["t1", "t2", "t3", "t4", "t5"]; + + // Given Alice has 5 tokens. + ctx.with_multi_names_registered(admin, alice, tokens.clone()); + assert_eq!(ctx.token.balance_of(alice), U256::from(5)); + // And is after grace period. + ctx.advance_block_time(TOKEN_EXPIRATION + GRACE_PERIOD + PENDING_DELETE_PERIOD + 1); + + // When anyone tries to expire the tokens. + ctx.with_names_expired(tokens); + + // Then all the tokens are burned. + assert_eq!(ctx.token.balance_of(alice), U256::from(0)); + } + + #[test] + fn test_admin_transfer() { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice, bob) = (ctx.admin, ctx.alice, ctx.bob); + + // Given Alice has a token. + ctx.with_name_registered(admin, alice, TOKEN_NAME); + + ctx.admin_transfer(bob, vec![TOKEN_NAME]); + + // Then Alice's token is transferred to Bob. + assert_eq!(ctx.token.balance_of(alice), U256::from(0)); + assert_eq!(ctx.token.balance_of(bob), U256::from(1)); + } + + #[test] + fn test_admin_transfer_clears_default_resolver() { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice, bob) = (ctx.admin, ctx.alice, ctx.bob); + let full_domain = format!("{}.cspr", TOKEN_NAME); + + // Given Alice has a token. + ctx.with_name_registered(admin, alice, TOKEN_NAME); + + // And a resolution for the token is set + ctx.set_caller(alice); + ctx.default_resolver + .set_resolution(full_domain.clone(), Some(alice)); + assert_eq!( + ctx.default_resolver.resolve(full_domain.clone()), + Some(alice) + ); + assert_eq!( + ctx.token.resolver(generate_token_id(TOKEN_NAME)), + Some(ctx.default_resolver.address()) + ); + + ctx.admin_transfer(bob, vec![TOKEN_NAME]); + + // Then the resolution is cleared. + assert_eq!(ctx.default_resolver.resolve(full_domain), None); + } + + #[test] + fn test_admin_transfer_sets_default_resolver() { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice, bob) = (ctx.admin, ctx.alice, ctx.bob); + + // Given Alice has a token. + ctx.with_name_registered(admin, alice, TOKEN_NAME); + + // And change the resolver + let resolver = + Address::new("hash-7ba9daac84bebee8111c186588f21ebca35550b6cf1244e71768bd871938be6a") + .unwrap(); + ctx.set_caller(alice); + ctx.token + .set_resolver(generate_token_id(TOKEN_NAME), resolver); + + let json = ctx.token.token_metadata(generate_token_id(TOKEN_NAME)); + let actual_resolver = NameTokenMetadata::try_from(json) + .unwrap() + .resolver() + .unwrap(); + assert_eq!(actual_resolver, Some(resolver)); + + ctx.admin_transfer(bob, vec![TOKEN_NAME]); + + // Then the resolution is cleared. + let json = ctx.token.token_metadata(generate_token_id(TOKEN_NAME)); + let actual_resolver = NameTokenMetadata::try_from(json) + .unwrap() + .resolver() + .unwrap(); + assert_eq!(actual_resolver, Some(ctx.token.get_default_resolver())); + } + + #[test] + fn test_admin_burn() { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice) = (ctx.admin, ctx.alice); + + // Given Alice has a token. + ctx.with_name_registered(admin, alice, TOKEN_NAME); + + ctx.admin_burn(vec![TOKEN_NAME]); + + // Then Alice's token is burned. + assert_eq!(ctx.token.balance_of(alice), U256::from(0)); + } + + #[test] + fn test_admin_burn_clears_default_resolver() { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice) = (ctx.admin, ctx.alice); + let full_domain = format!("{}.cspr", TOKEN_NAME); + + // Given Alice has a token. + ctx.with_name_registered(admin, alice, TOKEN_NAME); + + // And a resolution for the token is set + ctx.set_caller(alice); + ctx.default_resolver + .set_resolution(full_domain.clone(), Some(alice)); + assert_eq!( + ctx.default_resolver.resolve(full_domain.clone()), + Some(alice) + ); + assert_eq!( + ctx.token.resolver(generate_token_id(TOKEN_NAME)), + Some(ctx.default_resolver.address()) + ); + + ctx.admin_burn(vec![TOKEN_NAME]); + + // Then the resolution is cleared. + assert_eq!(ctx.default_resolver.resolve(full_domain), None); + } + + #[test] + fn renew_with_expired_voucher_fails() { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice) = (ctx.admin, ctx.alice); + + // Given Alice has a token. + ctx.with_name_registered(admin, alice, TOKEN_NAME); + + // When Admin tries to renew the token. + ctx.set_caller(admin); + + let token_expiration = INIT_TIME + 2 * TOKEN_EXPIRATION; + let voucher_expiration = INIT_TIME + TOKEN_EXPIRATION; + let tokens = vec![TokenRenewalInfo::new( + generate_token_id(TOKEN_NAME), + token_expiration, + )]; + let voucher = RenewalVoucher::new(tokens, voucher_expiration); + ctx.advance_block_time(TOKEN_EXPIRATION + GRACE_PERIOD - 1); + let result = ctx.registrar.try_controller_prolong(voucher); + + // Then registration fails. + assert_eq!(result, Err(RegistrarError::VoucherExpired.into())); + } + + #[test] + fn renew_when_paused_fails() { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice) = (ctx.admin, ctx.alice); + + // Given Alice has a token. + ctx.with_name_registered(admin, alice, TOKEN_NAME); + ctx.set_caller(admin); + ctx.registrar.pause(); + + // When Admin tries to renew the token. + let token_expiration = INIT_TIME + 2 * TOKEN_EXPIRATION; + let voucher_expiration = INIT_TIME + TOKEN_EXPIRATION; + let tokens = vec![TokenRenewalInfo::new( + generate_token_id(TOKEN_NAME), + token_expiration, + )]; + let voucher = RenewalVoucher::new(tokens, voucher_expiration); + let result = ctx.registrar.try_controller_prolong(voucher); + + // Then registration fails. + assert_eq!( + result, + Err(odra_modules::security::errors::Error::UnpausedRequired.into()) + ); + } + + #[test] + fn test_renew() { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice) = (ctx.admin, ctx.alice); + + // Given Alice has a token. + ctx.with_name_registered(admin, alice, TOKEN_NAME); + + ctx.advance_block_time(TOKEN_EXPIRATION + GRACE_PERIOD - 1); + // When Admin tries to renew the token. + let test_token_name = TOKEN_NAME; + let token_expiration = INIT_TIME + 2 * TOKEN_EXPIRATION; + let voucher_expiration = INIT_TIME + TOKEN_EXPIRATION + GRACE_PERIOD; + let tokens = vec![TokenRenewalInfo::new( + generate_token_id(test_token_name), + token_expiration, + )]; + let voucher = RenewalVoucher::new(tokens, voucher_expiration); + ctx.set_caller(admin); + ctx.registrar.controller_prolong(voucher); + + // Then token expiration is updated. + let metadata = ctx.token.token_metadata(generate_token_id(test_token_name)); + let expected = NameTokenMetadata::with_resolver( + TOKEN_NAME, + INIT_TIME + 2 * TOKEN_EXPIRATION, + "", + ctx.default_resolver.address(), + ); + assert_eq!(metadata, expected.to_vec()); + } + + #[test] + fn test_renew_after_grace_period_fails() { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice) = (ctx.admin, ctx.alice); + + // Given Alice has a token. + ctx.with_name_registered(admin, alice, TOKEN_NAME); + + ctx.advance_block_time(TOKEN_EXPIRATION + GRACE_PERIOD + 1); + // When Admin tries to renew the token. + let test_token_name = TOKEN_NAME; + let token_expiration = INIT_TIME + 2 * TOKEN_EXPIRATION; + let voucher_expiration = INIT_TIME + TOKEN_EXPIRATION + GRACE_PERIOD + 1; + let tokens = vec![TokenRenewalInfo::new( + generate_token_id(test_token_name), + token_expiration, + )]; + let voucher = RenewalVoucher::new(tokens, voucher_expiration); + ctx.set_caller(admin); + let result = ctx.registrar.try_controller_prolong(voucher); + + // Then registration fails. + assert_eq!(result, Err(RegistrarError::GracePeriodExpired.into())); + } + + #[test] + fn resolve_with_invalid_domain() { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice) = (ctx.admin, ctx.alice); + let full_domain = "invalid".to_string(); + + // Given Alice has a token. + ctx.with_name_registered(admin, alice, TOKEN_NAME); + + // When anyone tries to resolve an invalid domain. + let result = ctx.registrar.resolve(full_domain); + + // Then the result is None. + assert_eq!(result, None); + } + + #[test] + fn resolve_with_invalid_token() { + let ctx = TestContext::install_and_setup(); + let full_domain = "odra.cspr".to_string(); + + // When anyone tries to resolve an invalid domain. + let result = ctx.registrar.resolve(full_domain); + + // Then the result is None. + assert_eq!(result, None); + } + + #[test] + fn resolve_with_valid_domain() { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice) = (ctx.admin, ctx.alice); + let full_domain = "odra.cspr".to_string(); + + // Given Alice has a token. + ctx.with_name_registered(admin, alice, "odra"); + + ctx.set_caller(alice); + ctx.default_resolver + .set_resolution(full_domain.clone(), Some(alice)); + + // When anyone tries to resolve a valid domain. + let result = ctx.registrar.resolve(full_domain); + + // Then the result is the token owner. + assert_eq!(result, Some(alice)); + } + + #[test] + fn test_controller_register_fails_when_paused() { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice) = (ctx.admin, ctx.alice); + + // Given Alice has a token. + ctx.with_name_registered(admin, alice, TOKEN_NAME); + ctx.set_caller(admin); + ctx.registrar.pause(); + + // When Admin tries to register the token. + let token_expiration = INIT_TIME + 2 * TOKEN_EXPIRATION; + let voucher_expiration = INIT_TIME + TOKEN_EXPIRATION; + let asset_uri = "https://example.com/asset"; + let names = vec![NameMintInfo::new( + TOKEN_NAME, + alice, + token_expiration, + asset_uri, + )]; + let voucher = TokenizationVoucher::new(names, voucher_expiration); + let result = ctx.registrar.try_controller_register(voucher); + + // Then registration fails. + assert_eq!( + result, + Err(odra_modules::security::errors::Error::UnpausedRequired.into()) + ); + } + + #[test] + fn test_controller_register_and_prolong_fails_when_paused() { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice) = (ctx.admin, ctx.alice); + + // Given Alice has a token. + ctx.with_name_registered(admin, alice, TOKEN_NAME); + ctx.set_caller(admin); + ctx.registrar.pause(); + + // When Admin tries to register the token. + let token_expiration = INIT_TIME + 2 * TOKEN_EXPIRATION; + let voucher_expiration = INIT_TIME + TOKEN_EXPIRATION; + let asset_uri = "https://example.com/asset"; + let names = vec![NameMintInfo::new( + TOKEN_NAME, + alice, + token_expiration, + asset_uri, + )]; + let tokens = vec![TokenRenewalInfo::new( + generate_token_id(TOKEN_NAME), + token_expiration, + )]; + let renewal_voucher = RenewalVoucher::new(tokens, voucher_expiration); + let voucher = TokenizationVoucher::new(names, voucher_expiration); + let result = ctx + .registrar + .try_controller_prolong_and_register(renewal_voucher, voucher); + + // Then registration fails. + assert_eq!( + result, + Err(odra_modules::security::errors::Error::UnpausedRequired.into()) + ); + } +} diff --git a/casper-name-contracts/src/contracts/resolver.rs b/casper-name-contracts/src/contracts/resolver.rs new file mode 100644 index 0000000..d624f3f --- /dev/null +++ b/casper-name-contracts/src/contracts/resolver.rs @@ -0,0 +1,473 @@ +use odra::{casper_types::U256, prelude::*}; +use odra_modules::access::{AccessControl, Role, DEFAULT_ADMIN_ROLE}; + +use super::{name_token::NameTokenContractRef, token_id::ToTokenId, utils}; + +#[odra::external_contract] +pub trait Resolver { + fn init(&mut self, name_token: Address); + fn set_name_token(&mut self, name_token: Address); + fn set_resolution(&mut self, full_domain: Domain, address: Option
); + fn resolve(&self, full_domain: Domain) -> Option
; + fn invalidate_resolutions(&mut self, token_id: TokenId); +} + +type Nonce = u32; +type Domain = String; +type TokenId = U256; + +/// Event emitted when a resolution is changed. +#[odra::event] +pub struct ResolutionChanged { + full_domain: String, + address: Option
, +} + +/// Event emitted when a resolution is cleared. +#[odra::event] +pub struct ResolutionCleared { + token_id: U256, +} + +/// Event emitted when the name token address is changed. +#[odra::event] +pub struct NameTokenAddressChanged { + new_name_token: Address, +} + +/// Default Resolver smart contract. It handles the resolution of domain names to addresses. +#[odra::module( + errors = ResolverError, + events = [ResolutionChanged, ResolutionCleared, NameTokenAddressChanged] +)] +pub struct DefaultResolver { + access_control: SubModule, + name_token: External, + nonces: Mapping, + resolutions: Mapping<(TokenId, String, Nonce), Option
>, +} + +#[odra::module] +impl DefaultResolver { + delegate! { + to self.access_control { + fn has_role(&self, role: &Role, address: &Address) -> bool; + fn grant_role(&mut self, role: &Role, address: &Address); + fn revoke_role(&mut self, role: &Role, address: &Address); + } + } + + /// Initializes the default resolver with the name token contract address. + /// The caller is granted the admin role. + pub fn init(&mut self, name_token: Address) { + if !name_token.is_contract() { + self.revert(ResolverError::InvalidTokenName); + } + self.name_token.set(name_token); + + let admin = self.env().caller(); + self.access_control + .unchecked_grant_role(&DEFAULT_ADMIN_ROLE, &admin); + } + + /// Admin only. Sets the name token contract address. + pub fn set_name_token(&mut self, name_token: Address) { + if !name_token.is_contract() { + self.revert(ResolverError::InvalidTokenName); + } + if !self.has_role(&DEFAULT_ADMIN_ROLE, &self.env().caller()) { + self.env() + .revert(ResolverError::UnauthorizedTokenAddressUpdate); + } + self.name_token.set(name_token); + self.env().emit_event(NameTokenAddressChanged { + new_name_token: name_token, + }); + } + + /// Token owner only. Sets the resolution for a domain to an address. + pub fn set_resolution(&mut self, full_domain: Domain, address: Option
) { + let env = self.env(); + let token_id = self + .extract_token_id(&full_domain) + .unwrap_or_revert_with(self, ResolverError::InvalidDomain); + let caller = env.caller(); + + if !self.name_token.is_token_valid(token_id) { + env.revert(ResolverError::ResolutionSetWithInvalidToken); + } + + if self.owner_of(token_id) != Some(caller) { + env.revert(ResolverError::ResolutionSetByInvalidOwner); + } + + if !utils::is_domain_valid(&full_domain) { + env.revert(ResolverError::InvalidSubdomainFormat); + } + + let nonce = self.nonce(&token_id); + self.resolutions + .set(&(token_id, full_domain.clone(), nonce), address); + + env.emit_event(ResolutionChanged { + full_domain, + address, + }); + } + + /// Resolves a domain to an address. + pub fn resolve(&self, full_domain: Domain) -> Option
{ + let token_id = self.extract_token_id(&full_domain)?; + let nonce = self.nonce(&token_id); + + self.resolutions + .get(&(token_id, full_domain, nonce)) + .flatten() + } + + /// Invalidates all the resolutions for a token. Only the token owner or the admin can do this. + pub fn invalidate_resolutions(&mut self, token_id: TokenId) { + let env = self.env(); + let caller = env.caller(); + + if !self.has_role(&DEFAULT_ADMIN_ROLE, &caller) && self.owner_of(token_id) != Some(caller) { + self.env().revert(ResolverError::UnauthorizedInvalidation); + } + self.nonces.add(&token_id, 1); + + env.emit_event(ResolutionCleared { token_id }); + } + + #[inline] + fn extract_token_id(&self, full_domain: &str) -> Option { + let token_name = utils::extract_token_name(&full_domain)?; + Some(self.token_id(token_name)) + } + + #[inline] + fn nonce(&self, token_id: &TokenId) -> Nonce { + self.nonces.get_or_default(token_id) + } + + #[inline] + fn owner_of(&self, token_id: TokenId) -> Option
{ + self.name_token.owner_of(token_id) + } +} + +#[odra::odra_error] +pub enum ResolverError { + ResolutionSetWithInvalidToken = 1401, + ResolutionSetByInvalidOwner = 1402, + UnauthorizedInvalidation = 1403, + UnauthorizedTokenAddressUpdate = 1404, + InvalidDomain = 1405, + InvalidSubdomainFormat = 1406, + InvalidTokenName = 1407, +} + +#[cfg(test)] +mod tests { + use odra::{casper_event_standard::EventInstance, host::Deployer}; + + use super::*; + use crate::test_context::{generate_token_id, TestContext, TOKEN_EXPIRATION}; + + const TOKEN_NAME: &str = "odra"; + const NON_EXISTENT_TOKEN_DOMAIN: &str = "odra2.cspr"; + const NON_CSPR_DOMAIN: &str = "odra.com"; + const MAIN_DOMAIN: &str = "odra.cspr"; + const SUBDOMAIN: &str = "docs.odra.cspr"; + const INVALID_SUBDOMAIN: &str = "-docs.odra.cspr"; + + #[test] + fn deploy_fails_if_account_set_as_name_token() { + let env = odra_test::env(); + let result = DefaultResolver::try_deploy( + &env, + DefaultResolverInitArgs { + name_token: env.get_account(1), + }, + ); + assert!(result.is_err()); + } + + #[test] + fn deployer_is_admin() { + // Given the contract is deployed + let (ctx, admin, _, _) = setup(); + // Then the deployer is the admin + assert!(ctx.default_resolver.has_role(&DEFAULT_ADMIN_ROLE, &admin)); + } + + #[test] + fn only_admin_can_set_name_token() { + let (mut ctx, admin, alice, _) = setup(); + let contract_address = ctx.controller.address(); + + // When alice tries to set the name token + ctx.set_caller(alice); + // Then the operation fails + assert!(ctx + .default_resolver + .try_set_name_token(contract_address) + .is_err()); + + // When the admin sets the name token + ctx.set_caller(admin); + // Then the operation succeeds + assert!(ctx + .default_resolver + .try_set_name_token(contract_address) + .is_ok()); + } + + #[test] + fn name_token_must_be_a_contract() { + let (mut ctx, admin, alice, _) = setup(); + + // When the admin tries to set a non-contract address as the name token + ctx.set_caller(admin); + let result = ctx.default_resolver.try_set_name_token(alice); + // Then the operation fails + assert_eq!(result, Err(ResolverError::InvalidTokenName.into())); + } + + #[test] + fn set_name_token_emits_event() { + let (mut ctx, admin, _, _) = setup(); + let name_token = ctx.token.address(); + + // When the admin updates the name token address. + ctx.set_caller(admin); + ctx.default_resolver.set_name_token(name_token); + // Then the event is emitted. + assert!(ctx + .env + .emitted(&ctx.default_resolver, NameTokenAddressChanged::name())) + } + + #[test] + fn anyone_can_resolve() { + let (mut ctx, _, alice, bob) = setup(); + + // When alice sets the resolution for the main domain + set_resolution_with_caller(&mut ctx, MAIN_DOMAIN, alice, alice); + // Then alice can resolve the main domain + assert_eq!( + resolve_with_caller(&mut ctx, MAIN_DOMAIN, alice), + Some(alice) + ); + // And bob can also resolve the main domain + assert_eq!(resolve_with_caller(&mut ctx, MAIN_DOMAIN, bob), Some(alice)); + } + + #[test] + fn only_owner_can_set_resolution() { + let (mut ctx, admin, alice, bob) = setup(); + + // When alice sets the resolution for the main domain + ctx.set_caller(alice); + // Then the operation succeeds + assert!(try_set_resolution(&mut ctx, MAIN_DOMAIN, alice).is_ok()); + + // When admin sets the resolution for the main domain + ctx.set_caller(admin); + // Then the operation fails + assert_eq!( + try_set_resolution(&mut ctx, MAIN_DOMAIN, admin).err(), + Some(ResolverError::ResolutionSetByInvalidOwner.into()) + ); + // When bob sets the resolution for the main domain + ctx.set_caller(bob); + // Then the operation fails + assert_eq!( + try_set_resolution(&mut ctx, MAIN_DOMAIN, bob).err(), + Some(ResolverError::ResolutionSetByInvalidOwner.into()) + ); + } + + #[test] + fn cannot_set_resolution_with_non_existent_token() { + let (mut ctx, _, alice, _) = setup(); + + // When alice tries to set the resolution for a non-existent token + ctx.set_caller(alice); + let result = try_set_resolution(&mut ctx, NON_EXISTENT_TOKEN_DOMAIN, alice); + // Then the operation fails + assert_eq!( + result, + Err(ResolverError::ResolutionSetWithInvalidToken.into()) + ); + } + + #[test] + fn cannot_set_resolution_with_expired_token() { + // Given the token has expired + let (mut ctx, _, alice, _) = setup(); + ctx.advance_block_time(TOKEN_EXPIRATION + 1); + + // When alice tries to set the resolution + ctx.set_caller(alice); + let result = try_set_resolution(&mut ctx, SUBDOMAIN, alice); + // Then the operation fails + assert_eq!( + result, + Err(ResolverError::ResolutionSetWithInvalidToken.into()) + ); + } + + #[test] + fn cannot_set_resolution_with_non_cspr_domain() { + let (mut ctx, _, alice, _) = setup(); + // When alice tries to set the resolution for a non-cspr domain + ctx.set_caller(alice); + let result = try_set_resolution(&mut ctx, NON_CSPR_DOMAIN, alice); + // Then the operation fails + assert_eq!(result, Err(ResolverError::InvalidDomain.into())); + } + + #[test] + fn cannot_set_resolution_with_burned_token() { + // Given the token has been burned + let (mut ctx, admin, alice, _) = setup(); + ctx.set_caller(admin); + ctx.token.burn(generate_token_id(TOKEN_NAME)); + // When alice tries to set the resolution + ctx.set_caller(alice); + let result = try_set_resolution(&mut ctx, SUBDOMAIN, alice); + // Then the operation fails + assert_eq!( + result, + Err(ResolverError::ResolutionSetWithInvalidToken.into()) + ); + } + + #[test] + fn set_resolution_for_invalid_subdomain_format() { + let (mut ctx, _, alice, _) = setup(); + + // When alice tries to set the resolution for an invalid subdomain format + ctx.set_caller(alice); + let result = try_set_resolution(&mut ctx, INVALID_SUBDOMAIN, alice); + // Then the operation fails + assert_eq!(result, Err(ResolverError::InvalidSubdomainFormat.into())); + } + + #[test] + fn invalidate_erases_subdomains() { + let (mut ctx, _, alice, bob) = setup(); + + // When alice sets the resolution for the main domain and a subdomain + ctx.set_caller(alice); + set_resolution(&mut ctx, MAIN_DOMAIN, alice); + set_resolution(&mut ctx, SUBDOMAIN, bob); + + // Then both resolutions are set + assert_eq!(resolve(&ctx, MAIN_DOMAIN), Some(alice)); + assert_eq!(resolve(&ctx, SUBDOMAIN), Some(bob)); + + // When alice cleans up the token's resolutions + invalidate(&mut ctx, TOKEN_NAME); + + // Then both resolutions are erased + assert_eq!(resolve(&ctx, MAIN_DOMAIN), None); + assert_eq!(resolve(&ctx, SUBDOMAIN), None); + } + + #[test] + fn admin_can_invalidate_any_token() { + let (mut ctx, admin, alice, bob) = setup(); + + // When alice sets the resolution for the main domain and a subdomain + ctx.set_caller(alice); + set_resolution(&mut ctx, MAIN_DOMAIN, alice); + set_resolution(&mut ctx, SUBDOMAIN, bob); + + // Then both resolutions are set + assert_eq!(resolve(&ctx, MAIN_DOMAIN), Some(alice)); + assert_eq!(resolve(&ctx, SUBDOMAIN), Some(bob)); + + // When the admin cleans up alice's token's resolutions + invalidate_with_caller(&mut ctx, TOKEN_NAME, admin); + + // Then both resolutions are erased + assert_eq!(resolve(&ctx, MAIN_DOMAIN), None); + assert_eq!(resolve(&ctx, SUBDOMAIN), None); + } + + #[test] + fn only_owner_or_admin_can_invalidate() { + let (mut ctx, _, alice, bob) = setup(); + + // When alice sets the resolution for the main domain and a subdomain + ctx.set_caller(alice); + set_resolution(&mut ctx, MAIN_DOMAIN, alice); + set_resolution(&mut ctx, SUBDOMAIN, bob); + + // Then both resolutions are set + assert_eq!(resolve(&ctx, MAIN_DOMAIN), Some(alice)); + assert_eq!(resolve(&ctx, SUBDOMAIN), Some(bob)); + + // When bob tries to clean up alice's token's resolutions + ctx.set_caller(bob); + let result = try_invalidate(&mut ctx, TOKEN_NAME); + // Then the operation fails + assert_eq!(result, Err(ResolverError::UnauthorizedInvalidation.into())); + } + + fn setup() -> (TestContext, Address, Address, Address) { + let mut ctx = TestContext::install_and_setup(); + let (admin, alice, bob) = (ctx.admin, ctx.alice, ctx.bob); + + ctx.with_name_registered(admin, alice, TOKEN_NAME); + (ctx, admin, alice, bob) + } + + fn set_resolution(ctx: &mut TestContext, domain: &str, address: Address) { + ctx.default_resolver + .set_resolution(domain.to_string(), Some(address)); + } + + fn try_set_resolution(ctx: &mut TestContext, domain: &str, address: Address) -> OdraResult<()> { + ctx.default_resolver + .try_set_resolution(domain.to_string(), Some(address)) + } + + fn set_resolution_with_caller( + ctx: &mut TestContext, + domain: &str, + address: Address, + caller: Address, + ) { + ctx.set_caller(caller); + set_resolution(ctx, domain, address); + } + + fn resolve(ctx: &TestContext, domain: &str) -> Option
{ + ctx.default_resolver.resolve(domain.to_string()) + } + + fn resolve_with_caller( + ctx: &mut TestContext, + domain: &str, + caller: Address, + ) -> Option
{ + ctx.set_caller(caller); + resolve(ctx, domain) + } + + fn invalidate(ctx: &mut TestContext, token_name: &str) { + try_invalidate(ctx, token_name).unwrap(); + } + + fn invalidate_with_caller(ctx: &mut TestContext, token_name: &str, caller: Address) { + ctx.set_caller(caller); + invalidate(ctx, token_name); + } + + fn try_invalidate(ctx: &mut TestContext, token_name: &str) -> OdraResult<()> { + ctx.default_resolver + .try_invalidate_resolutions(generate_token_id(token_name)) + } +} diff --git a/casper-name-contracts/src/contracts/reverse_resolver.rs b/casper-name-contracts/src/contracts/reverse_resolver.rs new file mode 100644 index 0000000..26d61ad --- /dev/null +++ b/casper-name-contracts/src/contracts/reverse_resolver.rs @@ -0,0 +1,268 @@ +use crate::contracts::{ + name_token::NameTokenContractRef, resolver::ResolverContractRef, token_id::ToTokenId, utils, +}; +use odra::{prelude::*, ContractRef}; + +#[odra::odra_error] +enum Error { + InvalidTokenName = 1500, + ResolutionForPrimaryNameNotFound = 1501, + InvalidResolutionAddress = 1502, +} + +/// Reverse Resolver contract. It resolves primary names to addresses. +#[odra::module(events = [PrimaryNameChanged], errors = Error)] +pub struct ReverseResolver { + primary_names: Mapping>, + name_token: External, +} + +#[odra::module] +impl ReverseResolver { + pub fn init(&mut self, name_token: Address) { + if !name_token.is_contract() { + self.revert(Error::InvalidTokenName); + } + self.name_token.set(name_token); + } + + /// Sets the primary preferred reverse resolution address for the caller. + pub fn set_primary_name(&mut self, primary_name: String) { + // Load currently set primary name. + let caller = self.env().caller(); + let current_primary_name = self.get_primary_name(&caller); + + match self.existing_resolution(&primary_name) { + Some(address) => { + if address != caller { + // If the resolution exists but is not for the caller, revert. + self.revert(Error::InvalidResolutionAddress); + } + } + None => { + self.revert(Error::ResolutionForPrimaryNameNotFound); + } + }; + + if current_primary_name.as_ref() == Some(&primary_name) { + // If the primary name is the same, do nothing. + return; + } + + // Update primary name. + self.primary_names.set(&caller, Some(primary_name.clone())); + + // Emit event. + self.env().emit_event(PrimaryNameChanged { + address: caller, + old_primary_name: current_primary_name, + new_primary_name: Some(primary_name), + }); + } + + /// Returns the primary name for the address. + pub fn get_primary_name(&self, address: &Address) -> Option { + let primary_name = self.primary_names.get(address).flatten()?; + // Check if the primary name resolves to the given address. + // If a resolver was cleaned up, it might not resolve anymore. + let resolved_address = self.existing_resolution(&primary_name)?; + if resolved_address == *address { + Some(primary_name) + } else { + None + } + } + + fn existing_resolution(&self, name: &str) -> Option
{ + let token_name = utils::extract_token_name(name)?; + let token_id = self.token_id(token_name); + let resolver_address = self.name_token.resolver(token_id)?; + ResolverContractRef::new(self.env(), resolver_address).resolve(name.to_owned()) + } +} + +/// Event emitted when the primary name of an address changes. +#[odra::event] +pub struct PrimaryNameChanged { + pub address: Address, + pub old_primary_name: Option, + pub new_primary_name: Option, +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::test_context::{self, TestContext}; + use odra::host::Deployer; + + const TOKEN_TEST: &str = "test"; + const TOKEN_TEST2: &str = "test2"; + const DOMAIN_TEST: &str = "test.cspr"; + const DOMAIN_TEST2: &str = "test2.cspr"; + + #[test] + fn test_set_primary_name() { + let mut ctx = TestContext::install_and_setup(); + let (admin, user) = (ctx.admin, ctx.alice); + + let mut reverse_resolver = ReverseResolver::deploy( + &ctx.env, + ReverseResolverInitArgs { + name_token: ctx.token.address(), + }, + ); + + ctx.with_name_registered(admin, user, TOKEN_TEST); + ctx.with_name_registered(admin, user, TOKEN_TEST2); + + ctx.set_caller(user); + ctx.default_resolver + .set_resolution(DOMAIN_TEST.to_string(), Some(user)); + ctx.default_resolver + .set_resolution(DOMAIN_TEST2.to_string(), Some(user)); + + // It should have no primary name. + assert_eq!(reverse_resolver.get_primary_name(&user), None); + + // Set primary name. + reverse_resolver.set_primary_name(DOMAIN_TEST.to_string()); + + // It should have the primary name. + assert_eq!( + reverse_resolver.get_primary_name(&user), + Some(DOMAIN_TEST.to_string()) + ); + + // Set new primary name. + reverse_resolver.set_primary_name(DOMAIN_TEST2.to_string()); + + // It should have the new primary name. + assert_eq!( + reverse_resolver.get_primary_name(&user), + Some(DOMAIN_TEST2.to_string()) + ); + } + + #[test] + fn test_set_same_primary_name() { + let mut ctx = TestContext::install_and_setup(); + let (admin, user) = (ctx.admin, ctx.alice); + + let mut reverse_resolver = ReverseResolver::deploy( + &ctx.env, + ReverseResolverInitArgs { + name_token: ctx.token.address(), + }, + ); + + ctx.with_name_registered(admin, user, TOKEN_TEST); + ctx.with_name_registered(admin, user, TOKEN_TEST2); + + ctx.set_caller(user); + ctx.default_resolver + .set_resolution(DOMAIN_TEST.to_string(), Some(user)); + ctx.default_resolver + .set_resolution(DOMAIN_TEST2.to_string(), Some(user)); + + // Set primary name. + ctx.set_caller(user); + reverse_resolver.set_primary_name(DOMAIN_TEST.to_string()); + + // Set a different primary name. + ctx.set_caller(user); + reverse_resolver.set_primary_name(DOMAIN_TEST2.to_string()); + + // Set the same primary name again. + ctx.set_caller(user); + reverse_resolver.set_primary_name(DOMAIN_TEST2.to_string()); + + // The contract should not emit an event for the same primary name. + assert_eq!(ctx.events_count(&reverse_resolver), 2); + } + + #[test] + fn test_set_name_assigned_to_someone_else() { + let (mut ctx, mut reverse_resolver) = setup(); + let (admin, user) = (ctx.admin, ctx.alice); + + ctx.with_name_registered(admin, user, TOKEN_TEST); + + ctx.set_caller(user); + ctx.default_resolver + .set_resolution(DOMAIN_TEST.to_string(), Some(admin)); + + // Set primary name. + let result = reverse_resolver.try_set_primary_name(DOMAIN_TEST.to_string()); + assert_eq!(result.unwrap_err(), Error::InvalidResolutionAddress.into()); + } + + #[test] + fn test_set_not_existing_name() { + let (mut ctx, mut reverse_resolver) = setup(); + let (admin, user) = (ctx.admin, ctx.alice); + + ctx.with_name_registered(admin, user, TOKEN_TEST); + + // Set primary name. + ctx.set_caller(user); + let result = reverse_resolver.try_set_primary_name(DOMAIN_TEST.to_string()); + assert_eq!( + result.unwrap_err(), + Error::ResolutionForPrimaryNameNotFound.into() + ); + } + + #[test] + fn test_get_primary_name() { + let (mut ctx, mut reverse_resolver) = setup(); + let (admin, user) = (ctx.admin, ctx.alice); + ctx.with_name_registered(admin, user, TOKEN_TEST); + + ctx.set_caller(user); + ctx.default_resolver + .set_resolution(DOMAIN_TEST.to_string(), Some(user)); + + assert_eq!(reverse_resolver.get_primary_name(&user), None); + + reverse_resolver.set_primary_name(DOMAIN_TEST.to_string()); + assert_eq!( + reverse_resolver.get_primary_name(&user), + Some(DOMAIN_TEST.to_string()) + ); + } + + #[test] + fn test_get_primary_name_invalidated_by_resolver() { + let (mut ctx, mut reverse_resolver) = setup(); + let (admin, user) = (ctx.admin, ctx.alice); + ctx.with_name_registered(admin, user, TOKEN_TEST); + + ctx.set_caller(user); + ctx.default_resolver + .set_resolution(DOMAIN_TEST.to_string(), Some(user)); + + reverse_resolver.set_primary_name(DOMAIN_TEST.to_string()); + assert_eq!( + reverse_resolver.get_primary_name(&user), + Some(DOMAIN_TEST.to_string()) + ); + + // Simulate a resolver cleanup by removing the resolution. + ctx.default_resolver + .invalidate_resolutions(test_context::generate_token_id(TOKEN_TEST)); + + // The primary name should no longer be valid. + assert_eq!(reverse_resolver.get_primary_name(&user), None); + } + + fn setup() -> (TestContext, ReverseResolverHostRef) { + let ctx = TestContext::install_and_setup(); + let reverse_resolver = ReverseResolver::deploy( + &ctx.env, + ReverseResolverInitArgs { + name_token: ctx.token.address(), + }, + ); + (ctx, reverse_resolver) + } +} diff --git a/casper-name-contracts/src/contracts/token_id.rs b/casper-name-contracts/src/contracts/token_id.rs new file mode 100644 index 0000000..a610ad6 --- /dev/null +++ b/casper-name-contracts/src/contracts/token_id.rs @@ -0,0 +1,16 @@ +use odra::{casper_types::U256, prelude::*}; + +pub trait ToTokenId { + /// Converts the label to a token ID. + fn token_id(&self, label: String) -> U256; +} + +impl ToTokenId for T +where + T: Module, +{ + fn token_id(&self, label: String) -> U256 { + let hash = self.env().hash(label); + U256::from(hash) + } +} diff --git a/casper-name-contracts/src/contracts/utils.rs b/casper-name-contracts/src/contracts/utils.rs new file mode 100644 index 0000000..947f8f2 --- /dev/null +++ b/casper-name-contracts/src/contracts/utils.rs @@ -0,0 +1,144 @@ +use odra::prelude::*; + +const CSPR_DOMAIN: &str = ".cspr"; +const SUBDOMAIN_SEPARATOR: &str = "."; + +/// Extract the token name from a full domain. +pub fn extract_token_name(full_domain: &str) -> Option { + if full_domain.ends_with(CSPR_DOMAIN) { + let token_name = full_domain.trim_end_matches(CSPR_DOMAIN); + token_name.split('.').last().map(|s| s.to_string()) + } else { + None + } +} + +/// Return `true` if byte `b` is ASCII letter or digit. +#[inline(always)] +const fn is_alnum(b: u8) -> bool { + (b >= b'0' && b <= b'9') || (b >= b'a' && b <= b'z') || (b >= b'A' && b <= b'Z') +} + +/// Validate a single DNS label under RFC 952/1123 (LDH rule). +/// +/// * **length** 1–63 bytes +/// * **characters** ASCII letters, digits, or `-` +/// * **first/last** must be alphanumeric +/// +/// Returns `true` for valid labels. +#[inline] +fn is_valid_dns_label(label: &str) -> bool { + let bytes = label.as_bytes(); + let len = bytes.len(); + + if len == 0 || len > 63 { + return false; + } + + // first & last char must be alnum + if !is_alnum(bytes[0]) || !is_alnum(bytes[len - 1]) { + return false; + } + + // interior chars: alnum or hyphen + let mut i = 1; + while i < len - 1 { + let b = bytes[i]; + if !is_alnum(b) && b != b'-' { + return false; + } + i += 1; + } + true +} + +/// Validate a full domain with subdomains. +/// The domain must end with `.cspr` and each subdomain must be a valid DNS label. +pub fn is_domain_valid(full_domain: &str) -> bool { + if full_domain.ends_with(CSPR_DOMAIN) { + let token_name = full_domain.trim_end_matches(CSPR_DOMAIN); + token_name + .split(SUBDOMAIN_SEPARATOR) + .map(is_valid_dns_label) + .all(|valid| valid) + } else { + false + } +} + +/// Validate a label for use in a Casper token name. +/// A valid label must be a valid DNS label, not equal to "cspr", and +/// must not contain any subdomains (i.e., no `.` character). +pub fn is_label_valid(label: &str) -> bool { + is_valid_dns_label(label) && label != "cspr" && !label.contains('.') +} + +#[cfg(test)] +mod t { + #[test] + fn test_extract_token_name() { + let full_domain = "odra.cspr"; + let token_name = super::extract_token_name(full_domain).unwrap(); + assert_eq!(token_name, "odra"); + + let full_domain = "aaa.odra.cspr"; + let token_name = super::extract_token_name(full_domain).unwrap(); + assert_eq!(token_name, "odra"); + + let full_domain = "ss.aaa.odra.cspr"; + let token_name = super::extract_token_name(full_domain).unwrap(); + assert_eq!(token_name, "odra"); + + let full_domain = "aaa.odra.csp"; + let token_name = super::extract_token_name(full_domain); + assert_eq!(token_name, None); + } + + #[test] + fn test_is_valid_dns_label() { + assert!(super::is_valid_dns_label("valid-label")); + assert!(!super::is_valid_dns_label("-invalid-start")); + assert!(!super::is_valid_dns_label("invalid-end-")); + assert!(!super::is_valid_dns_label("invalid_char@")); + assert!(!super::is_valid_dns_label( + "too-long-label-abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz" + )); + assert!(super::is_valid_dns_label("valid123")); + } + + #[test] + fn test_is_domain_valid() { + let full_domain = "odra.cspr"; + assert!(super::is_domain_valid(full_domain)); + + let full_domain = "aaa.odra.cspr"; + assert!(super::is_domain_valid(full_domain)); + + let full_domain = "ss.aaa.odra.cspr"; + assert!(super::is_domain_valid(full_domain)); + + let full_domain = "invalid-label-.cspr"; + assert!(!super::is_domain_valid(full_domain)); + + let full_domain = "invalid-label@.cspr"; + assert!(!super::is_domain_valid(full_domain)); + + let full_domain = + "too-long-label-abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz.cspr"; + assert!(!super::is_domain_valid(full_domain)); + + let full_domain = "valid123.cspr"; + assert!(super::is_domain_valid(full_domain)); + } + + #[test] + fn test_is_label_valid() { + assert!(super::is_label_valid("valid-label")); + assert!(!super::is_label_valid("-invalid-start")); + assert!(!super::is_label_valid("invalid-end-")); + assert!(!super::is_label_valid("invalid_char@")); + assert!(!super::is_label_valid("cspr")); + assert!(!super::is_label_valid("invalid.label")); + assert!(super::is_label_valid("valid123")); + } +} diff --git a/casper-name-contracts/src/data_structures.rs b/casper-name-contracts/src/data_structures.rs new file mode 100644 index 0000000..e0ae578 --- /dev/null +++ b/casper-name-contracts/src/data_structures.rs @@ -0,0 +1,385 @@ +use odra::{ + casper_types::{U256, U512}, + prelude::*, +}; +use serde::{Deserialize, Serialize}; + +/// Errors that can occur while working with name tokens. +#[odra::odra_error] +#[derive(Debug)] +pub enum NameTokenError { + EmptyTLD = 1001, + TLDNotSupported = 1002, + PastExpirationDate = 1003, + EmptyLabel = 1004, + SLDDoesNotExist = 1005, + SerializationError = 1006, + DeserializationError = 1007, + InvalidMetadata = 1008, +} + +/// Metadata associated with a name token. +#[derive(PartialEq, Debug, Clone, Serialize, Deserialize)] +pub struct NameTokenMetadata { + name: String, + expiration: u64, + resolver: Option
, + asset_uri: String, +} + +impl NameTokenMetadata { + pub fn with_resolver(name: &str, expiration: u64, asset_uri: &str, resolver: Address) -> Self { + Self { + name: String::from(name), + expiration, + resolver: Some(resolver), + asset_uri: String::from(asset_uri), + } + } + + pub fn with_no_resolver(name: &str, expiration: u64, asset_uri: &str) -> Self { + Self { + name: String::from(name), + expiration, + resolver: None, + asset_uri: String::from(asset_uri), + } + } + + pub fn set_resolver(&mut self, resolver: Address) { + self.resolver = Some(resolver); + } + + pub fn resolver(&self) -> OdraResult> { + Ok(self.resolver) + } + + pub fn clear_resolver(&mut self) { + self.resolver = None; + } + + pub fn json(&self) -> String { + serde_json_wasm::to_string(&self).unwrap() + } + + pub fn to_vec(&self) -> Vec<(String, String)> { + let mut vec = Vec::new(); + vec.push(("asset_uri".to_string(), self.asset_uri.clone())); + vec.push(("expiration".to_string(), self.expiration.to_string())); + vec.push(("name".to_string(), self.name.clone())); + if let Some(resolver) = &self.resolver { + vec.push(("resolver".to_string(), resolver.to_string())); + } + vec + } + + pub fn expiration(&self) -> u64 { + self.expiration + } + + pub fn set_expiration(&mut self, expiration: u64) { + self.expiration = expiration; + } +} + +impl TryFrom for NameTokenMetadata { + type Error = NameTokenError; + + fn try_from(value: String) -> Result { + serde_json_wasm::from_str(&value).map_err(|_| NameTokenError::DeserializationError) + } +} + +impl TryFrom> for NameTokenMetadata { + type Error = NameTokenError; + + fn try_from(value: Vec<(String, String)>) -> Result { + let name = value + .iter() + .find(|(key, _)| key == "name") + .ok_or(NameTokenError::DeserializationError)? + .1 + .clone(); + + let expiration = value + .iter() + .find(|(key, _)| key == "expiration") + .ok_or(NameTokenError::DeserializationError)? + .1 + .parse() + .map_err(|_| NameTokenError::DeserializationError)?; + + let resolver = value + .iter() + .find(|(key, _)| key == "resolver") + .cloned() + .map(|(_, value)| { + Address::from_str(&value).map_err(|_| NameTokenError::DeserializationError) + }) + .transpose()?; + + let asset_uri = value + .iter() + .find(|(key, _)| key == "asset_uri") + .map(|(_, value)| value.clone()) + .unwrap_or_default(); + + Ok(NameTokenMetadata { + name, + expiration, + resolver, + asset_uri, + }) + } +} + +/// Information about a payment. +#[odra::odra_type] +pub struct PaymentInfo { + pub buyer: Address, + pub payment_id: String, + pub amount: U512, +} + +/// List of [NameMintInfo] structs and the expiration time of the voucher. +#[odra::odra_type] +pub struct TokenizationVoucher { + pub names: Vec, + pub voucher_expiration: u64, +} + +impl TokenizationVoucher { + pub fn new(names: Vec, voucher_expiration: u64) -> Self { + Self { + names, + voucher_expiration, + } + } +} + +/// Information about a payment and a list of [NameMintInfo] structs. +#[odra::odra_type] +pub struct PaymentVoucher { + pub payment: PaymentInfo, + pub names: Vec, + pub voucher_expiration: u64, +} + +impl PaymentVoucher { + pub fn new( + amount: U512, + payment_id: &str, + buyer: Address, + names: Vec, + voucher_expiration: u64, + ) -> Self { + Self { + payment: PaymentInfo { + buyer, + payment_id: String::from(payment_id), + amount, + }, + names, + voucher_expiration, + } + } +} + +impl From for TokenizationVoucher { + fn from(voucher: PaymentVoucher) -> Self { + Self { + names: voucher.names, + voucher_expiration: voucher.voucher_expiration, + } + } +} + +/// Information about a payment and a list of [NameTransferInfo] structs. +#[odra::odra_type] +pub struct SecondarySaleVoucher { + pub payment: PaymentInfo, + pub names: Vec, + pub voucher_expiration: u64, +} + +/// Pair of a label and owner address. +#[odra::odra_type] +pub struct NameTransferInfo { + pub label: String, + pub owner: Address, +} + +/// Basic minting information for a name token. +#[odra::odra_type] +pub struct NameMintInfo { + pub label: String, + pub owner: Address, + pub token_expiration: u64, + pub asset_uri: String, +} + +impl NameMintInfo { + pub fn new(label: &str, owner: Address, token_expiration: u64, asset_uri: &str) -> Self { + Self { + label: String::from(label), + owner, + token_expiration, + asset_uri: String::from(asset_uri), + } + } +} + +/// Renewal information with new expiration time. +#[odra::odra_type] +pub struct TokenRenewalInfo { + pub token_id: U256, + pub token_expiration: u64, +} + +impl TokenRenewalInfo { + pub fn new(token_id: U256, token_expiration: u64) -> Self { + Self { + token_id, + token_expiration, + } + } +} + +/// Voucher for renewing multiple name tokens, plus payment information. +#[odra::odra_type] +pub struct RenewalPaymentVoucher { + pub payment: PaymentInfo, + pub tokens: Vec, + pub voucher_expiration: u64, +} + +impl RenewalPaymentVoucher { + pub fn new( + amount: U512, + payment_id: &str, + buyer: Address, + tokens: Vec, + voucher_expiration: u64, + ) -> Self { + Self { + payment: PaymentInfo { + buyer, + payment_id: String::from(payment_id), + amount, + }, + tokens, + voucher_expiration, + } + } +} + +/// Voucher for renewing multiple name tokens. +#[odra::odra_type] +pub struct RenewalVoucher { + pub tokens: Vec, + pub voucher_expiration: u64, +} + +impl RenewalVoucher { + pub fn new(tokens: Vec, voucher_expiration: u64) -> Self { + Self { + tokens, + voucher_expiration, + } + } +} + +impl From for RenewalVoucher { + fn from(voucher: RenewalPaymentVoucher) -> Self { + Self { + tokens: voucher.tokens, + voucher_expiration: voucher.voucher_expiration, + } + } +} + +pub trait Payment { + fn payment_info(&self) -> &PaymentInfo; +} + +impl Payment for PaymentVoucher { + fn payment_info(&self) -> &PaymentInfo { + &self.payment + } +} + +impl Payment for RenewalPaymentVoucher { + fn payment_info(&self) -> &PaymentInfo { + &self.payment + } +} + +impl Payment for SecondarySaleVoucher { + fn payment_info(&self) -> &PaymentInfo { + &self.payment + } +} + +pub trait ExpirableVoucher { + fn expiration_time(&self) -> u64; +} + +impl ExpirableVoucher for TokenizationVoucher { + fn expiration_time(&self) -> u64 { + self.voucher_expiration + } +} + +impl ExpirableVoucher for RenewalVoucher { + fn expiration_time(&self) -> u64 { + self.voucher_expiration + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_metadata_serialization() { + let expected = r#"{ + "name": "test-label", + "expiration": 86400, + "resolver": null, + "asset_uri": "" + }"# + .replace(" ", "") + .replace("\n", ""); + + // Test metadata to_json. + let metadata = NameTokenMetadata::with_no_resolver("test-label", 86400, ""); + assert_eq!(expected, metadata.json()); + + // Test metadata from_json. + let deserialized: NameTokenMetadata = expected.try_into().unwrap(); + assert_eq!(metadata, deserialized); + + let expected = r#"{ + "name": "test-label", + "expiration": 86400, + "resolver": "hash-7ba9daac84bebee8111c186588f21ebca35550b6cf1244e71768bd871938be6a", + "asset_uri": "https://example.com/asset-uri" + }"# + .replace(" ", "") + .replace("\n", ""); + + // Test metadata to_json. + let metadata = NameTokenMetadata::with_resolver( + "test-label", + 86400, + "https://example.com/asset-uri", + Address::new("hash-7ba9daac84bebee8111c186588f21ebca35550b6cf1244e71768bd871938be6a") + .unwrap(), + ); + assert_eq!(expected, metadata.json()); + + // Test metadata from_json. + let deserialized: NameTokenMetadata = expected.try_into().unwrap(); + assert_eq!(metadata, deserialized); + } +} diff --git a/src/lib.rs b/casper-name-contracts/src/lib.rs similarity index 60% rename from src/lib.rs rename to casper-name-contracts/src/lib.rs index d8d2ad8..ccdbe22 100644 --- a/src/lib.rs +++ b/casper-name-contracts/src/lib.rs @@ -2,7 +2,8 @@ #![cfg_attr(not(test), no_main)] extern crate alloc; -pub mod register; +pub mod contracts; +pub mod data_structures; #[cfg(test)] -mod register_tests; \ No newline at end of file +pub mod test_context; diff --git a/casper-name-contracts/src/test_context.rs b/casper-name-contracts/src/test_context.rs new file mode 100644 index 0000000..41e8f59 --- /dev/null +++ b/casper-name-contracts/src/test_context.rs @@ -0,0 +1,291 @@ +use std::io::Write; + +use blake2::digest::VariableOutput; +use blake2::Blake2bVar; +use odra::casper_types::bytesrepr::{Bytes, ToBytes}; +use odra::casper_types::{U256, U512}; +use odra::host::{Deployer, HostEnv}; +use odra::prelude::*; +use odra_modules::access::DEFAULT_ADMIN_ROLE; +use odra_modules::cep95::Mint; + +use crate::contracts::controller::{self, Controller, ControllerHostRef}; +use crate::contracts::name_token::NameToken; +use crate::contracts::registrar::{Registrar, RegistrarInitArgs, CONTROLLER_ROLE}; +use crate::contracts::resolver::{ + DefaultResolver, DefaultResolverHostRef, DefaultResolverInitArgs, +}; +use crate::contracts::{ + name_token::{NameTokenHostRef, NameTokenInitArgs}, + registrar::RegistrarHostRef, +}; +use crate::data_structures::{NameMintInfo, NameTokenMetadata, TokenizationVoucher}; + +pub const NAME_TOKEN_NAME: &'static str = "NameToken"; +pub const NAME_TOKEN_SYMBOL: &'static str = "NT"; +pub const INIT_TIME: u64 = 1704103200000; // 2024-01-01T10:00:00.000Z +pub const ONE_DAY: u64 = 86400000; +pub const GRACE_PERIOD: u64 = ONE_DAY * 2; +pub const TOKEN_EXPIRATION: u64 = ONE_DAY * 365; +pub const VOUCHER_EXPIRATION: u64 = ONE_DAY * 7; +pub const TOKEN_NAME: &str = "label"; + +pub struct TestContext { + pub env: HostEnv, + pub token: NameTokenHostRef, + pub registrar: RegistrarHostRef, + pub controller: ControllerHostRef, + pub default_resolver: DefaultResolverHostRef, + pub admin: Address, + pub alice: Address, + pub bob: Address, + pub anyone: Address, + pub signer: Address, + pub treasury: Address, +} + +impl TestContext { + pub fn install_raw_with_supply(max_supply: u64) -> TestContext { + let env = odra_test::env(); + let signer = env.get_account(10); + let treasury = env.get_account(11); + + let name_token = NameToken::deploy( + &env, + NameTokenInitArgs { + name: String::from(NAME_TOKEN_NAME), + symbol: String::from(NAME_TOKEN_SYMBOL), + max_supply: max_supply, + }, + ); + let resolver = DefaultResolver::deploy( + &env, + DefaultResolverInitArgs { + name_token: name_token.address(), + }, + ); + let registrar = Registrar::deploy( + &env, + RegistrarInitArgs { + name_token: name_token.address(), + }, + ); + let controller = Controller::deploy( + &env, + controller::ControllerInitArgs { + registrar: registrar.address(), + signer: env.public_key(&signer), + treasury, + }, + ); + + // Set start time. + env.advance_block_time(INIT_TIME); + + TestContext { + env: env.clone(), + signer, + token: name_token, + registrar, + controller, + default_resolver: resolver, + admin: env.get_account(0), + alice: env.get_account(1), + bob: env.get_account(2), + anyone: env.get_account(3), + treasury, + } + } + + pub fn install_raw() -> TestContext { + Self::install_raw_with_supply(1_000_000) + } + + pub fn install_and_setup() -> TestContext { + let mut contracts = TestContext::install_raw(); + + // register default resolver + contracts.whitelist_admin_in_name_token(); + contracts.register_default_resolver_in_name_token(); + // Setup access. + contracts.whitelist_registrar_in_name_token(); + contracts.set_controller_in_registrar(); + contracts.set_name_token_in_resolver(); + + // Setup grace period. + contracts.registrar.set_grace_period(GRACE_PERIOD); + + contracts + } + + pub fn whitelist_registrar_in_name_token(&mut self) { + self.token.whitelist(self.registrar.address()); + } + + pub fn whitelist_admin_in_name_token(&mut self) { + self.token.whitelist(self.admin); + } + + pub fn set_controller_in_registrar(&mut self) { + self.registrar + .grant_role(&CONTROLLER_ROLE, &self.controller.address()); + } + + pub fn set_name_token_in_resolver(&mut self) { + self.default_resolver + .grant_role(&DEFAULT_ADMIN_ROLE, &self.token.address()); + } + + pub fn register_default_resolver_in_name_token(&mut self) { + let address = self.default_resolver.address(); + self.token.set_default_resolver(address); + } + + pub fn sign(&self, data: &T) -> Bytes { + let bytes: Bytes = data.to_bytes().unwrap().into(); + self.env.sign_message(&bytes, &self.signer) + } + + pub fn try_name_register( + &mut self, + caller: Address, + recipient: Address, + token_name: &str, + token_expiration: u64, + voucher_expiration: u64, + ) -> OdraResult<()> { + let names = vec![NameMintInfo::new( + token_name, + recipient, + token_expiration, + "", + )]; + let voucher = TokenizationVoucher::new(names, voucher_expiration); + self.set_caller(caller); + self.registrar.try_controller_register(voucher) + } + + pub fn with_name_registered(&mut self, caller: Address, recipient: Address, token_name: &str) { + let token_expiration = self.token_expiration_time(); + let voucher_expiration = self.voucher_expiration_time(); + self.try_name_register( + caller, + recipient, + token_name, + token_expiration, + voucher_expiration, + ) + .unwrap() + } + + pub fn with_multi_names_registered( + &mut self, + caller: Address, + recipient: Address, + token_names: Vec<&str>, + ) { + let token_expiration = self.token_expiration_time(); + let voucher_expiration = self.voucher_expiration_time(); + let names = token_names + .iter() + .map(|label| NameMintInfo::new(*label, recipient, token_expiration, "")) + .collect(); + let voucher = TokenizationVoucher::new(names, voucher_expiration); + self.set_caller(caller); + self.registrar.try_controller_register(voucher).unwrap() + } + + pub fn expect_name_is_registered(&self, owner: Address, token_name: &str) { + let token_id = generate_token_id(token_name); + assert!(self.token.token_exists(token_id), "Token does not exist"); + + let actual_owner = self.token.owner_of(token_id); + assert_eq!(actual_owner, Some(owner), "Owner is not correct"); + + let metadata = self.token.token_metadata(token_id.clone()); + let expected_metadata = NameTokenMetadata::with_resolver( + token_name, + self.token_expiration_time(), + "", + self.default_resolver.address(), + ); + assert_eq!(metadata, expected_metadata.to_vec()); + + assert!( + self.env.emitted_event( + &self.token, + Mint { + to: owner, + token_id + } + ), + "Mint event not emitted" + ); + } + + pub fn try_name_expire(&mut self, token_name: &str) -> OdraResult<()> { + let token_id = generate_token_id(token_name); + self.set_caller(self.anyone); + self.registrar.try_expire(vec![token_id]) + } + + pub fn with_name_expired(&mut self, token_name: &str) { + self.try_name_expire(token_name).unwrap() + } + + pub fn with_names_expired(&mut self, token_names: Vec<&str>) { + let tokens_ids = token_names.iter().map(generate_token_id).collect(); + self.set_caller(self.anyone); + self.registrar.try_expire(tokens_ids).unwrap(); + } + + pub fn token_expiration_time(&self) -> u64 { + self.env.block_time() + TOKEN_EXPIRATION + } + + pub fn voucher_expiration_time(&self) -> u64 { + self.env.block_time() + VOUCHER_EXPIRATION + } + + pub fn admin_transfer(&mut self, recipient: Address, token_names: Vec<&str>) { + self.env.set_caller(self.admin); + self.registrar + .admin_transfer(recipient, generate_token_id_vec(token_names)) + } + + pub fn admin_burn(&mut self, token_names: Vec<&str>) { + self.env.set_caller(self.admin); + self.registrar + .admin_burn(generate_token_id_vec(token_names)); + } + + pub fn set_caller(&mut self, caller: Address) { + self.env.set_caller(caller); + } + + pub fn advance_block_time(&mut self, time: u64) { + self.env.advance_block_time(time); + } + + pub fn balance_of(&self, account: &Address) -> U512 { + self.env.balance_of(account) + } + + pub fn events_count(&self, address: &T) -> u32 { + self.env.events_count(address) + } +} + +pub fn generate_token_id>(data: T) -> U256 { + let mut result = [0u8; 32]; + let mut hasher = ::new(32).expect("should create hasher"); + let _ = hasher.write(data.as_ref()); + hasher + .finalize_variable(&mut result) + .expect("should copy hash to the result array"); + U256::from(result) +} + +pub fn generate_token_id_vec>(data: Vec) -> Vec { + data.into_iter().map(generate_token_id).collect() +} diff --git a/client-js/.eslintignore b/client-js/.eslintignore new file mode 100644 index 0000000..4bcad5a --- /dev/null +++ b/client-js/.eslintignore @@ -0,0 +1,2 @@ +# Ignore output +dist \ No newline at end of file diff --git a/client-js/.eslintrc.js b/client-js/.eslintrc.js new file mode 100644 index 0000000..416f5e5 --- /dev/null +++ b/client-js/.eslintrc.js @@ -0,0 +1,87 @@ +module.exports = { + env: { browser: true, es2021: true, node: true }, + extends: [ + 'airbnb-base', + 'airbnb-typescript/base', + 'plugin:@typescript-eslint/recommended', + 'plugin:@typescript-eslint/recommended-requiring-type-checking', + 'plugin:eslint-comments/recommended', + 'plugin:import/recommended', + 'plugin:import/typescript', + 'prettier' + ], + plugins: [ + '@typescript-eslint', + 'eslint-comments', + 'jest', + 'promise', + 'unicorn', + 'simple-import-sort', + 'unused-imports' + ], + overrides: [ + { + files: ['*.ts'], // Your TypeScript files extension + // As mentioned in the comments, you should extend TypeScript plugins here, + // instead of extending them outside the `overrides`. + // If you don't want to extend any rules, you don't need an `extends` attribute. + extends: ['plugin:@typescript-eslint/recommended'], + parserOptions: { + sourceType: 'module', + tsconfigRootDir: __dirname, + project: ['./tsconfig.json'] + }, + rules: { + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': 'off', + 'unused-imports/no-unused-imports': 'error', + 'unused-imports/no-unused-vars': [ + 'warn', + { + vars: 'all', + varsIgnorePattern: '^_', + args: 'after-used', + argsIgnorePattern: '^_' + } + ], + 'import/prefer-default-export': 'off', + 'simple-import-sort/imports': 'error', + 'simple-import-sort/exports': 'error', + 'import/first': 'error', + 'import/newline-after-import': 'error', + 'import/no-duplicates': 'error', + '@typescript-eslint/prefer-nullish-coalescing': 'off', + '@typescript-eslint/strict-boolean-expressions': 'off', + '@typescript-eslint/no-base-to-string': 'off', + 'no-return-await': 'off', + '@typescript-eslint/return-await': 'warn', + 'no-console': ['error', { allow: ['warn'] }], + '@typescript-eslint/naming-convention': [ + 'error', + { + selector: 'enum', + format: ['UPPER_CASE'], + leadingUnderscore: 'allow', + trailingUnderscore: 'allow' + } + ] + }, + overrides: [ + { + files: ['*.test.ts'], + rules: { + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-explicit-any': 'off' + } + }, + { + files: ['examples/*.ts'], + rules: { + 'no-console': 'off', + 'import/no-extraneous-dependencies': 'off' + } + } + ] + } + ] +}; diff --git a/client-js/.gitignore b/client-js/.gitignore new file mode 100644 index 0000000..527d846 --- /dev/null +++ b/client-js/.gitignore @@ -0,0 +1,2 @@ +src/wasm +node_modules diff --git a/client-js/.nvmrc b/client-js/.nvmrc new file mode 100644 index 0000000..b460d6f --- /dev/null +++ b/client-js/.nvmrc @@ -0,0 +1 @@ +18.12.1 diff --git a/client-js/.prettierignore b/client-js/.prettierignore new file mode 100644 index 0000000..4bcad5a --- /dev/null +++ b/client-js/.prettierignore @@ -0,0 +1,2 @@ +# Ignore output +dist \ No newline at end of file diff --git a/client-js/.prettierrc b/client-js/.prettierrc new file mode 100644 index 0000000..8938ac4 --- /dev/null +++ b/client-js/.prettierrc @@ -0,0 +1,19 @@ +{ + "printWidth": 80, + "singleQuote": true, + "semi": true, + "arrowParens": "avoid", + "trailingComma": "none", + "overrides": [ + { + "files": "*.md", + "options": { + "printWidth": 70, + "useTabs": false, + "trailingComma": "none", + "arrowParens": "avoid", + "proseWrap": "never" + } + } + ] +} diff --git a/client-js/CHANGELOG.md b/client-js/CHANGELOG.md new file mode 100644 index 0000000..9e02fa6 --- /dev/null +++ b/client-js/CHANGELOG.md @@ -0,0 +1,22 @@ +# Changelog + +All notable changes to casper-js-sdk. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + + + +## [Unreleased] + +## [1.0.3] - 2023-11-02 + +### Fixed + +- fixed event listener is not working ([#109](https://github.com/casper-ecosystem/cep18/pull/109)) diff --git a/client-js/README.md b/client-js/README.md new file mode 100644 index 0000000..516ae0f --- /dev/null +++ b/client-js/README.md @@ -0,0 +1,7 @@ +# `cspr-name-contracts-js-client` + +This JavaScript client helps to interact with the CSPR.name contracts suite + +# Usage + +TBD diff --git a/client-js/examples/cleanup_resolutions.ts b/client-js/examples/cleanup_resolutions.ts new file mode 100644 index 0000000..10d82a2 --- /dev/null +++ b/client-js/examples/cleanup_resolutions.ts @@ -0,0 +1,44 @@ +import fs from "fs"; + +import { HttpHandler, KeyAlgorithm, PrivateKey, RpcClient } from "casper-js-sdk"; + +import { DefaultResolver } from "../src/default-resolver"; +import { config } from "./config"; + +// eslint-disable-next-line @typescript-eslint/require-await +const run = async () => { + const ownerPrivateKeyPem = fs.readFileSync(config.adminPrivateKeyPath, "utf8"); + const ownerKeypair = PrivateKey.fromPem( + ownerPrivateKeyPem, + KeyAlgorithm.ED25519, + ); + + const defaultResolver = new DefaultResolver( + config.networkName, + config.defaultResolverContractPackageHash, + ); + + const transaction = defaultResolver.cleanup( + config.mintingName, + // 5 CSPR + 5000000000, + ownerKeypair.publicKey, + ); + + transaction.sign(ownerKeypair); + + const rpcHandler = new HttpHandler(config.nodeAddress); + const rpcClient = new RpcClient(rpcHandler); + + try { + const putTransactionResult = await rpcClient.putTransaction(transaction); + + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + console.log({transactionHash: putTransactionResult.transactionHash.toHex(), result: putTransactionResult.rawJSON}); + } catch(err) { + console.log({err: err.sourceErr.data}); + } +}; + +// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions +run().then(_ => console.log('Finished')).catch(e => console.error(`Error: ${e.stack}`)); diff --git a/client-js/examples/config.ts b/client-js/examples/config.ts new file mode 100644 index 0000000..62ea790 --- /dev/null +++ b/client-js/examples/config.ts @@ -0,0 +1,12 @@ +export const config = { + adminPrivateKeyPath: process.env.ADMIN_PRIVATE_KEY_PAIR_PATH, + buyerPrivateKeyPath: process.env.BUYER_PRIVATE_KEY_PAIR_PATH, + mintingName: process.env.MINTING_NAME, + registrarContractPackageHash: process.env.REGISTRAR_CONTRACT_PACKAGE_HASH, + defaultResolverContractPackageHash: process.env.DEFAULT_RESOLVER_CONTRACT_PACKAGE_HASH, + reverseResolutionContractPackageHash: process.env.REVERSE_RESOLUTION_CONTRACT_PACKAGE_HASH, + controllerContractPackageHash: process.env.CONTROLLER_CONTRACT_PACKAGE_HASH, + nameTokenURL: process.env.NAME_TOKEN_URL, + networkName: process.env.NETWORK_NAME, + nodeAddress: process.env.NODE_ADDRESS, +}; diff --git a/client-js/examples/offchain_purchase.ts b/client-js/examples/offchain_purchase.ts new file mode 100644 index 0000000..1c10e8b --- /dev/null +++ b/client-js/examples/offchain_purchase.ts @@ -0,0 +1,59 @@ +import fs from "fs"; + +import { HttpHandler, KeyAlgorithm, PrivateKey, RpcClient } from "casper-js-sdk"; + +import { Registrar } from "../src/registrar"; +import { NameMintInfo } from "../src/types"; +import { config } from "./config"; + +// eslint-disable-next-line @typescript-eslint/require-await +const run = async () => { + const adminPrivateKeyPem = fs.readFileSync(config.adminPrivateKeyPath, "utf8"); + + const adminKeypair = PrivateKey.fromPem( + adminPrivateKeyPem, + KeyAlgorithm.ED25519, + ); + + const buyerPrivateKeyPem = fs.readFileSync(config.buyerPrivateKeyPath, "utf8"); + const buyerKeypair = PrivateKey.fromPem( + buyerPrivateKeyPem, + KeyAlgorithm.ED25519, + ); + + const expiration = new Date(); + expiration.setFullYear(expiration.getFullYear() + 1, expiration.getMonth(), expiration.getDate() + 1); + + const nameMintInfos = [ + new NameMintInfo(config.mintingName, buyerKeypair.publicKey.accountHash().toPrefixedString(), expiration, config.nameTokenURL), + ]; + + const registrarContract = new Registrar( + config.networkName, + config.registrarContractPackageHash, + ); + + const transaction = registrarContract.adminRegister( + nameMintInfos, + // 20 CSPR + 20000000000, + adminKeypair.publicKey, + ); + + transaction.sign(adminKeypair); + + const rpcHandler = new HttpHandler(config.nodeAddress); + const rpcClient = new RpcClient(rpcHandler); + + try { + const putTransactionResult = await rpcClient.putTransaction(transaction); + + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + console.log({transactionHash: putTransactionResult.transactionHash.toHex(), result: putTransactionResult.rawJSON}); + } catch(err) { + console.log({err: err.sourceErr.data}); + } +}; + +// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions +run().then(_ => console.log('Finished')).catch(e => console.error(`Error: ${e.stack}`)); diff --git a/client-js/examples/offchain_purchase_renew.ts b/client-js/examples/offchain_purchase_renew.ts new file mode 100644 index 0000000..8e9196f --- /dev/null +++ b/client-js/examples/offchain_purchase_renew.ts @@ -0,0 +1,48 @@ +import fs from "fs"; + +import { HttpHandler, KeyAlgorithm, PrivateKey, RpcClient } from "casper-js-sdk"; + +import { Registrar } from "../src/registrar"; +import { TokenRenewalInfo } from "../src/types"; + +import { config } from "./config"; + +// eslint-disable-next-line @typescript-eslint/require-await +const run = async () => { + const adminPrivateKeyPem = fs.readFileSync(config.adminPrivateKeyPath, "utf8"); + const adminKeypair = PrivateKey.fromPem( + adminPrivateKeyPem, + KeyAlgorithm.ED25519, + ); + + const registrarContract = new Registrar( + config.networkName, + config.registrarContractPackageHash, + ); + + const expiration = new Date(); + expiration.setFullYear(expiration.getFullYear() + 1, expiration.getMonth(), expiration.getDate()); + + const transaction = registrarContract.adminProlong( + [new TokenRenewalInfo(config.mintingName, expiration)], + 10000, + adminKeypair.publicKey, + ); + + transaction.sign(adminKeypair); + + const rpcHandler = new HttpHandler(config.nodeAddress); + const rpcClient = new RpcClient(rpcHandler); + + try { + const putTransactionResult = await rpcClient.putTransaction(transaction); + + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + console.log({transactionHash: putTransactionResult.transactionHash.toHex(), result: putTransactionResult.rawJSON}); + } catch(err) { + console.log({err: err.sourceErr.data}); + } +}; + +// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions +run().then(_ => console.log('Finished')).catch(e => console.error(`Error: ${e.stack}`)); diff --git a/client-js/examples/onchain_purchase.ts b/client-js/examples/onchain_purchase.ts new file mode 100644 index 0000000..99312fc --- /dev/null +++ b/client-js/examples/onchain_purchase.ts @@ -0,0 +1,66 @@ +import { HttpHandler, KeyAlgorithm, PrivateKey, RpcClient } from "casper-js-sdk"; +import fs from "fs"; +import { join } from "path"; + +import { Controller } from "../src/controller"; +import { NameMintInfo, PaymentInfo, PaymentVoucher } from "../src/types"; +import { config } from "./config"; + +// eslint-disable-next-line @typescript-eslint/require-await +const run = async () => { + const adminPrivateKeyPem = fs.readFileSync(config.adminPrivateKeyPath, "utf8"); + const adminKeypair = PrivateKey.fromPem( + adminPrivateKeyPem, + KeyAlgorithm.ED25519, + ); + + const buyerPrivateKeyPem = fs.readFileSync(config.buyerPrivateKeyPath, "utf8"); + const buyerKeypair = PrivateKey.fromPem( + buyerPrivateKeyPem, + KeyAlgorithm.ED25519, + ); + + const proxyCallerWasmBytes = fs.readFileSync(join(__dirname, 'proxy_caller.wasm')); + + const expiration = new Date(); + expiration.setFullYear(expiration.getFullYear() + 1, expiration.getMonth(), expiration.getDate() + 1); + + const voucher = new PaymentVoucher( + new PaymentInfo(buyerKeypair.publicKey.accountHash().toPrefixedString(), "payment:1", 5000000000), + [new NameMintInfo(config.mintingName, buyerKeypair.publicKey.accountHash().toPrefixedString(), expiration, config.nameTokenURL)], + expiration, + ); + + const signature = adminKeypair.signAndAddAlgorithmBytes(voucher.toBytes()); + + const controllerContract = new Controller( + config.networkName, + config.controllerContractPackageHash, + proxyCallerWasmBytes, + ); + + const transaction = controllerContract.buy( + voucher.toBytes(), + voucher.payment.amount, + signature, + 20000000000, + buyerKeypair.publicKey, + ); + + transaction.sign(buyerKeypair); + + const rpcHandler = new HttpHandler(config.nodeAddress); + const rpcClient = new RpcClient(rpcHandler); + + try { + const putTransactionResult = await rpcClient.putTransaction(transaction); + + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + console.log({transactionHash: putTransactionResult.transactionHash.toHex(), result: putTransactionResult.rawJSON}); + } catch(err) { + console.log({err: err.sourceErr.data}); + } +}; + +// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions +run().then(_ => console.log('Finished')).catch(e => console.error(`Error: ${e.stack}`)); diff --git a/client-js/examples/onchain_purchase_cspr_cloud.ts b/client-js/examples/onchain_purchase_cspr_cloud.ts new file mode 100644 index 0000000..bb4d248 --- /dev/null +++ b/client-js/examples/onchain_purchase_cspr_cloud.ts @@ -0,0 +1,96 @@ +import fs from "fs"; +import { join } from "path"; + +import { HttpHandler, KeyAlgorithm, PrivateKey, RpcClient } from "casper-js-sdk"; + +import { Controller } from "../src/controller"; +import { NameMintInfo, PaymentInfo, PaymentVoucher } from "../src/types"; +import { config } from "./config"; +import axios, {AxiosResponse} from "axios"; +import {bytesToHex, hexToBytes} from "@noble/hashes/utils"; + +// eslint-disable-next-line @typescript-eslint/require-await +const run = async () => { + const buyerPrivateKeyPem = fs.readFileSync(config.buyerPrivateKeyPath, "utf8"); + const buyerKeypair = PrivateKey.fromPem( + buyerPrivateKeyPem, + KeyAlgorithm.ED25519, + ); + + const csprCloudClient = axios.create({ + baseURL: "http://localhost:8010", + }); + + const domain = "sld321"; + + const createVoucherResponse = await csprCloudClient.post>(`/domains/${domain}/payment-vouchers`, { + buyer_key: buyerKeypair.publicKey.accountHash().toPrefixedString(), + annual_periods: 1, + }); + + const createVoucherResponseData = createVoucherResponse.data.data; + + + const voucher = new PaymentVoucher( + new PaymentInfo(createVoucherResponseData.voucher.payment_info.buyer, createVoucherResponseData.voucher.payment_info.payment_id, createVoucherResponseData.voucher.payment_info.amount), + createVoucherResponseData.voucher.names.map(name => new NameMintInfo(name.label, name.owner, new Date(name.token_expiration), config.nameTokenURL)), + new Date(createVoucherResponseData.voucher.voucher_expiration), + ); + + if (bytesToHex(voucher.toBytes()) !== createVoucherResponseData.voucher_bytes) { + throw new Error("Payment Voucher bytes mismatch"); + } + + const proxyCallerWasmBytes = fs.readFileSync(join(__dirname, 'proxy_caller.wasm')); + + const controllerContract = new Controller( + config.networkName, + config.controllerContractPackageHash, + proxyCallerWasmBytes, + ); + + const transaction = controllerContract.buy( + hexToBytes(createVoucherResponseData.voucher_bytes), + createVoucherResponseData.voucher.payment_info.amount, + hexToBytes(createVoucherResponse.data.data.signature), + 20000000000, + buyerKeypair.publicKey, + ); + + transaction.sign(buyerKeypair); + + const rpcHandler = new HttpHandler(config.nodeAddress); + const rpcClient = new RpcClient(rpcHandler); + + try { + const putTransactionResult = await rpcClient.putTransaction(transaction); + + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + console.log({transactionHash: putTransactionResult.transactionHash.toHex(), result: putTransactionResult.rawJSON}); + } catch(err) { + console.log({err: err.sourceErr.data}); + } +}; + +// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions +run().then(_ => console.log('Finished')).catch(e => console.error(`Error: ${e.stack}`)); diff --git a/client-js/examples/onchain_purchase_renew.ts b/client-js/examples/onchain_purchase_renew.ts new file mode 100644 index 0000000..058a440 --- /dev/null +++ b/client-js/examples/onchain_purchase_renew.ts @@ -0,0 +1,67 @@ +import fs from "fs"; +import { join } from "path"; + +import { HttpHandler, KeyAlgorithm, PrivateKey, RpcClient } from "casper-js-sdk"; + +import { Controller } from "../src/controller"; +import { PaymentInfo, RenewalPaymentVoucher, TokenRenewalInfo } from "../src/types"; +import { config } from "./config"; + +// eslint-disable-next-line @typescript-eslint/require-await +const run = async () => { + const adminPrivateKeyPem = fs.readFileSync(config.adminPrivateKeyPath, "utf8"); + const adminKeypair = PrivateKey.fromPem( + adminPrivateKeyPem, + KeyAlgorithm.ED25519, + ); + + const buyerPrivateKeyPem = fs.readFileSync(config.buyerPrivateKeyPath, "utf8"); + const buyerKeypair = PrivateKey.fromPem( + buyerPrivateKeyPem, + KeyAlgorithm.ED25519, + ); + + const proxyCallerWasmBytes = fs.readFileSync(join(__dirname, 'proxy_caller.wasm')); + + const expiration = new Date(); + expiration.setFullYear(expiration.getFullYear() + 1, expiration.getMonth(), expiration.getDate()); + + const voucher = new RenewalPaymentVoucher( + new PaymentInfo(buyerKeypair.publicKey.accountHash().toPrefixedString(), "payment:1", 5000000000), + [new TokenRenewalInfo(config.mintingName, expiration)], + expiration, + ); + + const signature = adminKeypair.signAndAddAlgorithmBytes(voucher.toBytes()); + + const controllerContract = new Controller( + config.networkName, + config.controllerContractPackageHash, + proxyCallerWasmBytes, + ); + + const transaction = controllerContract.renew( + voucher.toBytes(), + voucher.payment.amount, + signature, + 80000000000, + buyerKeypair.publicKey, + ); + + transaction.sign(buyerKeypair); + + const rpcHandler = new HttpHandler(config.nodeAddress); + const rpcClient = new RpcClient(rpcHandler); + + try { + const putTransactionResult = await rpcClient.putTransaction(transaction); + + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + console.log({transactionHash: putTransactionResult.transactionHash.toHex(), result: putTransactionResult.rawJSON}); + } catch(err) { + console.log({err: err.sourceErr.data}); + } +}; + +// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions +run().then(_ => console.log('Finished')).catch(e => console.error(`Error: ${e.stack}`)); diff --git a/client-js/examples/proxy_caller.wasm b/client-js/examples/proxy_caller.wasm new file mode 100644 index 0000000..ea8f860 Binary files /dev/null and b/client-js/examples/proxy_caller.wasm differ diff --git a/client-js/examples/set_primary_name.ts b/client-js/examples/set_primary_name.ts new file mode 100644 index 0000000..0cbc925 --- /dev/null +++ b/client-js/examples/set_primary_name.ts @@ -0,0 +1,44 @@ +import fs from "fs"; + +import { HttpHandler, KeyAlgorithm, PrivateKey, RpcClient } from "casper-js-sdk"; + +import { ReverseResolver } from "../src/reverse-resolver"; +import { config } from "./config"; + +// eslint-disable-next-line @typescript-eslint/require-await +const run = async () => { + const ownerPrivateKeyPem = fs.readFileSync(config.adminPrivateKeyPath, "utf8"); + const ownerKeypair = PrivateKey.fromPem( + ownerPrivateKeyPem, + KeyAlgorithm.ED25519, + ); + + const reverseResolver = new ReverseResolver( + config.networkName, + config.reverseResolutionContractPackageHash, + ); + + const transaction = reverseResolver.setPrimaryName( + `${config.mintingName}.cspr`, + // 8 CSPR + 8000000000, + ownerKeypair.publicKey, + ); + + transaction.sign(ownerKeypair); + + const rpcHandler = new HttpHandler(config.nodeAddress); + const rpcClient = new RpcClient(rpcHandler); + + try { + const putTransactionResult = await rpcClient.putTransaction(transaction); + + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + console.log({transactionHash: putTransactionResult.transactionHash.toHex(), result: putTransactionResult.rawJSON}); + } catch(err) { + console.log({err: err.sourceErr.data}); + } +}; + +// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions +run().then(_ => console.log('Finished')).catch(e => console.error(`Error: ${e.stack}`)); diff --git a/client-js/examples/set_resolution.ts b/client-js/examples/set_resolution.ts new file mode 100644 index 0000000..8726a48 --- /dev/null +++ b/client-js/examples/set_resolution.ts @@ -0,0 +1,45 @@ +import fs from "fs"; + +import { HttpHandler, KeyAlgorithm, PrivateKey, RpcClient } from "casper-js-sdk"; + +import { DefaultResolver } from "../src/default-resolver"; +import { config } from "./config"; + +// eslint-disable-next-line @typescript-eslint/require-await +const run = async () => { + const ownerPrivateKeyPem = fs.readFileSync(config.adminPrivateKeyPath, "utf8"); + const ownerKeypair = PrivateKey.fromPem( + ownerPrivateKeyPem, + KeyAlgorithm.ED25519, + ); + + const defaultResolver = new DefaultResolver( + config.networkName, + config.defaultResolverContractPackageHash, + ); + + const transaction = defaultResolver.setResolution( + `${config.mintingName}.cspr`, + ownerKeypair.publicKey.accountHash().toPrefixedString(), + // 5 CSPR + 5000000000, + ownerKeypair.publicKey, + ); + + transaction.sign(ownerKeypair); + + const rpcHandler = new HttpHandler(config.nodeAddress); + const rpcClient = new RpcClient(rpcHandler); + + try { + const putTransactionResult = await rpcClient.putTransaction(transaction); + + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + console.log({transactionHash: putTransactionResult.transactionHash.toHex(), result: putTransactionResult.rawJSON}); + } catch(err) { + console.log({err: err.sourceErr.data}); + } +}; + +// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions +run().then(_ => console.log('Finished')).catch(e => console.error(`Error: ${e.stack}`)); diff --git a/client-js/examples/set_signer_public_key.ts b/client-js/examples/set_signer_public_key.ts new file mode 100644 index 0000000..c7182f2 --- /dev/null +++ b/client-js/examples/set_signer_public_key.ts @@ -0,0 +1,49 @@ +import { HttpHandler, KeyAlgorithm, PrivateKey, RpcClient } from "casper-js-sdk"; +import * as fs from "fs"; +import { join } from "path"; + +import { Controller } from "../src/controller"; +import { config } from "./config"; + + +// eslint-disable-next-line @typescript-eslint/require-await +const run = async () => { + const adminPrivateKeyPem = fs.readFileSync(config.adminPrivateKeyPath, "utf8"); + const adminKeypair = PrivateKey.fromPem( + adminPrivateKeyPem, + KeyAlgorithm.ED25519, + ); + + const proxyCallerWasmBytes = fs.readFileSync(join(__dirname, 'proxy_caller.wasm')); + + const controllerContract = new Controller( + config.networkName, + config.controllerContractPackageHash, + proxyCallerWasmBytes, + ); + + const transaction = controllerContract.setSignerPublicKey( + adminKeypair.publicKey, + adminKeypair.publicKey, + 5000000000, + ); + + transaction.sign(adminKeypair); + + console.log({trx: JSON.stringify(transaction, null, 2)}); + + const rpcHandler = new HttpHandler(config.nodeAddress); + const rpcClient = new RpcClient(rpcHandler); + + try { + const putTransactionResult = await rpcClient.putTransaction(transaction); + + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + console.log({transactionHash: putTransactionResult.transactionHash.toHex(), result: putTransactionResult.rawJSON}); + } catch(err) { + console.log({err: err.sourceErr.data}); + } +}; + +// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions +run().then(_ => console.log('Finished')).catch(e => console.error(`Error: ${e.stack}`)); diff --git a/client-js/examples/set_treasury_account.ts b/client-js/examples/set_treasury_account.ts new file mode 100644 index 0000000..3e1fc9b --- /dev/null +++ b/client-js/examples/set_treasury_account.ts @@ -0,0 +1,49 @@ +import { HttpHandler, KeyAlgorithm, PrivateKey, RpcClient } from "casper-js-sdk"; +import * as fs from "fs"; +import { join } from "path"; + +import { Controller } from "../src/controller"; +import { config } from "./config"; + + +// eslint-disable-next-line @typescript-eslint/require-await +const run = async () => { + const adminPrivateKeyPem = fs.readFileSync(config.adminPrivateKeyPath, "utf8"); + const adminKeypair = PrivateKey.fromPem( + adminPrivateKeyPem, + KeyAlgorithm.ED25519, + ); + + const proxyCallerWasmBytes = fs.readFileSync(join(__dirname, 'proxy_caller.wasm')); + + const controllerContract = new Controller( + config.networkName, + config.controllerContractPackageHash, + proxyCallerWasmBytes, + ); + + const transaction = controllerContract.setTreasuryAccountAddress( + adminKeypair.publicKey, + adminKeypair.publicKey.accountHash().toPrefixedString(), + 5000000000, + ); + + transaction.sign(adminKeypair); + + console.log({trx: JSON.stringify(transaction, null, 2)}); + + const rpcHandler = new HttpHandler(config.nodeAddress); + const rpcClient = new RpcClient(rpcHandler); + + try { + const putTransactionResult = await rpcClient.putTransaction(transaction); + + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + console.log({transactionHash: putTransactionResult.transactionHash.toHex(), result: putTransactionResult.rawJSON}); + } catch(err) { + console.log({err: err.sourceErr.data}); + } +}; + +// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions +run().then(_ => console.log('Finished')).catch(e => console.error(`Error: ${e.stack}`)); diff --git a/client-js/examples/unset_resolution.ts b/client-js/examples/unset_resolution.ts new file mode 100644 index 0000000..eae7f33 --- /dev/null +++ b/client-js/examples/unset_resolution.ts @@ -0,0 +1,44 @@ +import fs from "fs"; + +import { HttpHandler, KeyAlgorithm, PrivateKey, RpcClient } from "casper-js-sdk"; + +import { DefaultResolver } from "../src/default-resolver"; +import { config } from "./config"; + +// eslint-disable-next-line @typescript-eslint/require-await +const run = async () => { + const ownerPrivateKeyPem = fs.readFileSync(config.adminPrivateKeyPath, "utf8"); + const ownerKeypair = PrivateKey.fromPem( + ownerPrivateKeyPem, + KeyAlgorithm.ED25519, + ); + + const defaultResolver = new DefaultResolver( + config.networkName, + config.defaultResolverContractPackageHash, + ); + + const transaction = defaultResolver.removeResolution( + config.mintingName, + // 5 CSPR + 5000000000, + ownerKeypair.publicKey, + ); + + transaction.sign(ownerKeypair); + + const rpcHandler = new HttpHandler(config.nodeAddress); + const rpcClient = new RpcClient(rpcHandler); + + try { + const putTransactionResult = await rpcClient.putTransaction(transaction); + + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + console.log({transactionHash: putTransactionResult.transactionHash.toHex(), result: putTransactionResult.rawJSON}); + } catch(err) { + console.log({err: err.sourceErr.data}); + } +}; + +// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-template-expressions +run().then(_ => console.log('Finished')).catch(e => console.error(`Error: ${e.stack}`)); diff --git a/client-js/jest.config.js b/client-js/jest.config.js new file mode 100644 index 0000000..3f1ecd4 --- /dev/null +++ b/client-js/jest.config.js @@ -0,0 +1,7 @@ +/** @type {import('ts-jest').JestConfigWithTsJest} */ +module.exports = { + preset: 'ts-jest', + testEnvironment: 'node', + detectOpenHandles: true, + testTimeout: 5 * 60 * 1000 +}; diff --git a/client-js/package-lock.json b/client-js/package-lock.json new file mode 100644 index 0000000..5c2b2bf --- /dev/null +++ b/client-js/package-lock.json @@ -0,0 +1,12680 @@ +{ + "name": "casper-cep18-js-client", + "version": "1.0.3", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "casper-cep18-js-client", + "version": "1.0.3", + "license": "Apache License 2.0", + "dependencies": { + "@ethersproject/bignumber": "^5.7.0", + "@noble/hashes": "^1.2.0", + "axios": "^1.9.0", + "blakejs": "^1.2.1" + }, + "devDependencies": { + "@types/jest": "^29.4.0", + "@types/node": "^18.14.0", + "@typescript-eslint/eslint-plugin": "^5.53.0", + "cross-env": "^7.0.3", + "dotenv": "^16.0.3", + "eslint": "^8.34.0", + "eslint-config-airbnb-base": "^15.0.0", + "eslint-config-airbnb-typescript": "^17.0.0", + "eslint-config-prettier": "^8.6.0", + "eslint-plugin-eslint-comments": "^3.2.0", + "eslint-plugin-jest": "^27.2.1", + "eslint-plugin-n": "^15.6.1", + "eslint-plugin-promise": "^6.1.1", + "eslint-plugin-simple-import-sort": "^10.0.0", + "eslint-plugin-unicorn": "^45.0.2", + "eslint-plugin-unused-imports": "^2.0.0", + "jest": "^29.4.3", + "prettier": "^2.8.4", + "ts-jest": "^29.0.5", + "ts-node": "^10.9.1", + "typescript": "^4.9.5" + }, + "peerDependencies": { + "casper-js-sdk": "^5", + "ts-results": "npm:@casperlabs/ts-results@^3.3.5" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@ampproject/remapping/node_modules/@jridgewell/gen-mapping": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/code-frame/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/code-frame/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.21.0.tgz", + "integrity": "sha512-gMuZsmsgxk/ENC3O/fRw5QY8A9/uxQbbCEypnLIiYYc/qVJtEV7ouxC3EllIIwNzMqAQee5tanFabWsUOutS7g==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.21.0.tgz", + "integrity": "sha512-PuxUbxcW6ZYe656yL3EAhpy7qXKq0DmYsrJLpbB8XrsCP9Nm+XCg9XFMb5vIDliPD7+U/+M+QJlH17XOcB7eXA==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.21.0", + "@babel/helper-compilation-targets": "^7.20.7", + "@babel/helper-module-transforms": "^7.21.0", + "@babel/helpers": "^7.21.0", + "@babel/parser": "^7.21.0", + "@babel/template": "^7.20.7", + "@babel/traverse": "^7.21.0", + "@babel/types": "^7.21.0", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.2", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + }, + "node_modules/@babel/generator": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", + "dev": true, + "dependencies": { + "@babel/types": "^7.23.0", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz", + "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.20.5", + "@babel/helper-validator-option": "^7.18.6", + "browserslist": "^4.21.3", + "lru-cache": "^5.1.1", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", + "dev": true, + "dependencies": { + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.21.0.tgz", + "integrity": "sha512-eD/JQ21IG2i1FraJnTMbUarAUkA7G988ofehG5MDCRXaUU91rEBJuCeSoou2Sk1y4RbLYXzqEg1QLwEmRU4qcQ==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-simple-access": "^7.20.2", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.19.1", + "@babel/template": "^7.20.7", + "@babel/traverse": "^7.21.0", + "@babel/types": "^7.21.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz", + "integrity": "sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz", + "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.20.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz", + "integrity": "sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.21.0.tgz", + "integrity": "sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA==", + "dev": true, + "dependencies": { + "@babel/template": "^7.20.7", + "@babel/traverse": "^7.21.0", + "@babel/types": "^7.21.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz", + "integrity": "sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.20.0.tgz", + "integrity": "sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.1.2.tgz", + "integrity": "sha512-7qELuQWWjVDdVsFQ5+beUl+KPczrEDA7S3zM4QUd/bJl7oXgsmpXaEVqrRTnOBqenOV4rWf2kVZk2Ot085zPWA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz", + "integrity": "sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.4.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@eslint/eslintrc/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@ethersproject/bignumber": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.7.0.tgz", + "integrity": "sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "bn.js": "^5.2.1" + } + }, + "node_modules/@ethersproject/bytes": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.7.0.tgz", + "integrity": "sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/constants": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.7.0.tgz", + "integrity": "sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "peer": true, + "dependencies": { + "@ethersproject/bignumber": "^5.7.0" + } + }, + "node_modules/@ethersproject/logger": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.7.0.tgz", + "integrity": "sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ] + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.4.3.tgz", + "integrity": "sha512-W/o/34+wQuXlgqlPYTansOSiBnuxrTv61dEVkA6HNmpcgHLUjfaUbdqt6oVvOzaawwo9IdW9QOtMgQ1ScSZC4A==", + "dev": true, + "dependencies": { + "@jest/types": "^29.4.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.4.3", + "jest-util": "^29.4.3", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.4.3.tgz", + "integrity": "sha512-56QvBq60fS4SPZCuM7T+7scNrkGIe7Mr6PVIXUpu48ouvRaWOFqRPV91eifvFM0ay2HmfswXiGf97NGUN5KofQ==", + "dev": true, + "dependencies": { + "@jest/console": "^29.4.3", + "@jest/reporters": "^29.4.3", + "@jest/test-result": "^29.4.3", + "@jest/transform": "^29.4.3", + "@jest/types": "^29.4.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.4.3", + "jest-config": "^29.4.3", + "jest-haste-map": "^29.4.3", + "jest-message-util": "^29.4.3", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.4.3", + "jest-resolve-dependencies": "^29.4.3", + "jest-runner": "^29.4.3", + "jest-runtime": "^29.4.3", + "jest-snapshot": "^29.4.3", + "jest-util": "^29.4.3", + "jest-validate": "^29.4.3", + "jest-watcher": "^29.4.3", + "micromatch": "^4.0.4", + "pretty-format": "^29.4.3", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/environment": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.4.3.tgz", + "integrity": "sha512-dq5S6408IxIa+lr54zeqce+QgI+CJT4nmmA+1yzFgtcsGK8c/EyiUb9XQOgz3BMKrRDfKseeOaxj2eO8LlD3lA==", + "dev": true, + "dependencies": { + "@jest/fake-timers": "^29.4.3", + "@jest/types": "^29.4.3", + "@types/node": "*", + "jest-mock": "^29.4.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.4.3.tgz", + "integrity": "sha512-iktRU/YsxEtumI9zsPctYUk7ptpC+AVLLk1Ax3AsA4g1C+8OOnKDkIQBDHtD5hA/+VtgMd5AWI5gNlcAlt2vxQ==", + "dev": true, + "dependencies": { + "expect": "^29.4.3", + "jest-snapshot": "^29.4.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.4.3.tgz", + "integrity": "sha512-/6JWbkxHOP8EoS8jeeTd9dTfc9Uawi+43oLKHfp6zzux3U2hqOOVnV3ai4RpDYHOccL6g+5nrxpoc8DmJxtXVQ==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.4.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.4.3.tgz", + "integrity": "sha512-4Hote2MGcCTWSD2gwl0dwbCpBRHhE6olYEuTj8FMowdg3oQWNKr2YuxenPQYZ7+PfqPY1k98wKDU4Z+Hvd4Tiw==", + "dev": true, + "dependencies": { + "@jest/types": "^29.4.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.4.3", + "jest-mock": "^29.4.3", + "jest-util": "^29.4.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.4.3.tgz", + "integrity": "sha512-8BQ/5EzfOLG7AaMcDh7yFCbfRLtsc+09E1RQmRBI4D6QQk4m6NSK/MXo+3bJrBN0yU8A2/VIcqhvsOLFmziioA==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.4.3", + "@jest/expect": "^29.4.3", + "@jest/types": "^29.4.3", + "jest-mock": "^29.4.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.4.3.tgz", + "integrity": "sha512-sr2I7BmOjJhyqj9ANC6CTLsL4emMoka7HkQpcoMRlhCbQJjz2zsRzw0BDPiPyEFDXAbxKgGFYuQZiSJ1Y6YoTg==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.4.3", + "@jest/test-result": "^29.4.3", + "@jest/transform": "^29.4.3", + "@jest/types": "^29.4.3", + "@jridgewell/trace-mapping": "^0.3.15", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.4.3", + "jest-util": "^29.4.3", + "jest-worker": "^29.4.3", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/reporters/node_modules/jest-worker": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.4.3.tgz", + "integrity": "sha512-GLHN/GTAAMEy5BFdvpUfzr9Dr80zQqBrh0fz1mtRMe05hqP45+HfQltu7oTBfduD0UeZs09d+maFtFYAXFWvAA==", + "dev": true, + "dependencies": { + "@types/node": "*", + "jest-util": "^29.4.3", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/schemas": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.4.3.tgz", + "integrity": "sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.25.16" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.4.3.tgz", + "integrity": "sha512-qyt/mb6rLyd9j1jUts4EQncvS6Yy3PM9HghnNv86QBlV+zdL2inCdK1tuVlL+J+lpiw2BI67qXOrX3UurBqQ1w==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.15", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.4.3.tgz", + "integrity": "sha512-Oi4u9NfBolMq9MASPwuWTlC5WvmNRwI4S8YrQg5R5Gi47DYlBe3sh7ILTqi/LGrK1XUE4XY9KZcQJTH1WJCLLA==", + "dev": true, + "dependencies": { + "@jest/console": "^29.4.3", + "@jest/types": "^29.4.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.4.3.tgz", + "integrity": "sha512-yi/t2nES4GB4G0mjLc0RInCq/cNr9dNwJxcGg8sslajua5Kb4kmozAc+qPLzplhBgfw1vLItbjyHzUN92UXicw==", + "dev": true, + "dependencies": { + "@jest/test-result": "^29.4.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.4.3", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.4.3.tgz", + "integrity": "sha512-8u0+fBGWolDshsFgPQJESkDa72da/EVwvL+II0trN2DR66wMwiQ9/CihaGfHdlLGFzbBZwMykFtxuwFdZqlKwg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.4.3", + "@jridgewell/trace-mapping": "^0.3.15", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.4.3", + "jest-regex-util": "^29.4.3", + "jest-util": "^29.4.3", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.4.3.tgz", + "integrity": "sha512-bPYfw8V65v17m2Od1cv44FH+SiKW7w2Xu7trhcdTLUmSv85rfKsP+qXSjO4KGJr4dtPSzl/gvslZBXctf1qGEA==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.4.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", + "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "node_modules/@noble/curves": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.6.0.tgz", + "integrity": "sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==", + "peer": true, + "dependencies": { + "@noble/hashes": "1.5.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/ed25519": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/@noble/ed25519/-/ed25519-1.7.3.tgz", + "integrity": "sha512-iR8GBkDt0Q3GyaVcIu7mSsVIqnFbkbRzGLWlvhwunacoLwt4J3swfKhfaM6rN6WY+TBGoYT1GtT1mIh2/jGbRQ==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "peer": true + }, + "node_modules/@noble/hashes": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz", + "integrity": "sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/secp256k1": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz", + "integrity": "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "peer": true + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@open-rpc/client-js": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@open-rpc/client-js/-/client-js-1.8.1.tgz", + "integrity": "sha512-vV+Hetl688nY/oWI9IFY0iKDrWuLdYhf7OIKI6U1DcnJV7r4gAgwRJjEr1QVYszUc0gjkHoQJzqevmXMGLyA0g==", + "peer": true, + "dependencies": { + "isomorphic-fetch": "^3.0.0", + "isomorphic-ws": "^5.0.0", + "strict-event-emitter-types": "^2.0.0", + "ws": "^7.0.0" + } + }, + "node_modules/@scure/base": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.8.tgz", + "integrity": "sha512-6CyAclxj3Nb0XT7GHK6K4zK6k2xJm6E4Ft0Ohjt4WgegiFUHEtFb2CGzmPmGBwoIhrLsqNLYfLr04Y1GePrzZg==", + "peer": true, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.5.0.tgz", + "integrity": "sha512-8EnFYkqEQdnkuGBVpCzKxyIwDCBLDVj3oiX0EKUFre/tOjL/Hqba1D6n/8RcmaQy4f95qQFrO2A8Sr6ybh4NRw==", + "peer": true, + "dependencies": { + "@noble/curves": "~1.6.0", + "@noble/hashes": "~1.5.0", + "@scure/base": "~1.1.7" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.4.0.tgz", + "integrity": "sha512-BEEm6p8IueV/ZTfQLp/0vhw4NPnT9oWf5+28nvmeUICjP99f4vr2d+qc7AVGDDtwRep6ifR43Yed9ERVmiITzw==", + "peer": true, + "dependencies": { + "@noble/hashes": "~1.5.0", + "@scure/base": "~1.1.8" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.25.23", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.25.23.tgz", + "integrity": "sha512-VEB8ygeP42CFLWyAJhN5OklpxUliqdNEUcXb4xZ/CINqtYGTjL5ukluKdKzQ0iWdUxyQ7B0539PAUhHKrCNWSQ==", + "dev": true + }, + "node_modules/@sinonjs/commons": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.0.2.tgz", + "integrity": "sha512-SwUDyjWnah1AaNl7kxsa7cfLhlTYoiyhDAIgyh+El30YvXs/o7OLXpYH88Zdhyx9JExKrmHDJ+10bwIcY80Jmw==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^2.0.0" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", + "dev": true + }, + "node_modules/@types/babel__core": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.0.tgz", + "integrity": "sha512-+n8dL/9GWblDO0iU6eZAwEIJVr5DWigtle+Q6HLOrh/pdbXOhOtqzq8VPPE2zvNJzSKY4vH/z3iT3tn0A3ypiQ==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", + "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", + "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.3.tgz", + "integrity": "sha512-1kbcJ40lLB7MHsj39U4Sh1uTd2E7rLEa79kmDpI6cy+XiXsteB3POdQomoq4FxszMrO3ZYchkhYJw7A2862b3w==", + "dev": true, + "dependencies": { + "@babel/types": "^7.3.0" + } + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", + "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", + "dev": true + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/jest": { + "version": "29.4.0", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.4.0.tgz", + "integrity": "sha512-VaywcGQ9tPorCX/Jkkni7RWGFfI11whqzs8dvxF41P17Z+z872thvEvlIbznjPJ02kl1HMX3LmLOonsj2n7HeQ==", + "dev": true, + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true, + "peer": true + }, + "node_modules/@types/node": { + "version": "18.14.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.0.tgz", + "integrity": "sha512-5EWrvLmglK+imbCJY0+INViFWUHg1AHel1sq4ZVSfdcNqGy9Edv3UB9IIzzg+xPaUcAgZYcfVs2fBcwDeZzU0A==" + }, + "node_modules/@types/normalize-package-data": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", + "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", + "dev": true + }, + "node_modules/@types/prettier": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.2.tgz", + "integrity": "sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg==", + "dev": true + }, + "node_modules/@types/semver": { + "version": "7.3.13", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", + "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", + "dev": true + }, + "node_modules/@types/stack-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", + "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "dev": true + }, + "node_modules/@types/ws": { + "version": "8.5.4", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", + "integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==", + "peer": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/yargs": { + "version": "17.0.22", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.22.tgz", + "integrity": "sha512-pet5WJ9U8yPVRhkwuEIp5ktAeAqRZOq4UdAyWLWzxbtpyXnzbtLdKiXAjJzi/KLmPGS9wk86lUFWZFN6sISo4g==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", + "dev": true + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "5.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.53.0.tgz", + "integrity": "sha512-alFpFWNucPLdUOySmXCJpzr6HKC3bu7XooShWM+3w/EL6J2HIoB2PFxpLnq4JauWVk6DiVeNKzQlFEaE+X9sGw==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "5.53.0", + "@typescript-eslint/type-utils": "5.53.0", + "@typescript-eslint/utils": "5.53.0", + "debug": "^4.3.4", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "regexpp": "^3.2.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/@typescript-eslint/parser": { + "version": "5.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.53.0.tgz", + "integrity": "sha512-MKBw9i0DLYlmdOb3Oq/526+al20AJZpANdT6Ct9ffxcV8nKCHz63t/S0IhlTFNsBIHJv+GY5SFJ0XfqVeydQrQ==", + "dev": true, + "peer": true, + "dependencies": { + "@typescript-eslint/scope-manager": "5.53.0", + "@typescript-eslint/types": "5.53.0", + "@typescript-eslint/typescript-estree": "5.53.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "5.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.53.0.tgz", + "integrity": "sha512-Opy3dqNsp/9kBBeCPhkCNR7fmdSQqA+47r21hr9a14Bx0xnkElEQmhoHga+VoaoQ6uDHjDKmQPIYcUcKJifS7w==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.53.0", + "@typescript-eslint/visitor-keys": "5.53.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "5.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.53.0.tgz", + "integrity": "sha512-HO2hh0fmtqNLzTAme/KnND5uFNwbsdYhCZghK2SoxGp3Ifn2emv+hi0PBUjzzSh0dstUIFqOj3bp0AwQlK4OWw==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "5.53.0", + "@typescript-eslint/utils": "5.53.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "5.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.53.0.tgz", + "integrity": "sha512-5kcDL9ZUIP756K6+QOAfPkigJmCPHcLN7Zjdz76lQWWDdzfOhZDTj1irs6gPBKiXx5/6O3L0+AvupAut3z7D2A==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "5.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.53.0.tgz", + "integrity": "sha512-eKmipH7QyScpHSkhbptBBYh9v8FxtngLquq292YTEQ1pxVs39yFBlLC1xeIZcPPz1RWGqb7YgERJRGkjw8ZV7w==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.53.0", + "@typescript-eslint/visitor-keys": "5.53.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/@typescript-eslint/utils": { + "version": "5.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.53.0.tgz", + "integrity": "sha512-VUOOtPv27UNWLxFwQK/8+7kvxVC+hPHNsJjzlJyotlaHjLSIgOCKj9I0DBUjwOOA64qjBwx5afAPjksqOxMO0g==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.53.0", + "@typescript-eslint/types": "5.53.0", + "@typescript-eslint/typescript-estree": "5.53.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0", + "semver": "^7.3.7" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "5.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.53.0.tgz", + "integrity": "sha512-JqNLnX3leaHFZEN0gCh81sIvgrp/2GOACZNgO4+Tkf64u51kTpAyWFOY8XHx8XuXr3N2C9zgPPHtcpMg6z1g0w==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.53.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/acorn": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "dev": true, + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/array-includes": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", + "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", + "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", + "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "peer": true, + "dependencies": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/asn1.js/node_modules/bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "peer": true + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/axios": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.9.0.tgz", + "integrity": "sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/babel-jest": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.4.3.tgz", + "integrity": "sha512-o45Wyn32svZE+LnMVWv/Z4x0SwtLbh4FyGcYtR20kIWd+rdrDZ9Fzq8Ml3MYLD+mZvEdzCjZsCnYZ2jpJyQ+Nw==", + "dev": true, + "dependencies": { + "@jest/transform": "^29.4.3", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.4.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.4.3.tgz", + "integrity": "sha512-mB6q2q3oahKphy5V7CpnNqZOCkxxZ9aokf1eh82Dy3jQmg4xvM1tGrh5y6BQUJh4a3Pj9+eLfwvAZ7VNKg7H8Q==", + "dev": true, + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-preset-jest": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.4.3.tgz", + "integrity": "sha512-gWx6COtSuma6n9bw+8/F+2PCXrIgxV/D1TJFnp6OyBK2cxPWg0K9p/sriNYeifKjpUkMViWQ09DSWtzJQRETsw==", + "dev": true, + "dependencies": { + "babel-plugin-jest-hoist": "^29.4.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/blakejs": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", + "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==" + }, + "node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", + "peer": true + }, + "node_modules/browserslist": { + "version": "4.21.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", + "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001449", + "electron-to-chromium": "^1.4.284", + "node-releases": "^2.0.8", + "update-browserslist-db": "^1.0.10" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/builtin-modules": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/builtins": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", + "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", + "dev": true, + "dependencies": { + "semver": "^7.0.0" + } + }, + "node_modules/builtins/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/builtins/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/builtins/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001457", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001457.tgz", + "integrity": "sha512-SDIV6bgE1aVbK6XyxdURbUE89zY7+k1BBBaOwYwkNCglXlel/E7mELiHC64HQ+W0xSKlqWhV9Wh7iHxUjMs4fA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + } + ] + }, + "node_modules/casper-js-sdk": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/casper-js-sdk/-/casper-js-sdk-5.0.6.tgz", + "integrity": "sha512-JomiNjcOk1GchBfG8pTGGeOhWCRjdZMDiYWR0NI6UeJMliUb0xfxMmQ5D6/bIQ6dqPxeNluGI/YjY7t5Rh6hLA==", + "peer": true, + "dependencies": { + "@ethersproject/bignumber": "^5.0.8", + "@ethersproject/bytes": "^5.0.5", + "@ethersproject/constants": "^5.0.5", + "@noble/curves": "^1.1.0", + "@noble/ed25519": "^1.7.3", + "@noble/hashes": "^1.2.0", + "@noble/secp256k1": "^1.7.1", + "@open-rpc/client-js": "^1.8.1", + "@scure/bip32": "^1.1.5", + "@scure/bip39": "^1.2.0", + "@types/ws": "^8.2.2", + "asn1.js": "^5.4.1", + "axios": "^1.8.4", + "bn.js": "^5.2.1", + "elliptic": "6.6.1", + "eventsource": "^2.0.2", + "glob": "^7.1.6", + "humanize-duration": "^3.24.0", + "lodash": "^4.17.21", + "node-fetch": "2.6.13", + "reflect-metadata": "^0.1.13", + "ts-results": "npm:@casperlabs/ts-results@^3.3.4", + "typedjson": "^1.6.0-rc2" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/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==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ci-info": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } + }, + "node_modules/cjs-module-lexer": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", + "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", + "dev": true + }, + "node_modules/clean-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz", + "integrity": "sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/clean-regexp/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", + "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "dev": true + }, + "node_modules/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==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/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==", + "dev": true + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/confusing-browser-globals": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", + "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/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==", + "dev": true + }, + "node_modules/cross-env": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.1" + }, + "bin": { + "cross-env": "src/bin/cross-env.js", + "cross-env-shell": "src/bin/cross-env-shell.js" + }, + "engines": { + "node": ">=10.14", + "npm": ">=6", + "yarn": ">=1" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", + "dev": true + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/deepmerge": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.0.tgz", + "integrity": "sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dev": true, + "dependencies": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/diff-sequences": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.4.3.tgz", + "integrity": "sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/dotenv": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", + "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.4.304", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.304.tgz", + "integrity": "sha512-6c8M+ojPgDIXN2NyfGn8oHASXYnayj+gSEnGeLMKb9zjsySeVB/j7KkNAAG9yDcv8gNlhvFg5REa1N/kQU6pgA==", + "dev": true + }, + "node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "peer": true, + "dependencies": { + "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" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "peer": true + }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/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==", + "dev": true + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.21.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.1.tgz", + "integrity": "sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.3", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.4", + "is-array-buffer": "^3.0.1", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.2", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "safe-regex-test": "^1.0.0", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "peer": true, + "dependencies": { + "has": "^1.0.3" + } + }, + "node_modules/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==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint": { + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.34.0.tgz", + "integrity": "sha512-1Z8iFsucw+7kSqXNZVslXS8Ioa4u2KM7GPwuKtkTFAqZ/cHMcEaR+1+Br0wLlot49cNxIiZk5wp8EAbPcYZxTg==", + "dev": true, + "dependencies": { + "@eslint/eslintrc": "^1.4.1", + "@humanwhocodes/config-array": "^0.11.8", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.4.0", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-sdsl": "^4.1.4", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-airbnb-base": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", + "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", + "dev": true, + "dependencies": { + "confusing-browser-globals": "^1.0.10", + "object.assign": "^4.1.2", + "object.entries": "^1.1.5", + "semver": "^6.3.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "peerDependencies": { + "eslint": "^7.32.0 || ^8.2.0", + "eslint-plugin-import": "^2.25.2" + } + }, + "node_modules/eslint-config-airbnb-typescript": { + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-typescript/-/eslint-config-airbnb-typescript-17.0.0.tgz", + "integrity": "sha512-elNiuzD0kPAPTXjFWg+lE24nMdHMtuxgYoD30OyMD6yrW1AhFZPAg27VX7d3tzOErw+dgJTNWfRSDqEcXb4V0g==", + "dev": true, + "dependencies": { + "eslint-config-airbnb-base": "^15.0.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^5.13.0", + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^7.32.0 || ^8.2.0", + "eslint-plugin-import": "^2.25.3" + } + }, + "node_modules/eslint-config-prettier": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz", + "integrity": "sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==", + "dev": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", + "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", + "dev": true, + "peer": true, + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.11.0", + "resolve": "^1.22.1" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "peer": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz", + "integrity": "sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==", + "dev": true, + "peer": true, + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "peer": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-es": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz", + "integrity": "sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==", + "dev": true, + "dependencies": { + "eslint-utils": "^2.0.0", + "regexpp": "^3.0.0" + }, + "engines": { + "node": ">=8.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=4.19.1" + } + }, + "node_modules/eslint-plugin-es/node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/eslint-plugin-es/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-plugin-eslint-comments": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz", + "integrity": "sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5", + "ignore": "^5.0.5" + }, + "engines": { + "node": ">=6.5.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=4.19.1" + } + }, + "node_modules/eslint-plugin-eslint-comments/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.27.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", + "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", + "dev": true, + "peer": true, + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.7.4", + "has": "^1.0.3", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.6", + "resolve": "^1.22.1", + "semver": "^6.3.0", + "tsconfig-paths": "^3.14.1" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "peer": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "peer": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-jest": { + "version": "27.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.2.1.tgz", + "integrity": "sha512-l067Uxx7ZT8cO9NJuf+eJHvt6bqJyz2Z29wykyEdz/OtmcELQl2MQGQLX8J94O1cSJWAwUSEvCjwjA7KEK3Hmg==", + "dev": true, + "dependencies": { + "@typescript-eslint/utils": "^5.10.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^5.0.0", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@typescript-eslint/eslint-plugin": { + "optional": true + }, + "jest": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-n": { + "version": "15.6.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.6.1.tgz", + "integrity": "sha512-R9xw9OtCRxxaxaszTQmQAlPgM+RdGjaL1akWuY/Fv9fRAi8Wj4CUKc6iYVG8QNRjRuo8/BqVYIpfqberJUEacA==", + "dev": true, + "dependencies": { + "builtins": "^5.0.1", + "eslint-plugin-es": "^4.1.0", + "eslint-utils": "^3.0.0", + "ignore": "^5.1.1", + "is-core-module": "^2.11.0", + "minimatch": "^3.1.2", + "resolve": "^1.22.1", + "semver": "^7.3.8" + }, + "engines": { + "node": ">=12.22.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-n/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-plugin-n/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-plugin-n/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/eslint-plugin-promise": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz", + "integrity": "sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/eslint-plugin-simple-import-sort": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-10.0.0.tgz", + "integrity": "sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==", + "dev": true, + "peerDependencies": { + "eslint": ">=5.0.0" + } + }, + "node_modules/eslint-plugin-unicorn": { + "version": "45.0.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-45.0.2.tgz", + "integrity": "sha512-Y0WUDXRyGDMcKLiwgL3zSMpHrXI00xmdyixEGIg90gHnj0PcHY4moNv3Ppje/kDivdAy5vUeUr7z211ImPv2gw==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.19.1", + "@eslint-community/eslint-utils": "^4.1.2", + "ci-info": "^3.6.1", + "clean-regexp": "^1.0.0", + "esquery": "^1.4.0", + "indent-string": "^4.0.0", + "is-builtin-module": "^3.2.0", + "jsesc": "^3.0.2", + "lodash": "^4.17.21", + "pluralize": "^8.0.0", + "read-pkg-up": "^7.0.1", + "regexp-tree": "^0.1.24", + "regjsparser": "^0.9.1", + "safe-regex": "^2.1.1", + "semver": "^7.3.8", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=14.18" + }, + "funding": { + "url": "https://github.com/sindresorhus/eslint-plugin-unicorn?sponsor=1" + }, + "peerDependencies": { + "eslint": ">=8.28.0" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/jsesc": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/eslint-plugin-unused-imports": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-2.0.0.tgz", + "integrity": "sha512-3APeS/tQlTrFa167ThtP0Zm0vctjr4M44HMpeg1P4bK6wItarumq0Ma82xorMKdFsWpphQBlRPzw/pxiVELX1A==", + "dev": true, + "dependencies": { + "eslint-rule-composer": "^0.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^5.0.0", + "eslint": "^8.0.0" + }, + "peerDependenciesMeta": { + "@typescript-eslint/eslint-plugin": { + "optional": true + } + } + }, + "node_modules/eslint-rule-composer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz", + "integrity": "sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/eslint/node_modules/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==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/eslint/node_modules/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==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/globals": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/eslint/node_modules/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==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/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==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/espree": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", + "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", + "dev": true, + "dependencies": { + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.2.tgz", + "integrity": "sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eventsource": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-2.0.2.tgz", + "integrity": "sha512-IzUmBGPR3+oUG9dUeXynyNmf91/3zUSJg1lCktzKw47OXuhco54U3r9B7O4XX+Rb1Itm9OZ2b0RkTs10bICOxA==", + "peer": true, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.4.3.tgz", + "integrity": "sha512-uC05+Q7eXECFpgDrHdXA4k2rpMyStAYPItEDLyQDo5Ta7fVkJnNA/4zh/OIVkVVNZ1oOK1PipQoyNjuZ6sz6Dg==", + "dev": true, + "dependencies": { + "@jest/expect-utils": "^29.4.3", + "jest-get-type": "^29.4.3", + "jest-matcher-utils": "^29.4.3", + "jest-message-util": "^29.4.3", + "jest-util": "^29.4.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/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==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/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==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/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==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true + }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/form-data": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", + "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/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==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "peer": true, + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "peer": true, + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/humanize-duration": { + "version": "3.28.0", + "resolved": "https://registry.npmjs.org/humanize-duration/-/humanize-duration-3.28.0.tgz", + "integrity": "sha512-jMAxraOOmHuPbffLVDKkEKi/NeG8dMqP8lGRd6Tbf7JgAeG33jjgPWDbXXU7ypCI0o+oNKJFgbSB9FKVdWNI2A==", + "peer": true + }, + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/internal-slot": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.1.tgz", + "integrity": "sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-builtin-module": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", + "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", + "dev": true, + "dependencies": { + "builtin-modules": "^3.3.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/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==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/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==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/isomorphic-fetch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz", + "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==", + "peer": true, + "dependencies": { + "node-fetch": "^2.6.1", + "whatwg-fetch": "^3.4.1" + } + }, + "node_modules/isomorphic-ws": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", + "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", + "peer": true, + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/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==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", + "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.4.3.tgz", + "integrity": "sha512-XvK65feuEFGZT8OO0fB/QAQS+LGHvQpaadkH5p47/j3Ocqq3xf2pK9R+G0GzgfuhXVxEv76qCOOcMb5efLk6PA==", + "dev": true, + "dependencies": { + "@jest/core": "^29.4.3", + "@jest/types": "^29.4.3", + "import-local": "^3.0.2", + "jest-cli": "^29.4.3" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.4.3.tgz", + "integrity": "sha512-Vn5cLuWuwmi2GNNbokPOEcvrXGSGrqVnPEZV7rC6P7ck07Dyw9RFnvWglnupSh+hGys0ajGtw/bc2ZgweljQoQ==", + "dev": true, + "dependencies": { + "execa": "^5.0.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.4.3.tgz", + "integrity": "sha512-Vw/bVvcexmdJ7MLmgdT3ZjkJ3LKu8IlpefYokxiqoZy6OCQ2VAm6Vk3t/qHiAGUXbdbJKJWnc8gH3ypTbB/OBw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.4.3", + "@jest/expect": "^29.4.3", + "@jest/test-result": "^29.4.3", + "@jest/types": "^29.4.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^0.7.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.4.3", + "jest-matcher-utils": "^29.4.3", + "jest-message-util": "^29.4.3", + "jest-runtime": "^29.4.3", + "jest-snapshot": "^29.4.3", + "jest-util": "^29.4.3", + "p-limit": "^3.1.0", + "pretty-format": "^29.4.3", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-cli": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.4.3.tgz", + "integrity": "sha512-PiiAPuFNfWWolCE6t3ZrDXQc6OsAuM3/tVW0u27UWc1KE+n/HSn5dSE6B2juqN7WP+PP0jAcnKtGmI4u8GMYCg==", + "dev": true, + "dependencies": { + "@jest/core": "^29.4.3", + "@jest/test-result": "^29.4.3", + "@jest/types": "^29.4.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "import-local": "^3.0.2", + "jest-config": "^29.4.3", + "jest-util": "^29.4.3", + "jest-validate": "^29.4.3", + "prompts": "^2.0.1", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-config": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.4.3.tgz", + "integrity": "sha512-eCIpqhGnIjdUCXGtLhz4gdDoxKSWXKjzNcc5r+0S1GKOp2fwOipx5mRcwa9GB/ArsxJ1jlj2lmlD9bZAsBxaWQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.4.3", + "@jest/types": "^29.4.3", + "babel-jest": "^29.4.3", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.4.3", + "jest-environment-node": "^29.4.3", + "jest-get-type": "^29.4.3", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.4.3", + "jest-runner": "^29.4.3", + "jest-util": "^29.4.3", + "jest-validate": "^29.4.3", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.4.3", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-diff": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.4.3.tgz", + "integrity": "sha512-YB+ocenx7FZ3T5O9lMVMeLYV4265socJKtkwgk/6YUz/VsEzYDkiMuMhWzZmxm3wDRQvayJu/PjkjjSkjoHsCA==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.4.3", + "jest-get-type": "^29.4.3", + "pretty-format": "^29.4.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.4.3.tgz", + "integrity": "sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg==", + "dev": true, + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.4.3.tgz", + "integrity": "sha512-1ElHNAnKcbJb/b+L+7j0/w7bDvljw4gTv1wL9fYOczeJrbTbkMGQ5iQPFJ3eFQH19VPTx1IyfePdqSpePKss7Q==", + "dev": true, + "dependencies": { + "@jest/types": "^29.4.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.4.3", + "jest-util": "^29.4.3", + "pretty-format": "^29.4.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.4.3.tgz", + "integrity": "sha512-gAiEnSKF104fsGDXNkwk49jD/0N0Bqu2K9+aMQXA6avzsA9H3Fiv1PW2D+gzbOSR705bWd2wJZRFEFpV0tXISg==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.4.3", + "@jest/fake-timers": "^29.4.3", + "@jest/types": "^29.4.3", + "@types/node": "*", + "jest-mock": "^29.4.3", + "jest-util": "^29.4.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.4.3.tgz", + "integrity": "sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.4.3.tgz", + "integrity": "sha512-eZIgAS8tvm5IZMtKlR8Y+feEOMfo2pSQkmNbufdbMzMSn9nitgGxF1waM/+LbryO3OkMcKS98SUb+j/cQxp/vQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.4.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.4.3", + "jest-util": "^29.4.3", + "jest-worker": "^29.4.3", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-haste-map/node_modules/jest-worker": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.4.3.tgz", + "integrity": "sha512-GLHN/GTAAMEy5BFdvpUfzr9Dr80zQqBrh0fz1mtRMe05hqP45+HfQltu7oTBfduD0UeZs09d+maFtFYAXFWvAA==", + "dev": true, + "dependencies": { + "@types/node": "*", + "jest-util": "^29.4.3", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-leak-detector": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.4.3.tgz", + "integrity": "sha512-9yw4VC1v2NspMMeV3daQ1yXPNxMgCzwq9BocCwYrRgXe4uaEJPAN0ZK37nFBhcy3cUwEVstFecFLaTHpF7NiGA==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.4.3", + "pretty-format": "^29.4.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.4.3.tgz", + "integrity": "sha512-TTciiXEONycZ03h6R6pYiZlSkvYgT0l8aa49z/DLSGYjex4orMUcafuLXYyyEDWB1RKglq00jzwY00Ei7yFNVg==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.4.3", + "jest-get-type": "^29.4.3", + "pretty-format": "^29.4.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.4.3.tgz", + "integrity": "sha512-1Y8Zd4ZCN7o/QnWdMmT76If8LuDv23Z1DRovBj/vcSFNlGCJGoO8D1nJDw1AdyAGUk0myDLFGN5RbNeJyCRGCw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.4.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.4.3", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-mock": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.4.3.tgz", + "integrity": "sha512-LjFgMg+xed9BdkPMyIJh+r3KeHt1klXPJYBULXVVAkbTaaKjPX1o1uVCAZADMEp/kOxGTwy/Ot8XbvgItOrHEg==", + "dev": true, + "dependencies": { + "@jest/types": "^29.4.3", + "@types/node": "*", + "jest-util": "^29.4.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.4.3.tgz", + "integrity": "sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.4.3.tgz", + "integrity": "sha512-GPokE1tzguRyT7dkxBim4wSx6E45S3bOQ7ZdKEG+Qj0Oac9+6AwJPCk0TZh5Vu0xzeX4afpb+eDmgbmZFFwpOw==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.4.3", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.4.3", + "jest-validate": "^29.4.3", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.4.3.tgz", + "integrity": "sha512-uvKMZAQ3nmXLH7O8WAOhS5l0iWyT3WmnJBdmIHiV5tBbdaDZ1wqtNX04FONGoaFvSOSHBJxnwAVnSn1WHdGVaw==", + "dev": true, + "dependencies": { + "jest-regex-util": "^29.4.3", + "jest-snapshot": "^29.4.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.4.3.tgz", + "integrity": "sha512-GWPTEiGmtHZv1KKeWlTX9SIFuK19uLXlRQU43ceOQ2hIfA5yPEJC7AMkvFKpdCHx6pNEdOD+2+8zbniEi3v3gA==", + "dev": true, + "dependencies": { + "@jest/console": "^29.4.3", + "@jest/environment": "^29.4.3", + "@jest/test-result": "^29.4.3", + "@jest/transform": "^29.4.3", + "@jest/types": "^29.4.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.4.3", + "jest-environment-node": "^29.4.3", + "jest-haste-map": "^29.4.3", + "jest-leak-detector": "^29.4.3", + "jest-message-util": "^29.4.3", + "jest-resolve": "^29.4.3", + "jest-runtime": "^29.4.3", + "jest-util": "^29.4.3", + "jest-watcher": "^29.4.3", + "jest-worker": "^29.4.3", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner/node_modules/jest-worker": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.4.3.tgz", + "integrity": "sha512-GLHN/GTAAMEy5BFdvpUfzr9Dr80zQqBrh0fz1mtRMe05hqP45+HfQltu7oTBfduD0UeZs09d+maFtFYAXFWvAA==", + "dev": true, + "dependencies": { + "@types/node": "*", + "jest-util": "^29.4.3", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner/node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/jest-runtime": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.4.3.tgz", + "integrity": "sha512-F5bHvxSH+LvLV24vVB3L8K467dt3y3dio6V3W89dUz9nzvTpqd/HcT9zfYKL2aZPvD63vQFgLvaUX/UpUhrP6Q==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.4.3", + "@jest/fake-timers": "^29.4.3", + "@jest/globals": "^29.4.3", + "@jest/source-map": "^29.4.3", + "@jest/test-result": "^29.4.3", + "@jest/transform": "^29.4.3", + "@jest/types": "^29.4.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.4.3", + "jest-message-util": "^29.4.3", + "jest-mock": "^29.4.3", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.4.3", + "jest-snapshot": "^29.4.3", + "jest-util": "^29.4.3", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.4.3.tgz", + "integrity": "sha512-NGlsqL0jLPDW91dz304QTM/SNO99lpcSYYAjNiX0Ou+sSGgkanKBcSjCfp/pqmiiO1nQaOyLp6XQddAzRcx3Xw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.4.3", + "@jest/transform": "^29.4.3", + "@jest/types": "^29.4.3", + "@types/babel__traverse": "^7.0.6", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.4.3", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.4.3", + "jest-get-type": "^29.4.3", + "jest-haste-map": "^29.4.3", + "jest-matcher-utils": "^29.4.3", + "jest-message-util": "^29.4.3", + "jest-util": "^29.4.3", + "natural-compare": "^1.4.0", + "pretty-format": "^29.4.3", + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-snapshot/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-snapshot/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/jest-util": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.4.3.tgz", + "integrity": "sha512-ToSGORAz4SSSoqxDSylWX8JzkOQR7zoBtNRsA7e+1WUX5F8jrOwaNpuh1YfJHJKDHXLHmObv5eOjejUd+/Ws+Q==", + "dev": true, + "dependencies": { + "@jest/types": "^29.4.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.4.3.tgz", + "integrity": "sha512-J3u5v7aPQoXPzaar6GndAVhdQcZr/3osWSgTeKg5v574I9ybX/dTyH0AJFb5XgXIB7faVhf+rS7t4p3lL9qFaw==", + "dev": true, + "dependencies": { + "@jest/types": "^29.4.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.4.3", + "leven": "^3.1.0", + "pretty-format": "^29.4.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-watcher": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.4.3.tgz", + "integrity": "sha512-zwlXH3DN3iksoIZNk73etl1HzKyi5FuQdYLnkQKm5BW4n8HpoG59xSwpVdFrnh60iRRaRBGw0gcymIxjJENPcA==", + "dev": true, + "dependencies": { + "@jest/test-result": "^29.4.3", + "@jest/types": "^29.4.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.4.3", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/js-sdsl": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz", + "integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/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==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/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==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "dependencies": { + "tmpl": "1.0.5" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/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==", + "peer": true + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", + "peer": true + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "peer": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true + }, + "node_modules/node-fetch": { + "version": "2.6.13", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.13.tgz", + "integrity": "sha512-StxNAxh15zr77QvvkmveSQ8uCQ4+v5FkvNTj0OESmiHu+VRi/gXArXtkWMElOsOUNLtUEvI4yS+rdtOHZTwlQA==", + "peer": true, + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true + }, + "node_modules/node-releases": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", + "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", + "dev": true + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.entries": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.6.tgz", + "integrity": "sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.values": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", + "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/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==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/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==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/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==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", + "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", + "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/pretty-format": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.4.3.tgz", + "integrity": "sha512-cvpcHTc42lcsvOOAzd3XuNWTcvk1Jmnzqeu+WsOuiPmxUJTnkbAcFNsRKvEpBEUFVUgy/GTZLulZDcDEi+CIlA==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.4.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/reflect-metadata": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", + "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==", + "peer": true + }, + "node_modules/regexp-tree": { + "version": "0.1.24", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.24.tgz", + "integrity": "sha512-s2aEVuLhvnVJW6s/iPgEGK6R+/xngd2jNQ+xy4bXNDKxZKJH6jpPHY6kVeVv1IeLCHgswRj+Kl3ELaDjG6V1iw==", + "dev": true, + "bin": { + "regexp-tree": "bin/regexp-tree" + } + }, + "node_modules/regexp.prototype.flags": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/regjsparser": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", + "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", + "dev": true, + "dependencies": { + "jsesc": "~0.5.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve.exports": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.0.tgz", + "integrity": "sha512-6K/gDlqgQscOlg9fSRpWstA8sYe8rbELsSTNpx+3kTrsVCzvSl0zIvRErM7fdl9ERWDsKnrLnwB+Ne89918XOg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz", + "integrity": "sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==", + "dev": true, + "dependencies": { + "regexp-tree": "~0.1.1" + } + }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "peer": true + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz", + "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==", + "dev": true + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/strict-event-emitter-types": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strict-event-emitter-types/-/strict-event-emitter-types-2.0.0.tgz", + "integrity": "sha512-Nk/brWYpD85WlOgzw5h173aci0Teyv8YdIAEtV+N88nDB0dLlazZyJMIsN6eo1/AR61l+p6CJTG1JIyFaoNEEA==", + "peer": true + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/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==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/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==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "peer": true + }, + "node_modules/ts-jest": { + "version": "29.0.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.0.5.tgz", + "integrity": "sha512-PL3UciSgIpQ7f6XjVOmbi96vmDHUqAyqDr8YxzopDqX3kfgYtX1cuNeBjP+L9sFXi6nzsGGA6R3fP3DDDJyrxA==", + "dev": true, + "dependencies": { + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "7.x", + "yargs-parser": "^21.0.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", + "jest": "^29.0.0", + "typescript": ">=4.3" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + } + } + }, + "node_modules/ts-jest/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ts-jest/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ts-jest/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/ts-node/node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ts-results": { + "name": "@casperlabs/ts-results", + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/@casperlabs/ts-results/-/ts-results-3.3.5.tgz", + "integrity": "sha512-ymSQqqb4mOSet592li02u1Gd28LoOFJUm6R3jkdNQ+nqsnbHvN+izBigtP4aYmNwh6gFyCwDgjYporEJgDT4eA==", + "peer": true, + "dependencies": { + "tslib": "^2.4.1" + } + }, + "node_modules/tsconfig-paths": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", + "integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==", + "dev": true, + "peer": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tsconfig-paths/node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "peer": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/tsconfig-paths/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", + "peer": true + }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/tsutils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/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==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typedjson": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/typedjson/-/typedjson-1.8.0.tgz", + "integrity": "sha512-taVJVGebQDagEmVc3Cu6vVVLkWLnxqPcTrkVgbpAsI02ZDDrnHy5zvt1JVqXv4/yztBgZAX1oR07+bkiusGJLQ==", + "peer": true, + "dependencies": { + "tslib": "^2.0.1" + } + }, + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", + "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist-lint": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, + "node_modules/v8-to-istanbul": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", + "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/v8-to-istanbul/node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "peer": true + }, + "node_modules/whatwg-fetch": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz", + "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==", + "peer": true + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "peer": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/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==", + "dev": true, + "dependencies": { + "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" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/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==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "peer": true, + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/yargs": { + "version": "17.7.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.0.tgz", + "integrity": "sha512-dwqOPg5trmrre9+v8SUo2q/hAwyKoVfu8OC1xPHKJGNdxAvPl4sKxL4vBnh3bQz/ZvvGAFeA5H3ou2kcOY8sQQ==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/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==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + }, + "dependencies": { + "@ampproject/remapping": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "dependencies": { + "@jridgewell/gen-mapping": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + } + } + }, + "@babel/code-frame": { + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "dev": true, + "requires": { + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/compat-data": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.21.0.tgz", + "integrity": "sha512-gMuZsmsgxk/ENC3O/fRw5QY8A9/uxQbbCEypnLIiYYc/qVJtEV7ouxC3EllIIwNzMqAQee5tanFabWsUOutS7g==", + "dev": true + }, + "@babel/core": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.21.0.tgz", + "integrity": "sha512-PuxUbxcW6ZYe656yL3EAhpy7qXKq0DmYsrJLpbB8XrsCP9Nm+XCg9XFMb5vIDliPD7+U/+M+QJlH17XOcB7eXA==", + "dev": true, + "requires": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.21.0", + "@babel/helper-compilation-targets": "^7.20.7", + "@babel/helper-module-transforms": "^7.21.0", + "@babel/helpers": "^7.21.0", + "@babel/parser": "^7.21.0", + "@babel/template": "^7.20.7", + "@babel/traverse": "^7.21.0", + "@babel/types": "^7.21.0", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.2", + "semver": "^6.3.0" + }, + "dependencies": { + "convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", + "dev": true, + "requires": { + "@babel/types": "^7.23.0", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz", + "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.20.5", + "@babel/helper-validator-option": "^7.18.6", + "browserslist": "^4.21.3", + "lru-cache": "^5.1.1", + "semver": "^6.3.0" + } + }, + "@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "dev": true + }, + "@babel/helper-function-name": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", + "dev": true, + "requires": { + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-module-imports": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-module-transforms": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.21.0.tgz", + "integrity": "sha512-eD/JQ21IG2i1FraJnTMbUarAUkA7G988ofehG5MDCRXaUU91rEBJuCeSoou2Sk1y4RbLYXzqEg1QLwEmRU4qcQ==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-simple-access": "^7.20.2", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.19.1", + "@babel/template": "^7.20.7", + "@babel/traverse": "^7.21.0", + "@babel/types": "^7.21.0" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz", + "integrity": "sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==", + "dev": true + }, + "@babel/helper-simple-access": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz", + "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==", + "dev": true, + "requires": { + "@babel/types": "^7.20.2" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "dev": true + }, + "@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz", + "integrity": "sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==", + "dev": true + }, + "@babel/helpers": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.21.0.tgz", + "integrity": "sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA==", + "dev": true, + "requires": { + "@babel/template": "^7.20.7", + "@babel/traverse": "^7.21.0", + "@babel/types": "^7.21.0" + } + }, + "@babel/highlight": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/parser": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", + "dev": true + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-jsx": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz", + "integrity": "sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-typescript": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.20.0.tgz", + "integrity": "sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.19.0" + } + }, + "@babel/template": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" + } + }, + "@babel/traverse": { + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + } + }, + "@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "dependencies": { + "@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + } + } + }, + "@eslint-community/eslint-utils": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.1.2.tgz", + "integrity": "sha512-7qELuQWWjVDdVsFQ5+beUl+KPczrEDA7S3zM4QUd/bJl7oXgsmpXaEVqrRTnOBqenOV4rWf2kVZk2Ot085zPWA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^3.3.0" + } + }, + "@eslint/eslintrc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz", + "integrity": "sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.4.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "globals": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } + } + }, + "@ethersproject/bignumber": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.7.0.tgz", + "integrity": "sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==", + "requires": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "bn.js": "^5.2.1" + } + }, + "@ethersproject/bytes": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.7.0.tgz", + "integrity": "sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==", + "requires": { + "@ethersproject/logger": "^5.7.0" + } + }, + "@ethersproject/constants": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.7.0.tgz", + "integrity": "sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==", + "peer": true, + "requires": { + "@ethersproject/bignumber": "^5.7.0" + } + }, + "@ethersproject/logger": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.7.0.tgz", + "integrity": "sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==" + }, + "@humanwhocodes/config-array": { + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + } + }, + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true + }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + } + }, + "@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true + }, + "@jest/console": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.4.3.tgz", + "integrity": "sha512-W/o/34+wQuXlgqlPYTansOSiBnuxrTv61dEVkA6HNmpcgHLUjfaUbdqt6oVvOzaawwo9IdW9QOtMgQ1ScSZC4A==", + "dev": true, + "requires": { + "@jest/types": "^29.4.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.4.3", + "jest-util": "^29.4.3", + "slash": "^3.0.0" + } + }, + "@jest/core": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.4.3.tgz", + "integrity": "sha512-56QvBq60fS4SPZCuM7T+7scNrkGIe7Mr6PVIXUpu48ouvRaWOFqRPV91eifvFM0ay2HmfswXiGf97NGUN5KofQ==", + "dev": true, + "requires": { + "@jest/console": "^29.4.3", + "@jest/reporters": "^29.4.3", + "@jest/test-result": "^29.4.3", + "@jest/transform": "^29.4.3", + "@jest/types": "^29.4.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.4.3", + "jest-config": "^29.4.3", + "jest-haste-map": "^29.4.3", + "jest-message-util": "^29.4.3", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.4.3", + "jest-resolve-dependencies": "^29.4.3", + "jest-runner": "^29.4.3", + "jest-runtime": "^29.4.3", + "jest-snapshot": "^29.4.3", + "jest-util": "^29.4.3", + "jest-validate": "^29.4.3", + "jest-watcher": "^29.4.3", + "micromatch": "^4.0.4", + "pretty-format": "^29.4.3", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "@jest/environment": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.4.3.tgz", + "integrity": "sha512-dq5S6408IxIa+lr54zeqce+QgI+CJT4nmmA+1yzFgtcsGK8c/EyiUb9XQOgz3BMKrRDfKseeOaxj2eO8LlD3lA==", + "dev": true, + "requires": { + "@jest/fake-timers": "^29.4.3", + "@jest/types": "^29.4.3", + "@types/node": "*", + "jest-mock": "^29.4.3" + } + }, + "@jest/expect": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.4.3.tgz", + "integrity": "sha512-iktRU/YsxEtumI9zsPctYUk7ptpC+AVLLk1Ax3AsA4g1C+8OOnKDkIQBDHtD5hA/+VtgMd5AWI5gNlcAlt2vxQ==", + "dev": true, + "requires": { + "expect": "^29.4.3", + "jest-snapshot": "^29.4.3" + } + }, + "@jest/expect-utils": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.4.3.tgz", + "integrity": "sha512-/6JWbkxHOP8EoS8jeeTd9dTfc9Uawi+43oLKHfp6zzux3U2hqOOVnV3ai4RpDYHOccL6g+5nrxpoc8DmJxtXVQ==", + "dev": true, + "requires": { + "jest-get-type": "^29.4.3" + } + }, + "@jest/fake-timers": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.4.3.tgz", + "integrity": "sha512-4Hote2MGcCTWSD2gwl0dwbCpBRHhE6olYEuTj8FMowdg3oQWNKr2YuxenPQYZ7+PfqPY1k98wKDU4Z+Hvd4Tiw==", + "dev": true, + "requires": { + "@jest/types": "^29.4.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.4.3", + "jest-mock": "^29.4.3", + "jest-util": "^29.4.3" + } + }, + "@jest/globals": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.4.3.tgz", + "integrity": "sha512-8BQ/5EzfOLG7AaMcDh7yFCbfRLtsc+09E1RQmRBI4D6QQk4m6NSK/MXo+3bJrBN0yU8A2/VIcqhvsOLFmziioA==", + "dev": true, + "requires": { + "@jest/environment": "^29.4.3", + "@jest/expect": "^29.4.3", + "@jest/types": "^29.4.3", + "jest-mock": "^29.4.3" + } + }, + "@jest/reporters": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.4.3.tgz", + "integrity": "sha512-sr2I7BmOjJhyqj9ANC6CTLsL4emMoka7HkQpcoMRlhCbQJjz2zsRzw0BDPiPyEFDXAbxKgGFYuQZiSJ1Y6YoTg==", + "dev": true, + "requires": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.4.3", + "@jest/test-result": "^29.4.3", + "@jest/transform": "^29.4.3", + "@jest/types": "^29.4.3", + "@jridgewell/trace-mapping": "^0.3.15", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.4.3", + "jest-util": "^29.4.3", + "jest-worker": "^29.4.3", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "dependencies": { + "jest-worker": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.4.3.tgz", + "integrity": "sha512-GLHN/GTAAMEy5BFdvpUfzr9Dr80zQqBrh0fz1mtRMe05hqP45+HfQltu7oTBfduD0UeZs09d+maFtFYAXFWvAA==", + "dev": true, + "requires": { + "@types/node": "*", + "jest-util": "^29.4.3", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + } + } + } + }, + "@jest/schemas": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.4.3.tgz", + "integrity": "sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.25.16" + } + }, + "@jest/source-map": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.4.3.tgz", + "integrity": "sha512-qyt/mb6rLyd9j1jUts4EQncvS6Yy3PM9HghnNv86QBlV+zdL2inCdK1tuVlL+J+lpiw2BI67qXOrX3UurBqQ1w==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.15", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + } + }, + "@jest/test-result": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.4.3.tgz", + "integrity": "sha512-Oi4u9NfBolMq9MASPwuWTlC5WvmNRwI4S8YrQg5R5Gi47DYlBe3sh7ILTqi/LGrK1XUE4XY9KZcQJTH1WJCLLA==", + "dev": true, + "requires": { + "@jest/console": "^29.4.3", + "@jest/types": "^29.4.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/test-sequencer": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.4.3.tgz", + "integrity": "sha512-yi/t2nES4GB4G0mjLc0RInCq/cNr9dNwJxcGg8sslajua5Kb4kmozAc+qPLzplhBgfw1vLItbjyHzUN92UXicw==", + "dev": true, + "requires": { + "@jest/test-result": "^29.4.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.4.3", + "slash": "^3.0.0" + } + }, + "@jest/transform": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.4.3.tgz", + "integrity": "sha512-8u0+fBGWolDshsFgPQJESkDa72da/EVwvL+II0trN2DR66wMwiQ9/CihaGfHdlLGFzbBZwMykFtxuwFdZqlKwg==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.4.3", + "@jridgewell/trace-mapping": "^0.3.15", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.4.3", + "jest-regex-util": "^29.4.3", + "jest-util": "^29.4.3", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + } + }, + "@jest/types": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.4.3.tgz", + "integrity": "sha512-bPYfw8V65v17m2Od1cv44FH+SiKW7w2Xu7trhcdTLUmSv85rfKsP+qXSjO4KGJr4dtPSzl/gvslZBXctf1qGEA==", + "dev": true, + "requires": { + "@jest/schemas": "^29.4.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", + "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "@noble/curves": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.6.0.tgz", + "integrity": "sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==", + "peer": true, + "requires": { + "@noble/hashes": "1.5.0" + } + }, + "@noble/ed25519": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/@noble/ed25519/-/ed25519-1.7.3.tgz", + "integrity": "sha512-iR8GBkDt0Q3GyaVcIu7mSsVIqnFbkbRzGLWlvhwunacoLwt4J3swfKhfaM6rN6WY+TBGoYT1GtT1mIh2/jGbRQ==", + "peer": true + }, + "@noble/hashes": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz", + "integrity": "sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==" + }, + "@noble/secp256k1": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz", + "integrity": "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==", + "peer": true + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@open-rpc/client-js": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@open-rpc/client-js/-/client-js-1.8.1.tgz", + "integrity": "sha512-vV+Hetl688nY/oWI9IFY0iKDrWuLdYhf7OIKI6U1DcnJV7r4gAgwRJjEr1QVYszUc0gjkHoQJzqevmXMGLyA0g==", + "peer": true, + "requires": { + "isomorphic-fetch": "^3.0.0", + "isomorphic-ws": "^5.0.0", + "strict-event-emitter-types": "^2.0.0", + "ws": "^7.0.0" + } + }, + "@scure/base": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.8.tgz", + "integrity": "sha512-6CyAclxj3Nb0XT7GHK6K4zK6k2xJm6E4Ft0Ohjt4WgegiFUHEtFb2CGzmPmGBwoIhrLsqNLYfLr04Y1GePrzZg==", + "peer": true + }, + "@scure/bip32": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.5.0.tgz", + "integrity": "sha512-8EnFYkqEQdnkuGBVpCzKxyIwDCBLDVj3oiX0EKUFre/tOjL/Hqba1D6n/8RcmaQy4f95qQFrO2A8Sr6ybh4NRw==", + "peer": true, + "requires": { + "@noble/curves": "~1.6.0", + "@noble/hashes": "~1.5.0", + "@scure/base": "~1.1.7" + } + }, + "@scure/bip39": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.4.0.tgz", + "integrity": "sha512-BEEm6p8IueV/ZTfQLp/0vhw4NPnT9oWf5+28nvmeUICjP99f4vr2d+qc7AVGDDtwRep6ifR43Yed9ERVmiITzw==", + "peer": true, + "requires": { + "@noble/hashes": "~1.5.0", + "@scure/base": "~1.1.8" + } + }, + "@sinclair/typebox": { + "version": "0.25.23", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.25.23.tgz", + "integrity": "sha512-VEB8ygeP42CFLWyAJhN5OklpxUliqdNEUcXb4xZ/CINqtYGTjL5ukluKdKzQ0iWdUxyQ7B0539PAUhHKrCNWSQ==", + "dev": true + }, + "@sinonjs/commons": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.0.2.tgz", + "integrity": "sha512-SwUDyjWnah1AaNl7kxsa7cfLhlTYoiyhDAIgyh+El30YvXs/o7OLXpYH88Zdhyx9JExKrmHDJ+10bwIcY80Jmw==", + "dev": true, + "requires": { + "@sinonjs/commons": "^2.0.0" + } + }, + "@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true + }, + "@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "@tsconfig/node16": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", + "dev": true + }, + "@types/babel__core": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.0.tgz", + "integrity": "sha512-+n8dL/9GWblDO0iU6eZAwEIJVr5DWigtle+Q6HLOrh/pdbXOhOtqzq8VPPE2zvNJzSKY4vH/z3iT3tn0A3ypiQ==", + "dev": true, + "requires": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "@types/babel__generator": { + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", + "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@types/babel__template": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", + "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "dev": true, + "requires": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@types/babel__traverse": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.3.tgz", + "integrity": "sha512-1kbcJ40lLB7MHsj39U4Sh1uTd2E7rLEa79kmDpI6cy+XiXsteB3POdQomoq4FxszMrO3ZYchkhYJw7A2862b3w==", + "dev": true, + "requires": { + "@babel/types": "^7.3.0" + } + }, + "@types/graceful-fs": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", + "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/istanbul-lib-coverage": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", + "dev": true + }, + "@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "*" + } + }, + "@types/istanbul-reports": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "dev": true, + "requires": { + "@types/istanbul-lib-report": "*" + } + }, + "@types/jest": { + "version": "29.4.0", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.4.0.tgz", + "integrity": "sha512-VaywcGQ9tPorCX/Jkkni7RWGFfI11whqzs8dvxF41P17Z+z872thvEvlIbznjPJ02kl1HMX3LmLOonsj2n7HeQ==", + "dev": true, + "requires": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, + "@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true, + "peer": true + }, + "@types/node": { + "version": "18.14.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.0.tgz", + "integrity": "sha512-5EWrvLmglK+imbCJY0+INViFWUHg1AHel1sq4ZVSfdcNqGy9Edv3UB9IIzzg+xPaUcAgZYcfVs2fBcwDeZzU0A==" + }, + "@types/normalize-package-data": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", + "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", + "dev": true + }, + "@types/prettier": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.2.tgz", + "integrity": "sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg==", + "dev": true + }, + "@types/semver": { + "version": "7.3.13", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", + "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", + "dev": true + }, + "@types/stack-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", + "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "dev": true + }, + "@types/ws": { + "version": "8.5.4", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", + "integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==", + "peer": true, + "requires": { + "@types/node": "*" + } + }, + "@types/yargs": { + "version": "17.0.22", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.22.tgz", + "integrity": "sha512-pet5WJ9U8yPVRhkwuEIp5ktAeAqRZOq4UdAyWLWzxbtpyXnzbtLdKiXAjJzi/KLmPGS9wk86lUFWZFN6sISo4g==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "@types/yargs-parser": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", + "dev": true + }, + "@typescript-eslint/eslint-plugin": { + "version": "5.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.53.0.tgz", + "integrity": "sha512-alFpFWNucPLdUOySmXCJpzr6HKC3bu7XooShWM+3w/EL6J2HIoB2PFxpLnq4JauWVk6DiVeNKzQlFEaE+X9sGw==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "5.53.0", + "@typescript-eslint/type-utils": "5.53.0", + "@typescript-eslint/utils": "5.53.0", + "debug": "^4.3.4", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "regexpp": "^3.2.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "@typescript-eslint/parser": { + "version": "5.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.53.0.tgz", + "integrity": "sha512-MKBw9i0DLYlmdOb3Oq/526+al20AJZpANdT6Ct9ffxcV8nKCHz63t/S0IhlTFNsBIHJv+GY5SFJ0XfqVeydQrQ==", + "dev": true, + "peer": true, + "requires": { + "@typescript-eslint/scope-manager": "5.53.0", + "@typescript-eslint/types": "5.53.0", + "@typescript-eslint/typescript-estree": "5.53.0", + "debug": "^4.3.4" + } + }, + "@typescript-eslint/scope-manager": { + "version": "5.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.53.0.tgz", + "integrity": "sha512-Opy3dqNsp/9kBBeCPhkCNR7fmdSQqA+47r21hr9a14Bx0xnkElEQmhoHga+VoaoQ6uDHjDKmQPIYcUcKJifS7w==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.53.0", + "@typescript-eslint/visitor-keys": "5.53.0" + } + }, + "@typescript-eslint/type-utils": { + "version": "5.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.53.0.tgz", + "integrity": "sha512-HO2hh0fmtqNLzTAme/KnND5uFNwbsdYhCZghK2SoxGp3Ifn2emv+hi0PBUjzzSh0dstUIFqOj3bp0AwQlK4OWw==", + "dev": true, + "requires": { + "@typescript-eslint/typescript-estree": "5.53.0", + "@typescript-eslint/utils": "5.53.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/types": { + "version": "5.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.53.0.tgz", + "integrity": "sha512-5kcDL9ZUIP756K6+QOAfPkigJmCPHcLN7Zjdz76lQWWDdzfOhZDTj1irs6gPBKiXx5/6O3L0+AvupAut3z7D2A==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.53.0.tgz", + "integrity": "sha512-eKmipH7QyScpHSkhbptBBYh9v8FxtngLquq292YTEQ1pxVs39yFBlLC1xeIZcPPz1RWGqb7YgERJRGkjw8ZV7w==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.53.0", + "@typescript-eslint/visitor-keys": "5.53.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "@typescript-eslint/utils": { + "version": "5.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.53.0.tgz", + "integrity": "sha512-VUOOtPv27UNWLxFwQK/8+7kvxVC+hPHNsJjzlJyotlaHjLSIgOCKj9I0DBUjwOOA64qjBwx5afAPjksqOxMO0g==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.53.0", + "@typescript-eslint/types": "5.53.0", + "@typescript-eslint/typescript-estree": "5.53.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0", + "semver": "^7.3.7" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.53.0.tgz", + "integrity": "sha512-JqNLnX3leaHFZEN0gCh81sIvgrp/2GOACZNgO4+Tkf64u51kTpAyWFOY8XHx8XuXr3N2C9zgPPHtcpMg6z1g0w==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.53.0", + "eslint-visitor-keys": "^3.3.0" + } + }, + "acorn": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "dev": true, + "peer": true + }, + "acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "requires": {} + }, + "acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "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-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "requires": { + "type-fest": "^0.21.3" + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "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==", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "array-includes": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", + "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", + "is-string": "^1.0.7" + } + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "array.prototype.flat": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", + "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + } + }, + "array.prototype.flatmap": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", + "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.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==", + "peer": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + }, + "dependencies": { + "bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "peer": true + } + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true + }, + "axios": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.9.0.tgz", + "integrity": "sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==", + "requires": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "babel-jest": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.4.3.tgz", + "integrity": "sha512-o45Wyn32svZE+LnMVWv/Z4x0SwtLbh4FyGcYtR20kIWd+rdrDZ9Fzq8Ml3MYLD+mZvEdzCjZsCnYZ2jpJyQ+Nw==", + "dev": true, + "requires": { + "@jest/transform": "^29.4.3", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.4.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + } + }, + "babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + } + }, + "babel-plugin-jest-hoist": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.4.3.tgz", + "integrity": "sha512-mB6q2q3oahKphy5V7CpnNqZOCkxxZ9aokf1eh82Dy3jQmg4xvM1tGrh5y6BQUJh4a3Pj9+eLfwvAZ7VNKg7H8Q==", + "dev": true, + "requires": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + } + }, + "babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "requires": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + } + }, + "babel-preset-jest": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.4.3.tgz", + "integrity": "sha512-gWx6COtSuma6n9bw+8/F+2PCXrIgxV/D1TJFnp6OyBK2cxPWg0K9p/sriNYeifKjpUkMViWQ09DSWtzJQRETsw==", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "^29.4.3", + "babel-preset-current-node-syntax": "^1.0.0" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "blakejs": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", + "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==" + }, + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, + "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==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", + "peer": true + }, + "browserslist": { + "version": "4.21.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", + "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001449", + "electron-to-chromium": "^1.4.284", + "node-releases": "^2.0.8", + "update-browserslist-db": "^1.0.10" + } + }, + "bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "requires": { + "fast-json-stable-stringify": "2.x" + } + }, + "bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "requires": { + "node-int64": "^0.4.0" + } + }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "builtin-modules": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", + "dev": true + }, + "builtins": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", + "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", + "dev": true, + "requires": { + "semver": "^7.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "requires": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30001457", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001457.tgz", + "integrity": "sha512-SDIV6bgE1aVbK6XyxdURbUE89zY7+k1BBBaOwYwkNCglXlel/E7mELiHC64HQ+W0xSKlqWhV9Wh7iHxUjMs4fA==", + "dev": true + }, + "casper-js-sdk": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/casper-js-sdk/-/casper-js-sdk-5.0.6.tgz", + "integrity": "sha512-JomiNjcOk1GchBfG8pTGGeOhWCRjdZMDiYWR0NI6UeJMliUb0xfxMmQ5D6/bIQ6dqPxeNluGI/YjY7t5Rh6hLA==", + "peer": true, + "requires": { + "@ethersproject/bignumber": "^5.0.8", + "@ethersproject/bytes": "^5.0.5", + "@ethersproject/constants": "^5.0.5", + "@noble/curves": "^1.1.0", + "@noble/ed25519": "^1.7.3", + "@noble/hashes": "^1.2.0", + "@noble/secp256k1": "^1.7.1", + "@open-rpc/client-js": "^1.8.1", + "@scure/bip32": "^1.1.5", + "@scure/bip39": "^1.2.0", + "@types/ws": "^8.2.2", + "asn1.js": "^5.4.1", + "axios": "^1.8.4", + "bn.js": "^5.2.1", + "elliptic": "6.6.1", + "eventsource": "^2.0.2", + "glob": "^7.1.6", + "humanize-duration": "^3.24.0", + "lodash": "^4.17.21", + "node-fetch": "2.6.13", + "reflect-metadata": "^0.1.13", + "ts-results": "npm:@casperlabs/ts-results@^3.3.4", + "typedjson": "^1.6.0-rc2" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "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==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true + }, + "ci-info": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "dev": true + }, + "cjs-module-lexer": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", + "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", + "dev": true + }, + "clean-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz", + "integrity": "sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + }, + "dependencies": { + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + } + } + }, + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true + }, + "collect-v8-coverage": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", + "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "dev": true + }, + "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==", + "dev": true, + "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==", + "dev": true + }, + "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": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "confusing-browser-globals": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", + "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", + "dev": true + }, + "convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "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==", + "dev": true + }, + "cross-env": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.1" + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", + "dev": true + }, + "deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "deepmerge": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.0.tgz", + "integrity": "sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og==", + "dev": true + }, + "define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dev": true, + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, + "detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "diff-sequences": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.4.3.tgz", + "integrity": "sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==", + "dev": true + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "dotenv": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", + "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==", + "dev": true + }, + "dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "requires": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + } + }, + "electron-to-chromium": { + "version": "1.4.304", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.304.tgz", + "integrity": "sha512-6c8M+ojPgDIXN2NyfGn8oHASXYnayj+gSEnGeLMKb9zjsySeVB/j7KkNAAG9yDcv8gNlhvFg5REa1N/kQU6pgA==", + "dev": true + }, + "elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "peer": true, + "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" + }, + "dependencies": { + "bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "peer": true + } + } + }, + "emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true + }, + "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==", + "dev": true + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.21.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.1.tgz", + "integrity": "sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.3", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.4", + "is-array-buffer": "^3.0.1", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.2", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "safe-regex-test": "^1.0.0", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.9" + } + }, + "es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==" + }, + "es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" + }, + "es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "requires": { + "es-errors": "^1.3.0" + } + }, + "es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "requires": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + } + }, + "es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "peer": true, + "requires": { + "has": "^1.0.3" + } + }, + "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==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true + }, + "eslint": { + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.34.0.tgz", + "integrity": "sha512-1Z8iFsucw+7kSqXNZVslXS8Ioa4u2KM7GPwuKtkTFAqZ/cHMcEaR+1+Br0wLlot49cNxIiZk5wp8EAbPcYZxTg==", + "dev": true, + "requires": { + "@eslint/eslintrc": "^1.4.1", + "@humanwhocodes/config-array": "^0.11.8", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.4.0", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-sdsl": "^4.1.4", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0" + }, + "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "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==", + "dev": true + }, + "eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + }, + "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==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "globals": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "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==", + "dev": true, + "requires": { + "p-locate": "^5.0.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==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } + } + }, + "eslint-config-airbnb-base": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", + "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", + "dev": true, + "requires": { + "confusing-browser-globals": "^1.0.10", + "object.assign": "^4.1.2", + "object.entries": "^1.1.5", + "semver": "^6.3.0" + } + }, + "eslint-config-airbnb-typescript": { + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-typescript/-/eslint-config-airbnb-typescript-17.0.0.tgz", + "integrity": "sha512-elNiuzD0kPAPTXjFWg+lE24nMdHMtuxgYoD30OyMD6yrW1AhFZPAg27VX7d3tzOErw+dgJTNWfRSDqEcXb4V0g==", + "dev": true, + "requires": { + "eslint-config-airbnb-base": "^15.0.0" + } + }, + "eslint-config-prettier": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz", + "integrity": "sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==", + "dev": true, + "requires": {} + }, + "eslint-import-resolver-node": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", + "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", + "dev": true, + "peer": true, + "requires": { + "debug": "^3.2.7", + "is-core-module": "^2.11.0", + "resolve": "^1.22.1" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "peer": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "eslint-module-utils": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz", + "integrity": "sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==", + "dev": true, + "peer": true, + "requires": { + "debug": "^3.2.7" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "peer": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "eslint-plugin-es": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz", + "integrity": "sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==", + "dev": true, + "requires": { + "eslint-utils": "^2.0.0", + "regexpp": "^3.0.0" + }, + "dependencies": { + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, + "eslint-plugin-eslint-comments": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz", + "integrity": "sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "ignore": "^5.0.5" + }, + "dependencies": { + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + } + } + }, + "eslint-plugin-import": { + "version": "2.27.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", + "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", + "dev": true, + "peer": true, + "requires": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.7.4", + "has": "^1.0.3", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.6", + "resolve": "^1.22.1", + "semver": "^6.3.0", + "tsconfig-paths": "^3.14.1" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "peer": true, + "requires": { + "ms": "^2.1.1" + } + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "peer": true, + "requires": { + "esutils": "^2.0.2" + } + } + } + }, + "eslint-plugin-jest": { + "version": "27.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.2.1.tgz", + "integrity": "sha512-l067Uxx7ZT8cO9NJuf+eJHvt6bqJyz2Z29wykyEdz/OtmcELQl2MQGQLX8J94O1cSJWAwUSEvCjwjA7KEK3Hmg==", + "dev": true, + "requires": { + "@typescript-eslint/utils": "^5.10.0" + } + }, + "eslint-plugin-n": { + "version": "15.6.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.6.1.tgz", + "integrity": "sha512-R9xw9OtCRxxaxaszTQmQAlPgM+RdGjaL1akWuY/Fv9fRAi8Wj4CUKc6iYVG8QNRjRuo8/BqVYIpfqberJUEacA==", + "dev": true, + "requires": { + "builtins": "^5.0.1", + "eslint-plugin-es": "^4.1.0", + "eslint-utils": "^3.0.0", + "ignore": "^5.1.1", + "is-core-module": "^2.11.0", + "minimatch": "^3.1.2", + "resolve": "^1.22.1", + "semver": "^7.3.8" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "eslint-plugin-promise": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz", + "integrity": "sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==", + "dev": true, + "requires": {} + }, + "eslint-plugin-simple-import-sort": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-10.0.0.tgz", + "integrity": "sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==", + "dev": true, + "requires": {} + }, + "eslint-plugin-unicorn": { + "version": "45.0.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-45.0.2.tgz", + "integrity": "sha512-Y0WUDXRyGDMcKLiwgL3zSMpHrXI00xmdyixEGIg90gHnj0PcHY4moNv3Ppje/kDivdAy5vUeUr7z211ImPv2gw==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.19.1", + "@eslint-community/eslint-utils": "^4.1.2", + "ci-info": "^3.6.1", + "clean-regexp": "^1.0.0", + "esquery": "^1.4.0", + "indent-string": "^4.0.0", + "is-builtin-module": "^3.2.0", + "jsesc": "^3.0.2", + "lodash": "^4.17.21", + "pluralize": "^8.0.0", + "read-pkg-up": "^7.0.1", + "regexp-tree": "^0.1.24", + "regjsparser": "^0.9.1", + "safe-regex": "^2.1.1", + "semver": "^7.3.8", + "strip-indent": "^3.0.0" + }, + "dependencies": { + "jsesc": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "eslint-plugin-unused-imports": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-2.0.0.tgz", + "integrity": "sha512-3APeS/tQlTrFa167ThtP0Zm0vctjr4M44HMpeg1P4bK6wItarumq0Ma82xorMKdFsWpphQBlRPzw/pxiVELX1A==", + "dev": true, + "requires": { + "eslint-rule-composer": "^0.3.0" + } + }, + "eslint-rule-composer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz", + "integrity": "sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==", + "dev": true + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + } + } + }, + "eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true + }, + "espree": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", + "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", + "dev": true, + "requires": { + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" + }, + "dependencies": { + "acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true + } + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.2.tgz", + "integrity": "sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "eventsource": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-2.0.2.tgz", + "integrity": "sha512-IzUmBGPR3+oUG9dUeXynyNmf91/3zUSJg1lCktzKw47OXuhco54U3r9B7O4XX+Rb1Itm9OZ2b0RkTs10bICOxA==", + "peer": true + }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true + }, + "expect": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.4.3.tgz", + "integrity": "sha512-uC05+Q7eXECFpgDrHdXA4k2rpMyStAYPItEDLyQDo5Ta7fVkJnNA/4zh/OIVkVVNZ1oOK1PipQoyNjuZ6sz6Dg==", + "dev": true, + "requires": { + "@jest/expect-utils": "^29.4.3", + "jest-get-type": "^29.4.3", + "jest-matcher-utils": "^29.4.3", + "jest-message-util": "^29.4.3", + "jest-util": "^29.4.3" + } + }, + "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==", + "dev": true + }, + "fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } + } + }, + "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==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "requires": { + "bser": "2.1.1" + } + }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, + "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==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true + }, + "follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==" + }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "requires": { + "is-callable": "^1.1.3" + } + }, + "form-data": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", + "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "mime-types": "^2.1.12" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" + }, + "function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + } + }, + "functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true + }, + "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==", + "dev": true + }, + "get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "requires": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + } + }, + "get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true + }, + "get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "requires": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + } + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3" + } + }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, + "gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==" + }, + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, + "grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.1" + } + }, + "has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true + }, + "has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==" + }, + "has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "requires": { + "has-symbols": "^1.0.3" + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "peer": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "requires": { + "function-bind": "^1.1.2" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "peer": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true + }, + "humanize-duration": { + "version": "3.28.0", + "resolved": "https://registry.npmjs.org/humanize-duration/-/humanize-duration-3.28.0.tgz", + "integrity": "sha512-jMAxraOOmHuPbffLVDKkEKi/NeG8dMqP8lGRd6Tbf7JgAeG33jjgPWDbXXU7ypCI0o+oNKJFgbSB9FKVdWNI2A==", + "peer": true + }, + "ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + } + } + }, + "import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, + "requires": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true + }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "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==" + }, + "internal-slot": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "dev": true, + "requires": { + "get-intrinsic": "^1.2.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + } + }, + "is-array-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.1.tgz", + "integrity": "sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-typed-array": "^1.1.10" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "requires": { + "has-bigints": "^1.0.1" + } + }, + "is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-builtin-module": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", + "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", + "dev": true, + "requires": { + "builtin-modules": "^3.3.0" + } + }, + "is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true + }, + "is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true + }, + "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==", + "dev": true + }, + "is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "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==", + "dev": true + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + }, + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, + "is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + } + }, + "is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "isomorphic-fetch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz", + "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==", + "peer": true, + "requires": { + "node-fetch": "^2.6.1", + "whatwg-fetch": "^3.4.1" + } + }, + "isomorphic-ws": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", + "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", + "peer": true, + "requires": {} + }, + "istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "requires": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + } + }, + "istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.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==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + } + }, + "istanbul-reports": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", + "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, + "jest": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.4.3.tgz", + "integrity": "sha512-XvK65feuEFGZT8OO0fB/QAQS+LGHvQpaadkH5p47/j3Ocqq3xf2pK9R+G0GzgfuhXVxEv76qCOOcMb5efLk6PA==", + "dev": true, + "requires": { + "@jest/core": "^29.4.3", + "@jest/types": "^29.4.3", + "import-local": "^3.0.2", + "jest-cli": "^29.4.3" + } + }, + "jest-changed-files": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.4.3.tgz", + "integrity": "sha512-Vn5cLuWuwmi2GNNbokPOEcvrXGSGrqVnPEZV7rC6P7ck07Dyw9RFnvWglnupSh+hGys0ajGtw/bc2ZgweljQoQ==", + "dev": true, + "requires": { + "execa": "^5.0.0", + "p-limit": "^3.1.0" + } + }, + "jest-circus": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.4.3.tgz", + "integrity": "sha512-Vw/bVvcexmdJ7MLmgdT3ZjkJ3LKu8IlpefYokxiqoZy6OCQ2VAm6Vk3t/qHiAGUXbdbJKJWnc8gH3ypTbB/OBw==", + "dev": true, + "requires": { + "@jest/environment": "^29.4.3", + "@jest/expect": "^29.4.3", + "@jest/test-result": "^29.4.3", + "@jest/types": "^29.4.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^0.7.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.4.3", + "jest-matcher-utils": "^29.4.3", + "jest-message-util": "^29.4.3", + "jest-runtime": "^29.4.3", + "jest-snapshot": "^29.4.3", + "jest-util": "^29.4.3", + "p-limit": "^3.1.0", + "pretty-format": "^29.4.3", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-cli": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.4.3.tgz", + "integrity": "sha512-PiiAPuFNfWWolCE6t3ZrDXQc6OsAuM3/tVW0u27UWc1KE+n/HSn5dSE6B2juqN7WP+PP0jAcnKtGmI4u8GMYCg==", + "dev": true, + "requires": { + "@jest/core": "^29.4.3", + "@jest/test-result": "^29.4.3", + "@jest/types": "^29.4.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "import-local": "^3.0.2", + "jest-config": "^29.4.3", + "jest-util": "^29.4.3", + "jest-validate": "^29.4.3", + "prompts": "^2.0.1", + "yargs": "^17.3.1" + } + }, + "jest-config": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.4.3.tgz", + "integrity": "sha512-eCIpqhGnIjdUCXGtLhz4gdDoxKSWXKjzNcc5r+0S1GKOp2fwOipx5mRcwa9GB/ArsxJ1jlj2lmlD9bZAsBxaWQ==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.4.3", + "@jest/types": "^29.4.3", + "babel-jest": "^29.4.3", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.4.3", + "jest-environment-node": "^29.4.3", + "jest-get-type": "^29.4.3", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.4.3", + "jest-runner": "^29.4.3", + "jest-util": "^29.4.3", + "jest-validate": "^29.4.3", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.4.3", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + } + }, + "jest-diff": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.4.3.tgz", + "integrity": "sha512-YB+ocenx7FZ3T5O9lMVMeLYV4265socJKtkwgk/6YUz/VsEzYDkiMuMhWzZmxm3wDRQvayJu/PjkjjSkjoHsCA==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^29.4.3", + "jest-get-type": "^29.4.3", + "pretty-format": "^29.4.3" + } + }, + "jest-docblock": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.4.3.tgz", + "integrity": "sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg==", + "dev": true, + "requires": { + "detect-newline": "^3.0.0" + } + }, + "jest-each": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.4.3.tgz", + "integrity": "sha512-1ElHNAnKcbJb/b+L+7j0/w7bDvljw4gTv1wL9fYOczeJrbTbkMGQ5iQPFJ3eFQH19VPTx1IyfePdqSpePKss7Q==", + "dev": true, + "requires": { + "@jest/types": "^29.4.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.4.3", + "jest-util": "^29.4.3", + "pretty-format": "^29.4.3" + } + }, + "jest-environment-node": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.4.3.tgz", + "integrity": "sha512-gAiEnSKF104fsGDXNkwk49jD/0N0Bqu2K9+aMQXA6avzsA9H3Fiv1PW2D+gzbOSR705bWd2wJZRFEFpV0tXISg==", + "dev": true, + "requires": { + "@jest/environment": "^29.4.3", + "@jest/fake-timers": "^29.4.3", + "@jest/types": "^29.4.3", + "@types/node": "*", + "jest-mock": "^29.4.3", + "jest-util": "^29.4.3" + } + }, + "jest-get-type": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.4.3.tgz", + "integrity": "sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==", + "dev": true + }, + "jest-haste-map": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.4.3.tgz", + "integrity": "sha512-eZIgAS8tvm5IZMtKlR8Y+feEOMfo2pSQkmNbufdbMzMSn9nitgGxF1waM/+LbryO3OkMcKS98SUb+j/cQxp/vQ==", + "dev": true, + "requires": { + "@jest/types": "^29.4.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.3.2", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.4.3", + "jest-util": "^29.4.3", + "jest-worker": "^29.4.3", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "dependencies": { + "jest-worker": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.4.3.tgz", + "integrity": "sha512-GLHN/GTAAMEy5BFdvpUfzr9Dr80zQqBrh0fz1mtRMe05hqP45+HfQltu7oTBfduD0UeZs09d+maFtFYAXFWvAA==", + "dev": true, + "requires": { + "@types/node": "*", + "jest-util": "^29.4.3", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + } + } + } + }, + "jest-leak-detector": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.4.3.tgz", + "integrity": "sha512-9yw4VC1v2NspMMeV3daQ1yXPNxMgCzwq9BocCwYrRgXe4uaEJPAN0ZK37nFBhcy3cUwEVstFecFLaTHpF7NiGA==", + "dev": true, + "requires": { + "jest-get-type": "^29.4.3", + "pretty-format": "^29.4.3" + } + }, + "jest-matcher-utils": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.4.3.tgz", + "integrity": "sha512-TTciiXEONycZ03h6R6pYiZlSkvYgT0l8aa49z/DLSGYjex4orMUcafuLXYyyEDWB1RKglq00jzwY00Ei7yFNVg==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^29.4.3", + "jest-get-type": "^29.4.3", + "pretty-format": "^29.4.3" + } + }, + "jest-message-util": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.4.3.tgz", + "integrity": "sha512-1Y8Zd4ZCN7o/QnWdMmT76If8LuDv23Z1DRovBj/vcSFNlGCJGoO8D1nJDw1AdyAGUk0myDLFGN5RbNeJyCRGCw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.4.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.4.3", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-mock": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.4.3.tgz", + "integrity": "sha512-LjFgMg+xed9BdkPMyIJh+r3KeHt1klXPJYBULXVVAkbTaaKjPX1o1uVCAZADMEp/kOxGTwy/Ot8XbvgItOrHEg==", + "dev": true, + "requires": { + "@jest/types": "^29.4.3", + "@types/node": "*", + "jest-util": "^29.4.3" + } + }, + "jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "requires": {} + }, + "jest-regex-util": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.4.3.tgz", + "integrity": "sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg==", + "dev": true + }, + "jest-resolve": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.4.3.tgz", + "integrity": "sha512-GPokE1tzguRyT7dkxBim4wSx6E45S3bOQ7ZdKEG+Qj0Oac9+6AwJPCk0TZh5Vu0xzeX4afpb+eDmgbmZFFwpOw==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.4.3", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.4.3", + "jest-validate": "^29.4.3", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + } + }, + "jest-resolve-dependencies": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.4.3.tgz", + "integrity": "sha512-uvKMZAQ3nmXLH7O8WAOhS5l0iWyT3WmnJBdmIHiV5tBbdaDZ1wqtNX04FONGoaFvSOSHBJxnwAVnSn1WHdGVaw==", + "dev": true, + "requires": { + "jest-regex-util": "^29.4.3", + "jest-snapshot": "^29.4.3" + } + }, + "jest-runner": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.4.3.tgz", + "integrity": "sha512-GWPTEiGmtHZv1KKeWlTX9SIFuK19uLXlRQU43ceOQ2hIfA5yPEJC7AMkvFKpdCHx6pNEdOD+2+8zbniEi3v3gA==", + "dev": true, + "requires": { + "@jest/console": "^29.4.3", + "@jest/environment": "^29.4.3", + "@jest/test-result": "^29.4.3", + "@jest/transform": "^29.4.3", + "@jest/types": "^29.4.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.4.3", + "jest-environment-node": "^29.4.3", + "jest-haste-map": "^29.4.3", + "jest-leak-detector": "^29.4.3", + "jest-message-util": "^29.4.3", + "jest-resolve": "^29.4.3", + "jest-runtime": "^29.4.3", + "jest-util": "^29.4.3", + "jest-watcher": "^29.4.3", + "jest-worker": "^29.4.3", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "dependencies": { + "jest-worker": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.4.3.tgz", + "integrity": "sha512-GLHN/GTAAMEy5BFdvpUfzr9Dr80zQqBrh0fz1mtRMe05hqP45+HfQltu7oTBfduD0UeZs09d+maFtFYAXFWvAA==", + "dev": true, + "requires": { + "@types/node": "*", + "jest-util": "^29.4.3", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + } + }, + "source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + } + } + }, + "jest-runtime": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.4.3.tgz", + "integrity": "sha512-F5bHvxSH+LvLV24vVB3L8K467dt3y3dio6V3W89dUz9nzvTpqd/HcT9zfYKL2aZPvD63vQFgLvaUX/UpUhrP6Q==", + "dev": true, + "requires": { + "@jest/environment": "^29.4.3", + "@jest/fake-timers": "^29.4.3", + "@jest/globals": "^29.4.3", + "@jest/source-map": "^29.4.3", + "@jest/test-result": "^29.4.3", + "@jest/transform": "^29.4.3", + "@jest/types": "^29.4.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.4.3", + "jest-message-util": "^29.4.3", + "jest-mock": "^29.4.3", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.4.3", + "jest-snapshot": "^29.4.3", + "jest-util": "^29.4.3", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + } + }, + "jest-snapshot": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.4.3.tgz", + "integrity": "sha512-NGlsqL0jLPDW91dz304QTM/SNO99lpcSYYAjNiX0Ou+sSGgkanKBcSjCfp/pqmiiO1nQaOyLp6XQddAzRcx3Xw==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.4.3", + "@jest/transform": "^29.4.3", + "@jest/types": "^29.4.3", + "@types/babel__traverse": "^7.0.6", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.4.3", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.4.3", + "jest-get-type": "^29.4.3", + "jest-haste-map": "^29.4.3", + "jest-matcher-utils": "^29.4.3", + "jest-message-util": "^29.4.3", + "jest-util": "^29.4.3", + "natural-compare": "^1.4.0", + "pretty-format": "^29.4.3", + "semver": "^7.3.5" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "jest-util": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.4.3.tgz", + "integrity": "sha512-ToSGORAz4SSSoqxDSylWX8JzkOQR7zoBtNRsA7e+1WUX5F8jrOwaNpuh1YfJHJKDHXLHmObv5eOjejUd+/Ws+Q==", + "dev": true, + "requires": { + "@jest/types": "^29.4.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "jest-validate": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.4.3.tgz", + "integrity": "sha512-J3u5v7aPQoXPzaar6GndAVhdQcZr/3osWSgTeKg5v574I9ybX/dTyH0AJFb5XgXIB7faVhf+rS7t4p3lL9qFaw==", + "dev": true, + "requires": { + "@jest/types": "^29.4.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.4.3", + "leven": "^3.1.0", + "pretty-format": "^29.4.3" + }, + "dependencies": { + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true + } + } + }, + "jest-watcher": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.4.3.tgz", + "integrity": "sha512-zwlXH3DN3iksoIZNk73etl1HzKyi5FuQdYLnkQKm5BW4n8HpoG59xSwpVdFrnh60iRRaRBGw0gcymIxjJENPcA==", + "dev": true, + "requires": { + "@jest/test-result": "^29.4.3", + "@jest/types": "^29.4.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.4.3", + "string-length": "^4.0.1" + } + }, + "js-sdsl": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz", + "integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "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==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true + }, + "kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true + }, + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "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==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "requires": { + "tmpl": "1.0.5" + } + }, + "math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==" + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true + }, + "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==", + "peer": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", + "peer": true + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "peer": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true + }, + "node-fetch": { + "version": "2.6.13", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.13.tgz", + "integrity": "sha512-StxNAxh15zr77QvvkmveSQ8uCQ4+v5FkvNTj0OESmiHu+VRi/gXArXtkWMElOsOUNLtUEvI4yS+rdtOHZTwlQA==", + "peer": true, + "requires": { + "whatwg-url": "^5.0.0" + } + }, + "node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true + }, + "node-releases": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", + "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true + } + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + } + }, + "object.entries": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.6.tgz", + "integrity": "sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + } + }, + "object.values": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", + "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.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==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + }, + "dependencies": { + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.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==", + "dev": true + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, + "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==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "pirates": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", + "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, + "pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "prettier": { + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", + "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", + "dev": true + }, + "pretty-format": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.4.3.tgz", + "integrity": "sha512-cvpcHTc42lcsvOOAzd3XuNWTcvk1Jmnzqeu+WsOuiPmxUJTnkbAcFNsRKvEpBEUFVUgy/GTZLulZDcDEi+CIlA==", + "dev": true, + "requires": { + "@jest/schemas": "^29.4.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "requires": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + } + }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, + "punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "requires": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "dependencies": { + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } + } + }, + "reflect-metadata": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", + "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==", + "peer": true + }, + "regexp-tree": { + "version": "0.1.24", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.24.tgz", + "integrity": "sha512-s2aEVuLhvnVJW6s/iPgEGK6R+/xngd2jNQ+xy4bXNDKxZKJH6jpPHY6kVeVv1IeLCHgswRj+Kl3ELaDjG6V1iw==", + "dev": true + }, + "regexp.prototype.flags": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" + } + }, + "regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true + }, + "regjsparser": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", + "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", + "dev": true + } + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true + }, + "resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "requires": { + "resolve-from": "^5.0.0" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + }, + "resolve.exports": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.0.tgz", + "integrity": "sha512-6K/gDlqgQscOlg9fSRpWstA8sYe8rbELsSTNpx+3kTrsVCzvSl0zIvRErM7fdl9ERWDsKnrLnwB+Ne89918XOg==", + "dev": true + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "safe-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz", + "integrity": "sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==", + "dev": true, + "requires": { + "regexp-tree": "~0.1.1" + } + }, + "safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "peer": true + }, + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz", + "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "requires": { + "escape-string-regexp": "^2.0.0" + } + }, + "strict-event-emitter-types": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strict-event-emitter-types/-/strict-event-emitter-types-2.0.0.tgz", + "integrity": "sha512-Nk/brWYpD85WlOgzw5h173aci0Teyv8YdIAEtV+N88nDB0dLlazZyJMIsN6eo1/AR61l+p6CJTG1JIyFaoNEEA==", + "peer": true + }, + "string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "requires": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + } + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "string.prototype.trimend": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + } + }, + "string.prototype.trimstart": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, + "strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "requires": { + "min-indent": "^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==", + "dev": true + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, + "test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "requires": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true + }, + "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==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "peer": true + }, + "ts-jest": { + "version": "29.0.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.0.5.tgz", + "integrity": "sha512-PL3UciSgIpQ7f6XjVOmbi96vmDHUqAyqDr8YxzopDqX3kfgYtX1cuNeBjP+L9sFXi6nzsGGA6R3fP3DDDJyrxA==", + "dev": true, + "requires": { + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "7.x", + "yargs-parser": "^21.0.1" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "requires": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "dependencies": { + "acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true + } + } + }, + "ts-results": { + "version": "npm:@casperlabs/ts-results@3.3.5", + "resolved": "https://registry.npmjs.org/@casperlabs/ts-results/-/ts-results-3.3.5.tgz", + "integrity": "sha512-ymSQqqb4mOSet592li02u1Gd28LoOFJUm6R3jkdNQ+nqsnbHvN+izBigtP4aYmNwh6gFyCwDgjYporEJgDT4eA==", + "peer": true, + "requires": { + "tslib": "^2.4.1" + } + }, + "tsconfig-paths": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", + "integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==", + "dev": true, + "peer": true, + "requires": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "peer": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "peer": true + } + } + }, + "tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", + "peer": true + }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "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==", + "dev": true + }, + "type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true + }, + "typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + } + }, + "typedjson": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/typedjson/-/typedjson-1.8.0.tgz", + "integrity": "sha512-taVJVGebQDagEmVc3Cu6vVVLkWLnxqPcTrkVgbpAsI02ZDDrnHy5zvt1JVqXv4/yztBgZAX1oR07+bkiusGJLQ==", + "peer": true, + "requires": { + "tslib": "^2.0.1" + } + }, + "typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true + }, + "unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + } + }, + "update-browserslist-db": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", + "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "dev": true, + "requires": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, + "v8-to-istanbul": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", + "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0" + }, + "dependencies": { + "convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + } + } + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "requires": { + "makeerror": "1.0.12" + } + }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "peer": true + }, + "whatwg-fetch": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz", + "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==", + "peer": true + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "peer": true, + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "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==", + "dev": true, + "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-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + } + }, + "word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true + }, + "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==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + } + }, + "ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "peer": true, + "requires": {} + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "yargs": { + "version": "17.7.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.0.tgz", + "integrity": "sha512-dwqOPg5trmrre9+v8SUo2q/hAwyKoVfu8OC1xPHKJGNdxAvPl4sKxL4vBnh3bQz/ZvvGAFeA5H3ou2kcOY8sQQ==", + "dev": true, + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true + }, + "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==", + "dev": true + } + } +} diff --git a/client-js/package.json b/client-js/package.json new file mode 100644 index 0000000..6a0a406 --- /dev/null +++ b/client-js/package.json @@ -0,0 +1,72 @@ +{ + "name": "casper-cep18-js-client", + "version": "1.0.3", + "description": "Casper CEP-18 JavaScript Client", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "scripts": { + "lint": "eslint src/ --max-warnings=0", + "lint:write": "eslint src/ --fix", + "test:unit": "cross-env NODE_ENV=test jest \"/tests/unit\"", + "test:e2e": "cross-env NODE_ENV=test jest -i --detectOpenHandles --forceExit \"tests/e2e\"", + "test": "npm run test:unit && npm run test:e2e", + "example:install": "ts-node examples/install.ts", + "example:usage": "ts-node examples/usage.ts", + "example:usage2": "ts-node examples/usage2.ts", + "clean": "rm -rf ./dist", + "prebuild": "npm run clean", + "build": "tsc --project tsconfig.build.json", + "generate:wasm": "ts-node \"src/scripts/copy-and-convert-wasms.ts\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/casper-ecosystem/cep18.git" + }, + "keywords": [ + "casper", + "cep18", + "fungible token" + ], + "author": "Ryo Kanazawa ", + "license": "Apache License 2.0", + "bugs": { + "url": "https://github.com/casper-ecosystem/cep18/issues" + }, + "homepage": "https://github.com/casper-ecosystem/cep18/tree/master/client-js#readme", + "files": [ + "/dist" + ], + "dependencies": { + "@ethersproject/bignumber": "^5.7.0", + "@noble/hashes": "^1.2.0", + "axios": "^1.9.0", + "blakejs": "^1.2.1" + }, + "devDependencies": { + "@types/jest": "^29.4.0", + "@types/node": "^18.14.0", + "@typescript-eslint/eslint-plugin": "^5.53.0", + "cross-env": "^7.0.3", + "dotenv": "^16.0.3", + "eslint": "^8.34.0", + "eslint-config-airbnb-base": "^15.0.0", + "eslint-config-airbnb-typescript": "^17.0.0", + "eslint-config-prettier": "^8.6.0", + "eslint-plugin-eslint-comments": "^3.2.0", + "eslint-plugin-jest": "^27.2.1", + "eslint-plugin-n": "^15.6.1", + "eslint-plugin-promise": "^6.1.1", + "eslint-plugin-simple-import-sort": "^10.0.0", + "eslint-plugin-unicorn": "^45.0.2", + "eslint-plugin-unused-imports": "^2.0.0", + "jest": "^29.4.3", + "prettier": "^2.8.4", + "ts-jest": "^29.0.5", + "ts-node": "^10.9.1", + "typescript": "^4.9.5" + }, + "peerDependencies": { + "casper-js-sdk": "^5", + "ts-results": "npm:@casperlabs/ts-results@^3.3.5" + } +} diff --git a/client-js/src/controller.ts b/client-js/src/controller.ts new file mode 100644 index 0000000..e71c476 --- /dev/null +++ b/client-js/src/controller.ts @@ -0,0 +1,163 @@ +import { BigNumberish } from "@ethersproject/bignumber" +import { hexToBytes } from "@noble/hashes/utils"; +import { + Args, + CLTypeUInt8, + CLValue, + ContractCallBuilder, + Key, + PublicKey, + SessionBuilder, + Transaction +} from "casper-js-sdk" + +// eslint-disable-next-line import/prefer-default-export +export class Controller { + constructor( + private readonly networkName: string, + private readonly contractPackageHash: string, + private readonly proxyCallWasm: Uint8Array, + ) {} + + /** + * Buys CSPR.name for an account + * @param voucherBytes Uint8Array of voucher bytes provided by contract admin + * @param domainFee amount to be payed for the domain + * @param signature signature of the signer of PaymentVoucher (CSPR.name provider) with algorithm bytes included + * @param paymentAmount the amount of gas price that should be paid in motes + * @param sender the PublicKey of transaction submitter account + * @returns Transaction object which can be sent to the node. + */ + public buy( + voucherBytes: Uint8Array, + domainFee: BigNumberish, + signature: Uint8Array, + paymentAmount: BigNumberish, + sender: PublicKey, + ): Transaction { + const signatureBytes: CLValue[] = []; + for (let i = 0; i < signature.length; i += 1) { + signatureBytes.push(CLValue.newCLUint8(signature[i])); + } + + const rawArgsBytes = Args.fromMap({ + voucher: CLValue.newCLAny(voucherBytes), + signature: CLValue.newCLList(CLTypeUInt8, signatureBytes), + }).toBytes(); + + const argsBytes: CLValue[] = []; + for (let i = 0; i < rawArgsBytes.length; i += 1) { + argsBytes.push(CLValue.newCLUint8(rawArgsBytes[i])); + } + + return new SessionBuilder() + .chainName(this.networkName) + .from(sender) + .payment(Number(paymentAmount)) + .wasm(this.proxyCallWasm) + .runtimeArgs(Args.fromMap({ + package_hash: CLValue.newCLByteArray(hexToBytes(this.contractPackageHash)), + entry_point: CLValue.newCLString("buy"), + args: CLValue.newCLList(CLTypeUInt8, argsBytes), + amount: CLValue.newCLUInt512(domainFee), + attached_value: CLValue.newCLUInt512(domainFee), + })) + .build(); + } + + /** + * Buys CSPR.name for an account + * @param voucherBytes Uint8Array of voucher bytes provided by contract admin + * @param domainFee amount to be payed for the domain + * @param signature signature of the signer of PaymentVoucher (CSPR.name provider) + * @param paymentAmount the amount of gas price that should be paid in motes + * @param sender the PublicKey of transaction submitter account + * @returns Transaction object which can be sent to the node. + */ + public renew( + voucherBytes: Uint8Array, + domainFee: BigNumberish, + signature: Uint8Array, + paymentAmount: BigNumberish, + sender: PublicKey, + ): Transaction { + const signatureBytes: CLValue[] = []; + for (let i = 0; i < signature.length; i += 1) { + signatureBytes.push(CLValue.newCLUint8(signature[i])); + } + + const rawArgsBytes = Args.fromMap({ + voucher: CLValue.newCLAny(voucherBytes), + signature: CLValue.newCLList(CLTypeUInt8, signatureBytes), + }).toBytes(); + + const argsBytes: CLValue[] = []; + for (let i = 0; i < rawArgsBytes.length; i += 1) { + argsBytes.push(CLValue.newCLUint8(rawArgsBytes[i])); + } + + return new SessionBuilder() + .chainName(this.networkName) + .from(sender) + .payment(Number(paymentAmount)) + .wasm(this.proxyCallWasm) + .runtimeArgs(Args.fromMap({ + package_hash: CLValue.newCLByteArray(hexToBytes(this.contractPackageHash)), + entry_point: CLValue.newCLString("renew"), + args: CLValue.newCLList(CLTypeUInt8, argsBytes), + amount: CLValue.newCLUInt512(domainFee), + attached_value: CLValue.newCLUInt512(domainFee), + })) + .build(); + } + + /** + * Sets public key of a voucher signer account + * @param sender the PublicKey of transaction submitter account + * @param signer the PublicKey of a new voucher signer account + * @param paymentAmount the amount of gas price that should be paid in motes + + * @returns Transaction object which can be sent to the node. + */ + public setSignerPublicKey( + sender: PublicKey, + signer: PublicKey, + paymentAmount: BigNumberish, + ): Transaction { + return new ContractCallBuilder() + .chainName(this.networkName) + .from(sender) + .payment(Number(paymentAmount)) + .byPackageHash(this.contractPackageHash) + .entryPoint('set_signer_public_key') + .runtimeArgs(Args.fromMap({ + signer: CLValue.newCLPublicKey(signer), + })) + .build(); + } + + /** + * Sets public key of a voucher signer account + * @param sender the PublicKey of transaction submitter account + * @param treasuryAccountHash the Account Hash of a new treasury account + * @param paymentAmount the amount of gas price that should be paid in motes + + * @returns Transaction object which can be sent to the node. + */ + public setTreasuryAccountAddress( + sender: PublicKey, + treasuryAccountHash: string, + paymentAmount: BigNumberish, + ): Transaction { + return new ContractCallBuilder() + .chainName(this.networkName) + .from(sender) + .payment(Number(paymentAmount)) + .byPackageHash(this.contractPackageHash) + .entryPoint('set_treasury') + .runtimeArgs(Args.fromMap({ + treasury: CLValue.newCLKey(Key.newKey(treasuryAccountHash)), + })) + .build(); + } +} diff --git a/client-js/src/default-resolver.ts b/client-js/src/default-resolver.ts new file mode 100644 index 0000000..e35adfc --- /dev/null +++ b/client-js/src/default-resolver.ts @@ -0,0 +1,120 @@ +import { BigNumberish } from "@ethersproject/bignumber" +import { + Args, byteHash, + CLValue, + ContractCallBuilder, Key, PublicKey, toBytesU8, Transaction, +} from "casper-js-sdk" +import {bytesToHex, hexToBytes} from "@noble/hashes/utils"; + +// eslint-disable-next-line import/prefer-default-export +export class DefaultResolver { + constructor( + private readonly networkName: string, + private readonly contractPackageHash: string, + ) {} + + /** + * Sets resolution for a given CSPR.name + * @param fullDomain full domain in a format of (cname.sld.cspr, sld.cspr) + * @param address address of the account/contract of cspr.name resolution (starts with either account-hash-... or hash-...) + * @param paymentAmount the amount of gas price that should be paid in motes + * @param sender the PublicKey of transaction submitter account (admin) + * @returns Transaction object which can be sent to the node. + */ + public setResolution( + fullDomain: string, + address: string, + paymentAmount: BigNumberish, + sender: PublicKey, + ): Transaction { + const domains = fullDomain.split('.') + if (domains.length < 2) { + throw new Error('invalid fullDomain format, should be (cname.sld.cspr, sld.cspr)') + } + + const tld = domains[domains.length - 1] + if (tld !== 'cspr') { + throw new Error('top level domain should be equal to .cspr') + } + + const addressKey = CLValue.newCLKey(Key.newKey(address)); + + return new ContractCallBuilder() + .chainName(this.networkName) + .from(sender) + .payment(Number(paymentAmount)) + .byPackageHash(this.contractPackageHash) + .entryPoint('set_resolution') + .runtimeArgs(Args.fromMap({ + full_domain: CLValue.newCLString(fullDomain), + address: CLValue.newCLOption(addressKey, addressKey.type), + })) + .build() + } + + /** + * Sets resolution for a given CSPR.name + * @param fullDomain full domain in a format of (cname.sld.cspr, sld.cspr) + * @param paymentAmount the amount of gas price that should be paid in motes + * @param sender the PublicKey of transaction submitter account (admin) + * @returns Transaction object which can be sent to the node. + */ + public removeResolution( + fullDomain: string, + paymentAmount: BigNumberish, + sender: PublicKey, + ): Transaction { + const domains = fullDomain.split('.') + if (domains.length < 2) { + throw new Error('invalid fullDomain format, should be (cname.sld.cspr, sld.cspr)') + } + + const tld = domains[domains.length - 1] + if (tld !== 'cspr') { + throw new Error('top level domain should be equal to .cspr') + } + + return new ContractCallBuilder() + .chainName(this.networkName) + .from(sender) + .payment(Number(paymentAmount)) + .byPackageHash(this.contractPackageHash) + .entryPoint('set_resolution') + .runtimeArgs(Args.fromMap({ + full_domain: CLValue.newCLString(fullDomain), + address: CLValue.newCLOption(null), + })) + .build() + } + + /** + * Cleans up resolutions for a given token + * @param domainName domain name of a given token + * @param paymentAmount the amount of gas price that should be paid in motes + * @param sender the PublicKey of transaction submitter account (admin) + * @returns Transaction object which can be sent to the node. + */ + public cleanup( + domainName: string, + paymentAmount: BigNumberish, + sender: PublicKey, + ): Transaction { + const tokenIdBytes = byteHash(Buffer.from(domainName)); + let tokenID = BigInt(0); + for (let i = 0; i < tokenIdBytes.length; i++) { + // eslint-disable-next-line no-bitwise + tokenID = (tokenID << BigInt(8)) + BigInt(tokenIdBytes[i]); + } + + return new ContractCallBuilder() + .chainName(this.networkName) + .from(sender) + .payment(Number(paymentAmount)) + .byPackageHash(this.contractPackageHash) + .entryPoint('cleanup') + .runtimeArgs(Args.fromMap({ + token_id: CLValue.newCLUInt256(tokenID), + })) + .build() + } +} diff --git a/client-js/src/name-token.ts b/client-js/src/name-token.ts new file mode 100644 index 0000000..128f844 --- /dev/null +++ b/client-js/src/name-token.ts @@ -0,0 +1,64 @@ +import { BigNumberish } from "@ethersproject/bignumber" +import { + Args, CLValue, ContractCallBuilder, Key, + PublicKey, Transaction, +} from "casper-js-sdk" + +// eslint-disable-next-line import/prefer-default-export +export class NameToken { + constructor( + private readonly networkName: string, + private readonly contractPackageHash: string, + ) {} + + /** + * Sets default CSPR.name resolver contract + * @param resolverContractHash address of the resolver contract + * @param paymentAmount the amount of gas price that should be paid in motes + * @param sender the PublicKey of transaction submitter account + * @returns Transaction object which can be sent to the node. + */ + public setDefaultResolver( + resolverContractHash: string, + paymentAmount: BigNumberish, + sender: PublicKey, + ): Transaction { + return new ContractCallBuilder() + .chainName(this.networkName) + .from(sender) + .payment(Number(paymentAmount)) + .byPackageHash(this.contractPackageHash) + .entryPoint('set_default_resolver') + .runtimeArgs(Args.fromMap({ + resolver: CLValue.newCLKey(Key.newKey(resolverContractHash)), + })) + .build(); + } + + /** + * Sets approval for all CSPR.name tokens + * @param approveAll approval flag + * @param operator approved operator address (starts with either account-hash-... or hash-...) + * @param paymentAmount the amount of gas price that should be paid in motes + * @param sender the PublicKey of transaction submitter account + * @returns Transaction object which can be sent to the node. + */ + public setApprovalForAll( + approveAll: boolean, + operator: string, + paymentAmount: BigNumberish, + sender: PublicKey, + ): Transaction { + return new ContractCallBuilder() + .chainName(this.networkName) + .from(sender) + .payment(Number(paymentAmount)) + .byPackageHash(this.contractPackageHash) + .entryPoint('set_approval_for_all') + .runtimeArgs(Args.fromMap({ + approve_all: CLValue.newCLValueBool(approveAll), + operator: CLValue.newCLKey(Key.newKey(operator)) + })) + .build(); + } +} diff --git a/client-js/src/registrar.ts b/client-js/src/registrar.ts new file mode 100644 index 0000000..f1c934d --- /dev/null +++ b/client-js/src/registrar.ts @@ -0,0 +1,224 @@ +import { BigNumberish } from "@ethersproject/bignumber" +import { + ContractCallBuilder, + PublicKey, + Transaction, CLValue, CLTypeUInt8, CLTypeString, Key, Args, toBytesU32 +} from "casper-js-sdk" + +import { NameMintInfo, TokenRenewalInfo } from "./types"; + +// eslint-disable-next-line import/prefer-default-export +export class Registrar { + constructor( + private readonly networkName: string, + private readonly contractPackageHash: string, + ) {} + + /** + * Buys CSPR.name for an account + * @param nameMintInfos @see {@link NameMintInfo} NameMintInfo[] that was created by CSPR.name provider + * @param paymentAmount the amount of gas price that should be paid in motes + * @param sender the PublicKey of transaction submitter account (admin) + * @returns Transaction object which can be sent to the node. + */ + public adminRegister( + nameMintInfos: NameMintInfo[], + paymentAmount: BigNumberish, + sender: PublicKey, + ): Transaction { + const length = toBytesU32(nameMintInfos.length) + + let bytes = Array.from(length) + bytes = nameMintInfos.reduce((b, name) => b.concat(Array.from(name.toBytes())), bytes) + + const runtimeArgs = Args.fromMap({ + names: CLValue.newCLAny(Uint8Array.from(bytes)), + }) + + return new ContractCallBuilder() + .chainName(this.networkName) + .from(sender) + .payment(Number(paymentAmount)) + .byPackageHash(this.contractPackageHash) + .entryPoint('admin_register') + .runtimeArgs(runtimeArgs) + .build(); + } + + /** + * Buys CSPR.name for an account + * @param tokenRenewalInfos @see {@link TokenRenewalInfo} TokenRenewalInfo[] that was created by CSPR.name provider + * @param paymentAmount the amount of gas price that should be paid in motes + * @param sender the PublicKey of transaction submitter account + * @returns Transaction object which can be sent to the node. + */ + public adminProlong( + tokenRenewalInfos: TokenRenewalInfo[], + paymentAmount: BigNumberish, + sender: PublicKey, + ): Transaction { + const length = toBytesU32(tokenRenewalInfos.length) + + let bytes = Array.from(length) + bytes = tokenRenewalInfos.reduce((b, name) => b.concat(Array.from(name.toBytes())), bytes) + + const runtimeArgs = Args.fromMap({ + tokens: CLValue.newCLAny(Uint8Array.from(bytes)), + }) + + return new ContractCallBuilder() + .chainName(this.networkName) + .from(sender) + .payment(Number(paymentAmount)) + .byPackageHash(this.contractPackageHash) + .entryPoint('admin_prolong') + .runtimeArgs(runtimeArgs) + .build(); + } + + /** + * Buys CSPR.name for an account + * @param tokenRenewalInfos @see {@link TokenRenewalInfo} TokenRenewalInfo[] that was created by CSPR.name provider + * @param nameMintInfos @see {@link NameMintInfo} NameMintInfo[] that was created by CSPR.name provider + * @param paymentAmount the amount of gas price that should be paid in motes + * @param sender the PublicKey of transaction submitter account + * @returns Transaction object which can be sent to the node. + */ + public adminProlongAndRegister( + tokenRenewalInfos: TokenRenewalInfo[], + nameMintInfos: NameMintInfo[], + paymentAmount: BigNumberish, + sender: PublicKey, + ): Transaction { + const tokenRenewalInfosLength = toBytesU32(tokenRenewalInfos.length) + + let tokenRenewalBytes = Array.from(tokenRenewalInfosLength) + tokenRenewalBytes = tokenRenewalInfos.reduce((b, name) => b.concat(Array.from(name.toBytes())), tokenRenewalBytes) + + const nameMintInfosLength = toBytesU32(nameMintInfos.length) + + let nameMintInfosBytes = Array.from(nameMintInfosLength) + nameMintInfosBytes = nameMintInfos.reduce((b, name) => b.concat(Array.from(name.toBytes())), nameMintInfosBytes) + + const runtimeArgs = Args.fromMap({ + renewal_tokens: CLValue.newCLAny(Uint8Array.from(tokenRenewalBytes)), + new_tokens: CLValue.newCLAny(Uint8Array.from(nameMintInfosBytes)), + }) + + return new ContractCallBuilder() + .chainName(this.networkName) + .from(sender) + .payment(Number(paymentAmount)) + .byPackageHash(this.contractPackageHash) + .entryPoint('admin_prolong_and_register') + .runtimeArgs(runtimeArgs) + .build(); + } + + /** + * Sets grace period of name token for registrar contract as an admin + * @param periodMilliseconds grace period in milliseconds + * @param paymentAmount the amount of gas price that should be paid in motes + * @param sender the PublicKey of transaction submitter account (admin) + * @returns Transaction object which can be sent to the node. + */ + public setGracePeriod( + periodMilliseconds: number, + paymentAmount: BigNumberish, + sender: PublicKey, + ): Transaction { + const runtimeArgs = Args.fromMap({ + period: CLValue.newCLUint64(periodMilliseconds), + }); + + return new ContractCallBuilder() + .chainName(this.networkName) + .from(sender) + .payment(Number(paymentAmount)) + .byPackageHash(this.contractPackageHash) + .entryPoint('set_grace_period') + .runtimeArgs(runtimeArgs) + .build(); + } + + /** + * Transfer CSPR.name to an account as an admin + * @param newOwnerHash hash of the new name token owner + * @param tokenHashes list of token hashes for transfer + * @param paymentAmount the amount of gas price that should be paid in motes + * @param sender the PublicKey of transaction submitter account (admin) + * @returns Transaction object which can be sent to the node. + */ + public adminTransfer( + newOwnerHash: string, + tokenHashes: string[], + paymentAmount: BigNumberish, + sender: PublicKey, + ): Transaction { + const tokenHashesList = tokenHashes.map(th => CLValue.newCLString(th)); + + return new ContractCallBuilder() + .chainName(this.networkName) + .from(sender) + .payment(Number(paymentAmount)) + .byPackageHash(this.contractPackageHash) + .entryPoint('admin_transfer') + .runtimeArgs(Args.fromMap({ + new_owner: CLValue.newCLKey(Key.newKey(newOwnerHash)), + token_hashes: CLValue.newCLList(CLTypeString, tokenHashesList), + })) + .build(); + } + + /** + * Burn CSPR.name tokens as an admin + * @param tokenHashes list of token hashes for transfer + * @param paymentAmount the amount of gas price that should be paid in motes + * @param sender the PublicKey of transaction submitter account (admin) + * @returns Transaction object which can be sent to the node. + */ + public adminBurn( + tokenHashes: string[], + paymentAmount: BigNumberish, + sender: PublicKey, + ): Transaction { + const tokenHashesList = tokenHashes.map(th => CLValue.newCLString(th)); + + return new ContractCallBuilder() + .chainName(this.networkName) + .from(sender) + .payment(Number(paymentAmount)) + .byPackageHash(this.contractPackageHash) + .entryPoint('admin_burn') + .runtimeArgs(Args.fromMap({ + token_hashes: CLValue.newCLList(CLTypeString, tokenHashesList), + })) + .build(); + } + + /** + * Expire CSPR.name tokens as an admin + * @param tokenHashes list of token hashes for transfer + * @param paymentAmount the amount of gas price that should be paid in motes + * @param sender the PublicKey of transaction submitter account (admin) + * @returns Transaction object which can be sent to the node. + */ + public expire( + tokenHashes: string[], + paymentAmount: BigNumberish, + sender: PublicKey, + ): Transaction { + const tokenHashesList = tokenHashes.map(th => CLValue.newCLString(th)); + + return new ContractCallBuilder() + .chainName(this.networkName) + .from(sender) + .payment(Number(paymentAmount)) + .byPackageHash(this.contractPackageHash) + .entryPoint('expire') + .runtimeArgs(Args.fromMap({ + token_hashes: CLValue.newCLList(CLTypeString, tokenHashesList), + })) + .build(); + } +} diff --git a/client-js/src/reverse-resolver.ts b/client-js/src/reverse-resolver.ts new file mode 100644 index 0000000..a9b8232 --- /dev/null +++ b/client-js/src/reverse-resolver.ts @@ -0,0 +1,49 @@ +import { BigNumberish } from "@ethersproject/bignumber" +import { + Args, + CLValue, + ContractCallBuilder, PublicKey, Transaction, +} from "casper-js-sdk" + + +// eslint-disable-next-line import/prefer-default-export +export class ReverseResolver { + constructor( + private readonly networkName: string, + private readonly contractPackageHash: string, + ) {} + + /** + * Sets resolution for a given CSPR.name + * @param primaryName full domain in a format of (cname.sld.cspr, sld.cspr) + * @param paymentAmount the amount of gas price that should be paid in motes + * @param sender the PublicKey of transaction submitter account (admin) + * @returns Transaction object which can be sent to the node. + */ + public setPrimaryName( + primaryName: string, + paymentAmount: BigNumberish, + sender: PublicKey, + ): Transaction { + const domains = primaryName.split('.') + if (domains.length < 2) { + throw new Error('invalid primary name format, should be (cname.sld.cspr, sld.cspr)') + } + + const tld = domains[domains.length - 1] + if (tld !== 'cspr') { + throw new Error('top level domain should be equal to .cspr') + } + + return new ContractCallBuilder() + .chainName(this.networkName) + .from(sender) + .payment(Number(paymentAmount)) + .byPackageHash(this.contractPackageHash) + .entryPoint('set_primary_name') + .runtimeArgs(Args.fromMap({ + primary_name: CLValue.newCLString(primaryName), + })) + .build(); + } +} diff --git a/client-js/src/types.ts b/client-js/src/types.ts new file mode 100644 index 0000000..f0a33b0 --- /dev/null +++ b/client-js/src/types.ts @@ -0,0 +1,196 @@ +/* eslint-disable eslint-comments/disable-enable-pair */ +/* eslint-disable max-classes-per-file */ + +import { bytesToHex } from '@noble/hashes/utils'; +import { CLValue, Key, toBytesU32, toBytesU64,toBytesU512 } from 'casper-js-sdk'; + +export class PaymentInfo { + constructor( + public buyer: string, + public paymentId: string, + public amount: number, + ) {} + + toBytes(): Uint8Array { + const buyer = CLValue.newCLKey(Key.newKey(this.buyer)).bytes() + const paymentId = CLValue.newCLString(this.paymentId).bytes() + const amount = toBytesU512(this.amount) + + const bytes = Array.from(buyer) + .concat(Array.from(paymentId)) + .concat(Array.from(amount)); + + return Uint8Array.from(bytes); + } +} + +export class NameMintInfo { + constructor( + public label: string, + public owner: string, + public tokenExpiration: Date, + public assetURI: string, + ) {} + + toBytes(): Uint8Array { + const labelBytes = CLValue.newCLString(this.label).bytes() + const ownerBytes = CLValue.newCLKey(Key.newKey(this.owner)).bytes() + const tokenExpirationBytes = toBytesU64(this.tokenExpiration.getTime()*1000) + const assetURIBytes = CLValue.newCLString(this.assetURI).bytes() + + const bytes = Array.from(labelBytes) + .concat(Array.from(ownerBytes)) + .concat(Array.from(tokenExpirationBytes)) + .concat(Array.from(assetURIBytes)); + + return Uint8Array.from(bytes); + } +} + +export class PaymentVoucher { + private bytes: Uint8Array = null + + constructor( + public readonly payment: PaymentInfo, + public readonly names: NameMintInfo[], + public readonly voucherExpiration: Date, + ) {} + + toBytes(): Uint8Array { + if (this.bytes) { + return this.bytes; + } + let bytes = Array.from(this.payment.toBytes()) + + const sizeBytes = toBytesU32(this.names.length) + bytes = bytes.concat(Array.from(sizeBytes)) + + bytes = this.names.reduce((b, name) => b.concat(Array.from(name.toBytes())), bytes) + + // Expiration bytes in microseconds + const voucherExpirationBytes = toBytesU64(this.voucherExpiration.getTime()*1000) + bytes = bytes.concat(Array.from(voucherExpirationBytes)) + + this.bytes = Uint8Array.from(bytes) + + return this.bytes + } +} + +export class TokenizationVoucher { + private bytes: Uint8Array = null + + constructor( + private readonly names: NameMintInfo[], + private readonly voucherExpiration: Date, + ) {} + + toBytes(): Uint8Array { + if (this.bytes) { + return this.bytes; + } + + const nameInfosLengthBytes = toBytesU32(this.names.length) + + // Add name infos length bytes + let bytes = Array.from(nameInfosLengthBytes); + + // Add name infos bytes + bytes = this.names.reduce((b, name) => b.concat(Array.from(name.toBytes())), bytes) + + // Add expiration bytes in microseconds + const voucherExpirationBytes = toBytesU64(this.voucherExpiration.getTime()*1000) + bytes = bytes.concat(Array.from(voucherExpirationBytes)) + + // Memoize and return + this.bytes = Uint8Array.from(bytes) + + return this.bytes + } +} + +export class TokenRenewalInfo { + constructor( + public tokenId: string, + public tokenExpiration: Date, + ) {} + + toBytes(): Uint8Array { + const labelBytes = CLValue.newCLString(this.tokenId).bytes() + const tokenExpirationBytes = toBytesU64(this.tokenExpiration.getTime()*1000) + + const bytes = Array.from(labelBytes) + .concat(Array.from(tokenExpirationBytes)) + + return Uint8Array.from(bytes); + } +} + +export class RenewalPaymentVoucher { + private bytes: Uint8Array = null + + constructor( + public readonly payment: PaymentInfo, + public readonly tokens: TokenRenewalInfo[], + public readonly voucherExpiration: Date, + ) {} + + toBytes(): Uint8Array { + if (this.bytes) { + return this.bytes; + } + + const paymentInfoBytes = Array.from(this.payment.toBytes()) + + const tokensLengthBytes = Array.from(toBytesU32(this.tokens.length)) + + // Add payment info bytes + let bytes = paymentInfoBytes + // Add tokens length bytes + .concat(tokensLengthBytes) + + // add token infos bytes + bytes = this.tokens.reduce((b, token) => b.concat(Array.from(token.toBytes())), bytes) + + // add expiration bytes + const voucherExpirationBytes = toBytesU64(this.voucherExpiration.getTime()*1000) + bytes = bytes.concat(Array.from(voucherExpirationBytes)) + + // Memoize and return + this.bytes = Uint8Array.from(bytes) + + return this.bytes + } +} + +export class RenewalVoucher { + private bytes: Uint8Array = null + + constructor( + private readonly tokens: TokenRenewalInfo[], + private readonly voucherExpiration: Date, + ) {} + + toBytes(): Uint8Array { + if (this.bytes) { + return this.bytes; + } + + const tokenInfosLengthBytes = Array.from(toBytesU32(this.tokens.length)) + + // Add token infos length bytes + let bytes = Array.from(tokenInfosLengthBytes) + + // Add token infos bytes + bytes = this.tokens.reduce((b, token) => b.concat(Array.from(token.toBytes())), bytes) + + // Add expiration bytes + const voucherExpirationBytes = toBytesU64(this.voucherExpiration.getTime()*1000) + bytes = bytes.concat(Array.from(voucherExpirationBytes)) + + // Memoize and return + this.bytes = Uint8Array.from(bytes) + + return this.bytes + } +} diff --git a/client-js/tsconfig.build.json b/client-js/tsconfig.build.json new file mode 100644 index 0000000..4095878 --- /dev/null +++ b/client-js/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "include": ["./src/index.ts"] +} diff --git a/client-js/tsconfig.json b/client-js/tsconfig.json new file mode 100644 index 0000000..c691b0d --- /dev/null +++ b/client-js/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "allowSyntheticDefaultImports": true, + "noImplicitAny": false, + "noImplicitReturns": true, + "noImplicitThis": true, + "removeComments": true, + "declaration": true, + "target": "es5", + "lib": ["es2015", "dom"], + "module": "commonjs", + "sourceMap": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "moduleResolution": "node", + "skipLibCheck": true, + "outDir": "./dist" + }, + "exclude": ["node_modules", "dist"], + "include": ["src", "examples", "examples"] +} diff --git a/docs/.lock b/docs/.lock new file mode 100644 index 0000000..e69de29 diff --git a/docs/casper_name_contracts/all.html b/docs/casper_name_contracts/all.html new file mode 100644 index 0000000..b3bef82 --- /dev/null +++ b/docs/casper_name_contracts/all.html @@ -0,0 +1 @@ +List of all items in this crate

List of all items

Structs

Enums

Traits

Constants

\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/controller/__base_controller_test_parts/struct.BaseControllerHostRef.html b/docs/casper_name_contracts/contracts/controller/__base_controller_test_parts/struct.BaseControllerHostRef.html new file mode 100644 index 0000000..4e16630 --- /dev/null +++ b/docs/casper_name_contracts/contracts/controller/__base_controller_test_parts/struct.BaseControllerHostRef.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../../casper_name_contracts/contracts/controller/struct.BaseControllerHostRef.html...

+ + + \ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/controller/__controller_test_parts/struct.ControllerHostRef.html b/docs/casper_name_contracts/contracts/controller/__controller_test_parts/struct.ControllerHostRef.html new file mode 100644 index 0000000..ca67daf --- /dev/null +++ b/docs/casper_name_contracts/contracts/controller/__controller_test_parts/struct.ControllerHostRef.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../../casper_name_contracts/contracts/controller/struct.ControllerHostRef.html...

+ + + \ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/controller/__controller_test_parts/struct.ControllerInitArgs.html b/docs/casper_name_contracts/contracts/controller/__controller_test_parts/struct.ControllerInitArgs.html new file mode 100644 index 0000000..ba45327 --- /dev/null +++ b/docs/casper_name_contracts/contracts/controller/__controller_test_parts/struct.ControllerInitArgs.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../../casper_name_contracts/contracts/controller/struct.ControllerInitArgs.html...

+ + + \ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/controller/enum.ControllerError.html b/docs/casper_name_contracts/contracts/controller/enum.ControllerError.html new file mode 100644 index 0000000..3132d3d --- /dev/null +++ b/docs/casper_name_contracts/contracts/controller/enum.ControllerError.html @@ -0,0 +1,33 @@ +ControllerError in casper_name_contracts::contracts::controller - Rust

Enum ControllerError

Source
pub enum ControllerError {
+    InvalidSignature = 1_101,
+    FeeCollectorNotSet = 1_102,
+    RegistrarNotSet = 1_103,
+    BuyerMustBeCaller = 1_104,
+    InsufficientPayment = 1_105,
+    PaymentTooLarge = 1_106,
+    ContractAddressExpected = 1_107,
+}
Expand description

Controller errors.

+

Variants§

§

InvalidSignature = 1_101

§

FeeCollectorNotSet = 1_102

§

RegistrarNotSet = 1_103

§

BuyerMustBeCaller = 1_104

§

InsufficientPayment = 1_105

§

PaymentTooLarge = 1_106

§

ContractAddressExpected = 1_107

Trait Implementations§

Source§

impl From<ControllerError> for OdraError

Source§

fn from(error: ControllerError) -> Self

Converts to this type from the input type.
Source§

impl SchemaErrors for ControllerError

Source§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/controller/index.html b/docs/casper_name_contracts/contracts/controller/index.html new file mode 100644 index 0000000..4779044 --- /dev/null +++ b/docs/casper_name_contracts/contracts/controller/index.html @@ -0,0 +1,3 @@ +casper_name_contracts::contracts::controller - Rust

Module controller

Source

Structs§

BaseController
Base for all controllers. It handles access control, treasury and signer +public key.
BaseControllerContractRef
BaseController Contract Ref.
BaseControllerHostRef
BaseController Host Ref.
Controller
Controller smart contract. It handles payments and talks to the Registrar +Contract.
ControllerContractRef
Controller Contract Ref.
ControllerHostRef
Controller Host Ref.
ControllerInitArgs
Controller contract constructor arguments.
PaymentFulfilled
Event with the payment information.
SignerPublicKeyChanged
Event emitted when the signer public key is changed.
TreasuryAddressChanged
Event emitted when the treasury address is changed.

Enums§

ControllerError
Controller errors.
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/controller/sidebar-items.js b/docs/casper_name_contracts/contracts/controller/sidebar-items.js new file mode 100644 index 0000000..0f8868a --- /dev/null +++ b/docs/casper_name_contracts/contracts/controller/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["ControllerError"],"struct":["BaseController","BaseControllerContractRef","BaseControllerHostRef","Controller","ControllerContractRef","ControllerHostRef","ControllerInitArgs","PaymentFulfilled","SignerPublicKeyChanged","TreasuryAddressChanged"]}; \ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/controller/struct.BaseController.html b/docs/casper_name_contracts/contracts/controller/struct.BaseController.html new file mode 100644 index 0000000..0f8ac72 --- /dev/null +++ b/docs/casper_name_contracts/contracts/controller/struct.BaseController.html @@ -0,0 +1,64 @@ +BaseController in casper_name_contracts::contracts::controller - Rust

Struct BaseController

Source
pub struct BaseController { /* private fields */ }
Expand description

Base for all controllers. It handles access control, treasury and signer +public key.

+

Implementations§

Source§

impl BaseController

Source

pub fn has_role(&self, role: &Role, address: &Address) -> bool

Delegated. See self.access_control.has_role() for details.

+
Source

pub fn grant_role(&mut self, role: &Role, address: &Address)

Delegated. See self.access_control.grant_role() for details.

+
Source

pub fn revoke_role(&mut self, role: &Role, address: &Address)

Delegated. See self.access_control.revoke_role() for details.

+
Source

pub fn is_paused(&self) -> bool

Delegated. See self.pausable.is_paused() for details.

+
Source

pub fn require_not_paused(&self)

Delegated. See self.pausable.require_not_paused() for details.

+
Source§

impl BaseController

Source

pub fn init(&mut self, signer: PublicKey, treasury: Address)

Initializes the controller. +It assigns the deployer as the admin.

+
Source

pub fn pause(&mut self)

Temporarily stops the contract.

+
Source

pub fn unpause(&mut self)

Returns to normal operation.

+
Source

pub fn set_signer_public_key(&mut self, signer: PublicKey)

Admin only. Sets the public key of the signer.

+
Source

pub fn set_treasury(&mut self, treasury: Address)

Admin only. Sets the treasury address.

+
Source

pub fn signer_public_key(&self) -> PublicKey

Returns the public key of the signer.

+
Source

pub fn process_payment_voucher<P: Payment + ToBytes>( + &self, + voucher: &P, + signature: Bytes, +)

Validate the payment voucher and process the payment.

+

Trait Implementations§

Source§

impl HasEntrypoints for BaseController

Source§

fn entrypoints() -> Vec<Entrypoint>

Returns the list of contract’s entrypoints.
Source§

impl HasEvents for BaseController

Source§

fn events() -> Vec<Event>

Returns a list of Events used by the contract.
Source§

fn event_schemas() -> BTreeMap<String, Schema>

Returns a map of event schemas used by the contract.
Source§

impl HasIdent for BaseController

Source§

fn ident() -> String

Returns the contract’s ident.
Source§

impl Module for BaseController

Source§

fn new(env: Rc<ContractEnv>) -> Self

Creates a new instance of the module with the given contract environment.
Source§

fn env(&self) -> Rc<ContractEnv>

Returns the contract environment associated with the module.
Source§

impl OdraContract for BaseController

Source§

type HostRef = BaseControllerHostRef

The host reference type.
Source§

type ContractRef = BaseControllerContractRef

The contract reference type.
Source§

type InitArgs = NoArgs

The init args type.
Source§

impl SchemaCustomTypes for BaseController

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl SchemaEntrypoints for BaseController

Source§

fn schema_entrypoints() -> Vec<Entrypoint>

Returns a vector of [Entrypoint]s.
Source§

impl SchemaErrors for BaseController

Source§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
Source§

impl SchemaEvents for BaseController

Source§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
Source§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<R> Deployer<R> for R
where + R: OdraContract,

§

fn deploy( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, +) -> <R as OdraContract>::HostRef

Deploys a contract with given init args. Read more
§

fn try_deploy( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, +) -> Result<<R as OdraContract>::HostRef, OdraError>

Tries to deploy a contract with given init args. Read more
§

fn deploy_with_cfg<T>( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, + cfg: T, +) -> <R as OdraContract>::HostRef
where + T: OdraConfig,

Deploys a contract with given init args and configuration. Read more
§

fn try_deploy_with_cfg<T>( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, + cfg: T, +) -> Result<<R as OdraContract>::HostRef, OdraError>
where + T: OdraConfig,

Tries to deploy a contract with given init args and configuration. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> HostRefLoader<<T as OdraContract>::HostRef> for T
where + T: OdraContract,

§

fn load(env: &HostEnv, address: Address) -> <T as OdraContract>::HostRef

Loads an existing contract from the host environment.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
§

impl<T> Revertible for T
where + T: Module,

§

fn revert<E>(&self, error: E) -> !
where + E: Into<OdraError>,

Reverts the contract execution with the given error.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToTokenId for T
where + T: Module,

Source§

fn token_id(&self, label: String) -> U256

Converts the label to a token ID.
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/controller/struct.BaseControllerContractRef.html b/docs/casper_name_contracts/contracts/controller/struct.BaseControllerContractRef.html new file mode 100644 index 0000000..54e65e2 --- /dev/null +++ b/docs/casper_name_contracts/contracts/controller/struct.BaseControllerContractRef.html @@ -0,0 +1,30 @@ +BaseControllerContractRef in casper_name_contracts::contracts::controller - Rust

Struct BaseControllerContractRef

Source
pub struct BaseControllerContractRef { /* private fields */ }
Expand description

BaseController Contract Ref.

+

Implementations§

Source§

impl BaseControllerContractRef

Source

pub fn has_role(&self, role: &Role, address: &Address) -> bool

Delegated. See self.access_control.has_role() for details.

+
Source

pub fn grant_role(&mut self, role: &Role, address: &Address)

Delegated. See self.access_control.grant_role() for details.

+
Source

pub fn revoke_role(&mut self, role: &Role, address: &Address)

Delegated. See self.access_control.revoke_role() for details.

+
Source

pub fn is_paused(&self) -> bool

Delegated. See self.pausable.is_paused() for details.

+
Source

pub fn require_not_paused(&self)

Delegated. See self.pausable.require_not_paused() for details.

+

Trait Implementations§

Source§

impl ContractRef for BaseControllerContractRef

Source§

fn new(env: Rc<ContractEnv>, address: Address) -> Self

Creates a new instance of the Contract Ref.
Source§

fn address(&self) -> &Address

Returns the address of the contract.
Source§

fn with_tokens(&self, tokens: U512) -> Self

Creates a new contract reference with attached tokens, based on the current instance. Read more
Source§

impl SchemaErrors for BaseControllerContractRef

§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
Source§

impl SchemaEvents for BaseControllerContractRef

§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/controller/struct.BaseControllerHostRef.html b/docs/casper_name_contracts/contracts/controller/struct.BaseControllerHostRef.html new file mode 100644 index 0000000..22aec2b --- /dev/null +++ b/docs/casper_name_contracts/contracts/controller/struct.BaseControllerHostRef.html @@ -0,0 +1,50 @@ +BaseControllerHostRef in casper_name_contracts::contracts::controller - Rust

Struct BaseControllerHostRef

Source
pub struct BaseControllerHostRef { /* private fields */ }
Expand description

BaseController Host Ref.

+

Implementations§

Source§

impl BaseControllerHostRef

Source

pub fn has_role(&self, role: &Role, address: &Address) -> bool

Delegated. See self.access_control.has_role() for details.

+
Source

pub fn grant_role(&mut self, role: &Role, address: &Address)

Delegated. See self.access_control.grant_role() for details.

+
Source

pub fn revoke_role(&mut self, role: &Role, address: &Address)

Delegated. See self.access_control.revoke_role() for details.

+
Source

pub fn is_paused(&self) -> bool

Delegated. See self.pausable.is_paused() for details.

+
Source

pub fn require_not_paused(&self)

Delegated. See self.pausable.require_not_paused() for details.

+
Source§

impl BaseControllerHostRef

Source

pub fn try_has_role(&self, role: &Role, address: &Address) -> OdraResult<bool>

Delegated. See self.access_control.has_role() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_grant_role( + &mut self, + role: &Role, + address: &Address, +) -> OdraResult<()>

Delegated. See self.access_control.grant_role() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_revoke_role( + &mut self, + role: &Role, + address: &Address, +) -> OdraResult<()>

Delegated. See self.access_control.revoke_role() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_is_paused(&self) -> OdraResult<bool>

Delegated. See self.pausable.is_paused() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_require_not_paused(&self) -> OdraResult<()>

Delegated. See self.pausable.require_not_paused() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+

Trait Implementations§

Source§

impl EntryPointsCallerProvider for BaseControllerHostRef

Source§

fn entry_points_caller(env: &HostEnv) -> EntryPointsCaller

Returns an [EntryPointsCaller] for the given host environment.
Source§

impl HasIdent for BaseControllerHostRef

Source§

fn ident() -> String

Returns the contract’s ident.
Source§

impl HostRef for BaseControllerHostRef

Source§

fn new(address: Address, env: HostEnv) -> Self

Creates a new host side reference to a contract.
Source§

fn with_tokens(&self, tokens: U512) -> Self

Creates a new host reference with attached tokens, based on the current instance. Read more
Source§

fn contract_address(&self) -> Address

Returns the address of the contract.
Source§

fn env(&self) -> &HostEnv

Returns the host environment.
Source§

fn get_event<T>(&self, index: i32) -> Result<T, EventError>
where + T: FromBytes + EventInstance,

Returns the n-th event emitted by the contract. Read more
Source§

fn last_call(&self) -> ContractCallResult

Returns a detailed information about the last call of the contract.

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Addressable for T
where + T: HostRef,

§

fn address(&self) -> Address

Returns a reference to the [Address] of the type.
Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/controller/struct.Controller.html b/docs/casper_name_contracts/contracts/controller/struct.Controller.html new file mode 100644 index 0000000..459ace5 --- /dev/null +++ b/docs/casper_name_contracts/contracts/controller/struct.Controller.html @@ -0,0 +1,68 @@ +Controller in casper_name_contracts::contracts::controller - Rust

Struct Controller

Source
pub struct Controller { /* private fields */ }
Expand description

Controller smart contract. It handles payments and talks to the Registrar +Contract.

+

Implementations§

Source§

impl Controller

Source

pub fn init(&mut self, registrar: Address, signer: PublicKey, treasury: Address)

Initializes the controller with the registrar contract address, the +signer public key and the treasury address.

+
Source

pub fn buy(&mut self, voucher: PaymentVoucher, signature: Bytes)

Payable. Buys new name tokens.

+
Source

pub fn renew(&mut self, voucher: RenewalPaymentVoucher, signature: Bytes)

Payable. Renews name tokens.

+
Source

pub fn buy_and_renew( + &mut self, + payment_voucher: PaymentVoucher, + payment_signature: Bytes, + renewal_voucher: RenewalPaymentVoucher, + renewal_signature: Bytes, +)

Payable. Buys new name tokens and renews existing ones.

+
Source

pub fn resolve(&self, full_domain: String) -> Option<Address>

Try to resolve a full domain name to an address.

+
Source

pub fn has_role(&self, role: &Role, address: &Address) -> bool

Delegated. See self.controller.has_role() for details.

+
Source

pub fn grant_role(&mut self, role: &Role, address: &Address)

Delegated. See self.controller.grant_role() for details.

+
Source

pub fn revoke_role(&mut self, role: &Role, address: &Address)

Delegated. See self.controller.revoke_role() for details.

+
Source

pub fn set_signer_public_key(&mut self, signer: PublicKey)

Delegated. See self.controller.set_signer_public_key() for details.

+
Source

pub fn set_treasury(&mut self, treasury: Address)

Delegated. See self.controller.set_treasury() for details.

+
Source

pub fn signer_public_key(&self) -> PublicKey

Delegated. See self.controller.signer_public_key() for details.

+
Source

pub fn pause(&mut self)

Delegated. See self.controller.pause() for details.

+
Source

pub fn unpause(&mut self)

Delegated. See self.controller.unpause() for details.

+
Source

pub fn is_paused(&self) -> bool

Delegated. See self.controller.is_paused() for details.

+

Trait Implementations§

Source§

impl HasEntrypoints for Controller

Source§

fn entrypoints() -> Vec<Entrypoint>

Returns the list of contract’s entrypoints.
Source§

impl HasEvents for Controller

Source§

fn events() -> Vec<Event>

Returns a list of Events used by the contract.
Source§

fn event_schemas() -> BTreeMap<String, Schema>

Returns a map of event schemas used by the contract.
Source§

impl HasIdent for Controller

Source§

fn ident() -> String

Returns the contract’s ident.
Source§

impl Module for Controller

Source§

fn new(env: Rc<ContractEnv>) -> Self

Creates a new instance of the module with the given contract environment.
Source§

fn env(&self) -> Rc<ContractEnv>

Returns the contract environment associated with the module.
Source§

impl OdraContract for Controller

Source§

type HostRef = ControllerHostRef

The host reference type.
Source§

type ContractRef = ControllerContractRef

The contract reference type.
Source§

type InitArgs = ControllerInitArgs

The init args type.
Source§

impl SchemaCustomTypes for Controller

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl SchemaEntrypoints for Controller

Source§

fn schema_entrypoints() -> Vec<Entrypoint>

Returns a vector of [Entrypoint]s.
Source§

impl SchemaErrors for Controller

Source§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
Source§

impl SchemaEvents for Controller

Source§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
Source§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<R> Deployer<R> for R
where + R: OdraContract,

§

fn deploy( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, +) -> <R as OdraContract>::HostRef

Deploys a contract with given init args. Read more
§

fn try_deploy( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, +) -> Result<<R as OdraContract>::HostRef, OdraError>

Tries to deploy a contract with given init args. Read more
§

fn deploy_with_cfg<T>( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, + cfg: T, +) -> <R as OdraContract>::HostRef
where + T: OdraConfig,

Deploys a contract with given init args and configuration. Read more
§

fn try_deploy_with_cfg<T>( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, + cfg: T, +) -> Result<<R as OdraContract>::HostRef, OdraError>
where + T: OdraConfig,

Tries to deploy a contract with given init args and configuration. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> HostRefLoader<<T as OdraContract>::HostRef> for T
where + T: OdraContract,

§

fn load(env: &HostEnv, address: Address) -> <T as OdraContract>::HostRef

Loads an existing contract from the host environment.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
§

impl<T> Revertible for T
where + T: Module,

§

fn revert<E>(&self, error: E) -> !
where + E: Into<OdraError>,

Reverts the contract execution with the given error.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToTokenId for T
where + T: Module,

Source§

fn token_id(&self, label: String) -> U256

Converts the label to a token ID.
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/controller/struct.ControllerContractRef.html b/docs/casper_name_contracts/contracts/controller/struct.ControllerContractRef.html new file mode 100644 index 0000000..9e67be1 --- /dev/null +++ b/docs/casper_name_contracts/contracts/controller/struct.ControllerContractRef.html @@ -0,0 +1,46 @@ +ControllerContractRef in casper_name_contracts::contracts::controller - Rust

Struct ControllerContractRef

Source
pub struct ControllerContractRef { /* private fields */ }
Expand description

Controller Contract Ref.

+

Implementations§

Source§

impl ControllerContractRef

Source

pub fn init(&mut self, registrar: Address, signer: PublicKey, treasury: Address)

Initializes the controller with the registrar contract address, the +signer public key and the treasury address.

+
Source

pub fn buy(&mut self, voucher: PaymentVoucher, signature: Bytes)

Payable. Buys new name tokens.

+
Source

pub fn renew(&mut self, voucher: RenewalPaymentVoucher, signature: Bytes)

Payable. Renews name tokens.

+
Source

pub fn buy_and_renew( + &mut self, + payment_voucher: PaymentVoucher, + payment_signature: Bytes, + renewal_voucher: RenewalPaymentVoucher, + renewal_signature: Bytes, +)

Payable. Buys new name tokens and renews existing ones.

+
Source

pub fn resolve(&self, full_domain: String) -> Option<Address>

Try to resolve a full domain name to an address.

+
Source

pub fn has_role(&self, role: &Role, address: &Address) -> bool

Delegated. See self.controller.has_role() for details.

+
Source

pub fn grant_role(&mut self, role: &Role, address: &Address)

Delegated. See self.controller.grant_role() for details.

+
Source

pub fn revoke_role(&mut self, role: &Role, address: &Address)

Delegated. See self.controller.revoke_role() for details.

+
Source

pub fn set_signer_public_key(&mut self, signer: PublicKey)

Delegated. See self.controller.set_signer_public_key() for details.

+
Source

pub fn set_treasury(&mut self, treasury: Address)

Delegated. See self.controller.set_treasury() for details.

+
Source

pub fn signer_public_key(&self) -> PublicKey

Delegated. See self.controller.signer_public_key() for details.

+
Source

pub fn pause(&mut self)

Delegated. See self.controller.pause() for details.

+
Source

pub fn unpause(&mut self)

Delegated. See self.controller.unpause() for details.

+
Source

pub fn is_paused(&self) -> bool

Delegated. See self.controller.is_paused() for details.

+

Trait Implementations§

Source§

impl ContractRef for ControllerContractRef

Source§

fn new(env: Rc<ContractEnv>, address: Address) -> Self

Creates a new instance of the Contract Ref.
Source§

fn address(&self) -> &Address

Returns the address of the contract.
Source§

fn with_tokens(&self, tokens: U512) -> Self

Creates a new contract reference with attached tokens, based on the current instance. Read more
Source§

impl SchemaErrors for ControllerContractRef

§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
Source§

impl SchemaEvents for ControllerContractRef

§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/controller/struct.ControllerHostRef.html b/docs/casper_name_contracts/contracts/controller/struct.ControllerHostRef.html new file mode 100644 index 0000000..3854d51 --- /dev/null +++ b/docs/casper_name_contracts/contracts/controller/struct.ControllerHostRef.html @@ -0,0 +1,104 @@ +ControllerHostRef in casper_name_contracts::contracts::controller - Rust

Struct ControllerHostRef

Source
pub struct ControllerHostRef { /* private fields */ }
Expand description

Controller Host Ref.

+

Implementations§

Source§

impl ControllerHostRef

Source

pub fn init(&mut self, registrar: Address, signer: PublicKey, treasury: Address)

Initializes the controller with the registrar contract address, the +signer public key and the treasury address.

+
Source

pub fn buy(&mut self, voucher: PaymentVoucher, signature: Bytes)

Payable. Buys new name tokens.

+
Source

pub fn renew(&mut self, voucher: RenewalPaymentVoucher, signature: Bytes)

Payable. Renews name tokens.

+
Source

pub fn buy_and_renew( + &mut self, + payment_voucher: PaymentVoucher, + payment_signature: Bytes, + renewal_voucher: RenewalPaymentVoucher, + renewal_signature: Bytes, +)

Payable. Buys new name tokens and renews existing ones.

+
Source

pub fn resolve(&self, full_domain: String) -> Option<Address>

Try to resolve a full domain name to an address.

+
Source

pub fn has_role(&self, role: &Role, address: &Address) -> bool

Delegated. See self.controller.has_role() for details.

+
Source

pub fn grant_role(&mut self, role: &Role, address: &Address)

Delegated. See self.controller.grant_role() for details.

+
Source

pub fn revoke_role(&mut self, role: &Role, address: &Address)

Delegated. See self.controller.revoke_role() for details.

+
Source

pub fn set_signer_public_key(&mut self, signer: PublicKey)

Delegated. See self.controller.set_signer_public_key() for details.

+
Source

pub fn set_treasury(&mut self, treasury: Address)

Delegated. See self.controller.set_treasury() for details.

+
Source

pub fn signer_public_key(&self) -> PublicKey

Delegated. See self.controller.signer_public_key() for details.

+
Source

pub fn pause(&mut self)

Delegated. See self.controller.pause() for details.

+
Source

pub fn unpause(&mut self)

Delegated. See self.controller.unpause() for details.

+
Source

pub fn is_paused(&self) -> bool

Delegated. See self.controller.is_paused() for details.

+
Source§

impl ControllerHostRef

Source

pub fn try_init( + &mut self, + registrar: Address, + signer: PublicKey, + treasury: Address, +) -> OdraResult<()>

Initializes the controller with the registrar contract address, the +signer public key and the treasury address. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_buy( + &mut self, + voucher: PaymentVoucher, + signature: Bytes, +) -> OdraResult<()>

Payable. Buys new name tokens. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_renew( + &mut self, + voucher: RenewalPaymentVoucher, + signature: Bytes, +) -> OdraResult<()>

Payable. Renews name tokens. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_buy_and_renew( + &mut self, + payment_voucher: PaymentVoucher, + payment_signature: Bytes, + renewal_voucher: RenewalPaymentVoucher, + renewal_signature: Bytes, +) -> OdraResult<()>

Payable. Buys new name tokens and renews existing ones. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_resolve(&self, full_domain: String) -> OdraResult<Option<Address>>

Try to resolve a full domain name to an address. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_has_role(&self, role: &Role, address: &Address) -> OdraResult<bool>

Delegated. See self.controller.has_role() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_grant_role( + &mut self, + role: &Role, + address: &Address, +) -> OdraResult<()>

Delegated. See self.controller.grant_role() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_revoke_role( + &mut self, + role: &Role, + address: &Address, +) -> OdraResult<()>

Delegated. See self.controller.revoke_role() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_set_signer_public_key(&mut self, signer: PublicKey) -> OdraResult<()>

Delegated. See self.controller.set_signer_public_key() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_set_treasury(&mut self, treasury: Address) -> OdraResult<()>

Delegated. See self.controller.set_treasury() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_signer_public_key(&self) -> OdraResult<PublicKey>

Delegated. See self.controller.signer_public_key() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_pause(&mut self) -> OdraResult<()>

Delegated. See self.controller.pause() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_unpause(&mut self) -> OdraResult<()>

Delegated. See self.controller.unpause() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_is_paused(&self) -> OdraResult<bool>

Delegated. See self.controller.is_paused() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+

Trait Implementations§

Source§

impl EntryPointsCallerProvider for ControllerHostRef

Source§

fn entry_points_caller(env: &HostEnv) -> EntryPointsCaller

Returns an [EntryPointsCaller] for the given host environment.
Source§

impl HasIdent for ControllerHostRef

Source§

fn ident() -> String

Returns the contract’s ident.
Source§

impl HostRef for ControllerHostRef

Source§

fn new(address: Address, env: HostEnv) -> Self

Creates a new host side reference to a contract.
Source§

fn with_tokens(&self, tokens: U512) -> Self

Creates a new host reference with attached tokens, based on the current instance. Read more
Source§

fn contract_address(&self) -> Address

Returns the address of the contract.
Source§

fn env(&self) -> &HostEnv

Returns the host environment.
Source§

fn get_event<T>(&self, index: i32) -> Result<T, EventError>
where + T: FromBytes + EventInstance,

Returns the n-th event emitted by the contract. Read more
Source§

fn last_call(&self) -> ContractCallResult

Returns a detailed information about the last call of the contract.

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Addressable for T
where + T: HostRef,

§

fn address(&self) -> Address

Returns a reference to the [Address] of the type.
Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/controller/struct.ControllerInitArgs.html b/docs/casper_name_contracts/contracts/controller/struct.ControllerInitArgs.html new file mode 100644 index 0000000..6c92696 --- /dev/null +++ b/docs/casper_name_contracts/contracts/controller/struct.ControllerInitArgs.html @@ -0,0 +1,29 @@ +ControllerInitArgs in casper_name_contracts::contracts::controller - Rust

Struct ControllerInitArgs

Source
pub struct ControllerInitArgs {
+    pub registrar: Address,
+    pub signer: PublicKey,
+    pub treasury: Address,
+}
Expand description

Controller contract constructor arguments.

+

Fields§

§registrar: Address§signer: PublicKey§treasury: Address

Trait Implementations§

Source§

impl Into<RuntimeArgs> for ControllerInitArgs

Source§

fn into(self) -> RuntimeArgs

Converts this type into the (usually inferred) input type.
Source§

impl InitArgs for ControllerInitArgs

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/controller/struct.PaymentFulfilled.html b/docs/casper_name_contracts/contracts/controller/struct.PaymentFulfilled.html new file mode 100644 index 0000000..23305dd --- /dev/null +++ b/docs/casper_name_contracts/contracts/controller/struct.PaymentFulfilled.html @@ -0,0 +1,32 @@ +PaymentFulfilled in casper_name_contracts::contracts::controller - Rust

Struct PaymentFulfilled

Source
pub struct PaymentFulfilled { /* private fields */ }
Expand description

Event with the payment information.

+

Implementations§

Source§

impl PaymentFulfilled

Source

pub fn new(payment_id: String, buyer: Address, amount: U512) -> Self

Creates a new instance of the PaymentFulfilled event.

+

Trait Implementations§

Source§

impl CLTyped for PaymentFulfilled

Source§

fn cl_type() -> CLType

The CLType of Self.
Source§

impl Debug for PaymentFulfilled

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl EventInstance for PaymentFulfilled

Source§

fn name() -> String

Returns the name of the event.
Source§

fn schema() -> Schema

Returns the Schema of the event.
Source§

impl FromBytes for PaymentFulfilled

Source§

fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>

Deserializes the slice into Self.
Source§

fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>

Deserializes the Vec<u8> into Self.
Source§

impl NamedCLTyped for PaymentFulfilled

Source§

fn ty() -> NamedCLType

Returns the NamedCLType of the implementing type.
Source§

impl PartialEq for PaymentFulfilled

Source§

fn eq(&self, other: &PaymentFulfilled) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl SchemaCustomTypes for PaymentFulfilled

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl ToBytes for PaymentFulfilled

Source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Serializes &self to a Vec<u8>.
Source§

fn serialized_length(&self) -> usize

Returns the length of the Vec<u8> which would be returned from a successful call to +to_bytes() or into_bytes(). The data is not actually serialized, so this call is +relatively cheap.
Source§

fn into_bytes(self) -> Result<Vec<u8>, Error>
where + Self: Sized,

Consumes self and serializes to a Vec<u8>.
Source§

fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Writes &self into a mutable writer.
Source§

impl Eq for PaymentFulfilled

Source§

impl StructuralPartialEq for PaymentFulfilled

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> EntrypointArgument for T
where + T: CLTyped + ToBytes,

§

fn is_required() -> bool

Returns true if the argument is required.
§

fn cl_type() -> CLType

Returns the CLType of the argument.
§

fn insert_runtime_arg(self, name: &str, args: &mut RuntimeArgs)

Inserts the argument into the runtime args.
§

fn unwrap(value: Option<T>, env: &ContractEnv) -> T

Unwraps the argument from an Option.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
§

impl<T> IntoEvent for T
where + T: EventInstance,

§

fn into_event() -> Event

Converts the type into an [Event].
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/controller/struct.SignerPublicKeyChanged.html b/docs/casper_name_contracts/contracts/controller/struct.SignerPublicKeyChanged.html new file mode 100644 index 0000000..4b6bc4f --- /dev/null +++ b/docs/casper_name_contracts/contracts/controller/struct.SignerPublicKeyChanged.html @@ -0,0 +1,32 @@ +SignerPublicKeyChanged in casper_name_contracts::contracts::controller - Rust

Struct SignerPublicKeyChanged

Source
pub struct SignerPublicKeyChanged { /* private fields */ }
Expand description

Event emitted when the signer public key is changed.

+

Implementations§

Source§

impl SignerPublicKeyChanged

Source

pub fn new(new_signer_public_key: PublicKey) -> Self

Creates a new instance of the SignerPublicKeyChanged event.

+

Trait Implementations§

Source§

impl CLTyped for SignerPublicKeyChanged

Source§

fn cl_type() -> CLType

The CLType of Self.
Source§

impl Debug for SignerPublicKeyChanged

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl EventInstance for SignerPublicKeyChanged

Source§

fn name() -> String

Returns the name of the event.
Source§

fn schema() -> Schema

Returns the Schema of the event.
Source§

impl FromBytes for SignerPublicKeyChanged

Source§

fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>

Deserializes the slice into Self.
Source§

fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>

Deserializes the Vec<u8> into Self.
Source§

impl NamedCLTyped for SignerPublicKeyChanged

Source§

fn ty() -> NamedCLType

Returns the NamedCLType of the implementing type.
Source§

impl PartialEq for SignerPublicKeyChanged

Source§

fn eq(&self, other: &SignerPublicKeyChanged) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl SchemaCustomTypes for SignerPublicKeyChanged

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl ToBytes for SignerPublicKeyChanged

Source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Serializes &self to a Vec<u8>.
Source§

fn serialized_length(&self) -> usize

Returns the length of the Vec<u8> which would be returned from a successful call to +to_bytes() or into_bytes(). The data is not actually serialized, so this call is +relatively cheap.
Source§

fn into_bytes(self) -> Result<Vec<u8>, Error>
where + Self: Sized,

Consumes self and serializes to a Vec<u8>.
Source§

fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Writes &self into a mutable writer.
Source§

impl Eq for SignerPublicKeyChanged

Source§

impl StructuralPartialEq for SignerPublicKeyChanged

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> EntrypointArgument for T
where + T: CLTyped + ToBytes,

§

fn is_required() -> bool

Returns true if the argument is required.
§

fn cl_type() -> CLType

Returns the CLType of the argument.
§

fn insert_runtime_arg(self, name: &str, args: &mut RuntimeArgs)

Inserts the argument into the runtime args.
§

fn unwrap(value: Option<T>, env: &ContractEnv) -> T

Unwraps the argument from an Option.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
§

impl<T> IntoEvent for T
where + T: EventInstance,

§

fn into_event() -> Event

Converts the type into an [Event].
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/controller/struct.TreasuryAddressChanged.html b/docs/casper_name_contracts/contracts/controller/struct.TreasuryAddressChanged.html new file mode 100644 index 0000000..ccd949f --- /dev/null +++ b/docs/casper_name_contracts/contracts/controller/struct.TreasuryAddressChanged.html @@ -0,0 +1,32 @@ +TreasuryAddressChanged in casper_name_contracts::contracts::controller - Rust

Struct TreasuryAddressChanged

Source
pub struct TreasuryAddressChanged { /* private fields */ }
Expand description

Event emitted when the treasury address is changed.

+

Implementations§

Source§

impl TreasuryAddressChanged

Source

pub fn new(new_treasury_address: Address) -> Self

Creates a new instance of the TreasuryAddressChanged event.

+

Trait Implementations§

Source§

impl CLTyped for TreasuryAddressChanged

Source§

fn cl_type() -> CLType

The CLType of Self.
Source§

impl Debug for TreasuryAddressChanged

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl EventInstance for TreasuryAddressChanged

Source§

fn name() -> String

Returns the name of the event.
Source§

fn schema() -> Schema

Returns the Schema of the event.
Source§

impl FromBytes for TreasuryAddressChanged

Source§

fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>

Deserializes the slice into Self.
Source§

fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>

Deserializes the Vec<u8> into Self.
Source§

impl NamedCLTyped for TreasuryAddressChanged

Source§

fn ty() -> NamedCLType

Returns the NamedCLType of the implementing type.
Source§

impl PartialEq for TreasuryAddressChanged

Source§

fn eq(&self, other: &TreasuryAddressChanged) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl SchemaCustomTypes for TreasuryAddressChanged

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl ToBytes for TreasuryAddressChanged

Source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Serializes &self to a Vec<u8>.
Source§

fn serialized_length(&self) -> usize

Returns the length of the Vec<u8> which would be returned from a successful call to +to_bytes() or into_bytes(). The data is not actually serialized, so this call is +relatively cheap.
Source§

fn into_bytes(self) -> Result<Vec<u8>, Error>
where + Self: Sized,

Consumes self and serializes to a Vec<u8>.
Source§

fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Writes &self into a mutable writer.
Source§

impl Eq for TreasuryAddressChanged

Source§

impl StructuralPartialEq for TreasuryAddressChanged

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> EntrypointArgument for T
where + T: CLTyped + ToBytes,

§

fn is_required() -> bool

Returns true if the argument is required.
§

fn cl_type() -> CLType

Returns the CLType of the argument.
§

fn insert_runtime_arg(self, name: &str, args: &mut RuntimeArgs)

Inserts the argument into the runtime args.
§

fn unwrap(value: Option<T>, env: &ContractEnv) -> T

Unwraps the argument from an Option.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
§

impl<T> IntoEvent for T
where + T: EventInstance,

§

fn into_event() -> Event

Converts the type into an [Event].
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/index.html b/docs/casper_name_contracts/contracts/index.html new file mode 100644 index 0000000..4ac4e38 --- /dev/null +++ b/docs/casper_name_contracts/contracts/index.html @@ -0,0 +1 @@ +casper_name_contracts::contracts - Rust
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/marketplace/__secondary_market_test_parts/struct.SecondaryMarketHostRef.html b/docs/casper_name_contracts/contracts/marketplace/__secondary_market_test_parts/struct.SecondaryMarketHostRef.html new file mode 100644 index 0000000..b87dc8d --- /dev/null +++ b/docs/casper_name_contracts/contracts/marketplace/__secondary_market_test_parts/struct.SecondaryMarketHostRef.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../../casper_name_contracts/contracts/marketplace/struct.SecondaryMarketHostRef.html...

+ + + \ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/marketplace/__secondary_market_test_parts/struct.SecondaryMarketInitArgs.html b/docs/casper_name_contracts/contracts/marketplace/__secondary_market_test_parts/struct.SecondaryMarketInitArgs.html new file mode 100644 index 0000000..1f2977c --- /dev/null +++ b/docs/casper_name_contracts/contracts/marketplace/__secondary_market_test_parts/struct.SecondaryMarketInitArgs.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../../casper_name_contracts/contracts/marketplace/struct.SecondaryMarketInitArgs.html...

+ + + \ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/marketplace/index.html b/docs/casper_name_contracts/contracts/marketplace/index.html new file mode 100644 index 0000000..b80e99d --- /dev/null +++ b/docs/casper_name_contracts/contracts/marketplace/index.html @@ -0,0 +1 @@ +casper_name_contracts::contracts::marketplace - Rust

Module marketplace

Source

Structs§

SecondaryMarket
Secondary market smart contract. It handles the secondary market operations.
SecondaryMarketContractRef
SecondaryMarket Contract Ref.
SecondaryMarketHostRef
SecondaryMarket Host Ref.
SecondaryMarketInitArgs
SecondaryMarket contract constructor arguments.
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/marketplace/sidebar-items.js b/docs/casper_name_contracts/contracts/marketplace/sidebar-items.js new file mode 100644 index 0000000..a33c95e --- /dev/null +++ b/docs/casper_name_contracts/contracts/marketplace/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["SecondaryMarket","SecondaryMarketContractRef","SecondaryMarketHostRef","SecondaryMarketInitArgs"]}; \ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/marketplace/struct.SecondaryMarket.html b/docs/casper_name_contracts/contracts/marketplace/struct.SecondaryMarket.html new file mode 100644 index 0000000..cb08acc --- /dev/null +++ b/docs/casper_name_contracts/contracts/marketplace/struct.SecondaryMarket.html @@ -0,0 +1,63 @@ +SecondaryMarket in casper_name_contracts::contracts::marketplace - Rust

Struct SecondaryMarket

Source
pub struct SecondaryMarket { /* private fields */ }
Expand description

Secondary market smart contract. It handles the secondary market operations.

+

Implementations§

Source§

impl SecondaryMarket

Source

pub fn init( + &mut self, + signer: PublicKey, + treasury: Address, + name_token: Address, +)

Initializes the secondary market with the signer public key, the treasury +address and the name token contract address.

+
Source

pub fn buy(&mut self, voucher: SecondarySaleVoucher, signature: Bytes)

Payable. Buys name tokens from the secondary market.

+
Source

pub fn has_role(&self, role: &Role, address: &Address) -> bool

Delegated. See self.controller.has_role() for details.

+
Source

pub fn grant_role(&mut self, role: &Role, address: &Address)

Delegated. See self.controller.grant_role() for details.

+
Source

pub fn revoke_role(&mut self, role: &Role, address: &Address)

Delegated. See self.controller.revoke_role() for details.

+
Source

pub fn set_signer_public_key(&mut self, signer: PublicKey)

Delegated. See self.controller.set_signer_public_key() for details.

+
Source

pub fn set_treasury(&mut self, treasury: Address)

Delegated. See self.controller.set_treasury() for details.

+
Source

pub fn signer_public_key(&self) -> PublicKey

Delegated. See self.controller.signer_public_key() for details.

+
Source

pub fn pause(&mut self)

Delegated. See self.controller.pause() for details.

+
Source

pub fn unpause(&mut self)

Delegated. See self.controller.unpause() for details.

+
Source

pub fn is_paused(&self) -> bool

Delegated. See self.controller.is_paused() for details.

+

Trait Implementations§

Source§

impl HasEntrypoints for SecondaryMarket

Source§

fn entrypoints() -> Vec<Entrypoint>

Returns the list of contract’s entrypoints.
Source§

impl HasEvents for SecondaryMarket

Source§

fn events() -> Vec<Event>

Returns a list of Events used by the contract.
Source§

fn event_schemas() -> BTreeMap<String, Schema>

Returns a map of event schemas used by the contract.
Source§

impl HasIdent for SecondaryMarket

Source§

fn ident() -> String

Returns the contract’s ident.
Source§

impl Module for SecondaryMarket

Source§

fn new(env: Rc<ContractEnv>) -> Self

Creates a new instance of the module with the given contract environment.
Source§

fn env(&self) -> Rc<ContractEnv>

Returns the contract environment associated with the module.
Source§

impl OdraContract for SecondaryMarket

Source§

type HostRef = SecondaryMarketHostRef

The host reference type.
Source§

type ContractRef = SecondaryMarketContractRef

The contract reference type.
Source§

type InitArgs = SecondaryMarketInitArgs

The init args type.
Source§

impl SchemaCustomTypes for SecondaryMarket

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl SchemaEntrypoints for SecondaryMarket

Source§

fn schema_entrypoints() -> Vec<Entrypoint>

Returns a vector of [Entrypoint]s.
Source§

impl SchemaErrors for SecondaryMarket

Source§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
Source§

impl SchemaEvents for SecondaryMarket

Source§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
Source§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<R> Deployer<R> for R
where + R: OdraContract,

§

fn deploy( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, +) -> <R as OdraContract>::HostRef

Deploys a contract with given init args. Read more
§

fn try_deploy( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, +) -> Result<<R as OdraContract>::HostRef, OdraError>

Tries to deploy a contract with given init args. Read more
§

fn deploy_with_cfg<T>( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, + cfg: T, +) -> <R as OdraContract>::HostRef
where + T: OdraConfig,

Deploys a contract with given init args and configuration. Read more
§

fn try_deploy_with_cfg<T>( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, + cfg: T, +) -> Result<<R as OdraContract>::HostRef, OdraError>
where + T: OdraConfig,

Tries to deploy a contract with given init args and configuration. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> HostRefLoader<<T as OdraContract>::HostRef> for T
where + T: OdraContract,

§

fn load(env: &HostEnv, address: Address) -> <T as OdraContract>::HostRef

Loads an existing contract from the host environment.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
§

impl<T> Revertible for T
where + T: Module,

§

fn revert<E>(&self, error: E) -> !
where + E: Into<OdraError>,

Reverts the contract execution with the given error.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToTokenId for T
where + T: Module,

Source§

fn token_id(&self, label: String) -> U256

Converts the label to a token ID.
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/marketplace/struct.SecondaryMarketContractRef.html b/docs/casper_name_contracts/contracts/marketplace/struct.SecondaryMarketContractRef.html new file mode 100644 index 0000000..6cc8f21 --- /dev/null +++ b/docs/casper_name_contracts/contracts/marketplace/struct.SecondaryMarketContractRef.html @@ -0,0 +1,42 @@ +SecondaryMarketContractRef in casper_name_contracts::contracts::marketplace - Rust

Struct SecondaryMarketContractRef

Source
pub struct SecondaryMarketContractRef { /* private fields */ }
Expand description

SecondaryMarket Contract Ref.

+

Implementations§

Source§

impl SecondaryMarketContractRef

Source

pub fn init( + &mut self, + signer: PublicKey, + treasury: Address, + name_token: Address, +)

Initializes the secondary market with the signer public key, the treasury +address and the name token contract address.

+
Source

pub fn buy(&mut self, voucher: SecondarySaleVoucher, signature: Bytes)

Payable. Buys name tokens from the secondary market.

+
Source

pub fn has_role(&self, role: &Role, address: &Address) -> bool

Delegated. See self.controller.has_role() for details.

+
Source

pub fn grant_role(&mut self, role: &Role, address: &Address)

Delegated. See self.controller.grant_role() for details.

+
Source

pub fn revoke_role(&mut self, role: &Role, address: &Address)

Delegated. See self.controller.revoke_role() for details.

+
Source

pub fn set_signer_public_key(&mut self, signer: PublicKey)

Delegated. See self.controller.set_signer_public_key() for details.

+
Source

pub fn set_treasury(&mut self, treasury: Address)

Delegated. See self.controller.set_treasury() for details.

+
Source

pub fn signer_public_key(&self) -> PublicKey

Delegated. See self.controller.signer_public_key() for details.

+
Source

pub fn pause(&mut self)

Delegated. See self.controller.pause() for details.

+
Source

pub fn unpause(&mut self)

Delegated. See self.controller.unpause() for details.

+
Source

pub fn is_paused(&self) -> bool

Delegated. See self.controller.is_paused() for details.

+

Trait Implementations§

Source§

impl ContractRef for SecondaryMarketContractRef

Source§

fn new(env: Rc<ContractEnv>, address: Address) -> Self

Creates a new instance of the Contract Ref.
Source§

fn address(&self) -> &Address

Returns the address of the contract.
Source§

fn with_tokens(&self, tokens: U512) -> Self

Creates a new contract reference with attached tokens, based on the current instance. Read more
Source§

impl SchemaErrors for SecondaryMarketContractRef

§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
Source§

impl SchemaEvents for SecondaryMarketContractRef

§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/marketplace/struct.SecondaryMarketHostRef.html b/docs/casper_name_contracts/contracts/marketplace/struct.SecondaryMarketHostRef.html new file mode 100644 index 0000000..e14d7e9 --- /dev/null +++ b/docs/casper_name_contracts/contracts/marketplace/struct.SecondaryMarketHostRef.html @@ -0,0 +1,84 @@ +SecondaryMarketHostRef in casper_name_contracts::contracts::marketplace - Rust

Struct SecondaryMarketHostRef

Source
pub struct SecondaryMarketHostRef { /* private fields */ }
Expand description

SecondaryMarket Host Ref.

+

Implementations§

Source§

impl SecondaryMarketHostRef

Source

pub fn init( + &mut self, + signer: PublicKey, + treasury: Address, + name_token: Address, +)

Initializes the secondary market with the signer public key, the treasury +address and the name token contract address.

+
Source

pub fn buy(&mut self, voucher: SecondarySaleVoucher, signature: Bytes)

Payable. Buys name tokens from the secondary market.

+
Source

pub fn has_role(&self, role: &Role, address: &Address) -> bool

Delegated. See self.controller.has_role() for details.

+
Source

pub fn grant_role(&mut self, role: &Role, address: &Address)

Delegated. See self.controller.grant_role() for details.

+
Source

pub fn revoke_role(&mut self, role: &Role, address: &Address)

Delegated. See self.controller.revoke_role() for details.

+
Source

pub fn set_signer_public_key(&mut self, signer: PublicKey)

Delegated. See self.controller.set_signer_public_key() for details.

+
Source

pub fn set_treasury(&mut self, treasury: Address)

Delegated. See self.controller.set_treasury() for details.

+
Source

pub fn signer_public_key(&self) -> PublicKey

Delegated. See self.controller.signer_public_key() for details.

+
Source

pub fn pause(&mut self)

Delegated. See self.controller.pause() for details.

+
Source

pub fn unpause(&mut self)

Delegated. See self.controller.unpause() for details.

+
Source

pub fn is_paused(&self) -> bool

Delegated. See self.controller.is_paused() for details.

+
Source§

impl SecondaryMarketHostRef

Source

pub fn try_init( + &mut self, + signer: PublicKey, + treasury: Address, + name_token: Address, +) -> OdraResult<()>

Initializes the secondary market with the signer public key, the treasury +address and the name token contract address. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_buy( + &mut self, + voucher: SecondarySaleVoucher, + signature: Bytes, +) -> OdraResult<()>

Payable. Buys name tokens from the secondary market. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_has_role(&self, role: &Role, address: &Address) -> OdraResult<bool>

Delegated. See self.controller.has_role() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_grant_role( + &mut self, + role: &Role, + address: &Address, +) -> OdraResult<()>

Delegated. See self.controller.grant_role() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_revoke_role( + &mut self, + role: &Role, + address: &Address, +) -> OdraResult<()>

Delegated. See self.controller.revoke_role() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_set_signer_public_key(&mut self, signer: PublicKey) -> OdraResult<()>

Delegated. See self.controller.set_signer_public_key() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_set_treasury(&mut self, treasury: Address) -> OdraResult<()>

Delegated. See self.controller.set_treasury() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_signer_public_key(&self) -> OdraResult<PublicKey>

Delegated. See self.controller.signer_public_key() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_pause(&mut self) -> OdraResult<()>

Delegated. See self.controller.pause() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_unpause(&mut self) -> OdraResult<()>

Delegated. See self.controller.unpause() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_is_paused(&self) -> OdraResult<bool>

Delegated. See self.controller.is_paused() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+

Trait Implementations§

Source§

impl EntryPointsCallerProvider for SecondaryMarketHostRef

Source§

fn entry_points_caller(env: &HostEnv) -> EntryPointsCaller

Returns an [EntryPointsCaller] for the given host environment.
Source§

impl HasIdent for SecondaryMarketHostRef

Source§

fn ident() -> String

Returns the contract’s ident.
Source§

impl HostRef for SecondaryMarketHostRef

Source§

fn new(address: Address, env: HostEnv) -> Self

Creates a new host side reference to a contract.
Source§

fn with_tokens(&self, tokens: U512) -> Self

Creates a new host reference with attached tokens, based on the current instance. Read more
Source§

fn contract_address(&self) -> Address

Returns the address of the contract.
Source§

fn env(&self) -> &HostEnv

Returns the host environment.
Source§

fn get_event<T>(&self, index: i32) -> Result<T, EventError>
where + T: FromBytes + EventInstance,

Returns the n-th event emitted by the contract. Read more
Source§

fn last_call(&self) -> ContractCallResult

Returns a detailed information about the last call of the contract.

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Addressable for T
where + T: HostRef,

§

fn address(&self) -> Address

Returns a reference to the [Address] of the type.
Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/marketplace/struct.SecondaryMarketInitArgs.html b/docs/casper_name_contracts/contracts/marketplace/struct.SecondaryMarketInitArgs.html new file mode 100644 index 0000000..b6561f7 --- /dev/null +++ b/docs/casper_name_contracts/contracts/marketplace/struct.SecondaryMarketInitArgs.html @@ -0,0 +1,29 @@ +SecondaryMarketInitArgs in casper_name_contracts::contracts::marketplace - Rust

Struct SecondaryMarketInitArgs

Source
pub struct SecondaryMarketInitArgs {
+    pub signer: PublicKey,
+    pub treasury: Address,
+    pub name_token: Address,
+}
Expand description

SecondaryMarket contract constructor arguments.

+

Fields§

§signer: PublicKey§treasury: Address§name_token: Address

Trait Implementations§

Source§

impl Into<RuntimeArgs> for SecondaryMarketInitArgs

Source§

fn into(self) -> RuntimeArgs

Converts this type into the (usually inferred) input type.
Source§

impl InitArgs for SecondaryMarketInitArgs

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/name_token/__name_token_test_parts/struct.NameTokenHostRef.html b/docs/casper_name_contracts/contracts/name_token/__name_token_test_parts/struct.NameTokenHostRef.html new file mode 100644 index 0000000..5f76d8d --- /dev/null +++ b/docs/casper_name_contracts/contracts/name_token/__name_token_test_parts/struct.NameTokenHostRef.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../../casper_name_contracts/contracts/name_token/struct.NameTokenHostRef.html...

+ + + \ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/name_token/__name_token_test_parts/struct.NameTokenInitArgs.html b/docs/casper_name_contracts/contracts/name_token/__name_token_test_parts/struct.NameTokenInitArgs.html new file mode 100644 index 0000000..26578a8 --- /dev/null +++ b/docs/casper_name_contracts/contracts/name_token/__name_token_test_parts/struct.NameTokenInitArgs.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../../casper_name_contracts/contracts/name_token/struct.NameTokenInitArgs.html...

+ + + \ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/name_token/enum.NameTokenError.html b/docs/casper_name_contracts/contracts/name_token/enum.NameTokenError.html new file mode 100644 index 0000000..83be84e --- /dev/null +++ b/docs/casper_name_contracts/contracts/name_token/enum.NameTokenError.html @@ -0,0 +1,32 @@ +NameTokenError in casper_name_contracts::contracts::name_token - Rust

Enum NameTokenError

Source
pub enum NameTokenError {
+    NotWhitelisted = 1_301,
+    InvalidTokenOwner = 1_302,
+    ExpiredTokenTransfer = 1_303,
+    InvalidTokenIdentifier = 1_304,
+    InvalidResolver = 1_305,
+    TokenSupplyDepleted = 1_306,
+    WhitelistedAlready = 1_307,
+}

Variants§

§

NotWhitelisted = 1_301

§

InvalidTokenOwner = 1_302

§

ExpiredTokenTransfer = 1_303

§

InvalidTokenIdentifier = 1_304

§

InvalidResolver = 1_305

§

TokenSupplyDepleted = 1_306

§

WhitelistedAlready = 1_307

Trait Implementations§

Source§

impl From<NameTokenError> for OdraError

Source§

fn from(error: NameTokenError) -> Self

Converts to this type from the input type.
Source§

impl SchemaErrors for NameTokenError

Source§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/name_token/index.html b/docs/casper_name_contracts/contracts/name_token/index.html new file mode 100644 index 0000000..d9729ac --- /dev/null +++ b/docs/casper_name_contracts/contracts/name_token/index.html @@ -0,0 +1 @@ +casper_name_contracts::contracts::name_token - Rust

Module name_token

Source

Structs§

NameToken
NameToken contract. It is a CEP95 token with additional functionalities.
NameTokenContractRef
NameToken Contract Ref.
NameTokenHostRef
NameToken Host Ref.
NameTokenInitArgs
NameToken contract constructor arguments.

Enums§

NameTokenError
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/name_token/sidebar-items.js b/docs/casper_name_contracts/contracts/name_token/sidebar-items.js new file mode 100644 index 0000000..2ce5069 --- /dev/null +++ b/docs/casper_name_contracts/contracts/name_token/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["NameTokenError"],"struct":["NameToken","NameTokenContractRef","NameTokenHostRef","NameTokenInitArgs"]}; \ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/name_token/struct.NameToken.html b/docs/casper_name_contracts/contracts/name_token/struct.NameToken.html new file mode 100644 index 0000000..c3589c1 --- /dev/null +++ b/docs/casper_name_contracts/contracts/name_token/struct.NameToken.html @@ -0,0 +1,81 @@ +NameToken in casper_name_contracts::contracts::name_token - Rust

Struct NameToken

Source
pub struct NameToken { /* private fields */ }
Expand description

NameToken contract. It is a CEP95 token with additional functionalities.

+

Implementations§

Source§

impl NameToken

Source

pub fn init(&mut self, name: String, symbol: String, max_supply: u64)

Initializes CEP95 with the given name and symbol.

+
Source

pub fn token_exists(&self, token_id: U256) -> bool

Source

pub fn mint( + &mut self, + recipient: Address, + token_id: U256, + token_metadata: Vec<(String, String)>, +)

Source

pub fn burn(&mut self, token_id: U256)

Source

pub fn admin_transfer(&mut self, recipient: Address, token_ids: Vec<U256>)

Source

pub fn transfer_from(&mut self, from: Address, to: Address, token_id: U256)

Source

pub fn set_token_metadata( + &mut self, + token_id: U256, + token_metadata: Vec<(String, String)>, +)

Source

pub fn resolver(&self, token_id: U256) -> Option<Address>

Source

pub fn set_resolver(&mut self, token_id: U256, resolver: Address)

Source

pub fn assert_is_owner(&self, token_id: U256, address: Address)

Source

pub fn is_token_valid(&self, token_id: U256) -> bool

Source

pub fn set_default_resolver(&mut self, resolver: Address)

Only admin. Set the default resolver.

+
Source

pub fn get_default_resolver(&self) -> Address

Get the default resolver.

+
Source

pub fn whitelist(&mut self, address: Address)

Source

pub fn revoke_whitelist(&mut self, address: Address)

Source

pub fn name(&self) -> String

Delegated. See self.token.name() for details.

+
Source

pub fn symbol(&self) -> String

Delegated. See self.token.symbol() for details.

+
Source

pub fn balance_of(&self, owner: Address) -> U256

Delegated. See self.token.balance_of() for details.

+
Source

pub fn owner_of(&self, token_id: U256) -> Option<Address>

Delegated. See self.token.owner_of() for details.

+
Source

pub fn safe_transfer_from( + &mut self, + from: Address, + to: Address, + token_id: U256, + data: Option<Bytes>, +)

Delegated. See self.token.safe_transfer_from() for details.

+
Source

pub fn approve(&mut self, spender: Address, token_id: U256)

Delegated. See self.token.approve() for details.

+
Source

pub fn revoke_approval(&mut self, token_id: U256)

Delegated. See self.token.revoke_approval() for details.

+
Source

pub fn approved_for(&self, token_id: U256) -> Option<Address>

Delegated. See self.token.approved_for() for details.

+
Source

pub fn approve_for_all(&mut self, operator: Address)

Delegated. See self.token.approve_for_all() for details.

+
Source

pub fn revoke_approval_for_all(&mut self, operator: Address)

Delegated. See self.token.revoke_approval_for_all() for details.

+
Source

pub fn is_approved_for_all(&self, owner: Address, operator: Address) -> bool

Delegated. See self.token.is_approved_for_all() for details.

+
Source

pub fn token_metadata(&self, token_id: U256) -> Vec<(String, String)>

Delegated. See self.token.token_metadata() for details.

+
Source

pub fn get_owner(&self) -> Address

Delegated. See self.ownable.get_owner() for details.

+
Source

pub fn get_pending_owner(&self) -> Option<Address>

Delegated. See self.ownable.get_pending_owner() for details.

+
Source

pub fn transfer_ownership(&mut self, new_owner: &Address)

Delegated. See self.ownable.transfer_ownership() for details.

+
Source

pub fn accept_ownership(&mut self)

Delegated. See self.ownable.accept_ownership() for details.

+
Source

pub fn renounce_ownership(&mut self)

Delegated. See self.ownable.renounce_ownership() for details.

+
Source§

impl NameToken

Source

pub fn wrapped_metadata(&self, token_id: U256) -> NameTokenMetadata

Trait Implementations§

Source§

impl HasEntrypoints for NameToken

Source§

fn entrypoints() -> Vec<Entrypoint>

Returns the list of contract’s entrypoints.
Source§

impl HasEvents for NameToken

Source§

fn events() -> Vec<Event>

Returns a list of Events used by the contract.
Source§

fn event_schemas() -> BTreeMap<String, Schema>

Returns a map of event schemas used by the contract.
Source§

impl HasIdent for NameToken

Source§

fn ident() -> String

Returns the contract’s ident.
Source§

impl Module for NameToken

Source§

fn new(env: Rc<ContractEnv>) -> Self

Creates a new instance of the module with the given contract environment.
Source§

fn env(&self) -> Rc<ContractEnv>

Returns the contract environment associated with the module.
Source§

impl OdraContract for NameToken

Source§

type HostRef = NameTokenHostRef

The host reference type.
Source§

type ContractRef = NameTokenContractRef

The contract reference type.
Source§

type InitArgs = NameTokenInitArgs

The init args type.
Source§

impl SchemaCustomTypes for NameToken

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl SchemaEntrypoints for NameToken

Source§

fn schema_entrypoints() -> Vec<Entrypoint>

Returns a vector of [Entrypoint]s.
Source§

impl SchemaErrors for NameToken

Source§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
Source§

impl SchemaEvents for NameToken

Source§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
Source§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<R> Deployer<R> for R
where + R: OdraContract,

§

fn deploy( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, +) -> <R as OdraContract>::HostRef

Deploys a contract with given init args. Read more
§

fn try_deploy( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, +) -> Result<<R as OdraContract>::HostRef, OdraError>

Tries to deploy a contract with given init args. Read more
§

fn deploy_with_cfg<T>( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, + cfg: T, +) -> <R as OdraContract>::HostRef
where + T: OdraConfig,

Deploys a contract with given init args and configuration. Read more
§

fn try_deploy_with_cfg<T>( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, + cfg: T, +) -> Result<<R as OdraContract>::HostRef, OdraError>
where + T: OdraConfig,

Tries to deploy a contract with given init args and configuration. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> HostRefLoader<<T as OdraContract>::HostRef> for T
where + T: OdraContract,

§

fn load(env: &HostEnv, address: Address) -> <T as OdraContract>::HostRef

Loads an existing contract from the host environment.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
§

impl<T> Revertible for T
where + T: Module,

§

fn revert<E>(&self, error: E) -> !
where + E: Into<OdraError>,

Reverts the contract execution with the given error.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToTokenId for T
where + T: Module,

Source§

fn token_id(&self, label: String) -> U256

Converts the label to a token ID.
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/name_token/struct.NameTokenContractRef.html b/docs/casper_name_contracts/contracts/name_token/struct.NameTokenContractRef.html new file mode 100644 index 0000000..573341c --- /dev/null +++ b/docs/casper_name_contracts/contracts/name_token/struct.NameTokenContractRef.html @@ -0,0 +1,60 @@ +NameTokenContractRef in casper_name_contracts::contracts::name_token - Rust

Struct NameTokenContractRef

Source
pub struct NameTokenContractRef { /* private fields */ }
Expand description

NameToken Contract Ref.

+

Implementations§

Source§

impl NameTokenContractRef

Source

pub fn init(&mut self, name: String, symbol: String, max_supply: u64)

Initializes CEP95 with the given name and symbol.

+
Source

pub fn token_exists(&self, token_id: U256) -> bool

Source

pub fn mint( + &mut self, + recipient: Address, + token_id: U256, + token_metadata: Vec<(String, String)>, +)

Source

pub fn burn(&mut self, token_id: U256)

Source

pub fn admin_transfer(&mut self, recipient: Address, token_ids: Vec<U256>)

Source

pub fn transfer_from(&mut self, from: Address, to: Address, token_id: U256)

Source

pub fn set_token_metadata( + &mut self, + token_id: U256, + token_metadata: Vec<(String, String)>, +)

Source

pub fn resolver(&self, token_id: U256) -> Option<Address>

Source

pub fn set_resolver(&mut self, token_id: U256, resolver: Address)

Source

pub fn assert_is_owner(&self, token_id: U256, address: Address)

Source

pub fn is_token_valid(&self, token_id: U256) -> bool

Source

pub fn set_default_resolver(&mut self, resolver: Address)

Only admin. Set the default resolver.

+
Source

pub fn get_default_resolver(&self) -> Address

Get the default resolver.

+
Source

pub fn whitelist(&mut self, address: Address)

Source

pub fn revoke_whitelist(&mut self, address: Address)

Source

pub fn name(&self) -> String

Delegated. See self.token.name() for details.

+
Source

pub fn symbol(&self) -> String

Delegated. See self.token.symbol() for details.

+
Source

pub fn balance_of(&self, owner: Address) -> U256

Delegated. See self.token.balance_of() for details.

+
Source

pub fn owner_of(&self, token_id: U256) -> Option<Address>

Delegated. See self.token.owner_of() for details.

+
Source

pub fn safe_transfer_from( + &mut self, + from: Address, + to: Address, + token_id: U256, + data: Option<Bytes>, +)

Delegated. See self.token.safe_transfer_from() for details.

+
Source

pub fn approve(&mut self, spender: Address, token_id: U256)

Delegated. See self.token.approve() for details.

+
Source

pub fn revoke_approval(&mut self, token_id: U256)

Delegated. See self.token.revoke_approval() for details.

+
Source

pub fn approved_for(&self, token_id: U256) -> Option<Address>

Delegated. See self.token.approved_for() for details.

+
Source

pub fn approve_for_all(&mut self, operator: Address)

Delegated. See self.token.approve_for_all() for details.

+
Source

pub fn revoke_approval_for_all(&mut self, operator: Address)

Delegated. See self.token.revoke_approval_for_all() for details.

+
Source

pub fn is_approved_for_all(&self, owner: Address, operator: Address) -> bool

Delegated. See self.token.is_approved_for_all() for details.

+
Source

pub fn token_metadata(&self, token_id: U256) -> Vec<(String, String)>

Delegated. See self.token.token_metadata() for details.

+
Source

pub fn get_owner(&self) -> Address

Delegated. See self.ownable.get_owner() for details.

+
Source

pub fn get_pending_owner(&self) -> Option<Address>

Delegated. See self.ownable.get_pending_owner() for details.

+
Source

pub fn transfer_ownership(&mut self, new_owner: &Address)

Delegated. See self.ownable.transfer_ownership() for details.

+
Source

pub fn accept_ownership(&mut self)

Delegated. See self.ownable.accept_ownership() for details.

+
Source

pub fn renounce_ownership(&mut self)

Delegated. See self.ownable.renounce_ownership() for details.

+

Trait Implementations§

Source§

impl ContractRef for NameTokenContractRef

Source§

fn new(env: Rc<ContractEnv>, address: Address) -> Self

Creates a new instance of the Contract Ref.
Source§

fn address(&self) -> &Address

Returns the address of the contract.
Source§

fn with_tokens(&self, tokens: U512) -> Self

Creates a new contract reference with attached tokens, based on the current instance. Read more
Source§

impl SchemaErrors for NameTokenContractRef

§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
Source§

impl SchemaEvents for NameTokenContractRef

§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/name_token/struct.NameTokenHostRef.html b/docs/casper_name_contracts/contracts/name_token/struct.NameTokenHostRef.html new file mode 100644 index 0000000..db2c769 --- /dev/null +++ b/docs/casper_name_contracts/contracts/name_token/struct.NameTokenHostRef.html @@ -0,0 +1,165 @@ +NameTokenHostRef in casper_name_contracts::contracts::name_token - Rust

Struct NameTokenHostRef

Source
pub struct NameTokenHostRef { /* private fields */ }
Expand description

NameToken Host Ref.

+

Implementations§

Source§

impl NameTokenHostRef

Source

pub fn init(&mut self, name: String, symbol: String, max_supply: u64)

Initializes CEP95 with the given name and symbol.

+
Source

pub fn token_exists(&self, token_id: U256) -> bool

Source

pub fn mint( + &mut self, + recipient: Address, + token_id: U256, + token_metadata: Vec<(String, String)>, +)

Source

pub fn burn(&mut self, token_id: U256)

Source

pub fn admin_transfer(&mut self, recipient: Address, token_ids: Vec<U256>)

Source

pub fn transfer_from(&mut self, from: Address, to: Address, token_id: U256)

Source

pub fn set_token_metadata( + &mut self, + token_id: U256, + token_metadata: Vec<(String, String)>, +)

Source

pub fn resolver(&self, token_id: U256) -> Option<Address>

Source

pub fn set_resolver(&mut self, token_id: U256, resolver: Address)

Source

pub fn assert_is_owner(&self, token_id: U256, address: Address)

Source

pub fn is_token_valid(&self, token_id: U256) -> bool

Source

pub fn set_default_resolver(&mut self, resolver: Address)

Only admin. Set the default resolver.

+
Source

pub fn get_default_resolver(&self) -> Address

Get the default resolver.

+
Source

pub fn whitelist(&mut self, address: Address)

Source

pub fn revoke_whitelist(&mut self, address: Address)

Source

pub fn name(&self) -> String

Delegated. See self.token.name() for details.

+
Source

pub fn symbol(&self) -> String

Delegated. See self.token.symbol() for details.

+
Source

pub fn balance_of(&self, owner: Address) -> U256

Delegated. See self.token.balance_of() for details.

+
Source

pub fn owner_of(&self, token_id: U256) -> Option<Address>

Delegated. See self.token.owner_of() for details.

+
Source

pub fn safe_transfer_from( + &mut self, + from: Address, + to: Address, + token_id: U256, + data: Option<Bytes>, +)

Delegated. See self.token.safe_transfer_from() for details.

+
Source

pub fn approve(&mut self, spender: Address, token_id: U256)

Delegated. See self.token.approve() for details.

+
Source

pub fn revoke_approval(&mut self, token_id: U256)

Delegated. See self.token.revoke_approval() for details.

+
Source

pub fn approved_for(&self, token_id: U256) -> Option<Address>

Delegated. See self.token.approved_for() for details.

+
Source

pub fn approve_for_all(&mut self, operator: Address)

Delegated. See self.token.approve_for_all() for details.

+
Source

pub fn revoke_approval_for_all(&mut self, operator: Address)

Delegated. See self.token.revoke_approval_for_all() for details.

+
Source

pub fn is_approved_for_all(&self, owner: Address, operator: Address) -> bool

Delegated. See self.token.is_approved_for_all() for details.

+
Source

pub fn token_metadata(&self, token_id: U256) -> Vec<(String, String)>

Delegated. See self.token.token_metadata() for details.

+
Source

pub fn get_owner(&self) -> Address

Delegated. See self.ownable.get_owner() for details.

+
Source

pub fn get_pending_owner(&self) -> Option<Address>

Delegated. See self.ownable.get_pending_owner() for details.

+
Source

pub fn transfer_ownership(&mut self, new_owner: &Address)

Delegated. See self.ownable.transfer_ownership() for details.

+
Source

pub fn accept_ownership(&mut self)

Delegated. See self.ownable.accept_ownership() for details.

+
Source

pub fn renounce_ownership(&mut self)

Delegated. See self.ownable.renounce_ownership() for details.

+
Source§

impl NameTokenHostRef

Source

pub fn try_init( + &mut self, + name: String, + symbol: String, + max_supply: u64, +) -> OdraResult<()>

Initializes CEP95 with the given name and symbol. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_token_exists(&self, token_id: U256) -> OdraResult<bool>

Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_mint( + &mut self, + recipient: Address, + token_id: U256, + token_metadata: Vec<(String, String)>, +) -> OdraResult<()>

Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_burn(&mut self, token_id: U256) -> OdraResult<()>

Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_admin_transfer( + &mut self, + recipient: Address, + token_ids: Vec<U256>, +) -> OdraResult<()>

Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_transfer_from( + &mut self, + from: Address, + to: Address, + token_id: U256, +) -> OdraResult<()>

Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_set_token_metadata( + &mut self, + token_id: U256, + token_metadata: Vec<(String, String)>, +) -> OdraResult<()>

Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_resolver(&self, token_id: U256) -> OdraResult<Option<Address>>

Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_set_resolver( + &mut self, + token_id: U256, + resolver: Address, +) -> OdraResult<()>

Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_assert_is_owner( + &self, + token_id: U256, + address: Address, +) -> OdraResult<()>

Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_is_token_valid(&self, token_id: U256) -> OdraResult<bool>

Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_set_default_resolver(&mut self, resolver: Address) -> OdraResult<()>

Only admin. Set the default resolver. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_get_default_resolver(&self) -> OdraResult<Address>

Get the default resolver. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_whitelist(&mut self, address: Address) -> OdraResult<()>

Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_revoke_whitelist(&mut self, address: Address) -> OdraResult<()>

Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_name(&self) -> OdraResult<String>

Delegated. See self.token.name() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_symbol(&self) -> OdraResult<String>

Delegated. See self.token.symbol() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_balance_of(&self, owner: Address) -> OdraResult<U256>

Delegated. See self.token.balance_of() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_owner_of(&self, token_id: U256) -> OdraResult<Option<Address>>

Delegated. See self.token.owner_of() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_safe_transfer_from( + &mut self, + from: Address, + to: Address, + token_id: U256, + data: Option<Bytes>, +) -> OdraResult<()>

Delegated. See self.token.safe_transfer_from() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_approve( + &mut self, + spender: Address, + token_id: U256, +) -> OdraResult<()>

Delegated. See self.token.approve() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_revoke_approval(&mut self, token_id: U256) -> OdraResult<()>

Delegated. See self.token.revoke_approval() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_approved_for(&self, token_id: U256) -> OdraResult<Option<Address>>

Delegated. See self.token.approved_for() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_approve_for_all(&mut self, operator: Address) -> OdraResult<()>

Delegated. See self.token.approve_for_all() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_revoke_approval_for_all( + &mut self, + operator: Address, +) -> OdraResult<()>

Delegated. See self.token.revoke_approval_for_all() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_is_approved_for_all( + &self, + owner: Address, + operator: Address, +) -> OdraResult<bool>

Delegated. See self.token.is_approved_for_all() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_token_metadata( + &self, + token_id: U256, +) -> OdraResult<Vec<(String, String)>>

Delegated. See self.token.token_metadata() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_get_owner(&self) -> OdraResult<Address>

Delegated. See self.ownable.get_owner() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_get_pending_owner(&self) -> OdraResult<Option<Address>>

Delegated. See self.ownable.get_pending_owner() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_transfer_ownership(&mut self, new_owner: &Address) -> OdraResult<()>

Delegated. See self.ownable.transfer_ownership() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_accept_ownership(&mut self) -> OdraResult<()>

Delegated. See self.ownable.accept_ownership() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_renounce_ownership(&mut self) -> OdraResult<()>

Delegated. See self.ownable.renounce_ownership() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+

Trait Implementations§

Source§

impl EntryPointsCallerProvider for NameTokenHostRef

Source§

fn entry_points_caller(env: &HostEnv) -> EntryPointsCaller

Returns an [EntryPointsCaller] for the given host environment.
Source§

impl HasIdent for NameTokenHostRef

Source§

fn ident() -> String

Returns the contract’s ident.
Source§

impl HostRef for NameTokenHostRef

Source§

fn new(address: Address, env: HostEnv) -> Self

Creates a new host side reference to a contract.
Source§

fn with_tokens(&self, tokens: U512) -> Self

Creates a new host reference with attached tokens, based on the current instance. Read more
Source§

fn contract_address(&self) -> Address

Returns the address of the contract.
Source§

fn env(&self) -> &HostEnv

Returns the host environment.
Source§

fn get_event<T>(&self, index: i32) -> Result<T, EventError>
where + T: FromBytes + EventInstance,

Returns the n-th event emitted by the contract. Read more
Source§

fn last_call(&self) -> ContractCallResult

Returns a detailed information about the last call of the contract.

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Addressable for T
where + T: HostRef,

§

fn address(&self) -> Address

Returns a reference to the [Address] of the type.
Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/name_token/struct.NameTokenInitArgs.html b/docs/casper_name_contracts/contracts/name_token/struct.NameTokenInitArgs.html new file mode 100644 index 0000000..fbd98f4 --- /dev/null +++ b/docs/casper_name_contracts/contracts/name_token/struct.NameTokenInitArgs.html @@ -0,0 +1,29 @@ +NameTokenInitArgs in casper_name_contracts::contracts::name_token - Rust

Struct NameTokenInitArgs

Source
pub struct NameTokenInitArgs {
+    pub name: String,
+    pub symbol: String,
+    pub max_supply: u64,
+}
Expand description

NameToken contract constructor arguments.

+

Fields§

§name: String§symbol: String§max_supply: u64

Trait Implementations§

Source§

impl Into<RuntimeArgs> for NameTokenInitArgs

Source§

fn into(self) -> RuntimeArgs

Converts this type into the (usually inferred) input type.
Source§

impl InitArgs for NameTokenInitArgs

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/registrar/__registrar_test_parts/struct.RegistrarHostRef.html b/docs/casper_name_contracts/contracts/registrar/__registrar_test_parts/struct.RegistrarHostRef.html new file mode 100644 index 0000000..c680392 --- /dev/null +++ b/docs/casper_name_contracts/contracts/registrar/__registrar_test_parts/struct.RegistrarHostRef.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../../casper_name_contracts/contracts/registrar/struct.RegistrarHostRef.html...

+ + + \ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/registrar/__registrar_test_parts/struct.RegistrarInitArgs.html b/docs/casper_name_contracts/contracts/registrar/__registrar_test_parts/struct.RegistrarInitArgs.html new file mode 100644 index 0000000..f75d0ca --- /dev/null +++ b/docs/casper_name_contracts/contracts/registrar/__registrar_test_parts/struct.RegistrarInitArgs.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../../casper_name_contracts/contracts/registrar/struct.RegistrarInitArgs.html...

+ + + \ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/registrar/constant.CONTROLLER_ROLE.html b/docs/casper_name_contracts/contracts/registrar/constant.CONTROLLER_ROLE.html new file mode 100644 index 0000000..994309a --- /dev/null +++ b/docs/casper_name_contracts/contracts/registrar/constant.CONTROLLER_ROLE.html @@ -0,0 +1 @@ +CONTROLLER_ROLE in casper_name_contracts::contracts::registrar - Rust

Constant CONTROLLER_ROLE

Source
pub const CONTROLLER_ROLE: Role;
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/registrar/enum.RegistrarError.html b/docs/casper_name_contracts/contracts/registrar/enum.RegistrarError.html new file mode 100644 index 0000000..79f2597 --- /dev/null +++ b/docs/casper_name_contracts/contracts/registrar/enum.RegistrarError.html @@ -0,0 +1,33 @@ +RegistrarError in casper_name_contracts::contracts::registrar - Rust

Enum RegistrarError

Source
pub enum RegistrarError {
+    ExpirationDateInThePast = 1_201,
+    TokenNotExpired = 1_202,
+    GracePeriodExpired = 1_203,
+    VoucherExpired = 1_204,
+    TokenDoesNotExist = 1_205,
+    GracePeriodTooLong = 1_206,
+    NameTokenIsNotValid = 1_207,
+    TokenNameIsNotValid = 1_208,
+}

Variants§

§

ExpirationDateInThePast = 1_201

§

TokenNotExpired = 1_202

§

GracePeriodExpired = 1_203

§

VoucherExpired = 1_204

§

TokenDoesNotExist = 1_205

§

GracePeriodTooLong = 1_206

§

NameTokenIsNotValid = 1_207

§

TokenNameIsNotValid = 1_208

Trait Implementations§

Source§

impl From<RegistrarError> for OdraError

Source§

fn from(error: RegistrarError) -> Self

Converts to this type from the input type.
Source§

impl SchemaErrors for RegistrarError

Source§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/registrar/index.html b/docs/casper_name_contracts/contracts/registrar/index.html new file mode 100644 index 0000000..f0e6223 --- /dev/null +++ b/docs/casper_name_contracts/contracts/registrar/index.html @@ -0,0 +1 @@ +casper_name_contracts::contracts::registrar - Rust

Module registrar

Source

Structs§

GracePeriodChanged
Event emitted when the grace period is changed.
Registrar
Registrar smart contract. It handles the registration and expiration of name tokens.
RegistrarContractRef
Registrar Contract Ref.
RegistrarHostRef
Registrar Host Ref.
RegistrarInitArgs
Registrar contract constructor arguments.

Enums§

RegistrarError

Constants§

CONTROLLER_ROLE
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/registrar/sidebar-items.js b/docs/casper_name_contracts/contracts/registrar/sidebar-items.js new file mode 100644 index 0000000..5045847 --- /dev/null +++ b/docs/casper_name_contracts/contracts/registrar/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["CONTROLLER_ROLE"],"enum":["RegistrarError"],"struct":["GracePeriodChanged","Registrar","RegistrarContractRef","RegistrarHostRef","RegistrarInitArgs"]}; \ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/registrar/struct.GracePeriodChanged.html b/docs/casper_name_contracts/contracts/registrar/struct.GracePeriodChanged.html new file mode 100644 index 0000000..3ccf385 --- /dev/null +++ b/docs/casper_name_contracts/contracts/registrar/struct.GracePeriodChanged.html @@ -0,0 +1,32 @@ +GracePeriodChanged in casper_name_contracts::contracts::registrar - Rust

Struct GracePeriodChanged

Source
pub struct GracePeriodChanged { /* private fields */ }
Expand description

Event emitted when the grace period is changed.

+

Implementations§

Source§

impl GracePeriodChanged

Source

pub fn new(new_grace_period: u64) -> Self

Creates a new instance of the GracePeriodChanged event.

+

Trait Implementations§

Source§

impl CLTyped for GracePeriodChanged

Source§

fn cl_type() -> CLType

The CLType of Self.
Source§

impl Debug for GracePeriodChanged

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl EventInstance for GracePeriodChanged

Source§

fn name() -> String

Returns the name of the event.
Source§

fn schema() -> Schema

Returns the Schema of the event.
Source§

impl FromBytes for GracePeriodChanged

Source§

fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>

Deserializes the slice into Self.
Source§

fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>

Deserializes the Vec<u8> into Self.
Source§

impl NamedCLTyped for GracePeriodChanged

Source§

fn ty() -> NamedCLType

Returns the NamedCLType of the implementing type.
Source§

impl PartialEq for GracePeriodChanged

Source§

fn eq(&self, other: &GracePeriodChanged) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl SchemaCustomTypes for GracePeriodChanged

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl ToBytes for GracePeriodChanged

Source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Serializes &self to a Vec<u8>.
Source§

fn serialized_length(&self) -> usize

Returns the length of the Vec<u8> which would be returned from a successful call to +to_bytes() or into_bytes(). The data is not actually serialized, so this call is +relatively cheap.
Source§

fn into_bytes(self) -> Result<Vec<u8>, Error>
where + Self: Sized,

Consumes self and serializes to a Vec<u8>.
Source§

fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Writes &self into a mutable writer.
Source§

impl Eq for GracePeriodChanged

Source§

impl StructuralPartialEq for GracePeriodChanged

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> EntrypointArgument for T
where + T: CLTyped + ToBytes,

§

fn is_required() -> bool

Returns true if the argument is required.
§

fn cl_type() -> CLType

Returns the CLType of the argument.
§

fn insert_runtime_arg(self, name: &str, args: &mut RuntimeArgs)

Inserts the argument into the runtime args.
§

fn unwrap(value: Option<T>, env: &ContractEnv) -> T

Unwraps the argument from an Option.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
§

impl<T> IntoEvent for T
where + T: EventInstance,

§

fn into_event() -> Event

Converts the type into an [Event].
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/registrar/struct.Registrar.html b/docs/casper_name_contracts/contracts/registrar/struct.Registrar.html new file mode 100644 index 0000000..9a392fe --- /dev/null +++ b/docs/casper_name_contracts/contracts/registrar/struct.Registrar.html @@ -0,0 +1,73 @@ +Registrar in casper_name_contracts::contracts::registrar - Rust

Struct Registrar

Source
pub struct Registrar { /* private fields */ }
Expand description

Registrar smart contract. It handles the registration and expiration of name tokens.

+

Implementations§

Source§

impl Registrar

Source

pub fn init(&mut self, name_token: Address)

Initializes the registrar with the name token contract address.

+
Source

pub fn pause(&mut self)

Temporarily stops the contract.

+
Source

pub fn unpause(&mut self)

Returns to normal operation.

+
Source

pub fn grace_period(&self) -> u64

Returns the grace period.

+
Source

pub fn resolve(&self, full_domain: String) -> Option<Address>

Try to resolve a full domain name to an address.

+
Source

pub fn expire(&mut self, token_ids: Vec<U256>)

Expire a list of tokens if they are expired.

+
Source

pub fn set_grace_period(&mut self, period: u64)

Admin only. Sets the grace period.

+
Source

pub fn admin_transfer(&mut self, new_owner: Address, token_ids: Vec<U256>)

Admin only. Transfer ownership of a list of tokens.

+
Source

pub fn admin_burn(&mut self, token_ids: Vec<U256>)

Admin only. Burn a list of tokens.

+
Source

pub fn admin_prolong(&mut self, tokens: Vec<TokenRenewalInfo>)

Admin only. Prolong the expiration date of a list of tokens.

+
Source

pub fn admin_register(&mut self, names: Vec<NameMintInfo>)

Admin only. Register a list of tokens.

+
Source

pub fn admin_prolong_and_register( + &mut self, + renewal_tokens: Vec<TokenRenewalInfo>, + new_tokens: Vec<NameMintInfo>, +)

Admin only. Prolong the expiration date of a list of tokens and register a list of tokens.

+
Source

pub fn controller_prolong(&mut self, voucher: RenewalVoucher)

Controller only. Prolong the expiration date of a list of tokens.

+
Source

pub fn controller_register(&mut self, voucher: TokenizationVoucher)

Controller only. Register a list of tokens.

+
Source

pub fn controller_prolong_and_register( + &mut self, + renewal_voucher: RenewalVoucher, + tokenization_voucher: TokenizationVoucher, +)

Controller only. Prolong the expiration date of a list of tokens and register a list of tokens.

+
Source

pub fn has_role(&self, role: &Role, address: &Address) -> bool

Delegated. See self.access_control.has_role() for details.

+
Source

pub fn grant_role(&mut self, role: &Role, address: &Address)

Delegated. See self.access_control.grant_role() for details.

+
Source

pub fn revoke_role(&mut self, role: &Role, address: &Address)

Delegated. See self.access_control.revoke_role() for details.

+
Source

pub fn is_paused(&self) -> bool

Delegated. See self.pauseable.is_paused() for details.

+

Trait Implementations§

Source§

impl HasEntrypoints for Registrar

Source§

fn entrypoints() -> Vec<Entrypoint>

Returns the list of contract’s entrypoints.
Source§

impl HasEvents for Registrar

Source§

fn events() -> Vec<Event>

Returns a list of Events used by the contract.
Source§

fn event_schemas() -> BTreeMap<String, Schema>

Returns a map of event schemas used by the contract.
Source§

impl HasIdent for Registrar

Source§

fn ident() -> String

Returns the contract’s ident.
Source§

impl Module for Registrar

Source§

fn new(env: Rc<ContractEnv>) -> Self

Creates a new instance of the module with the given contract environment.
Source§

fn env(&self) -> Rc<ContractEnv>

Returns the contract environment associated with the module.
Source§

impl OdraContract for Registrar

Source§

type HostRef = RegistrarHostRef

The host reference type.
Source§

type ContractRef = RegistrarContractRef

The contract reference type.
Source§

type InitArgs = RegistrarInitArgs

The init args type.
Source§

impl SchemaCustomTypes for Registrar

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl SchemaEntrypoints for Registrar

Source§

fn schema_entrypoints() -> Vec<Entrypoint>

Returns a vector of [Entrypoint]s.
Source§

impl SchemaErrors for Registrar

Source§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
Source§

impl SchemaEvents for Registrar

Source§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
Source§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<R> Deployer<R> for R
where + R: OdraContract,

§

fn deploy( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, +) -> <R as OdraContract>::HostRef

Deploys a contract with given init args. Read more
§

fn try_deploy( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, +) -> Result<<R as OdraContract>::HostRef, OdraError>

Tries to deploy a contract with given init args. Read more
§

fn deploy_with_cfg<T>( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, + cfg: T, +) -> <R as OdraContract>::HostRef
where + T: OdraConfig,

Deploys a contract with given init args and configuration. Read more
§

fn try_deploy_with_cfg<T>( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, + cfg: T, +) -> Result<<R as OdraContract>::HostRef, OdraError>
where + T: OdraConfig,

Tries to deploy a contract with given init args and configuration. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> HostRefLoader<<T as OdraContract>::HostRef> for T
where + T: OdraContract,

§

fn load(env: &HostEnv, address: Address) -> <T as OdraContract>::HostRef

Loads an existing contract from the host environment.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
§

impl<T> Revertible for T
where + T: Module,

§

fn revert<E>(&self, error: E) -> !
where + E: Into<OdraError>,

Reverts the contract execution with the given error.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToTokenId for T
where + T: Module,

Source§

fn token_id(&self, label: String) -> U256

Converts the label to a token ID.
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/registrar/struct.RegistrarContractRef.html b/docs/casper_name_contracts/contracts/registrar/struct.RegistrarContractRef.html new file mode 100644 index 0000000..1d41ff9 --- /dev/null +++ b/docs/casper_name_contracts/contracts/registrar/struct.RegistrarContractRef.html @@ -0,0 +1,52 @@ +RegistrarContractRef in casper_name_contracts::contracts::registrar - Rust

Struct RegistrarContractRef

Source
pub struct RegistrarContractRef { /* private fields */ }
Expand description

Registrar Contract Ref.

+

Implementations§

Source§

impl RegistrarContractRef

Source

pub fn init(&mut self, name_token: Address)

Initializes the registrar with the name token contract address.

+
Source

pub fn pause(&mut self)

Temporarily stops the contract.

+
Source

pub fn unpause(&mut self)

Returns to normal operation.

+
Source

pub fn grace_period(&self) -> u64

Returns the grace period.

+
Source

pub fn resolve(&self, full_domain: String) -> Option<Address>

Try to resolve a full domain name to an address.

+
Source

pub fn expire(&mut self, token_ids: Vec<U256>)

Expire a list of tokens if they are expired.

+
Source

pub fn set_grace_period(&mut self, period: u64)

Admin only. Sets the grace period.

+
Source

pub fn admin_transfer(&mut self, new_owner: Address, token_ids: Vec<U256>)

Admin only. Transfer ownership of a list of tokens.

+
Source

pub fn admin_burn(&mut self, token_ids: Vec<U256>)

Admin only. Burn a list of tokens.

+
Source

pub fn admin_prolong(&mut self, tokens: Vec<TokenRenewalInfo>)

Admin only. Prolong the expiration date of a list of tokens.

+
Source

pub fn admin_register(&mut self, names: Vec<NameMintInfo>)

Admin only. Register a list of tokens.

+
Source

pub fn admin_prolong_and_register( + &mut self, + renewal_tokens: Vec<TokenRenewalInfo>, + new_tokens: Vec<NameMintInfo>, +)

Admin only. Prolong the expiration date of a list of tokens and register a list of tokens.

+
Source

pub fn controller_prolong(&mut self, voucher: RenewalVoucher)

Controller only. Prolong the expiration date of a list of tokens.

+
Source

pub fn controller_register(&mut self, voucher: TokenizationVoucher)

Controller only. Register a list of tokens.

+
Source

pub fn controller_prolong_and_register( + &mut self, + renewal_voucher: RenewalVoucher, + tokenization_voucher: TokenizationVoucher, +)

Controller only. Prolong the expiration date of a list of tokens and register a list of tokens.

+
Source

pub fn has_role(&self, role: &Role, address: &Address) -> bool

Delegated. See self.access_control.has_role() for details.

+
Source

pub fn grant_role(&mut self, role: &Role, address: &Address)

Delegated. See self.access_control.grant_role() for details.

+
Source

pub fn revoke_role(&mut self, role: &Role, address: &Address)

Delegated. See self.access_control.revoke_role() for details.

+
Source

pub fn is_paused(&self) -> bool

Delegated. See self.pauseable.is_paused() for details.

+

Trait Implementations§

Source§

impl ContractRef for RegistrarContractRef

Source§

fn new(env: Rc<ContractEnv>, address: Address) -> Self

Creates a new instance of the Contract Ref.
Source§

fn address(&self) -> &Address

Returns the address of the contract.
Source§

fn with_tokens(&self, tokens: U512) -> Self

Creates a new contract reference with attached tokens, based on the current instance. Read more
Source§

impl SchemaErrors for RegistrarContractRef

§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
Source§

impl SchemaEvents for RegistrarContractRef

§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/registrar/struct.RegistrarHostRef.html b/docs/casper_name_contracts/contracts/registrar/struct.RegistrarHostRef.html new file mode 100644 index 0000000..1c1cd2e --- /dev/null +++ b/docs/casper_name_contracts/contracts/registrar/struct.RegistrarHostRef.html @@ -0,0 +1,121 @@ +RegistrarHostRef in casper_name_contracts::contracts::registrar - Rust

Struct RegistrarHostRef

Source
pub struct RegistrarHostRef { /* private fields */ }
Expand description

Registrar Host Ref.

+

Implementations§

Source§

impl RegistrarHostRef

Source

pub fn init(&mut self, name_token: Address)

Initializes the registrar with the name token contract address.

+
Source

pub fn pause(&mut self)

Temporarily stops the contract.

+
Source

pub fn unpause(&mut self)

Returns to normal operation.

+
Source

pub fn grace_period(&self) -> u64

Returns the grace period.

+
Source

pub fn resolve(&self, full_domain: String) -> Option<Address>

Try to resolve a full domain name to an address.

+
Source

pub fn expire(&mut self, token_ids: Vec<U256>)

Expire a list of tokens if they are expired.

+
Source

pub fn set_grace_period(&mut self, period: u64)

Admin only. Sets the grace period.

+
Source

pub fn admin_transfer(&mut self, new_owner: Address, token_ids: Vec<U256>)

Admin only. Transfer ownership of a list of tokens.

+
Source

pub fn admin_burn(&mut self, token_ids: Vec<U256>)

Admin only. Burn a list of tokens.

+
Source

pub fn admin_prolong(&mut self, tokens: Vec<TokenRenewalInfo>)

Admin only. Prolong the expiration date of a list of tokens.

+
Source

pub fn admin_register(&mut self, names: Vec<NameMintInfo>)

Admin only. Register a list of tokens.

+
Source

pub fn admin_prolong_and_register( + &mut self, + renewal_tokens: Vec<TokenRenewalInfo>, + new_tokens: Vec<NameMintInfo>, +)

Admin only. Prolong the expiration date of a list of tokens and register a list of tokens.

+
Source

pub fn controller_prolong(&mut self, voucher: RenewalVoucher)

Controller only. Prolong the expiration date of a list of tokens.

+
Source

pub fn controller_register(&mut self, voucher: TokenizationVoucher)

Controller only. Register a list of tokens.

+
Source

pub fn controller_prolong_and_register( + &mut self, + renewal_voucher: RenewalVoucher, + tokenization_voucher: TokenizationVoucher, +)

Controller only. Prolong the expiration date of a list of tokens and register a list of tokens.

+
Source

pub fn has_role(&self, role: &Role, address: &Address) -> bool

Delegated. See self.access_control.has_role() for details.

+
Source

pub fn grant_role(&mut self, role: &Role, address: &Address)

Delegated. See self.access_control.grant_role() for details.

+
Source

pub fn revoke_role(&mut self, role: &Role, address: &Address)

Delegated. See self.access_control.revoke_role() for details.

+
Source

pub fn is_paused(&self) -> bool

Delegated. See self.pauseable.is_paused() for details.

+
Source§

impl RegistrarHostRef

Source

pub fn try_init(&mut self, name_token: Address) -> OdraResult<()>

Initializes the registrar with the name token contract address. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_pause(&mut self) -> OdraResult<()>

Temporarily stops the contract. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_unpause(&mut self) -> OdraResult<()>

Returns to normal operation. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_grace_period(&self) -> OdraResult<u64>

Returns the grace period. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_resolve(&self, full_domain: String) -> OdraResult<Option<Address>>

Try to resolve a full domain name to an address. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_expire(&mut self, token_ids: Vec<U256>) -> OdraResult<()>

Expire a list of tokens if they are expired. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_set_grace_period(&mut self, period: u64) -> OdraResult<()>

Admin only. Sets the grace period. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_admin_transfer( + &mut self, + new_owner: Address, + token_ids: Vec<U256>, +) -> OdraResult<()>

Admin only. Transfer ownership of a list of tokens. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_admin_burn(&mut self, token_ids: Vec<U256>) -> OdraResult<()>

Admin only. Burn a list of tokens. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_admin_prolong( + &mut self, + tokens: Vec<TokenRenewalInfo>, +) -> OdraResult<()>

Admin only. Prolong the expiration date of a list of tokens. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_admin_register(&mut self, names: Vec<NameMintInfo>) -> OdraResult<()>

Admin only. Register a list of tokens. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_admin_prolong_and_register( + &mut self, + renewal_tokens: Vec<TokenRenewalInfo>, + new_tokens: Vec<NameMintInfo>, +) -> OdraResult<()>

Admin only. Prolong the expiration date of a list of tokens and register a list of tokens. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_controller_prolong( + &mut self, + voucher: RenewalVoucher, +) -> OdraResult<()>

Controller only. Prolong the expiration date of a list of tokens. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_controller_register( + &mut self, + voucher: TokenizationVoucher, +) -> OdraResult<()>

Controller only. Register a list of tokens. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_controller_prolong_and_register( + &mut self, + renewal_voucher: RenewalVoucher, + tokenization_voucher: TokenizationVoucher, +) -> OdraResult<()>

Controller only. Prolong the expiration date of a list of tokens and register a list of tokens. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_has_role(&self, role: &Role, address: &Address) -> OdraResult<bool>

Delegated. See self.access_control.has_role() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_grant_role( + &mut self, + role: &Role, + address: &Address, +) -> OdraResult<()>

Delegated. See self.access_control.grant_role() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_revoke_role( + &mut self, + role: &Role, + address: &Address, +) -> OdraResult<()>

Delegated. See self.access_control.revoke_role() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_is_paused(&self) -> OdraResult<bool>

Delegated. See self.pauseable.is_paused() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+

Trait Implementations§

Source§

impl EntryPointsCallerProvider for RegistrarHostRef

Source§

fn entry_points_caller(env: &HostEnv) -> EntryPointsCaller

Returns an [EntryPointsCaller] for the given host environment.
Source§

impl HasIdent for RegistrarHostRef

Source§

fn ident() -> String

Returns the contract’s ident.
Source§

impl HostRef for RegistrarHostRef

Source§

fn new(address: Address, env: HostEnv) -> Self

Creates a new host side reference to a contract.
Source§

fn with_tokens(&self, tokens: U512) -> Self

Creates a new host reference with attached tokens, based on the current instance. Read more
Source§

fn contract_address(&self) -> Address

Returns the address of the contract.
Source§

fn env(&self) -> &HostEnv

Returns the host environment.
Source§

fn get_event<T>(&self, index: i32) -> Result<T, EventError>
where + T: FromBytes + EventInstance,

Returns the n-th event emitted by the contract. Read more
Source§

fn last_call(&self) -> ContractCallResult

Returns a detailed information about the last call of the contract.

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Addressable for T
where + T: HostRef,

§

fn address(&self) -> Address

Returns a reference to the [Address] of the type.
Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/registrar/struct.RegistrarInitArgs.html b/docs/casper_name_contracts/contracts/registrar/struct.RegistrarInitArgs.html new file mode 100644 index 0000000..4a238b4 --- /dev/null +++ b/docs/casper_name_contracts/contracts/registrar/struct.RegistrarInitArgs.html @@ -0,0 +1,27 @@ +RegistrarInitArgs in casper_name_contracts::contracts::registrar - Rust

Struct RegistrarInitArgs

Source
pub struct RegistrarInitArgs {
+    pub name_token: Address,
+}
Expand description

Registrar contract constructor arguments.

+

Fields§

§name_token: Address

Trait Implementations§

Source§

impl Into<RuntimeArgs> for RegistrarInitArgs

Source§

fn into(self) -> RuntimeArgs

Converts this type into the (usually inferred) input type.
Source§

impl InitArgs for RegistrarInitArgs

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/resolver/__default_resolver_test_parts/struct.DefaultResolverHostRef.html b/docs/casper_name_contracts/contracts/resolver/__default_resolver_test_parts/struct.DefaultResolverHostRef.html new file mode 100644 index 0000000..ea8c8c2 --- /dev/null +++ b/docs/casper_name_contracts/contracts/resolver/__default_resolver_test_parts/struct.DefaultResolverHostRef.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../../casper_name_contracts/contracts/resolver/struct.DefaultResolverHostRef.html...

+ + + \ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/resolver/__default_resolver_test_parts/struct.DefaultResolverInitArgs.html b/docs/casper_name_contracts/contracts/resolver/__default_resolver_test_parts/struct.DefaultResolverInitArgs.html new file mode 100644 index 0000000..4c31bfb --- /dev/null +++ b/docs/casper_name_contracts/contracts/resolver/__default_resolver_test_parts/struct.DefaultResolverInitArgs.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../../casper_name_contracts/contracts/resolver/struct.DefaultResolverInitArgs.html...

+ + + \ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/resolver/__resolver_test_parts/struct.ResolverHostRef.html b/docs/casper_name_contracts/contracts/resolver/__resolver_test_parts/struct.ResolverHostRef.html new file mode 100644 index 0000000..b26291d --- /dev/null +++ b/docs/casper_name_contracts/contracts/resolver/__resolver_test_parts/struct.ResolverHostRef.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../../casper_name_contracts/contracts/resolver/struct.ResolverHostRef.html...

+ + + \ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/resolver/enum.ResolverError.html b/docs/casper_name_contracts/contracts/resolver/enum.ResolverError.html new file mode 100644 index 0000000..b40b2bb --- /dev/null +++ b/docs/casper_name_contracts/contracts/resolver/enum.ResolverError.html @@ -0,0 +1,32 @@ +ResolverError in casper_name_contracts::contracts::resolver - Rust

Enum ResolverError

Source
pub enum ResolverError {
+    ResolutionSetWithInvalidToken = 1_401,
+    ResolutionSetByInvalidOwner = 1_402,
+    UnauthorizedInvalidation = 1_403,
+    UnauthorizedTokenAddressUpdate = 1_404,
+    InvalidDomain = 1_405,
+    InvalidSubdomainFormat = 1_406,
+    InvalidTokenName = 1_407,
+}

Variants§

§

ResolutionSetWithInvalidToken = 1_401

§

ResolutionSetByInvalidOwner = 1_402

§

UnauthorizedInvalidation = 1_403

§

UnauthorizedTokenAddressUpdate = 1_404

§

InvalidDomain = 1_405

§

InvalidSubdomainFormat = 1_406

§

InvalidTokenName = 1_407

Trait Implementations§

Source§

impl From<ResolverError> for OdraError

Source§

fn from(error: ResolverError) -> Self

Converts to this type from the input type.
Source§

impl SchemaErrors for ResolverError

Source§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/resolver/index.html b/docs/casper_name_contracts/contracts/resolver/index.html new file mode 100644 index 0000000..9c39256 --- /dev/null +++ b/docs/casper_name_contracts/contracts/resolver/index.html @@ -0,0 +1 @@ +casper_name_contracts::contracts::resolver - Rust

Module resolver

Source

Structs§

DefaultResolver
Default Resolver smart contract. It handles the resolution of domain names to addresses.
DefaultResolverContractRef
DefaultResolver Contract Ref.
DefaultResolverHostRef
DefaultResolver Host Ref.
DefaultResolverInitArgs
DefaultResolver contract constructor arguments.
NameTokenAddressChanged
Event emitted when the name token address is changed.
ResolutionChanged
Event emitted when a resolution is changed.
ResolutionCleared
Event emitted when a resolution is cleared.
ResolverContractRef
[Resolver] Contract Ref.
ResolverHostRef
[Resolver] Host Ref.

Enums§

ResolverError
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/resolver/sidebar-items.js b/docs/casper_name_contracts/contracts/resolver/sidebar-items.js new file mode 100644 index 0000000..992aaea --- /dev/null +++ b/docs/casper_name_contracts/contracts/resolver/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["ResolverError"],"struct":["DefaultResolver","DefaultResolverContractRef","DefaultResolverHostRef","DefaultResolverInitArgs","NameTokenAddressChanged","ResolutionChanged","ResolutionCleared","ResolverContractRef","ResolverHostRef"]}; \ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/resolver/struct.DefaultResolver.html b/docs/casper_name_contracts/contracts/resolver/struct.DefaultResolver.html new file mode 100644 index 0000000..f4616b5 --- /dev/null +++ b/docs/casper_name_contracts/contracts/resolver/struct.DefaultResolver.html @@ -0,0 +1,55 @@ +DefaultResolver in casper_name_contracts::contracts::resolver - Rust

Struct DefaultResolver

Source
pub struct DefaultResolver { /* private fields */ }
Expand description

Default Resolver smart contract. It handles the resolution of domain names to addresses.

+

Implementations§

Source§

impl DefaultResolver

Source

pub fn init(&mut self, name_token: Address)

Initializes the default resolver with the name token contract address. +The caller is granted the admin role.

+
Source

pub fn set_name_token(&mut self, name_token: Address)

Admin only. Sets the name token contract address.

+
Source

pub fn set_resolution(&mut self, full_domain: String, address: Option<Address>)

Token owner only. Sets the resolution for a domain to an address.

+
Source

pub fn resolve(&self, full_domain: String) -> Option<Address>

Resolves a domain to an address.

+
Source

pub fn invalidate_resolutions(&mut self, token_id: U256)

Invalidates all the resolutions for a token. Only the token owner or the admin can do this.

+
Source

pub fn has_role(&self, role: &Role, address: &Address) -> bool

Delegated. See self.access_control.has_role() for details.

+
Source

pub fn grant_role(&mut self, role: &Role, address: &Address)

Delegated. See self.access_control.grant_role() for details.

+
Source

pub fn revoke_role(&mut self, role: &Role, address: &Address)

Delegated. See self.access_control.revoke_role() for details.

+

Trait Implementations§

Source§

impl HasEntrypoints for DefaultResolver

Source§

fn entrypoints() -> Vec<Entrypoint>

Returns the list of contract’s entrypoints.
Source§

impl HasEvents for DefaultResolver

Source§

fn events() -> Vec<Event>

Returns a list of Events used by the contract.
Source§

fn event_schemas() -> BTreeMap<String, Schema>

Returns a map of event schemas used by the contract.
Source§

impl HasIdent for DefaultResolver

Source§

fn ident() -> String

Returns the contract’s ident.
Source§

impl Module for DefaultResolver

Source§

fn new(env: Rc<ContractEnv>) -> Self

Creates a new instance of the module with the given contract environment.
Source§

fn env(&self) -> Rc<ContractEnv>

Returns the contract environment associated with the module.
Source§

impl OdraContract for DefaultResolver

Source§

type HostRef = DefaultResolverHostRef

The host reference type.
Source§

type ContractRef = DefaultResolverContractRef

The contract reference type.
Source§

type InitArgs = DefaultResolverInitArgs

The init args type.
Source§

impl SchemaCustomTypes for DefaultResolver

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl SchemaEntrypoints for DefaultResolver

Source§

fn schema_entrypoints() -> Vec<Entrypoint>

Returns a vector of [Entrypoint]s.
Source§

impl SchemaErrors for DefaultResolver

Source§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
Source§

impl SchemaEvents for DefaultResolver

Source§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
Source§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<R> Deployer<R> for R
where + R: OdraContract,

§

fn deploy( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, +) -> <R as OdraContract>::HostRef

Deploys a contract with given init args. Read more
§

fn try_deploy( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, +) -> Result<<R as OdraContract>::HostRef, OdraError>

Tries to deploy a contract with given init args. Read more
§

fn deploy_with_cfg<T>( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, + cfg: T, +) -> <R as OdraContract>::HostRef
where + T: OdraConfig,

Deploys a contract with given init args and configuration. Read more
§

fn try_deploy_with_cfg<T>( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, + cfg: T, +) -> Result<<R as OdraContract>::HostRef, OdraError>
where + T: OdraConfig,

Tries to deploy a contract with given init args and configuration. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> HostRefLoader<<T as OdraContract>::HostRef> for T
where + T: OdraContract,

§

fn load(env: &HostEnv, address: Address) -> <T as OdraContract>::HostRef

Loads an existing contract from the host environment.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
§

impl<T> Revertible for T
where + T: Module,

§

fn revert<E>(&self, error: E) -> !
where + E: Into<OdraError>,

Reverts the contract execution with the given error.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToTokenId for T
where + T: Module,

Source§

fn token_id(&self, label: String) -> U256

Converts the label to a token ID.
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/resolver/struct.DefaultResolverContractRef.html b/docs/casper_name_contracts/contracts/resolver/struct.DefaultResolverContractRef.html new file mode 100644 index 0000000..5fce9e3 --- /dev/null +++ b/docs/casper_name_contracts/contracts/resolver/struct.DefaultResolverContractRef.html @@ -0,0 +1,34 @@ +DefaultResolverContractRef in casper_name_contracts::contracts::resolver - Rust

Struct DefaultResolverContractRef

Source
pub struct DefaultResolverContractRef { /* private fields */ }
Expand description

DefaultResolver Contract Ref.

+

Implementations§

Source§

impl DefaultResolverContractRef

Source

pub fn init(&mut self, name_token: Address)

Initializes the default resolver with the name token contract address. +The caller is granted the admin role.

+
Source

pub fn set_name_token(&mut self, name_token: Address)

Admin only. Sets the name token contract address.

+
Source

pub fn set_resolution(&mut self, full_domain: String, address: Option<Address>)

Token owner only. Sets the resolution for a domain to an address.

+
Source

pub fn resolve(&self, full_domain: String) -> Option<Address>

Resolves a domain to an address.

+
Source

pub fn invalidate_resolutions(&mut self, token_id: U256)

Invalidates all the resolutions for a token. Only the token owner or the admin can do this.

+
Source

pub fn has_role(&self, role: &Role, address: &Address) -> bool

Delegated. See self.access_control.has_role() for details.

+
Source

pub fn grant_role(&mut self, role: &Role, address: &Address)

Delegated. See self.access_control.grant_role() for details.

+
Source

pub fn revoke_role(&mut self, role: &Role, address: &Address)

Delegated. See self.access_control.revoke_role() for details.

+

Trait Implementations§

Source§

impl ContractRef for DefaultResolverContractRef

Source§

fn new(env: Rc<ContractEnv>, address: Address) -> Self

Creates a new instance of the Contract Ref.
Source§

fn address(&self) -> &Address

Returns the address of the contract.
Source§

fn with_tokens(&self, tokens: U512) -> Self

Creates a new contract reference with attached tokens, based on the current instance. Read more
Source§

impl SchemaErrors for DefaultResolverContractRef

§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
Source§

impl SchemaEvents for DefaultResolverContractRef

§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/resolver/struct.DefaultResolverHostRef.html b/docs/casper_name_contracts/contracts/resolver/struct.DefaultResolverHostRef.html new file mode 100644 index 0000000..d2750e7 --- /dev/null +++ b/docs/casper_name_contracts/contracts/resolver/struct.DefaultResolverHostRef.html @@ -0,0 +1,65 @@ +DefaultResolverHostRef in casper_name_contracts::contracts::resolver - Rust

Struct DefaultResolverHostRef

Source
pub struct DefaultResolverHostRef { /* private fields */ }
Expand description

DefaultResolver Host Ref.

+

Implementations§

Source§

impl DefaultResolverHostRef

Source

pub fn init(&mut self, name_token: Address)

Initializes the default resolver with the name token contract address. +The caller is granted the admin role.

+
Source

pub fn set_name_token(&mut self, name_token: Address)

Admin only. Sets the name token contract address.

+
Source

pub fn set_resolution(&mut self, full_domain: String, address: Option<Address>)

Token owner only. Sets the resolution for a domain to an address.

+
Source

pub fn resolve(&self, full_domain: String) -> Option<Address>

Resolves a domain to an address.

+
Source

pub fn invalidate_resolutions(&mut self, token_id: U256)

Invalidates all the resolutions for a token. Only the token owner or the admin can do this.

+
Source

pub fn has_role(&self, role: &Role, address: &Address) -> bool

Delegated. See self.access_control.has_role() for details.

+
Source

pub fn grant_role(&mut self, role: &Role, address: &Address)

Delegated. See self.access_control.grant_role() for details.

+
Source

pub fn revoke_role(&mut self, role: &Role, address: &Address)

Delegated. See self.access_control.revoke_role() for details.

+
Source§

impl DefaultResolverHostRef

Source

pub fn try_init(&mut self, name_token: Address) -> OdraResult<()>

Initializes the default resolver with the name token contract address. +The caller is granted the admin role. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_set_name_token(&mut self, name_token: Address) -> OdraResult<()>

Admin only. Sets the name token contract address. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_set_resolution( + &mut self, + full_domain: String, + address: Option<Address>, +) -> OdraResult<()>

Token owner only. Sets the resolution for a domain to an address. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_resolve(&self, full_domain: String) -> OdraResult<Option<Address>>

Resolves a domain to an address. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_invalidate_resolutions(&mut self, token_id: U256) -> OdraResult<()>

Invalidates all the resolutions for a token. Only the token owner or the admin can do this. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_has_role(&self, role: &Role, address: &Address) -> OdraResult<bool>

Delegated. See self.access_control.has_role() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_grant_role( + &mut self, + role: &Role, + address: &Address, +) -> OdraResult<()>

Delegated. See self.access_control.grant_role() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_revoke_role( + &mut self, + role: &Role, + address: &Address, +) -> OdraResult<()>

Delegated. See self.access_control.revoke_role() for details. +Does not fail in case of error, returns odra::OdraResult instead.

+

Trait Implementations§

Source§

impl EntryPointsCallerProvider for DefaultResolverHostRef

Source§

fn entry_points_caller(env: &HostEnv) -> EntryPointsCaller

Returns an [EntryPointsCaller] for the given host environment.
Source§

impl HasIdent for DefaultResolverHostRef

Source§

fn ident() -> String

Returns the contract’s ident.
Source§

impl HostRef for DefaultResolverHostRef

Source§

fn new(address: Address, env: HostEnv) -> Self

Creates a new host side reference to a contract.
Source§

fn with_tokens(&self, tokens: U512) -> Self

Creates a new host reference with attached tokens, based on the current instance. Read more
Source§

fn contract_address(&self) -> Address

Returns the address of the contract.
Source§

fn env(&self) -> &HostEnv

Returns the host environment.
Source§

fn get_event<T>(&self, index: i32) -> Result<T, EventError>
where + T: FromBytes + EventInstance,

Returns the n-th event emitted by the contract. Read more
Source§

fn last_call(&self) -> ContractCallResult

Returns a detailed information about the last call of the contract.

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Addressable for T
where + T: HostRef,

§

fn address(&self) -> Address

Returns a reference to the [Address] of the type.
Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/resolver/struct.DefaultResolverInitArgs.html b/docs/casper_name_contracts/contracts/resolver/struct.DefaultResolverInitArgs.html new file mode 100644 index 0000000..612073e --- /dev/null +++ b/docs/casper_name_contracts/contracts/resolver/struct.DefaultResolverInitArgs.html @@ -0,0 +1,27 @@ +DefaultResolverInitArgs in casper_name_contracts::contracts::resolver - Rust

Struct DefaultResolverInitArgs

Source
pub struct DefaultResolverInitArgs {
+    pub name_token: Address,
+}
Expand description

DefaultResolver contract constructor arguments.

+

Fields§

§name_token: Address

Trait Implementations§

Source§

impl Into<RuntimeArgs> for DefaultResolverInitArgs

Source§

fn into(self) -> RuntimeArgs

Converts this type into the (usually inferred) input type.
Source§

impl InitArgs for DefaultResolverInitArgs

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/resolver/struct.NameTokenAddressChanged.html b/docs/casper_name_contracts/contracts/resolver/struct.NameTokenAddressChanged.html new file mode 100644 index 0000000..8bd3e8d --- /dev/null +++ b/docs/casper_name_contracts/contracts/resolver/struct.NameTokenAddressChanged.html @@ -0,0 +1,32 @@ +NameTokenAddressChanged in casper_name_contracts::contracts::resolver - Rust

Struct NameTokenAddressChanged

Source
pub struct NameTokenAddressChanged { /* private fields */ }
Expand description

Event emitted when the name token address is changed.

+

Implementations§

Source§

impl NameTokenAddressChanged

Source

pub fn new(new_name_token: Address) -> Self

Creates a new instance of the NameTokenAddressChanged event.

+

Trait Implementations§

Source§

impl CLTyped for NameTokenAddressChanged

Source§

fn cl_type() -> CLType

The CLType of Self.
Source§

impl Debug for NameTokenAddressChanged

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl EventInstance for NameTokenAddressChanged

Source§

fn name() -> String

Returns the name of the event.
Source§

fn schema() -> Schema

Returns the Schema of the event.
Source§

impl FromBytes for NameTokenAddressChanged

Source§

fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>

Deserializes the slice into Self.
Source§

fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>

Deserializes the Vec<u8> into Self.
Source§

impl NamedCLTyped for NameTokenAddressChanged

Source§

fn ty() -> NamedCLType

Returns the NamedCLType of the implementing type.
Source§

impl PartialEq for NameTokenAddressChanged

Source§

fn eq(&self, other: &NameTokenAddressChanged) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl SchemaCustomTypes for NameTokenAddressChanged

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl ToBytes for NameTokenAddressChanged

Source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Serializes &self to a Vec<u8>.
Source§

fn serialized_length(&self) -> usize

Returns the length of the Vec<u8> which would be returned from a successful call to +to_bytes() or into_bytes(). The data is not actually serialized, so this call is +relatively cheap.
Source§

fn into_bytes(self) -> Result<Vec<u8>, Error>
where + Self: Sized,

Consumes self and serializes to a Vec<u8>.
Source§

fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Writes &self into a mutable writer.
Source§

impl Eq for NameTokenAddressChanged

Source§

impl StructuralPartialEq for NameTokenAddressChanged

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> EntrypointArgument for T
where + T: CLTyped + ToBytes,

§

fn is_required() -> bool

Returns true if the argument is required.
§

fn cl_type() -> CLType

Returns the CLType of the argument.
§

fn insert_runtime_arg(self, name: &str, args: &mut RuntimeArgs)

Inserts the argument into the runtime args.
§

fn unwrap(value: Option<T>, env: &ContractEnv) -> T

Unwraps the argument from an Option.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
§

impl<T> IntoEvent for T
where + T: EventInstance,

§

fn into_event() -> Event

Converts the type into an [Event].
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/resolver/struct.ResolutionChanged.html b/docs/casper_name_contracts/contracts/resolver/struct.ResolutionChanged.html new file mode 100644 index 0000000..b1098c9 --- /dev/null +++ b/docs/casper_name_contracts/contracts/resolver/struct.ResolutionChanged.html @@ -0,0 +1,32 @@ +ResolutionChanged in casper_name_contracts::contracts::resolver - Rust

Struct ResolutionChanged

Source
pub struct ResolutionChanged { /* private fields */ }
Expand description

Event emitted when a resolution is changed.

+

Implementations§

Source§

impl ResolutionChanged

Source

pub fn new(full_domain: String, address: Option<Address>) -> Self

Creates a new instance of the ResolutionChanged event.

+

Trait Implementations§

Source§

impl CLTyped for ResolutionChanged

Source§

fn cl_type() -> CLType

The CLType of Self.
Source§

impl Debug for ResolutionChanged

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl EventInstance for ResolutionChanged

Source§

fn name() -> String

Returns the name of the event.
Source§

fn schema() -> Schema

Returns the Schema of the event.
Source§

impl FromBytes for ResolutionChanged

Source§

fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>

Deserializes the slice into Self.
Source§

fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>

Deserializes the Vec<u8> into Self.
Source§

impl NamedCLTyped for ResolutionChanged

Source§

fn ty() -> NamedCLType

Returns the NamedCLType of the implementing type.
Source§

impl PartialEq for ResolutionChanged

Source§

fn eq(&self, other: &ResolutionChanged) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl SchemaCustomTypes for ResolutionChanged

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl ToBytes for ResolutionChanged

Source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Serializes &self to a Vec<u8>.
Source§

fn serialized_length(&self) -> usize

Returns the length of the Vec<u8> which would be returned from a successful call to +to_bytes() or into_bytes(). The data is not actually serialized, so this call is +relatively cheap.
Source§

fn into_bytes(self) -> Result<Vec<u8>, Error>
where + Self: Sized,

Consumes self and serializes to a Vec<u8>.
Source§

fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Writes &self into a mutable writer.
Source§

impl Eq for ResolutionChanged

Source§

impl StructuralPartialEq for ResolutionChanged

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> EntrypointArgument for T
where + T: CLTyped + ToBytes,

§

fn is_required() -> bool

Returns true if the argument is required.
§

fn cl_type() -> CLType

Returns the CLType of the argument.
§

fn insert_runtime_arg(self, name: &str, args: &mut RuntimeArgs)

Inserts the argument into the runtime args.
§

fn unwrap(value: Option<T>, env: &ContractEnv) -> T

Unwraps the argument from an Option.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
§

impl<T> IntoEvent for T
where + T: EventInstance,

§

fn into_event() -> Event

Converts the type into an [Event].
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/resolver/struct.ResolutionCleared.html b/docs/casper_name_contracts/contracts/resolver/struct.ResolutionCleared.html new file mode 100644 index 0000000..357f4c5 --- /dev/null +++ b/docs/casper_name_contracts/contracts/resolver/struct.ResolutionCleared.html @@ -0,0 +1,32 @@ +ResolutionCleared in casper_name_contracts::contracts::resolver - Rust

Struct ResolutionCleared

Source
pub struct ResolutionCleared { /* private fields */ }
Expand description

Event emitted when a resolution is cleared.

+

Implementations§

Source§

impl ResolutionCleared

Source

pub fn new(token_id: U256) -> Self

Creates a new instance of the ResolutionCleared event.

+

Trait Implementations§

Source§

impl CLTyped for ResolutionCleared

Source§

fn cl_type() -> CLType

The CLType of Self.
Source§

impl Debug for ResolutionCleared

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl EventInstance for ResolutionCleared

Source§

fn name() -> String

Returns the name of the event.
Source§

fn schema() -> Schema

Returns the Schema of the event.
Source§

impl FromBytes for ResolutionCleared

Source§

fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>

Deserializes the slice into Self.
Source§

fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>

Deserializes the Vec<u8> into Self.
Source§

impl NamedCLTyped for ResolutionCleared

Source§

fn ty() -> NamedCLType

Returns the NamedCLType of the implementing type.
Source§

impl PartialEq for ResolutionCleared

Source§

fn eq(&self, other: &ResolutionCleared) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl SchemaCustomTypes for ResolutionCleared

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl ToBytes for ResolutionCleared

Source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Serializes &self to a Vec<u8>.
Source§

fn serialized_length(&self) -> usize

Returns the length of the Vec<u8> which would be returned from a successful call to +to_bytes() or into_bytes(). The data is not actually serialized, so this call is +relatively cheap.
Source§

fn into_bytes(self) -> Result<Vec<u8>, Error>
where + Self: Sized,

Consumes self and serializes to a Vec<u8>.
Source§

fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Writes &self into a mutable writer.
Source§

impl Eq for ResolutionCleared

Source§

impl StructuralPartialEq for ResolutionCleared

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> EntrypointArgument for T
where + T: CLTyped + ToBytes,

§

fn is_required() -> bool

Returns true if the argument is required.
§

fn cl_type() -> CLType

Returns the CLType of the argument.
§

fn insert_runtime_arg(self, name: &str, args: &mut RuntimeArgs)

Inserts the argument into the runtime args.
§

fn unwrap(value: Option<T>, env: &ContractEnv) -> T

Unwraps the argument from an Option.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
§

impl<T> IntoEvent for T
where + T: EventInstance,

§

fn into_event() -> Event

Converts the type into an [Event].
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/resolver/struct.ResolverContractRef.html b/docs/casper_name_contracts/contracts/resolver/struct.ResolverContractRef.html new file mode 100644 index 0000000..9ed7eb4 --- /dev/null +++ b/docs/casper_name_contracts/contracts/resolver/struct.ResolverContractRef.html @@ -0,0 +1,25 @@ +ResolverContractRef in casper_name_contracts::contracts::resolver - Rust

Struct ResolverContractRef

Source
pub struct ResolverContractRef { /* private fields */ }
Expand description

[Resolver] Contract Ref.

+

Implementations§

Source§

impl ResolverContractRef

Source

pub fn init(&mut self, name_token: Address)

Source

pub fn set_name_token(&mut self, name_token: Address)

Source

pub fn set_resolution(&mut self, full_domain: String, address: Option<Address>)

Source

pub fn resolve(&self, full_domain: String) -> Option<Address>

Source

pub fn invalidate_resolutions(&mut self, token_id: U256)

Trait Implementations§

Source§

impl ContractRef for ResolverContractRef

Source§

fn new(env: Rc<ContractEnv>, address: Address) -> Self

Creates a new instance of the Contract Ref.
Source§

fn address(&self) -> &Address

Returns the address of the contract.
Source§

fn with_tokens(&self, tokens: U512) -> Self

Creates a new contract reference with attached tokens, based on the current instance. Read more
Source§

impl SchemaErrors for ResolverContractRef

§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
Source§

impl SchemaEvents for ResolverContractRef

§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/resolver/struct.ResolverHostRef.html b/docs/casper_name_contracts/contracts/resolver/struct.ResolverHostRef.html new file mode 100644 index 0000000..ba26815 --- /dev/null +++ b/docs/casper_name_contracts/contracts/resolver/struct.ResolverHostRef.html @@ -0,0 +1,36 @@ +ResolverHostRef in casper_name_contracts::contracts::resolver - Rust

Struct ResolverHostRef

Source
pub struct ResolverHostRef { /* private fields */ }
Expand description

[Resolver] Host Ref.

+

Implementations§

Source§

impl ResolverHostRef

Source

pub fn init(&mut self, name_token: Address)

Source

pub fn set_name_token(&mut self, name_token: Address)

Source

pub fn set_resolution(&mut self, full_domain: String, address: Option<Address>)

Source

pub fn resolve(&self, full_domain: String) -> Option<Address>

Source

pub fn invalidate_resolutions(&mut self, token_id: U256)

Source§

impl ResolverHostRef

Source

pub fn try_init(&mut self, name_token: Address) -> OdraResult<()>

Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_set_name_token(&mut self, name_token: Address) -> OdraResult<()>

Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_set_resolution( + &mut self, + full_domain: String, + address: Option<Address>, +) -> OdraResult<()>

Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_resolve(&self, full_domain: String) -> OdraResult<Option<Address>>

Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_invalidate_resolutions(&mut self, token_id: U256) -> OdraResult<()>

Does not fail in case of error, returns odra::OdraResult instead.

+

Trait Implementations§

Source§

impl HostRef for ResolverHostRef

Source§

fn new(address: Address, env: HostEnv) -> Self

Creates a new host side reference to a contract.
Source§

fn with_tokens(&self, tokens: U512) -> Self

Creates a new host reference with attached tokens, based on the current instance. Read more
Source§

fn contract_address(&self) -> Address

Returns the address of the contract.
Source§

fn env(&self) -> &HostEnv

Returns the host environment.
Source§

fn get_event<T>(&self, index: i32) -> Result<T, EventError>
where + T: FromBytes + EventInstance,

Returns the n-th event emitted by the contract. Read more
Source§

fn last_call(&self) -> ContractCallResult

Returns a detailed information about the last call of the contract.

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Addressable for T
where + T: HostRef,

§

fn address(&self) -> Address

Returns a reference to the [Address] of the type.
Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/reverse_resolver/__reverse_resolver_test_parts/struct.ReverseResolverHostRef.html b/docs/casper_name_contracts/contracts/reverse_resolver/__reverse_resolver_test_parts/struct.ReverseResolverHostRef.html new file mode 100644 index 0000000..2321e8c --- /dev/null +++ b/docs/casper_name_contracts/contracts/reverse_resolver/__reverse_resolver_test_parts/struct.ReverseResolverHostRef.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../../casper_name_contracts/contracts/reverse_resolver/struct.ReverseResolverHostRef.html...

+ + + \ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/reverse_resolver/__reverse_resolver_test_parts/struct.ReverseResolverInitArgs.html b/docs/casper_name_contracts/contracts/reverse_resolver/__reverse_resolver_test_parts/struct.ReverseResolverInitArgs.html new file mode 100644 index 0000000..8ebb2b5 --- /dev/null +++ b/docs/casper_name_contracts/contracts/reverse_resolver/__reverse_resolver_test_parts/struct.ReverseResolverInitArgs.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../../casper_name_contracts/contracts/reverse_resolver/struct.ReverseResolverInitArgs.html...

+ + + \ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/reverse_resolver/index.html b/docs/casper_name_contracts/contracts/reverse_resolver/index.html new file mode 100644 index 0000000..efe55a2 --- /dev/null +++ b/docs/casper_name_contracts/contracts/reverse_resolver/index.html @@ -0,0 +1 @@ +casper_name_contracts::contracts::reverse_resolver - Rust

Module reverse_resolver

Source

Structs§

PrimaryNameChanged
Event emitted when the primary name of an address changes.
ReverseResolver
Reverse Resolver contract. It resolves primary names to addresses.
ReverseResolverContractRef
ReverseResolver Contract Ref.
ReverseResolverHostRef
ReverseResolver Host Ref.
ReverseResolverInitArgs
ReverseResolver contract constructor arguments.
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/reverse_resolver/sidebar-items.js b/docs/casper_name_contracts/contracts/reverse_resolver/sidebar-items.js new file mode 100644 index 0000000..9c87bc5 --- /dev/null +++ b/docs/casper_name_contracts/contracts/reverse_resolver/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["PrimaryNameChanged","ReverseResolver","ReverseResolverContractRef","ReverseResolverHostRef","ReverseResolverInitArgs"]}; \ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/reverse_resolver/struct.PrimaryNameChanged.html b/docs/casper_name_contracts/contracts/reverse_resolver/struct.PrimaryNameChanged.html new file mode 100644 index 0000000..091470d --- /dev/null +++ b/docs/casper_name_contracts/contracts/reverse_resolver/struct.PrimaryNameChanged.html @@ -0,0 +1,40 @@ +PrimaryNameChanged in casper_name_contracts::contracts::reverse_resolver - Rust

Struct PrimaryNameChanged

Source
pub struct PrimaryNameChanged {
+    pub address: Address,
+    pub old_primary_name: Option<String>,
+    pub new_primary_name: Option<String>,
+}
Expand description

Event emitted when the primary name of an address changes.

+

Fields§

§address: Address§old_primary_name: Option<String>§new_primary_name: Option<String>

Implementations§

Source§

impl PrimaryNameChanged

Source

pub fn new( + address: Address, + old_primary_name: Option<String>, + new_primary_name: Option<String>, +) -> Self

Creates a new instance of the PrimaryNameChanged event.

+

Trait Implementations§

Source§

impl CLTyped for PrimaryNameChanged

Source§

fn cl_type() -> CLType

The CLType of Self.
Source§

impl Debug for PrimaryNameChanged

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl EventInstance for PrimaryNameChanged

Source§

fn name() -> String

Returns the name of the event.
Source§

fn schema() -> Schema

Returns the Schema of the event.
Source§

impl FromBytes for PrimaryNameChanged

Source§

fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>

Deserializes the slice into Self.
Source§

fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>

Deserializes the Vec<u8> into Self.
Source§

impl NamedCLTyped for PrimaryNameChanged

Source§

fn ty() -> NamedCLType

Returns the NamedCLType of the implementing type.
Source§

impl PartialEq for PrimaryNameChanged

Source§

fn eq(&self, other: &PrimaryNameChanged) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl SchemaCustomTypes for PrimaryNameChanged

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl ToBytes for PrimaryNameChanged

Source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Serializes &self to a Vec<u8>.
Source§

fn serialized_length(&self) -> usize

Returns the length of the Vec<u8> which would be returned from a successful call to +to_bytes() or into_bytes(). The data is not actually serialized, so this call is +relatively cheap.
Source§

fn into_bytes(self) -> Result<Vec<u8>, Error>
where + Self: Sized,

Consumes self and serializes to a Vec<u8>.
Source§

fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Writes &self into a mutable writer.
Source§

impl Eq for PrimaryNameChanged

Source§

impl StructuralPartialEq for PrimaryNameChanged

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> EntrypointArgument for T
where + T: CLTyped + ToBytes,

§

fn is_required() -> bool

Returns true if the argument is required.
§

fn cl_type() -> CLType

Returns the CLType of the argument.
§

fn insert_runtime_arg(self, name: &str, args: &mut RuntimeArgs)

Inserts the argument into the runtime args.
§

fn unwrap(value: Option<T>, env: &ContractEnv) -> T

Unwraps the argument from an Option.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
§

impl<T> IntoEvent for T
where + T: EventInstance,

§

fn into_event() -> Event

Converts the type into an [Event].
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/reverse_resolver/struct.ReverseResolver.html b/docs/casper_name_contracts/contracts/reverse_resolver/struct.ReverseResolver.html new file mode 100644 index 0000000..67bba85 --- /dev/null +++ b/docs/casper_name_contracts/contracts/reverse_resolver/struct.ReverseResolver.html @@ -0,0 +1,48 @@ +ReverseResolver in casper_name_contracts::contracts::reverse_resolver - Rust

Struct ReverseResolver

Source
pub struct ReverseResolver { /* private fields */ }
Expand description

Reverse Resolver contract. It resolves primary names to addresses.

+

Implementations§

Source§

impl ReverseResolver

Source

pub fn init(&mut self, name_token: Address)

Source

pub fn set_primary_name(&mut self, primary_name: String)

Sets the primary preferred reverse resolution address for the caller.

+
Source

pub fn get_primary_name(&self, address: &Address) -> Option<String>

Returns the primary name for the address.

+

Trait Implementations§

Source§

impl HasEntrypoints for ReverseResolver

Source§

fn entrypoints() -> Vec<Entrypoint>

Returns the list of contract’s entrypoints.
Source§

impl HasEvents for ReverseResolver

Source§

fn events() -> Vec<Event>

Returns a list of Events used by the contract.
Source§

fn event_schemas() -> BTreeMap<String, Schema>

Returns a map of event schemas used by the contract.
Source§

impl HasIdent for ReverseResolver

Source§

fn ident() -> String

Returns the contract’s ident.
Source§

impl Module for ReverseResolver

Source§

fn new(env: Rc<ContractEnv>) -> Self

Creates a new instance of the module with the given contract environment.
Source§

fn env(&self) -> Rc<ContractEnv>

Returns the contract environment associated with the module.
Source§

impl OdraContract for ReverseResolver

Source§

type HostRef = ReverseResolverHostRef

The host reference type.
Source§

type ContractRef = ReverseResolverContractRef

The contract reference type.
Source§

type InitArgs = ReverseResolverInitArgs

The init args type.
Source§

impl SchemaCustomTypes for ReverseResolver

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl SchemaEntrypoints for ReverseResolver

Source§

fn schema_entrypoints() -> Vec<Entrypoint>

Returns a vector of [Entrypoint]s.
Source§

impl SchemaErrors for ReverseResolver

Source§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
Source§

impl SchemaEvents for ReverseResolver

Source§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
Source§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<R> Deployer<R> for R
where + R: OdraContract,

§

fn deploy( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, +) -> <R as OdraContract>::HostRef

Deploys a contract with given init args. Read more
§

fn try_deploy( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, +) -> Result<<R as OdraContract>::HostRef, OdraError>

Tries to deploy a contract with given init args. Read more
§

fn deploy_with_cfg<T>( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, + cfg: T, +) -> <R as OdraContract>::HostRef
where + T: OdraConfig,

Deploys a contract with given init args and configuration. Read more
§

fn try_deploy_with_cfg<T>( + env: &HostEnv, + init_args: <R as OdraContract>::InitArgs, + cfg: T, +) -> Result<<R as OdraContract>::HostRef, OdraError>
where + T: OdraConfig,

Tries to deploy a contract with given init args and configuration. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> HostRefLoader<<T as OdraContract>::HostRef> for T
where + T: OdraContract,

§

fn load(env: &HostEnv, address: Address) -> <T as OdraContract>::HostRef

Loads an existing contract from the host environment.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
§

impl<T> Revertible for T
where + T: Module,

§

fn revert<E>(&self, error: E) -> !
where + E: Into<OdraError>,

Reverts the contract execution with the given error.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToTokenId for T
where + T: Module,

Source§

fn token_id(&self, label: String) -> U256

Converts the label to a token ID.
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/reverse_resolver/struct.ReverseResolverContractRef.html b/docs/casper_name_contracts/contracts/reverse_resolver/struct.ReverseResolverContractRef.html new file mode 100644 index 0000000..0143a26 --- /dev/null +++ b/docs/casper_name_contracts/contracts/reverse_resolver/struct.ReverseResolverContractRef.html @@ -0,0 +1,27 @@ +ReverseResolverContractRef in casper_name_contracts::contracts::reverse_resolver - Rust

Struct ReverseResolverContractRef

Source
pub struct ReverseResolverContractRef { /* private fields */ }
Expand description

ReverseResolver Contract Ref.

+

Implementations§

Source§

impl ReverseResolverContractRef

Source

pub fn init(&mut self, name_token: Address)

Source

pub fn set_primary_name(&mut self, primary_name: String)

Sets the primary preferred reverse resolution address for the caller.

+
Source

pub fn get_primary_name(&self, address: &Address) -> Option<String>

Returns the primary name for the address.

+

Trait Implementations§

Source§

impl ContractRef for ReverseResolverContractRef

Source§

fn new(env: Rc<ContractEnv>, address: Address) -> Self

Creates a new instance of the Contract Ref.
Source§

fn address(&self) -> &Address

Returns the address of the contract.
Source§

fn with_tokens(&self, tokens: U512) -> Self

Creates a new contract reference with attached tokens, based on the current instance. Read more
Source§

impl SchemaErrors for ReverseResolverContractRef

§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
Source§

impl SchemaEvents for ReverseResolverContractRef

§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/reverse_resolver/struct.ReverseResolverHostRef.html b/docs/casper_name_contracts/contracts/reverse_resolver/struct.ReverseResolverHostRef.html new file mode 100644 index 0000000..0db4c49 --- /dev/null +++ b/docs/casper_name_contracts/contracts/reverse_resolver/struct.ReverseResolverHostRef.html @@ -0,0 +1,37 @@ +ReverseResolverHostRef in casper_name_contracts::contracts::reverse_resolver - Rust

Struct ReverseResolverHostRef

Source
pub struct ReverseResolverHostRef { /* private fields */ }
Expand description

ReverseResolver Host Ref.

+

Implementations§

Source§

impl ReverseResolverHostRef

Source

pub fn init(&mut self, name_token: Address)

Source

pub fn set_primary_name(&mut self, primary_name: String)

Sets the primary preferred reverse resolution address for the caller.

+
Source

pub fn get_primary_name(&self, address: &Address) -> Option<String>

Returns the primary name for the address.

+
Source§

impl ReverseResolverHostRef

Source

pub fn try_init(&mut self, name_token: Address) -> OdraResult<()>

Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_set_primary_name(&mut self, primary_name: String) -> OdraResult<()>

Sets the primary preferred reverse resolution address for the caller. +Does not fail in case of error, returns odra::OdraResult instead.

+
Source

pub fn try_get_primary_name( + &self, + address: &Address, +) -> OdraResult<Option<String>>

Returns the primary name for the address. +Does not fail in case of error, returns odra::OdraResult instead.

+

Trait Implementations§

Source§

impl EntryPointsCallerProvider for ReverseResolverHostRef

Source§

fn entry_points_caller(env: &HostEnv) -> EntryPointsCaller

Returns an [EntryPointsCaller] for the given host environment.
Source§

impl HasIdent for ReverseResolverHostRef

Source§

fn ident() -> String

Returns the contract’s ident.
Source§

impl HostRef for ReverseResolverHostRef

Source§

fn new(address: Address, env: HostEnv) -> Self

Creates a new host side reference to a contract.
Source§

fn with_tokens(&self, tokens: U512) -> Self

Creates a new host reference with attached tokens, based on the current instance. Read more
Source§

fn contract_address(&self) -> Address

Returns the address of the contract.
Source§

fn env(&self) -> &HostEnv

Returns the host environment.
Source§

fn get_event<T>(&self, index: i32) -> Result<T, EventError>
where + T: FromBytes + EventInstance,

Returns the n-th event emitted by the contract. Read more
Source§

fn last_call(&self) -> ContractCallResult

Returns a detailed information about the last call of the contract.

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Addressable for T
where + T: HostRef,

§

fn address(&self) -> Address

Returns a reference to the [Address] of the type.
Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/reverse_resolver/struct.ReverseResolverInitArgs.html b/docs/casper_name_contracts/contracts/reverse_resolver/struct.ReverseResolverInitArgs.html new file mode 100644 index 0000000..f68142a --- /dev/null +++ b/docs/casper_name_contracts/contracts/reverse_resolver/struct.ReverseResolverInitArgs.html @@ -0,0 +1,27 @@ +ReverseResolverInitArgs in casper_name_contracts::contracts::reverse_resolver - Rust

Struct ReverseResolverInitArgs

Source
pub struct ReverseResolverInitArgs {
+    pub name_token: Address,
+}
Expand description

ReverseResolver contract constructor arguments.

+

Fields§

§name_token: Address

Trait Implementations§

Source§

impl Into<RuntimeArgs> for ReverseResolverInitArgs

Source§

fn into(self) -> RuntimeArgs

Converts this type into the (usually inferred) input type.
Source§

impl InitArgs for ReverseResolverInitArgs

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/sidebar-items.js b/docs/casper_name_contracts/contracts/sidebar-items.js new file mode 100644 index 0000000..230c5cf --- /dev/null +++ b/docs/casper_name_contracts/contracts/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["controller","marketplace","name_token","registrar","resolver","reverse_resolver","token_id"]}; \ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/token_id/index.html b/docs/casper_name_contracts/contracts/token_id/index.html new file mode 100644 index 0000000..0bbcc77 --- /dev/null +++ b/docs/casper_name_contracts/contracts/token_id/index.html @@ -0,0 +1 @@ +casper_name_contracts::contracts::token_id - Rust

Module token_id

Source

Traits§

ToTokenId
\ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/token_id/sidebar-items.js b/docs/casper_name_contracts/contracts/token_id/sidebar-items.js new file mode 100644 index 0000000..017eaaa --- /dev/null +++ b/docs/casper_name_contracts/contracts/token_id/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"trait":["ToTokenId"]}; \ No newline at end of file diff --git a/docs/casper_name_contracts/contracts/token_id/trait.ToTokenId.html b/docs/casper_name_contracts/contracts/token_id/trait.ToTokenId.html new file mode 100644 index 0000000..b4e92b6 --- /dev/null +++ b/docs/casper_name_contracts/contracts/token_id/trait.ToTokenId.html @@ -0,0 +1,6 @@ +ToTokenId in casper_name_contracts::contracts::token_id - Rust

Trait ToTokenId

Source
pub trait ToTokenId {
+    // Required method
+    fn token_id(&self, label: String) -> U256;
+}

Required Methods§

Source

fn token_id(&self, label: String) -> U256

Converts the label to a token ID.

+

Implementors§

Source§

impl<T> ToTokenId for T
where + T: Module,

\ No newline at end of file diff --git a/docs/casper_name_contracts/data_structures/enum.NameTokenError.html b/docs/casper_name_contracts/data_structures/enum.NameTokenError.html new file mode 100644 index 0000000..404aa55 --- /dev/null +++ b/docs/casper_name_contracts/data_structures/enum.NameTokenError.html @@ -0,0 +1,34 @@ +NameTokenError in casper_name_contracts::data_structures - Rust

Enum NameTokenError

Source
pub enum NameTokenError {
+    EmptyTLD = 1_001,
+    TLDNotSupported = 1_002,
+    PastExpirationDate = 1_003,
+    EmptyLabel = 1_004,
+    SLDDoesNotExist = 1_005,
+    SerializationError = 1_006,
+    DeserializationError = 1_007,
+    InvalidMetadata = 1_008,
+}
Expand description

Errors that can occur while working with name tokens.

+

Variants§

§

EmptyTLD = 1_001

§

TLDNotSupported = 1_002

§

PastExpirationDate = 1_003

§

EmptyLabel = 1_004

§

SLDDoesNotExist = 1_005

§

SerializationError = 1_006

§

DeserializationError = 1_007

§

InvalidMetadata = 1_008

Trait Implementations§

Source§

impl Debug for NameTokenError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<NameTokenError> for OdraError

Source§

fn from(error: NameTokenError) -> Self

Converts to this type from the input type.
Source§

impl SchemaErrors for NameTokenError

Source§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/data_structures/index.html b/docs/casper_name_contracts/data_structures/index.html new file mode 100644 index 0000000..d421d8e --- /dev/null +++ b/docs/casper_name_contracts/data_structures/index.html @@ -0,0 +1 @@ +casper_name_contracts::data_structures - Rust

Module data_structures

Source

Structs§

NameMintInfo
Basic minting information for a name token.
NameTokenMetadata
Metadata associated with a name token.
NameTransferInfo
Pair of a label and owner address.
PaymentInfo
Information about a payment.
PaymentVoucher
Information about a payment and a list of NameMintInfo structs.
RenewalPaymentVoucher
Voucher for renewing multiple name tokens, plus payment information.
RenewalVoucher
Voucher for renewing multiple name tokens.
SecondarySaleVoucher
Information about a payment and a list of NameTransferInfo structs.
TokenRenewalInfo
Renewal information with new expiration time.
TokenizationVoucher
List of NameMintInfo structs and the expiration time of the voucher.

Enums§

NameTokenError
Errors that can occur while working with name tokens.

Traits§

ExpirableVoucher
Payment
\ No newline at end of file diff --git a/docs/casper_name_contracts/data_structures/sidebar-items.js b/docs/casper_name_contracts/data_structures/sidebar-items.js new file mode 100644 index 0000000..aee86cf --- /dev/null +++ b/docs/casper_name_contracts/data_structures/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["NameTokenError"],"struct":["NameMintInfo","NameTokenMetadata","NameTransferInfo","PaymentInfo","PaymentVoucher","RenewalPaymentVoucher","RenewalVoucher","SecondarySaleVoucher","TokenRenewalInfo","TokenizationVoucher"],"trait":["ExpirableVoucher","Payment"]}; \ No newline at end of file diff --git a/docs/casper_name_contracts/data_structures/struct.NameMintInfo.html b/docs/casper_name_contracts/data_structures/struct.NameMintInfo.html new file mode 100644 index 0000000..7b84d76 --- /dev/null +++ b/docs/casper_name_contracts/data_structures/struct.NameMintInfo.html @@ -0,0 +1,45 @@ +NameMintInfo in casper_name_contracts::data_structures - Rust

Struct NameMintInfo

Source
pub struct NameMintInfo {
+    pub label: String,
+    pub owner: Address,
+    pub token_expiration: u64,
+    pub asset_uri: String,
+}
Expand description

Basic minting information for a name token.

+

Fields§

§label: String§owner: Address§token_expiration: u64§asset_uri: String

Implementations§

Source§

impl NameMintInfo

Source

pub fn new( + label: &str, + owner: Address, + token_expiration: u64, + asset_uri: &str, +) -> Self

Trait Implementations§

Source§

impl CLTyped for NameMintInfo

Source§

fn cl_type() -> CLType

The CLType of Self.
Source§

impl Clone for NameMintInfo

Source§

fn clone(&self) -> NameMintInfo

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NameMintInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromBytes for NameMintInfo

Source§

fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>

Deserializes the slice into Self.
Source§

fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>

Deserializes the Vec<u8> into Self.
Source§

impl HasEvents for NameMintInfo

Source§

fn events() -> Vec<Event>

Returns a list of Events used by the contract.
Source§

fn event_schemas() -> BTreeMap<String, Schema>

Returns a map of event schemas used by the contract.
Source§

impl NamedCLTyped for NameMintInfo

Source§

fn ty() -> NamedCLType

Returns the NamedCLType of the implementing type.
Source§

impl PartialEq for NameMintInfo

Source§

fn eq(&self, other: &NameMintInfo) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl SchemaCustomTypes for NameMintInfo

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl ToBytes for NameMintInfo

Source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Serializes &self to a Vec<u8>.
Source§

fn serialized_length(&self) -> usize

Returns the length of the Vec<u8> which would be returned from a successful call to +to_bytes() or into_bytes(). The data is not actually serialized, so this call is +relatively cheap.
Source§

fn into_bytes(self) -> Result<Vec<u8>, Error>
where + Self: Sized,

Consumes self and serializes to a Vec<u8>.
Source§

fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Writes &self into a mutable writer.
Source§

impl Eq for NameMintInfo

Source§

impl SchemaCustomElement for NameMintInfo

Source§

impl StructuralPartialEq for NameMintInfo

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<T> EntrypointArgument for T
where + T: CLTyped + ToBytes,

§

fn is_required() -> bool

Returns true if the argument is required.
§

fn cl_type() -> CLType

Returns the CLType of the argument.
§

fn insert_runtime_arg(self, name: &str, args: &mut RuntimeArgs)

Inserts the argument into the runtime args.
§

fn unwrap(value: Option<T>, env: &ContractEnv) -> T

Unwraps the argument from an Option.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> SchemaErrors for T
where + T: SchemaCustomElement,

§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
§

impl<T> SchemaEvents for T
where + T: SchemaCustomElement,

§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/data_structures/struct.NameTokenMetadata.html b/docs/casper_name_contracts/data_structures/struct.NameTokenMetadata.html new file mode 100644 index 0000000..3f658c4 --- /dev/null +++ b/docs/casper_name_contracts/data_structures/struct.NameTokenMetadata.html @@ -0,0 +1,37 @@ +NameTokenMetadata in casper_name_contracts::data_structures - Rust

Struct NameTokenMetadata

Source
pub struct NameTokenMetadata { /* private fields */ }
Expand description

Metadata associated with a name token.

+

Implementations§

Source§

impl NameTokenMetadata

Source

pub fn with_resolver( + name: &str, + expiration: u64, + asset_uri: &str, + resolver: Address, +) -> Self

Source

pub fn with_no_resolver(name: &str, expiration: u64, asset_uri: &str) -> Self

Source

pub fn set_resolver(&mut self, resolver: Address)

Source

pub fn resolver(&self) -> OdraResult<Option<Address>>

Source

pub fn clear_resolver(&mut self)

Source

pub fn json(&self) -> String

Source

pub fn to_vec(&self) -> Vec<(String, String)>

Source

pub fn expiration(&self) -> u64

Source

pub fn set_expiration(&mut self, expiration: u64)

Trait Implementations§

Source§

impl Clone for NameTokenMetadata

Source§

fn clone(&self) -> NameTokenMetadata

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NameTokenMetadata

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for NameTokenMetadata

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for NameTokenMetadata

Source§

fn eq(&self, other: &NameTokenMetadata) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Serialize for NameTokenMetadata

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<String> for NameTokenMetadata

Source§

type Error = NameTokenError

The type returned in the event of a conversion error.
Source§

fn try_from(value: String) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Vec<(String, String)>> for NameTokenMetadata

Source§

type Error = NameTokenError

The type returned in the event of a conversion error.
Source§

fn try_from(value: Vec<(String, String)>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl StructuralPartialEq for NameTokenMetadata

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/docs/casper_name_contracts/data_structures/struct.NameTransferInfo.html b/docs/casper_name_contracts/data_structures/struct.NameTransferInfo.html new file mode 100644 index 0000000..c3ecb17 --- /dev/null +++ b/docs/casper_name_contracts/data_structures/struct.NameTransferInfo.html @@ -0,0 +1,38 @@ +NameTransferInfo in casper_name_contracts::data_structures - Rust

Struct NameTransferInfo

Source
pub struct NameTransferInfo {
+    pub label: String,
+    pub owner: Address,
+}
Expand description

Pair of a label and owner address.

+

Fields§

§label: String§owner: Address

Trait Implementations§

Source§

impl CLTyped for NameTransferInfo

Source§

fn cl_type() -> CLType

The CLType of Self.
Source§

impl Clone for NameTransferInfo

Source§

fn clone(&self) -> NameTransferInfo

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NameTransferInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromBytes for NameTransferInfo

Source§

fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>

Deserializes the slice into Self.
Source§

fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>

Deserializes the Vec<u8> into Self.
Source§

impl HasEvents for NameTransferInfo

Source§

fn events() -> Vec<Event>

Returns a list of Events used by the contract.
Source§

fn event_schemas() -> BTreeMap<String, Schema>

Returns a map of event schemas used by the contract.
Source§

impl NamedCLTyped for NameTransferInfo

Source§

fn ty() -> NamedCLType

Returns the NamedCLType of the implementing type.
Source§

impl PartialEq for NameTransferInfo

Source§

fn eq(&self, other: &NameTransferInfo) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl SchemaCustomTypes for NameTransferInfo

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl ToBytes for NameTransferInfo

Source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Serializes &self to a Vec<u8>.
Source§

fn serialized_length(&self) -> usize

Returns the length of the Vec<u8> which would be returned from a successful call to +to_bytes() or into_bytes(). The data is not actually serialized, so this call is +relatively cheap.
Source§

fn into_bytes(self) -> Result<Vec<u8>, Error>
where + Self: Sized,

Consumes self and serializes to a Vec<u8>.
Source§

fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Writes &self into a mutable writer.
Source§

impl Eq for NameTransferInfo

Source§

impl SchemaCustomElement for NameTransferInfo

Source§

impl StructuralPartialEq for NameTransferInfo

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<T> EntrypointArgument for T
where + T: CLTyped + ToBytes,

§

fn is_required() -> bool

Returns true if the argument is required.
§

fn cl_type() -> CLType

Returns the CLType of the argument.
§

fn insert_runtime_arg(self, name: &str, args: &mut RuntimeArgs)

Inserts the argument into the runtime args.
§

fn unwrap(value: Option<T>, env: &ContractEnv) -> T

Unwraps the argument from an Option.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> SchemaErrors for T
where + T: SchemaCustomElement,

§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
§

impl<T> SchemaEvents for T
where + T: SchemaCustomElement,

§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/data_structures/struct.PaymentInfo.html b/docs/casper_name_contracts/data_structures/struct.PaymentInfo.html new file mode 100644 index 0000000..aa9d7f9 --- /dev/null +++ b/docs/casper_name_contracts/data_structures/struct.PaymentInfo.html @@ -0,0 +1,39 @@ +PaymentInfo in casper_name_contracts::data_structures - Rust

Struct PaymentInfo

Source
pub struct PaymentInfo {
+    pub buyer: Address,
+    pub payment_id: String,
+    pub amount: U512,
+}
Expand description

Information about a payment.

+

Fields§

§buyer: Address§payment_id: String§amount: U512

Trait Implementations§

Source§

impl CLTyped for PaymentInfo

Source§

fn cl_type() -> CLType

The CLType of Self.
Source§

impl Clone for PaymentInfo

Source§

fn clone(&self) -> PaymentInfo

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PaymentInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromBytes for PaymentInfo

Source§

fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>

Deserializes the slice into Self.
Source§

fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>

Deserializes the Vec<u8> into Self.
Source§

impl HasEvents for PaymentInfo

Source§

fn events() -> Vec<Event>

Returns a list of Events used by the contract.
Source§

fn event_schemas() -> BTreeMap<String, Schema>

Returns a map of event schemas used by the contract.
Source§

impl NamedCLTyped for PaymentInfo

Source§

fn ty() -> NamedCLType

Returns the NamedCLType of the implementing type.
Source§

impl PartialEq for PaymentInfo

Source§

fn eq(&self, other: &PaymentInfo) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl SchemaCustomTypes for PaymentInfo

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl ToBytes for PaymentInfo

Source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Serializes &self to a Vec<u8>.
Source§

fn serialized_length(&self) -> usize

Returns the length of the Vec<u8> which would be returned from a successful call to +to_bytes() or into_bytes(). The data is not actually serialized, so this call is +relatively cheap.
Source§

fn into_bytes(self) -> Result<Vec<u8>, Error>
where + Self: Sized,

Consumes self and serializes to a Vec<u8>.
Source§

fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Writes &self into a mutable writer.
Source§

impl Eq for PaymentInfo

Source§

impl SchemaCustomElement for PaymentInfo

Source§

impl StructuralPartialEq for PaymentInfo

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<T> EntrypointArgument for T
where + T: CLTyped + ToBytes,

§

fn is_required() -> bool

Returns true if the argument is required.
§

fn cl_type() -> CLType

Returns the CLType of the argument.
§

fn insert_runtime_arg(self, name: &str, args: &mut RuntimeArgs)

Inserts the argument into the runtime args.
§

fn unwrap(value: Option<T>, env: &ContractEnv) -> T

Unwraps the argument from an Option.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> SchemaErrors for T
where + T: SchemaCustomElement,

§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
§

impl<T> SchemaEvents for T
where + T: SchemaCustomElement,

§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/data_structures/struct.PaymentVoucher.html b/docs/casper_name_contracts/data_structures/struct.PaymentVoucher.html new file mode 100644 index 0000000..f577c7c --- /dev/null +++ b/docs/casper_name_contracts/data_structures/struct.PaymentVoucher.html @@ -0,0 +1,45 @@ +PaymentVoucher in casper_name_contracts::data_structures - Rust

Struct PaymentVoucher

Source
pub struct PaymentVoucher {
+    pub payment: PaymentInfo,
+    pub names: Vec<NameMintInfo>,
+    pub voucher_expiration: u64,
+}
Expand description

Information about a payment and a list of NameMintInfo structs.

+

Fields§

§payment: PaymentInfo§names: Vec<NameMintInfo>§voucher_expiration: u64

Implementations§

Source§

impl PaymentVoucher

Source

pub fn new( + amount: U512, + payment_id: &str, + buyer: Address, + names: Vec<NameMintInfo>, + voucher_expiration: u64, +) -> Self

Trait Implementations§

Source§

impl CLTyped for PaymentVoucher

Source§

fn cl_type() -> CLType

The CLType of Self.
Source§

impl Clone for PaymentVoucher

Source§

fn clone(&self) -> PaymentVoucher

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PaymentVoucher

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<PaymentVoucher> for TokenizationVoucher

Source§

fn from(voucher: PaymentVoucher) -> Self

Converts to this type from the input type.
Source§

impl FromBytes for PaymentVoucher

Source§

fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>

Deserializes the slice into Self.
Source§

fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>

Deserializes the Vec<u8> into Self.
Source§

impl HasEvents for PaymentVoucher

Source§

fn events() -> Vec<Event>

Returns a list of Events used by the contract.
Source§

fn event_schemas() -> BTreeMap<String, Schema>

Returns a map of event schemas used by the contract.
Source§

impl NamedCLTyped for PaymentVoucher

Source§

fn ty() -> NamedCLType

Returns the NamedCLType of the implementing type.
Source§

impl PartialEq for PaymentVoucher

Source§

fn eq(&self, other: &PaymentVoucher) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Payment for PaymentVoucher

Source§

impl SchemaCustomTypes for PaymentVoucher

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl ToBytes for PaymentVoucher

Source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Serializes &self to a Vec<u8>.
Source§

fn serialized_length(&self) -> usize

Returns the length of the Vec<u8> which would be returned from a successful call to +to_bytes() or into_bytes(). The data is not actually serialized, so this call is +relatively cheap.
Source§

fn into_bytes(self) -> Result<Vec<u8>, Error>
where + Self: Sized,

Consumes self and serializes to a Vec<u8>.
Source§

fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Writes &self into a mutable writer.
Source§

impl Eq for PaymentVoucher

Source§

impl SchemaCustomElement for PaymentVoucher

Source§

impl StructuralPartialEq for PaymentVoucher

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<T> EntrypointArgument for T
where + T: CLTyped + ToBytes,

§

fn is_required() -> bool

Returns true if the argument is required.
§

fn cl_type() -> CLType

Returns the CLType of the argument.
§

fn insert_runtime_arg(self, name: &str, args: &mut RuntimeArgs)

Inserts the argument into the runtime args.
§

fn unwrap(value: Option<T>, env: &ContractEnv) -> T

Unwraps the argument from an Option.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> SchemaErrors for T
where + T: SchemaCustomElement,

§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
§

impl<T> SchemaEvents for T
where + T: SchemaCustomElement,

§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/data_structures/struct.RenewalPaymentVoucher.html b/docs/casper_name_contracts/data_structures/struct.RenewalPaymentVoucher.html new file mode 100644 index 0000000..855ed79 --- /dev/null +++ b/docs/casper_name_contracts/data_structures/struct.RenewalPaymentVoucher.html @@ -0,0 +1,45 @@ +RenewalPaymentVoucher in casper_name_contracts::data_structures - Rust

Struct RenewalPaymentVoucher

Source
pub struct RenewalPaymentVoucher {
+    pub payment: PaymentInfo,
+    pub tokens: Vec<TokenRenewalInfo>,
+    pub voucher_expiration: u64,
+}
Expand description

Voucher for renewing multiple name tokens, plus payment information.

+

Fields§

§payment: PaymentInfo§tokens: Vec<TokenRenewalInfo>§voucher_expiration: u64

Implementations§

Source§

impl RenewalPaymentVoucher

Source

pub fn new( + amount: U512, + payment_id: &str, + buyer: Address, + tokens: Vec<TokenRenewalInfo>, + voucher_expiration: u64, +) -> Self

Trait Implementations§

Source§

impl CLTyped for RenewalPaymentVoucher

Source§

fn cl_type() -> CLType

The CLType of Self.
Source§

impl Clone for RenewalPaymentVoucher

Source§

fn clone(&self) -> RenewalPaymentVoucher

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RenewalPaymentVoucher

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<RenewalPaymentVoucher> for RenewalVoucher

Source§

fn from(voucher: RenewalPaymentVoucher) -> Self

Converts to this type from the input type.
Source§

impl FromBytes for RenewalPaymentVoucher

Source§

fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>

Deserializes the slice into Self.
Source§

fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>

Deserializes the Vec<u8> into Self.
Source§

impl HasEvents for RenewalPaymentVoucher

Source§

fn events() -> Vec<Event>

Returns a list of Events used by the contract.
Source§

fn event_schemas() -> BTreeMap<String, Schema>

Returns a map of event schemas used by the contract.
Source§

impl NamedCLTyped for RenewalPaymentVoucher

Source§

fn ty() -> NamedCLType

Returns the NamedCLType of the implementing type.
Source§

impl PartialEq for RenewalPaymentVoucher

Source§

fn eq(&self, other: &RenewalPaymentVoucher) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Payment for RenewalPaymentVoucher

Source§

impl SchemaCustomTypes for RenewalPaymentVoucher

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl ToBytes for RenewalPaymentVoucher

Source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Serializes &self to a Vec<u8>.
Source§

fn serialized_length(&self) -> usize

Returns the length of the Vec<u8> which would be returned from a successful call to +to_bytes() or into_bytes(). The data is not actually serialized, so this call is +relatively cheap.
Source§

fn into_bytes(self) -> Result<Vec<u8>, Error>
where + Self: Sized,

Consumes self and serializes to a Vec<u8>.
Source§

fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Writes &self into a mutable writer.
Source§

impl Eq for RenewalPaymentVoucher

Source§

impl SchemaCustomElement for RenewalPaymentVoucher

Source§

impl StructuralPartialEq for RenewalPaymentVoucher

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<T> EntrypointArgument for T
where + T: CLTyped + ToBytes,

§

fn is_required() -> bool

Returns true if the argument is required.
§

fn cl_type() -> CLType

Returns the CLType of the argument.
§

fn insert_runtime_arg(self, name: &str, args: &mut RuntimeArgs)

Inserts the argument into the runtime args.
§

fn unwrap(value: Option<T>, env: &ContractEnv) -> T

Unwraps the argument from an Option.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> SchemaErrors for T
where + T: SchemaCustomElement,

§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
§

impl<T> SchemaEvents for T
where + T: SchemaCustomElement,

§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/data_structures/struct.RenewalVoucher.html b/docs/casper_name_contracts/data_structures/struct.RenewalVoucher.html new file mode 100644 index 0000000..9798f3e --- /dev/null +++ b/docs/casper_name_contracts/data_structures/struct.RenewalVoucher.html @@ -0,0 +1,38 @@ +RenewalVoucher in casper_name_contracts::data_structures - Rust

Struct RenewalVoucher

Source
pub struct RenewalVoucher {
+    pub tokens: Vec<TokenRenewalInfo>,
+    pub voucher_expiration: u64,
+}
Expand description

Voucher for renewing multiple name tokens.

+

Fields§

§tokens: Vec<TokenRenewalInfo>§voucher_expiration: u64

Implementations§

Source§

impl RenewalVoucher

Source

pub fn new(tokens: Vec<TokenRenewalInfo>, voucher_expiration: u64) -> Self

Trait Implementations§

Source§

impl CLTyped for RenewalVoucher

Source§

fn cl_type() -> CLType

The CLType of Self.
Source§

impl Clone for RenewalVoucher

Source§

fn clone(&self) -> RenewalVoucher

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RenewalVoucher

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl ExpirableVoucher for RenewalVoucher

Source§

impl From<RenewalPaymentVoucher> for RenewalVoucher

Source§

fn from(voucher: RenewalPaymentVoucher) -> Self

Converts to this type from the input type.
Source§

impl FromBytes for RenewalVoucher

Source§

fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>

Deserializes the slice into Self.
Source§

fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>

Deserializes the Vec<u8> into Self.
Source§

impl HasEvents for RenewalVoucher

Source§

fn events() -> Vec<Event>

Returns a list of Events used by the contract.
Source§

fn event_schemas() -> BTreeMap<String, Schema>

Returns a map of event schemas used by the contract.
Source§

impl NamedCLTyped for RenewalVoucher

Source§

fn ty() -> NamedCLType

Returns the NamedCLType of the implementing type.
Source§

impl PartialEq for RenewalVoucher

Source§

fn eq(&self, other: &RenewalVoucher) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl SchemaCustomTypes for RenewalVoucher

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl ToBytes for RenewalVoucher

Source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Serializes &self to a Vec<u8>.
Source§

fn serialized_length(&self) -> usize

Returns the length of the Vec<u8> which would be returned from a successful call to +to_bytes() or into_bytes(). The data is not actually serialized, so this call is +relatively cheap.
Source§

fn into_bytes(self) -> Result<Vec<u8>, Error>
where + Self: Sized,

Consumes self and serializes to a Vec<u8>.
Source§

fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Writes &self into a mutable writer.
Source§

impl Eq for RenewalVoucher

Source§

impl SchemaCustomElement for RenewalVoucher

Source§

impl StructuralPartialEq for RenewalVoucher

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<T> EntrypointArgument for T
where + T: CLTyped + ToBytes,

§

fn is_required() -> bool

Returns true if the argument is required.
§

fn cl_type() -> CLType

Returns the CLType of the argument.
§

fn insert_runtime_arg(self, name: &str, args: &mut RuntimeArgs)

Inserts the argument into the runtime args.
§

fn unwrap(value: Option<T>, env: &ContractEnv) -> T

Unwraps the argument from an Option.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> SchemaErrors for T
where + T: SchemaCustomElement,

§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
§

impl<T> SchemaEvents for T
where + T: SchemaCustomElement,

§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/data_structures/struct.SecondarySaleVoucher.html b/docs/casper_name_contracts/data_structures/struct.SecondarySaleVoucher.html new file mode 100644 index 0000000..5df734e --- /dev/null +++ b/docs/casper_name_contracts/data_structures/struct.SecondarySaleVoucher.html @@ -0,0 +1,39 @@ +SecondarySaleVoucher in casper_name_contracts::data_structures - Rust

Struct SecondarySaleVoucher

Source
pub struct SecondarySaleVoucher {
+    pub payment: PaymentInfo,
+    pub names: Vec<NameTransferInfo>,
+    pub voucher_expiration: u64,
+}
Expand description

Information about a payment and a list of NameTransferInfo structs.

+

Fields§

§payment: PaymentInfo§names: Vec<NameTransferInfo>§voucher_expiration: u64

Trait Implementations§

Source§

impl CLTyped for SecondarySaleVoucher

Source§

fn cl_type() -> CLType

The CLType of Self.
Source§

impl Clone for SecondarySaleVoucher

Source§

fn clone(&self) -> SecondarySaleVoucher

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SecondarySaleVoucher

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromBytes for SecondarySaleVoucher

Source§

fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>

Deserializes the slice into Self.
Source§

fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>

Deserializes the Vec<u8> into Self.
Source§

impl HasEvents for SecondarySaleVoucher

Source§

fn events() -> Vec<Event>

Returns a list of Events used by the contract.
Source§

fn event_schemas() -> BTreeMap<String, Schema>

Returns a map of event schemas used by the contract.
Source§

impl NamedCLTyped for SecondarySaleVoucher

Source§

fn ty() -> NamedCLType

Returns the NamedCLType of the implementing type.
Source§

impl PartialEq for SecondarySaleVoucher

Source§

fn eq(&self, other: &SecondarySaleVoucher) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Payment for SecondarySaleVoucher

Source§

impl SchemaCustomTypes for SecondarySaleVoucher

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl ToBytes for SecondarySaleVoucher

Source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Serializes &self to a Vec<u8>.
Source§

fn serialized_length(&self) -> usize

Returns the length of the Vec<u8> which would be returned from a successful call to +to_bytes() or into_bytes(). The data is not actually serialized, so this call is +relatively cheap.
Source§

fn into_bytes(self) -> Result<Vec<u8>, Error>
where + Self: Sized,

Consumes self and serializes to a Vec<u8>.
Source§

fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Writes &self into a mutable writer.
Source§

impl Eq for SecondarySaleVoucher

Source§

impl SchemaCustomElement for SecondarySaleVoucher

Source§

impl StructuralPartialEq for SecondarySaleVoucher

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<T> EntrypointArgument for T
where + T: CLTyped + ToBytes,

§

fn is_required() -> bool

Returns true if the argument is required.
§

fn cl_type() -> CLType

Returns the CLType of the argument.
§

fn insert_runtime_arg(self, name: &str, args: &mut RuntimeArgs)

Inserts the argument into the runtime args.
§

fn unwrap(value: Option<T>, env: &ContractEnv) -> T

Unwraps the argument from an Option.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> SchemaErrors for T
where + T: SchemaCustomElement,

§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
§

impl<T> SchemaEvents for T
where + T: SchemaCustomElement,

§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/data_structures/struct.TokenRenewalInfo.html b/docs/casper_name_contracts/data_structures/struct.TokenRenewalInfo.html new file mode 100644 index 0000000..fc408e7 --- /dev/null +++ b/docs/casper_name_contracts/data_structures/struct.TokenRenewalInfo.html @@ -0,0 +1,38 @@ +TokenRenewalInfo in casper_name_contracts::data_structures - Rust

Struct TokenRenewalInfo

Source
pub struct TokenRenewalInfo {
+    pub token_id: U256,
+    pub token_expiration: u64,
+}
Expand description

Renewal information with new expiration time.

+

Fields§

§token_id: U256§token_expiration: u64

Implementations§

Source§

impl TokenRenewalInfo

Source

pub fn new(token_id: U256, token_expiration: u64) -> Self

Trait Implementations§

Source§

impl CLTyped for TokenRenewalInfo

Source§

fn cl_type() -> CLType

The CLType of Self.
Source§

impl Clone for TokenRenewalInfo

Source§

fn clone(&self) -> TokenRenewalInfo

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TokenRenewalInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromBytes for TokenRenewalInfo

Source§

fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>

Deserializes the slice into Self.
Source§

fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>

Deserializes the Vec<u8> into Self.
Source§

impl HasEvents for TokenRenewalInfo

Source§

fn events() -> Vec<Event>

Returns a list of Events used by the contract.
Source§

fn event_schemas() -> BTreeMap<String, Schema>

Returns a map of event schemas used by the contract.
Source§

impl NamedCLTyped for TokenRenewalInfo

Source§

fn ty() -> NamedCLType

Returns the NamedCLType of the implementing type.
Source§

impl PartialEq for TokenRenewalInfo

Source§

fn eq(&self, other: &TokenRenewalInfo) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl SchemaCustomTypes for TokenRenewalInfo

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl ToBytes for TokenRenewalInfo

Source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Serializes &self to a Vec<u8>.
Source§

fn serialized_length(&self) -> usize

Returns the length of the Vec<u8> which would be returned from a successful call to +to_bytes() or into_bytes(). The data is not actually serialized, so this call is +relatively cheap.
Source§

fn into_bytes(self) -> Result<Vec<u8>, Error>
where + Self: Sized,

Consumes self and serializes to a Vec<u8>.
Source§

fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Writes &self into a mutable writer.
Source§

impl Eq for TokenRenewalInfo

Source§

impl SchemaCustomElement for TokenRenewalInfo

Source§

impl StructuralPartialEq for TokenRenewalInfo

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<T> EntrypointArgument for T
where + T: CLTyped + ToBytes,

§

fn is_required() -> bool

Returns true if the argument is required.
§

fn cl_type() -> CLType

Returns the CLType of the argument.
§

fn insert_runtime_arg(self, name: &str, args: &mut RuntimeArgs)

Inserts the argument into the runtime args.
§

fn unwrap(value: Option<T>, env: &ContractEnv) -> T

Unwraps the argument from an Option.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> SchemaErrors for T
where + T: SchemaCustomElement,

§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
§

impl<T> SchemaEvents for T
where + T: SchemaCustomElement,

§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/data_structures/struct.TokenizationVoucher.html b/docs/casper_name_contracts/data_structures/struct.TokenizationVoucher.html new file mode 100644 index 0000000..364c23a --- /dev/null +++ b/docs/casper_name_contracts/data_structures/struct.TokenizationVoucher.html @@ -0,0 +1,38 @@ +TokenizationVoucher in casper_name_contracts::data_structures - Rust

Struct TokenizationVoucher

Source
pub struct TokenizationVoucher {
+    pub names: Vec<NameMintInfo>,
+    pub voucher_expiration: u64,
+}
Expand description

List of NameMintInfo structs and the expiration time of the voucher.

+

Fields§

§names: Vec<NameMintInfo>§voucher_expiration: u64

Implementations§

Source§

impl TokenizationVoucher

Source

pub fn new(names: Vec<NameMintInfo>, voucher_expiration: u64) -> Self

Trait Implementations§

Source§

impl CLTyped for TokenizationVoucher

Source§

fn cl_type() -> CLType

The CLType of Self.
Source§

impl Clone for TokenizationVoucher

Source§

fn clone(&self) -> TokenizationVoucher

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TokenizationVoucher

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl ExpirableVoucher for TokenizationVoucher

Source§

impl From<PaymentVoucher> for TokenizationVoucher

Source§

fn from(voucher: PaymentVoucher) -> Self

Converts to this type from the input type.
Source§

impl FromBytes for TokenizationVoucher

Source§

fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>

Deserializes the slice into Self.
Source§

fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>

Deserializes the Vec<u8> into Self.
Source§

impl HasEvents for TokenizationVoucher

Source§

fn events() -> Vec<Event>

Returns a list of Events used by the contract.
Source§

fn event_schemas() -> BTreeMap<String, Schema>

Returns a map of event schemas used by the contract.
Source§

impl NamedCLTyped for TokenizationVoucher

Source§

fn ty() -> NamedCLType

Returns the NamedCLType of the implementing type.
Source§

impl PartialEq for TokenizationVoucher

Source§

fn eq(&self, other: &TokenizationVoucher) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl SchemaCustomTypes for TokenizationVoucher

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional [CustomType]s.
Source§

impl ToBytes for TokenizationVoucher

Source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Serializes &self to a Vec<u8>.
Source§

fn serialized_length(&self) -> usize

Returns the length of the Vec<u8> which would be returned from a successful call to +to_bytes() or into_bytes(). The data is not actually serialized, so this call is +relatively cheap.
Source§

fn into_bytes(self) -> Result<Vec<u8>, Error>
where + Self: Sized,

Consumes self and serializes to a Vec<u8>.
Source§

fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>

Writes &self into a mutable writer.
Source§

impl Eq for TokenizationVoucher

Source§

impl SchemaCustomElement for TokenizationVoucher

Source§

impl StructuralPartialEq for TokenizationVoucher

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where + T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where + T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<T> EntrypointArgument for T
where + T: CLTyped + ToBytes,

§

fn is_required() -> bool

Returns true if the argument is required.
§

fn cl_type() -> CLType

Returns the CLType of the argument.
§

fn insert_runtime_arg(self, name: &str, args: &mut RuntimeArgs)

Inserts the argument into the runtime args.
§

fn unwrap(value: Option<T>, env: &ContractEnv) -> T

Unwraps the argument from an Option.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where + U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> SchemaErrors for T
where + T: SchemaCustomElement,

§

fn schema_errors() -> Vec<UserError>

Returns a vector of [UserError]s.
§

impl<T> SchemaEvents for T
where + T: SchemaCustomElement,

§

fn schema_events() -> Vec<Event>

Returns a vector of [Event]s.
§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of [CustomType]s. Read more
Source§

impl<T> ToOwned for T
where + T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/casper_name_contracts/data_structures/trait.ExpirableVoucher.html b/docs/casper_name_contracts/data_structures/trait.ExpirableVoucher.html new file mode 100644 index 0000000..1b6f74f --- /dev/null +++ b/docs/casper_name_contracts/data_structures/trait.ExpirableVoucher.html @@ -0,0 +1,4 @@ +ExpirableVoucher in casper_name_contracts::data_structures - Rust

Trait ExpirableVoucher

Source
pub trait ExpirableVoucher {
+    // Required method
+    fn expiration_time(&self) -> u64;
+}

Required Methods§

Implementors§

\ No newline at end of file diff --git a/docs/casper_name_contracts/data_structures/trait.Payment.html b/docs/casper_name_contracts/data_structures/trait.Payment.html new file mode 100644 index 0000000..22187cd --- /dev/null +++ b/docs/casper_name_contracts/data_structures/trait.Payment.html @@ -0,0 +1,4 @@ +Payment in casper_name_contracts::data_structures - Rust

Trait Payment

Source
pub trait Payment {
+    // Required method
+    fn payment_info(&self) -> &PaymentInfo;
+}

Required Methods§

Implementors§

\ No newline at end of file diff --git a/docs/casper_name_contracts/index.html b/docs/casper_name_contracts/index.html new file mode 100644 index 0000000..2577c62 --- /dev/null +++ b/docs/casper_name_contracts/index.html @@ -0,0 +1 @@ +casper_name_contracts - Rust

Crate casper_name_contracts

Source

Modules§

contracts
data_structures
\ No newline at end of file diff --git a/docs/casper_name_contracts/sidebar-items.js b/docs/casper_name_contracts/sidebar-items.js new file mode 100644 index 0000000..c68679a --- /dev/null +++ b/docs/casper_name_contracts/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["contracts","data_structures"]}; \ No newline at end of file diff --git a/docs/crates.js b/docs/crates.js new file mode 100644 index 0000000..5f2db34 --- /dev/null +++ b/docs/crates.js @@ -0,0 +1,2 @@ +window.ALL_CRATES = ["casper_name_contracts"]; +//{"start":21,"fragment_lengths":[23]} \ No newline at end of file diff --git a/docs/help.html b/docs/help.html new file mode 100644 index 0000000..fc9aca8 --- /dev/null +++ b/docs/help.html @@ -0,0 +1 @@ +Help

Rustdoc help

Back
\ No newline at end of file diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..68c3f07 --- /dev/null +++ b/docs/index.html @@ -0,0 +1 @@ + diff --git a/docs/search-index.js b/docs/search-index.js new file mode 100644 index 0000000..982e08b --- /dev/null +++ b/docs/search-index.js @@ -0,0 +1,4 @@ +var searchIndex = new Map(JSON.parse('[["casper_name_contracts",{"t":"CCCCCCCCCFFFPPFFGFFPPPFPPFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFFFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNONNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNPPPPFFGFFPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNSPFPPPFFGFFPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFFFFPPPFFFPPFGFPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFFFFFNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNKMPPPKPFGFFPKFFFFPFPPFFNNNNNNNNNNOONNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOONNNNNNOOOOOOMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOONNNNNNNNNNNNN","n":["contracts","data_structures","controller","marketplace","name_token","registrar","resolver","reverse_resolver","token_id","BaseController","BaseControllerContractRef","BaseControllerHostRef","BuyerMustBeCaller","ContractAddressExpected","Controller","ControllerContractRef","ControllerError","ControllerHostRef","ControllerInitArgs","FeeCollectorNotSet","InsufficientPayment","InvalidSignature","PaymentFulfilled","PaymentTooLarge","RegistrarNotSet","SignerPublicKeyChanged","TreasuryAddressChanged","address","","","","borrow","","","","","","","","","","","borrow_mut","","","","","","","","","","","buy","","","buy_and_renew","","","cl_type","","","","","","contract_address","","custom_types","","deploy","","deploy_with_cfg","","entry_points_caller","","entrypoints","","env","","","","eq","","","event_schemas","","events","","fmt","","","from","","","","","","","","","","","from_bytes","","","get_event","","grant_role","","","","","","has_role","","","","","","ident","","","","init","","","","insert_runtime_arg","","","into","","","","","","","","","","","","into_event","","","is_paused","","","","","","is_required","","","last_call","","load","","name","","","new","","","","","","","","","pause","","","","process_payment_voucher","registrar","renew","","","require_not_paused","","","resolve","","","revert","","revoke_role","","","","","","schema","","","schema_entrypoints","","schema_errors","","","schema_events","","schema_types","","","","","serialized_length","","","set_signer_public_key","","","","set_treasury","","","","signer","signer_public_key","","","","to_bytes","","","token_id","","treasury","try_buy","try_buy_and_renew","try_deploy","","try_deploy_with_cfg","","try_from","","","","","","","","","","","try_grant_role","","try_has_role","","try_init","try_into","","","","","","","","","","","try_is_paused","","try_pause","try_renew","try_require_not_paused","try_resolve","try_revoke_role","","try_set_signer_public_key","try_set_treasury","try_signer_public_key","try_unpause","ty","","","type_id","","","","","","","","","","","unpause","","","","unwrap","","","vzip","","","","","","","","","","","with_tokens","","","","SecondaryMarket","SecondaryMarketContractRef","SecondaryMarketHostRef","SecondaryMarketInitArgs","address","","borrow","","","","borrow_mut","","","","buy","","","contract_address","custom_types","deploy","deploy_with_cfg","entry_points_caller","entrypoints","env","","event_schemas","events","from","","","","get_event","grant_role","","","has_role","","","ident","","init","","","into","","","","","is_paused","","","last_call","load","name_token","new","","","pause","","","revert","revoke_role","","","schema_entrypoints","schema_errors","schema_events","schema_types","set_signer_public_key","","","set_treasury","","","signer","signer_public_key","","","token_id","treasury","try_buy","try_deploy","try_deploy_with_cfg","try_from","","","","try_grant_role","try_has_role","try_init","try_into","","","","try_is_paused","try_pause","try_revoke_role","try_set_signer_public_key","try_set_treasury","try_signer_public_key","try_unpause","type_id","","","","unpause","","","vzip","","","","with_tokens","","ExpiredTokenTransfer","InvalidResolver","InvalidTokenIdentifier","InvalidTokenOwner","NameToken","NameTokenContractRef","NameTokenError","NameTokenHostRef","NameTokenInitArgs","NotWhitelisted","TokenSupplyDepleted","WhitelistedAlready","accept_ownership","","","address","","admin_transfer","","","approve","","","approve_for_all","","","approved_for","","","assert_is_owner","","","balance_of","","","borrow","","","","","borrow_mut","","","","","burn","","","contract_address","custom_types","deploy","deploy_with_cfg","entry_points_caller","entrypoints","env","","event_schemas","events","from","","","","","get_default_resolver","","","get_event","get_owner","","","get_pending_owner","","","ident","","init","","","into","","","","","","is_approved_for_all","","","is_token_valid","","","last_call","load","max_supply","mint","","","name","","","","new","","","owner_of","","","renounce_ownership","","","resolver","","","revert","revoke_approval","","","revoke_approval_for_all","","","revoke_whitelist","","","safe_transfer_from","","","schema_entrypoints","schema_errors","","schema_events","schema_types","set_default_resolver","","","set_resolver","","","set_token_metadata","","","symbol","","","","token_exists","","","token_id","token_metadata","","","transfer_from","","","transfer_ownership","","","try_accept_ownership","try_admin_transfer","try_approve","try_approve_for_all","try_approved_for","try_assert_is_owner","try_balance_of","try_burn","try_deploy","try_deploy_with_cfg","try_from","","","","","try_get_default_resolver","try_get_owner","try_get_pending_owner","try_init","try_into","","","","","try_is_approved_for_all","try_is_token_valid","try_mint","try_name","try_owner_of","try_renounce_ownership","try_resolver","try_revoke_approval","try_revoke_approval_for_all","try_revoke_whitelist","try_safe_transfer_from","try_set_default_resolver","try_set_resolver","try_set_token_metadata","try_symbol","try_token_exists","try_token_metadata","try_transfer_from","try_transfer_ownership","try_whitelist","type_id","","","","","vzip","","","","","whitelist","","","with_tokens","","wrapped_metadata","CONTROLLER_ROLE","ExpirationDateInThePast","GracePeriodChanged","GracePeriodExpired","GracePeriodTooLong","NameTokenIsNotValid","Registrar","RegistrarContractRef","RegistrarError","RegistrarHostRef","RegistrarInitArgs","TokenDoesNotExist","TokenNameIsNotValid","TokenNotExpired","VoucherExpired","address","","admin_burn","","","admin_prolong","","","admin_prolong_and_register","","","admin_register","","","admin_transfer","","","borrow","","","","","","borrow_mut","","","","","","cl_type","","contract_address","controller_prolong","","","controller_prolong_and_register","","","controller_register","","","custom_types","deploy","deploy_with_cfg","entry_points_caller","entrypoints","env","","eq","event_schemas","events","expire","","","fmt","from","","","","","","from_bytes","get_event","grace_period","","","grant_role","","","has_role","","","ident","","init","","","insert_runtime_arg","into","","","","","","","into_event","is_paused","","","is_required","last_call","load","name","name_token","new","","","","pause","","","resolve","","","revert","revoke_role","","","schema","schema_entrypoints","schema_errors","","schema_events","schema_types","","serialized_length","set_grace_period","","","to_bytes","token_id","try_admin_burn","try_admin_prolong","try_admin_prolong_and_register","try_admin_register","try_admin_transfer","try_controller_prolong","try_controller_prolong_and_register","try_controller_register","try_deploy","try_deploy_with_cfg","try_expire","try_from","","","","","","try_grace_period","try_grant_role","try_has_role","try_init","try_into","","","","","","try_is_paused","try_pause","try_resolve","try_revoke_role","try_set_grace_period","try_unpause","ty","type_id","","","","","","unpause","","","unwrap","vzip","","","","","","with_tokens","","DefaultResolver","DefaultResolverContractRef","DefaultResolverHostRef","DefaultResolverInitArgs","InvalidDomain","InvalidSubdomainFormat","InvalidTokenName","NameTokenAddressChanged","ResolutionChanged","ResolutionCleared","ResolutionSetByInvalidOwner","ResolutionSetWithInvalidToken","ResolverContractRef","ResolverError","ResolverHostRef","UnauthorizedInvalidation","UnauthorizedTokenAddressUpdate","address","","","","borrow","","","","","","","","","","borrow_mut","","","","","","","","","","cl_type","","","","","","contract_address","","custom_types","deploy","deploy_with_cfg","entry_points_caller","entrypoints","env","","","eq","","","event_schemas","events","fmt","","","from","","","","","","","","","","from_bytes","","","get_event","","grant_role","","","has_role","","","ident","","init","","","","","insert_runtime_arg","","","into","","","","","","","","","","","into_event","","","invalidate_resolutions","","","","","is_required","","","last_call","","load","name","","","name_token","new","","","","","","","","resolve","","","","","revert","revoke_role","","","schema","","","schema_entrypoints","schema_errors","","schema_events","schema_types","","","","serialized_length","","","set_name_token","","","","","set_resolution","","","","","to_bytes","","","token_id","try_deploy","try_deploy_with_cfg","try_from","","","","","","","","","","try_grant_role","try_has_role","try_init","","try_into","","","","","","","","","","try_invalidate_resolutions","","try_resolve","","try_revoke_role","try_set_name_token","","try_set_resolution","","ty","","","type_id","","","","","","","","","","unwrap","","","vzip","","","","","","","","","","with_tokens","","","","PrimaryNameChanged","ReverseResolver","ReverseResolverContractRef","ReverseResolverHostRef","ReverseResolverInitArgs","address","","","borrow","","","","","borrow_mut","","","","","cl_type","","contract_address","custom_types","deploy","deploy_with_cfg","entry_points_caller","entrypoints","env","","eq","event_schemas","events","fmt","from","","","","","from_bytes","get_event","get_primary_name","","","ident","","init","","","insert_runtime_arg","into","","","","","","into_event","is_required","last_call","load","name","name_token","new","","","","new_primary_name","old_primary_name","revert","schema","schema_entrypoints","schema_errors","schema_events","schema_types","","serialized_length","set_primary_name","","","to_bytes","token_id","try_deploy","try_deploy_with_cfg","try_from","","","","","try_get_primary_name","try_init","try_into","","","","","try_set_primary_name","ty","type_id","","","","","unwrap","vzip","","","","","with_tokens","","ToTokenId","token_id","DeserializationError","EmptyLabel","EmptyTLD","ExpirableVoucher","InvalidMetadata","NameMintInfo","NameTokenError","NameTokenMetadata","NameTransferInfo","PastExpirationDate","Payment","PaymentInfo","PaymentVoucher","RenewalPaymentVoucher","RenewalVoucher","SLDDoesNotExist","SecondarySaleVoucher","SerializationError","TLDNotSupported","TokenRenewalInfo","TokenizationVoucher","__clone_box","","","","","","","","","","amount","asset_uri","borrow","","","","","","","","","","","borrow_mut","","","","","","","","","","","buyer","cl_type","","","","","","","","","","","","","","","","","","clear_resolver","clone","","","","","","","","","","clone_into","","","","","","","","","","clone_to_uninit","","","","","","","","","","deserialize","eq","","","","","","","","","","event_schemas","","","","","","","","","events","","","","","","","","","expiration","expiration_time","","","fmt","","","","","","","","","","","from","","","","","","","","","","","","","from_bytes","","","","","","","","","insert_runtime_arg","","","","","","","","","into","","","","","","","","","","","is_required","","","","","","","","","json","label","","names","","","new","","","","","","owner","","payment","","","payment_id","payment_info","","","","resolver","schema_errors","schema_types","","","","","","","","","serialize","serialized_length","","","","","","","","","set_expiration","set_resolver","to_bytes","","","","","","","","","to_owned","","","","","","","","","","to_vec","token_expiration","","token_id","tokens","","try_from","","","","","","","","","","","","","try_into","","","","","","","","","","","ty","","","","","","","","","type_id","","","","","","","","","","","unwrap","","","","","","","","","voucher_expiration","","","","","vzip","","","","","","","","","","","with_no_resolver","with_resolver"],"q":[[0,"casper_name_contracts"],[2,"casper_name_contracts::contracts"],[9,"casper_name_contracts::contracts::controller"],[311,"casper_name_contracts::contracts::marketplace"],[425,"casper_name_contracts::contracts::name_token"],[641,"casper_name_contracts::contracts::registrar"],[829,"casper_name_contracts::contracts::resolver"],[1064,"casper_name_contracts::contracts::reverse_resolver"],[1172,"casper_name_contracts::contracts::token_id"],[1174,"casper_name_contracts::data_structures"],[1515,"odra_core::address"],[1516,"casper_types::bytesrepr::bytes"],[1517,"casper_name_contracts::contracts::controller::__controller_test_parts"],[1518,"casper_types::cl_type"],[1519,"casper_name_contracts::contracts::controller::__base_controller_test_parts"],[1520,"casper_contract_schema"],[1521,"core::option"],[1522,"alloc::vec"],[1523,"odra_core::host"],[1524,"odra_core::entry_point_callback"],[1525,"odra_core::contract_def"],[1526,"odra_core::contract_env"],[1527,"alloc::rc"],[1528,"alloc::string"],[1529,"casper_event_standard::schema"],[1530,"alloc::collections::btree::map"],[1531,"core::fmt"],[1532,"casper_types::bytesrepr"],[1533,"core::result"],[1534,"odra_core::error"],[1535,"casper_event_standard"],[1536,"odra_modules::access::access_control"],[1537,"casper_types::crypto::asymmetric_key"],[1538,"casper_types::transaction::runtime_args"],[1539,"odra_core::call_result"],[1540,"casper_types::uint::macro_code"],[1541,"core::convert"],[1542,"casper_contract_schema::ty"],[1543,"core::any"],[1544,"casper_name_contracts::contracts::marketplace::__secondary_market_test_parts"],[1545,"casper_name_contracts::contracts::name_token::__name_token_test_parts"],[1546,"casper_name_contracts::contracts::registrar::__registrar_test_parts"],[1547,"casper_name_contracts::contracts::resolver::__resolver_test_parts"],[1548,"casper_name_contracts::contracts::resolver::__default_resolver_test_parts"],[1549,"casper_name_contracts::contracts::reverse_resolver::__reverse_resolver_test_parts"],[1550,"dyn_clone::sealed"],[1551,"serde::de"],[1552,"serde::ser"]],"i":"````````````Mb0`````000`00``bAdhAjC`CdCfl76EnBn76:5432981076:298298554433862020208620280654320205435432981076:543862980762980762806298054354329811076:5432980765438620543543298076298001298076298202980765432020:205432054329802980129805432018820205432981076:868685432981076:8688688688885435432981076:29805435432981076:9876````GnHdH`21Hf13201322111211211132021321321213213200132210132132113211111321320132102111320222132022222221320132132032Md000`````000HhHjHl10210210210210210210210I`432104321133313313332104321132132131321321004321321130321321032132132132133213213213213343332132132132103213321321321111111113332104111132104111111111111111111113210432104321213`Mf`000`````0000IdIhIf21021021021021Jb132Jd5124305113243243243222322312224311243051324324324323243112430051243132101243243243224312252121243123333333322312430533331243053333331124305243112430543````Mh00```00```00JfJjJhJl32K`KbKdJn54Kf9874321650944332275111517154321143287432165094327516516515871654328743216500943287165432751432087432165871651165432119143214328716587165432111874321650955758743216509757557575432874321650943287432165098765`````KhKlKjKn32L`214302223111311321121430223143131432143002223120143222121111221432111143023314302321430221430243`LbLn00`0````0`````0`00``IbLfJ`nHbLhIlIjAfIn83:9876543210:987654321088877665544332211009987654321098765432109876543210998765432108765432108765432109Ll81;:987654321;:98876543211987654321987654321;:987654321987654321:54876874321547629Fd873;<:98765432;:98765432;;:98765432;:98765432;54432<;;;:98765432<;:98765432:98765432<;:98765432:9876543298732<;:98765432;;","f":"```````````````````````````{{{d{b}}}{{d{f}}}}{df}{{{d{h}}}{{d{f}}}}1{d{{d{c}}}{}}0000000000{{{d{j}}}{{d{jc}}}{}}0000000000{{{d{jl}}nA`}Ab}{{{d{jb}}nA`}Ab}{{{d{jAd}}nA`}Ab}{{{d{jl}}nA`AfA`}Ab}{{{d{jb}}nA`AfA`}Ab}{{{d{jAd}}nA`AfA`}Ab}{{}Ah}00000{{{d{Ad}}}f}{{{d{Aj}}}f}{{}{{B`{{An{Al}}}}}}0{{{d{Bb}}}}0{{{d{Bb}}c}{}Bd}0{{{d{Bb}}}Bf}0{{}{{B`{Bh}}}}0{{{d{l}}}{{Bl{Bj}}}}{{{d{Ad}}}{{d{Bb}}}}{{{d{Bn}}}{{Bl{Bj}}}}{{{d{Aj}}}{{d{Bb}}}}{{{d{C`}}{d{C`}}}Cb}{{{d{Cd}}{d{Cd}}}Cb}{{{d{Cf}}{d{Cf}}}Cb}{{}{{Cl{ChCj}}}}0{{}{{B`{Cn}}}}0{{{d{C`}}{d{jD`}}}Db}{{{d{Cd}}{d{jD`}}}Db}{{{d{Cf}}{d{jD`}}}Db}{cc{}}0000000000{{{d{{Df{Dd}}}}}{{Dl{{Dh{C`{d{{Df{Dd}}}}}}Dj}}}}{{{d{{Df{Dd}}}}}{{Dl{{Dh{Cd{d{{Df{Dd}}}}}}Dj}}}}{{{d{{Df{Dd}}}}}{{Dl{{Dh{Cf{d{{Df{Dd}}}}}}Dj}}}}{{{d{Ad}}Dn}{{Dl{cE`}}}{EbEd}}{{{d{Aj}}Dn}{{Dl{cE`}}}{EbEd}}{{{d{jl}}{d{Ef}}{d{f}}}Ab}{{{d{jb}}{d{Ef}}{d{f}}}Ab}{{{d{jAd}}{d{Ef}}{d{f}}}Ab}{{{d{jBn}}{d{Ef}}{d{f}}}Ab}{{{d{jh}}{d{Ef}}{d{f}}}Ab}{{{d{jAj}}{d{Ef}}{d{f}}}Ab}{{{d{l}}{d{Ef}}{d{f}}}Cb}{{{d{b}}{d{Ef}}{d{f}}}Cb}{{{d{Ad}}{d{Ef}}{d{f}}}Cb}{{{d{Bn}}{d{Ef}}{d{f}}}Cb}{{{d{h}}{d{Ef}}{d{f}}}Cb}{{{d{Aj}}{d{Ef}}{d{f}}}Cb}{{}Ch}000{{{d{jl}}fEhf}Ab}{{{d{jb}}fEhf}Ab}{{{d{jAd}}fEhf}Ab}{{{d{jBn}}Ehf}Ab}{{{d{Ej}}{d{jEl}}}Ab}00{{}c{}}000000{EnEl}1111{{}Cn}00{{{d{l}}}Cb}{{{d{b}}}Cb}{{{d{Ad}}}Cb}{{{d{Bn}}}Cb}{{{d{h}}}Cb}{{{d{Aj}}}Cb}{{}Cb}00{{{d{Ad}}}F`}{{{d{Aj}}}F`}{{{d{Bb}}f}}0{{}Ch}00{{ChfFb}C`}{EhCd}{fCf}{{{Bl{Bj}}}l}{{{Bl{Bj}}f}b}{{fBb}Ad}{{{Bl{Bj}}}Bn}{{{Bl{Bj}}f}h}{{fBb}Aj}{{{d{jl}}}Ab}{{{d{jb}}}Ab}{{{d{jAd}}}Ab}{{{d{jBn}}}Ab}{{{d{Bn}}{d{c}}A`}Ab{FdFf}}{Enf}{{{d{jl}}AfA`}Ab}{{{d{jb}}AfA`}Ab}{{{d{jAd}}AfA`}Ab}{{{d{Bn}}}Ab}{{{d{h}}}Ab}{{{d{Aj}}}Ab}{{{d{l}}Ch}{{An{f}}}}{{{d{b}}Ch}{{An{f}}}}{{{d{Ad}}Ch}{{An{f}}}}{{dc}Fh{{Fl{Fj}}}}0{{{d{jl}}{d{Ef}}{d{f}}}Ab}{{{d{jb}}{d{Ef}}{d{f}}}Ab}{{{d{jAd}}{d{Ef}}{d{f}}}Ab}{{{d{jBn}}{d{Ef}}{d{f}}}Ab}{{{d{jh}}{d{Ef}}{d{f}}}Ab}{{{d{jAj}}{d{Ef}}{d{f}}}Ab}{{}Cj}00{{}{{B`{Fn}}}}0{{}{{B`{G`}}}}00{{}{{B`{Gb}}}}0{{}{{B`{{An{Al}}}}}}0000{{{d{C`}}}Gd}{{{d{Cd}}}Gd}{{{d{Cf}}}Gd}{{{d{jl}}Eh}Ab}{{{d{jb}}Eh}Ab}{{{d{jAd}}Eh}Ab}{{{d{jBn}}Eh}Ab}{{{d{jl}}f}Ab}{{{d{jb}}f}Ab}{{{d{jAd}}f}Ab}{{{d{jBn}}f}Ab}{EnEh}{{{d{l}}}Eh}{{{d{b}}}Eh}{{{d{Ad}}}Eh}{{{d{Bn}}}Eh}{{{d{C`}}}{{Dl{{B`{Dd}}Dj}}}}{{{d{Cd}}}{{Dl{{B`{Dd}}Dj}}}}{{{d{Cf}}}{{Dl{{B`{Dd}}Dj}}}}{{dCh}Gf}0{Enf}{{{d{jAd}}nA`}{{Gh{Ab}}}}{{{d{jAd}}nA`AfA`}{{Gh{Ab}}}}{{{d{Bb}}}{{Dl{Fj}}}}0{{{d{Bb}}c}{{Dl{Fj}}}Bd}0{c{{Dl{e}}}{}{}}0000000000{{{d{jAd}}{d{Ef}}{d{f}}}{{Gh{Ab}}}}{{{d{jAj}}{d{Ef}}{d{f}}}{{Gh{Ab}}}}{{{d{Ad}}{d{Ef}}{d{f}}}{{Gh{Cb}}}}{{{d{Aj}}{d{Ef}}{d{f}}}{{Gh{Cb}}}}{{{d{jAd}}fEhf}{{Gh{Ab}}}}{{}{{Dl{c}}}{}}0000000000{{{d{Ad}}}{{Gh{Cb}}}}{{{d{Aj}}}{{Gh{Cb}}}}{{{d{jAd}}}{{Gh{Ab}}}}{{{d{jAd}}AfA`}{{Gh{Ab}}}}{{{d{Aj}}}{{Gh{Ab}}}}{{{d{Ad}}Ch}{{Gh{{An{f}}}}}};:{{{d{jAd}}Eh}{{Gh{Ab}}}}{{{d{jAd}}f}{{Gh{Ab}}}}{{{d{Ad}}}{{Gh{Eh}}}}6{{}Gj}00{dGl}0000000000{{{d{jl}}}Ab}{{{d{jb}}}Ab}{{{d{jAd}}}Ab}{{{d{jBn}}}Ab}{{{An{c}}{d{Bj}}}c{}}00{{}c{}}0000000000{{{d{b}}Fb}b}{{{d{Ad}}Fb}Ad}{{{d{h}}Fb}h}{{{d{Aj}}Fb}Aj}````{{{d{Gn}}}{{d{f}}}}{df}{d{{d{c}}}{}}000{{{d{j}}}{{d{jc}}}{}}000{{{d{jH`}}HbA`}Ab}{{{d{jGn}}HbA`}Ab}{{{d{jHd}}HbA`}Ab}{{{d{Hd}}}f}{{}{{B`{{An{Al}}}}}}{{{d{Bb}}}}{{{d{Bb}}c}{}Bd}{{{d{Bb}}}Bf}{{}{{B`{Bh}}}}{{{d{H`}}}{{Bl{Bj}}}}{{{d{Hd}}}{{d{Bb}}}}{{}{{Cl{ChCj}}}}{{}{{B`{Cn}}}}{cc{}}000{{{d{Hd}}Dn}{{Dl{cE`}}}{EbEd}}{{{d{jH`}}{d{Ef}}{d{f}}}Ab}{{{d{jGn}}{d{Ef}}{d{f}}}Ab}{{{d{jHd}}{d{Ef}}{d{f}}}Ab}{{{d{H`}}{d{Ef}}{d{f}}}Cb}{{{d{Gn}}{d{Ef}}{d{f}}}Cb}{{{d{Hd}}{d{Ef}}{d{f}}}Cb}{{}Ch}0{{{d{jH`}}Ehff}Ab}{{{d{jGn}}Ehff}Ab}{{{d{jHd}}Ehff}Ab}{{}c{}}00{HfEl}1{{{d{H`}}}Cb}{{{d{Gn}}}Cb}{{{d{Hd}}}Cb}{{{d{Hd}}}F`}{{{d{Bb}}f}}{Hff}{{{Bl{Bj}}}H`}{{{Bl{Bj}}f}Gn}{{fBb}Hd}{{{d{jH`}}}Ab}{{{d{jGn}}}Ab}{{{d{jHd}}}Ab}{{dc}Fh{{Fl{Fj}}}}{{{d{jH`}}{d{Ef}}{d{f}}}Ab}{{{d{jGn}}{d{Ef}}{d{f}}}Ab}{{{d{jHd}}{d{Ef}}{d{f}}}Ab}{{}{{B`{Fn}}}}{{}{{B`{G`}}}}{{}{{B`{Gb}}}}{{}{{B`{{An{Al}}}}}}{{{d{jH`}}Eh}Ab}{{{d{jGn}}Eh}Ab}{{{d{jHd}}Eh}Ab}{{{d{jH`}}f}Ab}{{{d{jGn}}f}Ab}{{{d{jHd}}f}Ab}{HfEh}{{{d{H`}}}Eh}{{{d{Gn}}}Eh}{{{d{Hd}}}Eh}{{dCh}Gf}{Hff}{{{d{jHd}}HbA`}{{Gh{Ab}}}}{{{d{Bb}}}{{Dl{Fj}}}}{{{d{Bb}}c}{{Dl{Fj}}}Bd}{c{{Dl{e}}}{}{}}000{{{d{jHd}}{d{Ef}}{d{f}}}{{Gh{Ab}}}}{{{d{Hd}}{d{Ef}}{d{f}}}{{Gh{Cb}}}}{{{d{jHd}}Ehff}{{Gh{Ab}}}}{{}{{Dl{c}}}{}}000{{{d{Hd}}}{{Gh{Cb}}}}{{{d{jHd}}}{{Gh{Ab}}}}5{{{d{jHd}}Eh}{{Gh{Ab}}}}{{{d{jHd}}f}{{Gh{Ab}}}}{{{d{Hd}}}{{Gh{Eh}}}}3{dGl}000{{{d{jH`}}}Ab}{{{d{jGn}}}Ab}{{{d{jHd}}}Ab}{{}c{}}000{{{d{Gn}}Fb}Gn}{{{d{Hd}}Fb}Hd}````````````{{{d{jHh}}}Ab}{{{d{jHj}}}Ab}{{{d{jHl}}}Ab}{{{d{Hj}}}{{d{f}}}}{df}{{{d{jHh}}f{B`{Gf}}}Ab}{{{d{jHj}}f{B`{Gf}}}Ab}{{{d{jHl}}f{B`{Gf}}}Ab}{{{d{jHh}}fGf}Ab}{{{d{jHj}}fGf}Ab}{{{d{jHl}}fGf}Ab}{{{d{jHh}}f}Ab}{{{d{jHj}}f}Ab}{{{d{jHl}}f}Ab}{{{d{Hh}}Gf}{{An{f}}}}{{{d{Hj}}Gf}{{An{f}}}}{{{d{Hl}}Gf}{{An{f}}}}{{{d{Hh}}Gff}Ab}{{{d{Hj}}Gff}Ab}{{{d{Hl}}Gff}Ab}{{{d{Hh}}f}Gf}{{{d{Hj}}f}Gf}{{{d{Hl}}f}Gf}{d{{d{c}}}{}}0000{{{d{j}}}{{d{jc}}}{}}0000{{{d{jHh}}Gf}Ab}{{{d{jHj}}Gf}Ab}{{{d{jHl}}Gf}Ab}{{{d{Hl}}}f}{{}{{B`{{An{Al}}}}}}{{{d{Bb}}}}{{{d{Bb}}c}{}Bd}{{{d{Bb}}}Bf}{{}{{B`{Bh}}}}{{{d{Hh}}}{{Bl{Bj}}}}{{{d{Hl}}}{{d{Bb}}}}{{}{{Cl{ChCj}}}}{{}{{B`{Cn}}}}{cc{}}0000{{{d{Hh}}}f}{{{d{Hj}}}f}<{{{d{Hl}}Dn}{{Dl{cE`}}}{EbEd}}21={{{d{Hh}}}{{An{f}}}}{{{d{Hj}}}{{An{f}}}}{{{d{Hl}}}{{An{f}}}}{{}Ch}0{{{d{jHh}}ChChHn}Ab}{{{d{jHj}}ChChHn}Ab}{{{d{jHl}}ChChHn}Ab}{{}c{}}00{I`El}11{{{d{Hh}}ff}Cb}{{{d{Hj}}ff}Cb}{{{d{Hl}}ff}Cb}{{{d{Hh}}Gf}Cb}{{{d{Hj}}Gf}Cb}{{{d{Hl}}Gf}Cb}{{{d{Hl}}}F`}{{{d{Bb}}f}}{I`Hn}{{{d{jHh}}fGf{B`{{Dh{ChCh}}}}}Ab}{{{d{jHj}}fGf{B`{{Dh{ChCh}}}}}Ab}{{{d{jHl}}fGf{B`{{Dh{ChCh}}}}}Ab}{{{d{Hh}}}Ch}{{{d{Hj}}}Ch}{{{d{Hl}}}Ch}{I`Ch}{{{Bl{Bj}}}Hh}{{{Bl{Bj}}f}Hj}{{fBb}Hl}{{{d{Hh}}Gf}{{An{f}}}}{{{d{Hj}}Gf}{{An{f}}}}{{{d{Hl}}Gf}{{An{f}}}}{{{d{jHh}}}Ab}{{{d{jHj}}}Ab}{{{d{jHl}}}Ab}543{{dc}Fh{{Fl{Fj}}}}{{{d{jHh}}Gf}Ab}{{{d{jHj}}Gf}Ab}{{{d{jHl}}Gf}Ab}{{{d{jHh}}f}Ab}{{{d{jHj}}f}Ab}{{{d{jHl}}f}Ab}210{{{d{jHh}}ffGf{An{A`}}}Ab}{{{d{jHj}}ffGf{An{A`}}}Ab}{{{d{jHl}}ffGf{An{A`}}}Ab}{{}{{B`{Fn}}}}{{}{{B`{G`}}}}0{{}{{B`{Gb}}}}{{}{{B`{{An{Al}}}}}}987{{{d{jHh}}Gff}Ab}{{{d{jHj}}Gff}Ab}{{{d{jHl}}Gff}Ab}{{{d{jHh}}Gf{B`{{Dh{ChCh}}}}}Ab}{{{d{jHj}}Gf{B`{{Dh{ChCh}}}}}Ab}{{{d{jHl}}Gf{B`{{Dh{ChCh}}}}}Ab}{{{d{Hh}}}Ch}{{{d{Hj}}}Ch}{{{d{Hl}}}Ch}{I`Ch}{{{d{Hh}}Gf}Cb}{{{d{Hj}}Gf}Cb}{{{d{Hl}}Gf}Cb}{{dCh}Gf}{{{d{Hh}}Gf}{{B`{{Dh{ChCh}}}}}}{{{d{Hj}}Gf}{{B`{{Dh{ChCh}}}}}}{{{d{Hl}}Gf}{{B`{{Dh{ChCh}}}}}}{{{d{jHh}}ffGf}Ab}{{{d{jHj}}ffGf}Ab}{{{d{jHl}}ffGf}Ab}{{{d{jHh}}{d{f}}}Ab}{{{d{jHj}}{d{f}}}Ab}{{{d{jHl}}{d{f}}}Ab}{{{d{jHl}}}{{Gh{Ab}}}}{{{d{jHl}}f{B`{Gf}}}{{Gh{Ab}}}}{{{d{jHl}}fGf}{{Gh{Ab}}}}{{{d{jHl}}f}{{Gh{Ab}}}}{{{d{Hl}}Gf}{{Gh{{An{f}}}}}}{{{d{Hl}}Gff}{{Gh{Ab}}}}{{{d{Hl}}f}{{Gh{Gf}}}}{{{d{jHl}}Gf}{{Gh{Ab}}}}{{{d{Bb}}}{{Dl{Fj}}}}{{{d{Bb}}c}{{Dl{Fj}}}Bd}{c{{Dl{e}}}{}{}}0000{{{d{Hl}}}{{Gh{f}}}}0{{{d{Hl}}}{{Gh{{An{f}}}}}}{{{d{jHl}}ChChHn}{{Gh{Ab}}}}{{}{{Dl{c}}}{}}0000{{{d{Hl}}ff}{{Gh{Cb}}}}{{{d{Hl}}Gf}{{Gh{Cb}}}}{{{d{jHl}}fGf{B`{{Dh{ChCh}}}}}{{Gh{Ab}}}}{{{d{Hl}}}{{Gh{Ch}}}}>{{{d{jHl}}}{{Gh{Ab}}}}?<{{{d{jHl}}f}{{Gh{Ab}}}}0{{{d{jHl}}ffGf{An{A`}}}{{Gh{Ab}}}}1{{{d{jHl}}Gff}{{Gh{Ab}}}}{{{d{jHl}}Gf{B`{{Dh{ChCh}}}}}{{Gh{Ab}}}}57{{{d{Hl}}Gf}{{Gh{{B`{{Dh{ChCh}}}}}}}}{{{d{jHl}}ffGf}{{Gh{Ab}}}}{{{d{jHl}}{d{f}}}{{Gh{Ab}}}}6{dGl}0000{{}c{}}0000{{{d{jHh}}f}Ab}{{{d{jHj}}f}Ab}{{{d{jHl}}f}Ab}{{{d{Hj}}Fb}Hj}{{{d{Hl}}Fb}Hl}{{{d{Hh}}Gf}Ib}{{}Ef}``````````````{{{d{Id}}}{{d{f}}}}{df}{{{d{jIf}}{B`{Gf}}}Ab}{{{d{jId}}{B`{Gf}}}Ab}{{{d{jIh}}{B`{Gf}}}Ab}{{{d{jIf}}{B`{Ij}}}Ab}{{{d{jId}}{B`{Ij}}}Ab}{{{d{jIh}}{B`{Ij}}}Ab}{{{d{jIf}}{B`{Ij}}{B`{Il}}}Ab}{{{d{jId}}{B`{Ij}}{B`{Il}}}Ab}{{{d{jIh}}{B`{Ij}}{B`{Il}}}Ab}{{{d{jIf}}{B`{Il}}}Ab}{{{d{jId}}{B`{Il}}}Ab}{{{d{jIh}}{B`{Il}}}Ab}{{{d{jIf}}f{B`{Gf}}}Ab}{{{d{jId}}f{B`{Gf}}}Ab}{{{d{jIh}}f{B`{Gf}}}Ab}{d{{d{c}}}{}}00000{{{d{j}}}{{d{jc}}}{}}00000{{}Ah}0{{{d{Ih}}}f}{{{d{jIf}}In}Ab}{{{d{jId}}In}Ab}{{{d{jIh}}In}Ab}{{{d{jIf}}InJ`}Ab}{{{d{jId}}InJ`}Ab}{{{d{jIh}}InJ`}Ab}{{{d{jIf}}J`}Ab}{{{d{jId}}J`}Ab}{{{d{jIh}}J`}Ab}{{}{{B`{{An{Al}}}}}}{{{d{Bb}}}}{{{d{Bb}}c}{}Bd}{{{d{Bb}}}Bf}{{}{{B`{Bh}}}}{{{d{If}}}{{Bl{Bj}}}}{{{d{Ih}}}{{d{Bb}}}}{{{d{Jb}}{d{Jb}}}Cb}{{}{{Cl{ChCj}}}}{{}{{B`{Cn}}}}{{{d{jIf}}{B`{Gf}}}Ab}{{{d{jId}}{B`{Gf}}}Ab}{{{d{jIh}}{B`{Gf}}}Ab}{{{d{Jb}}{d{jD`}}}Db}{cc{}}00000{{{d{{Df{Dd}}}}}{{Dl{{Dh{Jb{d{{Df{Dd}}}}}}Dj}}}}{{{d{Ih}}Dn}{{Dl{cE`}}}{EbEd}}{{{d{If}}}Hn}{{{d{Id}}}Hn}{{{d{Ih}}}Hn}{{{d{jIf}}{d{Ef}}{d{f}}}Ab}{{{d{jId}}{d{Ef}}{d{f}}}Ab}{{{d{jIh}}{d{Ef}}{d{f}}}Ab}{{{d{If}}{d{Ef}}{d{f}}}Cb}{{{d{Id}}{d{Ef}}{d{f}}}Cb}{{{d{Ih}}{d{Ef}}{d{f}}}Cb}{{}Ch}0{{{d{jIf}}f}Ab}{{{d{jId}}f}Ab}{{{d{jIh}}f}Ab}{{{d{Ej}}{d{jEl}}}Ab}{{}c{}}0000{JdEl}1{{}Cn}{{{d{If}}}Cb}{{{d{Id}}}Cb}{{{d{Ih}}}Cb}{{}Cb}{{{d{Ih}}}F`}{{{d{Bb}}f}}={Jdf}{HnJb}{{{Bl{Bj}}}If}{{{Bl{Bj}}f}Id}{{fBb}Ih}{{{d{jIf}}}Ab}{{{d{jId}}}Ab}{{{d{jIh}}}Ab}{{{d{If}}Ch}{{An{f}}}}{{{d{Id}}Ch}{{An{f}}}}{{{d{Ih}}Ch}{{An{f}}}}{{dc}Fh{{Fl{Fj}}}}{{{d{jIf}}{d{Ef}}{d{f}}}Ab}{{{d{jId}}{d{Ef}}{d{f}}}Ab}{{{d{jIh}}{d{Ef}}{d{f}}}Ab}{{}Cj}{{}{{B`{Fn}}}}{{}{{B`{G`}}}}0{{}{{B`{Gb}}}}{{}{{B`{{An{Al}}}}}}0{{{d{Jb}}}Gd}{{{d{jIf}}Hn}Ab}{{{d{jId}}Hn}Ab}{{{d{jIh}}Hn}Ab}{{{d{Jb}}}{{Dl{{B`{Dd}}Dj}}}}{{dCh}Gf}{{{d{jIh}}{B`{Gf}}}{{Gh{Ab}}}}{{{d{jIh}}{B`{Ij}}}{{Gh{Ab}}}}{{{d{jIh}}{B`{Ij}}{B`{Il}}}{{Gh{Ab}}}}{{{d{jIh}}{B`{Il}}}{{Gh{Ab}}}}{{{d{jIh}}f{B`{Gf}}}{{Gh{Ab}}}}{{{d{jIh}}In}{{Gh{Ab}}}}{{{d{jIh}}InJ`}{{Gh{Ab}}}}{{{d{jIh}}J`}{{Gh{Ab}}}}{{{d{Bb}}}{{Dl{Fj}}}}{{{d{Bb}}c}{{Dl{Fj}}}Bd}9{c{{Dl{e}}}{}{}}00000{{{d{Ih}}}{{Gh{Hn}}}}{{{d{jIh}}{d{Ef}}{d{f}}}{{Gh{Ab}}}}{{{d{Ih}}{d{Ef}}{d{f}}}{{Gh{Cb}}}}{{{d{jIh}}f}{{Gh{Ab}}}}{{}{{Dl{c}}}{}}00000{{{d{Ih}}}{{Gh{Cb}}}}{{{d{jIh}}}{{Gh{Ab}}}}{{{d{Ih}}Ch}{{Gh{{An{f}}}}}}6{{{d{jIh}}Hn}{{Gh{Ab}}}}2{{}Gj}{dGl}00000{{{d{jIf}}}Ab}{{{d{jId}}}Ab}{{{d{jIh}}}Ab}{{{An{c}}{d{Bj}}}c{}}{{}c{}}00000{{{d{Id}}Fb}Id}{{{d{Ih}}Fb}Ih}`````````````````{{{d{Jf}}}{{d{f}}}}{df}{{{d{Jh}}}{{d{f}}}}1{d{{d{c}}}{}}000000000{{{d{j}}}{{d{jc}}}{}}000000000{{}Ah}00000{{{d{Jj}}}f}{{{d{Jl}}}f}{{}{{B`{{An{Al}}}}}}{{{d{Bb}}}}{{{d{Bb}}c}{}Bd}{{{d{Bb}}}Bf}{{}{{B`{Bh}}}}{{{d{Jj}}}{{d{Bb}}}}{{{d{Jn}}}{{Bl{Bj}}}}{{{d{Jl}}}{{d{Bb}}}}{{{d{K`}}{d{K`}}}Cb}{{{d{Kb}}{d{Kb}}}Cb}{{{d{Kd}}{d{Kd}}}Cb}{{}{{Cl{ChCj}}}}{{}{{B`{Cn}}}}{{{d{K`}}{d{jD`}}}Db}{{{d{Kb}}{d{jD`}}}Db}{{{d{Kd}}{d{jD`}}}Db}{cc{}}000000000{{{d{{Df{Dd}}}}}{{Dl{{Dh{K`{d{{Df{Dd}}}}}}Dj}}}}{{{d{{Df{Dd}}}}}{{Dl{{Dh{Kb{d{{Df{Dd}}}}}}Dj}}}}{{{d{{Df{Dd}}}}}{{Dl{{Dh{Kd{d{{Df{Dd}}}}}}Dj}}}}{{{d{Jj}}Dn}{{Dl{cE`}}}{EbEd}}{{{d{Jl}}Dn}{{Dl{cE`}}}{EbEd}}{{{d{jJn}}{d{Ef}}{d{f}}}Ab}{{{d{jJh}}{d{Ef}}{d{f}}}Ab}{{{d{jJl}}{d{Ef}}{d{f}}}Ab}{{{d{Jn}}{d{Ef}}{d{f}}}Cb}{{{d{Jh}}{d{Ef}}{d{f}}}Cb}{{{d{Jl}}{d{Ef}}{d{f}}}Cb}{{}Ch}0{{{d{jJf}}f}Ab}{{{d{jJj}}f}Ab}{{{d{jJn}}f}Ab}{{{d{jJh}}f}Ab}{{{d{jJl}}f}Ab}{{{d{Ej}}{d{jEl}}}Ab}00{{}c{}}00000000{KfEl}1{{}Cn}00{{{d{jJf}}Gf}Ab}{{{d{jJj}}Gf}Ab}{{{d{jJn}}Gf}Ab}{{{d{jJh}}Gf}Ab}{{{d{jJl}}Gf}Ab}{{}Cb}00{{{d{Jj}}}F`}{{{d{Jl}}}F`}{{{d{Bb}}f}}{{}Ch}00{Kff}{{{Bl{Bj}}f}Jf}{{fBb}Jj}{{Ch{An{f}}}K`}{GfKb}{fKd}{{{Bl{Bj}}}Jn}{{{Bl{Bj}}f}Jh}{{fBb}Jl}{{{d{Jf}}Ch}{{An{f}}}}{{{d{Jj}}Ch}{{An{f}}}}{{{d{Jn}}Ch}{{An{f}}}}{{{d{Jh}}Ch}{{An{f}}}}{{{d{Jl}}Ch}{{An{f}}}}{{dc}Fh{{Fl{Fj}}}}{{{d{jJn}}{d{Ef}}{d{f}}}Ab}{{{d{jJh}}{d{Ef}}{d{f}}}Ab}{{{d{jJl}}{d{Ef}}{d{f}}}Ab}{{}Cj}00{{}{{B`{Fn}}}}{{}{{B`{G`}}}}0{{}{{B`{Gb}}}}{{}{{B`{{An{Al}}}}}}000{{{d{K`}}}Gd}{{{d{Kb}}}Gd}{{{d{Kd}}}Gd}{{{d{jJf}}f}Ab}{{{d{jJj}}f}Ab}{{{d{jJn}}f}Ab}{{{d{jJh}}f}Ab}{{{d{jJl}}f}Ab}{{{d{jJf}}Ch{An{f}}}Ab}{{{d{jJj}}Ch{An{f}}}Ab}{{{d{jJn}}Ch{An{f}}}Ab}{{{d{jJh}}Ch{An{f}}}Ab}{{{d{jJl}}Ch{An{f}}}Ab}{{{d{K`}}}{{Dl{{B`{Dd}}Dj}}}}{{{d{Kb}}}{{Dl{{B`{Dd}}Dj}}}}{{{d{Kd}}}{{Dl{{B`{Dd}}Dj}}}}{{dCh}Gf}{{{d{Bb}}}{{Dl{Fj}}}}{{{d{Bb}}c}{{Dl{Fj}}}Bd}{c{{Dl{e}}}{}{}}000000000{{{d{jJl}}{d{Ef}}{d{f}}}{{Gh{Ab}}}}{{{d{Jl}}{d{Ef}}{d{f}}}{{Gh{Cb}}}}{{{d{jJj}}f}{{Gh{Ab}}}}{{{d{jJl}}f}{{Gh{Ab}}}}{{}{{Dl{c}}}{}}000000000{{{d{jJj}}Gf}{{Gh{Ab}}}}{{{d{jJl}}Gf}{{Gh{Ab}}}}{{{d{Jj}}Ch}{{Gh{{An{f}}}}}}{{{d{Jl}}Ch}{{Gh{{An{f}}}}}}865{{{d{jJj}}Ch{An{f}}}{{Gh{Ab}}}}{{{d{jJl}}Ch{An{f}}}{{Gh{Ab}}}}{{}Gj}00{dGl}000000000{{{An{c}}{d{Bj}}}c{}}00{{}c{}}000000000{{{d{Jf}}Fb}Jf}{{{d{Jj}}Fb}Jj}{{{d{Jh}}Fb}Jh}{{{d{Jl}}Fb}Jl}`````{{{d{Kh}}}{{d{f}}}}{df}{Kjf}{d{{d{c}}}{}}0000{{{d{j}}}{{d{jc}}}{}}0000{{}Ah}0{{{d{Kl}}}f}{{}{{B`{{An{Al}}}}}}{{{d{Bb}}}}{{{d{Bb}}c}{}Bd}{{{d{Bb}}}Bf}{{}{{B`{Bh}}}}{{{d{Kn}}}{{Bl{Bj}}}}{{{d{Kl}}}{{d{Bb}}}}{{{d{Kj}}{d{Kj}}}Cb}{{}{{Cl{ChCj}}}}{{}{{B`{Cn}}}}{{{d{Kj}}{d{jD`}}}Db}{cc{}}0000{{{d{{Df{Dd}}}}}{{Dl{{Dh{Kj{d{{Df{Dd}}}}}}Dj}}}}{{{d{Kl}}Dn}{{Dl{cE`}}}{EbEd}}{{{d{Kn}}{d{f}}}{{An{Ch}}}}{{{d{Kh}}{d{f}}}{{An{Ch}}}}{{{d{Kl}}{d{f}}}{{An{Ch}}}}{{}Ch}0{{{d{jKn}}f}Ab}{{{d{jKh}}f}Ab}{{{d{jKl}}f}Ab}{{{d{Ej}}{d{jEl}}}Ab}{{}c{}}00{L`El}11{{}Cn}{{}Cb}{{{d{Kl}}}F`}{{{d{Bb}}f}}:{L`f}{{{Bl{Bj}}}Kn}{{{Bl{Bj}}f}Kh}{{fBb}Kl}{{f{An{Ch}}{An{Ch}}}Kj}{KjAn}0{{dc}Fh{{Fl{Fj}}}}{{}Cj}{{}{{B`{Fn}}}}{{}{{B`{G`}}}}{{}{{B`{Gb}}}}{{}{{B`{{An{Al}}}}}}0{{{d{Kj}}}Gd}{{{d{jKn}}Ch}Ab}{{{d{jKh}}Ch}Ab}{{{d{jKl}}Ch}Ab}{{{d{Kj}}}{{Dl{{B`{Dd}}Dj}}}}{{dCh}Gf}{{{d{Bb}}}{{Dl{Fj}}}}{{{d{Bb}}c}{{Dl{Fj}}}Bd}{c{{Dl{e}}}{}{}}0000{{{d{Kl}}{d{f}}}{{Gh{{An{Ch}}}}}}{{{d{jKl}}f}{{Gh{Ab}}}}{{}{{Dl{c}}}{}}0000{{{d{jKl}}Ch}{{Gh{Ab}}}}{{}Gj}{dGl}0000{{{An{c}}{d{Bj}}}c{}}{{}c{}}0000{{{d{Kh}}Fb}Kh}{{{d{Kl}}Fb}Kl}`{{{d{Lb}}Ch}Gf}`````````````````````{{dLd}Ab}000000000{LfFb}{IlCh}{d{{d{c}}}{}}0000000000{{{d{j}}}{{d{jc}}}{}}0000000000{Lff}{{}Ah}00000000000000000{{{d{jIb}}}Ab}{{{d{Ib}}}Ib}{{{d{Lf}}}Lf}{{{d{J`}}}J`}{{{d{n}}}n}{{{d{Hb}}}Hb}{{{d{Lh}}}Lh}{{{d{Il}}}Il}{{{d{Ij}}}Ij}{{{d{Af}}}Af}{{{d{In}}}In}{{d{d{jc}}}Ab{}}000000000{{dDd}Ab}000000000{c{{Dl{Ib}}}Lj}{{{d{Ib}}{d{Ib}}}Cb}{{{d{Lf}}{d{Lf}}}Cb}{{{d{J`}}{d{J`}}}Cb}{{{d{n}}{d{n}}}Cb}{{{d{Hb}}{d{Hb}}}Cb}{{{d{Lh}}{d{Lh}}}Cb}{{{d{Il}}{d{Il}}}Cb}{{{d{Ij}}{d{Ij}}}Cb}{{{d{Af}}{d{Af}}}Cb}{{{d{In}}{d{In}}}Cb}{{}{{Cl{ChCj}}}}00000000{{}{{B`{Cn}}}}00000000{{{d{Ib}}}Hn}{{{d{Ll}}}Hn}{{{d{J`}}}Hn}{{{d{In}}}Hn}{{{d{Ln}}{d{jD`}}}Db}{{{d{Ib}}{d{jD`}}}Db}{{{d{Lf}}{d{jD`}}}Db}{{{d{J`}}{d{jD`}}}Db}{{{d{n}}{d{jD`}}}Db}{{{d{Hb}}{d{jD`}}}Db}{{{d{Lh}}{d{jD`}}}Db}{{{d{Il}}{d{jD`}}}Db}{{{d{Ij}}{d{jD`}}}Db}{{{d{Af}}{d{jD`}}}Db}{{{d{In}}{d{jD`}}}Db}{cc{}}00{nJ`}11111111{AfIn}{{{d{{Df{Dd}}}}}{{Dl{{Dh{Lf{d{{Df{Dd}}}}}}Dj}}}}{{{d{{Df{Dd}}}}}{{Dl{{Dh{J`{d{{Df{Dd}}}}}}Dj}}}}{{{d{{Df{Dd}}}}}{{Dl{{Dh{n{d{{Df{Dd}}}}}}Dj}}}}{{{d{{Df{Dd}}}}}{{Dl{{Dh{Hb{d{{Df{Dd}}}}}}Dj}}}}{{{d{{Df{Dd}}}}}{{Dl{{Dh{Lh{d{{Df{Dd}}}}}}Dj}}}}{{{d{{Df{Dd}}}}}{{Dl{{Dh{Il{d{{Df{Dd}}}}}}Dj}}}}{{{d{{Df{Dd}}}}}{{Dl{{Dh{Ij{d{{Df{Dd}}}}}}Dj}}}}{{{d{{Df{Dd}}}}}{{Dl{{Dh{Af{d{{Df{Dd}}}}}}Dj}}}}{{{d{{Df{Dd}}}}}{{Dl{{Dh{In{d{{Df{Dd}}}}}}Dj}}}}{{{d{Ej}}{d{jEl}}}Ab}00000000{{}c{}}0000000000{{}Cb}00000000{{{d{Ib}}}Ch}{LhCh}{IlCh}{J`B`}{nB`}{HbB`}{{{B`{Il}}Hn}J`}{{Fb{d{Ej}}f{B`{Il}}Hn}n}{{{d{Ej}}fHn{d{Ej}}}Il}{{GfHn}Ij}{{Fb{d{Ej}}f{B`{Ij}}Hn}Af}{{{B`{Ij}}Hn}In}{Lhf}{Ilf}{nLf}{HbLf}{AfLf}{LfCh}{{{d{Fd}}}{{d{Lf}}}}{{{d{n}}}{{d{Lf}}}}{{{d{Hb}}}{{d{Lf}}}}{{{d{Af}}}{{d{Lf}}}}{{{d{Ib}}}{{Gh{{An{f}}}}}}{{}{{B`{G`}}}}{{}{{B`{{An{Al}}}}}}00000000{{{d{Ib}}c}DlM`}{{{d{Lf}}}Gd}{{{d{J`}}}Gd}{{{d{n}}}Gd}{{{d{Hb}}}Gd}{{{d{Lh}}}Gd}{{{d{Il}}}Gd}{{{d{Ij}}}Gd}{{{d{Af}}}Gd}{{{d{In}}}Gd}{{{d{jIb}}Hn}Ab}{{{d{jIb}}f}Ab}{{{d{Lf}}}{{Dl{{B`{Dd}}Dj}}}}{{{d{J`}}}{{Dl{{B`{Dd}}Dj}}}}{{{d{n}}}{{Dl{{B`{Dd}}Dj}}}}{{{d{Hb}}}{{Dl{{B`{Dd}}Dj}}}}{{{d{Lh}}}{{Dl{{B`{Dd}}Dj}}}}{{{d{Il}}}{{Dl{{B`{Dd}}Dj}}}}{{{d{Ij}}}{{Dl{{B`{Dd}}Dj}}}}{{{d{Af}}}{{Dl{{B`{Dd}}Dj}}}}{{{d{In}}}{{Dl{{B`{Dd}}Dj}}}}{dc{}}000000000{{{d{Ib}}}{{B`{{Dh{ChCh}}}}}}{IlHn}{IjHn}{IjGf}{AfB`}{InB`}{c{{Dl{e}}}{}{}}0{{{B`{{Dh{ChCh}}}}}{{Dl{Ibc}}}{}}{Ch{{Dl{Ibc}}}{}}222222222{{}{{Dl{c}}}{}}0000000000{{}Gj}00000000{dGl}0000000000{{{An{c}}{d{Bj}}}c{}}00000000{J`Hn}{nHn}{HbHn}{AfHn}{InHn}{{}c{}}0000000000{{{d{Ej}}Hn{d{Ej}}}Ib}{{{d{Ej}}Hn{d{Ej}}f}Ib}","D":"CNn","p":[[5,"ControllerContractRef",9],[1,"reference",null,null,1],[6,"Address",1515],[5,"BaseControllerContractRef",9],[0,"mut"],[5,"Controller",9],[5,"PaymentVoucher",1174],[5,"Bytes",1516],[1,"unit"],[5,"ControllerHostRef",9,1517],[5,"RenewalPaymentVoucher",1174],[6,"CLType",1518],[5,"BaseControllerHostRef",9,1519],[6,"CustomType",1520],[6,"Option",1521,null,1],[5,"Vec",1522],[5,"HostEnv",1523],[10,"OdraConfig",1523],[5,"EntryPointsCaller",1524],[5,"Entrypoint",1525],[5,"ContractEnv",1526],[5,"Rc",1527,null,1],[5,"BaseController",9],[5,"PaymentFulfilled",9],[1,"bool"],[5,"SignerPublicKeyChanged",9],[5,"TreasuryAddressChanged",9],[5,"String",1528],[5,"Schema",1529],[5,"BTreeMap",1530],[5,"Event",1525],[5,"Formatter",1531],[8,"Result",1531],[1,"u8"],[1,"slice"],[1,"tuple",null,null,1],[6,"Error",1532],[6,"Result",1533,null,1],[1,"i32"],[6,"EventError",1534],[10,"FromBytes",1532],[10,"EventInstance",1535],[8,"Role",1536],[6,"PublicKey",1537],[1,"str"],[5,"RuntimeArgs",1538],[5,"ControllerInitArgs",9,1517],[5,"ContractCallResult",1539],[5,"U512",1540],[10,"Payment",1174],[10,"ToBytes",1532],[1,"never"],[6,"OdraError",1534],[10,"Into",1541,null,1],[5,"Entrypoint",1520],[5,"UserError",1520],[5,"Event",1520],[1,"usize"],[5,"U256",1540],[8,"OdraResult",1534],[6,"NamedCLType",1542],[5,"TypeId",1543],[5,"SecondaryMarketContractRef",311],[5,"SecondaryMarket",311],[5,"SecondarySaleVoucher",1174],[5,"SecondaryMarketHostRef",311,1544],[5,"SecondaryMarketInitArgs",311,1544],[5,"NameToken",425],[5,"NameTokenContractRef",425],[5,"NameTokenHostRef",425,1545],[1,"u64"],[5,"NameTokenInitArgs",425,1545],[5,"NameTokenMetadata",1174],[5,"RegistrarContractRef",641],[5,"Registrar",641],[5,"RegistrarHostRef",641,1546],[5,"TokenRenewalInfo",1174],[5,"NameMintInfo",1174],[5,"RenewalVoucher",1174],[5,"TokenizationVoucher",1174],[5,"GracePeriodChanged",641],[5,"RegistrarInitArgs",641,1546],[5,"ResolverContractRef",829],[5,"DefaultResolverContractRef",829],[5,"ResolverHostRef",829,1547],[5,"DefaultResolverHostRef",829,1548],[5,"DefaultResolver",829],[5,"ResolutionChanged",829],[5,"ResolutionCleared",829],[5,"NameTokenAddressChanged",829],[5,"DefaultResolverInitArgs",829,1548],[5,"ReverseResolverContractRef",1064],[5,"PrimaryNameChanged",1064],[5,"ReverseResolverHostRef",1064,1549],[5,"ReverseResolver",1064],[5,"ReverseResolverInitArgs",1064,1549],[10,"ToTokenId",1172],[5,"Private",1550],[5,"PaymentInfo",1174],[5,"NameTransferInfo",1174],[10,"Deserializer",1551],[10,"ExpirableVoucher",1174],[6,"NameTokenError",1174],[10,"Serializer",1552],[6,"ControllerError",9],[6,"NameTokenError",425],[6,"RegistrarError",641],[6,"ResolverError",829]],"r":[[11,1519],[17,1517],[18,1517],[28,1517],[30,1519],[36,1517],[37,1517],[40,1519],[47,1517],[48,1517],[51,1519],[55,1517],[58,1517],[65,1517],[66,1519],[73,1517],[74,1519],[78,1517],[80,1519],[96,1517],[97,1517],[100,1519],[105,1517],[106,1519],[109,1517],[112,1519],[115,1517],[118,1519],[120,1517],[122,1519],[125,1517],[135,1517],[136,1517],[137,1517],[140,1519],[147,1517],[150,1519],[154,1517],[155,1519],[166,1517],[169,1519],[172,1517],[175,1517],[178,1517],[181,1519],[184,1517],[189,1517],[192,1519],[213,1517],[217,1517],[219,1517],[222,1517],[229,1517],[230,1517],[231,1517],[241,1517],[242,1517],[245,1519],[247,1517],[248,1519],[249,1517],[250,1519],[251,1517],[257,1517],[258,1517],[261,1519],[263,1517],[264,1519],[265,1517],[266,1517],[267,1519],[268,1517],[269,1517],[270,1519],[271,1517],[272,1517],[273,1517],[274,1517],[283,1517],[284,1517],[287,1519],[291,1517],[301,1517],[302,1517],[305,1519],[308,1517],[310,1519],[313,1544],[314,1544],[316,1544],[319,1544],[320,1544],[323,1544],[324,1544],[327,1544],[328,1544],[332,1544],[335,1544],[340,1544],[341,1544],[342,1544],[345,1544],[348,1544],[350,1544],[353,1544],[356,1544],[357,1544],[358,1544],[361,1544],[362,1544],[364,1544],[367,1544],[370,1544],[374,1544],[381,1544],[384,1544],[385,1544],[388,1544],[390,1544],[391,1544],[396,1544],[397,1544],[398,1544],[399,1544],[400,1544],[403,1544],[404,1544],[405,1544],[406,1544],[407,1544],[408,1544],[409,1544],[410,1544],[411,1544],[414,1544],[415,1544],[418,1544],[421,1544],[422,1544],[424,1544],[432,1545],[433,1545],[439,1545],[441,1545],[444,1545],[447,1545],[450,1545],[453,1545],[456,1545],[459,1545],[462,1545],[463,1545],[467,1545],[468,1545],[472,1545],[473,1545],[477,1545],[480,1545],[485,1545],[486,1545],[490,1545],[491,1545],[494,1545],[497,1545],[499,1545],[502,1545],[505,1545],[506,1545],[507,1545],[511,1545],[514,1545],[515,1545],[517,1545],[520,1545],[523,1545],[524,1545],[527,1545],[530,1545],[533,1545],[536,1545],[540,1545],[543,1545],[546,1545],[549,1545],[557,1545],[560,1545],[563,1545],[566,1545],[567,1545],[570,1545],[574,1545],[577,1545],[580,1545],[581,1545],[582,1545],[583,1545],[584,1545],[585,1545],[586,1545],[587,1545],[588,1545],[593,1545],[594,1545],[596,1545],[597,1545],[598,1545],[599,1545],[602,1545],[603,1545],[605,1545],[606,1545],[607,1545],[608,1545],[609,1545],[610,1545],[611,1545],[612,1545],[613,1545],[614,1545],[615,1545],[616,1545],[617,1545],[618,1545],[619,1545],[620,1545],[621,1545],[622,1545],[623,1545],[624,1545],[627,1545],[628,1545],[632,1545],[633,1545],[637,1545],[639,1545],[650,1546],[651,1546],[657,1546],[660,1546],[663,1546],[666,1546],[669,1546],[672,1546],[676,1546],[677,1546],[682,1546],[683,1546],[687,1546],[690,1546],[693,1546],[696,1546],[700,1546],[703,1546],[709,1546],[714,1546],[715,1546],[718,1546],[721,1546],[724,1546],[727,1546],[729,1546],[732,1546],[737,1546],[738,1546],[739,1546],[744,1546],[746,1546],[749,1546],[753,1546],[756,1546],[759,1546],[763,1546],[774,1546],[777,1546],[778,1546],[779,1546],[780,1546],[781,1546],[782,1546],[783,1546],[784,1546],[787,1546],[791,1546],[792,1546],[794,1546],[795,1546],[796,1546],[797,1546],[801,1546],[802,1546],[804,1546],[805,1546],[806,1546],[807,1546],[808,1546],[809,1546],[814,1546],[815,1546],[819,1546],[824,1546],[825,1546],[828,1546],[831,1548],[832,1548],[843,1547],[847,1547],[849,1548],[851,1547],[857,1548],[858,1548],[861,1547],[867,1548],[868,1548],[876,1547],[877,1548],[881,1548],[883,1547],[885,1548],[895,1547],[901,1548],[902,1548],[907,1547],[908,1548],[911,1548],[914,1548],[916,1548],[918,1547],[921,1548],[926,1547],[932,1548],[933,1548],[934,1548],[940,1547],[943,1548],[947,1547],[948,1548],[953,1548],[955,1547],[961,1548],[963,1547],[966,1548],[970,1548],[986,1547],[989,1548],[991,1547],[994,1548],[1002,1547],[1008,1548],[1009,1548],[1011,1548],[1012,1548],[1013,1547],[1014,1548],[1016,1547],[1022,1548],[1023,1548],[1025,1547],[1026,1548],[1027,1547],[1028,1548],[1029,1548],[1030,1547],[1031,1548],[1032,1547],[1033,1548],[1038,1547],[1044,1548],[1045,1548],[1051,1547],[1057,1548],[1058,1548],[1061,1547],[1063,1548],[1067,1549],[1068,1549],[1070,1549],[1074,1549],[1075,1549],[1079,1549],[1080,1549],[1084,1549],[1088,1549],[1091,1549],[1098,1549],[1099,1549],[1102,1549],[1105,1549],[1107,1549],[1110,1549],[1114,1549],[1115,1549],[1116,1549],[1120,1549],[1123,1549],[1126,1549],[1140,1549],[1147,1549],[1148,1549],[1150,1549],[1151,1549],[1154,1549],[1155,1549],[1157,1549],[1161,1549],[1162,1549],[1167,1549],[1168,1549],[1171,1549]],"b":[[1446,"impl-TryFrom%3CVec%3C(String,+String)%3E%3E-for-NameTokenMetadata"],[1447,"impl-TryFrom%3CString%3E-for-NameTokenMetadata"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAPQDbgAAAAkADQABABQAAgAYAAEAHAAZADwAHwBnAAQAeAADAIAAAgCKAAAAjwACAJgACQClAAUAsAAAALoAAQDCABEA3AAAAOEABQDpAA4A/QAKABQBDQAmAREAPAEJAEkBCQBXAQAAXgEBAGYBAABrAQUAdAEAAHgBAwCCAQAAhgEBAIkBBQCSAQMAnQEDAKQBCQCwAQAAswECALkBBADHAQIAzQEWAOwBAADzAQEA+wEAAAECCAANAgMAFwIDACECAgAnAgQALwIFADgCBABAAgIATgIGAFkCBAByAhEAhQICAIoCAACNAgUAogIOALoCCQDHAgAAzgIBANkCAQDeAgAA5AIAAOYCAADqAgQA8AICAPkCAAD9AgcACAMBABIDAQAVAwUAHwMFACsDBgA1AwgAQgMCAEgDAQBLAwAATQMxAIkDBACUAwMAmwMCAKcDAACpAwQAsQMLAMADBADIAwAAzAMPAN8DAQDkAw8A+AMJAAsEHQAuBBoATgQBAFMEBQBcBAAAXwQIAGkECQB2BAgAgQQEAIcEDgCXBAQAoAQBAKYEAACoBAEArAR/AC8FAAA4BRIAVgWVAA==","P":[[31,"T"],[53,""],[71,"T"],[73,""],[91,"T"],[102,""],[105,"T"],[107,""],[130,"U"],[137,""],[138,"U"],[142,""],[174,"P"],[175,""],[185,"E"],[187,""],[234,"T"],[236,"U,T"],[247,""],[252,"U"],[263,""],[293,"T"],[296,"V"],[307,""],[317,"T"],[325,""],[331,"T"],[332,""],[338,"T"],[343,""],[354,"U"],[357,""],[358,"U"],[359,""],[371,"E"],[372,""],[393,"T"],[394,"U,T"],[398,""],[401,"U"],[405,""],[419,"V"],[423,""],[460,"T"],[470,""],[476,"T"],[477,""],[483,"T"],[488,""],[491,"T"],[492,""],[503,"U"],[506,""],[507,"U"],[509,""],[537,"E"],[538,""],[590,"T"],[591,"U,T"],[596,""],[600,"U"],[605,""],[630,"V"],[635,""],[673,"T"],[685,""],[699,"T"],[700,""],[711,"T"],[717,""],[718,"T"],[719,""],[734,"U"],[739,""],[740,"U"],[741,""],[760,"E"],[761,""],[786,"T"],[787,""],[788,"U,T"],[794,""],[798,"U"],[804,""],[820,"T"],[821,"V"],[827,""],[850,"T"],[870,""],[880,"T"],[881,""],[894,"T"],[904,""],[907,"T"],[909,""],[925,"U"],[934,""],[935,"U"],[936,""],[967,"E"],[968,""],[1000,"T"],[1001,"U,T"],[1011,""],[1015,"U"],[1025,""],[1047,"T"],[1050,"V"],[1060,""],[1072,"T"],[1082,""],[1087,"T"],[1088,""],[1096,"T"],[1101,""],[1102,"T"],[1103,""],[1112,"U"],[1115,""],[1116,"U"],[1118,""],[1130,"E"],[1131,""],[1144,"T"],[1145,"U,T"],[1150,""],[1152,"U"],[1157,""],[1164,"T"],[1165,"V"],[1170,""],[1207,"T"],[1229,""],[1259,"T"],[1269,""],[1279,"__D"],[1280,""],[1323,"T"],[1326,""],[1327,"T"],[1335,""],[1354,"U"],[1365,""],[1407,"__S"],[1408,""],[1428,"T"],[1438,""],[1444,"U,T"],[1446,"TryFrom::Error"],[1448,"U,T"],[1457,"U"],[1468,""],[1488,"T"],[1497,""],[1502,"V"],[1513,""]]}]]')); +if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; +else if (window.initSearch) window.initSearch(searchIndex); +//{"start":39,"fragment_lengths":[41732]} \ No newline at end of file diff --git a/docs/search.desc/casper_name_contracts/casper_name_contracts-desc-0-.js b/docs/search.desc/casper_name_contracts/casper_name_contracts-desc-0-.js new file mode 100644 index 0000000..d25977c --- /dev/null +++ b/docs/search.desc/casper_name_contracts/casper_name_contracts-desc-0-.js @@ -0,0 +1 @@ +searchState.loadedDescShard("casper_name_contracts", 0, "Base for all controllers. It handles access control, …\nBaseController Contract Ref.\nBaseController Host Ref.\nController smart contract. It handles payments and talks …\nController Contract Ref.\nController errors.\nController Host Ref.\nController contract constructor arguments.\nEvent with the payment information.\nEvent emitted when the signer public key is changed.\nEvent emitted when the treasury address is changed.\nPayable. Buys new name tokens.\nPayable. Buys new name tokens.\nPayable. Buys new name tokens.\nPayable. Buys new name tokens and renews existing ones.\nPayable. Buys new name tokens and renews existing ones.\nPayable. Buys new name tokens and renews existing ones.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nDelegated. See self.controller.grant_role() for details.\nDelegated. See self.controller.grant_role() for details.\nDelegated. See self.controller.grant_role() for details.\nDelegated. See self.access_control.grant_role() for …\nDelegated. See self.access_control.grant_role() for …\nDelegated. See self.access_control.grant_role() for …\nDelegated. See self.controller.has_role() for details.\nDelegated. See self.controller.has_role() for details.\nDelegated. See self.controller.has_role() for details.\nDelegated. See self.access_control.has_role() for details.\nDelegated. See self.access_control.has_role() for details.\nDelegated. See self.access_control.has_role() for details.\nInitializes the controller with the registrar contract …\nInitializes the controller with the registrar contract …\nInitializes the controller with the registrar contract …\nInitializes the controller. It assigns the deployer as the …\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nDelegated. See self.controller.is_paused() for details.\nDelegated. See self.controller.is_paused() for details.\nDelegated. See self.controller.is_paused() for details.\nDelegated. See self.pausable.is_paused() for details.\nDelegated. See self.pausable.is_paused() for details.\nDelegated. See self.pausable.is_paused() for details.\nCreates a new instance of the PaymentFulfilled event.\nCreates a new instance of the SignerPublicKeyChanged event.\nCreates a new instance of the TreasuryAddressChanged event.\nDelegated. See self.controller.pause() for details.\nDelegated. See self.controller.pause() for details.\nDelegated. See self.controller.pause() for details.\nTemporarily stops the contract.\nValidate the payment voucher and process the payment.\nPayable. Renews name tokens.\nPayable. Renews name tokens.\nPayable. Renews name tokens.\nDelegated. See self.pausable.require_not_paused() for …\nDelegated. See self.pausable.require_not_paused() for …\nDelegated. See self.pausable.require_not_paused() for …\nTry to resolve a full domain name to an address.\nTry to resolve a full domain name to an address.\nTry to resolve a full domain name to an address.\nDelegated. See self.controller.revoke_role() for details.\nDelegated. See self.controller.revoke_role() for details.\nDelegated. See self.controller.revoke_role() for details.\nDelegated. See self.access_control.revoke_role() for …\nDelegated. See self.access_control.revoke_role() for …\nDelegated. See self.access_control.revoke_role() for …\nDelegated. See self.controller.set_signer_public_key() for …\nDelegated. See self.controller.set_signer_public_key() for …\nDelegated. See self.controller.set_signer_public_key() for …\nAdmin only. Sets the public key of the signer.\nDelegated. See self.controller.set_treasury() for details.\nDelegated. See self.controller.set_treasury() for details.\nDelegated. See self.controller.set_treasury() for details.\nAdmin only. Sets the treasury address.\nDelegated. See self.controller.signer_public_key() for …\nDelegated. See self.controller.signer_public_key() for …\nDelegated. See self.controller.signer_public_key() for …\nReturns the public key of the signer.\nPayable. Buys new name tokens. Does not fail in case of …\nPayable. Buys new name tokens and renews existing ones. …\nDelegated. See self.controller.grant_role() for details. …\nDelegated. See self.access_control.grant_role() for …\nDelegated. See self.controller.has_role() for details. …\nDelegated. See self.access_control.has_role() for details. …\nInitializes the controller with the registrar contract …\nDelegated. See self.controller.is_paused() for details. …\nDelegated. See self.pausable.is_paused() for details. Does …\nDelegated. See self.controller.pause() for details. Does …\nPayable. Renews name tokens. Does not fail in case of …\nDelegated. See self.pausable.require_not_paused() for …\nTry to resolve a full domain name to an address. Does not …\nDelegated. See self.controller.revoke_role() for details. …\nDelegated. See self.access_control.revoke_role() for …\nDelegated. See self.controller.set_signer_public_key() for …\nDelegated. See self.controller.set_treasury() for details. …\nDelegated. See self.controller.signer_public_key() for …\nDelegated. See self.controller.unpause() for details. Does …\nDelegated. See self.controller.unpause() for details.\nDelegated. See self.controller.unpause() for details.\nDelegated. See self.controller.unpause() for details.\nReturns to normal operation.\nSecondary market smart contract. It handles the secondary …\nSecondaryMarket Contract Ref.\nSecondaryMarket Host Ref.\nSecondaryMarket contract constructor arguments.\nPayable. Buys name tokens from the secondary market.\nPayable. Buys name tokens from the secondary market.\nPayable. Buys name tokens from the secondary market.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nDelegated. See self.controller.grant_role() for details.\nDelegated. See self.controller.grant_role() for details.\nDelegated. See self.controller.grant_role() for details.\nDelegated. See self.controller.has_role() for details.\nDelegated. See self.controller.has_role() for details.\nDelegated. See self.controller.has_role() for details.\nInitializes the secondary market with the signer public …\nInitializes the secondary market with the signer public …\nInitializes the secondary market with the signer public …\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nDelegated. See self.controller.is_paused() for details.\nDelegated. See self.controller.is_paused() for details.\nDelegated. See self.controller.is_paused() for details.\nDelegated. See self.controller.pause() for details.\nDelegated. See self.controller.pause() for details.\nDelegated. See self.controller.pause() for details.\nDelegated. See self.controller.revoke_role() for details.\nDelegated. See self.controller.revoke_role() for details.\nDelegated. See self.controller.revoke_role() for details.\nDelegated. See self.controller.set_signer_public_key() for …\nDelegated. See self.controller.set_signer_public_key() for …\nDelegated. See self.controller.set_signer_public_key() for …\nDelegated. See self.controller.set_treasury() for details.\nDelegated. See self.controller.set_treasury() for details.\nDelegated. See self.controller.set_treasury() for details.\nDelegated. See self.controller.signer_public_key() for …\nDelegated. See self.controller.signer_public_key() for …\nDelegated. See self.controller.signer_public_key() for …\nPayable. Buys name tokens from the secondary market. Does …\nDelegated. See self.controller.grant_role() for details. …\nDelegated. See self.controller.has_role() for details. …\nInitializes the secondary market with the signer public …\nDelegated. See self.controller.is_paused() for details. …\nDelegated. See self.controller.pause() for details. Does …\nDelegated. See self.controller.revoke_role() for details. …\nDelegated. See self.controller.set_signer_public_key() for …\nDelegated. See self.controller.set_treasury() for details. …\nDelegated. See self.controller.signer_public_key() for …\nDelegated. See self.controller.unpause() for details. Does …\nDelegated. See self.controller.unpause() for details.\nDelegated. See self.controller.unpause() for details.\nDelegated. See self.controller.unpause() for details.\nNameToken contract. It is a CEP95 token with additional …\nNameToken Contract Ref.\nNameToken Host Ref.\nNameToken contract constructor arguments.\nDelegated. See self.ownable.accept_ownership() for details.\nDelegated. See self.ownable.accept_ownership() for details.\nDelegated. See self.ownable.accept_ownership() for details.\nDelegated. See self.token.approve() for details.\nDelegated. See self.token.approve() for details.\nDelegated. See self.token.approve() for details.\nDelegated. See self.token.approve_for_all() for details.\nDelegated. See self.token.approve_for_all() for details.\nDelegated. See self.token.approve_for_all() for details.\nDelegated. See self.token.approved_for() for details.\nDelegated. See self.token.approved_for() for details.\nDelegated. See self.token.approved_for() for details.\nDelegated. See self.token.balance_of() for details.\nDelegated. See self.token.balance_of() for details.\nDelegated. See self.token.balance_of() for details.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nGet the default resolver.\nGet the default resolver.\nGet the default resolver.\nDelegated. See self.ownable.get_owner() for details.\nDelegated. See self.ownable.get_owner() for details.\nDelegated. See self.ownable.get_owner() for details.\nDelegated. See self.ownable.get_pending_owner() for …\nDelegated. See self.ownable.get_pending_owner() for …\nDelegated. See self.ownable.get_pending_owner() for …\nInitializes CEP95 with the given name and symbol.\nInitializes CEP95 with the given name and symbol.\nInitializes CEP95 with the given name and symbol.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nDelegated. See self.token.is_approved_for_all() for …\nDelegated. See self.token.is_approved_for_all() for …\nDelegated. See self.token.is_approved_for_all() for …\nDelegated. See self.token.name() for details.\nDelegated. See self.token.name() for details.\nDelegated. See self.token.name() for details.\nDelegated. See self.token.owner_of() for details.\nDelegated. See self.token.owner_of() for details.\nDelegated. See self.token.owner_of() for details.\nDelegated. See self.ownable.renounce_ownership() for …\nDelegated. See self.ownable.renounce_ownership() for …\nDelegated. See self.ownable.renounce_ownership() for …\nDelegated. See self.token.revoke_approval() for details.\nDelegated. See self.token.revoke_approval() for details.\nDelegated. See self.token.revoke_approval() for details.\nDelegated. See self.token.revoke_approval_for_all() for …\nDelegated. See self.token.revoke_approval_for_all() for …\nDelegated. See self.token.revoke_approval_for_all() for …\nDelegated. See self.token.safe_transfer_from() for details.\nDelegated. See self.token.safe_transfer_from() for details.\nDelegated. See self.token.safe_transfer_from() for details.\nOnly admin. Set the default resolver.\nOnly admin. Set the default resolver.\nOnly admin. Set the default resolver.\nDelegated. See self.token.symbol() for details.\nDelegated. See self.token.symbol() for details.\nDelegated. See self.token.symbol() for details.\nDelegated. See self.token.token_metadata() for details.\nDelegated. See self.token.token_metadata() for details.\nDelegated. See self.token.token_metadata() for details.\nDelegated. See self.ownable.transfer_ownership() for …\nDelegated. See self.ownable.transfer_ownership() for …\nDelegated. See self.ownable.transfer_ownership() for …\nDelegated. See self.ownable.accept_ownership() for details.\nDoes not fail in case of error, returns odra::OdraResult …\nDelegated. See self.token.approve() for details. Does not …\nDelegated. See self.token.approve_for_all() for details. …\nDelegated. See self.token.approved_for() for details. Does …\nDoes not fail in case of error, returns odra::OdraResult …\nDelegated. See self.token.balance_of() for details. Does …\nDoes not fail in case of error, returns odra::OdraResult …\nGet the default resolver. Does not fail in case of error, …\nDelegated. See self.ownable.get_owner() for details. Does …\nDelegated. See self.ownable.get_pending_owner() for …\nInitializes CEP95 with the given name and symbol. Does not …\nDelegated. See self.token.is_approved_for_all() for …\nDoes not fail in case of error, returns odra::OdraResult …\nDoes not fail in case of error, returns odra::OdraResult …\nDelegated. See self.token.name() for details. Does not …\nDelegated. See self.token.owner_of() for details. Does not …\nDelegated. See self.ownable.renounce_ownership() for …\nDoes not fail in case of error, returns odra::OdraResult …\nDelegated. See self.token.revoke_approval() for details. …\nDelegated. See self.token.revoke_approval_for_all() for …\nDoes not fail in case of error, returns odra::OdraResult …\nDelegated. See self.token.safe_transfer_from() for details.\nOnly admin. Set the default resolver. Does not fail in …\nDoes not fail in case of error, returns odra::OdraResult …\nDoes not fail in case of error, returns odra::OdraResult …\nDelegated. See self.token.symbol() for details. Does not …\nDoes not fail in case of error, returns odra::OdraResult …\nDelegated. See self.token.token_metadata() for details. …\nDoes not fail in case of error, returns odra::OdraResult …\nDelegated. See self.ownable.transfer_ownership() for …\nDoes not fail in case of error, returns odra::OdraResult …\nEvent emitted when the grace period is changed.\nRegistrar smart contract. It handles the registration and …\nRegistrar Contract Ref.\nRegistrar Host Ref.\nRegistrar contract constructor arguments.\nAdmin only. Burn a list of tokens.\nAdmin only. Burn a list of tokens.\nAdmin only. Burn a list of tokens.\nAdmin only. Prolong the expiration date of a list of …\nAdmin only. Prolong the expiration date of a list of …\nAdmin only. Prolong the expiration date of a list of …\nAdmin only. Prolong the expiration date of a list of …\nAdmin only. Prolong the expiration date of a list of …\nAdmin only. Prolong the expiration date of a list of …\nAdmin only. Register a list of tokens.\nAdmin only. Register a list of tokens.\nAdmin only. Register a list of tokens.\nAdmin only. Transfer ownership of a list of tokens.\nAdmin only. Transfer ownership of a list of tokens.\nAdmin only. Transfer ownership of a list of tokens.\nController only. Prolong the expiration date of a list of …\nController only. Prolong the expiration date of a list of …\nController only. Prolong the expiration date of a list of …\nController only. Prolong the expiration date of a list of …\nController only. Prolong the expiration date of a list of …\nController only. Prolong the expiration date of a list of …\nController only. Register a list of tokens.\nController only. Register a list of tokens.\nController only. Register a list of tokens.\nExpire a list of tokens if they are expired.\nExpire a list of tokens if they are expired.\nExpire a list of tokens if they are expired.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the grace period.\nReturns the grace period.\nReturns the grace period.\nDelegated. See self.access_control.grant_role() for …\nDelegated. See self.access_control.grant_role() for …\nDelegated. See self.access_control.grant_role() for …\nDelegated. See self.access_control.has_role() for details.\nDelegated. See self.access_control.has_role() for details.\nDelegated. See self.access_control.has_role() for details.\nInitializes the registrar with the name token contract …\nInitializes the registrar with the name token contract …\nInitializes the registrar with the name token contract …\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nDelegated. See self.pauseable.is_paused() for details.\nDelegated. See self.pauseable.is_paused() for details.\nDelegated. See self.pauseable.is_paused() for details.\nCreates a new instance of the GracePeriodChanged event.\nTemporarily stops the contract.\nTemporarily stops the contract.\nTemporarily stops the contract.\nTry to resolve a full domain name to an address.\nTry to resolve a full domain name to an address.\nTry to resolve a full domain name to an address.\nDelegated. See self.access_control.revoke_role() for …\nDelegated. See self.access_control.revoke_role() for …\nDelegated. See self.access_control.revoke_role() for …\nAdmin only. Sets the grace period.\nAdmin only. Sets the grace period.\nAdmin only. Sets the grace period.\nAdmin only. Burn a list of tokens. Does not fail in case …\nAdmin only. Prolong the expiration date of a list of …\nAdmin only. Prolong the expiration date of a list of …\nAdmin only. Register a list of tokens. Does not fail in …\nAdmin only. Transfer ownership of a list of tokens. Does …\nController only. Prolong the expiration date of a list of …\nController only. Prolong the expiration date of a list of …\nController only. Register a list of tokens. Does not fail …\nExpire a list of tokens if they are expired. Does not fail …\nReturns the grace period. Does not fail in case of error, …\nDelegated. See self.access_control.grant_role() for …\nDelegated. See self.access_control.has_role() for details. …\nInitializes the registrar with the name token contract …\nDelegated. See self.pauseable.is_paused() for details. …\nTemporarily stops the contract. Does not fail in case of …\nTry to resolve a full domain name to an address. Does not …\nDelegated. See self.access_control.revoke_role() for …\nAdmin only. Sets the grace period. Does not fail in case …\nReturns to normal operation. Does not fail in case of …\nReturns to normal operation.\nReturns to normal operation.\nReturns to normal operation.\nDefault Resolver smart contract. It handles the resolution …\nDefaultResolver Contract Ref.\nDefaultResolver Host Ref.\nDefaultResolver contract constructor arguments.\nEvent emitted when the name token address is changed.\nEvent emitted when a resolution is changed.\nEvent emitted when a resolution is cleared.\n[Resolver] Contract Ref.\n[Resolver] Host Ref.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nDelegated. See self.access_control.grant_role() for …\nDelegated. See self.access_control.grant_role() for …\nDelegated. See self.access_control.grant_role() for …\nDelegated. See self.access_control.has_role() for details.\nDelegated. See self.access_control.has_role() for details.\nDelegated. See self.access_control.has_role() for details.\nInitializes the default resolver with the name token …\nInitializes the default resolver with the name token …\nInitializes the default resolver with the name token …\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nInvalidates all the resolutions for a token. Only the …\nInvalidates all the resolutions for a token. Only the …\nInvalidates all the resolutions for a token. Only the …\nCreates a new instance of the ResolutionChanged event.\nCreates a new instance of the ResolutionCleared event.\nCreates a new instance of the NameTokenAddressChanged …\nResolves a domain to an address.\nResolves a domain to an address.\nResolves a domain to an address.\nDelegated. See self.access_control.revoke_role() for …\nDelegated. See self.access_control.revoke_role() for …\nDelegated. See self.access_control.revoke_role() for …\nAdmin only. Sets the name token contract address.\nAdmin only. Sets the name token contract address.\nAdmin only. Sets the name token contract address.\nToken owner only. Sets the resolution for a domain to an …\nToken owner only. Sets the resolution for a domain to an …\nToken owner only. Sets the resolution for a domain to an …\nDelegated. See self.access_control.grant_role() for …\nDelegated. See self.access_control.has_role() for details. …\nDoes not fail in case of error, returns odra::OdraResult …\nInitializes the default resolver with the name token …\nDoes not fail in case of error, returns odra::OdraResult …\nInvalidates all the resolutions for a token. Only the …\nDoes not fail in case of error, returns odra::OdraResult …\nResolves a domain to an address. Does not fail in case of …\nDelegated. See self.access_control.revoke_role() for …\nDoes not fail in case of error, returns odra::OdraResult …\nAdmin only. Sets the name token contract address. Does not …\nDoes not fail in case of error, returns odra::OdraResult …\nToken owner only. Sets the resolution for a domain to an …\nEvent emitted when the primary name of an address changes.\nReverse Resolver contract. It resolves primary names to …\nReverseResolver Contract Ref.\nReverseResolver Host Ref.\nReverseResolver contract constructor arguments.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the primary name for the address.\nReturns the primary name for the address.\nReturns the primary name for the address.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCreates a new instance of the PrimaryNameChanged event.\nSets the primary preferred reverse resolution address for …\nSets the primary preferred reverse resolution address for …\nSets the primary preferred reverse resolution address for …\nReturns the primary name for the address. Does not fail in …\nDoes not fail in case of error, returns odra::OdraResult …\nSets the primary preferred reverse resolution address for …\nConverts the label to a token ID.\nBasic minting information for a name token.\nErrors that can occur while working with name tokens.\nMetadata associated with a name token.\nPair of a label and owner address.\nInformation about a payment.\nInformation about a payment and a list of NameMintInfo …\nVoucher for renewing multiple name tokens, plus payment …\nVoucher for renewing multiple name tokens.\nInformation about a payment and a list of NameTransferInfo …\nRenewal information with new expiration time.\nList of NameMintInfo structs and the expiration time of …\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).") \ No newline at end of file diff --git a/docs/sequence-diagrams/Admin functions.md b/docs/sequence-diagrams/Admin functions.md new file mode 100644 index 0000000..d735fb8 --- /dev/null +++ b/docs/sequence-diagrams/Admin functions.md @@ -0,0 +1,102 @@ +# Admin functions + +## NameToken admin functions + +### Whitelist registrar contract + +> As the NameToken contract admin, I should be able to whitelist a Registrar contract, so that it can mint new *cspr name +> tokens in the registry. +> +![](puml/whitelist-registrar.png) +[🔗](puml/whitelist-registrar.puml) + +_used also to delist a registrar_ + +### Set Default Resolver address + +> As the NameToken contract admin, I should be able to update the default resolver contract address. + +![](puml/set-default-resolver.png) +[🔗](puml/set-default-resolver.puml) + +## Registrar admin functions + +### Whitelist a controller contract or admin address + +> As a Registrar admin, I should be able to whitelist a controller contract or admin account address, +> so that they can mint and renew cspr name tokens, and call admin contract methods. + +![](puml/whitelist-controller.png) +[🔗](puml/whitelist-controller.puml) + +### Revoke a controller contract or admin address + +> As a Registrar admin, I should be able to revoke a controller contract or admin account address. + +![](puml/revoke-controller.png) +[🔗](puml/revoke-controller.puml) + +### Set grace period time span + +> As a registrar admin, I should be able to set the duration of the grace period. + +![](puml/set-grace-period.png) +[🔗](puml/set-grace-period.puml) + +### Expire domains + +> As the registrar contract, I should burn expired tokens in batches upon request. + +![](puml/expire-domain.png) +[🔗](puml/expire-domain.puml) + + +### Transfer domains + +> As a D3 admin, I should be able to transfer a batch of cspr name tokens. + +![](puml/admin-transfer-domain.png) +[🔗](puml/admin-transfer-domain.puml) + +### Burn domains + +> As a D3 admin, I should be able to burn a batch of cspr name tokens. + +![](puml/burn-domain.png) +[🔗](puml/burn-domain.puml) + +## Controller admin functions + +### Set voucher signer key + +> As a Controller contract owner, I should be able to set the public key used to verify +> the voucher signatures + +![](puml/set-signer.png) +[🔗](puml/set-signer.puml) + +### Set treasury account + +> As a Controller contract owner, I should be able to set the treasury account hash where payments +> send the paid amounts to + +![](puml/set-treasury-account.png) +[🔗](puml/set-treasury-account.puml) + +## D3 operator admin functions + +### Set voucher signer key + +> As a D3 operator contract owner, I should be able to set the public key used to verify +> the voucher signatures + +![](puml/d3operator-set-signer.png) +[🔗](puml/d3operator-set-signer.puml) + +### Set treasury account + +> As a D3 operator contract owner, I should be able to set the treasury account hash where payments +> send the paid amounts to + +![](puml/d3operator-set-treasury-account.png) +[🔗](puml/d3operator-set-treasury-account.puml) diff --git a/docs/sequence-diagrams/Buy a cspr name.md b/docs/sequence-diagrams/Buy a cspr name.md new file mode 100644 index 0000000..bb79ed6 --- /dev/null +++ b/docs/sequence-diagrams/Buy a cspr name.md @@ -0,0 +1,15 @@ +# Buy a *cspr name + +## Buy with fiat currency + +> As a user, I must be able to buy multiple *cspr name with a fiat currency in one transaction on D3 web application + +![](puml/offchain-multiple-purchase.png) +[🔗](puml/offchain-multiple-purchase.puml) + +## Buy with CSPR token + +> As a user, I must be able to buy multiple *cspr names with CSPR token in one transaction on D3 web application + +![](puml/onchain-multiple-purchase.png) +[🔗](puml/onchain-multiple-purchase.puml) diff --git a/docs/sequence-diagrams/Buy and Renew a cspr name.md b/docs/sequence-diagrams/Buy and Renew a cspr name.md new file mode 100644 index 0000000..812f0df --- /dev/null +++ b/docs/sequence-diagrams/Buy and Renew a cspr name.md @@ -0,0 +1,17 @@ +# Buy and Renew a *cspr name + +## Buy and Renew with fiat currency + +> As a user, I must be able to buy multiple *cspr names and renew other multiple *cspr names with a fiat currency +> in one transaction on D3 web application + +![](puml/offchain-multiple-purchase-prolong.png) +[🔗](puml/offchain-multiple-purchase-prolong.puml) + +## Buy with CSPR token + +> As a user, I must be able to buy multiple *cspr names and renew other multiple *cspr names with CSPR token +> in one transaction on D3 web application + +![](puml/onchain-multiple-purchase-prolong.png) +[🔗](puml/onchain-multiple-purchase-prolong.puml) diff --git a/docs/sequence-diagrams/README.md b/docs/sequence-diagrams/README.md new file mode 100644 index 0000000..df0d7d2 --- /dev/null +++ b/docs/sequence-diagrams/README.md @@ -0,0 +1,11 @@ +# Sequence diagrams + +## Index + +* [Buy a *cspr name](./Buy%20a%20cspr%20name.md) +* [Renew a *cspr name](./Renew%20a%20cspr%20name.md) +* [Buy and renew *cspr names](./Buy%20and%20Renew%20a%20cspr%20name.md) +* [Resolution](./Resolution.md) +* [Secondary sale market](./Secondary-sale%20market.md) +* [Admin functions](./Admin%20functions.md) + diff --git a/docs/sequence-diagrams/Renew a cspr name.md b/docs/sequence-diagrams/Renew a cspr name.md new file mode 100644 index 0000000..33ef8a0 --- /dev/null +++ b/docs/sequence-diagrams/Renew a cspr name.md @@ -0,0 +1,16 @@ +# Renew a domain + +## Renew with fiat currency + +> As a domain owner, I should be able to renew multiple *cspr name tokens with a fiat payment, so that the expiration date is extended. + +![](puml/offchain-renewal.png) +[🔗](puml/offchain-renewal.puml) + +## Renew with CSPR token + +> As a domain owner, I should be able to renew multiple *cspr name tokens with a CSPR token payment, so that the expiration date is extended. + +![](puml/onchain-renewal.png) +[🔗](puml/onchain-renewal.puml) + diff --git a/docs/sequence-diagrams/Resolution.md b/docs/sequence-diagrams/Resolution.md new file mode 100644 index 0000000..73f6017 --- /dev/null +++ b/docs/sequence-diagrams/Resolution.md @@ -0,0 +1,42 @@ +# Resolution + +## Set a resolver + +> As a *cspr name token owner, I must be able to set a resolver contract address for my name token. + +![](puml/set-resolver.png) +[🔗](puml/set-resolver.puml) + +## Set account address record + +> As a *cspr name token owner, I must be able to set a record that resolves my domain or subdomain to an account address. + +![](puml/set-account-address-record.png) +[🔗](puml/set-account-address-record.puml) + +## Clean up name token + +> As an admin or a *cspr name token owner, I must be able to clean up all records resolving addresses for the name token. + +![](puml/clean-up-records.png) +[🔗](puml/clean-up-records.puml) + + +## Resolve name + +> As a external contract, I should be able to resolve the account address for a name. + +![](puml/onchain-name-resolution.png) +[🔗](puml/onchain-name-resolution.puml) + +This logic is offered by the registrar's `resolve()` entry point: + +![](puml/onchain-name-resolution-wrapped.png) +[🔗](puml/onchain-name-resolution-wrapped.puml) + +## Resolve name using RPC + +> As a user, I can call a Resolution API to resolve the account address for a name. + +![](puml/resolve-name.png) +[🔗](puml/resolve-name.puml) diff --git a/docs/sequence-diagrams/Secondary-sale market.md b/docs/sequence-diagrams/Secondary-sale market.md new file mode 100644 index 0000000..1c2be2d --- /dev/null +++ b/docs/sequence-diagrams/Secondary-sale market.md @@ -0,0 +1,64 @@ +# Secondary-sale market + +## can_transfer filter + +> As the transfer filter contract for the NameToken, I should verify token expiration date, +> so that a name token can not be transferred during the renewal grace period. + +_The transfer filter contract functionality can be added to the Registrar or to another contract._ + +![](puml/transfer-filter-contract.png) +[🔗](puml/transfer-filter-contract.puml) + +## D3 Marketplace + +_These flows are valid also for CSPR.market and other marketplaces._ + +### List a *cspr name in the D3 Marketplace + +> As a *cspr name owner, I should be able to list my token in the D3 marketplace + +![](puml/d3-marketplace-list.png) +[🔗](puml/d3-marketplace-list.puml) + +### Buy a *cspr name from D3 Marketplace with CSPR token payment + +> As a user, I should be able to buy one or more *cspr name listed in the D3 marketplace with a CSPR token payment + +![](puml/d3-marketplace-buy-cspr-token.png) +[🔗](puml/d3-marketplace-buy-cspr-token.puml) + +## Private actions + +### Approve / revoke an operator + +> As a *cspr name owner, I should be able to approve an operator, so that it can transfer the token on my behalf + +> As a *cspr name owner, I should be able to revoke the operator's permission + +![](puml/approve-revoke-operator.png) +[🔗](puml/approve-revoke-operator.puml) + +### Approve for all + +> As an owner of one or more *cspr names, I should be able to approve an operator, so that it can transfer any of my tokens on my behalf + +> As an owner of one or more *cspr names, I should be able to revoke the operator's permission + +![](puml/approve-for-all.png) +[🔗](puml/approve-for-all.puml) + +### Transfer + +> As a *cspr name owner, I should be able to transfer the ownership of the token to another account + +![](puml/transfer-domain.png) +[🔗](puml/transfer-domain.puml) + +### Transfer from operator + +> As a token operator, I should be able to transfer the ownership of the token to another account + +![](puml/transfer-from-domain.png) +[🔗](puml/transfer-from-domain.puml) + diff --git a/docs/sequence-diagrams/puml/admin-transfer-domain.png b/docs/sequence-diagrams/puml/admin-transfer-domain.png new file mode 100644 index 0000000..2c7f577 Binary files /dev/null and b/docs/sequence-diagrams/puml/admin-transfer-domain.png differ diff --git a/docs/sequence-diagrams/puml/admin-transfer-domain.puml b/docs/sequence-diagrams/puml/admin-transfer-domain.puml new file mode 100644 index 0000000..524c9ad --- /dev/null +++ b/docs/sequence-diagrams/puml/admin-transfer-domain.puml @@ -0,0 +1,41 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor "D3 admin" +participant "Registrar" +participant "NameToken" +participant "Resolver" +boundary "Events" + +== [Admin] Transfer a domain == + +"D3 admin" -> "Registrar": admin_transfer(new_owner, name_hashes[]) +activate Registrar +loop N times + Registrar -> NameToken: admin_transfer(new_oner, name_hash) + activate NameToken + NameToken -> NameToken: check expiration date + alt expiration < blocktime + NameToken ->X "D3 admin": Revert with cannot_transfer error + end + alt Resolver is default resolver + NameToken -> Resolver: cleanup(name_hash) + Resolver -> NameToken: + else + NameToken -> NameToken : set default resolver + NameToken -> "Events": MetadataUpdated event + end + NameToken -> NameToken: clear operator + NameToken -> NameToken : set new owner + NameToken -> Resolver: cleanup(name_hash) + Resolver -> NameToken: + NameToken -> "Events": Transfer event + NameToken -> Registrar + deactivate NameToken +end +deactivate NameToken +Registrar -> "D3 admin" +deactivate Registrar + +@enduml diff --git a/docs/sequence-diagrams/puml/approve-for-all.png b/docs/sequence-diagrams/puml/approve-for-all.png new file mode 100644 index 0000000..47ef04d Binary files /dev/null and b/docs/sequence-diagrams/puml/approve-for-all.png differ diff --git a/docs/sequence-diagrams/puml/approve-for-all.puml b/docs/sequence-diagrams/puml/approve-for-all.puml new file mode 100644 index 0000000..75587d2 --- /dev/null +++ b/docs/sequence-diagrams/puml/approve-for-all.puml @@ -0,0 +1,29 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor Owner +participant "NameToken" +boundary "Events" + +== Approve operator for all tokens owned by caller == + +Owner -> NameToken: set_approval_for_all(true, operator) +activate NameToken +NameToken -> NameToken: set owner operator +NameToken -> "Events": ApprovalForAll event +NameToken -> Owner +deactivate NameToken + +== Revoke approval for all == + +Owner -> NameToken: set_approval_for_all(false, operator) +activate NameToken +NameToken -> NameToken: clear owner operator +NameToken -> "Events": RevokedForAll event +NameToken -> Owner +deactivate NameToken + +== == + +@enduml diff --git a/docs/sequence-diagrams/puml/approve-revoke-operator.png b/docs/sequence-diagrams/puml/approve-revoke-operator.png new file mode 100644 index 0000000..f215275 Binary files /dev/null and b/docs/sequence-diagrams/puml/approve-revoke-operator.png differ diff --git a/docs/sequence-diagrams/puml/approve-revoke-operator.puml b/docs/sequence-diagrams/puml/approve-revoke-operator.puml new file mode 100644 index 0000000..74b59e0 --- /dev/null +++ b/docs/sequence-diagrams/puml/approve-revoke-operator.puml @@ -0,0 +1,29 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor Owner +participant "NameToken" +boundary "Events" + +== Approve operator (marketplace) == + +Owner -> NameToken: approve(name_hash, operator) +activate NameToken +NameToken -> NameToken: set token operator +NameToken -> "Events": Approval event +NameToken -> Owner +deactivate NameToken + +== Revoke approval == + +Owner -> NameToken: revoke(name_hash, operator) +activate NameToken +NameToken -> NameToken: clear token operator +NameToken -> "Events": ApprovalRevoked event +NameToken -> Owner +deactivate NameToken + +== == + +@enduml diff --git a/docs/sequence-diagrams/puml/burn-domain.png b/docs/sequence-diagrams/puml/burn-domain.png new file mode 100644 index 0000000..4042e20 Binary files /dev/null and b/docs/sequence-diagrams/puml/burn-domain.png differ diff --git a/docs/sequence-diagrams/puml/burn-domain.puml b/docs/sequence-diagrams/puml/burn-domain.puml new file mode 100644 index 0000000..a127d4d --- /dev/null +++ b/docs/sequence-diagrams/puml/burn-domain.puml @@ -0,0 +1,33 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor "D3 admin" +participant "Registrar" +participant "NameToken" +participant "Resolver" +boundary "Events" + +== [Admin] Burn a domain == + +"D3 admin" -> "Registrar": admin_burn(name_hashes[]) +activate Registrar +loop N times + deactivate NameToken + Registrar -> NameToken: burn(name_hash) + activate NameToken + group Resolver is default resolver + NameToken -> Resolver: cleanup(name_hash) + Resolver -> NameToken: + end + NameToken -> NameToken: clear resolver address + NameToken -> "Events": MetadataUpdated event + NameToken -> NameToken: burn token + NameToken -> "Events": Burn event + NameToken -> Registrar + deactivate NameToken +end +Registrar -> "D3 admin" +deactivate Registrar + +@enduml diff --git a/docs/sequence-diagrams/puml/clean-up-records.png b/docs/sequence-diagrams/puml/clean-up-records.png new file mode 100644 index 0000000..a03963d Binary files /dev/null and b/docs/sequence-diagrams/puml/clean-up-records.png differ diff --git a/docs/sequence-diagrams/puml/clean-up-records.puml b/docs/sequence-diagrams/puml/clean-up-records.puml new file mode 100644 index 0000000..e3a8b1d --- /dev/null +++ b/docs/sequence-diagrams/puml/clean-up-records.puml @@ -0,0 +1,25 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor "Domain owner/\nAdmin" +participant "Resolver" +participant "NameToken" +boundary "Events" + +== Set account address record == + +"Domain owner/\nAdmin" -> Resolver: clean_up(token_name) +activate Resolver +Resolver -> NameToken: owner_of(name_hash) +NameToken -> Resolver: owner address +group caller == owner || is_admin(caller) + Resolver -> Resolver: clean up records + Resolver -> Events: ResolutionCleared event +end +Resolver -> "Domain owner/\nAdmin" +deactivate Resolver + +== == + +@enduml diff --git a/docs/sequence-diagrams/puml/d3-marketplace-buy-cspr-token.png b/docs/sequence-diagrams/puml/d3-marketplace-buy-cspr-token.png new file mode 100644 index 0000000..71dc873 Binary files /dev/null and b/docs/sequence-diagrams/puml/d3-marketplace-buy-cspr-token.png differ diff --git a/docs/sequence-diagrams/puml/d3-marketplace-buy-cspr-token.puml b/docs/sequence-diagrams/puml/d3-marketplace-buy-cspr-token.puml new file mode 100644 index 0000000..1c44c8e --- /dev/null +++ b/docs/sequence-diagrams/puml/d3-marketplace-buy-cspr-token.puml @@ -0,0 +1,53 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor User +participant "d3.app" as d3 #lightblue +participant "D3 Operator" as d3Op +participant "NameToken" +participant "Registrar" +participant "Resolver" +boundary "Events" + +== Buy *cspr names from D3 Marketplace with CSPR payment == + +User -> d3: Buy *cspr name +activate d3 +d3 -> User: signed SecondarySaleVoucher +deactivate d3 + +User -> d3Op: secondarySale(SecondarySaleVoucher, sig) +activate d3Op +d3Op -> d3Op: verify voucher expiration +d3Op -> d3Op: verify voucher signature +d3Op -> d3Op: process CSPR payment +d3Op -> "Events": Payment event +loop N times + d3Op -> NameToken: transfer(seller, buyer, name_hash) + activate NameToken + NameToken -> NameToken: check expiration date + alt expiration < blocktime + NameToken ->X d3Op: Revert with cannot_transfer error + end + alt Resolver is default resolver + NameToken -> Resolver: cleanup(name_hash) + Resolver -> NameToken: + else + NameToken -> NameToken : set default resolver + NameToken -> "Events": MetadataUpdated event + end + NameToken -> NameToken: clear operator + NameToken -> NameToken : set new owner + NameToken -> Resolver: cleanup(name_hash) + Resolver -> NameToken: + NameToken -> "Events": Transfer event + NameToken -> d3Op + deactivate NameToken +end +d3Op -> User +deactivate d3 + +== == + +@enduml diff --git a/docs/sequence-diagrams/puml/d3-marketplace-list.png b/docs/sequence-diagrams/puml/d3-marketplace-list.png new file mode 100644 index 0000000..07b2de4 Binary files /dev/null and b/docs/sequence-diagrams/puml/d3-marketplace-list.png differ diff --git a/docs/sequence-diagrams/puml/d3-marketplace-list.puml b/docs/sequence-diagrams/puml/d3-marketplace-list.puml new file mode 100644 index 0000000..0417ab7 --- /dev/null +++ b/docs/sequence-diagrams/puml/d3-marketplace-list.puml @@ -0,0 +1,29 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor Owner +participant "d3.app" as d3 #lightblue +participant "NameToken" +boundary "Events" + +== List a *cspr name on D3 Marketplace == + +Owner -> d3: list *cspr name +activate d3 +d3 -> NameToken: is_approved_for_all(owner, d3operator_package_hash) +NameToken -> d3 +alt Not approved + Owner -> NameToken: set_approval_for_all(owner, d3operator_package_hash) + activate "NameToken" + NameToken -> NameToken: set token operator + NameToken -> "Events": ApprovalForAll event + NameToken -> Owner + deactivate "NameToken" +end +d3 -> d3: list *cspr name +d3 -> Owner +deactivate d3 +== == + +@enduml diff --git a/docs/sequence-diagrams/puml/d3operator-set-signer.png b/docs/sequence-diagrams/puml/d3operator-set-signer.png new file mode 100644 index 0000000..c2addfc Binary files /dev/null and b/docs/sequence-diagrams/puml/d3operator-set-signer.png differ diff --git a/docs/sequence-diagrams/puml/d3operator-set-signer.puml b/docs/sequence-diagrams/puml/d3operator-set-signer.puml new file mode 100644 index 0000000..6959f83 --- /dev/null +++ b/docs/sequence-diagrams/puml/d3operator-set-signer.puml @@ -0,0 +1,18 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor "Contract owner" +participant "D3 operator" as d3op + +== Set voucher signer == + +"Contract owner" -> d3op: set_signer(public_key) +activate d3op +d3op -> d3op: set signer key +"d3op" -> "Contract owner" +deactivate d3op + +== == + +@enduml diff --git a/docs/sequence-diagrams/puml/d3operator-set-treasury-account.png b/docs/sequence-diagrams/puml/d3operator-set-treasury-account.png new file mode 100644 index 0000000..8d9652d Binary files /dev/null and b/docs/sequence-diagrams/puml/d3operator-set-treasury-account.png differ diff --git a/docs/sequence-diagrams/puml/d3operator-set-treasury-account.puml b/docs/sequence-diagrams/puml/d3operator-set-treasury-account.puml new file mode 100644 index 0000000..39ec470 --- /dev/null +++ b/docs/sequence-diagrams/puml/d3operator-set-treasury-account.puml @@ -0,0 +1,18 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor "Contract owner" +participant "D3 operator" as d3op + +== Set treasury account == + +"Contract owner" -> d3op: set_treasury(account_hash) +activate d3op +d3op -> d3op: set treasury account +"d3op" -> "Contract owner" +deactivate d3op + +== == + +@enduml diff --git a/docs/sequence-diagrams/puml/expire-domain.png b/docs/sequence-diagrams/puml/expire-domain.png new file mode 100644 index 0000000..6d36991 Binary files /dev/null and b/docs/sequence-diagrams/puml/expire-domain.png differ diff --git a/docs/sequence-diagrams/puml/expire-domain.puml b/docs/sequence-diagrams/puml/expire-domain.puml new file mode 100644 index 0000000..90e5289 --- /dev/null +++ b/docs/sequence-diagrams/puml/expire-domain.puml @@ -0,0 +1,37 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor "Anyone" +participant "Registrar" +participant "NameToken" +participant "Resolver" +boundary "Events" + +== Expire a domain == + +"Anyone" -> "Registrar": expire(name_hashes[]) +activate Registrar +loop N times + Registrar -> NameToken: metadata(name_hash) + NameToken -> Registrar + Registrar -> Registrar: check expiry date + group expiration + grace_period + pending_delete_period < blocktime + Registrar -> NameToken: burn(name_hash) + activate NameToken + group Resolver is default resolver + NameToken -> Resolver: cleanup(name_hash) + Resolver -> NameToken: + end + NameToken -> NameToken: clear resolver address + NameToken -> "Events": MetadataUpdated event + NameToken -> NameToken: burn token + NameToken -> "Events": Burn event + NameToken -> Registrar + deactivate NameToken + end +end + +Registrar -> "Anyone" + +@enduml diff --git a/docs/sequence-diagrams/puml/lookup-account-name.png b/docs/sequence-diagrams/puml/lookup-account-name.png new file mode 100644 index 0000000..0c21efd Binary files /dev/null and b/docs/sequence-diagrams/puml/lookup-account-name.png differ diff --git a/docs/sequence-diagrams/puml/lookup-account-name.puml b/docs/sequence-diagrams/puml/lookup-account-name.puml new file mode 100644 index 0000000..49b66cb --- /dev/null +++ b/docs/sequence-diagrams/puml/lookup-account-name.puml @@ -0,0 +1,15 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor Anyone +participant "Reverse Resolver" + +== Lookup account name == + +Anyone -> "Reverse Resolver": name() +activate "Reverse Resolver" +"Reverse Resolver" -> Anyone +deactivate "Reverse Resolver" + +@enduml diff --git a/docs/sequence-diagrams/puml/offchain-multiple-purchase-prolong.png b/docs/sequence-diagrams/puml/offchain-multiple-purchase-prolong.png new file mode 100644 index 0000000..eda174e Binary files /dev/null and b/docs/sequence-diagrams/puml/offchain-multiple-purchase-prolong.png differ diff --git a/docs/sequence-diagrams/puml/offchain-multiple-purchase-prolong.puml b/docs/sequence-diagrams/puml/offchain-multiple-purchase-prolong.puml new file mode 100644 index 0000000..c9152c4 --- /dev/null +++ b/docs/sequence-diagrams/puml/offchain-multiple-purchase-prolong.puml @@ -0,0 +1,32 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor User +participant "d3.app" as d3 #lightblue +participant "Registrar" +participant "NameToken" +boundary "Events" + +== Buy and renew multiple *cspr names with fiat currency == + +User -> d3: Renew N *cspr names\nand buy M *cspr names +activate d3 +d3 -> d3: process fiat payment +d3 -> User +deactivate d3 + +d3 -> Registrar: admin_prolong_and_register(Vec, Vec) +activate Registrar + loop N times + note over Registrar: Same flow as for admin_prolong(). + end loop + loop M times + note over Registrar: Same flow as for admin_register(). + end loop +Registrar -> d3 + +deactivate Registrar +deactivate d3 + +@enduml diff --git a/docs/sequence-diagrams/puml/offchain-multiple-purchase.png b/docs/sequence-diagrams/puml/offchain-multiple-purchase.png new file mode 100644 index 0000000..42ade19 Binary files /dev/null and b/docs/sequence-diagrams/puml/offchain-multiple-purchase.png differ diff --git a/docs/sequence-diagrams/puml/offchain-multiple-purchase.puml b/docs/sequence-diagrams/puml/offchain-multiple-purchase.puml new file mode 100644 index 0000000..7a92226 --- /dev/null +++ b/docs/sequence-diagrams/puml/offchain-multiple-purchase.puml @@ -0,0 +1,47 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor User +participant "d3.app" as d3 #lightblue +participant "Registrar" +participant "NameToken" +boundary "Events" + +== Buy multiple (N) *cspr names with fiat currency == + +User -> d3: Buy N *cspr names +activate d3 +d3 -> d3: process fiat payment +d3 -> User +deactivate d3 + +d3 -> Registrar: admin_register(Vec) +activate Registrar + loop N times + Registrar -> NameToken: metadata(name_hash) + NameToken -> Registrar + alt Token exists + Registrar -> Registrar: check expiration date + alt expiration+grace_period+pending_delete_period < blocktime + Registrar -> NameToken: burn(name_hash) + NameToken -> NameToken: clear resolver address + NameToken -> "Events": MetadataUpdated event + NameToken -> NameToken: burn token + NameToken -> "Events": Burn event + else expiration+grace_period+pending_delete_period > blocktime + Registrar ->x d3: Revert with\nnot expired token error + end + end + Registrar -> NameToken: mint(buyer, metadata) + activate NameToken + NameToken -> NameToken: mint token + NameToken -> "Events": Mint event + NameToken -> Registrar + deactivate NameToken + end loop +Registrar -> d3 +deactivate Registrar +deactivate d3 + +@enduml diff --git a/docs/sequence-diagrams/puml/offchain-renewal.png b/docs/sequence-diagrams/puml/offchain-renewal.png new file mode 100644 index 0000000..889cdce Binary files /dev/null and b/docs/sequence-diagrams/puml/offchain-renewal.png differ diff --git a/docs/sequence-diagrams/puml/offchain-renewal.puml b/docs/sequence-diagrams/puml/offchain-renewal.puml new file mode 100644 index 0000000..f00e10f --- /dev/null +++ b/docs/sequence-diagrams/puml/offchain-renewal.puml @@ -0,0 +1,39 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor Owner +participant "d3.app" as d3 #lightblue +participant "Registrar" +participant "NameToken" +boundary "Events" + +== Prolong multiple *cspr name tokens with fiat currency == + +Owner -> d3: Renew *cspr name +activate d3 +d3 -> d3: process fiat payment +d3 -> Owner +deactivate d3 + +d3 -> Registrar: admin_prolong(Vec) +activate Registrar + loop N times + Registrar -> NameToken: metadata(name_hash) + NameToken -> Registrar + Registrar -> Registrar: check expiration date + alt expiration+grace_period < blocktime + Registrar ->x d3: Revert with\ngrace_period_expired\nerror + end + Registrar -> NameToken: set_token_metadata(name_hash, new_metadata) + activate NameToken + NameToken -> NameToken: update metadata + NameToken -> "Events": MetadataUpdated event + NameToken -> Registrar + deactivate NameToken + end loop +Registrar -> d3 +deactivate Registrar +deactivate d3 + +@enduml diff --git a/docs/sequence-diagrams/puml/onchain-multiple-purchase-prolong.png b/docs/sequence-diagrams/puml/onchain-multiple-purchase-prolong.png new file mode 100644 index 0000000..92ca544 Binary files /dev/null and b/docs/sequence-diagrams/puml/onchain-multiple-purchase-prolong.png differ diff --git a/docs/sequence-diagrams/puml/onchain-multiple-purchase-prolong.puml b/docs/sequence-diagrams/puml/onchain-multiple-purchase-prolong.puml new file mode 100644 index 0000000..7b77973 --- /dev/null +++ b/docs/sequence-diagrams/puml/onchain-multiple-purchase-prolong.puml @@ -0,0 +1,38 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor User +participant "d3.app" as d3 #lightblue +participant "Controller" +participant "Registrar" +participant "NameToken" +boundary "Events" + +== Buy and renew multiple *cspr names with CSPR token == + +User -> d3: Renew N *cspr names\nand buy M *cspr names +activate d3 +d3 -> User: signed PaymentVoucher\nand RenewalPaymentVoucher +deactivate d3 + +User -> Controller: buy_and_renew(PaymentVoucher, sig1,\n RenewalPaymentVoucher, sig2) +activate Controller +Controller -> Controller: verify voucher\nexpirations +Controller -> Controller: verify voucher\nsignatures +Controller -> Controller: process CSPR payment +Controller -> "Events": PaymentFulfilled event +Controller -> Registrar: controller_prolong_and_register(\nVec, Vec) +activate Registrar + loop N times + note over Registrar: Same flow as for controller_prolong(). + end loop + loop M times + note over Registrar: Same flow as for controller_register(). + end loop +Registrar -> Controller +deactivate Registrar +Controller -> User +deactivate Controller + +@enduml diff --git a/docs/sequence-diagrams/puml/onchain-multiple-purchase.png b/docs/sequence-diagrams/puml/onchain-multiple-purchase.png new file mode 100644 index 0000000..e453060 Binary files /dev/null and b/docs/sequence-diagrams/puml/onchain-multiple-purchase.png differ diff --git a/docs/sequence-diagrams/puml/onchain-multiple-purchase.puml b/docs/sequence-diagrams/puml/onchain-multiple-purchase.puml new file mode 100644 index 0000000..0e30776 --- /dev/null +++ b/docs/sequence-diagrams/puml/onchain-multiple-purchase.puml @@ -0,0 +1,55 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor User +participant "d3.app" as d3 #lightblue +participant "Controller" +participant "Registrar" +participant "NameToken" +boundary "Events" + +== Buy multiple *cspr names with CSPR token == + +User -> d3: Buy N *cspr names with CSPR +activate d3 +d3 -> User: signed PaymentVoucher +deactivate d3 + +User -> Controller: buy(PaymentVoucher, sig) +activate Controller +Controller -> Controller: verify voucher\nexpiration +Controller -> Controller: verify voucher\nsignature +Controller -> Controller: process CSPR payment +Controller -> "Events": PaymentFulfilled event +Controller -> Registrar: controller_register(TokenizationVoucher) +activate Registrar +Registrar -> Registrar: verify voucher\nexpiration + loop N times + Registrar -> NameToken: metadata(name_hash) + NameToken -> Registrar + alt Token exists + Registrar -> Registrar: check expiration date + alt expiration+grace_period+pending_delete_period < blocktime + Registrar -> NameToken: burn(name_hash) + NameToken -> NameToken: clear resolver address + NameToken -> "Events": MetadataUpdated event + NameToken -> NameToken: burn token + NameToken -> "Events": Burn event + else expiration+grace_period+pending_delete_period > blocktime + Registrar ->x d3: Revert with\nnot expired token error + end + end + Registrar -> NameToken: mint(buyer, metadata) + activate NameToken + NameToken -> NameToken: mint token + NameToken -> "Events": Mint event + NameToken -> Registrar + deactivate NameToken + end loop +Registrar -> Controller +deactivate Registrar +Controller -> User +deactivate Controller + +@enduml diff --git a/docs/sequence-diagrams/puml/onchain-name-resolution-wrapped.png b/docs/sequence-diagrams/puml/onchain-name-resolution-wrapped.png new file mode 100644 index 0000000..1b1d79b Binary files /dev/null and b/docs/sequence-diagrams/puml/onchain-name-resolution-wrapped.png differ diff --git a/docs/sequence-diagrams/puml/onchain-name-resolution-wrapped.puml b/docs/sequence-diagrams/puml/onchain-name-resolution-wrapped.puml new file mode 100644 index 0000000..a569dd4 --- /dev/null +++ b/docs/sequence-diagrams/puml/onchain-name-resolution-wrapped.puml @@ -0,0 +1,34 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +participant "Contract" #lightblue +participant "Registrar" +participant "NameToken" +participant "Resolver" + +== On-chain name resolution (wrapped) == + +activate "Contract" +Contract -> "Registrar": resolve(full_domain) +activate "Registrar" +"Registrar" -> "NameToken": is_token_valid(name_hash) +"NameToken" -> "Registrar" +alt token not found or expired + Registrar -> "Contract": None +end +"Registrar" -> Resolver: resolve(full_domain) +alt no resolution found + Resolver -> Registrar: None + Registrar -> "Contract": None +end + Resolver -> "Registrar": Some(address) + "Registrar" -> Contract: Some(address) + +deactivate "Registrar" + +== == + +deactivate Contract + +@enduml diff --git a/docs/sequence-diagrams/puml/onchain-name-resolution.png b/docs/sequence-diagrams/puml/onchain-name-resolution.png new file mode 100644 index 0000000..67c7530 Binary files /dev/null and b/docs/sequence-diagrams/puml/onchain-name-resolution.png differ diff --git a/docs/sequence-diagrams/puml/onchain-name-resolution.puml b/docs/sequence-diagrams/puml/onchain-name-resolution.puml new file mode 100644 index 0000000..942f8cc --- /dev/null +++ b/docs/sequence-diagrams/puml/onchain-name-resolution.puml @@ -0,0 +1,28 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +participant "Contract" #lightblue +participant "NameToken" +participant "Resolver" + +== On-chain name resolution == + +activate "Contract" +"Contract" -> "NameToken": metadata(name_hash) +"NameToken" -> "Contract" +Contract -> Contract: check expiry date +Contract -> Contract: extract resolver address + +group blocktime < expiry date +"Contract" -> Resolver: resolve(full_domain) +alt no resolution found + Resolver -> Contract: None +end +Resolver -> Contract: Some(address) +end +== == + +deactivate Contract + +@enduml diff --git a/docs/sequence-diagrams/puml/onchain-renewal.png b/docs/sequence-diagrams/puml/onchain-renewal.png new file mode 100644 index 0000000..c5cd135 Binary files /dev/null and b/docs/sequence-diagrams/puml/onchain-renewal.png differ diff --git a/docs/sequence-diagrams/puml/onchain-renewal.puml b/docs/sequence-diagrams/puml/onchain-renewal.puml new file mode 100644 index 0000000..3301aee --- /dev/null +++ b/docs/sequence-diagrams/puml/onchain-renewal.puml @@ -0,0 +1,47 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor Owner +participant "d3.app" as d3 #lightblue +participant "Controller" +participant "Registrar" +participant "NameToken" +boundary "Events" + +== Prolong multiple *cspr name tokens with CSPR token payment == + +Owner -> d3: Buy *cspr name with CSPR +activate d3 +d3 -> Owner: signed RenewalPaymentVoucher +deactivate d3 + +Owner -> Controller: renew(RenewalPaymentVoucher, sig) +activate Controller +Controller -> Controller: verify voucher\nexpiration +Controller -> Controller: verify voucher\nsignature +Controller -> Controller: process CSPR payment +Controller -> "Events": PaymentFulfilled event +Controller -> Registrar: controller_prolong(RenewalVoucher, sig) +activate Registrar +Registrar -> Registrar: verify voucher\nexpiration + loop N times + Registrar -> NameToken: metadata(name_hash) + NameToken -> Registrar + Registrar -> Registrar: check expiration date + alt expiration+grace_period < blocktime + Registrar ->x d3: Revert with\ngrace_period_expired\nerror + end + Registrar -> NameToken: set_token_metadata(name_hash, new_metadata) + activate NameToken + NameToken -> NameToken: update metadata + NameToken -> "Events": MetadataUpdated event + NameToken -> Registrar + deactivate NameToken + end loop +Registrar -> Controller +deactivate Registrar +Controller -> Owner +deactivate Controller + +@enduml diff --git a/docs/sequence-diagrams/puml/resolve-name.png b/docs/sequence-diagrams/puml/resolve-name.png new file mode 100644 index 0000000..fc6e103 Binary files /dev/null and b/docs/sequence-diagrams/puml/resolve-name.png differ diff --git a/docs/sequence-diagrams/puml/resolve-name.puml b/docs/sequence-diagrams/puml/resolve-name.puml new file mode 100644 index 0000000..0c0c456 --- /dev/null +++ b/docs/sequence-diagrams/puml/resolve-name.puml @@ -0,0 +1,33 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor User +participant "Resolution API" +box Casper Node +participant "NameToken state" +participant "Resolver state" +end box +== Resolve name == + +User -> "Resolution API": /resolve full_domain +activate "Resolution API" +"Resolution API" -> "NameToken state": [RPC call] get token_hash metadata +"NameToken state" -> "Resolution API" + +"Resolution API" -> "Resolution API": check expiry date + +group blocktime < expiry date +"Resolution API" -> "Resolution API": extract resolver address +"Resolution API" -> "Resolver state": [RPC call] get full_domain account address +"Resolver state" -> "Resolution API" +alt no resolution found + "Resolution API" -> User: 404 record not found +end +"Resolution API" -> User: 200 address +else "blocktime > expiry date" +"Resolution API" -> User: 404 token expired +end +deactivate "Resolution API" + +@enduml diff --git a/docs/sequence-diagrams/puml/revoke-controller.png b/docs/sequence-diagrams/puml/revoke-controller.png new file mode 100644 index 0000000..f4f3b86 Binary files /dev/null and b/docs/sequence-diagrams/puml/revoke-controller.png differ diff --git a/docs/sequence-diagrams/puml/revoke-controller.puml b/docs/sequence-diagrams/puml/revoke-controller.puml new file mode 100644 index 0000000..f8dfca3 --- /dev/null +++ b/docs/sequence-diagrams/puml/revoke-controller.puml @@ -0,0 +1,16 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor "Registrar admin" +participant "Registrar" + +== Revoke controller contract / admin address permissions== + +"Registrar admin" -> "Registrar": revoke_role(CONTROLLER_ROLE, package_key) +activate "Registrar" +"Registrar" -> "Registrar": Update ACL +"Registrar" -> "Registrar admin" +deactivate "Registrar" + +@enduml diff --git a/docs/sequence-diagrams/puml/set-account-address-record.png b/docs/sequence-diagrams/puml/set-account-address-record.png new file mode 100644 index 0000000..51297de Binary files /dev/null and b/docs/sequence-diagrams/puml/set-account-address-record.png differ diff --git a/docs/sequence-diagrams/puml/set-account-address-record.puml b/docs/sequence-diagrams/puml/set-account-address-record.puml new file mode 100644 index 0000000..4d1033a --- /dev/null +++ b/docs/sequence-diagrams/puml/set-account-address-record.puml @@ -0,0 +1,30 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor "Domain owner" +participant "Resolver" +participant "NameToken" +boundary "Events" + +== Set account address record == + +"Domain owner" -> Resolver: set_address(full_domain, address) +activate Resolver +Resolver -> NameToken: is_token_valid(name_hash) +NameToken -> Resolver +alt token not found or expired + Resolver ->x "Domain owner": revert with\ninvalid token error +end +Resolver -> NameToken: owner_of(name_hash) +NameToken -> Resolver: owner address +group caller == owner + Resolver -> Resolver: set record + Resolver -> Events: ResolutionChanged event +end +Resolver -> "Domain owner" +deactivate Resolver + +== == + +@enduml diff --git a/docs/sequence-diagrams/puml/set-default-resolver.png b/docs/sequence-diagrams/puml/set-default-resolver.png new file mode 100644 index 0000000..ef772ae Binary files /dev/null and b/docs/sequence-diagrams/puml/set-default-resolver.png differ diff --git a/docs/sequence-diagrams/puml/set-default-resolver.puml b/docs/sequence-diagrams/puml/set-default-resolver.puml new file mode 100644 index 0000000..eefb469 --- /dev/null +++ b/docs/sequence-diagrams/puml/set-default-resolver.puml @@ -0,0 +1,19 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor "Admin" +participant "NameToken" +boundary "Events" + +== Set default resolver == + +"Admin" -> NameToken: set_default_resolver(resolver_address) +activate NameToken +NameToken -> NameToken: set default resolver +NameToken -> "Admin" +deactivate NameToken + +== == + +@enduml diff --git a/docs/sequence-diagrams/puml/set-grace-period.png b/docs/sequence-diagrams/puml/set-grace-period.png new file mode 100644 index 0000000..db048b4 Binary files /dev/null and b/docs/sequence-diagrams/puml/set-grace-period.png differ diff --git a/docs/sequence-diagrams/puml/set-grace-period.puml b/docs/sequence-diagrams/puml/set-grace-period.puml new file mode 100644 index 0000000..21526bf --- /dev/null +++ b/docs/sequence-diagrams/puml/set-grace-period.puml @@ -0,0 +1,16 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor "Registrar admin" +participant "Registrar" + +== Set grace period time span == + +"Registrar admin" -> "Registrar": set_grace_period(timespan) +activate "Registrar" +"Registrar" -> "Registrar": Update grace_period +"Registrar" -> "Registrar admin" +deactivate "Registrar" + +@enduml diff --git a/docs/sequence-diagrams/puml/set-resolver.png b/docs/sequence-diagrams/puml/set-resolver.png new file mode 100644 index 0000000..5ad5017 Binary files /dev/null and b/docs/sequence-diagrams/puml/set-resolver.png differ diff --git a/docs/sequence-diagrams/puml/set-resolver.puml b/docs/sequence-diagrams/puml/set-resolver.puml new file mode 100644 index 0000000..5059d4f --- /dev/null +++ b/docs/sequence-diagrams/puml/set-resolver.puml @@ -0,0 +1,20 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor "Domain owner" +participant "NameToken" +boundary "Events" + +== Set resolver == + +"Domain owner" -> NameToken: set_resolver(token_hash,resolver_address) +activate NameToken +NameToken -> NameToken: update metadata +NameToken -> "Events": MetadataUpdated event +NameToken -> "Domain owner" +deactivate NameToken + +== == + +@enduml diff --git a/docs/sequence-diagrams/puml/set-reverse-resolution.png b/docs/sequence-diagrams/puml/set-reverse-resolution.png new file mode 100644 index 0000000..b35dead Binary files /dev/null and b/docs/sequence-diagrams/puml/set-reverse-resolution.png differ diff --git a/docs/sequence-diagrams/puml/set-reverse-resolution.puml b/docs/sequence-diagrams/puml/set-reverse-resolution.puml new file mode 100644 index 0000000..186c016 --- /dev/null +++ b/docs/sequence-diagrams/puml/set-reverse-resolution.puml @@ -0,0 +1,23 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor Owner +participant "Controller" +participant "Registrar" +participant "Reverse Resolver" + +== Set reverse resolution == + +Owner -> Controller: set reverse resolution +activate Controller +Controller -> "Reverse Resolver": set_reverse_resolution() +activate "Reverse Resolver" +"Reverse Resolver" -> "Registrar": owner_of() +Registrar -> "Reverse Resolver" +"Reverse Resolver" -> "Reverse Resolver": update name resolver record +"Reverse Resolver" -> "Controller" +deactivate "Reverse Resolver" +Controller -> Owner +deactivate Controller +@enduml diff --git a/docs/sequence-diagrams/puml/set-signer.png b/docs/sequence-diagrams/puml/set-signer.png new file mode 100644 index 0000000..7f6f955 Binary files /dev/null and b/docs/sequence-diagrams/puml/set-signer.png differ diff --git a/docs/sequence-diagrams/puml/set-signer.puml b/docs/sequence-diagrams/puml/set-signer.puml new file mode 100644 index 0000000..3e6eec2 --- /dev/null +++ b/docs/sequence-diagrams/puml/set-signer.puml @@ -0,0 +1,18 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor "Contract owner" +participant "Controller" + +== Set voucher signer == + +"Contract owner" -> Controller: set_signer(public_key) +activate Controller +Controller -> Controller: set signer key +"Controller" -> "Contract owner" +deactivate Controller + +== == + +@enduml diff --git a/docs/sequence-diagrams/puml/set-transfer-filter.png b/docs/sequence-diagrams/puml/set-transfer-filter.png new file mode 100644 index 0000000..c741acd Binary files /dev/null and b/docs/sequence-diagrams/puml/set-transfer-filter.png differ diff --git a/docs/sequence-diagrams/puml/set-transfer-filter.puml b/docs/sequence-diagrams/puml/set-transfer-filter.puml new file mode 100644 index 0000000..a09f849 --- /dev/null +++ b/docs/sequence-diagrams/puml/set-transfer-filter.puml @@ -0,0 +1,18 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor "NameToken Admin" +participant "NameToken" +boundary "Events" + +== Set transfer filter contract == + +"NameToken Admin" -> "NameToken": set_transfer_filter(contract_package_hash) +activate "NameToken" +NameToken -> NameToken: set filter contract +NameToken -> "Events": VariablesSet event +"NameToken" -> "NameToken Admin" +deactivate "NameToken" + +@enduml diff --git a/docs/sequence-diagrams/puml/set-treasury-account.png b/docs/sequence-diagrams/puml/set-treasury-account.png new file mode 100644 index 0000000..91ce3a8 Binary files /dev/null and b/docs/sequence-diagrams/puml/set-treasury-account.png differ diff --git a/docs/sequence-diagrams/puml/set-treasury-account.puml b/docs/sequence-diagrams/puml/set-treasury-account.puml new file mode 100644 index 0000000..ca1c8ff --- /dev/null +++ b/docs/sequence-diagrams/puml/set-treasury-account.puml @@ -0,0 +1,18 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor "Contract owner" +participant "Controller" + +== Set treasury account == + +"Contract owner" -> Controller: set_treasury(account_hash) +activate Controller +Controller -> Controller: set treasury account +"Controller" -> "Contract owner" +deactivate Controller + +== == + +@enduml diff --git a/docs/sequence-diagrams/puml/transfer-domain.png b/docs/sequence-diagrams/puml/transfer-domain.png new file mode 100644 index 0000000..e732669 Binary files /dev/null and b/docs/sequence-diagrams/puml/transfer-domain.png differ diff --git a/docs/sequence-diagrams/puml/transfer-domain.puml b/docs/sequence-diagrams/puml/transfer-domain.puml new file mode 100644 index 0000000..4581527 --- /dev/null +++ b/docs/sequence-diagrams/puml/transfer-domain.puml @@ -0,0 +1,25 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor Owner +participant "NameToken" +boundary "Events" + +== Transfer token == + +Owner -> NameToken: transfer(new_owner, name_hash) +activate NameToken +NameToken -> NameToken: check expiration date +alt expiration < blocktime + NameToken ->X Owner: Revert with cannot_transfer error +end +NameToken -> NameToken: clear operator +NameToken -> NameToken : set new owner +NameToken -> "Events": Transfer event +NameToken -> Owner +deactivate NameToken + +== == + +@enduml diff --git a/docs/sequence-diagrams/puml/transfer-from-domain.png b/docs/sequence-diagrams/puml/transfer-from-domain.png new file mode 100644 index 0000000..9876b67 Binary files /dev/null and b/docs/sequence-diagrams/puml/transfer-from-domain.png differ diff --git a/docs/sequence-diagrams/puml/transfer-from-domain.puml b/docs/sequence-diagrams/puml/transfer-from-domain.puml new file mode 100644 index 0000000..116b8c4 --- /dev/null +++ b/docs/sequence-diagrams/puml/transfer-from-domain.puml @@ -0,0 +1,35 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor Operator +participant "NameToken" +participant "Resolver" +boundary "Events" + +== Transfer token by operator == + +Operator -> NameToken: transfer(old_owner, new_owner, name_hash) +activate NameToken +NameToken -> NameToken: check expiration date +alt expiration < blocktime + NameToken ->X Operator: Revert with cannot_transfer error +end +alt Resolver is default resolver + NameToken -> Resolver: cleanup(name_hash) + Resolver -> NameToken: +else + NameToken -> NameToken : set default resolver + NameToken -> "Events": MetadataUpdated event +end +NameToken -> NameToken: clear operator +NameToken -> NameToken : set new owner +NameToken -> Resolver: cleanup(name_hash) +Resolver -> NameToken: +NameToken -> "Events": Transfer event +NameToken -> Operator +deactivate NameToken + +== == + +@enduml diff --git a/docs/sequence-diagrams/puml/whitelist-controller.png b/docs/sequence-diagrams/puml/whitelist-controller.png new file mode 100644 index 0000000..1b4f7f6 Binary files /dev/null and b/docs/sequence-diagrams/puml/whitelist-controller.png differ diff --git a/docs/sequence-diagrams/puml/whitelist-controller.puml b/docs/sequence-diagrams/puml/whitelist-controller.puml new file mode 100644 index 0000000..6a552c5 --- /dev/null +++ b/docs/sequence-diagrams/puml/whitelist-controller.puml @@ -0,0 +1,16 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor "Registrar admin" +participant "Registrar" + +== Whitelist controller contract / admin address == + +"Registrar admin" -> "Registrar": grant_role(CONTROLLER_ROLE, package_key) +activate "Registrar" +"Registrar" -> "Registrar": Update ACL +"Registrar" -> "Registrar admin" +deactivate "Registrar" + +@enduml diff --git a/docs/sequence-diagrams/puml/whitelist-registrar.png b/docs/sequence-diagrams/puml/whitelist-registrar.png new file mode 100644 index 0000000..382d0ca Binary files /dev/null and b/docs/sequence-diagrams/puml/whitelist-registrar.png differ diff --git a/docs/sequence-diagrams/puml/whitelist-registrar.puml b/docs/sequence-diagrams/puml/whitelist-registrar.puml new file mode 100644 index 0000000..0db0625 --- /dev/null +++ b/docs/sequence-diagrams/puml/whitelist-registrar.puml @@ -0,0 +1,18 @@ +@startuml +'https://plantuml.com/sequence-diagram + +'autonumber +actor "NameToken Admin" +participant "NameToken" +boundary "Events" + +== Whitelist registrar contract == + +"NameToken Admin" -> "NameToken": set_variables(registrars_package_hashes[]) +activate "NameToken" +NameToken -> NameToken: Update ACL +NameToken -> "Events": VariablesSet event +"NameToken" -> "NameToken Admin" +deactivate "NameToken" + +@enduml diff --git a/docs/settings.html b/docs/settings.html new file mode 100644 index 0000000..99de3be --- /dev/null +++ b/docs/settings.html @@ -0,0 +1 @@ +Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/docs/src-files.js b/docs/src-files.js new file mode 100644 index 0000000..080e8a0 --- /dev/null +++ b/docs/src-files.js @@ -0,0 +1,3 @@ +var srcIndex = new Map(JSON.parse('[["casper_name_contracts",["",[["contracts",[],["controller.rs","marketplace.rs","mod.rs","name_token.rs","registrar.rs","resolver.rs","reverse_resolver.rs","token_id.rs","utils.rs"]]],["data_structures.rs","lib.rs"]]]]')); +createSrcSidebar(); +//{"start":36,"fragment_lengths":[217]} \ No newline at end of file diff --git a/docs/src/casper_name_contracts/contracts/controller.rs.html b/docs/src/casper_name_contracts/contracts/controller.rs.html new file mode 100644 index 0000000..747b686 --- /dev/null +++ b/docs/src/casper_name_contracts/contracts/controller.rs.html @@ -0,0 +1,551 @@ +controller.rs - source

casper_name_contracts/contracts/
controller.rs

1use super::registrar::RegistrarContractRef;
+2use crate::data_structures::{Payment, PaymentVoucher, RenewalPaymentVoucher};
+3use odra::{
+4    casper_types::{
+5        bytesrepr::{Bytes, ToBytes},
+6        PublicKey, U512,
+7    },
+8    prelude::*,
+9};
+10use odra_modules::{
+11    access::{AccessControl, Role, DEFAULT_ADMIN_ROLE},
+12    security::Pauseable,
+13};
+14
+15/// Event with the payment information.
+16#[odra::event]
+17pub struct PaymentFulfilled {
+18    payment_id: String,
+19    buyer: Address,
+20    amount: U512,
+21}
+22
+23/// Event emitted when the signer public key is changed.
+24#[odra::event]
+25pub struct SignerPublicKeyChanged {
+26    new_signer_public_key: PublicKey,
+27}
+28
+29/// Event emitted when the treasury address is changed.
+30#[odra::event]
+31pub struct TreasuryAddressChanged {
+32    new_treasury_address: Address,
+33}
+34
+35/// Controller smart contract. It handles payments and talks to the [Registrar
+36/// Contract](super::registrar::Registrar).
+37#[odra::module]
+38pub struct Controller {
+39    controller: SubModule<BaseController>,
+40    registrar: External<RegistrarContractRef>,
+41}
+42
+43#[odra::module]
+44impl Controller {
+45    delegate! {
+46        to self.controller {
+47            fn has_role(&self, role: &Role, address: &Address) -> bool;
+48            fn grant_role(&mut self, role: &Role, address: &Address);
+49            fn revoke_role(&mut self, role: &Role, address: &Address);
+50            fn set_signer_public_key(&mut self, signer: PublicKey);
+51            fn set_treasury(&mut self, treasury: Address);
+52            fn signer_public_key(&self) -> PublicKey;
+53            fn pause(&mut self);
+54            fn unpause(&mut self);
+55            fn is_paused(&self) -> bool;
+56        }
+57    }
+58
+59    /// Initializes the controller with the registrar contract address, the
+60    /// signer public key and the treasury address.
+61    pub fn init(&mut self, registrar: Address, signer: PublicKey, treasury: Address) {
+62        if !registrar.is_contract() {
+63            self.revert(ControllerError::ContractAddressExpected);
+64        }
+65        self.registrar.set(registrar);
+66        self.controller.init(signer, treasury);
+67    }
+68
+69    /// Payable. Buys new name tokens.
+70    #[odra(payable)]
+71    pub fn buy(&mut self, voucher: PaymentVoucher, signature: Bytes) {
+72        self.controller.require_not_paused();
+73        self.controller.process_payment_voucher(&voucher, signature);
+74        self.registrar.controller_register(voucher.into());
+75    }
+76
+77    /// Payable. Renews name tokens.
+78    #[odra(payable)]
+79    pub fn renew(&mut self, voucher: RenewalPaymentVoucher, signature: Bytes) {
+80        self.controller.require_not_paused();
+81        self.controller.process_payment_voucher(&voucher, signature);
+82        self.registrar.controller_prolong(voucher.into());
+83    }
+84
+85    /// Payable. Buys new name tokens and renews existing ones.
+86    #[odra(payable)]
+87    pub fn buy_and_renew(
+88        &mut self,
+89        payment_voucher: PaymentVoucher,
+90        payment_signature: Bytes,
+91        renewal_voucher: RenewalPaymentVoucher,
+92        renewal_signature: Bytes,
+93    ) {
+94        self.controller.require_not_paused();
+95        self.controller
+96            .process_payment_voucher(&payment_voucher, payment_signature);
+97        self.controller
+98            .process_payment_voucher(&renewal_voucher, renewal_signature);
+99        self.registrar
+100            .controller_prolong_and_register(renewal_voucher.into(), payment_voucher.into());
+101    }
+102
+103    /// Try to resolve a full domain name to an address.
+104    pub fn resolve(&self, full_domain: String) -> Option<Address> {
+105        self.registrar.resolve(full_domain)
+106    }
+107}
+108
+109/// Base for all controllers. It handles access control, treasury and signer
+110/// public key.
+111#[odra::module(
+112    errors = ControllerError,
+113    events = [PaymentFulfilled, SignerPublicKeyChanged, TreasuryAddressChanged]
+114)]
+115pub struct BaseController {
+116    signer_public_key: Var<PublicKey>,
+117    treasury: Var<Address>,
+118    access_control: SubModule<AccessControl>,
+119    pausable: SubModule<Pauseable>,
+120}
+121
+122#[odra::module]
+123impl BaseController {
+124    delegate! {
+125        to self.access_control {
+126            fn has_role(&self, role: &Role, address: &Address) -> bool;
+127            fn grant_role(&mut self, role: &Role, address: &Address);
+128            fn revoke_role(&mut self, role: &Role, address: &Address);
+129        }
+130
+131        to self.pausable {
+132            fn is_paused(&self) -> bool;
+133            fn require_not_paused(&self);
+134        }
+135    }
+136}
+137
+138impl BaseController {
+139    /// Initializes the controller.
+140    /// It assigns the deployer as the admin.
+141    pub fn init(&mut self, signer: PublicKey, treasury: Address) {
+142        self.signer_public_key.set(signer);
+143        self.treasury.set(treasury);
+144
+145        // Setup roles.
+146        let admin = self.env().caller();
+147        self.access_control
+148            .unchecked_grant_role(&DEFAULT_ADMIN_ROLE, &admin);
+149    }
+150
+151    /// Temporarily stops the contract.
+152    pub fn pause(&mut self) {
+153        self.assert_caller_is_admin();
+154        self.pausable.pause();
+155    }
+156
+157    /// Returns to normal operation.
+158    pub fn unpause(&mut self) {
+159        self.assert_caller_is_admin();
+160        self.pausable.unpause();
+161    }
+162
+163    /// Admin only. Sets the public key of the signer.
+164    pub fn set_signer_public_key(&mut self, signer: PublicKey) {
+165        self.assert_caller_is_admin();
+166        self.signer_public_key.set(signer.clone());
+167        self.env().emit_event(SignerPublicKeyChanged {
+168            new_signer_public_key: signer,
+169        });
+170    }
+171
+172    /// Admin only. Sets the treasury address.
+173    pub fn set_treasury(&mut self, treasury: Address) {
+174        self.assert_caller_is_admin();
+175        self.treasury.set(treasury);
+176        self.env().emit_event(TreasuryAddressChanged {
+177            new_treasury_address: treasury,
+178        });
+179    }
+180
+181    /// Returns the public key of the signer.
+182    pub fn signer_public_key(&self) -> PublicKey {
+183        self.signer_public_key.get().unwrap_or_revert(self)
+184    }
+185
+186    #[inline]
+187    fn assert_caller_is_admin(&self) {
+188        self.access_control
+189            .check_role(&DEFAULT_ADMIN_ROLE, &self.env().caller());
+190    }
+191
+192    fn assert_caller_is_buyer<P: Payment>(&self, voucher: &P) {
+193        if self.env().caller() != voucher.payment_info().buyer {
+194            self.revert(ControllerError::BuyerMustBeCaller);
+195        }
+196    }
+197
+198    /// Validate the payment voucher and process the payment.
+199    pub fn process_payment_voucher<P: Payment + ToBytes>(&self, voucher: &P, signature: Bytes) {
+200        self.assert_caller_is_buyer(voucher);
+201        self.verify_signature(voucher, &signature);
+202        self.collect_cspr_payment(voucher);
+203    }
+204
+205    fn collect_cspr_payment<P: Payment>(&self, voucher: &P) {
+206        let fee_collector = self
+207            .treasury
+208            .get_or_revert_with(ControllerError::FeeCollectorNotSet);
+209        let payment_info = voucher.payment_info();
+210        let attached_value = self.env().attached_value();
+211        if attached_value < payment_info.amount {
+212            self.revert(ControllerError::InsufficientPayment);
+213        }
+214        if attached_value > payment_info.amount {
+215            self.revert(ControllerError::PaymentTooLarge);
+216        }
+217        self.env()
+218            .transfer_tokens(&fee_collector, &payment_info.amount);
+219        self.env().emit_event(PaymentFulfilled {
+220            payment_id: payment_info.payment_id.clone(),
+221            buyer: payment_info.buyer,
+222            amount: payment_info.amount,
+223        });
+224    }
+225
+226    fn verify_signature<T: ToBytes>(&self, data: &T, signature: &Bytes) {
+227        let public_key = self.signer_public_key();
+228        let bytes: Bytes = data.to_bytes().unwrap_or_revert(self).into();
+229        let verified = self.env().verify_signature(&bytes, signature, &public_key);
+230        if !verified {
+231            self.revert(ControllerError::InvalidSignature);
+232        }
+233    }
+234}
+235
+236/// Controller errors.
+237#[odra::odra_error]
+238pub enum ControllerError {
+239    InvalidSignature = 1101,
+240    FeeCollectorNotSet = 1102,
+241    RegistrarNotSet = 1103,
+242    BuyerMustBeCaller = 1104,
+243    InsufficientPayment = 1105,
+244    PaymentTooLarge = 1106,
+245    ContractAddressExpected = 1107,
+246}
+247
+248#[cfg(test)]
+249mod tests {
+250    use odra::{
+251        casper_event_standard::EventInstance,
+252        casper_types::U512,
+253        host::{Deployer, HostRef},
+254    };
+255
+256    use crate::{
+257        contracts::controller::{
+258            Controller, ControllerInitArgs, SignerPublicKeyChanged, TreasuryAddressChanged,
+259        },
+260        data_structures::{NameMintInfo, PaymentVoucher, RenewalPaymentVoucher, TokenRenewalInfo},
+261        test_context::{generate_token_id, TestContext, INIT_TIME, TOKEN_EXPIRATION, TOKEN_NAME},
+262    };
+263
+264    #[test]
+265    fn deploy_fails_if_account_set_as_registrar() {
+266        let env = odra_test::env();
+267        let signer = env.get_account(10);
+268        let treasury = env.get_account(11);
+269        let result = Controller::try_deploy(
+270            &env,
+271            ControllerInitArgs {
+272                registrar: env.get_account(1),
+273                signer: env.public_key(&signer),
+274                treasury,
+275            },
+276        );
+277        assert!(result.is_err());
+278    }
+279
+280    #[test]
+281    fn test_controller() {
+282        let mut ctx = TestContext::install_and_setup();
+283        let (fee_collector, alice) = (ctx.treasury, ctx.alice);
+284
+285        // Prepare a payment voucher.
+286        let token_expiration = ctx.token_expiration_time();
+287        let voucher_expiration = ctx.token_expiration_time();
+288        let amount = U512::from(2000);
+289
+290        let names = vec![NameMintInfo::new(TOKEN_NAME, alice, token_expiration, "")];
+291        let voucher = PaymentVoucher::new(amount, "id_1", alice, names, voucher_expiration);
+292        let signature = ctx.sign(&voucher);
+293
+294        // CSPR balances before the purchase.
+295        let fee_collector_balance = ctx.balance_of(&fee_collector);
+296        let alice_balance = ctx.balance_of(&alice);
+297
+298        // But the voucher.
+299        ctx.set_caller(alice);
+300        ctx.controller
+301            .with_tokens(amount)
+302            .buy(voucher, signature.clone());
+303
+304        // Token was minted.
+305        assert_eq!(ctx.token.balance_of(alice), 1.into());
+306
+307        // CSPR balances after the purchase.
+308        assert_eq!(
+309            ctx.balance_of(&fee_collector),
+310            fee_collector_balance + amount
+311        );
+312        assert_eq!(ctx.balance_of(&alice), alice_balance - amount);
+313    }
+314
+315    #[test]
+316    fn test_renew() {
+317        let mut ctx = TestContext::install_and_setup();
+318        let (admin, fee_collector, alice) = (ctx.admin, ctx.treasury, ctx.alice);
+319        ctx.with_name_registered(admin, alice, TOKEN_NAME);
+320
+321        // Prepare a payment voucher.
+322        let token_expiration = INIT_TIME + 2 * TOKEN_EXPIRATION;
+323        let voucher_expiration = INIT_TIME + TOKEN_EXPIRATION + 100;
+324        let amount = U512::from(2000);
+325
+326        let names = vec![TokenRenewalInfo::new(
+327            generate_token_id(TOKEN_NAME),
+328            token_expiration,
+329        )];
+330        let voucher = RenewalPaymentVoucher::new(amount, "id_1", alice, names, voucher_expiration);
+331        let signature = ctx.sign(&voucher);
+332
+333        // CSPR balances before the purchase.
+334        let fee_collector_balance = ctx.balance_of(&fee_collector);
+335        let alice_balance = ctx.balance_of(&alice);
+336
+337        ctx.advance_block_time(TOKEN_EXPIRATION + 1);
+338        // But the voucher.
+339        ctx.set_caller(alice);
+340        ctx.controller
+341            .with_tokens(amount)
+342            .renew(voucher, signature.clone());
+343
+344        // Token was minted.
+345        assert_eq!(ctx.token.balance_of(alice), 1.into());
+346
+347        // CSPR balances after the purchase.
+348        assert_eq!(
+349            ctx.balance_of(&fee_collector),
+350            fee_collector_balance + amount
+351        );
+352        assert_eq!(ctx.balance_of(&alice), alice_balance - amount);
+353    }
+354
+355    #[test]
+356    fn test_only_admin_can_pause() {
+357        let mut ctx = TestContext::install_and_setup();
+358        // Given a contract with an admin and a user.
+359        let (admin, alice) = (ctx.admin, ctx.alice);
+360
+361        // When a non-admin tries to pause it.
+362        ctx.set_caller(alice);
+363        let result = ctx.controller.try_pause();
+364        // Then it should fail and the contract should not be paused.
+365        assert!(result.is_err());
+366        assert!(!ctx.controller.is_paused());
+367
+368        // When the admin tries to pause it.
+369        ctx.set_caller(admin);
+370        ctx.controller.pause();
+371
+372        // Then the contract should be paused.
+373        assert!(ctx.controller.is_paused());
+374    }
+375
+376    #[test]
+377    fn test_only_admin_can_unpause() {
+378        let mut ctx = TestContext::install_and_setup();
+379        // Given a paused contract.
+380        let (admin, alice) = (ctx.admin, ctx.alice);
+381        ctx.controller.pause();
+382        assert!(ctx.controller.is_paused());
+383
+384        // When a non-admin tries to unpause it.
+385        ctx.set_caller(alice);
+386        let result = ctx.controller.try_unpause();
+387        // Then it should fail.
+388        assert!(result.is_err());
+389        assert!(ctx.controller.is_paused());
+390
+391        // When the admin tries to unpause it.
+392        ctx.set_caller(admin);
+393        ctx.controller.unpause();
+394
+395        // Then the contract should be unpaused.
+396        assert!(!ctx.controller.is_paused());
+397    }
+398
+399    #[test]
+400    fn test_buy_require_not_paused() {
+401        let mut ctx = TestContext::install_and_setup();
+402        // Given a paused contract.
+403        ctx.controller.pause();
+404        assert!(ctx.controller.is_paused());
+405
+406        // When a user tries to buy a name.
+407        ctx.set_caller(ctx.alice);
+408        let voucher = PaymentVoucher::new(
+409            U512::from(2000),
+410            "id_1",
+411            ctx.alice,
+412            vec![NameMintInfo::new(
+413                TOKEN_NAME,
+414                ctx.alice,
+415                ctx.token_expiration_time(),
+416                "",
+417            )],
+418            ctx.token_expiration_time(),
+419        );
+420        let signature = ctx.sign(&voucher);
+421        let result = ctx.controller.try_buy(voucher, signature);
+422
+423        // Then it should fail.
+424        assert_eq!(
+425            result,
+426            Err(odra_modules::security::errors::Error::UnpausedRequired.into())
+427        );
+428    }
+429
+430    #[test]
+431    fn test_renew_require_not_paused() {
+432        let mut ctx = TestContext::install_and_setup();
+433        // Given a paused contract.
+434        ctx.controller.pause();
+435        assert!(ctx.controller.is_paused());
+436
+437        // When a user tries to renew a name.
+438        ctx.set_caller(ctx.alice);
+439        let voucher = RenewalPaymentVoucher::new(
+440            U512::from(2000),
+441            "id_1",
+442            ctx.alice,
+443            vec![TokenRenewalInfo::new(
+444                generate_token_id(TOKEN_NAME),
+445                ctx.token_expiration_time(),
+446            )],
+447            ctx.token_expiration_time(),
+448        );
+449        let signature = ctx.sign(&voucher);
+450        let result = ctx.controller.try_renew(voucher, signature);
+451
+452        // Then it should fail.
+453        assert_eq!(
+454            result,
+455            Err(odra_modules::security::errors::Error::UnpausedRequired.into())
+456        );
+457    }
+458
+459    #[test]
+460    fn test_buy_and_renew_require_not_paused() {
+461        let mut ctx = TestContext::install_and_setup();
+462        // Given a paused contract.
+463        ctx.controller.pause();
+464        assert!(ctx.controller.is_paused());
+465
+466        // When a user tries to buy and renew names.
+467        ctx.set_caller(ctx.alice);
+468        let payment_voucher = PaymentVoucher::new(
+469            U512::from(2000),
+470            "id_1",
+471            ctx.alice,
+472            vec![NameMintInfo::new(
+473                TOKEN_NAME,
+474                ctx.alice,
+475                ctx.token_expiration_time(),
+476                "",
+477            )],
+478            ctx.token_expiration_time(),
+479        );
+480        let renewal_voucher = RenewalPaymentVoucher::new(
+481            U512::from(2000),
+482            "id_2",
+483            ctx.alice,
+484            vec![TokenRenewalInfo::new(
+485                generate_token_id(TOKEN_NAME),
+486                ctx.token_expiration_time(),
+487            )],
+488            ctx.token_expiration_time(),
+489        );
+490        let payment_signature = ctx.sign(&payment_voucher);
+491        let renewal_signature = ctx.sign(&renewal_voucher);
+492        let result = ctx.controller.try_buy_and_renew(
+493            payment_voucher,
+494            payment_signature,
+495            renewal_voucher,
+496            renewal_signature,
+497        );
+498
+499        // Then it should fail.
+500        assert_eq!(
+501            result,
+502            Err(odra_modules::security::errors::Error::UnpausedRequired.into())
+503        );
+504    }
+505
+506    #[test]
+507    fn test_set_signer_public_key() {
+508        let mut ctx = TestContext::install_and_setup();
+509        // Given a contract with an admin and a user.
+510        let (admin, user) = (ctx.admin, ctx.alice);
+511        // When the admin sets the signer public key.
+512        ctx.set_caller(admin);
+513        let result = ctx
+514            .controller
+515            .try_set_signer_public_key(ctx.env.public_key(&user));
+516        // Then it should succeed and emit an event.
+517        assert!(result.is_ok());
+518        assert!(ctx
+519            .env
+520            .emitted(&ctx.controller, SignerPublicKeyChanged::name()));
+521
+522        // When a non-admin tries to set the signer public key.
+523        ctx.set_caller(user);
+524        let result = ctx
+525            .controller
+526            .try_set_signer_public_key(ctx.env.public_key(&user));
+527        // Then it should fail.
+528        assert!(result.is_err());
+529    }
+530
+531    #[test]
+532    fn test_set_treasury() {
+533        let mut ctx = TestContext::install_and_setup();
+534        // Given a contract with an admin and two users.
+535        let (admin, alice, bob) = (ctx.admin, ctx.alice, ctx.bob);
+536        // When the admin sets the treasury address.
+537        ctx.set_caller(admin);
+538        let result = ctx.controller.try_set_treasury(alice);
+539        // Then it should succeed and emit an event.
+540        assert!(result.is_ok());
+541        assert!(ctx
+542            .env
+543            .emitted(&ctx.controller, TreasuryAddressChanged::name()));
+544
+545        // When a non-admin tries to set the treasury address.
+546        ctx.set_caller(alice);
+547        let result = ctx.controller.try_set_treasury(bob);
+548        // Then it should fail.
+549        assert!(result.is_err());
+550    }
+551}
\ No newline at end of file diff --git a/docs/src/casper_name_contracts/contracts/marketplace.rs.html b/docs/src/casper_name_contracts/contracts/marketplace.rs.html new file mode 100644 index 0000000..0134a91 --- /dev/null +++ b/docs/src/casper_name_contracts/contracts/marketplace.rs.html @@ -0,0 +1,81 @@ +marketplace.rs - source

casper_name_contracts/contracts/
marketplace.rs

1use odra::{
+2    casper_types::{bytesrepr::Bytes, PublicKey},
+3    prelude::*,
+4};
+5use odra_modules::access::Role;
+6
+7use crate::{
+8    contracts::{controller::ControllerError, token_id::ToTokenId},
+9    data_structures::SecondarySaleVoucher,
+10};
+11
+12use super::{controller::BaseController, name_token::NameTokenContractRef};
+13
+14/// Secondary market smart contract. It handles the secondary market operations.
+15#[odra::module]
+16pub struct SecondaryMarket {
+17    controller: SubModule<BaseController>,
+18    name_token: External<NameTokenContractRef>,
+19}
+20
+21#[odra::module]
+22impl SecondaryMarket {
+23    delegate! {
+24        to self.controller {
+25            fn has_role(&self, role: &Role, address: &Address) -> bool;
+26            fn grant_role(&mut self, role: &Role, address: &Address);
+27            fn revoke_role(&mut self, role: &Role, address: &Address);
+28            fn set_signer_public_key(&mut self, signer: PublicKey);
+29            fn set_treasury(&mut self, treasury: Address);
+30            fn signer_public_key(&self) -> PublicKey;
+31            fn pause(&mut self);
+32            fn unpause(&mut self);
+33            fn is_paused(&self) -> bool;
+34        }
+35    }
+36
+37    /// Initializes the secondary market with the signer public key, the treasury
+38    /// address and the name token contract address.
+39    pub fn init(&mut self, signer: PublicKey, treasury: Address, name_token: Address) {
+40        if !name_token.is_contract() {
+41            self.revert(ControllerError::ContractAddressExpected);
+42        }
+43        self.controller.init(signer, treasury);
+44        self.name_token.set(name_token);
+45    }
+46
+47    /// Payable. Buys name tokens from the secondary market.
+48    #[odra(payable)]
+49    pub fn buy(&mut self, voucher: SecondarySaleVoucher, signature: Bytes) {
+50        self.controller.require_not_paused();
+51        self.controller.process_payment_voucher(&voucher, signature);
+52        for name in voucher.names {
+53            let token_id = self.token_id(name.label);
+54            let to = self.env().caller();
+55            let from = name.owner;
+56            self.name_token.transfer_from(from, to, token_id);
+57        }
+58    }
+59}
+60
+61#[cfg(test)]
+62mod tests {
+63    use crate::contracts::marketplace::{SecondaryMarket, SecondaryMarketInitArgs};
+64    use odra::host::Deployer;
+65
+66    #[test]
+67    fn deploy_fails_if_account_set_as_name_token() {
+68        let env = odra_test::env();
+69        let signer = env.get_account(10);
+70        let treasury = env.get_account(11);
+71        let result = SecondaryMarket::try_deploy(
+72            &env,
+73            SecondaryMarketInitArgs {
+74                signer: env.public_key(&signer),
+75                treasury,
+76                name_token: env.get_account(12), // Using an account instead of a contract address
+77            },
+78        );
+79        assert!(result.is_err());
+80    }
+81}
\ No newline at end of file diff --git a/docs/src/casper_name_contracts/contracts/mod.rs.html b/docs/src/casper_name_contracts/contracts/mod.rs.html new file mode 100644 index 0000000..643a5ad --- /dev/null +++ b/docs/src/casper_name_contracts/contracts/mod.rs.html @@ -0,0 +1,8 @@ +mod.rs - source

casper_name_contracts/contracts/
mod.rs

1pub mod controller;
+2pub mod marketplace;
+3pub mod name_token;
+4pub mod registrar;
+5pub mod resolver;
+6pub mod reverse_resolver;
+7pub mod token_id;
+8pub(crate) mod utils;
\ No newline at end of file diff --git a/docs/src/casper_name_contracts/contracts/name_token.rs.html b/docs/src/casper_name_contracts/contracts/name_token.rs.html new file mode 100644 index 0000000..11b9710 --- /dev/null +++ b/docs/src/casper_name_contracts/contracts/name_token.rs.html @@ -0,0 +1,658 @@ +name_token.rs - source

casper_name_contracts/contracts/
name_token.rs

1#![allow(unused_variables)]
+2use crate::data_structures::NameTokenMetadata;
+3use odra::casper_types::bytesrepr::Bytes;
+4use odra::casper_types::U256;
+5use odra::module::Revertible;
+6use odra::{prelude::*, ContractRef};
+7use odra_modules::access::Ownable2Step;
+8use odra_modules::cep95::{CEP95Interface, Cep95, Error as Cep95Error};
+9
+10use super::resolver::ResolverContractRef;
+11
+12/// NameToken contract. It is a CEP95 token with additional functionalities.
+13#[odra::module(errors = NameTokenError)]
+14pub struct NameToken {
+15    token: SubModule<Cep95>,
+16    ownable: SubModule<Ownable2Step>,
+17    default_resolver: External<ResolverContractRef>,
+18    max_supply: Var<u64>,
+19    minted_tokens_count: Var<u64>,
+20    whitelist: Mapping<Address, bool>,
+21}
+22
+23#[odra::module]
+24impl NameToken {
+25    delegate! {
+26        to self.token {
+27            fn name(&self) -> String;
+28            fn symbol(&self) -> String;
+29            fn balance_of(&self, owner: Address) -> U256;
+30            fn owner_of(&self, token_id: U256) -> Option<Address>;
+31            fn safe_transfer_from(&mut self, from: Address, to: Address, token_id: U256, data: Option<Bytes>);
+32            fn approve(&mut self, spender: Address, token_id: U256);
+33            fn revoke_approval(&mut self, token_id: U256);
+34            fn approved_for(&self, token_id: U256) -> Option<Address>;
+35            fn approve_for_all(&mut self, operator: Address);
+36            fn revoke_approval_for_all(&mut self, operator: Address);
+37            fn is_approved_for_all(&self, owner: Address, operator: Address) -> bool;
+38            fn token_metadata(&self, token_id: U256) -> Vec<(String, String)>;
+39        }
+40
+41        to self.ownable {
+42            fn get_owner(&self) -> Address;
+43            fn get_pending_owner(&self) -> Option<Address>;
+44            fn transfer_ownership(&mut self, new_owner: &Address);
+45            fn accept_ownership(&mut self);
+46            fn renounce_ownership(&mut self);
+47        }
+48    }
+49
+50    /// Initializes CEP95 with the given name and symbol.
+51    pub fn init(&mut self, name: String, symbol: String, max_supply: u64) {
+52        let caller = self.env().caller();
+53
+54        self.token.symbol.set(symbol);
+55        self.token.name.set(name);
+56        self.max_supply.set(max_supply);
+57        self.ownable.init(caller);
+58    }
+59
+60    pub fn token_exists(&self, token_id: U256) -> bool {
+61        self.token.exists(&token_id)
+62    }
+63
+64    pub fn mint(
+65        &mut self,
+66        recipient: Address,
+67        token_id: U256,
+68        token_metadata: Vec<(String, String)>,
+69    ) {
+70        let caller = self.env().caller();
+71        self.assert_whitelisted(&caller);
+72
+73        let minted_tokens_count = self.minted_tokens_count.get_or_default();
+74        if minted_tokens_count >= self.max_supply.get_or_default() {
+75            self.revert(NameTokenError::TokenSupplyDepleted);
+76        }
+77        if self.token.exists(&token_id) {
+78            self.revert(NameTokenError::InvalidTokenIdentifier);
+79        }
+80        // mint the token
+81        self.token.mint(recipient, token_id, token_metadata);
+82        // increment the minted tokens count
+83        self.minted_tokens_count.set(minted_tokens_count + 1);
+84    }
+85
+86    pub fn burn(&mut self, token_id: U256) {
+87        let caller = self.env().caller();
+88        self.assert_whitelisted(&caller);
+89
+90        // invalidate resolutions if the resolver is the default resolver and update metadata
+91        let mut metadata = self.wrapped_metadata(token_id);
+92        if let Some(resolver) = metadata.resolver().unwrap_or_revert(self) {
+93            if &resolver == self.default_resolver.address() {
+94                self.default_resolver.invalidate_resolutions(token_id);
+95            }
+96        }
+97        metadata.clear_resolver();
+98        self.set_token_metadata(token_id, metadata.to_vec());
+99
+100        // burn the token
+101        self.token.burn(token_id);
+102    }
+103
+104    pub fn admin_transfer(&mut self, recipient: Address, token_ids: Vec<U256>) {
+105        let caller = self.env().caller();
+106        self.assert_whitelisted(&caller);
+107
+108        for token_id in token_ids {
+109            if !self.is_token_valid(token_id) {
+110                self.revert(NameTokenError::ExpiredTokenTransfer);
+111            }
+112
+113            let owner = self
+114                .token
+115                .owner_of(token_id)
+116                .unwrap_or_revert_with(self, Cep95Error::ValueNotSet);
+117            self.token.raw_transfer_from(owner, recipient, token_id);
+118            // if called by an operator
+119            if caller != owner {
+120                self.cleanup(token_id);
+121            }
+122        }
+123    }
+124
+125    pub fn transfer_from(&mut self, from: Address, to: Address, token_id: U256) {
+126        if !self.is_token_valid(token_id) {
+127            self.revert(NameTokenError::ExpiredTokenTransfer);
+128        }
+129
+130        let caller = self.env().caller();
+131        let owner = self
+132            .token
+133            .owner_of(token_id)
+134            .unwrap_or_revert_with(self, Cep95Error::ValueNotSet);
+135        // if called by an operator
+136        self.token.transfer_from(from, to, token_id);
+137        if caller != owner {
+138            self.cleanup(token_id);
+139        }
+140    }
+141
+142    pub fn set_token_metadata(&mut self, token_id: U256, token_metadata: Vec<(String, String)>) {
+143        let caller = self.env().caller();
+144        self.assert_whitelisted(&caller);
+145        self.token.set_metadata(token_id, token_metadata);
+146    }
+147
+148    pub fn resolver(&self, token_id: U256) -> Option<Address> {
+149        let metadata: NameTokenMetadata = self.wrapped_metadata(token_id);
+150        metadata.resolver().unwrap_or_revert(self)
+151    }
+152
+153    pub fn set_resolver(&mut self, token_id: U256, resolver: Address) {
+154        if self.token.owner_of(token_id) != Some(self.env().caller()) {
+155            self.revert(NameTokenError::InvalidTokenOwner);
+156        }
+157        let mut metadata: NameTokenMetadata = self.wrapped_metadata(token_id);
+158        metadata.set_resolver(resolver);
+159        self.token.set_metadata(token_id, metadata.to_vec());
+160    }
+161
+162    pub fn assert_is_owner(&self, token_id: U256, address: Address) {
+163        let owner = self.token.owner_of(token_id);
+164        if owner != Some(address) {
+165            self.revert(NameTokenError::InvalidTokenOwner);
+166        }
+167    }
+168
+169    pub fn is_token_valid(&self, token_id: U256) -> bool {
+170        if !self.token.exists(&token_id) {
+171            return false;
+172        }
+173
+174        let metadata: NameTokenMetadata = self.wrapped_metadata(token_id);
+175        if metadata.expiration() < self.env().get_block_time() {
+176            return false;
+177        }
+178        true
+179    }
+180
+181    /// Only admin. Set the default resolver.
+182    pub fn set_default_resolver(&mut self, resolver: Address) {
+183        let caller = self.env().caller();
+184        self.assert_whitelisted(&caller);
+185        if !resolver.is_contract() {
+186            self.revert(NameTokenError::InvalidResolver);
+187        }
+188        self.default_resolver.set(resolver);
+189    }
+190
+191    /// Get the default resolver.
+192    pub fn get_default_resolver(&self) -> Address {
+193        *self.default_resolver.address()
+194    }
+195
+196    pub fn whitelist(&mut self, address: Address) {
+197        let caller = self.env().caller();
+198        self.ownable.assert_owner(&caller);
+199        if self.is_whitelisted(&address) {
+200            self.revert(NameTokenError::WhitelistedAlready);
+201        }
+202        self.whitelist.set(&address, true);
+203    }
+204
+205    pub fn revoke_whitelist(&mut self, address: Address) {
+206        let caller = self.env().caller();
+207        self.ownable.assert_owner(&caller);
+208        if !self.is_whitelisted(&address) {
+209            self.revert(NameTokenError::NotWhitelisted);
+210        }
+211        self.whitelist.set(&address, false);
+212    }
+213}
+214
+215impl NameToken {
+216    #[inline]
+217    pub fn wrapped_metadata(&self, token_id: U256) -> NameTokenMetadata {
+218        let metadata = self.token.token_metadata(token_id);
+219        NameTokenMetadata::try_from(metadata).unwrap_or_revert(self)
+220    }
+221
+222    #[inline]
+223    fn is_whitelisted(&self, address: &Address) -> bool {
+224        self.whitelist.get(address).unwrap_or_default()
+225    }
+226
+227    #[inline]
+228    fn assert_whitelisted(&self, address: &Address) {
+229        if !self.is_whitelisted(address) {
+230            self.revert(NameTokenError::NotWhitelisted);
+231        }
+232    }
+233
+234    fn cleanup(&mut self, token_id: U256) {
+235        let mut metadata = self.wrapped_metadata(token_id);
+236        let resolver = metadata.resolver().unwrap_or_revert(self);
+237        let default_resolver_address = *self.default_resolver.address();
+238        if resolver != Some(default_resolver_address) {
+239            metadata.set_resolver(default_resolver_address);
+240            self.token.set_metadata(token_id, metadata.to_vec());
+241        }
+242        self.default_resolver.invalidate_resolutions(token_id);
+243    }
+244}
+245
+246#[odra::odra_error]
+247pub enum NameTokenError {
+248    NotWhitelisted = 1301,
+249    InvalidTokenOwner = 1302,
+250    ExpiredTokenTransfer = 1303,
+251    InvalidTokenIdentifier = 1304,
+252    InvalidResolver = 1305,
+253    TokenSupplyDepleted = 1306,
+254    WhitelistedAlready = 1307,
+255}
+256
+257#[cfg(test)]
+258mod tests {
+259    use super::*;
+260    use crate::test_context::{generate_token_id, TestContext, INIT_TIME, TOKEN_EXPIRATION};
+261
+262    #[test]
+263    fn test_supply_depletion() {
+264        // Given a token with max supply of 10
+265        let max_supply = 10u64;
+266        let mut ctx = TestContext::install_raw_with_supply(max_supply);
+267        ctx.whitelist_admin_in_name_token();
+268        let token_hash = "token_hash";
+269
+270        for i in 0..max_supply {
+271            // When minting a token
+272            ctx.token.mint(ctx.alice, i.into(), vec![]);
+273        }
+274        // When trying to mint a new token
+275        let result = ctx.token.try_mint(ctx.alice, max_supply.into(), vec![]);
+276        // Then it should fail with TokenSupplyDepleted error
+277        assert_eq!(
+278            result.unwrap_err(),
+279            NameTokenError::TokenSupplyDepleted.into()
+280        );
+281    }
+282
+283    #[test]
+284    fn test_token_exists() {
+285        let mut ctx = TestContext::install_raw();
+286        ctx.whitelist_admin_in_name_token();
+287        let token_hash = "token_hash";
+288        let token_id = generate_token_id(token_hash);
+289        // Token should not exist
+290        assert_eq!(ctx.token.token_exists(token_id), false);
+291
+292        // Mint a token
+293        let token_owner = ctx.alice;
+294        mint_for(&mut ctx, token_owner, token_hash);
+295        // Then the token should exist
+296        assert_eq!(ctx.token.token_exists(token_id), true);
+297
+298        // Burn the token
+299        whitelist_accounts(&mut ctx, vec![token_owner]);
+300        ctx.set_caller(token_owner);
+301        assert!(try_burn(&mut ctx, token_hash).is_ok());
+302        // Then the token should not exist anymore
+303        assert_eq!(ctx.token.token_exists(token_id), false);
+304    }
+305
+306    #[test]
+307    fn owner_cannot_burn_until_whitelisted() {
+308        let mut ctx = TestContext::install_raw();
+309        ctx.whitelist_admin_in_name_token();
+310        // Given a token owned by alice
+311        let token_hash = "token_hash";
+312        let token_id = generate_token_id(token_hash);
+313        let token_owner = ctx.alice;
+314        mint_for(&mut ctx, token_owner, token_hash);
+315
+316        // Then burning token by the owner fails
+317        ctx.set_caller(token_owner);
+318        let result = try_burn(&mut ctx, token_hash);
+319        assert_eq!(result.err(), Some(NameTokenError::NotWhitelisted.into()));
+320
+321        // When whitelist the token owner
+322        whitelist_accounts(&mut ctx, vec![token_owner]);
+323        // Then the token owner should be able to burn the token
+324        ctx.set_caller(token_owner);
+325        let result = try_burn(&mut ctx, token_hash);
+326        assert!(result.is_ok());
+327    }
+328
+329    #[test]
+330    fn anyone_whitelisted_can_burn() {
+331        let mut ctx = TestContext::install_raw();
+332        ctx.whitelist_admin_in_name_token();
+333        let (token_owner, anyone) = (ctx.alice, ctx.anyone);
+334        // Given a token owned by the token owner
+335        let token_hash = "token_hash";
+336        mint_for(&mut ctx, token_owner, token_hash);
+337
+338        // Then anyone should not be able to burn the token
+339        ctx.set_caller(anyone);
+340        let result = try_burn(&mut ctx, token_hash);
+341        assert_eq!(result.err(), Some(NameTokenError::NotWhitelisted.into()));
+342
+343        // When whitelist the anyone account
+344        whitelist_accounts(&mut ctx, vec![anyone]);
+345        // Then the anyone account should be able to burn the token
+346        ctx.set_caller(anyone);
+347        let result = try_burn(&mut ctx, token_hash);
+348        assert!(result.is_ok());
+349    }
+350
+351    #[test]
+352    fn burning_burnt_token_should_fail() {
+353        let mut ctx = TestContext::install_raw();
+354        ctx.whitelist_admin_in_name_token();
+355        // Given a token owned by alice
+356        let alice = ctx.alice;
+357        let token_hash = "token hash";
+358        let token_id = generate_token_id(token_hash);
+359        mint_for(&mut ctx, alice, token_hash);
+360        // When whitelist the token owner
+361        whitelist_accounts(&mut ctx, vec![alice]);
+362        assert!(ctx.token.token_exists(token_id));
+363        ctx.set_caller(alice);
+364        // Then the token owner should be able to burn the token
+365        assert!(try_burn(&mut ctx, token_hash).is_ok());
+366        // Then burning the token again should fail
+367        assert!(try_burn(&mut ctx, token_hash).is_err());
+368    }
+369
+370    #[test]
+371    fn burning_non_existent_token_should_fail() {
+372        let mut ctx = TestContext::install_raw();
+373        let alice = ctx.alice;
+374        // Given a non existent token
+375        let token_hash = "token hash";
+376        let token_id = generate_token_id(token_hash);
+377        assert!(!ctx.token.token_exists(token_id));
+378
+379        // Then burning the token should fail
+380        whitelist_accounts(&mut ctx, vec![alice]);
+381        ctx.set_caller(alice);
+382        assert!(try_burn(&mut ctx, token_hash).is_err());
+383    }
+384
+385    #[test]
+386    fn admin_transfer_of_multiple_tokens_should_work() {
+387        let mut ctx = TestContext::install_raw();
+388        ctx.whitelist_admin_in_name_token();
+389        let (alice, bob) = (ctx.alice, ctx.bob);
+390        // Given two tokens owned by alice
+391        let token_hashes = vec!["token_hash1".to_string(), "token_hash2".to_string()];
+392        let token_ids = token_hashes
+393            .iter()
+394            .map(|token_hash| generate_token_id(token_hash))
+395            .collect::<Vec<_>>();
+396        mint_for(&mut ctx, alice, &token_hashes[0]);
+397        mint_for(&mut ctx, alice, &token_hashes[1]);
+398
+399        // When admin transfer the tokens to bob
+400        whitelist_accounts(&mut ctx, vec![alice]);
+401        ctx.set_caller(alice);
+402        ctx.token.admin_transfer(bob, token_ids.clone());
+403        // Then bob should be the owner of the tokens
+404        assert!(ctx.token.try_assert_is_owner(token_ids[0], bob).is_ok());
+405        assert!(ctx.token.try_assert_is_owner(token_ids[1], bob).is_ok());
+406    }
+407
+408    #[test]
+409    fn admin_transfer_of_multiple_tokens_should_not_work_for_non_whitelisted_account() {
+410        let mut ctx = TestContext::install_raw();
+411        ctx.whitelist_admin_in_name_token();
+412        let (alice, bob) = (ctx.alice, ctx.bob);
+413        // Given two tokens owned by alice
+414        let token_hashes = vec!["token_hash1".to_string(), "token_hash2".to_string()];
+415        let token_ids = token_hashes
+416            .iter()
+417            .map(|token_hash| generate_token_id(token_hash))
+418            .collect::<Vec<_>>();
+419        mint_for(&mut ctx, alice, &token_hashes[0]);
+420        mint_for(&mut ctx, alice, &token_hashes[1]);
+421
+422        // When non whitelisted account tries to transfer the tokens
+423        ctx.set_caller(alice);
+424        assert_eq!(
+425            ctx.token.try_admin_transfer(bob, token_ids.clone()),
+426            Err(NameTokenError::NotWhitelisted.into())
+427        );
+428
+429        // Then bob should not be the owner of the tokens
+430        assert!(ctx.token.try_assert_is_owner(token_ids[0], bob).is_err());
+431        assert!(ctx.token.try_assert_is_owner(token_ids[1], bob).is_err());
+432    }
+433
+434    #[test]
+435    fn admin_transfer_of_non_existent_token_should_fail() {
+436        let mut ctx = TestContext::install_raw();
+437        ctx.whitelist_admin_in_name_token();
+438        let (alice, bob) = (ctx.alice, ctx.bob);
+439        // Given two tokens owned by alice
+440        let token_hashes = vec![
+441            "token_hash1".to_string(),
+442            "token_hash2".to_string(),
+443            "token_hash3".to_string(),
+444        ];
+445        let token_ids = token_hashes
+446            .iter()
+447            .map(|token_hash| generate_token_id(token_hash))
+448            .collect::<Vec<_>>();
+449        mint_for(&mut ctx, alice, &token_hashes[0]);
+450        mint_for(&mut ctx, alice, &token_hashes[1]);
+451
+452        // When admin transfer the tokens to bob
+453        whitelist_accounts(&mut ctx, vec![alice]);
+454        ctx.set_caller(alice);
+455        // Then the transfer fails
+456        assert!(ctx
+457            .token
+458            .try_admin_transfer(bob, token_ids.clone())
+459            .is_err());
+460        // Then the existing tokens should not be transferred
+461        assert!(ctx.token.try_assert_is_owner(token_ids[0], bob).is_err());
+462        assert!(ctx.token.try_assert_is_owner(token_ids[1], bob).is_err());
+463    }
+464
+465    #[test]
+466    fn only_owner_can_set_resolver() {
+467        let mut ctx = TestContext::install_raw();
+468        ctx.whitelist_admin_in_name_token();
+469        let (alice, bob) = (ctx.alice, ctx.bob);
+470        // Given a token owned by alice
+471        let token_hash = "token_hash";
+472        let token_id = generate_token_id(token_hash);
+473        mint_for(&mut ctx, alice, token_hash);
+474        // Then the token has no resolver
+475        assert_eq!(ctx.token.resolver(token_id), None);
+476
+477        // When bob tries to set the resolver
+478        let resolver = bob;
+479        ctx.set_caller(bob);
+480        // Then the operation should fail
+481        assert_eq!(
+482            ctx.token.try_set_resolver(token_id, resolver),
+483            Err(NameTokenError::InvalidTokenOwner.into())
+484        );
+485        // When alice sets the resolver
+486        ctx.set_caller(alice);
+487        ctx.token.set_resolver(token_id, resolver);
+488        // Then the resolver should be set
+489        assert_eq!(ctx.token.resolver(token_id), Some(resolver));
+490    }
+491
+492    #[test]
+493    fn test_is_token_valid() {
+494        let mut ctx = TestContext::install_raw();
+495        ctx.whitelist_admin_in_name_token();
+496        let alice = ctx.alice;
+497
+498        // Given a token with expiration time in furure
+499        let token_hash = "token_hash";
+500        let token_id = generate_token_id(token_hash);
+501        let expiration = INIT_TIME + 100;
+502        let asset_uri = "https://example.com/asset";
+503        ctx.set_caller(ctx.admin);
+504        let token_meta_data =
+505            NameTokenMetadata::with_no_resolver(token_hash, expiration, asset_uri);
+506        ctx.token.mint(alice, token_id, token_meta_data.to_vec());
+507        // Then the token should be valid
+508        assert!(ctx.token.is_token_valid(token_id));
+509        // When the expiration time is passed
+510        ctx.advance_block_time(expiration + 1);
+511        // Then the token should not be valid
+512        assert!(!ctx.token.is_token_valid(token_id));
+513    }
+514
+515    #[test]
+516    fn burnt_token_is_invalid() {
+517        let mut ctx = TestContext::install_raw();
+518        ctx.whitelist_admin_in_name_token();
+519        let alice = ctx.alice;
+520
+521        // Given a token with expiration time in furure
+522        let name = "token hash";
+523        let token_id = generate_token_id(name);
+524        let expiration = INIT_TIME + 100;
+525        let asset_uri = "https://example.com/asset";
+526        ctx.set_caller(ctx.admin);
+527        let token_meta_data = NameTokenMetadata::with_no_resolver(name, expiration, asset_uri);
+528        ctx.token.mint(alice, token_id, token_meta_data.to_vec());
+529        // Then the token should be valid
+530        assert!(ctx.token.is_token_valid(token_id));
+531
+532        // When the token is burnt
+533        whitelist_accounts(&mut ctx, vec![alice]);
+534        ctx.set_caller(alice);
+535        assert!(try_burn(&mut ctx, name).is_ok());
+536        // Then the token should not be valid
+537        assert!(!ctx.token.is_token_valid(token_id));
+538    }
+539
+540    #[test]
+541    fn only_whitelisted_user_can_set_default_resolver() {
+542        let mut ctx = TestContext::install_raw();
+543
+544        let resolver =
+545            Address::new("hash-7ba9daac84bebee8111c186588f21ebca35550b6cf1244e71768bd871938be6a")
+546                .unwrap();
+547        assert!(ctx.token.try_set_default_resolver(resolver).is_err());
+548
+549        ctx.whitelist_admin_in_name_token();
+550        assert!(ctx.token.try_set_default_resolver(resolver).is_ok());
+551
+552        assert_eq!(ctx.token.get_default_resolver(), resolver);
+553    }
+554
+555    #[test]
+556    fn transfer_from_operator_resets_resolver() {
+557        let mut ctx = TestContext::install_and_setup();
+558        let (alice, bob, anyone) = (ctx.alice, ctx.bob, ctx.anyone);
+559        let token_label = "token-label";
+560        let full_domain = format!("{}.cspr", token_label);
+561
+562        // Given Alice has a token.
+563        mint_for(&mut ctx, alice, token_label);
+564
+565        // Alice sets the resolver.
+566        ctx.set_caller(alice);
+567        ctx.default_resolver
+568            .set_resolution(full_domain.clone(), Some(anyone));
+569
+570        // Then the resolver points at some address.
+571        assert_eq!(
+572            ctx.default_resolver.resolve(full_domain.clone()),
+573            Some(anyone)
+574        );
+575
+576        // Given Alice sets Bob as an operator.
+577        ctx.token.approve_for_all(bob);
+578
+579        // Then Bob is an operator for Alice.
+580        assert!(ctx.token.is_approved_for_all(alice, bob));
+581
+582        // When Bob transfers the token to himself.
+583        let token_id = generate_token_id(token_label);
+584        ctx.set_caller(bob);
+585        ctx.token.transfer_from(alice, bob, token_id);
+586        assert!(ctx.token.try_assert_is_owner(token_id, bob).is_ok());
+587
+588        // Then the resolver is reset.
+589        assert_eq!(
+590            ctx.default_resolver.resolve(full_domain),
+591            None,
+592            "Resolver should be reset after transfer from operator"
+593        );
+594    }
+595
+596    #[test]
+597    fn test_revoke_whitelist() {
+598        let mut ctx = TestContext::install_raw();
+599        ctx.whitelist_admin_in_name_token();
+600        let alice = ctx.alice;
+601
+602        // Given Alice is whitelisted
+603        whitelist_accounts(&mut ctx, vec![alice]);
+604
+605        // When admin revokes Alice's whitelist
+606        ctx.set_caller(ctx.admin);
+607        let result = ctx.token.try_revoke_whitelist(alice);
+608        // Then it should succeed
+609        assert!(result.is_ok());
+610
+611        // When admin tries to revoke Alice's whitelist again
+612        let result = ctx.token.try_revoke_whitelist(alice);
+613        // Then it should fail with NotWhitelisted error
+614        assert_eq!(result.err(), Some(NameTokenError::NotWhitelisted.into()));
+615    }
+616
+617    #[test]
+618    fn test_whitelist() {
+619        let mut ctx = TestContext::install_raw();
+620        ctx.whitelist_admin_in_name_token();
+621        let alice = ctx.alice;
+622
+623        // When admin tries to whitelist Alice
+624        ctx.set_caller(ctx.admin);
+625        let result = ctx.token.try_whitelist(alice);
+626        // Then it should succeed
+627        assert!(result.is_ok());
+628
+629        // When admin tries to whitelist Alice again
+630        let result = ctx.token.try_whitelist(alice);
+631        // Then it should fail with WhitelistedAlready error
+632        assert_eq!(
+633            result.err(),
+634            Some(NameTokenError::WhitelistedAlready.into())
+635        );
+636    }
+637
+638    fn mint_for(ctx: &mut TestContext, owner: Address, name: &str) -> U256 {
+639        ctx.set_caller(ctx.admin);
+640        let token_metadata =
+641            NameTokenMetadata::with_no_resolver(name, INIT_TIME + TOKEN_EXPIRATION, "");
+642        let token_id = generate_token_id(name);
+643        ctx.token.mint(owner, token_id, token_metadata.to_vec());
+644        token_id
+645    }
+646
+647    fn whitelist_accounts(ctx: &mut TestContext, accounts: Vec<Address>) {
+648        ctx.set_caller(ctx.admin);
+649        for account in accounts {
+650            ctx.token.whitelist(account);
+651        }
+652    }
+653
+654    fn try_burn(ctx: &mut TestContext, token_hash: &str) -> OdraResult<()> {
+655        let token_id = generate_token_id(token_hash);
+656        ctx.token.try_burn(token_id)
+657    }
+658}
\ No newline at end of file diff --git a/docs/src/casper_name_contracts/contracts/registrar.rs.html b/docs/src/casper_name_contracts/contracts/registrar.rs.html new file mode 100644 index 0000000..fd8aee3 --- /dev/null +++ b/docs/src/casper_name_contracts/contracts/registrar.rs.html @@ -0,0 +1,997 @@ +registrar.rs - source

casper_name_contracts/contracts/
registrar.rs

1use core::ops::DerefMut;
+2use odra::casper_types::U256;
+3use odra::module::Revertible;
+4use odra::prelude::*;
+5use odra::ContractRef;
+6use odra_modules::access::{AccessControl, Role, DEFAULT_ADMIN_ROLE};
+7use odra_modules::security::Pauseable;
+8
+9use crate::{
+10    contracts::{name_token::NameTokenContractRef, token_id::ToTokenId},
+11    data_structures::{
+12        ExpirableVoucher, NameMintInfo, NameTokenMetadata, RenewalVoucher, TokenRenewalInfo,
+13        TokenizationVoucher,
+14    },
+15};
+16
+17use super::resolver::ResolverContractRef;
+18use super::utils;
+19
+20pub const CONTROLLER_ROLE: Role = [2u8; 32];
+21// Reminting should be possible after 5 days.
+22const PENDING_DELETE_PERIOD: u64 = 5 * 24 * 60 * 60 * 1000; // 5 days
+23const MAX_GRACE_PERIOD: u64 = 365 * 24 * 60 * 60 * 1000; // 365 days
+24
+25/// Event emitted when the grace period is changed.
+26#[odra::event]
+27pub struct GracePeriodChanged {
+28    new_grace_period: u64,
+29}
+30
+31/// Registrar smart contract. It handles the registration and expiration of name tokens.
+32#[odra::module(errors = RegistrarError, events = [GracePeriodChanged])]
+33pub struct Registrar {
+34    name_token: External<NameTokenContractRef>,
+35    access_control: SubModule<AccessControl>,
+36    grace_period: Var<u64>,
+37    pauseable: SubModule<Pauseable>,
+38}
+39
+40#[odra::module]
+41impl Registrar {
+42    delegate! {
+43        to self.access_control {
+44            fn has_role(&self, role: &Role, address: &Address) -> bool;
+45            fn grant_role(&mut self, role: &Role, address: &Address);
+46            fn revoke_role(&mut self, role: &Role, address: &Address);
+47        }
+48
+49        to self.pauseable {
+50            fn is_paused(&self) -> bool;
+51        }
+52    }
+53
+54    /// Initializes the registrar with the name token contract address.
+55    pub fn init(&mut self, name_token: Address) {
+56        if !name_token.is_contract() {
+57            self.revert(RegistrarError::NameTokenIsNotValid);
+58        }
+59        let caller = self.env().caller();
+60
+61        // Set NameToken address.
+62        self.name_token.set(name_token);
+63
+64        // Init grace period to 0.
+65        self.grace_period.set(0);
+66
+67        // Setup roles.
+68        self.access_control
+69            .unchecked_grant_role(&DEFAULT_ADMIN_ROLE, &caller);
+70        self.access_control
+71            .unchecked_grant_role(&CONTROLLER_ROLE, &caller);
+72    }
+73
+74    /// Temporarily stops the contract.
+75    pub fn pause(&mut self) {
+76        self.assert_caller_is_admin();
+77        self.pauseable.pause();
+78    }
+79
+80    /// Returns to normal operation.
+81    pub fn unpause(&mut self) {
+82        self.assert_caller_is_admin();
+83        self.pauseable.unpause();
+84    }
+85
+86    /// Returns the grace period.
+87    pub fn grace_period(&self) -> u64 {
+88        self.grace_period.get().unwrap_or_revert(self)
+89    }
+90
+91    /// Try to resolve a full domain name to an address.
+92    pub fn resolve(&self, full_domain: String) -> Option<Address> {
+93        let token_name = utils::extract_token_name(&full_domain)?;
+94        let token_hash = self.token_id(token_name);
+95        if !self.name_token.is_token_valid(token_hash) {
+96            return None;
+97        }
+98
+99        match self.name_token.resolver(token_hash) {
+100            Some(address) => self.resolver(address).resolve(full_domain),
+101            None => None,
+102        }
+103    }
+104
+105    // Public functions.
+106
+107    /// Expire a list of tokens if they are expired.
+108    pub fn expire(&mut self, token_ids: Vec<U256>) {
+109        self.pauseable.require_not_paused();
+110        let block_time = self.env().get_block_time();
+111        let grace_period = self.grace_period();
+112        for token_id in token_ids {
+113            self.expire_single(token_id, block_time, grace_period);
+114        }
+115    }
+116
+117    /// Admin only. Sets the grace period.
+118    pub fn set_grace_period(&mut self, period: u64) {
+119        self.assert_caller_is_admin();
+120        if period > MAX_GRACE_PERIOD {
+121            self.revert(RegistrarError::GracePeriodTooLong);
+122        }
+123        self.grace_period.set(period);
+124        self.env().emit_event(GracePeriodChanged {
+125            new_grace_period: period,
+126        });
+127    }
+128
+129    /// Admin only. Transfer ownership of a list of tokens.
+130    pub fn admin_transfer(&mut self, new_owner: Address, token_ids: Vec<U256>) {
+131        self.assert_caller_is_admin();
+132        self.name_token.admin_transfer(new_owner, token_ids);
+133    }
+134
+135    /// Admin only. Burn a list of tokens.
+136    pub fn admin_burn(&mut self, token_ids: Vec<U256>) {
+137        self.assert_caller_is_admin();
+138        let name_token = self.name_token.deref_mut();
+139        for id in token_ids {
+140            name_token.burn(id);
+141        }
+142    }
+143
+144    /// Admin only. Prolong the expiration date of a list of tokens.
+145    pub fn admin_prolong(&mut self, tokens: Vec<TokenRenewalInfo>) {
+146        self.assert_caller_is_admin();
+147        self.prolong(tokens);
+148    }
+149
+150    /// Admin only. Register a list of tokens.
+151    pub fn admin_register(&mut self, names: Vec<NameMintInfo>) {
+152        self.assert_caller_is_admin();
+153        self.register(names);
+154    }
+155
+156    /// Admin only. Prolong the expiration date of a list of tokens and register a list of tokens.
+157    pub fn admin_prolong_and_register(
+158        &mut self,
+159        renewal_tokens: Vec<TokenRenewalInfo>,
+160        new_tokens: Vec<NameMintInfo>,
+161    ) {
+162        self.assert_caller_is_admin();
+163        self.prolong(renewal_tokens);
+164        self.register(new_tokens);
+165    }
+166
+167    /// Controller only. Prolong the expiration date of a list of tokens.
+168    pub fn controller_prolong(&mut self, voucher: RenewalVoucher) {
+169        self.pauseable.require_not_paused();
+170        self.assert_caller_is_controller();
+171        self.assert_voucher_not_expired(&voucher);
+172        self.prolong(voucher.tokens);
+173    }
+174
+175    /// Controller only. Register a list of tokens.
+176    pub fn controller_register(&mut self, voucher: TokenizationVoucher) {
+177        self.pauseable.require_not_paused();
+178        self.assert_voucher_not_expired(&voucher);
+179        self.assert_caller_is_controller();
+180        self.register(voucher.names);
+181    }
+182
+183    /// Controller only. Prolong the expiration date of a list of tokens and register a list of tokens.
+184    pub fn controller_prolong_and_register(
+185        &mut self,
+186        renewal_voucher: RenewalVoucher,
+187        tokenization_voucher: TokenizationVoucher,
+188    ) {
+189        self.pauseable.require_not_paused();
+190        self.assert_caller_is_controller();
+191        self.assert_voucher_not_expired(&renewal_voucher);
+192        self.assert_voucher_not_expired(&tokenization_voucher);
+193        self.prolong(renewal_voucher.tokens);
+194        self.register(tokenization_voucher.names);
+195    }
+196}
+197
+198impl Registrar {
+199    fn assert_caller_is_controller(&self) {
+200        self.access_control
+201            .check_role(&CONTROLLER_ROLE, &self.env().caller());
+202    }
+203
+204    fn assert_caller_is_admin(&self) {
+205        self.access_control
+206            .check_role(&DEFAULT_ADMIN_ROLE, &self.env().caller());
+207    }
+208
+209    fn assert_in_renewal_period(&mut self, expiration: u64) {
+210        let grace_period = self.grace_period();
+211        let block_time = self.env().get_block_time();
+212        if block_time > expiration + grace_period {
+213            self.revert(RegistrarError::GracePeriodExpired);
+214        }
+215    }
+216
+217    fn assert_token_expires_in_future(&self, token_expiration: u64, block_time: u64) {
+218        if token_expiration < block_time {
+219            self.revert(RegistrarError::ExpirationDateInThePast);
+220        }
+221    }
+222
+223    fn expire_single(&mut self, token_id: U256, block_time: u64, grace_period: u64) {
+224        let metadata = self.wrapped_metadata(token_id);
+225        let token_expiration = metadata.expiration();
+226        if self.is_token_expired(token_expiration, grace_period, block_time) {
+227            self.name_token.burn(token_id);
+228        }
+229    }
+230
+231    #[inline]
+232    fn assert_token_expired(&self, token_expiration: u64, block_time: u64) {
+233        let grace_period = self.grace_period();
+234        if !self.is_token_expired(token_expiration, grace_period, block_time) {
+235            self.revert(RegistrarError::TokenNotExpired);
+236        }
+237    }
+238
+239    #[inline]
+240    fn assert_voucher_not_expired<T: ExpirableVoucher>(&self, voucher: &T) {
+241        let block_time = self.env().get_block_time();
+242        if voucher.expiration_time() < block_time {
+243            self.revert(RegistrarError::VoucherExpired);
+244        }
+245    }
+246
+247    #[inline]
+248    fn resolver(&self, address: Address) -> ResolverContractRef {
+249        ResolverContractRef::new(self.env(), address)
+250    }
+251
+252    #[inline]
+253    fn wrapped_metadata(&self, token_id: U256) -> NameTokenMetadata {
+254        self.name_token
+255            .token_metadata(token_id)
+256            .try_into()
+257            .unwrap_or_revert(self)
+258    }
+259
+260    #[inline]
+261    fn is_token_expired(&self, token_expiration: u64, grace_period: u64, block_time: u64) -> bool {
+262        block_time > token_expiration + grace_period + PENDING_DELETE_PERIOD
+263    }
+264
+265    fn prolong(&mut self, tokens: Vec<TokenRenewalInfo>) {
+266        let block_time = self.env().get_block_time();
+267        for token in tokens {
+268            // verify the new expiration date is in the future
+269            self.assert_token_expires_in_future(token.token_expiration, block_time);
+270            // Compute token hash.
+271            let token_id = token.token_id;
+272            // get the token metadata
+273            let mut metadata = self.wrapped_metadata(token_id);
+274            // check if the time for the renewal does not elapsed
+275            let expiration = metadata.expiration();
+276            self.assert_in_renewal_period(expiration);
+277            metadata.set_expiration(token.token_expiration);
+278
+279            self.name_token
+280                .set_token_metadata(token_id, metadata.to_vec());
+281        }
+282    }
+283
+284    fn register(&mut self, names: Vec<NameMintInfo>) {
+285        let block_time = self.env().get_block_time();
+286        for info in names {
+287            self.assert_token_expires_in_future(info.token_expiration, block_time);
+288            if !utils::is_label_valid(&info.label) {
+289                self.revert(RegistrarError::TokenNameIsNotValid);
+290            }
+291            let metadata = NameTokenMetadata::with_resolver(
+292                &info.label,
+293                info.token_expiration,
+294                &info.asset_uri,
+295                self.name_token.get_default_resolver(),
+296            );
+297            // Compute token hash.
+298            let token_id = self.token_id(info.label);
+299
+300            // Check if token already exists.
+301            let token_exists = self.name_token.token_exists(token_id);
+302
+303            // If token exists and is expired and grace period is over, burn it.
+304            if token_exists {
+305                let metadata = self.wrapped_metadata(token_id);
+306                self.assert_token_expired(metadata.expiration(), block_time);
+307                self.name_token.burn(token_id);
+308            }
+309
+310            // Mint token.
+311            self.name_token
+312                .mint(info.owner, token_id, metadata.to_vec());
+313        }
+314    }
+315}
+316
+317#[odra::odra_error]
+318pub enum RegistrarError {
+319    ExpirationDateInThePast = 1201,
+320    TokenNotExpired = 1202,
+321    GracePeriodExpired = 1203,
+322    VoucherExpired = 1204,
+323    TokenDoesNotExist = 1205,
+324    GracePeriodTooLong = 1206,
+325    NameTokenIsNotValid = 1207,
+326    TokenNameIsNotValid = 1208,
+327}
+328
+329#[cfg(test)]
+330mod tests {
+331    use super::*;
+332    use crate::{
+333        data_structures::TokenRenewalInfo,
+334        test_context::{
+335            generate_token_id, TestContext, GRACE_PERIOD, INIT_TIME, TOKEN_EXPIRATION, TOKEN_NAME,
+336        },
+337    };
+338    use odra::{
+339        casper_event_standard::EventInstance,
+340        host::{Deployer, HostRef},
+341    };
+342    use odra_modules::{access::errors::Error as AccessControlError, cep95::Burn};
+343
+344    #[test]
+345    fn deploy_fails_if_account_set_as_name_token() {
+346        let env = odra_test::env();
+347        let result = Registrar::try_deploy(
+348            &env,
+349            RegistrarInitArgs {
+350                name_token: env.get_account(1),
+351            },
+352        );
+353        assert!(result.is_err());
+354    }
+355
+356    #[test]
+357    fn test_admin_can_manage_controller_role() {
+358        let mut ctx = TestContext::install_raw();
+359        let (env, reg) = (ctx.env, &mut ctx.registrar);
+360        let (admin, alice) = (ctx.admin, ctx.alice);
+361
+362        // Alice has no role.
+363        assert!(!reg.has_role(&CONTROLLER_ROLE, &alice));
+364
+365        // Alice can't grant roles.
+366        env.set_caller(alice);
+367        let result = reg.try_grant_role(&CONTROLLER_ROLE, &alice);
+368        assert_eq!(result.unwrap_err(), AccessControlError::MissingRole.into());
+369
+370        // Admin can grant roles.
+371        env.set_caller(admin);
+372        reg.grant_role(&CONTROLLER_ROLE, &alice);
+373        assert!(reg.has_role(&CONTROLLER_ROLE, &alice));
+374
+375        // Alice can't revoke roles.
+376        env.set_caller(alice);
+377        let result = reg.try_revoke_role(&CONTROLLER_ROLE, &alice);
+378        assert_eq!(result.unwrap_err(), AccessControlError::MissingRole.into());
+379
+380        // Admin can revoke roles.
+381        env.set_caller(admin);
+382        reg.revoke_role(&CONTROLLER_ROLE, &alice);
+383        assert!(!reg.has_role(&CONTROLLER_ROLE, &alice));
+384    }
+385
+386    #[test]
+387    fn test_admin_can_manage_grace_period() {
+388        let mut ctx = TestContext::install_raw();
+389        let (env, reg) = (ctx.env, &mut ctx.registrar);
+390        let (admin, alice) = (ctx.admin, ctx.alice);
+391
+392        // Given the initial grace period is 0.
+393        assert_eq!(reg.grace_period(), 0);
+394
+395        // When Admin sets grace period.
+396        env.set_caller(admin);
+397        reg.set_grace_period(100);
+398
+399        // Then grace period is changed.
+400        assert_eq!(reg.grace_period(), 100);
+401
+402        // When Alice tries to set grace period.
+403        env.set_caller(alice);
+404        let result = reg.try_set_grace_period(200);
+405        assert_eq!(result, Err(AccessControlError::MissingRole.into()));
+406
+407        // Then grace period is not changed.
+408        assert_eq!(reg.grace_period(), 100);
+409    }
+410
+411    #[test]
+412    fn test_grace_period_too_long() {
+413        let mut ctx = TestContext::install_raw();
+414        let (env, reg) = (ctx.env, &mut ctx.registrar);
+415        let admin = ctx.admin;
+416
+417        // When Admin sets too long grace period.
+418        env.set_caller(admin);
+419        let result = reg.try_set_grace_period(MAX_GRACE_PERIOD + 1);
+420
+421        // Then it fails with error.
+422        assert_eq!(result, Err(RegistrarError::GracePeriodTooLong.into()));
+423    }
+424
+425    #[test]
+426    fn test_set_grace_period_emits_event() {
+427        let mut ctx = TestContext::install_raw();
+428        let (env, reg) = (ctx.env, &mut ctx.registrar);
+429        let admin = ctx.admin;
+430
+431        // When Admin sets grace period.
+432        env.set_caller(admin);
+433        reg.set_grace_period(MAX_GRACE_PERIOD);
+434
+435        // Then the contract emits GracePeriodChanged event.
+436        assert!(env.emitted(reg, GracePeriodChanged::name()));
+437    }
+438
+439    #[test]
+440    fn register_with_past_expiration_time_fails() {
+441        let mut ctx = TestContext::install_and_setup();
+442        let (admin, alice) = (ctx.admin, ctx.alice);
+443
+444        // When Admin try to register with expiration time in past.
+445        let token_expiration = INIT_TIME - 1;
+446        let voucher_expiration = ctx.voucher_expiration_time();
+447        let result = ctx.try_name_register(
+448            admin,
+449            alice,
+450            TOKEN_NAME,
+451            token_expiration,
+452            voucher_expiration,
+453        );
+454
+455        // Then registration fails.
+456        assert_eq!(result, Err(RegistrarError::ExpirationDateInThePast.into()));
+457    }
+458
+459    #[test]
+460    fn register_with_expired_voucher_fails() {
+461        let mut ctx = TestContext::install_and_setup();
+462        let (admin, alice) = (ctx.admin, ctx.alice);
+463
+464        // When Admin try to register with expiration time in past.
+465        let token_expiration = ctx.token_expiration_time();
+466        let voucher_expiration = INIT_TIME - 1;
+467        let result = ctx.try_name_register(
+468            admin,
+469            alice,
+470            TOKEN_NAME,
+471            token_expiration,
+472            voucher_expiration,
+473        );
+474
+475        // Then registration fails.
+476        assert_eq!(result, Err(RegistrarError::VoucherExpired.into()));
+477    }
+478
+479    #[test]
+480    fn register_invalid_label_fails() {
+481        let mut ctx = TestContext::install_and_setup();
+482        let (admin, alice) = (ctx.admin, ctx.alice);
+483        let invalid_name = "invalid-label-";
+484
+485        // When Admin tries to register an invalid label.
+486        let result = ctx.try_name_register(
+487            admin,
+488            alice,
+489            invalid_name,
+490            ctx.token_expiration_time(),
+491            ctx.voucher_expiration_time(),
+492        );
+493
+494        // Then registration fails.
+495        assert_eq!(
+496            result.unwrap_err(),
+497            OdraError::from(RegistrarError::TokenNameIsNotValid)
+498        );
+499    }
+500
+501    #[test]
+502    fn test_register_successful_mint() {
+503        let mut ctx = TestContext::install_and_setup();
+504        let (admin, alice) = (ctx.admin, ctx.alice);
+505
+506        // When Admin try to register with expiration time in future.
+507        ctx.with_name_registered(admin, alice, TOKEN_NAME);
+508
+509        // Then token is minted.
+510        ctx.expect_name_is_registered(alice, TOKEN_NAME);
+511    }
+512
+513    #[test]
+514    fn register_the_same_name_before_expiration() {
+515        let mut ctx = TestContext::install_and_setup();
+516        let (admin, alice) = (ctx.admin, ctx.alice);
+517
+518        // Given Alice has a token.
+519        ctx.with_name_registered(admin, alice, TOKEN_NAME);
+520
+521        // And token not expired.
+522        ctx.advance_block_time(TOKEN_EXPIRATION / 2);
+523
+524        // When Admin tries to register the same token again.
+525        let result = ctx.try_name_register(
+526            admin,
+527            alice,
+528            TOKEN_NAME,
+529            ctx.token_expiration_time(),
+530            ctx.voucher_expiration_time(),
+531        );
+532
+533        // Then registration fails.
+534        assert_eq!(result, Err(RegistrarError::TokenNotExpired.into()));
+535    }
+536
+537    #[test]
+538    fn register_the_same_name_before_grace_period() {
+539        let mut ctx = TestContext::install_and_setup();
+540        let (admin, alice) = (ctx.admin, ctx.alice);
+541
+542        // Given Alice has a token.
+543        ctx.with_name_registered(admin, alice, TOKEN_NAME);
+544
+545        // And token expired, but within grace period.
+546        ctx.advance_block_time(TOKEN_EXPIRATION + GRACE_PERIOD + PENDING_DELETE_PERIOD - 1);
+547
+548        // When Admin tries to register the same token again.
+549        let result = ctx.try_name_register(
+550            admin,
+551            alice,
+552            TOKEN_NAME,
+553            ctx.token_expiration_time(),
+554            ctx.voucher_expiration_time(),
+555        );
+556
+557        // Then registration fails.
+558        assert_eq!(result, Err(RegistrarError::TokenNotExpired.into()));
+559    }
+560
+561    #[test]
+562    fn register_the_same_name_after_grace_period() {
+563        let mut ctx = TestContext::install_and_setup();
+564        let (admin, alice, bob) = (ctx.admin, ctx.alice, ctx.bob);
+565        // Given Alice has a token.
+566        ctx.with_name_registered(admin, alice, TOKEN_NAME);
+567
+568        // And token expired, and grace period is over.
+569        ctx.advance_block_time(TOKEN_EXPIRATION + GRACE_PERIOD + PENDING_DELETE_PERIOD + 1);
+570
+571        // When Admin tries to register the same token again.
+572        ctx.with_name_registered(admin, bob, TOKEN_NAME);
+573
+574        // Then Alice's token is burned.
+575        let event: Burn = ctx.token.get_event(-4).unwrap();
+576        let expected = Burn {
+577            from: alice,
+578            token_id: generate_token_id(TOKEN_NAME),
+579        };
+580        assert_eq!(event, expected);
+581
+582        // And Bob's token is minted.
+583        ctx.expect_name_is_registered(bob, TOKEN_NAME);
+584    }
+585
+586    #[test]
+587    fn test_token_expiration_after_grace_period() {
+588        let mut ctx = TestContext::install_and_setup();
+589        let (admin, alice) = (ctx.admin, ctx.alice);
+590
+591        // Given Alice has a token.
+592        ctx.with_name_registered(admin, alice, TOKEN_NAME);
+593
+594        // And is after grace period.
+595        ctx.advance_block_time(TOKEN_EXPIRATION + GRACE_PERIOD + PENDING_DELETE_PERIOD + 1);
+596
+597        // When anyone tries to expire the token.
+598        ctx.with_name_expired(TOKEN_NAME);
+599
+600        // Then token is burned.
+601        assert_eq!(ctx.token.balance_of(alice), U256::zero());
+602    }
+603
+604    #[test]
+605    fn on_expiration_default_resolver_is_invalidated() {
+606        let mut ctx = TestContext::install_and_setup();
+607        let (admin, alice) = (ctx.admin, ctx.alice);
+608
+609        let full_domain = format!("{}.cspr", TOKEN_NAME);
+610
+611        // Given Alice has a token.
+612        ctx.with_name_registered(admin, alice, TOKEN_NAME);
+613        // And a resolution for the token is set.
+614        ctx.set_caller(alice);
+615        ctx.default_resolver
+616            .set_resolution(full_domain.clone(), Some(alice));
+617        assert_eq!(
+618            ctx.default_resolver.resolve(full_domain.clone()),
+619            Some(alice)
+620        );
+621        assert_eq!(
+622            ctx.token.resolver(generate_token_id(TOKEN_NAME)),
+623            Some(ctx.default_resolver.address())
+624        );
+625
+626        // And is after grace period.
+627        ctx.advance_block_time(TOKEN_EXPIRATION + GRACE_PERIOD + PENDING_DELETE_PERIOD + 1);
+628
+629        // When anyone tries to expire the token.
+630        ctx.with_name_expired(TOKEN_NAME);
+631
+632        // Then the resolution is cleared.
+633        assert_eq!(ctx.default_resolver.resolve(full_domain), None);
+634    }
+635
+636    #[test]
+637    fn test_multi_tokens_expiration_after_grace_period() {
+638        let mut ctx = TestContext::install_and_setup();
+639        let (admin, alice) = (ctx.admin, ctx.alice);
+640        let tokens = vec!["t1", "t2", "t3", "t4", "t5"];
+641
+642        // Given Alice has 5 tokens.
+643        ctx.with_multi_names_registered(admin, alice, tokens.clone());
+644        assert_eq!(ctx.token.balance_of(alice), U256::from(5));
+645        // And is after grace period.
+646        ctx.advance_block_time(TOKEN_EXPIRATION + GRACE_PERIOD + PENDING_DELETE_PERIOD + 1);
+647
+648        // When anyone tries to expire the tokens.
+649        ctx.with_names_expired(tokens);
+650
+651        // Then all the tokens are burned.
+652        assert_eq!(ctx.token.balance_of(alice), U256::from(0));
+653    }
+654
+655    #[test]
+656    fn test_admin_transfer() {
+657        let mut ctx = TestContext::install_and_setup();
+658        let (admin, alice, bob) = (ctx.admin, ctx.alice, ctx.bob);
+659
+660        // Given Alice has a token.
+661        ctx.with_name_registered(admin, alice, TOKEN_NAME);
+662
+663        ctx.admin_transfer(bob, vec![TOKEN_NAME]);
+664
+665        // Then Alice's token is transferred to Bob.
+666        assert_eq!(ctx.token.balance_of(alice), U256::from(0));
+667        assert_eq!(ctx.token.balance_of(bob), U256::from(1));
+668    }
+669
+670    #[test]
+671    fn test_admin_transfer_clears_default_resolver() {
+672        let mut ctx = TestContext::install_and_setup();
+673        let (admin, alice, bob) = (ctx.admin, ctx.alice, ctx.bob);
+674        let full_domain = format!("{}.cspr", TOKEN_NAME);
+675
+676        // Given Alice has a token.
+677        ctx.with_name_registered(admin, alice, TOKEN_NAME);
+678
+679        // And a resolution for the token is set
+680        ctx.set_caller(alice);
+681        ctx.default_resolver
+682            .set_resolution(full_domain.clone(), Some(alice));
+683        assert_eq!(
+684            ctx.default_resolver.resolve(full_domain.clone()),
+685            Some(alice)
+686        );
+687        assert_eq!(
+688            ctx.token.resolver(generate_token_id(TOKEN_NAME)),
+689            Some(ctx.default_resolver.address())
+690        );
+691
+692        ctx.admin_transfer(bob, vec![TOKEN_NAME]);
+693
+694        // Then the resolution is cleared.
+695        assert_eq!(ctx.default_resolver.resolve(full_domain), None);
+696    }
+697
+698    #[test]
+699    fn test_admin_transfer_sets_default_resolver() {
+700        let mut ctx = TestContext::install_and_setup();
+701        let (admin, alice, bob) = (ctx.admin, ctx.alice, ctx.bob);
+702
+703        // Given Alice has a token.
+704        ctx.with_name_registered(admin, alice, TOKEN_NAME);
+705
+706        // And change the resolver
+707        let resolver =
+708            Address::new("hash-7ba9daac84bebee8111c186588f21ebca35550b6cf1244e71768bd871938be6a")
+709                .unwrap();
+710        ctx.set_caller(alice);
+711        ctx.token
+712            .set_resolver(generate_token_id(TOKEN_NAME), resolver);
+713
+714        let json = ctx.token.token_metadata(generate_token_id(TOKEN_NAME));
+715        let actual_resolver = NameTokenMetadata::try_from(json)
+716            .unwrap()
+717            .resolver()
+718            .unwrap();
+719        assert_eq!(actual_resolver, Some(resolver));
+720
+721        ctx.admin_transfer(bob, vec![TOKEN_NAME]);
+722
+723        // Then the resolution is cleared.
+724        let json = ctx.token.token_metadata(generate_token_id(TOKEN_NAME));
+725        let actual_resolver = NameTokenMetadata::try_from(json)
+726            .unwrap()
+727            .resolver()
+728            .unwrap();
+729        assert_eq!(actual_resolver, Some(ctx.token.get_default_resolver()));
+730    }
+731
+732    #[test]
+733    fn test_admin_burn() {
+734        let mut ctx = TestContext::install_and_setup();
+735        let (admin, alice) = (ctx.admin, ctx.alice);
+736
+737        // Given Alice has a token.
+738        ctx.with_name_registered(admin, alice, TOKEN_NAME);
+739
+740        ctx.admin_burn(vec![TOKEN_NAME]);
+741
+742        // Then Alice's token is burned.
+743        assert_eq!(ctx.token.balance_of(alice), U256::from(0));
+744    }
+745
+746    #[test]
+747    fn test_admin_burn_clears_default_resolver() {
+748        let mut ctx = TestContext::install_and_setup();
+749        let (admin, alice) = (ctx.admin, ctx.alice);
+750        let full_domain = format!("{}.cspr", TOKEN_NAME);
+751
+752        // Given Alice has a token.
+753        ctx.with_name_registered(admin, alice, TOKEN_NAME);
+754
+755        // And a resolution for the token is set
+756        ctx.set_caller(alice);
+757        ctx.default_resolver
+758            .set_resolution(full_domain.clone(), Some(alice));
+759        assert_eq!(
+760            ctx.default_resolver.resolve(full_domain.clone()),
+761            Some(alice)
+762        );
+763        assert_eq!(
+764            ctx.token.resolver(generate_token_id(TOKEN_NAME)),
+765            Some(ctx.default_resolver.address())
+766        );
+767
+768        ctx.admin_burn(vec![TOKEN_NAME]);
+769
+770        // Then the resolution is cleared.
+771        assert_eq!(ctx.default_resolver.resolve(full_domain), None);
+772    }
+773
+774    #[test]
+775    fn renew_with_expired_voucher_fails() {
+776        let mut ctx = TestContext::install_and_setup();
+777        let (admin, alice) = (ctx.admin, ctx.alice);
+778
+779        // Given Alice has a token.
+780        ctx.with_name_registered(admin, alice, TOKEN_NAME);
+781
+782        // When Admin tries to renew the token.
+783        ctx.set_caller(admin);
+784
+785        let token_expiration = INIT_TIME + 2 * TOKEN_EXPIRATION;
+786        let voucher_expiration = INIT_TIME + TOKEN_EXPIRATION;
+787        let tokens = vec![TokenRenewalInfo::new(
+788            generate_token_id(TOKEN_NAME),
+789            token_expiration,
+790        )];
+791        let voucher = RenewalVoucher::new(tokens, voucher_expiration);
+792        ctx.advance_block_time(TOKEN_EXPIRATION + GRACE_PERIOD - 1);
+793        let result = ctx.registrar.try_controller_prolong(voucher);
+794
+795        // Then registration fails.
+796        assert_eq!(result, Err(RegistrarError::VoucherExpired.into()));
+797    }
+798
+799    #[test]
+800    fn renew_when_paused_fails() {
+801        let mut ctx = TestContext::install_and_setup();
+802        let (admin, alice) = (ctx.admin, ctx.alice);
+803
+804        // Given Alice has a token.
+805        ctx.with_name_registered(admin, alice, TOKEN_NAME);
+806        ctx.set_caller(admin);
+807        ctx.registrar.pause();
+808
+809        // When Admin tries to renew the token.
+810        let token_expiration = INIT_TIME + 2 * TOKEN_EXPIRATION;
+811        let voucher_expiration = INIT_TIME + TOKEN_EXPIRATION;
+812        let tokens = vec![TokenRenewalInfo::new(
+813            generate_token_id(TOKEN_NAME),
+814            token_expiration,
+815        )];
+816        let voucher = RenewalVoucher::new(tokens, voucher_expiration);
+817        let result = ctx.registrar.try_controller_prolong(voucher);
+818
+819        // Then registration fails.
+820        assert_eq!(
+821            result,
+822            Err(odra_modules::security::errors::Error::UnpausedRequired.into())
+823        );
+824    }
+825
+826    #[test]
+827    fn test_renew() {
+828        let mut ctx = TestContext::install_and_setup();
+829        let (admin, alice) = (ctx.admin, ctx.alice);
+830
+831        // Given Alice has a token.
+832        ctx.with_name_registered(admin, alice, TOKEN_NAME);
+833
+834        ctx.advance_block_time(TOKEN_EXPIRATION + GRACE_PERIOD - 1);
+835        // When Admin tries to renew the token.
+836        let test_token_name = TOKEN_NAME;
+837        let token_expiration = INIT_TIME + 2 * TOKEN_EXPIRATION;
+838        let voucher_expiration = INIT_TIME + TOKEN_EXPIRATION + GRACE_PERIOD;
+839        let tokens = vec![TokenRenewalInfo::new(
+840            generate_token_id(test_token_name),
+841            token_expiration,
+842        )];
+843        let voucher = RenewalVoucher::new(tokens, voucher_expiration);
+844        ctx.set_caller(admin);
+845        ctx.registrar.controller_prolong(voucher);
+846
+847        // Then token expiration is updated.
+848        let metadata = ctx.token.token_metadata(generate_token_id(test_token_name));
+849        let expected = NameTokenMetadata::with_resolver(
+850            TOKEN_NAME,
+851            INIT_TIME + 2 * TOKEN_EXPIRATION,
+852            "",
+853            ctx.default_resolver.address(),
+854        );
+855        assert_eq!(metadata, expected.to_vec());
+856    }
+857
+858    #[test]
+859    fn test_renew_after_grace_period_fails() {
+860        let mut ctx = TestContext::install_and_setup();
+861        let (admin, alice) = (ctx.admin, ctx.alice);
+862
+863        // Given Alice has a token.
+864        ctx.with_name_registered(admin, alice, TOKEN_NAME);
+865
+866        ctx.advance_block_time(TOKEN_EXPIRATION + GRACE_PERIOD + 1);
+867        // When Admin tries to renew the token.
+868        let test_token_name = TOKEN_NAME;
+869        let token_expiration = INIT_TIME + 2 * TOKEN_EXPIRATION;
+870        let voucher_expiration = INIT_TIME + TOKEN_EXPIRATION + GRACE_PERIOD + 1;
+871        let tokens = vec![TokenRenewalInfo::new(
+872            generate_token_id(test_token_name),
+873            token_expiration,
+874        )];
+875        let voucher = RenewalVoucher::new(tokens, voucher_expiration);
+876        ctx.set_caller(admin);
+877        let result = ctx.registrar.try_controller_prolong(voucher);
+878
+879        // Then registration fails.
+880        assert_eq!(result, Err(RegistrarError::GracePeriodExpired.into()));
+881    }
+882
+883    #[test]
+884    fn resolve_with_invalid_domain() {
+885        let mut ctx = TestContext::install_and_setup();
+886        let (admin, alice) = (ctx.admin, ctx.alice);
+887        let full_domain = "invalid".to_string();
+888
+889        // Given Alice has a token.
+890        ctx.with_name_registered(admin, alice, TOKEN_NAME);
+891
+892        // When anyone tries to resolve an invalid domain.
+893        let result = ctx.registrar.resolve(full_domain);
+894
+895        // Then the result is None.
+896        assert_eq!(result, None);
+897    }
+898
+899    #[test]
+900    fn resolve_with_invalid_token() {
+901        let ctx = TestContext::install_and_setup();
+902        let full_domain = "odra.cspr".to_string();
+903
+904        // When anyone tries to resolve an invalid domain.
+905        let result = ctx.registrar.resolve(full_domain);
+906
+907        // Then the result is None.
+908        assert_eq!(result, None);
+909    }
+910
+911    #[test]
+912    fn resolve_with_valid_domain() {
+913        let mut ctx = TestContext::install_and_setup();
+914        let (admin, alice) = (ctx.admin, ctx.alice);
+915        let full_domain = "odra.cspr".to_string();
+916
+917        // Given Alice has a token.
+918        ctx.with_name_registered(admin, alice, "odra");
+919
+920        ctx.set_caller(alice);
+921        ctx.default_resolver
+922            .set_resolution(full_domain.clone(), Some(alice));
+923
+924        // When anyone tries to resolve a valid domain.
+925        let result = ctx.registrar.resolve(full_domain);
+926
+927        // Then the result is the token owner.
+928        assert_eq!(result, Some(alice));
+929    }
+930
+931    #[test]
+932    fn test_controller_register_fails_when_paused() {
+933        let mut ctx = TestContext::install_and_setup();
+934        let (admin, alice) = (ctx.admin, ctx.alice);
+935
+936        // Given Alice has a token.
+937        ctx.with_name_registered(admin, alice, TOKEN_NAME);
+938        ctx.set_caller(admin);
+939        ctx.registrar.pause();
+940
+941        // When Admin tries to register the token.
+942        let token_expiration = INIT_TIME + 2 * TOKEN_EXPIRATION;
+943        let voucher_expiration = INIT_TIME + TOKEN_EXPIRATION;
+944        let asset_uri = "https://example.com/asset";
+945        let names = vec![NameMintInfo::new(
+946            TOKEN_NAME,
+947            alice,
+948            token_expiration,
+949            asset_uri,
+950        )];
+951        let voucher = TokenizationVoucher::new(names, voucher_expiration);
+952        let result = ctx.registrar.try_controller_register(voucher);
+953
+954        // Then registration fails.
+955        assert_eq!(
+956            result,
+957            Err(odra_modules::security::errors::Error::UnpausedRequired.into())
+958        );
+959    }
+960
+961    #[test]
+962    fn test_controller_register_and_prolong_fails_when_paused() {
+963        let mut ctx = TestContext::install_and_setup();
+964        let (admin, alice) = (ctx.admin, ctx.alice);
+965
+966        // Given Alice has a token.
+967        ctx.with_name_registered(admin, alice, TOKEN_NAME);
+968        ctx.set_caller(admin);
+969        ctx.registrar.pause();
+970
+971        // When Admin tries to register the token.
+972        let token_expiration = INIT_TIME + 2 * TOKEN_EXPIRATION;
+973        let voucher_expiration = INIT_TIME + TOKEN_EXPIRATION;
+974        let asset_uri = "https://example.com/asset";
+975        let names = vec![NameMintInfo::new(
+976            TOKEN_NAME,
+977            alice,
+978            token_expiration,
+979            asset_uri,
+980        )];
+981        let tokens = vec![TokenRenewalInfo::new(
+982            generate_token_id(TOKEN_NAME),
+983            token_expiration,
+984        )];
+985        let renewal_voucher = RenewalVoucher::new(tokens, voucher_expiration);
+986        let voucher = TokenizationVoucher::new(names, voucher_expiration);
+987        let result = ctx
+988            .registrar
+989            .try_controller_prolong_and_register(renewal_voucher, voucher);
+990
+991        // Then registration fails.
+992        assert_eq!(
+993            result,
+994            Err(odra_modules::security::errors::Error::UnpausedRequired.into())
+995        );
+996    }
+997}
\ No newline at end of file diff --git a/docs/src/casper_name_contracts/contracts/resolver.rs.html b/docs/src/casper_name_contracts/contracts/resolver.rs.html new file mode 100644 index 0000000..89dec47 --- /dev/null +++ b/docs/src/casper_name_contracts/contracts/resolver.rs.html @@ -0,0 +1,473 @@ +resolver.rs - source

casper_name_contracts/contracts/
resolver.rs

1use odra::{casper_types::U256, prelude::*};
+2use odra_modules::access::{AccessControl, Role, DEFAULT_ADMIN_ROLE};
+3
+4use super::{name_token::NameTokenContractRef, token_id::ToTokenId, utils};
+5
+6#[odra::external_contract]
+7pub trait Resolver {
+8    fn init(&mut self, name_token: Address);
+9    fn set_name_token(&mut self, name_token: Address);
+10    fn set_resolution(&mut self, full_domain: Domain, address: Option<Address>);
+11    fn resolve(&self, full_domain: Domain) -> Option<Address>;
+12    fn invalidate_resolutions(&mut self, token_id: TokenId);
+13}
+14
+15type Nonce = u32;
+16type Domain = String;
+17type TokenId = U256;
+18
+19/// Event emitted when a resolution is changed.
+20#[odra::event]
+21pub struct ResolutionChanged {
+22    full_domain: String,
+23    address: Option<Address>,
+24}
+25
+26/// Event emitted when a resolution is cleared.
+27#[odra::event]
+28pub struct ResolutionCleared {
+29    token_id: U256,
+30}
+31
+32/// Event emitted when the name token address is changed.
+33#[odra::event]
+34pub struct NameTokenAddressChanged {
+35    new_name_token: Address,
+36}
+37
+38/// Default Resolver smart contract. It handles the resolution of domain names to addresses.
+39#[odra::module(
+40    errors = ResolverError,
+41    events = [ResolutionChanged, ResolutionCleared, NameTokenAddressChanged]
+42)]
+43pub struct DefaultResolver {
+44    access_control: SubModule<AccessControl>,
+45    name_token: External<NameTokenContractRef>,
+46    nonces: Mapping<TokenId, Nonce>,
+47    resolutions: Mapping<(TokenId, String, Nonce), Option<Address>>,
+48}
+49
+50#[odra::module]
+51impl DefaultResolver {
+52    delegate! {
+53        to self.access_control {
+54            fn has_role(&self, role: &Role, address: &Address) -> bool;
+55            fn grant_role(&mut self, role: &Role, address: &Address);
+56            fn revoke_role(&mut self, role: &Role, address: &Address);
+57        }
+58    }
+59
+60    /// Initializes the default resolver with the name token contract address.
+61    /// The caller is granted the admin role.
+62    pub fn init(&mut self, name_token: Address) {
+63        if !name_token.is_contract() {
+64            self.revert(ResolverError::InvalidTokenName);
+65        }
+66        self.name_token.set(name_token);
+67
+68        let admin = self.env().caller();
+69        self.access_control
+70            .unchecked_grant_role(&DEFAULT_ADMIN_ROLE, &admin);
+71    }
+72
+73    /// Admin only. Sets the name token contract address.
+74    pub fn set_name_token(&mut self, name_token: Address) {
+75        if !name_token.is_contract() {
+76            self.revert(ResolverError::InvalidTokenName);
+77        }
+78        if !self.has_role(&DEFAULT_ADMIN_ROLE, &self.env().caller()) {
+79            self.env()
+80                .revert(ResolverError::UnauthorizedTokenAddressUpdate);
+81        }
+82        self.name_token.set(name_token);
+83        self.env().emit_event(NameTokenAddressChanged {
+84            new_name_token: name_token,
+85        });
+86    }
+87
+88    /// Token owner only. Sets the resolution for a domain to an address.
+89    pub fn set_resolution(&mut self, full_domain: Domain, address: Option<Address>) {
+90        let env = self.env();
+91        let token_id = self
+92            .extract_token_id(&full_domain)
+93            .unwrap_or_revert_with(self, ResolverError::InvalidDomain);
+94        let caller = env.caller();
+95
+96        if !self.name_token.is_token_valid(token_id) {
+97            env.revert(ResolverError::ResolutionSetWithInvalidToken);
+98        }
+99
+100        if self.owner_of(token_id) != Some(caller) {
+101            env.revert(ResolverError::ResolutionSetByInvalidOwner);
+102        }
+103
+104        if !utils::is_domain_valid(&full_domain) {
+105            env.revert(ResolverError::InvalidSubdomainFormat);
+106        }
+107
+108        let nonce = self.nonce(&token_id);
+109        self.resolutions
+110            .set(&(token_id, full_domain.clone(), nonce), address);
+111
+112        env.emit_event(ResolutionChanged {
+113            full_domain,
+114            address,
+115        });
+116    }
+117
+118    /// Resolves a domain to an address.
+119    pub fn resolve(&self, full_domain: Domain) -> Option<Address> {
+120        let token_id = self.extract_token_id(&full_domain)?;
+121        let nonce = self.nonce(&token_id);
+122
+123        self.resolutions
+124            .get(&(token_id, full_domain, nonce))
+125            .flatten()
+126    }
+127
+128    /// Invalidates all the resolutions for a token. Only the token owner or the admin can do this.
+129    pub fn invalidate_resolutions(&mut self, token_id: TokenId) {
+130        let env = self.env();
+131        let caller = env.caller();
+132
+133        if !self.has_role(&DEFAULT_ADMIN_ROLE, &caller) && self.owner_of(token_id) != Some(caller) {
+134            self.env().revert(ResolverError::UnauthorizedInvalidation);
+135        }
+136        self.nonces.add(&token_id, 1);
+137
+138        env.emit_event(ResolutionCleared { token_id });
+139    }
+140
+141    #[inline]
+142    fn extract_token_id(&self, full_domain: &str) -> Option<TokenId> {
+143        let token_name = utils::extract_token_name(&full_domain)?;
+144        Some(self.token_id(token_name))
+145    }
+146
+147    #[inline]
+148    fn nonce(&self, token_id: &TokenId) -> Nonce {
+149        self.nonces.get_or_default(token_id)
+150    }
+151
+152    #[inline]
+153    fn owner_of(&self, token_id: TokenId) -> Option<Address> {
+154        self.name_token.owner_of(token_id)
+155    }
+156}
+157
+158#[odra::odra_error]
+159pub enum ResolverError {
+160    ResolutionSetWithInvalidToken = 1401,
+161    ResolutionSetByInvalidOwner = 1402,
+162    UnauthorizedInvalidation = 1403,
+163    UnauthorizedTokenAddressUpdate = 1404,
+164    InvalidDomain = 1405,
+165    InvalidSubdomainFormat = 1406,
+166    InvalidTokenName = 1407,
+167}
+168
+169#[cfg(test)]
+170mod tests {
+171    use odra::{casper_event_standard::EventInstance, host::Deployer};
+172
+173    use super::*;
+174    use crate::test_context::{generate_token_id, TestContext, TOKEN_EXPIRATION};
+175
+176    const TOKEN_NAME: &str = "odra";
+177    const NON_EXISTENT_TOKEN_DOMAIN: &str = "odra2.cspr";
+178    const NON_CSPR_DOMAIN: &str = "odra.com";
+179    const MAIN_DOMAIN: &str = "odra.cspr";
+180    const SUBDOMAIN: &str = "docs.odra.cspr";
+181    const INVALID_SUBDOMAIN: &str = "-docs.odra.cspr";
+182
+183    #[test]
+184    fn deploy_fails_if_account_set_as_name_token() {
+185        let env = odra_test::env();
+186        let result = DefaultResolver::try_deploy(
+187            &env,
+188            DefaultResolverInitArgs {
+189                name_token: env.get_account(1),
+190            },
+191        );
+192        assert!(result.is_err());
+193    }
+194
+195    #[test]
+196    fn deployer_is_admin() {
+197        // Given the contract is deployed
+198        let (ctx, admin, _, _) = setup();
+199        // Then the deployer is the admin
+200        assert!(ctx.default_resolver.has_role(&DEFAULT_ADMIN_ROLE, &admin));
+201    }
+202
+203    #[test]
+204    fn only_admin_can_set_name_token() {
+205        let (mut ctx, admin, alice, _) = setup();
+206        let contract_address = ctx.controller.address();
+207
+208        // When alice tries to set the name token
+209        ctx.set_caller(alice);
+210        // Then the operation fails
+211        assert!(ctx
+212            .default_resolver
+213            .try_set_name_token(contract_address)
+214            .is_err());
+215
+216        // When the admin sets the name token
+217        ctx.set_caller(admin);
+218        // Then the operation succeeds
+219        assert!(ctx
+220            .default_resolver
+221            .try_set_name_token(contract_address)
+222            .is_ok());
+223    }
+224
+225    #[test]
+226    fn name_token_must_be_a_contract() {
+227        let (mut ctx, admin, alice, _) = setup();
+228
+229        // When the admin tries to set a non-contract address as the name token
+230        ctx.set_caller(admin);
+231        let result = ctx.default_resolver.try_set_name_token(alice);
+232        // Then the operation fails
+233        assert_eq!(result, Err(ResolverError::InvalidTokenName.into()));
+234    }
+235
+236    #[test]
+237    fn set_name_token_emits_event() {
+238        let (mut ctx, admin, _, _) = setup();
+239        let name_token = ctx.token.address();
+240
+241        // When the admin updates the name token address.
+242        ctx.set_caller(admin);
+243        ctx.default_resolver.set_name_token(name_token);
+244        // Then the event is emitted.
+245        assert!(ctx
+246            .env
+247            .emitted(&ctx.default_resolver, NameTokenAddressChanged::name()))
+248    }
+249
+250    #[test]
+251    fn anyone_can_resolve() {
+252        let (mut ctx, _, alice, bob) = setup();
+253
+254        // When alice sets the resolution for the main domain
+255        set_resolution_with_caller(&mut ctx, MAIN_DOMAIN, alice, alice);
+256        // Then alice can resolve the main domain
+257        assert_eq!(
+258            resolve_with_caller(&mut ctx, MAIN_DOMAIN, alice),
+259            Some(alice)
+260        );
+261        // And bob can also resolve the main domain
+262        assert_eq!(resolve_with_caller(&mut ctx, MAIN_DOMAIN, bob), Some(alice));
+263    }
+264
+265    #[test]
+266    fn only_owner_can_set_resolution() {
+267        let (mut ctx, admin, alice, bob) = setup();
+268
+269        // When alice sets the resolution for the main domain
+270        ctx.set_caller(alice);
+271        // Then the operation succeeds
+272        assert!(try_set_resolution(&mut ctx, MAIN_DOMAIN, alice).is_ok());
+273
+274        // When admin sets the resolution for the main domain
+275        ctx.set_caller(admin);
+276        // Then the operation fails
+277        assert_eq!(
+278            try_set_resolution(&mut ctx, MAIN_DOMAIN, admin).err(),
+279            Some(ResolverError::ResolutionSetByInvalidOwner.into())
+280        );
+281        // When bob sets the resolution for the main domain
+282        ctx.set_caller(bob);
+283        // Then the operation fails
+284        assert_eq!(
+285            try_set_resolution(&mut ctx, MAIN_DOMAIN, bob).err(),
+286            Some(ResolverError::ResolutionSetByInvalidOwner.into())
+287        );
+288    }
+289
+290    #[test]
+291    fn cannot_set_resolution_with_non_existent_token() {
+292        let (mut ctx, _, alice, _) = setup();
+293
+294        // When alice tries to set the resolution for a non-existent token
+295        ctx.set_caller(alice);
+296        let result = try_set_resolution(&mut ctx, NON_EXISTENT_TOKEN_DOMAIN, alice);
+297        // Then the operation fails
+298        assert_eq!(
+299            result,
+300            Err(ResolverError::ResolutionSetWithInvalidToken.into())
+301        );
+302    }
+303
+304    #[test]
+305    fn cannot_set_resolution_with_expired_token() {
+306        // Given the token has expired
+307        let (mut ctx, _, alice, _) = setup();
+308        ctx.advance_block_time(TOKEN_EXPIRATION + 1);
+309
+310        // When alice tries to set the resolution
+311        ctx.set_caller(alice);
+312        let result = try_set_resolution(&mut ctx, SUBDOMAIN, alice);
+313        // Then the operation fails
+314        assert_eq!(
+315            result,
+316            Err(ResolverError::ResolutionSetWithInvalidToken.into())
+317        );
+318    }
+319
+320    #[test]
+321    fn cannot_set_resolution_with_non_cspr_domain() {
+322        let (mut ctx, _, alice, _) = setup();
+323        // When alice tries to set the resolution for a non-cspr domain
+324        ctx.set_caller(alice);
+325        let result = try_set_resolution(&mut ctx, NON_CSPR_DOMAIN, alice);
+326        // Then the operation fails
+327        assert_eq!(result, Err(ResolverError::InvalidDomain.into()));
+328    }
+329
+330    #[test]
+331    fn cannot_set_resolution_with_burned_token() {
+332        // Given the token has been burned
+333        let (mut ctx, admin, alice, _) = setup();
+334        ctx.set_caller(admin);
+335        ctx.token.burn(generate_token_id(TOKEN_NAME));
+336        // When alice tries to set the resolution
+337        ctx.set_caller(alice);
+338        let result = try_set_resolution(&mut ctx, SUBDOMAIN, alice);
+339        // Then the operation fails
+340        assert_eq!(
+341            result,
+342            Err(ResolverError::ResolutionSetWithInvalidToken.into())
+343        );
+344    }
+345
+346    #[test]
+347    fn set_resolution_for_invalid_subdomain_format() {
+348        let (mut ctx, _, alice, _) = setup();
+349
+350        // When alice tries to set the resolution for an invalid subdomain format
+351        ctx.set_caller(alice);
+352        let result = try_set_resolution(&mut ctx, INVALID_SUBDOMAIN, alice);
+353        // Then the operation fails
+354        assert_eq!(result, Err(ResolverError::InvalidSubdomainFormat.into()));
+355    }
+356
+357    #[test]
+358    fn invalidate_erases_subdomains() {
+359        let (mut ctx, _, alice, bob) = setup();
+360
+361        // When alice sets the resolution for the main domain and a subdomain
+362        ctx.set_caller(alice);
+363        set_resolution(&mut ctx, MAIN_DOMAIN, alice);
+364        set_resolution(&mut ctx, SUBDOMAIN, bob);
+365
+366        // Then both resolutions are set
+367        assert_eq!(resolve(&ctx, MAIN_DOMAIN), Some(alice));
+368        assert_eq!(resolve(&ctx, SUBDOMAIN), Some(bob));
+369
+370        // When alice cleans up the token's resolutions
+371        invalidate(&mut ctx, TOKEN_NAME);
+372
+373        // Then both resolutions are erased
+374        assert_eq!(resolve(&ctx, MAIN_DOMAIN), None);
+375        assert_eq!(resolve(&ctx, SUBDOMAIN), None);
+376    }
+377
+378    #[test]
+379    fn admin_can_invalidate_any_token() {
+380        let (mut ctx, admin, alice, bob) = setup();
+381
+382        // When alice sets the resolution for the main domain and a subdomain
+383        ctx.set_caller(alice);
+384        set_resolution(&mut ctx, MAIN_DOMAIN, alice);
+385        set_resolution(&mut ctx, SUBDOMAIN, bob);
+386
+387        // Then both resolutions are set
+388        assert_eq!(resolve(&ctx, MAIN_DOMAIN), Some(alice));
+389        assert_eq!(resolve(&ctx, SUBDOMAIN), Some(bob));
+390
+391        // When the admin cleans up alice's token's resolutions
+392        invalidate_with_caller(&mut ctx, TOKEN_NAME, admin);
+393
+394        // Then both resolutions are erased
+395        assert_eq!(resolve(&ctx, MAIN_DOMAIN), None);
+396        assert_eq!(resolve(&ctx, SUBDOMAIN), None);
+397    }
+398
+399    #[test]
+400    fn only_owner_or_admin_can_invalidate() {
+401        let (mut ctx, _, alice, bob) = setup();
+402
+403        // When alice sets the resolution for the main domain and a subdomain
+404        ctx.set_caller(alice);
+405        set_resolution(&mut ctx, MAIN_DOMAIN, alice);
+406        set_resolution(&mut ctx, SUBDOMAIN, bob);
+407
+408        // Then both resolutions are set
+409        assert_eq!(resolve(&ctx, MAIN_DOMAIN), Some(alice));
+410        assert_eq!(resolve(&ctx, SUBDOMAIN), Some(bob));
+411
+412        // When bob tries to clean up alice's token's resolutions
+413        ctx.set_caller(bob);
+414        let result = try_invalidate(&mut ctx, TOKEN_NAME);
+415        // Then the operation fails
+416        assert_eq!(result, Err(ResolverError::UnauthorizedInvalidation.into()));
+417    }
+418
+419    fn setup() -> (TestContext, Address, Address, Address) {
+420        let mut ctx = TestContext::install_and_setup();
+421        let (admin, alice, bob) = (ctx.admin, ctx.alice, ctx.bob);
+422
+423        ctx.with_name_registered(admin, alice, TOKEN_NAME);
+424        (ctx, admin, alice, bob)
+425    }
+426
+427    fn set_resolution(ctx: &mut TestContext, domain: &str, address: Address) {
+428        ctx.default_resolver
+429            .set_resolution(domain.to_string(), Some(address));
+430    }
+431
+432    fn try_set_resolution(ctx: &mut TestContext, domain: &str, address: Address) -> OdraResult<()> {
+433        ctx.default_resolver
+434            .try_set_resolution(domain.to_string(), Some(address))
+435    }
+436
+437    fn set_resolution_with_caller(
+438        ctx: &mut TestContext,
+439        domain: &str,
+440        address: Address,
+441        caller: Address,
+442    ) {
+443        ctx.set_caller(caller);
+444        set_resolution(ctx, domain, address);
+445    }
+446
+447    fn resolve(ctx: &TestContext, domain: &str) -> Option<Address> {
+448        ctx.default_resolver.resolve(domain.to_string())
+449    }
+450
+451    fn resolve_with_caller(
+452        ctx: &mut TestContext,
+453        domain: &str,
+454        caller: Address,
+455    ) -> Option<Address> {
+456        ctx.set_caller(caller);
+457        resolve(ctx, domain)
+458    }
+459
+460    fn invalidate(ctx: &mut TestContext, token_name: &str) {
+461        try_invalidate(ctx, token_name).unwrap();
+462    }
+463
+464    fn invalidate_with_caller(ctx: &mut TestContext, token_name: &str, caller: Address) {
+465        ctx.set_caller(caller);
+466        invalidate(ctx, token_name);
+467    }
+468
+469    fn try_invalidate(ctx: &mut TestContext, token_name: &str) -> OdraResult<()> {
+470        ctx.default_resolver
+471            .try_invalidate_resolutions(generate_token_id(token_name))
+472    }
+473}
\ No newline at end of file diff --git a/docs/src/casper_name_contracts/contracts/reverse_resolver.rs.html b/docs/src/casper_name_contracts/contracts/reverse_resolver.rs.html new file mode 100644 index 0000000..e02cf79 --- /dev/null +++ b/docs/src/casper_name_contracts/contracts/reverse_resolver.rs.html @@ -0,0 +1,268 @@ +reverse_resolver.rs - source

casper_name_contracts/contracts/
reverse_resolver.rs

1use crate::contracts::{
+2    name_token::NameTokenContractRef, resolver::ResolverContractRef, token_id::ToTokenId, utils,
+3};
+4use odra::{prelude::*, ContractRef};
+5
+6#[odra::odra_error]
+7enum Error {
+8    InvalidTokenName = 1500,
+9    ResolutionForPrimaryNameNotFound = 1501,
+10    InvalidResolutionAddress = 1502,
+11}
+12
+13/// Reverse Resolver contract. It resolves primary names to addresses.
+14#[odra::module(events = [PrimaryNameChanged], errors = Error)]
+15pub struct ReverseResolver {
+16    primary_names: Mapping<Address, Option<String>>,
+17    name_token: External<NameTokenContractRef>,
+18}
+19
+20#[odra::module]
+21impl ReverseResolver {
+22    pub fn init(&mut self, name_token: Address) {
+23        if !name_token.is_contract() {
+24            self.revert(Error::InvalidTokenName);
+25        }
+26        self.name_token.set(name_token);
+27    }
+28
+29    /// Sets the primary preferred reverse resolution address for the caller.
+30    pub fn set_primary_name(&mut self, primary_name: String) {
+31        // Load currently set primary name.
+32        let caller = self.env().caller();
+33        let current_primary_name = self.get_primary_name(&caller);
+34
+35        match self.existing_resolution(&primary_name) {
+36            Some(address) => {
+37                if address != caller {
+38                    // If the resolution exists but is not for the caller, revert.
+39                    self.revert(Error::InvalidResolutionAddress);
+40                }
+41            }
+42            None => {
+43                self.revert(Error::ResolutionForPrimaryNameNotFound);
+44            }
+45        };
+46
+47        if current_primary_name.as_ref() == Some(&primary_name) {
+48            // If the primary name is the same, do nothing.
+49            return;
+50        }
+51
+52        // Update primary name.
+53        self.primary_names.set(&caller, Some(primary_name.clone()));
+54
+55        // Emit event.
+56        self.env().emit_event(PrimaryNameChanged {
+57            address: caller,
+58            old_primary_name: current_primary_name,
+59            new_primary_name: Some(primary_name),
+60        });
+61    }
+62
+63    /// Returns the primary name for the address.
+64    pub fn get_primary_name(&self, address: &Address) -> Option<String> {
+65        let primary_name = self.primary_names.get(address).flatten()?;
+66        // Check if the primary name resolves to the given address.
+67        // If a resolver was cleaned up, it might not resolve anymore.
+68        let resolved_address = self.existing_resolution(&primary_name)?;
+69        if resolved_address == *address {
+70            Some(primary_name)
+71        } else {
+72            None
+73        }
+74    }
+75
+76    fn existing_resolution(&self, name: &str) -> Option<Address> {
+77        let token_name = utils::extract_token_name(name)?;
+78        let token_id = self.token_id(token_name);
+79        let resolver_address = self.name_token.resolver(token_id)?;
+80        ResolverContractRef::new(self.env(), resolver_address).resolve(name.to_owned())
+81    }
+82}
+83
+84/// Event emitted when the primary name of an address changes.
+85#[odra::event]
+86pub struct PrimaryNameChanged {
+87    pub address: Address,
+88    pub old_primary_name: Option<String>,
+89    pub new_primary_name: Option<String>,
+90}
+91
+92#[cfg(test)]
+93mod tests {
+94    use super::*;
+95    use crate::test_context::{self, TestContext};
+96    use odra::host::Deployer;
+97
+98    const TOKEN_TEST: &str = "test";
+99    const TOKEN_TEST2: &str = "test2";
+100    const DOMAIN_TEST: &str = "test.cspr";
+101    const DOMAIN_TEST2: &str = "test2.cspr";
+102
+103    #[test]
+104    fn test_set_primary_name() {
+105        let mut ctx = TestContext::install_and_setup();
+106        let (admin, user) = (ctx.admin, ctx.alice);
+107
+108        let mut reverse_resolver = ReverseResolver::deploy(
+109            &ctx.env,
+110            ReverseResolverInitArgs {
+111                name_token: ctx.token.address(),
+112            },
+113        );
+114
+115        ctx.with_name_registered(admin, user, TOKEN_TEST);
+116        ctx.with_name_registered(admin, user, TOKEN_TEST2);
+117
+118        ctx.set_caller(user);
+119        ctx.default_resolver
+120            .set_resolution(DOMAIN_TEST.to_string(), Some(user));
+121        ctx.default_resolver
+122            .set_resolution(DOMAIN_TEST2.to_string(), Some(user));
+123
+124        // It should have no primary name.
+125        assert_eq!(reverse_resolver.get_primary_name(&user), None);
+126
+127        // Set primary name.
+128        reverse_resolver.set_primary_name(DOMAIN_TEST.to_string());
+129
+130        // It should have the primary name.
+131        assert_eq!(
+132            reverse_resolver.get_primary_name(&user),
+133            Some(DOMAIN_TEST.to_string())
+134        );
+135
+136        // Set new primary name.
+137        reverse_resolver.set_primary_name(DOMAIN_TEST2.to_string());
+138
+139        // It should have the new primary name.
+140        assert_eq!(
+141            reverse_resolver.get_primary_name(&user),
+142            Some(DOMAIN_TEST2.to_string())
+143        );
+144    }
+145
+146    #[test]
+147    fn test_set_same_primary_name() {
+148        let mut ctx = TestContext::install_and_setup();
+149        let (admin, user) = (ctx.admin, ctx.alice);
+150
+151        let mut reverse_resolver = ReverseResolver::deploy(
+152            &ctx.env,
+153            ReverseResolverInitArgs {
+154                name_token: ctx.token.address(),
+155            },
+156        );
+157
+158        ctx.with_name_registered(admin, user, TOKEN_TEST);
+159        ctx.with_name_registered(admin, user, TOKEN_TEST2);
+160
+161        ctx.set_caller(user);
+162        ctx.default_resolver
+163            .set_resolution(DOMAIN_TEST.to_string(), Some(user));
+164        ctx.default_resolver
+165            .set_resolution(DOMAIN_TEST2.to_string(), Some(user));
+166
+167        // Set primary name.
+168        ctx.set_caller(user);
+169        reverse_resolver.set_primary_name(DOMAIN_TEST.to_string());
+170
+171        // Set a different primary name.
+172        ctx.set_caller(user);
+173        reverse_resolver.set_primary_name(DOMAIN_TEST2.to_string());
+174
+175        // Set the same primary name again.
+176        ctx.set_caller(user);
+177        reverse_resolver.set_primary_name(DOMAIN_TEST2.to_string());
+178
+179        // The contract should not emit an event for the same primary name.
+180        assert_eq!(ctx.events_count(&reverse_resolver), 2);
+181    }
+182
+183    #[test]
+184    fn test_set_name_assigned_to_someone_else() {
+185        let (mut ctx, mut reverse_resolver) = setup();
+186        let (admin, user) = (ctx.admin, ctx.alice);
+187
+188        ctx.with_name_registered(admin, user, TOKEN_TEST);
+189
+190        ctx.set_caller(user);
+191        ctx.default_resolver
+192            .set_resolution(DOMAIN_TEST.to_string(), Some(admin));
+193
+194        // Set primary name.
+195        let result = reverse_resolver.try_set_primary_name(DOMAIN_TEST.to_string());
+196        assert_eq!(result.unwrap_err(), Error::InvalidResolutionAddress.into());
+197    }
+198
+199    #[test]
+200    fn test_set_not_existing_name() {
+201        let (mut ctx, mut reverse_resolver) = setup();
+202        let (admin, user) = (ctx.admin, ctx.alice);
+203
+204        ctx.with_name_registered(admin, user, TOKEN_TEST);
+205
+206        // Set primary name.
+207        ctx.set_caller(user);
+208        let result = reverse_resolver.try_set_primary_name(DOMAIN_TEST.to_string());
+209        assert_eq!(
+210            result.unwrap_err(),
+211            Error::ResolutionForPrimaryNameNotFound.into()
+212        );
+213    }
+214
+215    #[test]
+216    fn test_get_primary_name() {
+217        let (mut ctx, mut reverse_resolver) = setup();
+218        let (admin, user) = (ctx.admin, ctx.alice);
+219        ctx.with_name_registered(admin, user, TOKEN_TEST);
+220
+221        ctx.set_caller(user);
+222        ctx.default_resolver
+223            .set_resolution(DOMAIN_TEST.to_string(), Some(user));
+224
+225        assert_eq!(reverse_resolver.get_primary_name(&user), None);
+226
+227        reverse_resolver.set_primary_name(DOMAIN_TEST.to_string());
+228        assert_eq!(
+229            reverse_resolver.get_primary_name(&user),
+230            Some(DOMAIN_TEST.to_string())
+231        );
+232    }
+233
+234    #[test]
+235    fn test_get_primary_name_invalidated_by_resolver() {
+236        let (mut ctx, mut reverse_resolver) = setup();
+237        let (admin, user) = (ctx.admin, ctx.alice);
+238        ctx.with_name_registered(admin, user, TOKEN_TEST);
+239
+240        ctx.set_caller(user);
+241        ctx.default_resolver
+242            .set_resolution(DOMAIN_TEST.to_string(), Some(user));
+243
+244        reverse_resolver.set_primary_name(DOMAIN_TEST.to_string());
+245        assert_eq!(
+246            reverse_resolver.get_primary_name(&user),
+247            Some(DOMAIN_TEST.to_string())
+248        );
+249
+250        // Simulate a resolver cleanup by removing the resolution.
+251        ctx.default_resolver
+252            .invalidate_resolutions(test_context::generate_token_id(TOKEN_TEST));
+253
+254        // The primary name should no longer be valid.
+255        assert_eq!(reverse_resolver.get_primary_name(&user), None);
+256    }
+257
+258    fn setup() -> (TestContext, ReverseResolverHostRef) {
+259        let ctx = TestContext::install_and_setup();
+260        let reverse_resolver = ReverseResolver::deploy(
+261            &ctx.env,
+262            ReverseResolverInitArgs {
+263                name_token: ctx.token.address(),
+264            },
+265        );
+266        (ctx, reverse_resolver)
+267    }
+268}
\ No newline at end of file diff --git a/docs/src/casper_name_contracts/contracts/token_id.rs.html b/docs/src/casper_name_contracts/contracts/token_id.rs.html new file mode 100644 index 0000000..2386c70 --- /dev/null +++ b/docs/src/casper_name_contracts/contracts/token_id.rs.html @@ -0,0 +1,16 @@ +token_id.rs - source

casper_name_contracts/contracts/
token_id.rs

1use odra::{casper_types::U256, prelude::*};
+2
+3pub trait ToTokenId {
+4    /// Converts the label to a token ID.
+5    fn token_id(&self, label: String) -> U256;
+6}
+7
+8impl<T> ToTokenId for T
+9where
+10    T: Module,
+11{
+12    fn token_id(&self, label: String) -> U256 {
+13        let hash = self.env().hash(label);
+14        U256::from(hash)
+15    }
+16}
\ No newline at end of file diff --git a/docs/src/casper_name_contracts/contracts/utils.rs.html b/docs/src/casper_name_contracts/contracts/utils.rs.html new file mode 100644 index 0000000..00ae97c --- /dev/null +++ b/docs/src/casper_name_contracts/contracts/utils.rs.html @@ -0,0 +1,144 @@ +utils.rs - source

casper_name_contracts/contracts/
utils.rs

1use odra::prelude::*;
+2
+3const CSPR_DOMAIN: &str = ".cspr";
+4const SUBDOMAIN_SEPARATOR: &str = ".";
+5
+6/// Extract the token name from a full domain.
+7pub fn extract_token_name(full_domain: &str) -> Option<String> {
+8    if full_domain.ends_with(CSPR_DOMAIN) {
+9        let token_name = full_domain.trim_end_matches(CSPR_DOMAIN);
+10        token_name.split('.').last().map(|s| s.to_string())
+11    } else {
+12        None
+13    }
+14}
+15
+16/// Return `true` if byte `b` is ASCII letter or digit.
+17#[inline(always)]
+18const fn is_alnum(b: u8) -> bool {
+19    (b >= b'0' && b <= b'9') || (b >= b'a' && b <= b'z') || (b >= b'A' && b <= b'Z')
+20}
+21
+22/// Validate a single DNS label under RFC 952/1123 (LDH rule).
+23///
+24/// * **length** 1–63 bytes
+25/// * **characters** ASCII letters, digits, or `-`
+26/// * **first/last** must be alphanumeric
+27///
+28/// Returns `true` for valid labels.
+29#[inline]
+30fn is_valid_dns_label(label: &str) -> bool {
+31    let bytes = label.as_bytes();
+32    let len = bytes.len();
+33
+34    if len == 0 || len > 63 {
+35        return false;
+36    }
+37
+38    // first & last char must be alnum
+39    if !is_alnum(bytes[0]) || !is_alnum(bytes[len - 1]) {
+40        return false;
+41    }
+42
+43    // interior chars: alnum or hyphen
+44    let mut i = 1;
+45    while i < len - 1 {
+46        let b = bytes[i];
+47        if !is_alnum(b) && b != b'-' {
+48            return false;
+49        }
+50        i += 1;
+51    }
+52    true
+53}
+54
+55/// Validate a full domain with subdomains.
+56/// The domain must end with `.cspr` and each subdomain must be a valid DNS label.
+57pub fn is_domain_valid(full_domain: &str) -> bool {
+58    if full_domain.ends_with(CSPR_DOMAIN) {
+59        let token_name = full_domain.trim_end_matches(CSPR_DOMAIN);
+60        token_name
+61            .split(SUBDOMAIN_SEPARATOR)
+62            .map(is_valid_dns_label)
+63            .all(|valid| valid)
+64    } else {
+65        false
+66    }
+67}
+68
+69/// Validate a label for use in a Casper token name.
+70/// A valid label must be a valid DNS label, not equal to "cspr", and
+71/// must not contain any subdomains (i.e., no `.` character).
+72pub fn is_label_valid(label: &str) -> bool {
+73    is_valid_dns_label(label) && label != "cspr" && !label.contains('.')
+74}
+75
+76#[cfg(test)]
+77mod t {
+78    #[test]
+79    fn test_extract_token_name() {
+80        let full_domain = "odra.cspr";
+81        let token_name = super::extract_token_name(full_domain).unwrap();
+82        assert_eq!(token_name, "odra");
+83
+84        let full_domain = "aaa.odra.cspr";
+85        let token_name = super::extract_token_name(full_domain).unwrap();
+86        assert_eq!(token_name, "odra");
+87
+88        let full_domain = "ss.aaa.odra.cspr";
+89        let token_name = super::extract_token_name(full_domain).unwrap();
+90        assert_eq!(token_name, "odra");
+91
+92        let full_domain = "aaa.odra.csp";
+93        let token_name = super::extract_token_name(full_domain);
+94        assert_eq!(token_name, None);
+95    }
+96
+97    #[test]
+98    fn test_is_valid_dns_label() {
+99        assert!(super::is_valid_dns_label("valid-label"));
+100        assert!(!super::is_valid_dns_label("-invalid-start"));
+101        assert!(!super::is_valid_dns_label("invalid-end-"));
+102        assert!(!super::is_valid_dns_label("invalid_char@"));
+103        assert!(!super::is_valid_dns_label(
+104            "too-long-label-abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"
+105        ));
+106        assert!(super::is_valid_dns_label("valid123"));
+107    }
+108
+109    #[test]
+110    fn test_is_domain_valid() {
+111        let full_domain = "odra.cspr";
+112        assert!(super::is_domain_valid(full_domain));
+113
+114        let full_domain = "aaa.odra.cspr";
+115        assert!(super::is_domain_valid(full_domain));
+116
+117        let full_domain = "ss.aaa.odra.cspr";
+118        assert!(super::is_domain_valid(full_domain));
+119
+120        let full_domain = "invalid-label-.cspr";
+121        assert!(!super::is_domain_valid(full_domain));
+122
+123        let full_domain = "invalid-label@.cspr";
+124        assert!(!super::is_domain_valid(full_domain));
+125
+126        let full_domain =
+127            "too-long-label-abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz.cspr";
+128        assert!(!super::is_domain_valid(full_domain));
+129
+130        let full_domain = "valid123.cspr";
+131        assert!(super::is_domain_valid(full_domain));
+132    }
+133
+134    #[test]
+135    fn test_is_label_valid() {
+136        assert!(super::is_label_valid("valid-label"));
+137        assert!(!super::is_label_valid("-invalid-start"));
+138        assert!(!super::is_label_valid("invalid-end-"));
+139        assert!(!super::is_label_valid("invalid_char@"));
+140        assert!(!super::is_label_valid("cspr"));
+141        assert!(!super::is_label_valid("invalid.label"));
+142        assert!(super::is_label_valid("valid123"));
+143    }
+144}
\ No newline at end of file diff --git a/docs/src/casper_name_contracts/data_structures.rs.html b/docs/src/casper_name_contracts/data_structures.rs.html new file mode 100644 index 0000000..012a0cc --- /dev/null +++ b/docs/src/casper_name_contracts/data_structures.rs.html @@ -0,0 +1,385 @@ +data_structures.rs - source

casper_name_contracts/
data_structures.rs

1use odra::{
+2    casper_types::{U256, U512},
+3    prelude::*,
+4};
+5use serde::{Deserialize, Serialize};
+6
+7/// Errors that can occur while working with name tokens.
+8#[odra::odra_error]
+9#[derive(Debug)]
+10pub enum NameTokenError {
+11    EmptyTLD = 1001,
+12    TLDNotSupported = 1002,
+13    PastExpirationDate = 1003,
+14    EmptyLabel = 1004,
+15    SLDDoesNotExist = 1005,
+16    SerializationError = 1006,
+17    DeserializationError = 1007,
+18    InvalidMetadata = 1008,
+19}
+20
+21/// Metadata associated with a name token.
+22#[derive(PartialEq, Debug, Clone, Serialize, Deserialize)]
+23pub struct NameTokenMetadata {
+24    name: String,
+25    expiration: u64,
+26    resolver: Option<Address>,
+27    asset_uri: String,
+28}
+29
+30impl NameTokenMetadata {
+31    pub fn with_resolver(name: &str, expiration: u64, asset_uri: &str, resolver: Address) -> Self {
+32        Self {
+33            name: String::from(name),
+34            expiration,
+35            resolver: Some(resolver),
+36            asset_uri: String::from(asset_uri),
+37        }
+38    }
+39
+40    pub fn with_no_resolver(name: &str, expiration: u64, asset_uri: &str) -> Self {
+41        Self {
+42            name: String::from(name),
+43            expiration,
+44            resolver: None,
+45            asset_uri: String::from(asset_uri),
+46        }
+47    }
+48
+49    pub fn set_resolver(&mut self, resolver: Address) {
+50        self.resolver = Some(resolver);
+51    }
+52
+53    pub fn resolver(&self) -> OdraResult<Option<Address>> {
+54        Ok(self.resolver)
+55    }
+56
+57    pub fn clear_resolver(&mut self) {
+58        self.resolver = None;
+59    }
+60
+61    pub fn json(&self) -> String {
+62        serde_json_wasm::to_string(&self).unwrap()
+63    }
+64
+65    pub fn to_vec(&self) -> Vec<(String, String)> {
+66        let mut vec = Vec::new();
+67        vec.push(("asset_uri".to_string(), self.asset_uri.clone()));
+68        vec.push(("expiration".to_string(), self.expiration.to_string()));
+69        vec.push(("name".to_string(), self.name.clone()));
+70        if let Some(resolver) = &self.resolver {
+71            vec.push(("resolver".to_string(), resolver.to_string()));
+72        }
+73        vec
+74    }
+75
+76    pub fn expiration(&self) -> u64 {
+77        self.expiration
+78    }
+79
+80    pub fn set_expiration(&mut self, expiration: u64) {
+81        self.expiration = expiration;
+82    }
+83}
+84
+85impl TryFrom<String> for NameTokenMetadata {
+86    type Error = NameTokenError;
+87
+88    fn try_from(value: String) -> Result<Self, Self::Error> {
+89        serde_json_wasm::from_str(&value).map_err(|_| NameTokenError::DeserializationError)
+90    }
+91}
+92
+93impl TryFrom<Vec<(String, String)>> for NameTokenMetadata {
+94    type Error = NameTokenError;
+95
+96    fn try_from(value: Vec<(String, String)>) -> Result<Self, Self::Error> {
+97        let name = value
+98            .iter()
+99            .find(|(key, _)| key == "name")
+100            .ok_or(NameTokenError::DeserializationError)?
+101            .1
+102            .clone();
+103
+104        let expiration = value
+105            .iter()
+106            .find(|(key, _)| key == "expiration")
+107            .ok_or(NameTokenError::DeserializationError)?
+108            .1
+109            .parse()
+110            .map_err(|_| NameTokenError::DeserializationError)?;
+111
+112        let resolver = value
+113            .iter()
+114            .find(|(key, _)| key == "resolver")
+115            .cloned()
+116            .map(|(_, value)| {
+117                Address::from_str(&value).map_err(|_| NameTokenError::DeserializationError)
+118            })
+119            .transpose()?;
+120
+121        let asset_uri = value
+122            .iter()
+123            .find(|(key, _)| key == "asset_uri")
+124            .map(|(_, value)| value.clone())
+125            .unwrap_or_default();
+126
+127        Ok(NameTokenMetadata {
+128            name,
+129            expiration,
+130            resolver,
+131            asset_uri,
+132        })
+133    }
+134}
+135
+136/// Information about a payment.
+137#[odra::odra_type]
+138pub struct PaymentInfo {
+139    pub buyer: Address,
+140    pub payment_id: String,
+141    pub amount: U512,
+142}
+143
+144/// List of [NameMintInfo] structs and the expiration time of the voucher.
+145#[odra::odra_type]
+146pub struct TokenizationVoucher {
+147    pub names: Vec<NameMintInfo>,
+148    pub voucher_expiration: u64,
+149}
+150
+151impl TokenizationVoucher {
+152    pub fn new(names: Vec<NameMintInfo>, voucher_expiration: u64) -> Self {
+153        Self {
+154            names,
+155            voucher_expiration,
+156        }
+157    }
+158}
+159
+160/// Information about a payment and a list of [NameMintInfo] structs.
+161#[odra::odra_type]
+162pub struct PaymentVoucher {
+163    pub payment: PaymentInfo,
+164    pub names: Vec<NameMintInfo>,
+165    pub voucher_expiration: u64,
+166}
+167
+168impl PaymentVoucher {
+169    pub fn new(
+170        amount: U512,
+171        payment_id: &str,
+172        buyer: Address,
+173        names: Vec<NameMintInfo>,
+174        voucher_expiration: u64,
+175    ) -> Self {
+176        Self {
+177            payment: PaymentInfo {
+178                buyer,
+179                payment_id: String::from(payment_id),
+180                amount,
+181            },
+182            names,
+183            voucher_expiration,
+184        }
+185    }
+186}
+187
+188impl From<PaymentVoucher> for TokenizationVoucher {
+189    fn from(voucher: PaymentVoucher) -> Self {
+190        Self {
+191            names: voucher.names,
+192            voucher_expiration: voucher.voucher_expiration,
+193        }
+194    }
+195}
+196
+197/// Information about a payment and a list of [NameTransferInfo] structs.
+198#[odra::odra_type]
+199pub struct SecondarySaleVoucher {
+200    pub payment: PaymentInfo,
+201    pub names: Vec<NameTransferInfo>,
+202    pub voucher_expiration: u64,
+203}
+204
+205/// Pair of a label and owner address.
+206#[odra::odra_type]
+207pub struct NameTransferInfo {
+208    pub label: String,
+209    pub owner: Address,
+210}
+211
+212/// Basic minting information for a name token.
+213#[odra::odra_type]
+214pub struct NameMintInfo {
+215    pub label: String,
+216    pub owner: Address,
+217    pub token_expiration: u64,
+218    pub asset_uri: String,
+219}
+220
+221impl NameMintInfo {
+222    pub fn new(label: &str, owner: Address, token_expiration: u64, asset_uri: &str) -> Self {
+223        Self {
+224            label: String::from(label),
+225            owner,
+226            token_expiration,
+227            asset_uri: String::from(asset_uri),
+228        }
+229    }
+230}
+231
+232/// Renewal information with new expiration time.
+233#[odra::odra_type]
+234pub struct TokenRenewalInfo {
+235    pub token_id: U256,
+236    pub token_expiration: u64,
+237}
+238
+239impl TokenRenewalInfo {
+240    pub fn new(token_id: U256, token_expiration: u64) -> Self {
+241        Self {
+242            token_id,
+243            token_expiration,
+244        }
+245    }
+246}
+247
+248/// Voucher for renewing multiple name tokens, plus payment information.
+249#[odra::odra_type]
+250pub struct RenewalPaymentVoucher {
+251    pub payment: PaymentInfo,
+252    pub tokens: Vec<TokenRenewalInfo>,
+253    pub voucher_expiration: u64,
+254}
+255
+256impl RenewalPaymentVoucher {
+257    pub fn new(
+258        amount: U512,
+259        payment_id: &str,
+260        buyer: Address,
+261        tokens: Vec<TokenRenewalInfo>,
+262        voucher_expiration: u64,
+263    ) -> Self {
+264        Self {
+265            payment: PaymentInfo {
+266                buyer,
+267                payment_id: String::from(payment_id),
+268                amount,
+269            },
+270            tokens,
+271            voucher_expiration,
+272        }
+273    }
+274}
+275
+276/// Voucher for renewing multiple name tokens.
+277#[odra::odra_type]
+278pub struct RenewalVoucher {
+279    pub tokens: Vec<TokenRenewalInfo>,
+280    pub voucher_expiration: u64,
+281}
+282
+283impl RenewalVoucher {
+284    pub fn new(tokens: Vec<TokenRenewalInfo>, voucher_expiration: u64) -> Self {
+285        Self {
+286            tokens,
+287            voucher_expiration,
+288        }
+289    }
+290}
+291
+292impl From<RenewalPaymentVoucher> for RenewalVoucher {
+293    fn from(voucher: RenewalPaymentVoucher) -> Self {
+294        Self {
+295            tokens: voucher.tokens,
+296            voucher_expiration: voucher.voucher_expiration,
+297        }
+298    }
+299}
+300
+301pub trait Payment {
+302    fn payment_info(&self) -> &PaymentInfo;
+303}
+304
+305impl Payment for PaymentVoucher {
+306    fn payment_info(&self) -> &PaymentInfo {
+307        &self.payment
+308    }
+309}
+310
+311impl Payment for RenewalPaymentVoucher {
+312    fn payment_info(&self) -> &PaymentInfo {
+313        &self.payment
+314    }
+315}
+316
+317impl Payment for SecondarySaleVoucher {
+318    fn payment_info(&self) -> &PaymentInfo {
+319        &self.payment
+320    }
+321}
+322
+323pub trait ExpirableVoucher {
+324    fn expiration_time(&self) -> u64;
+325}
+326
+327impl ExpirableVoucher for TokenizationVoucher {
+328    fn expiration_time(&self) -> u64 {
+329        self.voucher_expiration
+330    }
+331}
+332
+333impl ExpirableVoucher for RenewalVoucher {
+334    fn expiration_time(&self) -> u64 {
+335        self.voucher_expiration
+336    }
+337}
+338
+339#[cfg(test)]
+340mod tests {
+341    use super::*;
+342
+343    #[test]
+344    fn test_metadata_serialization() {
+345        let expected = r#"{
+346            "name": "test-label",
+347            "expiration": 86400,
+348            "resolver": null,
+349            "asset_uri": ""
+350        }"#
+351        .replace(" ", "")
+352        .replace("\n", "");
+353
+354        // Test metadata to_json.
+355        let metadata = NameTokenMetadata::with_no_resolver("test-label", 86400, "");
+356        assert_eq!(expected, metadata.json());
+357
+358        // Test metadata from_json.
+359        let deserialized: NameTokenMetadata = expected.try_into().unwrap();
+360        assert_eq!(metadata, deserialized);
+361
+362        let expected = r#"{
+363            "name": "test-label",
+364            "expiration": 86400,
+365            "resolver": "hash-7ba9daac84bebee8111c186588f21ebca35550b6cf1244e71768bd871938be6a",
+366            "asset_uri": "https://example.com/asset-uri"
+367        }"#
+368        .replace(" ", "")
+369        .replace("\n", "");
+370
+371        // Test metadata to_json.
+372        let metadata = NameTokenMetadata::with_resolver(
+373            "test-label",
+374            86400,
+375            "https://example.com/asset-uri",
+376            Address::new("hash-7ba9daac84bebee8111c186588f21ebca35550b6cf1244e71768bd871938be6a")
+377                .unwrap(),
+378        );
+379        assert_eq!(expected, metadata.json());
+380
+381        // Test metadata from_json.
+382        let deserialized: NameTokenMetadata = expected.try_into().unwrap();
+383        assert_eq!(metadata, deserialized);
+384    }
+385}
\ No newline at end of file diff --git a/docs/src/casper_name_contracts/lib.rs.html b/docs/src/casper_name_contracts/lib.rs.html new file mode 100644 index 0000000..a9924d2 --- /dev/null +++ b/docs/src/casper_name_contracts/lib.rs.html @@ -0,0 +1,9 @@ +lib.rs - source

casper_name_contracts/
lib.rs

1#![cfg_attr(not(test), no_std)]
+2#![cfg_attr(not(test), no_main)]
+3extern crate alloc;
+4
+5pub mod contracts;
+6pub mod data_structures;
+7
+8#[cfg(test)]
+9pub mod test_context;
\ No newline at end of file diff --git a/docs/static.files/COPYRIGHT-7fb11f4e.txt b/docs/static.files/COPYRIGHT-7fb11f4e.txt new file mode 100644 index 0000000..752dab0 --- /dev/null +++ b/docs/static.files/COPYRIGHT-7fb11f4e.txt @@ -0,0 +1,71 @@ +# REUSE-IgnoreStart + +These documentation pages include resources by third parties. This copyright +file applies only to those resources. The following third party resources are +included, and carry their own copyright notices and license terms: + +* Fira Sans (FiraSans-Regular.woff2, FiraSans-Medium.woff2): + + Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ + with Reserved Font Name Fira Sans. + + Copyright (c) 2014, Telefonica S.A. + + Licensed under the SIL Open Font License, Version 1.1. + See FiraSans-LICENSE.txt. + +* rustdoc.css, main.js, and playpen.js: + + Copyright 2015 The Rust Developers. + Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or + the MIT license (LICENSE-MIT.txt) at your option. + +* normalize.css: + + Copyright (c) Nicolas Gallagher and Jonathan Neal. + Licensed under the MIT license (see LICENSE-MIT.txt). + +* Source Code Pro (SourceCodePro-Regular.ttf.woff2, + SourceCodePro-Semibold.ttf.woff2, SourceCodePro-It.ttf.woff2): + + Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), + with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark + of Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceCodePro-LICENSE.txt. + +* Source Serif 4 (SourceSerif4-Regular.ttf.woff2, SourceSerif4-Bold.ttf.woff2, + SourceSerif4-It.ttf.woff2, SourceSerif4-Semibold.ttf.woff2): + + Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name + 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United + States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceSerif4-LICENSE.md. + +* Nanum Barun Gothic Font (NanumBarunGothic.woff2) + + Copyright 2010, NAVER Corporation (http://www.nhncorp.com) + with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, + NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen, + Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, + Naver NanumMyeongjoEco, NanumMyeongjoEco, Naver NanumGothicLight, + NanumGothicLight, NanumBarunGothic, Naver NanumBarunGothic. + + https://hangeul.naver.com/2017/nanum + https://github.com/hiun/NanumBarunGothic + + Licensed under the SIL Open Font License, Version 1.1. + See NanumBarunGothic-LICENSE.txt. + +* Rust logos (rust-logo.svg, favicon.svg, favicon-32x32.png) + + Copyright 2025 Rust Foundation. + Licensed under the Creative Commons Attribution license (CC-BY). + https://rustfoundation.org/policy/rust-trademark-policy/ + +This copyright file is intended to be distributed with rustdoc output. + +# REUSE-IgnoreEnd diff --git a/docs/static.files/FiraMono-Medium-86f75c8c.woff2 b/docs/static.files/FiraMono-Medium-86f75c8c.woff2 new file mode 100644 index 0000000..610e9b2 Binary files /dev/null and b/docs/static.files/FiraMono-Medium-86f75c8c.woff2 differ diff --git a/docs/static.files/FiraMono-Regular-87c26294.woff2 b/docs/static.files/FiraMono-Regular-87c26294.woff2 new file mode 100644 index 0000000..9fa44b7 Binary files /dev/null and b/docs/static.files/FiraMono-Regular-87c26294.woff2 differ diff --git a/docs/static.files/FiraSans-Italic-81dc35de.woff2 b/docs/static.files/FiraSans-Italic-81dc35de.woff2 new file mode 100644 index 0000000..3f63664 Binary files /dev/null and b/docs/static.files/FiraSans-Italic-81dc35de.woff2 differ diff --git a/docs/static.files/FiraSans-LICENSE-05ab6dbd.txt b/docs/static.files/FiraSans-LICENSE-05ab6dbd.txt new file mode 100644 index 0000000..d7e9c14 --- /dev/null +++ b/docs/static.files/FiraSans-LICENSE-05ab6dbd.txt @@ -0,0 +1,98 @@ +// REUSE-IgnoreStart + +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. +with Reserved Font Name < Fira >, + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/docs/static.files/FiraSans-Medium-e1aa3f0a.woff2 b/docs/static.files/FiraSans-Medium-e1aa3f0a.woff2 new file mode 100644 index 0000000..7a1e5fc Binary files /dev/null and b/docs/static.files/FiraSans-Medium-e1aa3f0a.woff2 differ diff --git a/docs/static.files/FiraSans-MediumItalic-ccf7e434.woff2 b/docs/static.files/FiraSans-MediumItalic-ccf7e434.woff2 new file mode 100644 index 0000000..2d08f9f Binary files /dev/null and b/docs/static.files/FiraSans-MediumItalic-ccf7e434.woff2 differ diff --git a/docs/static.files/FiraSans-Regular-0fe48ade.woff2 b/docs/static.files/FiraSans-Regular-0fe48ade.woff2 new file mode 100644 index 0000000..e766e06 Binary files /dev/null and b/docs/static.files/FiraSans-Regular-0fe48ade.woff2 differ diff --git a/docs/static.files/LICENSE-APACHE-a60eea81.txt b/docs/static.files/LICENSE-APACHE-a60eea81.txt new file mode 100644 index 0000000..16fe87b --- /dev/null +++ b/docs/static.files/LICENSE-APACHE-a60eea81.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/docs/static.files/LICENSE-MIT-23f18e03.txt b/docs/static.files/LICENSE-MIT-23f18e03.txt new file mode 100644 index 0000000..31aa793 --- /dev/null +++ b/docs/static.files/LICENSE-MIT-23f18e03.txt @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/docs/static.files/NanumBarunGothic-13b3dcba.ttf.woff2 b/docs/static.files/NanumBarunGothic-13b3dcba.ttf.woff2 new file mode 100644 index 0000000..1866ad4 Binary files /dev/null and b/docs/static.files/NanumBarunGothic-13b3dcba.ttf.woff2 differ diff --git a/docs/static.files/NanumBarunGothic-LICENSE-a37d393b.txt b/docs/static.files/NanumBarunGothic-LICENSE-a37d393b.txt new file mode 100644 index 0000000..4b3edc2 --- /dev/null +++ b/docs/static.files/NanumBarunGothic-LICENSE-a37d393b.txt @@ -0,0 +1,103 @@ +// REUSE-IgnoreStart + +Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/), + +with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, +NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen, +Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, Naver NanumMyeongjoEco, +NanumMyeongjoEco, Naver NanumGothicLight, NanumGothicLight, NanumBarunGothic, +Naver NanumBarunGothic, NanumSquareRound, NanumBarunPen, MaruBuri + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/docs/static.files/SourceCodePro-It-fc8b9304.ttf.woff2 b/docs/static.files/SourceCodePro-It-fc8b9304.ttf.woff2 new file mode 100644 index 0000000..462c34e Binary files /dev/null and b/docs/static.files/SourceCodePro-It-fc8b9304.ttf.woff2 differ diff --git a/docs/static.files/SourceCodePro-LICENSE-67f54ca7.txt b/docs/static.files/SourceCodePro-LICENSE-67f54ca7.txt new file mode 100644 index 0000000..0d2941e --- /dev/null +++ b/docs/static.files/SourceCodePro-LICENSE-67f54ca7.txt @@ -0,0 +1,97 @@ +// REUSE-IgnoreStart + +Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/docs/static.files/SourceCodePro-Regular-8badfe75.ttf.woff2 b/docs/static.files/SourceCodePro-Regular-8badfe75.ttf.woff2 new file mode 100644 index 0000000..10b558e Binary files /dev/null and b/docs/static.files/SourceCodePro-Regular-8badfe75.ttf.woff2 differ diff --git a/docs/static.files/SourceCodePro-Semibold-aa29a496.ttf.woff2 b/docs/static.files/SourceCodePro-Semibold-aa29a496.ttf.woff2 new file mode 100644 index 0000000..5ec64ee Binary files /dev/null and b/docs/static.files/SourceCodePro-Semibold-aa29a496.ttf.woff2 differ diff --git a/docs/static.files/SourceSerif4-Bold-6d4fd4c0.ttf.woff2 b/docs/static.files/SourceSerif4-Bold-6d4fd4c0.ttf.woff2 new file mode 100644 index 0000000..181a07f Binary files /dev/null and b/docs/static.files/SourceSerif4-Bold-6d4fd4c0.ttf.woff2 differ diff --git a/docs/static.files/SourceSerif4-It-ca3b17ed.ttf.woff2 b/docs/static.files/SourceSerif4-It-ca3b17ed.ttf.woff2 new file mode 100644 index 0000000..2ae08a7 Binary files /dev/null and b/docs/static.files/SourceSerif4-It-ca3b17ed.ttf.woff2 differ diff --git a/docs/static.files/SourceSerif4-LICENSE-a2cfd9d5.md b/docs/static.files/SourceSerif4-LICENSE-a2cfd9d5.md new file mode 100644 index 0000000..175fa4f --- /dev/null +++ b/docs/static.files/SourceSerif4-LICENSE-a2cfd9d5.md @@ -0,0 +1,98 @@ + + +Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. +Copyright 2014 - 2023 Adobe (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + + diff --git a/docs/static.files/SourceSerif4-Regular-6b053e98.ttf.woff2 b/docs/static.files/SourceSerif4-Regular-6b053e98.ttf.woff2 new file mode 100644 index 0000000..0263fc3 Binary files /dev/null and b/docs/static.files/SourceSerif4-Regular-6b053e98.ttf.woff2 differ diff --git a/docs/static.files/SourceSerif4-Semibold-457a13ac.ttf.woff2 b/docs/static.files/SourceSerif4-Semibold-457a13ac.ttf.woff2 new file mode 100644 index 0000000..dd55f4e Binary files /dev/null and b/docs/static.files/SourceSerif4-Semibold-457a13ac.ttf.woff2 differ diff --git a/docs/static.files/favicon-044be391.svg b/docs/static.files/favicon-044be391.svg new file mode 100644 index 0000000..8b34b51 --- /dev/null +++ b/docs/static.files/favicon-044be391.svg @@ -0,0 +1,24 @@ + + + + + diff --git a/docs/static.files/favicon-32x32-6580c154.png b/docs/static.files/favicon-32x32-6580c154.png new file mode 100644 index 0000000..69b8613 Binary files /dev/null and b/docs/static.files/favicon-32x32-6580c154.png differ diff --git a/docs/static.files/main-fd3af306.js b/docs/static.files/main-fd3af306.js new file mode 100644 index 0000000..902a545 --- /dev/null +++ b/docs/static.files/main-fd3af306.js @@ -0,0 +1,11 @@ +"use strict";window.RUSTDOC_TOOLTIP_HOVER_MS=300;window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS=450;function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden");const toggle=document.getElementById("toggle-all-docs");if(toggle){toggle.setAttribute("disabled","disabled")}}function showMain(){const main=document.getElementById(MAIN_ID);if(!main){return}removeClass(main,"hidden");const mainHeading=main.querySelector(".main-heading");if(mainHeading&&window.searchState.rustdocToolbar){if(window.searchState.rustdocToolbar.parentElement){window.searchState.rustdocToolbar.parentElement.removeChild(window.searchState.rustdocToolbar,)}mainHeading.appendChild(window.searchState.rustdocToolbar)}const toggle=document.getElementById("toggle-all-docs");if(toggle){toggle.removeAttribute("disabled")}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function setMobileTopbar(){const mobileTopbar=document.querySelector(".mobile-topbar");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileTopbar){const mobileTitle=document.createElement("h2");mobileTitle.className="location";if(hasClass(document.querySelector(".rustdoc"),"crate")){mobileTitle.innerHTML=`Crate ${window.currentCrate}`}else if(locationTitle){mobileTitle.innerHTML=locationTitle.innerHTML}mobileTopbar.appendChild(mobileTitle)}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden");const mainHeading=elemToDisplay.querySelector(".main-heading");if(mainHeading&&window.searchState.rustdocToolbar){if(window.searchState.rustdocToolbar.parentElement){window.searchState.rustdocToolbar.parentElement.removeChild(window.searchState.rustdocToolbar,)}mainHeading.appendChild(window.searchState.rustdocToolbar)}}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url,errorCallback){const script=document.createElement("script");script.src=url;if(errorCallback!==undefined){script.onerror=errorCallback}document.head.append(script)}const settingsButton=getSettingsButton();if(settingsButton){settingsButton.onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"rotate");event.preventDefault();loadScript(getVar("static-root-path")+getVar("settings-js"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css")}}},0)}}window.searchState={rustdocToolbar:document.querySelector("rustdoc-toolbar"),loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(window.searchState.timeout!==null){clearTimeout(window.searchState.timeout);window.searchState.timeout=null}},isDisplayed:()=>{const outputElement=window.searchState.outputElement();return!!outputElement&&!!outputElement.parentElement&&outputElement.parentElement.id===ALTERNATIVE_DISPLAY_ID},focus:()=>{window.searchState.input&&window.searchState.input.focus()},defocus:()=>{window.searchState.input&&window.searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=window.searchState.outputElement()}switchDisplayedElement(search);document.title=window.searchState.title},removeQueryParameters:()=>{document.title=window.searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash)}},hideResults:()=>{switchDisplayedElement(null);window.searchState.removeQueryParameters()},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=").map(x=>x.replace(/\+/g," "));params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=window.searchState.input;if(!search_input){return}let searchLoaded=false;function sendSearchForm(){document.getElementsByClassName("search-form")[0].submit()}function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"),sendSearchForm);loadScript(resourcePath("search-index",".js"),sendSearchForm)}}search_input.addEventListener("focus",()=>{window.searchState.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=window.searchState.getQueryStringParams();if(params.search!==undefined){window.searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=window.searchState.outputElement();if(!search){return}search.innerHTML="

"+window.searchState.loadingText+"

";window.searchState.showResults(search)},descShards:new Map(),loadDesc:async function({descShard,descIndex}){if(descShard.promise===null){descShard.promise=new Promise((resolve,reject)=>{descShard.resolve=resolve;const ds=descShard;const fname=`${ds.crate}-desc-${ds.shard}-`;const url=resourcePath(`search.desc/${descShard.crate}/${fname}`,".js",);loadScript(url,reject)})}const list=await descShard.promise;return list[descIndex]},loadedDescShard:function(crate,shard,data){this.descShards.get(crate)[shard].resolve(data.split("\n"))},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&window.searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId)}}if(savedHash.startsWith("impl-")){const splitAt=savedHash.indexOf("/");if(splitAt!==-1){const implId=savedHash.slice(0,splitAt);const assocId=savedHash.slice(splitAt+1);const implElems=document.querySelectorAll(`details > summary > section[id^="${implId}"]`,);onEachLazy(implElems,implElem=>{const numbered=/^(.+?)-([0-9]+)$/.exec(implElem.id);if(implElem.id!==implId&&(!numbered||numbered[1]!==implId)){return false}return onEachLazy(implElem.parentElement.parentElement.querySelectorAll(`[id^="${assocId}"]`),item=>{const numbered=/^(.+?)-([0-9]+)$/.exec(item.id);if(item.id===assocId||(numbered&&numbered[1]===assocId)){openParentDetails(item);item.scrollIntoView();setTimeout(()=>{window.location.replace("#"+item.id)},0);return true}},)})}}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentElement}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){window.searchState.clearInputTimeout();window.searchState.hideResults();ev.preventDefault();window.searchState.defocus();window.hideAllModals(true)}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement&&document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":case"/":ev.preventDefault();window.searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementById("rustdoc-modnav");function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const modpath=hasClass(document.querySelector(".rustdoc"),"mod")?"../":"";const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=`${modpath}${name}/index.html`}else{path=`${modpath}${shortty}.${name}.html`}let current_page=document.location.href.toString();if(current_page.endsWith("/")){current_page+="index.html"}const link=document.createElement("a");link.href=path;link.textContent=name;const li=document.createElement("li");if(link.href===current_page){li.classList.add("current")}li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Aliases");block("union","unions","Unions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("attr","attributes","Attribute Macros");block("derive","derives","Derive Macros");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","),);for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}window.register_type_impls=imp=>{if(!imp||!imp[window.currentCrate]){return}window.pending_type_impls=undefined;const idMap=new Map();let implementations=document.getElementById("implementations-list");let trait_implementations=document.getElementById("trait-implementations-list");let trait_implementations_header=document.getElementById("trait-implementations");const script=document.querySelector("script[data-self-path]");const selfPath=script?script.getAttribute("data-self-path"):null;const mainContent=document.querySelector("#main-content");const sidebarSection=document.querySelector(".sidebar section");let methods=document.querySelector(".sidebar .block.method");let associatedTypes=document.querySelector(".sidebar .block.associatedtype");let associatedConstants=document.querySelector(".sidebar .block.associatedconstant");let sidebarTraitList=document.querySelector(".sidebar .block.trait-implementation");for(const impList of imp[window.currentCrate]){const types=impList.slice(2);const text=impList[0];const isTrait=impList[1]!==0;const traitName=impList[1];if(types.indexOf(selfPath)===-1){continue}let outputList=isTrait?trait_implementations:implementations;if(outputList===null){const outputListName=isTrait?"Trait Implementations":"Implementations";const outputListId=isTrait?"trait-implementations-list":"implementations-list";const outputListHeaderId=isTrait?"trait-implementations":"implementations";const outputListHeader=document.createElement("h2");outputListHeader.id=outputListHeaderId;outputListHeader.innerText=outputListName;outputList=document.createElement("div");outputList.id=outputListId;if(isTrait){const link=document.createElement("a");link.href=`#${outputListHeaderId}`;link.innerText="Trait Implementations";const h=document.createElement("h3");h.appendChild(link);trait_implementations=outputList;trait_implementations_header=outputListHeader;sidebarSection.appendChild(h);sidebarTraitList=document.createElement("ul");sidebarTraitList.className="block trait-implementation";sidebarSection.appendChild(sidebarTraitList);mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}else{implementations=outputList;if(trait_implementations){mainContent.insertBefore(outputListHeader,trait_implementations_header);mainContent.insertBefore(outputList,trait_implementations_header)}else{const mainContent=document.querySelector("#main-content");mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}}}const template=document.createElement("template");template.innerHTML=text;onEachLazy(template.content.querySelectorAll("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});onEachLazy(template.content.querySelectorAll("[id]"),el=>{let i=0;if(idMap.has(el.id)){i=idMap.get(el.id)}else if(document.getElementById(el.id)){i=1;while(document.getElementById(`${el.id}-${2 * i}`)){i=2*i}while(document.getElementById(`${el.id}-${i}`)){i+=1}}if(i!==0){const oldHref=`#${el.id}`;const newHref=`#${el.id}-${i}`;el.id=`${el.id}-${i}`;onEachLazy(template.content.querySelectorAll("a[href]"),link=>{if(link.getAttribute("href")===oldHref){link.href=newHref}})}idMap.set(el.id,i+1)});const templateAssocItems=template.content.querySelectorAll("section.tymethod, "+"section.method, section.associatedtype, section.associatedconstant");if(isTrait){const li=document.createElement("li");const a=document.createElement("a");a.href=`#${template.content.querySelector(".impl").id}`;a.textContent=traitName;li.appendChild(a);sidebarTraitList.append(li)}else{onEachLazy(templateAssocItems,item=>{let block=hasClass(item,"associatedtype")?associatedTypes:(hasClass(item,"associatedconstant")?associatedConstants:(methods));if(!block){const blockTitle=hasClass(item,"associatedtype")?"Associated Types":(hasClass(item,"associatedconstant")?"Associated Constants":("Methods"));const blockClass=hasClass(item,"associatedtype")?"associatedtype":(hasClass(item,"associatedconstant")?"associatedconstant":("method"));const blockHeader=document.createElement("h3");const blockLink=document.createElement("a");blockLink.href="#implementations";blockLink.innerText=blockTitle;blockHeader.appendChild(blockLink);block=document.createElement("ul");block.className=`block ${blockClass}`;const insertionReference=methods||sidebarTraitList;if(insertionReference){const insertionReferenceH=insertionReference.previousElementSibling;sidebarSection.insertBefore(blockHeader,insertionReferenceH);sidebarSection.insertBefore(block,insertionReferenceH)}else{sidebarSection.appendChild(blockHeader);sidebarSection.appendChild(block)}if(hasClass(item,"associatedtype")){associatedTypes=block}else if(hasClass(item,"associatedconstant")){associatedConstants=block}else{methods=block}}const li=document.createElement("li");const a=document.createElement("a");a.innerText=item.id.split("-")[0].split(".")[1];a.href=`#${item.id}`;li.appendChild(a);block.appendChild(li)})}outputList.appendChild(template.content)}for(const list of[methods,associatedTypes,associatedConstants,sidebarTraitList]){if(!list){continue}const newChildren=Array.prototype.slice.call(list.children);newChildren.sort((a,b)=>{const aI=a.innerText;const bI=b.innerText;return aIbI?1:0});list.replaceChildren(...newChildren)}};if(window.pending_type_impls){window.register_type_impls(window.pending_type_impls)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementById("rustdoc-modnav");if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";link.textContent=crate;const li=document.createElement("li");if(window.rootPath!=="./"&&crate===window.currentCrate){li.className="current"}li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true}});innerToggle.children[0].innerText="Summary"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.children[0].innerText="Show all"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}})}());window.rustdoc_add_line_numbers_to_examples=()=>{function generateLine(nb){return`${nb}`}onEachLazy(document.querySelectorAll(".rustdoc:not(.src) :not(.scraped-example) > .example-wrap > pre > code",),code=>{if(hasClass(code.parentElement.parentElement,"hide-lines")){removeClass(code.parentElement.parentElement,"hide-lines");return}const lines=code.innerHTML.split("\n");const digits=(lines.length+"").length;code.innerHTML=lines.map((line,index)=>generateLine(index+1)+line).join("\n");addClass(code.parentElement.parentElement,`digits-${digits}`)})};window.rustdoc_remove_line_numbers_from_examples=()=>{onEachLazy(document.querySelectorAll(".rustdoc:not(.src) :not(.scraped-example) > .example-wrap"),x=>addClass(x,"hide-lines"),)};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar)}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(!e.target.matches("summary, a, a *")){e.preventDefault()}})});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText)}else{throw new Error("showTooltip() called with notable without any notable traits!")}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);return}window.hideAllModals(false);const wrapper=document.createElement("div");if(notable_ty){wrapper.innerHTML="
"+window.NOTABLE_TRAITS[notable_ty]+"
"}else{const ttl=e.getAttribute("title");if(ttl!==null){e.setAttribute("data-title",ttl);e.removeAttribute("title")}const dttl=e.getAttribute("data-title");if(dttl!==null){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(dttl));wrapper.appendChild(titleContent)}}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";document.body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px"}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px",)}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);wrapper.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}clearTooltipHoverTimeout(e)};wrapper.onpointerleave=ev=>{if(ev.pointerType!=="mouse"||!(ev.relatedTarget instanceof HTMLElement)){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!e.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(wrapper,"fade-out")}}}function setTooltipHoverTimeout(element,show){clearTooltipHoverTimeout(element);if(!show&&!window.CURRENT_TOOLTIP_ELEMENT){return}if(show&&window.CURRENT_TOOLTIP_ELEMENT){return}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE!==element){return}element.TOOLTIP_HOVER_TIMEOUT=setTimeout(()=>{if(show){showTooltip(element)}else if(!element.TOOLTIP_FORCE_VISIBLE){hideTooltip(false)}},show?window.RUSTDOC_TOOLTIP_HOVER_MS:window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS)}function clearTooltipHoverTimeout(element){if(element.TOOLTIP_HOVER_TIMEOUT!==undefined){removeClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");clearTimeout(element.TOOLTIP_HOVER_TIMEOUT);delete element.TOOLTIP_HOVER_TIMEOUT}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.contains(event.relatedTarget)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(event.relatedTarget)){setTimeout(()=>hideTooltip(false),0)}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus()}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false}document.body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=null}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=()=>{e.TOOLTIP_FORCE_VISIBLE=e.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!e.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(e);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointermove=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out")}}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){if(!getHelpButton().contains(document.activeElement)&&!getHelpButton().contains(event.relatedTarget)&&!getSettingsButton().contains(document.activeElement)&&!getSettingsButton().contains(event.relatedTarget)){window.hidePopoverMenus()}}function buildHelpMenu(){const book_info=document.createElement("span");const drloChannel=`https://doc.rust-lang.org/${getVar("channel")}`;book_info.className="top";book_info.innerHTML=`You can find more information in \ +the rustdoc book.`;const shortcuts=[["?","Show this help dialog"],["S / /","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=[`For a full list of all search features, take a look \ + here.`,"Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"",`Look for functions that accept or return \ + slices and \ + arrays by writing square \ + brackets (e.g., -> [u8] or [] -> Option)`,"Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=switchFocus=>{hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=()=>{onEachLazy(document.querySelectorAll("rustdoc-toolbar .popover"),elem=>{elem.style.display="none"});const button=getHelpButton();if(button){removeClass(button,"help-open")}};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){const button=getHelpButton();addClass(button,"help-open");button.querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}const helpLink=document.querySelector(`#${HELP_BUTTON_ID} > a`);if(isHelpPage){buildHelpMenu()}else if(helpLink){helpLink.addEventListener("click",event=>{if(!helpLink.contains(helpLink)||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);window.searchState.setup()}());(function(){const SIDEBAR_MIN=100;const SIDEBAR_MAX=500;const RUSTDOC_MOBILE_BREAKPOINT=700;const BODY_MIN=400;const SIDEBAR_VANISH_THRESHOLD=SIDEBAR_MIN/2;const sidebarButton=document.getElementById("sidebar-button");if(sidebarButton){sidebarButton.addEventListener("click",e=>{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false");if(document.querySelector(".rustdoc.src")){window.rustdocToggleSrcSidebar()}e.preventDefault()})}let currentPointerId=null;let desiredSidebarSize=null;let pendingSidebarResizingFrame=false;const resizer=document.querySelector(".sidebar-resizer");const sidebar=document.querySelector(".sidebar");if(!resizer||!sidebar){return}const isSrcPage=hasClass(document.body,"src");const hideSidebar=function(){if(isSrcPage){window.rustdocCloseSourceSidebar();updateLocalStorage("src-sidebar-width",null);document.documentElement.style.removeProperty("--src-sidebar-width");sidebar.style.removeProperty("--src-sidebar-width");resizer.style.removeProperty("--src-sidebar-width")}else{addClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","true");updateLocalStorage("desktop-sidebar-width",null);document.documentElement.style.removeProperty("--desktop-sidebar-width");sidebar.style.removeProperty("--desktop-sidebar-width");resizer.style.removeProperty("--desktop-sidebar-width")}};const showSidebar=function(){if(isSrcPage){window.rustdocShowSourceSidebar()}else{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false")}};const changeSidebarSize=function(size){if(isSrcPage){updateLocalStorage("src-sidebar-width",size.toString());sidebar.style.setProperty("--src-sidebar-width",size+"px");resizer.style.setProperty("--src-sidebar-width",size+"px")}else{updateLocalStorage("desktop-sidebar-width",size.toString());sidebar.style.setProperty("--desktop-sidebar-width",size+"px");resizer.style.setProperty("--desktop-sidebar-width",size+"px")}};const isSidebarHidden=function(){return isSrcPage?!hasClass(document.documentElement,"src-sidebar-expanded"):hasClass(document.documentElement,"hide-sidebar")};const resize=function(e){if(currentPointerId===null||currentPointerId!==e.pointerId){return}e.preventDefault();const pos=e.clientX-3;if(pos=SIDEBAR_MIN){if(isSidebarHidden()){showSidebar()}const constrainedPos=Math.min(pos,window.innerWidth-BODY_MIN,SIDEBAR_MAX);changeSidebarSize(constrainedPos);desiredSidebarSize=constrainedPos;if(pendingSidebarResizingFrame!==false){clearTimeout(pendingSidebarResizingFrame)}pendingSidebarResizingFrame=setTimeout(()=>{if(currentPointerId===null||pendingSidebarResizingFrame===false){return}pendingSidebarResizingFrame=false;document.documentElement.style.setProperty("--resizing-sidebar-width",desiredSidebarSize+"px",)},100)}};window.addEventListener("resize",()=>{if(window.innerWidth=(window.innerWidth-BODY_MIN)){changeSidebarSize(window.innerWidth-BODY_MIN)}else if(desiredSidebarSize!==null&&desiredSidebarSize>SIDEBAR_MIN){changeSidebarSize(desiredSidebarSize)}});const stopResize=function(e){if(currentPointerId===null){return}if(e){e.preventDefault()}desiredSidebarSize=sidebar.getBoundingClientRect().width;removeClass(resizer,"active");window.removeEventListener("pointermove",resize,false);window.removeEventListener("pointerup",stopResize,false);removeClass(document.documentElement,"sidebar-resizing");document.documentElement.style.removeProperty("--resizing-sidebar-width");if(resizer.releasePointerCapture){resizer.releasePointerCapture(currentPointerId);currentPointerId=null}};const initResize=function(e){if(currentPointerId!==null||e.altKey||e.ctrlKey||e.metaKey||e.button!==0){return}if(resizer.setPointerCapture){resizer.setPointerCapture(e.pointerId);if(!resizer.hasPointerCapture(e.pointerId)){resizer.releasePointerCapture(e.pointerId);return}currentPointerId=e.pointerId}window.hideAllModals(false);e.preventDefault();window.addEventListener("pointermove",resize,false);window.addEventListener("pointercancel",stopResize,false);window.addEventListener("pointerup",stopResize,false);addClass(resizer,"active");addClass(document.documentElement,"sidebar-resizing");const pos=e.clientX-sidebar.offsetLeft-3;document.documentElement.style.setProperty("--resizing-sidebar-width",pos+"px");desiredSidebarSize=null};resizer.addEventListener("pointerdown",initResize,false)}());(function(){function copyContentToClipboard(content){if(content===null){return}const el=document.createElement("textarea");el.value=content;el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el)}function copyButtonAnimation(button){button.classList.add("clicked");if(button.reset_button_timeout!==undefined){clearTimeout(button.reset_button_timeout)}button.reset_button_timeout=setTimeout(()=>{button.reset_button_timeout=undefined;button.classList.remove("clicked")},1000)}const but=document.getElementById("copy-path");if(!but){return}but.onclick=()=>{const titleElement=document.querySelector("title");const title=titleElement&&titleElement.textContent?titleElement.textContent.replace(" - Rust",""):"";const[item,module]=title.split(" in ");const path=[item];if(module!==undefined){path.unshift(module)}copyContentToClipboard(path.join("::"));copyButtonAnimation(but)};function copyCode(codeElem){if(!codeElem){return}copyContentToClipboard(codeElem.textContent)}function getExampleWrap(event){const target=event.target;if(target instanceof HTMLElement){let elem=target;while(elem!==null&&!hasClass(elem,"example-wrap")){if(elem===document.body||elem.tagName==="A"||elem.tagName==="BUTTON"||hasClass(elem,"docblock")){return null}elem=elem.parentElement}return elem}else{return null}}function addCopyButton(event){const elem=getExampleWrap(event);if(elem===null){return}elem.removeEventListener("mouseover",addCopyButton);const parent=document.createElement("div");parent.className="button-holder";const runButton=elem.querySelector(".test-arrow");if(runButton!==null){parent.appendChild(runButton)}elem.appendChild(parent);const copyButton=document.createElement("button");copyButton.className="copy-button";copyButton.title="Copy code to clipboard";copyButton.addEventListener("click",()=>{copyCode(elem.querySelector("pre > code"));copyButtonAnimation(copyButton)});parent.appendChild(copyButton);if(!elem.parentElement||!elem.parentElement.classList.contains("scraped-example")||!window.updateScrapedExample){return}const scrapedWrapped=elem.parentElement;window.updateScrapedExample(scrapedWrapped,parent)}function showHideCodeExampleButtons(event){const elem=getExampleWrap(event);if(elem===null){return}let buttons=elem.querySelector(".button-holder");if(buttons===null){addCopyButton(event);buttons=elem.querySelector(".button-holder");if(buttons===null){return}}buttons.classList.toggle("keep-visible")}onEachLazy(document.querySelectorAll(".docblock .example-wrap"),elem=>{elem.addEventListener("mouseover",addCopyButton);elem.addEventListener("click",showHideCodeExampleButtons)})}()) \ No newline at end of file diff --git a/docs/static.files/normalize-9960930a.css b/docs/static.files/normalize-9960930a.css new file mode 100644 index 0000000..469959f --- /dev/null +++ b/docs/static.files/normalize-9960930a.css @@ -0,0 +1,2 @@ + /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ +html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type="button"],[type="reset"],[type="submit"],button{-webkit-appearance:button}[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} \ No newline at end of file diff --git a/docs/static.files/noscript-32bb7600.css b/docs/static.files/noscript-32bb7600.css new file mode 100644 index 0000000..c228ec4 --- /dev/null +++ b/docs/static.files/noscript-32bb7600.css @@ -0,0 +1 @@ + #main-content .attributes{margin-left:0 !important;}#copy-path,#sidebar-button,.sidebar-resizer{display:none !important;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;}:root,:root:not([data-theme]){--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--sidebar-border-color:#ddd;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--mobile-sidebar-menu-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--code-example-button-color:#7f7f7f;--code-example-button-hover-color:#595959;--settings-menu-filter:invert(50%);--settings-menu-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}@media (prefers-color-scheme:dark){:root,:root:not([data-theme]){--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--sidebar-border-color:#2A2A2A;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--code-example-button-color:#7f7f7f;--code-example-button-hover-color:#a5a5a5;--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--settings-menu-filter:invert(50%);--settings-menu-hover-filter:invert(65%);--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}} \ No newline at end of file diff --git a/docs/static.files/rust-logo-9a9549ea.svg b/docs/static.files/rust-logo-9a9549ea.svg new file mode 100644 index 0000000..62424d8 --- /dev/null +++ b/docs/static.files/rust-logo-9a9549ea.svg @@ -0,0 +1,61 @@ + + + diff --git a/docs/static.files/rustdoc-84e720fa.css b/docs/static.files/rustdoc-84e720fa.css new file mode 100644 index 0000000..de116b6 --- /dev/null +++ b/docs/static.files/rustdoc-84e720fa.css @@ -0,0 +1,59 @@ + :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;--desktop-sidebar-z-index:100;--sidebar-elems-left-padding:24px;--clipboard-image:url('data:image/svg+xml,\ +\ +\ +');--copy-path-height:34px;--copy-path-width:33px;--checkmark-image:url('data:image/svg+xml,\ +\ +');--button-left-margin:4px;--button-border-radius:2px;--toolbar-button-border-radius:6px;--code-block-border-radius:6px;--impl-items-indent:0.3em;--docblock-indent:24px;--font-family:"Source Serif 4",NanumBarunGothic,serif;--font-family-code:"Source Code Pro",monospace;--line-number-padding:4px;--line-number-right-margin:20px;--prev-arrow-image:url('data:image/svg+xml,');--next-arrow-image:url('data:image/svg+xml,');--expand-arrow-image:url('data:image/svg+xml,');--collapse-arrow-image:url('data:image/svg+xml,');--hamburger-image:url('data:image/svg+xml,\ + ');}:root.sans-serif{--font-family:"Fira Sans",sans-serif;--font-family-code:"Fira Mono",monospace;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-0fe48ade.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:italic;font-weight:400;src:local('Fira Sans Italic'),url("FiraSans-Italic-81dc35de.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-e1aa3f0a.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:italic;font-weight:500;src:local('Fira Sans Medium Italic'),url("FiraSans-MediumItalic-ccf7e434.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Mono';font-style:normal;font-weight:400;src:local('Fira Mono'),url("FiraMono-Regular-87c26294.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Mono';font-style:normal;font-weight:500;src:local('Fira Mono Medium'),url("FiraMono-Medium-86f75c8c.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-6b053e98.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-ca3b17ed.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:500;src:local('Source Serif 4 Semibold'),url("SourceSerif4-Semibold-457a13ac.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-6d4fd4c0.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-8badfe75.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-fc8b9304.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-aa29a496.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-13b3dcba.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 var(--font-family);margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;grid-area:main-heading-h1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{position:relative;display:grid;grid-template-areas:"main-heading-breadcrumbs main-heading-breadcrumbs" "main-heading-h1 main-heading-toolbar" "main-heading-sub-heading main-heading-toolbar";grid-template-columns:minmax(105px,1fr) minmax(0,max-content);grid-template-rows:minmax(25px,min-content) min-content min-content;padding-bottom:6px;margin-bottom:15px;}.rustdoc-breadcrumbs{grid-area:main-heading-breadcrumbs;line-height:1.25;padding-top:5px;position:relative;z-index:1;}.rustdoc-breadcrumbs a{padding:5px 0 7px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}.structfield,.sub-variant-field{margin:0.6em 0;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-table dt>a,.out-of-band,.sub-heading,span.since,a.src,rustdoc-toolbar,summary.hideme,.scraped-example-list,.rustdoc-breadcrumbs,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.section-header a,#src-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.search-results li,.stab,.result-name i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p,.docblock>.warning{margin:0 0 .75em 0;}p:last-child,.docblock>.warning:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.src main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,.code-header,.type-signature{font-family:var(--font-family-code);}.docblock code,.item-table dd code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.item-table dd pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.src .content pre{padding:20px;padding-left:16px;}img{max-width:100%;}.logo-container{line-height:0;display:block;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 var(--desktop-sidebar-width);width:var(--desktop-sidebar-width);overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;z-index:var(--desktop-sidebar-z-index);border-right:solid 1px var(--sidebar-border-color);}.rustdoc.src .sidebar{flex-basis:50px;width:50px;overflow-x:hidden;overflow-y:hidden;}.hide-sidebar .sidebar,.hide-sidebar .sidebar-resizer{display:none;}.sidebar-resizer{touch-action:none;width:9px;cursor:ew-resize;z-index:calc(var(--desktop-sidebar-z-index) + 1);position:fixed;height:100%;left:var(--desktop-sidebar-width);display:flex;align-items:center;justify-content:flex-start;color:var(--right-side-color);}.sidebar-resizer::before{content:"";border-right:dotted 2px currentColor;width:2px;height:12px;}.sidebar-resizer::after{content:"";border-right:dotted 2px currentColor;width:2px;height:16px;}.rustdoc.src .sidebar-resizer{left:49px;}.src-sidebar-expanded .src .sidebar-resizer{left:var(--src-sidebar-width);}.sidebar-resizing{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.sidebar-resizing *{cursor:ew-resize !important;}.sidebar-resizing .sidebar{position:fixed;border-right:solid 2px var(--sidebar-resizer-active);}.sidebar-resizing>body{padding-left:var(--resizing-sidebar-width);}.sidebar-resizer:hover,.sidebar-resizer:active,.sidebar-resizer:focus,.sidebar-resizer.active{width:10px;margin:0;left:calc(var(--desktop-sidebar-width) - 1px);border-left:solid 1px var(--sidebar-resizer-hover);color:var(--sidebar-resizer-hover);}.src-sidebar-expanded .rustdoc.src .sidebar-resizer:hover,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:active,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:focus,.src-sidebar-expanded .rustdoc.src .sidebar-resizer.active{left:calc(var(--src-sidebar-width) - 1px);}@media (pointer:coarse){.sidebar-resizer{display:none !important;}.sidebar{border-right:none;}}.sidebar-resizer.active{padding:0 140px;width:calc(140px + 140px + 9px + 2px);margin-left:-140px;border-left:none;color:var(--sidebar-resizer-active);}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar{background-color:var(--sidebar-background-color);}.src .sidebar>*{visibility:hidden;}.src-sidebar-expanded .src .sidebar{overflow-y:auto;flex-basis:var(--src-sidebar-width);width:var(--src-sidebar-width);}.src-sidebar-expanded .src .sidebar>*{visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.logo-container>img{height:48px;width:48px;}ul.block,.block li,.block ul{padding:0;margin:0;list-style:none;}.block ul a{padding-left:1rem;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-right:0.25rem;border-left:solid var(--sidebar-elems-left-padding) transparent;margin-left:calc(-0.25rem - var(--sidebar-elems-left-padding));background-clip:border-box;}.hide-toc #rustdoc-toc,.hide-toc .in-crate{display:none;}.hide-modnav #rustdoc-modnav{display:none;}.sidebar h2{text-wrap:balance;overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{text-wrap:balance;overflow-wrap:anywhere;font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>.version,.sidebar>h2{padding-left:var(--sidebar-elems-left-padding);}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar .current a,.sidebar-crate a.logo-container:hover+h2 a,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.sidebar-crate{display:flex;align-items:center;justify-content:center;margin:14px 32px 1rem;row-gap:10px;column-gap:32px;flex-wrap:wrap;}.sidebar-crate h2{flex-grow:1;margin:0 -8px;align-self:start;}.sidebar-crate .logo-container{margin:0 calc(-16px - var(--sidebar-elems-left-padding));padding:0 var(--sidebar-elems-left-padding);text-align:center;}.sidebar-crate .logo-container img{margin-top:-16px;border-top:solid 16px transparent;box-sizing:content-box;position:relative;background-clip:border-box;z-index:1;}.sidebar-crate h2 a{display:block;border-left:solid var(--sidebar-elems-left-padding) transparent;background-clip:border-box;margin:0 calc(-24px + 0.25rem) 0 calc(-0.2rem - var(--sidebar-elems-left-padding));padding:calc((16px - 0.57rem ) / 2 ) 0.25rem;padding-left:0.2rem;}.sidebar-crate h2 .version{display:block;font-weight:normal;font-size:1rem;overflow-wrap:break-word;}.sidebar-crate+.version{margin-top:-1rem;margin-bottom:1rem;}.mobile-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap>pre,.rustdoc .scraped-example .src-line-numbers,.rustdoc .scraped-example .src-line-numbers>pre{border-radius:6px;}.rustdoc .scraped-example{position:relative;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.scraped-example:not(.expanded) .example-wrap{max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .example-wrap{max-height:calc(1.5em * 10 + 10px);}.rustdoc:not(.src) .scraped-example:not(.expanded) .src-line-numbers,.rustdoc:not(.src) .scraped-example:not(.expanded) .src-line-numbers>pre,.rustdoc:not(.src) .scraped-example:not(.expanded) pre.rust{padding-bottom:0;overflow:auto hidden;}.rustdoc:not(.src) .scraped-example .src-line-numbers{padding-top:0;}.rustdoc:not(.src) .scraped-example.expanded .src-line-numbers{padding-bottom:0;}.rustdoc:not(.src) .example-wrap pre{overflow:auto;}.example-wrap.digits-1:not(.hide-lines) [data-nosnippet]{width:calc(1ch + var(--line-number-padding) * 2);}.example-wrap.digits-2:not(.hide-lines) [data-nosnippet]{width:calc(2ch + var(--line-number-padding) * 2);}.example-wrap.digits-3:not(.hide-lines) [data-nosnippet]{width:calc(3ch + var(--line-number-padding) * 2);}.example-wrap.digits-4:not(.hide-lines) [data-nosnippet]{width:calc(4ch + var(--line-number-padding) * 2);}.example-wrap.digits-5:not(.hide-lines) [data-nosnippet]{width:calc(5ch + var(--line-number-padding) * 2);}.example-wrap.digits-6:not(.hide-lines) [data-nosnippet]{width:calc(6ch + var(--line-number-padding) * 2);}.example-wrap.digits-7:not(.hide-lines) [data-nosnippet]{width:calc(7ch + var(--line-number-padding) * 2);}.example-wrap.digits-8:not(.hide-lines) [data-nosnippet]{width:calc(8ch + var(--line-number-padding) * 2);}.example-wrap.digits-9:not(.hide-lines) [data-nosnippet]{width:calc(9ch + var(--line-number-padding) * 2);}.example-wrap [data-nosnippet]{color:var(--src-line-numbers-span-color);text-align:right;display:inline-block;margin-right:var(--line-number-right-margin);-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;padding:0 var(--line-number-padding);}.example-wrap [data-nosnippet]:target{border-right:none;}.example-wrap .line-highlighted[data-nosnippet]{background-color:var(--src-line-number-highlighted-background-color);}:root.word-wrap-source-code .example-wrap [data-nosnippet]{position:absolute;left:0;}.word-wrap-source-code .example-wrap pre>code{position:relative;word-break:break-all;}:root.word-wrap-source-code .example-wrap pre>code{display:block;white-space:pre-wrap;}:root.word-wrap-source-code .example-wrap pre>code *{word-break:break-all;}:root.word-wrap-source-code .example-wrap.digits-1 pre>code{padding-left:calc(1ch + var(--line-number-padding) * 2 + var(--line-number-right-margin));}:root.word-wrap-source-code .example-wrap.digits-2 pre>code{padding-left:calc(2ch + var(--line-number-padding) * 2 + var(--line-number-right-margin));}:root.word-wrap-source-code .example-wrap.digits-3 pre>code{padding-left:calc(3ch + var(--line-number-padding) * 2 + var(--line-number-right-margin));}:root.word-wrap-source-code .example-wrap.digits-4 pre>code{padding-left:calc(4ch + var(--line-number-padding) * 2 + var(--line-number-right-margin));}:root.word-wrap-source-code .example-wrap.digits-5 pre>code{padding-left:calc(5ch + var(--line-number-padding) * 2 + var(--line-number-right-margin));}:root.word-wrap-source-code .example-wrap.digits-6 pre>code{padding-left:calc(6ch + var(--line-number-padding) * 2 + var(--line-number-right-margin));}:root.word-wrap-source-code .example-wrap.digits-7 pre>code{padding-left:calc(7ch + var(--line-number-padding) * 2 + var(--line-number-right-margin));}:root.word-wrap-source-code .example-wrap.digits-8 pre>code{padding-left:calc(8ch + var(--line-number-padding) * 2 + var(--line-number-right-margin));}:root.word-wrap-source-code .example-wrap.digits-9 pre>code{padding-left:calc(9ch + var(--line-number-padding) * 2 + var(--line-number-right-margin));}.example-wrap.hide-lines [data-nosnippet]{display:none;}.search-loading{text-align:center;}.item-table dd{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.item-table dd code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:var(--docblock-indent);position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.sub-heading{font-size:1rem;flex-grow:0;grid-area:main-heading-sub-heading;line-height:1.25;padding-bottom:4px;}.main-heading rustdoc-toolbar,.main-heading .out-of-band{grid-area:main-heading-toolbar;}rustdoc-toolbar{display:flex;flex-direction:row;flex-wrap:nowrap;min-height:60px;}.docblock code,.item-table dd code,pre,.rustdoc.src .example-wrap,.example-wrap .src-line-numbers{background-color:var(--code-block-background-color);border-radius:var(--code-block-border-radius);text-decoration:inherit;}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}.docblock .stab,.item-table dd .stab,.docblock p code{display:inline-block;}.docblock li{margin-bottom:.4em;}.docblock li p:not(:last-child){margin-bottom:.3em;}div.where{white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:var(--docblock-indent);}.impl-items>.item-info{margin-left:calc(var(--docblock-indent) + var(--impl-items-indent));}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 0 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;margin-bottom:4px;}.src nav.sub{margin:0 0 -10px 0;}.section-header{display:block;position:relative;}.section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.section-header>.anchor{left:-15px;padding-right:8px;}h2.section-header>.anchor{padding-right:6px;}a.doc-anchor{color:var(--main-color);display:none;position:absolute;left:-17px;padding-right:10px;padding-left:3px;}*:hover>.doc-anchor{display:block;}.top-doc>.docblock>*:first-child>.doc-anchor{display:none !important;}.main-heading a:hover,.example-wrap .rust a:hover:not([data-nosnippet]),.all-items a:hover,.docblock a:not(.scrape-help):not(.tooltip):hover:not(.doc-anchor),.item-table dd a:not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block li.current a{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{padding:0;margin:0;width:100%;}.item-table>dt{padding-right:1.25rem;}.item-table>dd{margin-inline-start:0;margin-left:0;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}.search-results-title+.sub-heading{color:var(--main-color);display:flex;align-items:baseline;white-space:nowrap;}#crate-search-div{position:relative;min-width:0;}#crate-search{padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ + ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;margin:0;padding:0;}.search-results>a{display:grid;grid-template-areas:"search-result-name search-result-desc" "search-result-type-signature search-result-type-signature";grid-template-columns:.6fr .4fr;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);column-gap:1em;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;grid-area:search-result-desc;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name{display:flex;align-items:center;justify-content:start;grid-area:search-result-name;}.search-results .result-name .alias{color:var(--search-results-alias-color);}.search-results .result-name .grey{color:var(--search-results-grey-color);}.search-results .result-name .typename{color:var(--search-results-grey-color);font-size:0.875rem;width:var(--search-typename-width);}.search-results .result-name .path{word-break:break-all;max-width:calc(100% - var(--search-typename-width));display:inline-block;}.search-results .result-name .path>*{display:inline;}.search-results .type-signature{grid-area:search-result-type-signature;white-space:pre-wrap;}.popover{position:absolute;top:100%;right:0;z-index:calc(var(--desktop-sidebar-z-index) + 1);margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-check input{flex-shrink:0;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,\ + \ + ');}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;}#settings.popover{--popover-arrow-offset:202px;top:calc(100% - 16px);}#help.popover{max-width:600px;--popover-arrow-offset:118px;top:calc(100% - 16px);}#help dt{float:left;clear:left;margin-right:0.5rem;}#help dd{margin-bottom:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;padding:0 0.5rem;text-wrap-style:balance;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side{display:flex;margin-bottom:20px;}.side-by-side>div{width:50%;padding:0 20px 0 17px;}.item-info .stab{display:block;padding:3px;margin-bottom:5px;}.item-table dt .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;white-space:pre-wrap;border-radius:3px;display:inline;vertical-align:baseline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji,.item-info .stab::before{font-size:1.25rem;}.stab .emoji{margin-right:0.3rem;}.item-info .stab::before{content:"\0";width:0;display:inline-block;color:transparent;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band,.sub-heading,rustdoc-toolbar{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.src .example-wrap pre.rust a:not([data-nosnippet]){background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}.content .docblock .warning{border-left:2px solid var(--warning-border-color);padding:14px;position:relative;overflow-x:visible !important;}.content .docblock .warning::before{color:var(--warning-border-color);content:"ⓘ";position:absolute;left:-25px;top:5px;font-weight:bold;font-size:1.25rem;}.top-doc>.docblock>.warning:first-child::before{top:20px;}.example-wrap>a.test-arrow,.example-wrap .button-holder{visibility:hidden;position:absolute;top:4px;right:4px;z-index:1;}a.test-arrow{height:var(--copy-path-height);padding:6px 4px 0 11px;}a.test-arrow::before{content:url('data:image/svg+xml,');}.example-wrap .button-holder{display:flex;}@media not (pointer:coarse){.example-wrap:hover>a.test-arrow,.example-wrap:hover>.button-holder{visibility:visible;}}.example-wrap .button-holder.keep-visible{visibility:visible;}.example-wrap .button-holder>*{background:var(--main-background-color);cursor:pointer;border-radius:var(--button-border-radius);height:var(--copy-path-height);width:var(--copy-path-width);border:0;color:var(--code-example-button-color);}.example-wrap .button-holder>*:hover{color:var(--code-example-button-hover-color);}.example-wrap .button-holder>*:not(:first-child){margin-left:var(--button-left-margin);}.example-wrap .button-holder .copy-button{padding:2px 0 0 4px;}.example-wrap .button-holder .copy-button::before,.example-wrap .test-arrow::before,.example-wrap .button-holder .prev::before,.example-wrap .button-holder .next::before,.example-wrap .button-holder .expand::before{filter:var(--copy-path-img-filter);}.example-wrap .button-holder .copy-button::before{content:var(--clipboard-image);}.example-wrap .button-holder .copy-button:hover::before,.example-wrap .test-arrow:hover::before{filter:var(--copy-path-img-hover-filter);}.example-wrap .button-holder .copy-button.clicked::before{content:var(--checkmark-image);padding-right:5px;}.example-wrap .button-holder .prev,.example-wrap .button-holder .next,.example-wrap .button-holder .expand{line-height:0px;}.example-wrap .button-holder .prev::before{content:var(--prev-arrow-image);}.example-wrap .button-holder .next::before{content:var(--next-arrow-image);}.example-wrap .button-holder .expand::before{content:var(--expand-arrow-image);}.example-wrap .button-holder .expand.collapse::before{content:var(--collapse-arrow-image);}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.main-heading span.since::before{content:"Since ";}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}@keyframes targetfadein{from{background-color:var(--main-background-color);}10%{background-color:var(--target-border-color);}to{background-color:var(--target-background-color);}}:target:not([data-nosnippet]){background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}.code-header a.tooltip:hover{color:var(--link-color);}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}@media not (prefers-reduced-motion){:target{animation:0.65s cubic-bezier(0,0,0.1,1.0) 0.1s targetfadein;}.fade-out{opacity:0;transition:opacity 0.45s cubic-bezier(0,0,0.1,1.0);}}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{margin-top:0.25rem;display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;font-variant-numeric:tabular-nums;color:var(--search-tab-title-count-color);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}.search-corrections{font-weight:normal;}#src-sidebar{width:100%;overflow:auto;}#src-sidebar div.files>a:hover,details.dir-entry summary:hover,#src-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--src-sidebar-background-hover);}#src-sidebar div.files>a.selected{background-color:var(--src-sidebar-background-selected);}.src-sidebar-title{position:sticky;top:0;display:flex;padding:8px 8px 0 48px;margin-bottom:7px;background:var(--sidebar-background-color);border-bottom:1px solid var(--border-color);}#settings-menu,#help-button,button#toggle-all-docs{margin-left:var(--button-left-margin);display:flex;line-height:1.25;min-width:14px;}#sidebar-button{display:none;line-height:0;}.hide-sidebar #sidebar-button,.src #sidebar-button{display:flex;margin-right:4px;position:fixed;height:34px;width:34px;}.hide-sidebar #sidebar-button{left:6px;background-color:var(--main-background-color);z-index:1;}.src #sidebar-button{left:8px;z-index:calc(var(--desktop-sidebar-z-index) + 1);}.hide-sidebar .src #sidebar-button{position:static;}#settings-menu>a,#help-button>a,#sidebar-button>a,button#toggle-all-docs{display:flex;align-items:center;justify-content:center;flex-direction:column;}#settings-menu>a,#help-button>a,button#toggle-all-docs{border:1px solid transparent;border-radius:var(--button-border-radius);color:var(--main-color);}#settings-menu>a,#help-button>a,button#toggle-all-docs{width:80px;border-radius:var(--toolbar-button-border-radius);}#settings-menu>a,#help-button>a{min-width:0;}#sidebar-button>a{background-color:var(--sidebar-background-color);width:33px;}#sidebar-button>a:hover,#sidebar-button>a:focus-visible{background-color:var(--main-background-color);}#settings-menu>a:hover,#settings-menu>a:focus-visible,#help-button>a:hover,#help-button>a:focus-visible,button#toggle-all-docs:hover,button#toggle-all-docs:focus-visible{border-color:var(--settings-button-border-focus);text-decoration:none;}#settings-menu>a::before{content:url('data:image/svg+xml,\ + ');width:18px;height:18px;filter:var(--settings-menu-filter);}button#toggle-all-docs::before{content:url('data:image/svg+xml,\ + ');width:18px;height:18px;filter:var(--settings-menu-filter);}button#toggle-all-docs.will-expand::before{content:url('data:image/svg+xml,\ + ');}#help-button>a::before{content:url('data:image/svg+xml,\ + \ + ?');width:18px;height:18px;filter:var(--settings-menu-filter);}button#toggle-all-docs::before,#help-button>a::before,#settings-menu>a::before{filter:var(--settings-menu-filter);margin:8px;}@media not (pointer:coarse){button#toggle-all-docs:hover::before,#help-button>a:hover::before,#settings-menu>a:hover::before{filter:var(--settings-menu-hover-filter);}}button[disabled]#toggle-all-docs{opacity:0.25;border:solid 1px var(--main-background-color);background-size:cover;}button[disabled]#toggle-all-docs:hover{border:solid 1px var(--main-background-color);cursor:not-allowed;}rustdoc-toolbar span.label{font-size:1rem;flex-grow:1;padding-bottom:4px;}#sidebar-button>a::before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:var(--copy-path-height);width:var(--copy-path-width);margin-left:10px;padding:0;padding-left:2px;border:0;font-size:0;}#copy-path::before{filter:var(--copy-path-img-filter);content:var(--clipboard-image);}#copy-path:hover::before{filter:var(--copy-path-img-hover-filter);}#copy-path.clicked::before{content:var(--checkmark-image);}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.big-toggle{contain:inline-size;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,\ + ');content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>.methods>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}.impl-items>*:not(.item-info),.implementors-toggle>.docblock,#main-content>.methods>:not(.item-info),.impl>.item-info,.impl>.docblock,.impl+.docblock{margin-left:var(--impl-items-indent);}details.big-toggle>summary:not(.hideme)::before{left:-34px;top:9px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,\ + ');}details.toggle[open] >summary::after{content:"Collapse";}details.toggle:not([open])>summary .docblock{max-height:calc(1.5em + 0.75em);overflow-y:hidden;}details.toggle:not([open])>summary .docblock>:first-child{max-width:100%;overflow:hidden;width:fit-content;white-space:nowrap;position:relative;padding-right:1em;}details.toggle:not([open])>summary .docblock>:first-child::after{content:"…";position:absolute;right:0;top:0;bottom:0;z-index:1;background-color:var(--main-background-color);font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;padding-left:0.2em;}details.toggle:not([open])>summary .docblock>div:first-child::after{padding-top:calc(1.5em + 0.75em - 1.2rem);}details.toggle>summary .docblock{margin-top:0.75em;}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}.src #sidebar-button>a::before,.sidebar-menu-toggle::before{content:var(--hamburger-image);opacity:0.75;filter:var(--mobile-sidebar-menu-filter);}.sidebar-menu-toggle:hover::before,.sidebar-menu-toggle:active::before,.sidebar-menu-toggle:focus::before{opacity:1;}@media (max-width:850px){#search-tabs .count{display:block;}.side-by-side{flex-direction:column-reverse;}.side-by-side>div{width:auto;}}@media (max-width:700px){:root{--impl-items-indent:0.7em;}*[id]{scroll-margin-top:45px;}#copy-path{width:0;visibility:hidden;}rustdoc-toolbar span.label{display:none;}#settings-menu>a,#help-button>a,button#toggle-all-docs{width:33px;}#settings.popover{--popover-arrow-offset:86px;}#help.popover{--popover-arrow-offset:48px;}.rustdoc{display:block;}main{padding-left:15px;padding-top:0px;}.sidebar .logo-container,.sidebar .location,.sidebar-resizer{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);border-right:none;width:100%;}.sidebar-elems .block li a{white-space:wrap;}.src main,.rustdoc.src .sidebar{top:0;padding:0;height:100vh;border:0;}.src .search-form{margin-left:40px;}.src .main-heading{margin-left:8px;}.hide-sidebar .search-form{margin-left:32px;}.hide-sidebar .src .search-form{margin-left:0;}.sidebar.shown,.src-sidebar-expanded .src .sidebar,.rustdoc:not(.src) .sidebar:focus-within{left:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;white-space:nowrap;text-overflow:ellipsis;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.hide-sidebar .mobile-topbar{display:none;}.sidebar-menu-toggle{width:45px;border:none;line-height:0;}.hide-sidebar .sidebar-menu-toggle{display:none;}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#sidebar-button>a::before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}.sidebar-menu-toggle:hover{background:var(--main-background-color);}.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table dd{padding-left:2em;}.search-results .result-name{display:block;}.search-results .result-name .typename{width:initial;margin-right:0;}.search-results .result-name .typename,.search-results .result-name .path{display:inline;}.src-sidebar-expanded .src .sidebar{position:fixed;max-width:100vw;width:100vw;}.src .src-sidebar-title{padding-top:0;}details.implementors-toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>.methods>details.toggle>summary:not(.hideme)::before{left:-20px;}summary>.item-info{margin-left:10px;}.impl-items>.item-info{margin-left:calc(var(--impl-items-indent) + 10px);}.src nav.sub{margin:0 0 -25px 0;padding:var(--nav-sub-mobile-padding);}html:not(.src-sidebar-expanded) .src #sidebar-button>a{background-color:var(--main-background-color);}html:not(.src-sidebar-expanded) .src #sidebar-button>a:hover,html:not(.src-sidebar-expanded) .src #sidebar-button>a:focus-visible{background-color:var(--sidebar-background-color);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}.item-table:not(.reexports){display:grid;grid-template-columns:33% 67%;}.item-table>dt,.item-table>dd{overflow-wrap:anywhere;}.item-table>dt{grid-column-start:1;}.item-table>dd{grid-column-start:2;}}@media print{:root{--docblock-indent:0;}nav.sidebar,nav.sub,.out-of-band,a.src,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}main{padding:10px;}}@media (max-width:464px){:root{--docblock-indent:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example:not(.expanded) .example-wrap::before,.scraped-example:not(.expanded) .example-wrap::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .example-wrap::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .example-wrap::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded){width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded){overflow-x:hidden;}.scraped-example .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;}:root[data-theme="light"],:root:not([data-theme]){--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--sidebar-border-color:#ddd;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--mobile-sidebar-menu-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--code-example-button-color:#7f7f7f;--code-example-button-hover-color:#595959;--settings-menu-filter:invert(50%);--settings-menu-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="dark"]{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--sidebar-border-color:#999;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--code-example-button-color:#7f7f7f;--code-example-button-hover-color:#a5a5a5;--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--settings-menu-filter:invert(50%);--settings-menu-hover-filter:invert(65%);--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="ayu"]{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--sidebar-border-color:#5c6773;--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--code-example-button-color:#b2b2b2;--code-example-button-hover-color:#fff;--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--settings-menu-filter:invert(70%);--settings-menu-hover-filter:invert(100%);--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--src-sidebar-background-selected:#14191f;--src-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);--sidebar-resizer-hover:hsl(34,50%,33%);--sidebar-resizer-active:hsl(34,100%,66%);}:root[data-theme="ayu"] h1,:root[data-theme="ayu"] h2,:root[data-theme="ayu"] h3,:root[data-theme="ayu"] h4,:where(:root[data-theme="ayu"]) h1 a,:root[data-theme="ayu"] .sidebar h2 a,:root[data-theme="ayu"] .sidebar h3 a{color:#fff;}:root[data-theme="ayu"] .docblock code{color:#ffb454;}:root[data-theme="ayu"] .docblock a>code{color:#39AFD7 !important;}:root[data-theme="ayu"] .code-header,:root[data-theme="ayu"] .docblock pre>code,:root[data-theme="ayu"] pre,:root[data-theme="ayu"] pre>code,:root[data-theme="ayu"] .item-info code,:root[data-theme="ayu"] .rustdoc.source .example-wrap{color:#e6e1cf;}:root[data-theme="ayu"] .sidebar .current,:root[data-theme="ayu"] .sidebar .current a,:root[data-theme="ayu"] .sidebar a:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:hover,:root[data-theme="ayu"] details.dir-entry summary:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:focus,:root[data-theme="ayu"] details.dir-entry summary:focus,:root[data-theme="ayu"] #src-sidebar div.files>a.selected{color:#ffb44c;}:root[data-theme="ayu"] .sidebar-elems .location{color:#ff7733;}:root[data-theme="ayu"] a[data-nosnippet].line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}:root[data-theme="ayu"] .search-results a:hover,:root[data-theme="ayu"] .search-results a:focus{color:#fff !important;background-color:#3c3c3c;}:root[data-theme="ayu"] .search-results a{color:#0096cf;}:root[data-theme="ayu"] .search-results a div.desc{color:#c5c5c5;}:root[data-theme="ayu"] .result-name .primitive>i,:root[data-theme="ayu"] .result-name .keyword>i{color:#788797;}:root[data-theme="ayu"] #search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}:root[data-theme="ayu"] #search-tabs>button:not(.selected){border:none;background-color:transparent !important;}:root[data-theme="ayu"] #search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}:root[data-theme="ayu"] #settings-menu>a img,:root[data-theme="ayu"] #sidebar-button>a::before{filter:invert(100);} \ No newline at end of file diff --git a/docs/static.files/scrape-examples-5e967b76.js b/docs/static.files/scrape-examples-5e967b76.js new file mode 100644 index 0000000..d34361f --- /dev/null +++ b/docs/static.files/scrape-examples-5e967b76.js @@ -0,0 +1 @@ +"use strict";(function(){const DEFAULT_MAX_LINES=5;const HIDDEN_MAX_LINES=10;function scrollToLoc(elt,loc,isHidden){const lines=elt.querySelectorAll("[data-nosnippet]");let scrollOffset;const maxLines=isHidden?HIDDEN_MAX_LINES:DEFAULT_MAX_LINES;if(loc[1]-loc[0]>maxLines){const line=Math.max(0,loc[0]-1);scrollOffset=lines[line].offsetTop}else{const halfHeight=elt.offsetHeight/2;const offsetTop=lines[loc[0]].offsetTop;const lastLine=lines[loc[1]];const offsetBot=lastLine.offsetTop+lastLine.offsetHeight;const offsetMid=(offsetTop+offsetBot)/2;scrollOffset=offsetMid-halfHeight}lines[0].parentElement.scrollTo(0,scrollOffset);elt.querySelector(".rust").scrollTo(0,scrollOffset)}function createScrapeButton(parent,className,content){const button=document.createElement("button");button.className=className;button.title=content;parent.insertBefore(button,parent.firstChild);return button}window.updateScrapedExample=(example,buttonHolder)=>{let locIndex=0;const highlights=Array.prototype.slice.call(example.querySelectorAll(".highlight"));const link=example.querySelector(".scraped-example-title a");let expandButton=null;if(!example.classList.contains("expanded")){expandButton=createScrapeButton(buttonHolder,"expand","Show all")}const isHidden=example.parentElement.classList.contains("more-scraped-examples");const locs=example.locs;if(locs.length>1){const next=createScrapeButton(buttonHolder,"next","Next usage");const prev=createScrapeButton(buttonHolder,"prev","Previous usage");const onChangeLoc=changeIndex=>{removeClass(highlights[locIndex],"focus");changeIndex();scrollToLoc(example,locs[locIndex][0],isHidden);addClass(highlights[locIndex],"focus");const url=locs[locIndex][1];const title=locs[locIndex][2];link.href=url;link.innerHTML=title};prev.addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex-1+locs.length)%locs.length})});next.addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex+1)%locs.length})})}if(expandButton){expandButton.addEventListener("click",()=>{if(hasClass(example,"expanded")){removeClass(example,"expanded");removeClass(expandButton,"collapse");expandButton.title="Show all";scrollToLoc(example,locs[0][0],isHidden)}else{addClass(example,"expanded");addClass(expandButton,"collapse");expandButton.title="Show single example"}})}};function setupLoc(example,isHidden){example.locs=JSON.parse(example.attributes.getNamedItem("data-locs").textContent);scrollToLoc(example,example.locs[0][0],isHidden)}const firstExamples=document.querySelectorAll(".scraped-example-list > .scraped-example");onEachLazy(firstExamples,el=>setupLoc(el,false));onEachLazy(document.querySelectorAll(".more-examples-toggle"),toggle=>{onEachLazy(toggle.querySelectorAll(".toggle-line, .hide-more"),button=>{button.addEventListener("click",()=>{toggle.open=false})});const moreExamples=toggle.querySelectorAll(".scraped-example");toggle.querySelector("summary").addEventListener("click",()=>{setTimeout(()=>{onEachLazy(moreExamples,el=>setupLoc(el,true))})},{once:true})})})() \ No newline at end of file diff --git a/docs/static.files/search-f7877310.js b/docs/static.files/search-f7877310.js new file mode 100644 index 0000000..2d59a94 --- /dev/null +++ b/docs/static.files/search-f7877310.js @@ -0,0 +1,6 @@ +"use strict";if(!Array.prototype.toSpliced){Array.prototype.toSpliced=function(){const me=this.slice();Array.prototype.splice.apply(me,arguments);return me}}function onEachBtwn(arr,func,funcBtwn){let skipped=true;for(const value of arr){if(!skipped){funcBtwn(value)}skipped=func(value)}}function undef2null(x){if(x!==undefined){return x}return null}const itemTypes=["keyword","primitive","mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","associatedtype","constant","associatedconstant","union","foreigntype","existential","attr","derive","traitalias","generic",];const TY_PRIMITIVE=itemTypes.indexOf("primitive");const TY_GENERIC=itemTypes.indexOf("generic");const TY_IMPORT=itemTypes.indexOf("import");const TY_TRAIT=itemTypes.indexOf("trait");const TY_FN=itemTypes.indexOf("fn");const TY_METHOD=itemTypes.indexOf("method");const TY_TYMETHOD=itemTypes.indexOf("tymethod");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";const UNBOXING_LIMIT=5;const REGEX_IDENT=/\p{ID_Start}\p{ID_Continue}*|_\p{ID_Continue}+/uy;const REGEX_INVALID_TYPE_FILTER=/[^a-z]/ui;const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1)}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1)}if(b.length===0){return minDist}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost,);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1,)}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1)},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit)}function isEndCharacter(c){return"=,>-])".indexOf(c)!==-1}function isFnLikeTy(ty){return ty===TY_FN||ty===TY_METHOD||ty===TY_TYMETHOD}function isSeparatorCharacter(c){return c===","||c==="="}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function skipWhitespace(parserState){while(parserState.pos0){const c=parserState.userQuery[pos-1];if(c===lookingFor){return true}else if(c!==" "){break}pos-=1}return false}function isLastElemGeneric(elems,parserState){return(elems.length>0&&elems[elems.length-1].generics.length>0)||prevIs(parserState,">")}function getFilteredNextElem(query,parserState,elems,isInGenerics){const start=parserState.pos;if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){throw["Expected type filter before ",":"]}getNextElem(query,parserState,elems,isInGenerics);if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}if(elems.length===0){throw["Expected type filter before ",":"]}else if(query.literalSearch){throw["Cannot use quotes on type filter"]}const typeFilterElem=elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.normalizedPathLast;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;getNextElem(query,parserState,elems,isInGenerics)}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let foundSeparator=false;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;const oldIsInBinding=parserState.isInBinding;parserState.isInBinding=null;let hofParameters=null;let extra="";if(endChar===">"){extra="<"}else if(endChar==="]"){extra="["}else if(endChar===")"){extra="("}else if(endChar===""){extra="->"}else{extra=endChar}while(parserState.pos"," after ","="]}hofParameters=[...elems];elems.length=0;parserState.pos+=2;foundStopChar=true;foundSeparator=false;continue}else if(c===" "){parserState.pos+=1;continue}else if(isSeparatorCharacter(c)){parserState.pos+=1;foundStopChar=true;foundSeparator=true;continue}else if(c===":"&&isPathStart(parserState)){throw["Unexpected ","::",": paths cannot start with ","::"]}else if(isEndCharacter(c)){throw["Unexpected ",c," after ",extra]}if(!foundStopChar){let extra=[];if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(endChar!==""){throw["Expected ",",",", ","=",", or ",endChar,...extra,", found ",c,]}throw["Expected ",","," or ","=",...extra,", found ",c,]}const posBefore=parserState.pos;getFilteredNextElem(query,parserState,elems,endChar!=="");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ",extra]}if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ",extra]}parserState.pos+=1;if(hofParameters){foundSeparator=false;if([...elems,...hofParameters].some(x=>x.bindingName)||parserState.isInBinding){throw["Unexpected ","="," within ","->"]}const hofElem=makePrimitiveElement("->",{generics:hofParameters,bindings:new Map([["output",[...elems]]]),typeFilter:null,});elems.length=0;elems[0]=hofElem}parserState.typeFilter=oldTypeFilter;parserState.isInBinding=oldIsInBinding;return{foundSeparator}}function getNextElem(query,parserState,elems,isInGenerics){const generics=[];skipWhitespace(parserState);let start=parserState.pos;let end;if("[(".indexOf(parserState.userQuery[parserState.pos])!==-1){let endChar=")";let name="()";let friendlyName="tuple";if(parserState.userQuery[parserState.pos]==="["){endChar="]";name="[]";friendlyName="slice"}parserState.pos+=1;const{foundSeparator}=getItemsBefore(query,parserState,generics,endChar);const typeFilter=parserState.typeFilter;const bindingName=parserState.isInBinding;parserState.typeFilter=null;parserState.isInBinding=null;for(const gen of generics){if(gen.bindingName!==null){throw["Type parameter ","=",` cannot be within ${friendlyName} `,name]}}if(name==="()"&&!foundSeparator&&generics.length===1&&typeFilter===null){elems.push(generics[0])}else if(name==="()"&&generics.length===1&&generics[0].name==="->"){generics[0].typeFilter=typeFilter;elems.push(generics[0])}else{if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive ",name," and ",typeFilter," both specified",]}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}elems.push(makePrimitiveElement(name,{bindingName,generics}))}}else if(parserState.userQuery[parserState.pos]==="&"){if(parserState.typeFilter!==null&&parserState.typeFilter!=="primitive"){throw["Invalid search type: primitive ","&"," and ",parserState.typeFilter," both specified",]}parserState.typeFilter=null;parserState.pos+=1;let c=parserState.userQuery[parserState.pos];while(c===" "&&parserState.pos=end){throw["Found generics without a path"]}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}else if(parserState.pos=end){throw["Found generics without a path"]}if(parserState.isInBinding){throw["Unexpected ","("," after ","="]}parserState.pos+=1;const typeFilter=parserState.typeFilter;parserState.typeFilter=null;getItemsBefore(query,parserState,generics,")");skipWhitespace(parserState);if(isReturnArrow(parserState)){parserState.pos+=2;skipWhitespace(parserState);getFilteredNextElem(query,parserState,generics,isInGenerics);generics[generics.length-1].bindingName=makePrimitiveElement("output")}else{generics.push(makePrimitiveElement(null,{bindingName:makePrimitiveElement("output"),typeFilter:null,}))}parserState.typeFilter=typeFilter}if(isStringElem){skipWhitespace(parserState)}if(start>=end&&generics.length===0){return}if(parserState.userQuery[parserState.pos]==="="){if(parserState.isInBinding){throw["Cannot write ","="," twice in a binding"]}if(!isInGenerics){throw["Type parameter ","="," must be within generics list"]}const name=parserState.userQuery.slice(start,end).trim();if(name==="!"){throw["Type parameter ","="," key cannot be ","!"," never type"]}if(name.includes("!")){throw["Type parameter ","="," key cannot be ","!"," macro"]}if(name.includes("::")){throw["Type parameter ","="," key cannot contain ","::"," path"]}if(name.includes(":")){throw["Type parameter ","="," key cannot contain ",":"," type"]}parserState.isInBinding={name,generics}}else{elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics,),)}}}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery.slice(start,parserState.pos).trim();const match=query.match(REGEX_INVALID_TYPE_FILTER);if(match){throw["Unexpected ",match[0]," in type filter (before ",":",")",]}}function createQueryElement(query,parserState,name,generics,isInGenerics){const path=name.trim();if(path.length===0&&generics.length===0){throw["Unexpected ",parserState.userQuery[parserState.pos]]}if(query.literalSearch&&parserState.totalElems-parserState.genericsElems>0){throw["Cannot have more than one element if you use quotes"]}const typeFilter=parserState.typeFilter;parserState.typeFilter=null;if(name.trim()==="!"){if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive never type ","!"," and ",typeFilter," both specified",]}if(generics.length!==0){throw["Never type ","!"," does not accept generic parameters",]}const bindingName=parserState.isInBinding;parserState.isInBinding=null;return makePrimitiveElement("never",{bindingName})}const quadcolon=/::\s*::/.exec(path);if(path.startsWith("::")){throw["Paths cannot start with ","::"]}else if(quadcolon!==null){throw["Unexpected ",quadcolon[0]]}const pathSegments=path.split(/(?:::\s*)|(?:\s+(?:::\s*)?)/).map(x=>x.toLowerCase());if(pathSegments.length===0||(pathSegments.length===1&&pathSegments[0]==="")){if(generics.length>0||prevIs(parserState,">")){throw["Found generics without a path"]}else{throw["Unexpected ",parserState.userQuery[parserState.pos]]}}for(const[i,pathSegment]of pathSegments.entries()){if(pathSegment==="!"){if(i!==0){throw["Never type ","!"," is not associated item"]}pathSegments[i]="never"}}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}const bindingName=parserState.isInBinding;parserState.isInBinding=null;const bindings=new Map();const pathLast=pathSegments[pathSegments.length-1];return{name:name.trim(),id:null,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast,normalizedPathLast:pathLast.replace(/_/g,""),generics:generics.filter(gen=>{if(gen.bindingName!==null&&gen.bindingName.name!==null){if(gen.name!==null){gen.bindingName.generics.unshift(gen)}bindings.set(gen.bindingName.name.toLowerCase().replace(/_/g,""),gen.bindingName.generics,);return false}return true}),bindings,typeFilter,bindingName,}}function makePrimitiveElement(name,extra){return Object.assign({name:name,id:null,fullPath:[name],pathWithoutLast:[],pathLast:name,normalizedPathLast:name,generics:[],bindings:new Map(),typeFilter:"primitive",bindingName:null,},extra)}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"]}else if(query.literalSearch){throw["Cannot have more than one literal search element"]}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"]}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""]}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"]}else if(start===end){throw["Cannot have empty string element"]}parserState.pos+=1;query.literalSearch=true}function getIdentEndPosition(parserState){let afterIdent=consumeIdent(parserState);let end=parserState.pos;let macroExclamation=-1;while(parserState.pos0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]," (not a valid identifier)"]}else{throw["Unexpected ",c," (not a valid identifier)"]}parserState.pos+=1;afterIdent=consumeIdent(parserState);end=parserState.pos}if(macroExclamation!==-1){if(parserState.typeFilter===null){parserState.typeFilter="macro"}else if(parserState.typeFilter!=="macro"){throw["Invalid search type: macro ","!"," and ",parserState.typeFilter," both specified",]}end=macroExclamation}return end}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function consumeIdent(parserState){REGEX_IDENT.lastIndex=parserState.pos;const match=parserState.userQuery.match(REGEX_IDENT);if(match){parserState.pos+=match[0].length;return true}return false}function isPathSeparator(c){return c===":"||c===" "}class VlqHexDecoder{constructor(string,cons){this.string=string;this.cons=cons;this.offset=0;this.backrefQueue=[]}decodeList(){let c=this.string.charCodeAt(this.offset);const ret=[];while(c!==125){ret.push(this.decode());c=this.string.charCodeAt(this.offset)}this.offset+=1;return ret}decode(){let n=0;let c=this.string.charCodeAt(this.offset);if(c===123){this.offset+=1;return this.decodeList()}while(c<96){n=(n<<4)|(c&0xF);this.offset+=1;c=this.string.charCodeAt(this.offset)}n=(n<<4)|(c&0xF);const[sign,value]=[n&1,n>>1];this.offset+=1;return sign?-value:value}next(){const c=this.string.charCodeAt(this.offset);if(c>=48&&c<64){this.offset+=1;return this.backrefQueue[c-48]}if(c===96){this.offset+=1;return this.cons(0)}const result=this.cons(this.decode());this.backrefQueue.unshift(result);if(this.backrefQueue.length>16){this.backrefQueue.pop()}return result}}class RoaringBitmap{constructor(str){const strdecoded=atob(str);const u8array=new Uint8Array(strdecoded.length);for(let j=0;j=4){offsets=[];for(let j=0;j>3]&(1<<(j&0x7))){const runcount=(u8array[i]|(u8array[i+1]<<8));i+=2;this.containers.push(new RoaringBitmapRun(runcount,u8array.slice(i,i+(runcount*4)),));i+=runcount*4}else if(this.cardinalities[j]>=4096){this.containers.push(new RoaringBitmapBits(u8array.slice(i,i+8192)));i+=8192}else{const end=this.cardinalities[j]*2;this.containers.push(new RoaringBitmapArray(this.cardinalities[j],u8array.slice(i,i+end),));i+=end}}}contains(keyvalue){const key=keyvalue>>16;const value=keyvalue&0xFFFF;let left=0;let right=this.keys.length-1;while(left<=right){const mid=Math.floor((left+right)/2);const x=this.keys[mid];if(xkey){right=mid-1}else{return this.containers[mid].contains(value)}}return false}}class RoaringBitmapRun{constructor(runcount,array){this.runcount=runcount;this.array=array}contains(value){let left=0;let right=this.runcount-1;while(left<=right){const mid=Math.floor((left+right)/2);const i=mid*4;const start=this.array[i]|(this.array[i+1]<<8);const lenm1=this.array[i+2]|(this.array[i+3]<<8);if((start+lenm1)value){right=mid-1}else{return true}}return false}}class RoaringBitmapArray{constructor(cardinality,array){this.cardinality=cardinality;this.array=array}contains(value){let left=0;let right=this.cardinality-1;while(left<=right){const mid=Math.floor((left+right)/2);const i=mid*2;const x=this.array[i]|(this.array[i+1]<<8);if(xvalue){right=mid-1}else{return true}}return false}}class RoaringBitmapBits{constructor(array){this.array=array}contains(value){return!!(this.array[value>>3]&(1<<(value&7)))}}class NameTrie{constructor(){this.children=[];this.matches=[]}insert(name,id,tailTable){this.insertSubstring(name,0,id,tailTable)}insertSubstring(name,substart,id,tailTable){const l=name.length;if(substart===l){this.matches.push(id)}else{const sb=name.charCodeAt(substart);let child;if(this.children[sb]!==undefined){child=this.children[sb]}else{child=new NameTrie();this.children[sb]=child;let sste;if(substart>=2){const tail=name.substring(substart-2,substart+1);const entry=tailTable.get(tail);if(entry!==undefined){sste=entry}else{sste=[];tailTable.set(tail,sste)}sste.push(child)}}child.insertSubstring(name,substart+1,id,tailTable)}}search(name,tailTable){const results=new Set();this.searchSubstringPrefix(name,0,results);if(results.size=3){const levParams=name.length>=6?new Lev2TParametricDescription(name.length):new Lev1TParametricDescription(name.length);this.searchLev(name,0,levParams,results);const tail=name.substring(0,3);const list=tailTable.get(tail);if(list!==undefined){for(const entry of list){entry.searchSubstringPrefix(name,3,results)}}}return[...results]}searchSubstringPrefix(name,substart,results){const l=name.length;if(substart===l){for(const match of this.matches){results.add(match)}let unprocessedChildren=[];for(const child of this.children){if(child){unprocessedChildren.push(child)}}let nextSet=[];while(unprocessedChildren.length!==0){const next=unprocessedChildren.pop();for(const child of next.children){if(child){nextSet.push(child)}}for(const match of next.matches){results.add(match)}if(unprocessedChildren.length===0){const tmp=unprocessedChildren;unprocessedChildren=nextSet;nextSet=tmp}}}else{const sb=name.charCodeAt(substart);if(this.children[sb]!==undefined){this.children[sb].searchSubstringPrefix(name,substart+1,results)}}}searchLev(name,substart,levParams,results){const stack=[[this,0]];const n=levParams.n;while(stack.length!==0){const[trie,levState]=stack.pop();for(const[charCode,child]of trie.children.entries()){if(!child){continue}const levPos=levParams.getPosition(levState);const vector=levParams.getVector(name,charCode,levPos,Math.min(name.length,levPos+(2*n)+1),);const newLevState=levParams.transition(levState,levPos,vector,);if(newLevState>=0){stack.push([child,newLevState]);if(levParams.isAccept(newLevState)){for(const match of child.matches){results.add(match)}}}}}}}class DocSearch{constructor(rawSearchIndex,rootPath,searchState){this.searchIndexDeprecated=new Map();this.searchIndexEmptyDesc=new Map();this.functionTypeFingerprint=new Uint32Array(0);this.typeNameIdMap=new Map();this.assocTypeIdNameMap=new Map();this.ALIASES=new Map();this.rootPath=rootPath;this.searchState=searchState;this.typeNameIdOfArray=this.buildTypeMapIndex("array");this.typeNameIdOfSlice=this.buildTypeMapIndex("slice");this.typeNameIdOfArrayOrSlice=this.buildTypeMapIndex("[]");this.typeNameIdOfTuple=this.buildTypeMapIndex("tuple");this.typeNameIdOfUnit=this.buildTypeMapIndex("unit");this.typeNameIdOfTupleOrUnit=this.buildTypeMapIndex("()");this.typeNameIdOfFn=this.buildTypeMapIndex("fn");this.typeNameIdOfFnMut=this.buildTypeMapIndex("fnmut");this.typeNameIdOfFnOnce=this.buildTypeMapIndex("fnonce");this.typeNameIdOfHof=this.buildTypeMapIndex("->");this.typeNameIdOfOutput=this.buildTypeMapIndex("output",true);this.typeNameIdOfReference=this.buildTypeMapIndex("reference");this.EMPTY_BINDINGS_MAP=new Map();this.EMPTY_GENERICS_ARRAY=[];this.TYPES_POOL=new Map();this.nameTrie=new NameTrie();this.tailTable=new Map();this.searchIndex=this.buildIndex(rawSearchIndex)}buildTypeMapIndex(name,isAssocType){if(name===""||name===null){return null}const obj=this.typeNameIdMap.get(name);if(obj!==undefined){obj.assocOnly=!!(isAssocType&&obj.assocOnly);return obj.id}else{const id=this.typeNameIdMap.size;this.typeNameIdMap.set(name,{id,assocOnly:!!isAssocType});return id}}buildItemSearchTypeAll(types,paths,lowercasePaths){return types&&types.length>0?types.map(type=>this.buildItemSearchType(type,paths,lowercasePaths)):this.EMPTY_GENERICS_ARRAY}buildItemSearchType(type,paths,lowercasePaths,isAssocType){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;const BINDINGS_DATA=2;let pathIndex,generics,bindings;if(typeof type==="number"){pathIndex=type;generics=this.EMPTY_GENERICS_ARRAY;bindings=this.EMPTY_BINDINGS_MAP}else{pathIndex=type[PATH_INDEX_DATA];generics=this.buildItemSearchTypeAll(type[GENERICS_DATA],paths,lowercasePaths,);if(type.length>BINDINGS_DATA&&type[BINDINGS_DATA].length>0){bindings=new Map(type[BINDINGS_DATA].map(binding=>{const[assocType,constraints]=binding;return[this.buildItemSearchType(assocType,paths,lowercasePaths,true).id,this.buildItemSearchTypeAll(constraints,paths,lowercasePaths),]}))}else{bindings=this.EMPTY_BINDINGS_MAP}}let result;if(pathIndex<0){result={id:pathIndex,name:"",ty:TY_GENERIC,path:null,exactPath:null,generics,bindings,unboxFlag:true,}}else if(pathIndex===0){result={id:null,name:"",ty:null,path:null,exactPath:null,generics,bindings,unboxFlag:true,}}else{const item=lowercasePaths[pathIndex-1];const id=this.buildTypeMapIndex(item.name,isAssocType);if(isAssocType&&id!==null){this.assocTypeIdNameMap.set(id,paths[pathIndex-1].name)}result={id,name:paths[pathIndex-1].name,ty:item.ty,path:item.path,exactPath:item.exactPath,generics,bindings,unboxFlag:item.unboxFlag,}}const cr=this.TYPES_POOL.get(result.id);if(cr){if(cr.generics.length===result.generics.length&&cr.generics!==result.generics&&cr.generics.every((x,i)=>result.generics[i]===x)){result.generics=cr.generics}if(cr.bindings.size===result.bindings.size&&cr.bindings!==result.bindings){let ok=true;for(const[k,v]of cr.bindings.entries()){const v2=result.bindings.get(v);if(!v2){ok=false;break}if(v!==v2&&v.length===v2.length&&v.every((x,i)=>v2[i]===x)){result.bindings.set(k,v)}else if(v!==v2){ok=false;break}}if(ok){result.bindings=cr.bindings}}if(cr.ty===result.ty&&cr.path===result.path&&cr.bindings===result.bindings&&cr.generics===result.generics&&cr.ty===result.ty&&cr.name===result.name&&cr.unboxFlag===result.unboxFlag){return cr}}this.TYPES_POOL.set(result.id,result);return result}buildFunctionTypeFingerprint(type,output){let input=type.id;if(input===this.typeNameIdOfArray||input===this.typeNameIdOfSlice){input=this.typeNameIdOfArrayOrSlice}if(input===this.typeNameIdOfTuple||input===this.typeNameIdOfUnit){input=this.typeNameIdOfTupleOrUnit}if(input===this.typeNameIdOfFn||input===this.typeNameIdOfFnMut||input===this.typeNameIdOfFnOnce){input=this.typeNameIdOfHof}const hashint1=k=>{k=(~~k+0x7ed55d16)+(k<<12);k=(k ^ 0xc761c23c)^(k>>>19);k=(~~k+0x165667b1)+(k<<5);k=(~~k+0xd3a2646c)^(k<<9);k=(~~k+0xfd7046c5)+(k<<3);return(k ^ 0xb55a4f09)^(k>>>16)};const hashint2=k=>{k=~k+(k<<15);k ^=k>>>12;k+=k<<2;k ^=k>>>4;k=Math.imul(k,2057);return k ^(k>>16)};if(input!==null){const h0a=hashint1(input);const h0b=hashint2(input);const h1a=~~(h0a+Math.imul(h0b,2));const h1b=~~(h0a+Math.imul(h0b,3));const h2a=~~(h0a+Math.imul(h0b,4));const h2b=~~(h0a+Math.imul(h0b,5));output[0]|=(1<<(h0a%32))|(1<<(h1b%32));output[1]|=(1<<(h1a%32))|(1<<(h2b%32));output[2]|=(1<<(h2a%32))|(1<<(h0b%32));output[3]+=1}for(const g of type.generics){this.buildFunctionTypeFingerprint(g,output)}const fb={id:null,ty:0,generics:this.EMPTY_GENERICS_ARRAY,bindings:this.EMPTY_BINDINGS_MAP,};for(const[k,v]of type.bindings.entries()){fb.id=k;fb.generics=v;this.buildFunctionTypeFingerprint(fb,output)}}buildIndex(rawSearchIndex){const buildFunctionSearchTypeCallback=(paths,lowercasePaths)=>{const cb=functionSearchType=>{if(functionSearchType===0){return null}const INPUTS_DATA=0;const OUTPUT_DATA=1;let inputs;let output;if(typeof functionSearchType[INPUTS_DATA]==="number"){inputs=[this.buildItemSearchType(functionSearchType[INPUTS_DATA],paths,lowercasePaths,),]}else{inputs=this.buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],paths,lowercasePaths,)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){output=[this.buildItemSearchType(functionSearchType[OUTPUT_DATA],paths,lowercasePaths,),]}else{output=this.buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],paths,lowercasePaths,)}}else{output=[]}const where_clause=[];const l=functionSearchType.length;for(let i=2;i{const n=noop;return n});let descShard={crate,shard:0,start:0,len:itemDescShardDecoder.next(),promise:null,resolve:null,};const descShardList=[descShard];this.searchIndexDeprecated.set(crate,new RoaringBitmap(crateCorpus.c));this.searchIndexEmptyDesc.set(crate,new RoaringBitmap(crateCorpus.e));let descIndex=0;let lastParamNames=[];let normalizedName=crate.indexOf("_")===-1?crate:crate.replace(/_/g,"");const crateRow={crate,ty:3,name:crate,path:"",descShard,descIndex,exactPath:"",desc:crateCorpus.doc,parent:undefined,type:null,paramNames:lastParamNames,id,word:crate,normalizedName,bitIndex:0,implDisambiguator:null,};this.nameTrie.insert(normalizedName,id,this.tailTable);id+=1;searchIndex.push(crateRow);currentIndex+=1;if(!this.searchIndexEmptyDesc.get(crate).contains(0)){descIndex+=1}const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=new Map(crateCorpus.q);const itemReexports=new Map(crateCorpus.r);const itemParentIdxDecoder=new VlqHexDecoder(crateCorpus.i,noop=>noop);const implDisambiguator=new Map(crateCorpus.b);const rawPaths=crateCorpus.p;const aliases=crateCorpus.a;const itemParamNames=new Map(crateCorpus.P);const lowercasePaths=[];const paths=[];const itemFunctionDecoder=new VlqHexDecoder(crateCorpus.f,buildFunctionSearchTypeCallback(paths,lowercasePaths),);let len=rawPaths.length;let lastPath=undef2null(itemPaths.get(0));for(let i=0;i{if(elem.length>idx&&elem[idx]!==undefined){const p=itemPaths.get(elem[idx]);if(p!==undefined){return p}return if_not_found}return if_null};const path=elemPath(2,lastPath,null);const exactPath=elemPath(3,path,path);const unboxFlag=elem.length>4&&!!elem[4];lowercasePaths.push({ty,name:name.toLowerCase(),path,exactPath,unboxFlag});paths[i]={ty,name,path,exactPath,unboxFlag}}lastPath="";len=itemTypes.length;let lastName="";let lastWord="";for(let i=0;i=descShard.len&&!this.searchIndexEmptyDesc.get(crate).contains(bitIndex)){descShard={crate,shard:descShard.shard+1,start:descShard.start+descShard.len,len:itemDescShardDecoder.next(),promise:null,resolve:null,};descIndex=0;descShardList.push(descShard)}const name=itemNames[i]===""?lastName:itemNames[i];const word=itemNames[i]===""?lastWord:itemNames[i].toLowerCase();const pathU=itemPaths.get(i);const path=pathU!==undefined?pathU:lastPath;const paramNameString=itemParamNames.get(i);const paramNames=paramNameString!==undefined?paramNameString.split(","):lastParamNames;const type=itemFunctionDecoder.next();if(type!==null){if(type){const fp=this.functionTypeFingerprint.subarray(id*4,(id+1)*4);for(const t of type.inputs){this.buildFunctionTypeFingerprint(t,fp)}for(const t of type.output){this.buildFunctionTypeFingerprint(t,fp)}for(const w of type.where_clause){for(const t of w){this.buildFunctionTypeFingerprint(t,fp)}}}}const itemParentIdx=itemParentIdxDecoder.next();normalizedName=word.indexOf("_")===-1?word:word.replace(/_/g,"");const row={crate,ty:itemTypes.charCodeAt(i)-65,name,path,descShard,descIndex,exactPath:itemReexports.has(i)?itemPaths.get(itemReexports.get(i)):path,parent:itemParentIdx>0?paths[itemParentIdx-1]:undefined,type,paramNames,id,word,normalizedName,bitIndex,implDisambiguator:undef2null(implDisambiguator.get(i)),};this.nameTrie.insert(normalizedName,id,this.tailTable);id+=1;searchIndex.push(row);lastPath=row.path;lastParamNames=row.paramNames;if(!this.searchIndexEmptyDesc.get(crate).contains(bitIndex)){descIndex+=1}lastName=name;lastWord=word}if(aliases){const currentCrateAliases=new Map();this.ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!Object.prototype.hasOwnProperty.call(aliases,alias_name)){continue}let currentNameAliases;if(currentCrateAliases.has(alias_name)){currentNameAliases=currentCrateAliases.get(alias_name)}else{currentNameAliases=[];currentCrateAliases.set(alias_name,currentNameAliases)}for(const local_alias of aliases[alias_name]){currentNameAliases.push(local_alias+currentIndex)}}}currentIndex+=itemTypes.length;this.searchState.descShards.set(crate,descShardList)}this.TYPES_POOL=new Map();return searchIndex}static parseQuery(userQuery){function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function convertTypeFilterOnElem(elem){if(typeof elem.typeFilter==="string"){let typeFilter=elem.typeFilter;if(typeFilter==="const"){typeFilter="constant"}elem.typeFilter=itemTypeFromName(typeFilter)}else{elem.typeFilter=NO_TYPE_FILTER}for(const elem2 of elem.generics){convertTypeFilterOnElem(elem2)}for(const constraints of elem.bindings.values()){for(const constraint of constraints){convertTypeFilterOnElem(constraint)}}}function newParsedQuery(userQuery){return{userQuery,elems:[],returned:[],foundElems:0,totalElems:0,literalSearch:false,hasReturnArrow:false,error:null,correction:null,proposeCorrectionFrom:null,proposeCorrectionTo:null,typeFingerprint:new Uint32Array(4),}}function parseInput(query,parserState){let foundStopChar=true;while(parserState.pos"){if(isReturnArrow(parserState)){query.hasReturnArrow=true;break}throw["Unexpected ",c," (did you mean ","->","?)"]}else if(parserState.pos>0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}throw["Unexpected ",c]}else if(c===" "){skipWhitespace(parserState);continue}if(!foundStopChar){let extra=[];if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(parserState.typeFilter!==null){throw["Expected ",","," or ","->",...extra,", found ",c,]}throw["Expected ",",",", ",":"," or ","->",...extra,", found ",c,]}const before=query.elems.length;getFilteredNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}while(parserState.postypeof elem==="string")){query.error=err}else{throw err}return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;query.totalElems=parserState.totalElems;return query}async execQuery(origParsedQuery,filterCrates,currentCrate){const results_others=new Map(),results_in_args=new Map(),results_returned=new Map();const parsedQuery=origParsedQuery;const queryLen=parsedQuery.elems.reduce((acc,next)=>acc+next.pathLast.length,0)+parsedQuery.returned.reduce((acc,next)=>acc+next.pathLast.length,0);const maxEditDistance=Math.floor(queryLen/3);const genericSymbols=new Map();const convertNameToId=(elem,isAssocType)=>{const loweredName=elem.pathLast.toLowerCase();if(this.typeNameIdMap.has(loweredName)&&(isAssocType||!this.typeNameIdMap.get(loweredName).assocOnly)){elem.id=this.typeNameIdMap.get(loweredName).id}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,{id,assocOnly}]of this.typeNameIdMap){const dist=Math.min(editDistance(name,loweredName,maxEditDistance),editDistance(name,elem.normalizedPathLast,maxEditDistance),);if(dist<=matchDist&&dist<=maxEditDistance&&(isAssocType||!assocOnly)){if(dist===matchDist&&matchName>name){continue}match=id;matchDist=dist;matchName=name}}if(match!==null){parsedQuery.correction=matchName}elem.id=match}if((elem.id===null&&parsedQuery.totalElems>1&&elem.typeFilter===-1&&elem.generics.length===0&&elem.bindings.size===0)||elem.typeFilter===TY_GENERIC){const id=genericSymbols.get(elem.normalizedPathLast);if(id!==undefined){elem.id=id}else{elem.id=-(genericSymbols.size+1);genericSymbols.set(elem.normalizedPathLast,elem.id)}if(elem.typeFilter===-1&&elem.normalizedPathLast.length>=3){const maxPartDistance=Math.floor(elem.normalizedPathLast.length/3);let matchDist=maxPartDistance+1;let matchName="";for(const name of this.typeNameIdMap.keys()){const dist=editDistance(name,elem.normalizedPathLast,maxPartDistance,);if(dist<=matchDist&&dist<=maxPartDistance){if(dist===matchDist&&matchName>name){continue}matchDist=dist;matchName=name}}if(matchName!==""){parsedQuery.proposeCorrectionFrom=elem.name;parsedQuery.proposeCorrectionTo=matchName}}elem.typeFilter=TY_GENERIC}if(elem.generics.length>0&&elem.typeFilter===TY_GENERIC){parsedQuery.error=["Generic type parameter ",elem.name," does not accept generic parameters",]}for(const elem2 of elem.generics){convertNameToId(elem2)}elem.bindings=new Map(Array.from(elem.bindings.entries()).map(entry=>{const[name,constraints]=entry;if(!this.typeNameIdMap.has(name)){parsedQuery.error=["Type parameter ",name," does not exist",];return[0,[]]}for(const elem2 of constraints){convertNameToId(elem2,false)}return[this.typeNameIdMap.get(name).id,constraints]}),)};for(const elem of parsedQuery.elems){convertNameToId(elem,false);this.buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint)}for(const elem of parsedQuery.returned){convertNameToId(elem,false);this.buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint)}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}const buildHrefAndPath=item=>{let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;let exactPath=item.exactPath;if(type==="mod"){displayPath=path+"::";href=this.rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=this.rootPath+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){displayPath="";exactPath="";href=this.rootPath+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=this.rootPath+name+"/index.html"}else if(item.parent!==undefined){const myparent=item.parent;let anchor=type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;exactPath=`${myparent.exactPath}::${myparent.name}`;if(parentType==="primitive"){displayPath=myparent.name+"::";exactPath=myparent.name}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}if(item.implDisambiguator!==null){anchor=item.implDisambiguator+"/"+anchor}href=this.rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html#"+anchor}else{displayPath=item.path+"::";href=this.rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href,`${exactPath}::${name}`]};function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}const transformResults=(results,typeInfo)=>{const duplicates=new Set();const out=[];for(const result of results){if(result.id!==-1){const res=buildHrefAndPath(this.searchIndex[result.id]);const obj=Object.assign({parent:result.parent,type:result.type,dist:result.dist,path_dist:result.path_dist,index:result.index,desc:result.desc,item:result.item,displayPath:pathSplitter(res[0]),fullPath:"",href:"",displayTypeSignature:null,},this.searchIndex[result.id]);obj.fullPath=res[2]+"|"+obj.ty;if(duplicates.has(obj.fullPath)){continue}if(obj.ty===TY_IMPORT&&duplicates.has(res[2])){continue}if(duplicates.has(res[2]+"|"+TY_IMPORT)){continue}duplicates.add(obj.fullPath);duplicates.add(res[2]);if(typeInfo!==null){obj.displayTypeSignature=this.formatDisplayTypeSignature(obj,typeInfo)}obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out};this.formatDisplayTypeSignature=async(obj,typeInfo)=>{const objType=obj.type;if(!objType){return{type:[],mappedNames:new Map(),whereClause:new Map()}}let fnInputs=null;let fnOutput=null;let mgens=null;if(typeInfo!=="elems"&&typeInfo!=="returned"){fnInputs=unifyFunctionTypes(objType.inputs,parsedQuery.elems,objType.where_clause,null,mgensScratch=>{fnOutput=unifyFunctionTypes(objType.output,parsedQuery.returned,objType.where_clause,mgensScratch,mgensOut=>{mgens=mgensOut;return true},0,);return!!fnOutput},0,)}else{const arr=typeInfo==="elems"?objType.inputs:objType.output;const highlighted=unifyFunctionTypes(arr,parsedQuery.elems,objType.where_clause,null,mgensOut=>{mgens=mgensOut;return true},0,);if(typeInfo==="elems"){fnInputs=highlighted}else{fnOutput=highlighted}}if(!fnInputs){fnInputs=objType.inputs}if(!fnOutput){fnOutput=objType.output}const mappedNames=new Map();const whereClause=new Map();const fnParamNames=obj.paramNames||[];const queryParamNames=[];const remapQuery=queryElem=>{if(queryElem.id!==null&&queryElem.id<0){queryParamNames[-1-queryElem.id]=queryElem.name}if(queryElem.generics.length>0){queryElem.generics.forEach(remapQuery)}if(queryElem.bindings.size>0){[...queryElem.bindings.values()].flat().forEach(remapQuery)}};parsedQuery.elems.forEach(remapQuery);parsedQuery.returned.forEach(remapQuery);const pushText=(fnType,result)=>{if(!!(result.length%2)===!!fnType.highlighted){result.push("")}else if(result.length===0&&!!fnType.highlighted){result.push("");result.push("")}result[result.length-1]+=fnType.name};const writeHof=(fnType,result)=>{const hofOutput=fnType.bindings.get(this.typeNameIdOfOutput)||[];const hofInputs=fnType.generics;pushText(fnType,result);pushText({name:" (",highlighted:false},result);let needsComma=false;for(const fnType of hofInputs){if(needsComma){pushText({name:", ",highlighted:false},result)}needsComma=true;writeFn(fnType,result)}pushText({name:hofOutput.length===0?")":") -> ",highlighted:false,},result);if(hofOutput.length>1){pushText({name:"(",highlighted:false},result)}needsComma=false;for(const fnType of hofOutput){if(needsComma){pushText({name:", ",highlighted:false},result)}needsComma=true;writeFn(fnType,result)}if(hofOutput.length>1){pushText({name:")",highlighted:false},result)}};const writeSpecialPrimitive=(fnType,result)=>{if(fnType.id===this.typeNameIdOfArray||fnType.id===this.typeNameIdOfSlice||fnType.id===this.typeNameIdOfTuple||fnType.id===this.typeNameIdOfUnit){const[ob,sb]=fnType.id===this.typeNameIdOfArray||fnType.id===this.typeNameIdOfSlice?["[","]"]:["(",")"];pushText({name:ob,highlighted:fnType.highlighted},result);onEachBtwn(fnType.generics,nested=>writeFn(nested,result),()=>pushText({name:", ",highlighted:false},result),);pushText({name:sb,highlighted:fnType.highlighted},result);return true}else if(fnType.id===this.typeNameIdOfReference){pushText({name:"&",highlighted:fnType.highlighted},result);let prevHighlighted=false;onEachBtwn(fnType.generics,value=>{prevHighlighted=!!value.highlighted;writeFn(value,result)},value=>pushText({name:" ",highlighted:prevHighlighted&&value.highlighted,},result),);return true}else if(fnType.id===this.typeNameIdOfFn){writeHof(fnType,result);return true}return false};const writeFn=(fnType,result)=>{if(fnType.id!==null&&fnType.id<0){if(fnParamNames[-1-fnType.id]===""){const generics=fnType.generics.length>0?fnType.generics:objType.where_clause[-1-fnType.id];for(const nested of generics){writeFn(nested,result)}return}else if(mgens){for(const[queryId,fnId]of mgens){if(fnId===fnType.id){mappedNames.set(queryParamNames[-1-queryId],fnParamNames[-1-fnType.id],)}}}pushText({name:fnParamNames[-1-fnType.id],highlighted:!!fnType.highlighted,},result);const where=[];onEachBtwn(fnType.generics,nested=>writeFn(nested,where),()=>pushText({name:" + ",highlighted:false},where),);if(where.length>0){whereClause.set(fnParamNames[-1-fnType.id],where)}}else{if(fnType.ty===TY_PRIMITIVE){if(writeSpecialPrimitive(fnType,result)){return}}else if(fnType.ty===TY_TRAIT&&(fnType.id===this.typeNameIdOfFn||fnType.id===this.typeNameIdOfFnMut||fnType.id===this.typeNameIdOfFnOnce)){writeHof(fnType,result);return}pushText(fnType,result);let hasBindings=false;if(fnType.bindings.size>0){onEachBtwn(fnType.bindings,([key,values])=>{const name=this.assocTypeIdNameMap.get(key);if(values.length===1&&values[0].id<0&&`${fnType.name}::${name}`===fnParamNames[-1-values[0].id]){for(const value of values){writeFn(value,[])}return true}if(!hasBindings){hasBindings=true;pushText({name:"<",highlighted:false},result)}pushText({name,highlighted:false},result);pushText({name:values.length!==1?"=(":"=",highlighted:false,},result);onEachBtwn(values||[],value=>writeFn(value,result),()=>pushText({name:" + ",highlighted:false},result),);if(values.length!==1){pushText({name:")",highlighted:false},result)}},()=>pushText({name:", ",highlighted:false},result),)}if(fnType.generics.length>0){pushText({name:hasBindings?", ":"<",highlighted:false},result)}onEachBtwn(fnType.generics,value=>writeFn(value,result),()=>pushText({name:", ",highlighted:false},result),);if(hasBindings||fnType.generics.length>0){pushText({name:">",highlighted:false},result)}}};const type=[];onEachBtwn(fnInputs,fnType=>writeFn(fnType,type),()=>pushText({name:", ",highlighted:false},type),);pushText({name:" -> ",highlighted:false},type);onEachBtwn(fnOutput,fnType=>writeFn(fnType,type),()=>pushText({name:", ",highlighted:false},type),);return{type,mappedNames,whereClause}};const sortResults=async(results,typeInfo,preferredCrate)=>{const userQuery=parsedQuery.userQuery;const normalizedUserQuery=parsedQuery.userQuery.toLowerCase();const isMixedCase=normalizedUserQuery!==userQuery;const result_list=[];const isReturnTypeQuery=parsedQuery.elems.length===0||typeInfo==="returned";for(const result of results.values()){result.item=this.searchIndex[result.id];result.word=this.searchIndex[result.id].word;if(isReturnTypeQuery){const resultItemType=result.item&&result.item.type;if(!resultItemType){continue}const inputs=resultItemType.inputs;const where_clause=resultItemType.where_clause;if(containsTypeFromQuery(inputs,where_clause)){result.path_dist*=100;result.dist*=100}}result_list.push(result)}result_list.sort((aaa,bbb)=>{let a;let b;if(isMixedCase){a=Number(aaa.item.name!==userQuery);b=Number(bbb.item.name!==userQuery);if(a!==b){return a-b}}a=Number(aaa.word!==normalizedUserQuery);b=Number(bbb.word!==normalizedUserQuery);if(a!==b){return a-b}a=Number(aaa.index<0);b=Number(bbb.index<0);if(a!==b){return a-b}if(parsedQuery.hasReturnArrow){a=Number(!isFnLikeTy(aaa.item.ty));b=Number(!isFnLikeTy(bbb.item.ty));if(a!==b){return a-b}}a=Number(aaa.path_dist);b=Number(bbb.path_dist);if(a!==b){return a-b}a=Number(aaa.index);b=Number(bbb.index);if(a!==b){return a-b}a=Number(aaa.dist);b=Number(bbb.dist);if(a!==b){return a-b}a=Number(this.searchIndexDeprecated.get(aaa.item.crate).contains(aaa.item.bitIndex),);b=Number(this.searchIndexDeprecated.get(bbb.item.crate).contains(bbb.item.bitIndex),);if(a!==b){return a-b}a=Number(aaa.item.crate!==preferredCrate);b=Number(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=Number(aaa.word.length);b=Number(bbb.word.length);if(a!==b){return a-b}let aw=aaa.word;let bw=bbb.word;if(aw!==bw){return(aw>bw?+1:-1)}a=Number(this.searchIndexEmptyDesc.get(aaa.item.crate).contains(aaa.item.bitIndex),);b=Number(this.searchIndexEmptyDesc.get(bbb.item.crate).contains(bbb.item.bitIndex),);if(a!==b){return a-b}a=Number(aaa.item.ty);b=Number(bbb.item.ty);if(a!==b){return a-b}aw=aaa.item.path;bw=bbb.item.path;if(aw!==bw){return(aw>bw?+1:-1)}return 0});return transformResults(result_list,typeInfo)};function unifyFunctionTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return null}const mgens=mgensIn===null?null:new Map(mgensIn);if(queryElems.length===0){return solutionCb(mgens)?fnTypesIn:null}if(!fnTypesIn||fnTypesIn.length===0){return null}const ql=queryElems.length;const fl=fnTypesIn.length;if(ql===1&&queryElems[0].generics.length===0&&queryElems[0].bindings.size===0){const queryElem=queryElems[0];for(const[i,fnType]of fnTypesIn.entries()){if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){continue}if(fnType.id!==null&&fnType.id<0&&queryElem.id!==null&&queryElem.id<0){if(mgens&&mgens.has(queryElem.id)&&mgens.get(queryElem.id)!==fnType.id){continue}const mgensScratch=new Map(mgens);mgensScratch.set(queryElem.id,fnType.id);if(!solutionCb||solutionCb(mgensScratch)){const highlighted=[...fnTypesIn];highlighted[i]=Object.assign({highlighted:true,},fnType,{generics:whereClause[-1-fnType.id],});return highlighted}}else if(solutionCb(mgens?new Map(mgens):null)){const highlighted=[...fnTypesIn];highlighted[i]=Object.assign({highlighted:true,},fnType,{generics:unifyGenericTypes(fnType.generics,queryElem.generics,whereClause,mgens?new Map(mgens):null,solutionCb,unboxingDepth,)||fnType.generics,});return highlighted}}for(const[i,fnType]of fnTypesIn.entries()){if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){continue}if(fnType.id<0){const highlightedGenerics=unifyFunctionTypes(whereClause[(-fnType.id)-1],queryElems,whereClause,mgens,solutionCb,unboxingDepth+1,);if(highlightedGenerics){const highlighted=[...fnTypesIn];highlighted[i]=Object.assign({highlighted:true,},fnType,{generics:highlightedGenerics,});return highlighted}}else{const highlightedGenerics=unifyFunctionTypes([...Array.from(fnType.bindings.values()).flat(),...fnType.generics],queryElems,whereClause,mgens?new Map(mgens):null,solutionCb,unboxingDepth+1,);if(highlightedGenerics){const highlighted=[...fnTypesIn];highlighted[i]=Object.assign({},fnType,{generics:highlightedGenerics,bindings:new Map([...fnType.bindings.entries()].map(([k,v])=>{return[k,highlightedGenerics.splice(0,v.length)]})),});return highlighted}}}return null}const fnTypes=fnTypesIn.slice();const flast=fl-1;const qlast=ql-1;const queryElem=queryElems[qlast];let queryElemsTmp=null;for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){continue}let mgensScratch;if(fnType.id!==null&&queryElem.id!==null&&fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(queryElem.id)&&mgensScratch.get(queryElem.id)!==fnType.id){continue}mgensScratch.set(queryElem.id,fnType.id)}else{mgensScratch=mgens}fnTypes[i]=fnTypes[flast];fnTypes.length=flast;if(!queryElemsTmp){queryElemsTmp=queryElems.slice(0,qlast)}let unifiedGenerics=[];let unifiedGenericsMgens=null;const passesUnification=unifyFunctionTypes(fnTypes,queryElemsTmp,whereClause,mgensScratch,mgensScratch=>{if(fnType.generics.length===0&&queryElem.generics.length===0&&fnType.bindings.size===0&&queryElem.bindings.size===0){return solutionCb(mgensScratch)}const solution=unifyFunctionTypeCheckBindings(fnType,queryElem,whereClause,mgensScratch,unboxingDepth,);if(!solution){return false}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){unifiedGenerics=unifyGenericTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb,unboxingDepth,);if(unifiedGenerics!==null){unifiedGenericsMgens=simplifiedMgens;return true}}return false},unboxingDepth,);if(passesUnification){passesUnification.length=fl;passesUnification[flast]=passesUnification[i];passesUnification[i]=Object.assign({},fnType,{highlighted:true,generics:unifiedGenerics,bindings:new Map([...fnType.bindings.entries()].map(([k,v])=>{return[k,queryElem.bindings.has(k)?unifyFunctionTypes(v,queryElem.bindings.get(k),whereClause,unifiedGenericsMgens,solutionCb,unboxingDepth,):unifiedGenerics.splice(0,v.length)]})),});return passesUnification}fnTypes[flast]=fnTypes[i];fnTypes[i]=fnType;fnTypes.length=fl}for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){continue}const generics=fnType.id!==null&&fnType.id<0?whereClause[(-fnType.id)-1]:fnType.generics;const bindings=fnType.bindings?Array.from(fnType.bindings.values()).flat():[];const passesUnification=unifyFunctionTypes(fnTypes.toSpliced(i,1,...bindings,...generics),queryElems,whereClause,mgens,solutionCb,unboxingDepth+1,);if(passesUnification){const highlightedGenerics=passesUnification.slice(i,i+generics.length+bindings.length,);const highlightedFnType=Object.assign({},fnType,{generics:highlightedGenerics,bindings:new Map([...fnType.bindings.entries()].map(([k,v])=>{return[k,highlightedGenerics.splice(0,v.length)]})),});return passesUnification.toSpliced(i,generics.length+bindings.length,highlightedFnType,)}}return null}function unifyGenericTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return null}const mgens=mgensIn===null?null:new Map(mgensIn);if(queryElems.length===0){return solutionCb(mgens)?fnTypesIn:null}if(!fnTypesIn||fnTypesIn.length===0){return null}const fnType=fnTypesIn[0];const queryElem=queryElems[0];if(unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){if(fnType.id!==null&&fnType.id<0&&queryElem.id!==null&&queryElem.id<0){if(!mgens||!mgens.has(queryElem.id)||mgens.get(queryElem.id)===fnType.id){const mgensScratch=new Map(mgens);mgensScratch.set(queryElem.id,fnType.id);const fnTypesRemaining=unifyGenericTypes(fnTypesIn.slice(1),queryElems.slice(1),whereClause,mgensScratch,solutionCb,unboxingDepth,);if(fnTypesRemaining){const highlighted=[fnType,...fnTypesRemaining];highlighted[0]=Object.assign({highlighted:true,},fnType,{generics:whereClause[-1-fnType.id],});return highlighted}}}else{let unifiedGenerics;const fnTypesRemaining=unifyGenericTypes(fnTypesIn.slice(1),queryElems.slice(1),whereClause,mgens,mgensScratch=>{const solution=unifyFunctionTypeCheckBindings(fnType,queryElem,whereClause,mgensScratch,unboxingDepth,);if(!solution){return false}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){unifiedGenerics=unifyGenericTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb,unboxingDepth,);if(unifiedGenerics!==null){return true}}},unboxingDepth,);if(fnTypesRemaining){const highlighted=[fnType,...fnTypesRemaining];highlighted[0]=Object.assign({highlighted:true,},fnType,{generics:unifiedGenerics||fnType.generics,});return highlighted}}}if(unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){let highlightedRemaining;if(fnType.id!==null&&fnType.id<0){const highlightedGenerics=unifyFunctionTypes(whereClause[(-fnType.id)-1],[queryElem],whereClause,mgens,mgensScratch=>{const hl=unifyGenericTypes(fnTypesIn.slice(1),queryElems.slice(1),whereClause,mgensScratch,solutionCb,unboxingDepth,);if(hl){highlightedRemaining=hl}return hl},unboxingDepth+1,);if(highlightedGenerics){return[Object.assign({highlighted:true,},fnType,{generics:highlightedGenerics,}),...highlightedRemaining]}}else{const highlightedGenerics=unifyGenericTypes([...Array.from(fnType.bindings.values()).flat(),...fnType.generics,],[queryElem],whereClause,mgens,mgensScratch=>{const hl=unifyGenericTypes(fnTypesIn.slice(1),queryElems.slice(1),whereClause,mgensScratch,solutionCb,unboxingDepth,);if(hl){highlightedRemaining=hl}return hl},unboxingDepth+1,);if(highlightedGenerics){return[Object.assign({},fnType,{generics:highlightedGenerics,bindings:new Map([...fnType.bindings.entries()].map(([k,v])=>{return[k,highlightedGenerics.splice(0,v.length)]})),}),...highlightedRemaining]}}}return null}const unifyFunctionTypeIsMatchCandidate=(fnType,queryElem,mgensIn)=>{if(!typePassesFilter(queryElem.typeFilter,fnType.ty)){return false}if(fnType.id!==null&&fnType.id<0&&queryElem.id!==null&&queryElem.id<0){if(mgensIn&&mgensIn.has(queryElem.id)&&mgensIn.get(queryElem.id)!==fnType.id){return false}return true}else{if(queryElem.id===this.typeNameIdOfArrayOrSlice&&(fnType.id===this.typeNameIdOfSlice||fnType.id===this.typeNameIdOfArray)){}else if(queryElem.id===this.typeNameIdOfTupleOrUnit&&(fnType.id===this.typeNameIdOfTuple||fnType.id===this.typeNameIdOfUnit)){}else if(queryElem.id===this.typeNameIdOfHof&&(fnType.id===this.typeNameIdOfFn||fnType.id===this.typeNameIdOfFnMut||fnType.id===this.typeNameIdOfFnOnce)){}else if(fnType.id!==queryElem.id||queryElem.id===null){return false}if((fnType.generics.length+fnType.bindings.size)===0&&queryElem.generics.length!==0){return false}if(fnType.bindings.size0){const fnTypePath=fnType.path!==undefined&&fnType.path!==null?fnType.path.split("::"):[];if(queryElemPathLength>fnTypePath.length){return false}let i=0;for(const path of fnTypePath){if(path===queryElem.pathWithoutLast[i]){i+=1;if(i>=queryElemPathLength){break}}}if(i0){let mgensSolutionSet=[mgensIn];for(const[name,constraints]of queryElem.bindings.entries()){if(mgensSolutionSet.length===0){return false}if(!fnType.bindings.has(name)){return false}const fnTypeBindings=fnType.bindings.get(name);mgensSolutionSet=mgensSolutionSet.flatMap(mgens=>{const newSolutions=[];unifyFunctionTypes(fnTypeBindings,constraints,whereClause,mgens,newMgens=>{newSolutions.push(newMgens);return false},unboxingDepth,);return newSolutions})}if(mgensSolutionSet.length===0){return false}const binds=Array.from(fnType.bindings.entries()).flatMap(entry=>{const[name,constraints]=entry;if(queryElem.bindings.has(name)){return[]}else{return constraints}});if(simplifiedGenerics.length>0){simplifiedGenerics=[...binds,...simplifiedGenerics]}else{simplifiedGenerics=binds}return{simplifiedGenerics,mgens:mgensSolutionSet}}return{simplifiedGenerics,mgens:[mgensIn]}}function unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return false}if(fnType.id!==null&&fnType.id<0){if(!whereClause){return false}return checkIfInList(whereClause[(-fnType.id)-1],queryElem,whereClause,mgens,unboxingDepth,)}else if(fnType.unboxFlag&&(fnType.generics.length>0||fnType.bindings.size>0)){const simplifiedGenerics=[...fnType.generics,...Array.from(fnType.bindings.values()).flat(),];return checkIfInList(simplifiedGenerics,queryElem,whereClause,mgens,unboxingDepth,)}return false}function containsTypeFromQuery(list,where_clause){if(!list)return false;for(const ty of parsedQuery.returned){if(ty.id!==null&&ty.id<0){continue}if(checkIfInList(list,ty,where_clause,null,0)){return true}}for(const ty of parsedQuery.elems){if(ty.id!==null&&ty.id<0){continue}if(checkIfInList(list,ty,where_clause,null,0)){return true}}return false}function checkIfInList(list,elem,whereClause,mgens,unboxingDepth){for(const entry of list){if(checkType(entry,elem,whereClause,mgens,unboxingDepth)){return true}}return false}const checkType=(row,elem,whereClause,mgens,unboxingDepth)=>{if(unboxingDepth>=UNBOXING_LIMIT){return false}if(row.id!==null&&elem.id!==null&&row.id>0&&elem.id>0&&elem.pathWithoutLast.length===0&&row.generics.length===0&&elem.generics.length===0&&row.bindings.size===0&&elem.bindings.size===0&&elem.id!==this.typeNameIdOfArrayOrSlice&&elem.id!==this.typeNameIdOfHof&&elem.id!==this.typeNameIdOfTupleOrUnit){return row.id===elem.id&&typePassesFilter(elem.typeFilter,row.ty)}else{return unifyFunctionTypes([row],[elem],whereClause,mgens,()=>true,unboxingDepth,)}};const checkTypeMgensForConflict=mgens=>{if(!mgens){return true}const fnTypes=new Set();for(const[_qid,fid]of mgens){if(fnTypes.has(fid)){return false}fnTypes.add(fid)}return true};function checkPath(contains,ty){if(contains.length===0){return 0}const maxPathEditDistance=Math.floor(contains.reduce((acc,next)=>acc+next.length,0)/3,);let ret_dist=maxPathEditDistance+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;pathiter:for(let i=length-clength;i>=0;i-=1){let dist_total=0;for(let x=0;xmaxPathEditDistance){continue pathiter}dist_total+=dist}}ret_dist=Math.min(ret_dist,Math.round(dist_total/clength))}return ret_dist>maxPathEditDistance?null:ret_dist}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,descShard:item.descShard,descIndex:item.descIndex,exactPath:item.exactPath,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,bitIndex:item.bitIndex,implDisambiguator:item.implDisambiguator,}}const handleAliases=async(ret,query,filterCrates,currentCrate)=>{const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(this.ALIASES.has(filterCrates)&&this.ALIASES.get(filterCrates).has(lowerQuery)){const query_aliases=this.ALIASES.get(filterCrates).get(lowerQuery);for(const alias of query_aliases){aliases.push(createAliasFromItem(this.searchIndex[alias]))}}}else{for(const[crate,crateAliasesIndex]of this.ALIASES){if(crateAliasesIndex.has(lowerQuery)){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=crateAliasesIndex.get(lowerQuery);for(const alias of query_aliases){pushTo.push(createAliasFromItem(this.searchIndex[alias]))}}}}const sortFunc=(aaa,bbb)=>{if(aaa.path{return this.searchIndexEmptyDesc.get(alias.crate).contains(alias.bitIndex)?"":this.searchState.loadDesc(alias)};const[crateDescs,descs]=await Promise.all([Promise.all(crateAliases.map(fetchDesc)),Promise.all(aliases.map(fetchDesc)),]);const pushFunc=alias=>{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach((alias,i)=>{alias.desc=descs[i]});aliases.forEach(pushFunc);crateAliases.forEach((alias,i)=>{alias.desc=crateDescs[i]});crateAliases.forEach(pushFunc)};function addIntoResults(results,fullId,id,index,dist,path_dist,maxEditDistance){if(dist<=maxEditDistance||index!==-1){if(results.has(fullId)){const result=results.get(fullId);if(result.dontValidate||result.dist<=dist){return}}results.set(fullId,{id:id,index:index,dontValidate:parsedQuery.literalSearch,dist:dist,path_dist:path_dist,})}}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}const rowType=row.type;if(!rowType){return}const tfpDist=compareTypeFingerprints(row.id,parsedQuery.typeFingerprint,);if(tfpDist===null){return}if(results.size>=MAX_RESULTS&&tfpDist>results.max_dist){return}if(!unifyFunctionTypes(rowType.inputs,parsedQuery.elems,rowType.where_clause,null,mgens=>{return unifyFunctionTypes(rowType.output,parsedQuery.returned,rowType.where_clause,mgens,checkTypeMgensForConflict,0,)},0,)){return}results.max_dist=Math.max(results.max_dist||0,tfpDist);addIntoResults(results,row.id.toString(),pos,0,tfpDist,0,Number.MAX_VALUE)}const compareTypeFingerprints=(fullId,queryFingerprint)=>{const fh0=this.functionTypeFingerprint[fullId*4];const fh1=this.functionTypeFingerprint[(fullId*4)+1];const fh2=this.functionTypeFingerprint[(fullId*4)+2];const[qh0,qh1,qh2]=queryFingerprint;const[in0,in1,in2]=[fh0&qh0,fh1&qh1,fh2&qh2];if((in0 ^ qh0)||(in1 ^ qh1)||(in2 ^ qh2)){return null}return this.functionTypeFingerprint[(fullId*4)+3]};const innerRunQuery=()=>{if(parsedQuery.foundElems===1&&!parsedQuery.hasReturnArrow){const elem=parsedQuery.elems[0];const handleNameSearch=id=>{const row=this.searchIndex[id];if(!typePassesFilter(elem.typeFilter,row.ty)||(filterCrates!==null&&row.crate!==filterCrates)){return}let pathDist=0;if(elem.fullPath.length>1){pathDist=checkPath(elem.pathWithoutLast,row);if(pathDist===null){return}}if(parsedQuery.literalSearch){if(row.word===elem.pathLast){addIntoResults(results_others,row.id,id,0,0,pathDist)}}else{addIntoResults(results_others,row.id,id,row.normalizedName.indexOf(elem.normalizedPathLast),editDistance(row.normalizedName,elem.normalizedPathLast,maxEditDistance,),pathDist,maxEditDistance,)}};if(elem.normalizedPathLast!==""){const last=elem.normalizedPathLast;for(const id of this.nameTrie.search(last,this.tailTable)){handleNameSearch(id)}}const length=this.searchIndex.length;for(let i=0,nSearchIndex=length;i0){const sortQ=(a,b)=>{const ag=a.generics.length===0&&a.bindings.size===0;const bg=b.generics.length===0&&b.bindings.size===0;if(ag!==bg){return ag-bg}const ai=a.id>0;const bi=b.id>0;return ai-bi};parsedQuery.elems.sort(sortQ);parsedQuery.returned.sort(sortQ);for(let i=0,nSearchIndex=this.searchIndex.length;i{const descs=await Promise.all(list.map(result=>{return this.searchIndexEmptyDesc.get(result.crate).contains(result.bitIndex)?"":this.searchState.loadDesc(result)}));for(const[i,result]of list.entries()){result.desc=descs[i]}}));if(parsedQuery.error!==null&&ret.others.length!==0){ret.query.error=null}return ret}}let rawSearchIndex;let docSearch;const longItemTypes=["keyword","primitive type","module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","assoc type","constant","assoc const","union","foreign type","existential type","attribute macro","derive macro","trait alias",];let currentResults;function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});const isTypeSearch=(nb>0||iter===1);iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb;const correctionsElem=document.getElementsByClassName("search-corrections");if(isTypeSearch){removeClass(correctionsElem[0],"hidden")}else{addClass(correctionsElem[0],"hidden")}}else if(nb!==0){printTab(0)}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&window.searchIndex.has(elem.value)){return elem.value}return null}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#search-tabs button").item(searchState.currentTab);searchState.focusedByTab[searchState.currentTab]=null;if(target){target.focus()}}async function addTab(array,query,display){const extraClass=display?" active":"";const output=document.createElement(array.length===0&&query.error===null?"div":"ul",);if(array.length>0){output.className="search-results "+extraClass;const lis=Promise.all(array.map(async item=>{const name=item.name;const type=itemTypes[item.ty];const longType=longItemTypes[item.ty];const typeName=longType.length!==0?`${longType}`:"?";const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("span");resultName.className="result-name";resultName.insertAdjacentHTML("beforeend",`${typeName}`);link.appendChild(resultName);let alias=" ";if(item.is_alias){alias=`
\ +${item.alias} - see \ +
`}resultName.insertAdjacentHTML("beforeend",`
${alias}\ +${item.displayPath}${name}\ +
`);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);if(item.displayTypeSignature){const{type,mappedNames,whereClause}=await item.displayTypeSignature;const displayType=document.createElement("div");type.forEach((value,index)=>{if(index%2!==0){const highlight=document.createElement("strong");highlight.appendChild(document.createTextNode(value));displayType.appendChild(highlight)}else{displayType.appendChild(document.createTextNode(value))}});if(mappedNames.size>0||whereClause.size>0){let addWhereLineFn=()=>{const line=document.createElement("div");line.className="where";line.appendChild(document.createTextNode("where"));displayType.appendChild(line);addWhereLineFn=()=>{}};for(const[qname,name]of mappedNames){if(name===qname){continue}addWhereLineFn();const line=document.createElement("div");line.className="where";line.appendChild(document.createTextNode(` ${qname} matches `));const lineStrong=document.createElement("strong");lineStrong.appendChild(document.createTextNode(name));line.appendChild(lineStrong);displayType.appendChild(line)}for(const[name,innerType]of whereClause){if(innerType.length<=1){continue}addWhereLineFn();const line=document.createElement("div");line.className="where";line.appendChild(document.createTextNode(` ${name}: `));innerType.forEach((value,index)=>{if(index%2!==0){const highlight=document.createElement("strong");highlight.appendChild(document.createTextNode(value));line.appendChild(highlight)}else{line.appendChild(document.createTextNode(value))}});displayType.appendChild(line)}}displayType.className="type-signature";link.appendChild(displayType)}link.appendChild(description);return link}));lis.then(lis=>{for(const li of lis){output.appendChild(li)}})}else if(query.error===null){const dlroChannel=`https://doc.rust-lang.org/${getVar("channel")}`;output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return output}function makeTabHeader(tabNb,text,nbElems){const fmtNbElems=nbElems<10?`\u{2007}(${nbElems})\u{2007}\u{2007}`:nbElems<100?`\u{2007}(${nbElems})\u{2007}`:`\u{2007}(${nbElems})`;if(searchState.currentTab===tabNb){return""}return""}async function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};searchState.removeQueryParameters();const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=DocSearch.parseQuery(searchState.input.value)}currentResults=results.query.userQuery;let currentTab=searchState.currentTab;if((currentTab===0&&results.others.length===0)||(currentTab===1&&results.in_args.length===0)||(currentTab===2&&results.returned.length===0)){if(results.others.length!==0){currentTab=0}else if(results.in_args.length){currentTab=1}else if(results.returned.length){currentTab=2}}let crates="";if(rawSearchIndex.size>1){crates="
in 
"+"
"}let output=`
\ +

Results

${crates}
`;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`}else{error[index]=value}});output+=`

Query parser error: "${error.join("")}".

`;output+="
"+makeTabHeader(0,"In Names",results.others.length)+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",results.others.length)+makeTabHeader(1,"In Parameters",results.in_args.length)+makeTabHeader(2,"In Return Types",results.returned.length)+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,results.others.length)+"
";currentTab=0}if(results.query.correction!==null){const orig=results.query.returned.length>0?results.query.returned[0].name:results.query.elems[0].name;output+="

"+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${results.query.correction}" instead.

`}if(results.query.proposeCorrectionFrom!==null){const orig=results.query.proposeCorrectionFrom;const targ=results.query.proposeCorrectionTo;output+="

"+`Type "${orig}" not found and used as generic parameter. `+`Consider searching for "${targ}" instead.

`}const[ret_others,ret_in_args,ret_returned]=await Promise.all([addTab(results.others,results.query,currentTab===0),addTab(results.in_args,results.query,currentTab===1),addTab(results.returned,results.query,currentTab===2),]);const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others);resultsElem.appendChild(ret_in_args);resultsElem.appendChild(ret_returned);search.innerHTML=output;if(searchState.rustdocToolbar){search.querySelector(".main-heading").appendChild(searchState.rustdocToolbar)}const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function updateSearchHistory(url){if(!browserSupportsHistoryApi()){return}const params=searchState.getQueryStringParams();if(!history.state&&!params.search){history.pushState(null,"",url)}else{history.replaceState(null,"",url)}}async function search(forced){const query=DocSearch.parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="\""+query.userQuery+"\" Search - Rust";updateSearchHistory(buildUrl(query.userQuery,filterCrates));await showResults(await docSearch.execQuery(query,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{if(window.searchState.input){window.searchState.input.placeholder=window.searchState.origPlaceholder}});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;e.preventDefault();search()}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const query=searchState.input.value.trim();updateSearchHistory(buildUrl(query,null))}currentResults=null;search(true)}function initSearch(searchIndx){rawSearchIndex=searchIndx;if(typeof window!=="undefined"){docSearch=new DocSearch(rawSearchIndex,ROOT_PATH,searchState);registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}else if(typeof exports!=="undefined"){docSearch=new DocSearch(rawSearchIndex,ROOT_PATH,searchState);exports.docSearch=docSearch;exports.parseQuery=DocSearch.parseQuery}}if(typeof exports!=="undefined"){exports.initSearch=initSearch}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch(new Map())}class ParametricDescription{constructor(w,n,minErrors){this.w=w;this.n=n;this.minErrors=minErrors}isAccept(absState){const state=Math.floor(absState/(this.w+1));const offset=absState%(this.w+1);return this.w-offset+this.minErrors[state]<=this.n}getPosition(absState){return absState%(this.w+1)}getVector(name,charCode,pos,end){let vector=0;for(let i=pos;i>5;const bitStart=bitLoc&31;if(bitStart+bitsPerValue<=32){return((data[dataLoc]>>bitStart)&this.MASKS[bitsPerValue-1])}else{const part=32-bitStart;return ~~(((data[dataLoc]>>bitStart)&this.MASKS[part-1])+((data[1+dataLoc]&this.MASKS[bitsPerValue-part-1])<{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=()=>{changeSetting(toggle.id,toggle.checked)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference"}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",()=>{changeSetting(elem.name,elem.value)})},)}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ +
+
${setting_name}
+
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ + `});output+=`\ +
+
`}else{const checked=setting["default"]===true?" checked":"";output+=`\ +
\ + \ +
`}}return output}function buildSettingsPage(){const theme_list=getVar("themes");const theme_names=(theme_list===null?"":theme_list).split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Hide persistent navigation bar","js_name":"hide-sidebar","default":false,},{"name":"Hide table of contents","js_name":"hide-toc","default":false,},{"name":"Hide module navigation","js_name":"hide-modnav","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},{"name":"Use sans serif fonts","js_name":"sans-serif-fonts","default":false,},{"name":"Word wrap source code","js_name":"word-wrap-source-code","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){const mainElem=document.getElementById(MAIN_ID);if(mainElem!==null){mainElem.appendChild(el)}}else{el.setAttribute("tabindex","-1");const settingsBtn=getSettingsButton();if(settingsBtn!==null){settingsBtn.appendChild(el)}}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display="";onEachLazy(settingsMenu.querySelectorAll("input[type='checkbox']"),el=>{const val=getSettingValue(el.id);const checked=val==="true";if(checked!==el.checked&&val!==null){el.checked=checked}})}function settingsBlurHandler(event){const helpBtn=getHelpButton();const settingsBtn=getSettingsButton();const helpUnfocused=helpBtn===null||(!helpBtn.contains(document.activeElement)&&!elemContainsTarget(helpBtn,event.relatedTarget));const settingsUnfocused=settingsBtn===null||(!settingsBtn.contains(document.activeElement)&&!elemContainsTarget(settingsBtn,event.relatedTarget));if(helpUnfocused&&settingsUnfocused){window.hidePopoverMenus()}}if(!isSettingsPage){const settingsButton=nonnull(getSettingsButton());const settingsMenu=nonnull(document.getElementById("settings"));settingsButton.onclick=event=>{if(elemContainsTarget(settingsMenu,event.target)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals(false);if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;nonnull(settingsButton.querySelector("a")).onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/docs/static.files/src-script-63605ae7.js b/docs/static.files/src-script-63605ae7.js new file mode 100644 index 0000000..98cebca --- /dev/null +++ b/docs/static.files/src-script-63605ae7.js @@ -0,0 +1 @@ +"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth{removeClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","false")};window.rustdocShowSourceSidebar=()=>{addClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","true")};window.rustdocToggleSrcSidebar=()=>{if(document.documentElement.classList.contains("src-sidebar-expanded")){window.rustdocCloseSourceSidebar()}else{window.rustdocShowSourceSidebar()}};function createSrcSidebar(){const container=nonnull(document.querySelector("nav.sidebar"));const sidebar=document.createElement("div");sidebar.id="src-sidebar";let hasFoundFile=false;for(const[key,source]of srcIndex){source[NAME_OFFSET]=key;hasFoundFile=createDirEntry(source,sidebar,"",hasFoundFile)}container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}function highlightSrcLines(){const match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/);if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{removeClass(e,"line-highlighted")});for(let i=from;i<=to;++i){elem=document.getElementById(""+i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSrcHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,"","#"+name);highlightSrcLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(""+cur_line_id)}}}());window.addEventListener("hashchange",highlightSrcLines);onEachLazy(document.querySelectorAll("a[data-nosnippet]"),el=>{el.addEventListener("click",handleSrcHighlight)});highlightSrcLines();window.createSrcSidebar=createSrcSidebar})() \ No newline at end of file diff --git a/docs/static.files/storage-4e99c027.js b/docs/static.files/storage-4e99c027.js new file mode 100644 index 0000000..dac9e9d --- /dev/null +++ b/docs/static.files/storage-4e99c027.js @@ -0,0 +1,23 @@ +"use strict";const builtinThemes=["light","dark","ayu"];const darkThemes=["dark","ayu"];window.currentTheme=(function(){const currentTheme=document.getElementById("themeStyle");return currentTheme instanceof HTMLLinkElement?currentTheme:null})();const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function nonnull(x,msg){if(x===null){throw(msg||"unexpected null value!")}else{return x}}function nonundef(x,msg){if(x===undefined){throw(msg||"unexpected null value!")}else{return x}}function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return!!elem&&!!elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func){for(const elem of arr){if(func(elem)){return true}}return false}function onEachLazy(lazyArray,func){return onEach(Array.prototype.slice.call(lazyArray),func)}function updateLocalStorage(name,value){try{if(value===null){window.localStorage.removeItem("rustdoc-"+name)}else{window.localStorage.setItem("rustdoc-"+name,value)}}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.getAttribute("data-"+name):null}function switchTheme(newThemeName,saveTheme){const themeNames=(getVar("themes")||"").split(",").filter(t=>t);themeNames.push(...builtinThemes);if(newThemeName===null||themeNames.indexOf(newThemeName)===-1){return}if(saveTheme){updateLocalStorage("theme",newThemeName)}document.documentElement.setAttribute("data-theme",newThemeName);if(builtinThemes.indexOf(newThemeName)!==-1){if(window.currentTheme&&window.currentTheme.parentNode){window.currentTheme.parentNode.removeChild(window.currentTheme);window.currentTheme=null}}else{const newHref=getVar("root-path")+encodeURIComponent(newThemeName)+getVar("resource-suffix")+".css";if(!window.currentTheme){if(document.readyState==="loading"){document.write(``);window.currentTheme=(function(){const currentTheme=document.getElementById("themeStyle");return currentTheme instanceof HTMLLinkElement?currentTheme:null})()}else{window.currentTheme=document.createElement("link");window.currentTheme.rel="stylesheet";window.currentTheme.id="themeStyle";window.currentTheme.href=newHref;document.documentElement.appendChild(window.currentTheme)}}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&localStoredTheme!==null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded")}if(getSettingValue("hide-sidebar")==="true"){addClass(document.documentElement,"hide-sidebar")}if(getSettingValue("hide-toc")==="true"){addClass(document.documentElement,"hide-toc")}if(getSettingValue("hide-modnav")==="true"){addClass(document.documentElement,"hide-modnav")}if(getSettingValue("sans-serif-fonts")==="true"){addClass(document.documentElement,"sans-serif")}if(getSettingValue("word-wrap-source-code")==="true"){addClass(document.documentElement,"word-wrap-source-code")}function updateSidebarWidth(){const desktopSidebarWidth=getSettingValue("desktop-sidebar-width");if(desktopSidebarWidth&&desktopSidebarWidth!=="null"){document.documentElement.style.setProperty("--desktop-sidebar-width",desktopSidebarWidth+"px",)}const srcSidebarWidth=getSettingValue("src-sidebar-width");if(srcSidebarWidth&&srcSidebarWidth!=="null"){document.documentElement.style.setProperty("--src-sidebar-width",srcSidebarWidth+"px",)}}updateSidebarWidth();window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0);setTimeout(updateSidebarWidth,0)}});class RustdocSearchElement extends HTMLElement{constructor(){super()}connectedCallback(){const rootPath=getVar("root-path");const currentCrate=getVar("current-crate");this.innerHTML=``}}window.customElements.define("rustdoc-search",RustdocSearchElement);class RustdocToolbarElement extends HTMLElement{constructor(){super()}connectedCallback(){if(this.firstElementChild){return}const rootPath=getVar("root-path");this.innerHTML=` +
+ Settings +
+
+ Help +
+ `}}window.customElements.define("rustdoc-toolbar",RustdocToolbarElement) \ No newline at end of file diff --git a/docs/trait.impl/casper_event_standard/trait.EventInstance.js b/docs/trait.impl/casper_event_standard/trait.EventInstance.js new file mode 100644 index 0000000..af8ae48 --- /dev/null +++ b/docs/trait.impl/casper_event_standard/trait.EventInstance.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl EventInstance for PaymentFulfilled"],["impl EventInstance for SignerPublicKeyChanged"],["impl EventInstance for TreasuryAddressChanged"],["impl EventInstance for GracePeriodChanged"],["impl EventInstance for NameTokenAddressChanged"],["impl EventInstance for ResolutionChanged"],["impl EventInstance for ResolutionCleared"],["impl EventInstance for PrimaryNameChanged"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1932]} \ No newline at end of file diff --git a/docs/trait.impl/casper_name_contracts/contracts/token_id/trait.ToTokenId.js b/docs/trait.impl/casper_name_contracts/contracts/token_id/trait.ToTokenId.js new file mode 100644 index 0000000..96e4ea2 --- /dev/null +++ b/docs/trait.impl/casper_name_contracts/contracts/token_id/trait.ToTokenId.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[28]} \ No newline at end of file diff --git a/docs/trait.impl/casper_name_contracts/data_structures/trait.ExpirableVoucher.js b/docs/trait.impl/casper_name_contracts/data_structures/trait.ExpirableVoucher.js new file mode 100644 index 0000000..96e4ea2 --- /dev/null +++ b/docs/trait.impl/casper_name_contracts/data_structures/trait.ExpirableVoucher.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[28]} \ No newline at end of file diff --git a/docs/trait.impl/casper_name_contracts/data_structures/trait.Payment.js b/docs/trait.impl/casper_name_contracts/data_structures/trait.Payment.js new file mode 100644 index 0000000..96e4ea2 --- /dev/null +++ b/docs/trait.impl/casper_name_contracts/data_structures/trait.Payment.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[28]} \ No newline at end of file diff --git a/docs/trait.impl/casper_types/bytesrepr/trait.FromBytes.js b/docs/trait.impl/casper_types/bytesrepr/trait.FromBytes.js new file mode 100644 index 0000000..059d2d0 --- /dev/null +++ b/docs/trait.impl/casper_types/bytesrepr/trait.FromBytes.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl FromBytes for PaymentFulfilled"],["impl FromBytes for SignerPublicKeyChanged"],["impl FromBytes for TreasuryAddressChanged"],["impl FromBytes for GracePeriodChanged"],["impl FromBytes for NameTokenAddressChanged"],["impl FromBytes for ResolutionChanged"],["impl FromBytes for ResolutionCleared"],["impl FromBytes for PrimaryNameChanged"],["impl FromBytes for NameMintInfo"],["impl FromBytes for NameTransferInfo"],["impl FromBytes for PaymentInfo"],["impl FromBytes for PaymentVoucher"],["impl FromBytes for RenewalPaymentVoucher"],["impl FromBytes for RenewalVoucher"],["impl FromBytes for SecondarySaleVoucher"],["impl FromBytes for TokenRenewalInfo"],["impl FromBytes for TokenizationVoucher"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[6577]} \ No newline at end of file diff --git a/docs/trait.impl/casper_types/bytesrepr/trait.ToBytes.js b/docs/trait.impl/casper_types/bytesrepr/trait.ToBytes.js new file mode 100644 index 0000000..8ccdc30 --- /dev/null +++ b/docs/trait.impl/casper_types/bytesrepr/trait.ToBytes.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl ToBytes for PaymentFulfilled"],["impl ToBytes for SignerPublicKeyChanged"],["impl ToBytes for TreasuryAddressChanged"],["impl ToBytes for GracePeriodChanged"],["impl ToBytes for NameTokenAddressChanged"],["impl ToBytes for ResolutionChanged"],["impl ToBytes for ResolutionCleared"],["impl ToBytes for PrimaryNameChanged"],["impl ToBytes for NameMintInfo"],["impl ToBytes for NameTransferInfo"],["impl ToBytes for PaymentInfo"],["impl ToBytes for PaymentVoucher"],["impl ToBytes for RenewalPaymentVoucher"],["impl ToBytes for RenewalVoucher"],["impl ToBytes for SecondarySaleVoucher"],["impl ToBytes for TokenRenewalInfo"],["impl ToBytes for TokenizationVoucher"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[6475]} \ No newline at end of file diff --git a/docs/trait.impl/casper_types/cl_type/trait.CLTyped.js b/docs/trait.impl/casper_types/cl_type/trait.CLTyped.js new file mode 100644 index 0000000..e668adf --- /dev/null +++ b/docs/trait.impl/casper_types/cl_type/trait.CLTyped.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl CLTyped for PaymentFulfilled"],["impl CLTyped for SignerPublicKeyChanged"],["impl CLTyped for TreasuryAddressChanged"],["impl CLTyped for GracePeriodChanged"],["impl CLTyped for NameTokenAddressChanged"],["impl CLTyped for ResolutionChanged"],["impl CLTyped for ResolutionCleared"],["impl CLTyped for PrimaryNameChanged"],["impl CLTyped for NameMintInfo"],["impl CLTyped for NameTransferInfo"],["impl CLTyped for PaymentInfo"],["impl CLTyped for PaymentVoucher"],["impl CLTyped for RenewalPaymentVoucher"],["impl CLTyped for RenewalVoucher"],["impl CLTyped for SecondarySaleVoucher"],["impl CLTyped for TokenRenewalInfo"],["impl CLTyped for TokenizationVoucher"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[6407]} \ No newline at end of file diff --git a/docs/trait.impl/core/clone/trait.Clone.js b/docs/trait.impl/core/clone/trait.Clone.js new file mode 100644 index 0000000..6dc1854 --- /dev/null +++ b/docs/trait.impl/core/clone/trait.Clone.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl Clone for NameMintInfo"],["impl Clone for NameTokenMetadata"],["impl Clone for NameTransferInfo"],["impl Clone for PaymentInfo"],["impl Clone for PaymentVoucher"],["impl Clone for RenewalPaymentVoucher"],["impl Clone for RenewalVoucher"],["impl Clone for SecondarySaleVoucher"],["impl Clone for TokenRenewalInfo"],["impl Clone for TokenizationVoucher"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[3417]} \ No newline at end of file diff --git a/docs/trait.impl/core/cmp/trait.Eq.js b/docs/trait.impl/core/cmp/trait.Eq.js new file mode 100644 index 0000000..73781e0 --- /dev/null +++ b/docs/trait.impl/core/cmp/trait.Eq.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl Eq for PaymentFulfilled"],["impl Eq for SignerPublicKeyChanged"],["impl Eq for TreasuryAddressChanged"],["impl Eq for GracePeriodChanged"],["impl Eq for NameTokenAddressChanged"],["impl Eq for ResolutionChanged"],["impl Eq for ResolutionCleared"],["impl Eq for PrimaryNameChanged"],["impl Eq for NameMintInfo"],["impl Eq for NameTransferInfo"],["impl Eq for PaymentInfo"],["impl Eq for PaymentVoucher"],["impl Eq for RenewalPaymentVoucher"],["impl Eq for RenewalVoucher"],["impl Eq for SecondarySaleVoucher"],["impl Eq for TokenRenewalInfo"],["impl Eq for TokenizationVoucher"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[5727]} \ No newline at end of file diff --git a/docs/trait.impl/core/cmp/trait.PartialEq.js b/docs/trait.impl/core/cmp/trait.PartialEq.js new file mode 100644 index 0000000..68cf663 --- /dev/null +++ b/docs/trait.impl/core/cmp/trait.PartialEq.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl PartialEq for PaymentFulfilled"],["impl PartialEq for SignerPublicKeyChanged"],["impl PartialEq for TreasuryAddressChanged"],["impl PartialEq for GracePeriodChanged"],["impl PartialEq for NameTokenAddressChanged"],["impl PartialEq for ResolutionChanged"],["impl PartialEq for ResolutionCleared"],["impl PartialEq for PrimaryNameChanged"],["impl PartialEq for NameMintInfo"],["impl PartialEq for NameTokenMetadata"],["impl PartialEq for NameTransferInfo"],["impl PartialEq for PaymentInfo"],["impl PartialEq for PaymentVoucher"],["impl PartialEq for RenewalPaymentVoucher"],["impl PartialEq for RenewalVoucher"],["impl PartialEq for SecondarySaleVoucher"],["impl PartialEq for TokenRenewalInfo"],["impl PartialEq for TokenizationVoucher"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[6434]} \ No newline at end of file diff --git a/docs/trait.impl/core/convert/trait.From.js b/docs/trait.impl/core/convert/trait.From.js new file mode 100644 index 0000000..301552d --- /dev/null +++ b/docs/trait.impl/core/convert/trait.From.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl From<ControllerError> for OdraError"],["impl From<NameTokenError> for OdraError"],["impl From<RegistrarError> for OdraError"],["impl From<ResolverError> for OdraError"],["impl From<NameTokenError> for OdraError"],["impl From<PaymentVoucher> for TokenizationVoucher"],["impl From<RenewalPaymentVoucher> for RenewalVoucher"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2878]} \ No newline at end of file diff --git a/docs/trait.impl/core/convert/trait.Into.js b/docs/trait.impl/core/convert/trait.Into.js new file mode 100644 index 0000000..dd407dd --- /dev/null +++ b/docs/trait.impl/core/convert/trait.Into.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl Into<RuntimeArgs> for ControllerInitArgs"],["impl Into<RuntimeArgs> for SecondaryMarketInitArgs"],["impl Into<RuntimeArgs> for NameTokenInitArgs"],["impl Into<RuntimeArgs> for RegistrarInitArgs"],["impl Into<RuntimeArgs> for DefaultResolverInitArgs"],["impl Into<RuntimeArgs> for ReverseResolverInitArgs"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[3530]} \ No newline at end of file diff --git a/docs/trait.impl/core/convert/trait.TryFrom.js b/docs/trait.impl/core/convert/trait.TryFrom.js new file mode 100644 index 0000000..7bad6b6 --- /dev/null +++ b/docs/trait.impl/core/convert/trait.TryFrom.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl TryFrom<String> for NameTokenMetadata"],["impl TryFrom<Vec<(String, String)>> for NameTokenMetadata"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1320]} \ No newline at end of file diff --git a/docs/trait.impl/core/fmt/trait.Debug.js b/docs/trait.impl/core/fmt/trait.Debug.js new file mode 100644 index 0000000..113fb30 --- /dev/null +++ b/docs/trait.impl/core/fmt/trait.Debug.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl Debug for NameTokenError"],["impl Debug for PaymentFulfilled"],["impl Debug for SignerPublicKeyChanged"],["impl Debug for TreasuryAddressChanged"],["impl Debug for GracePeriodChanged"],["impl Debug for NameTokenAddressChanged"],["impl Debug for ResolutionChanged"],["impl Debug for ResolutionCleared"],["impl Debug for PrimaryNameChanged"],["impl Debug for NameMintInfo"],["impl Debug for NameTokenMetadata"],["impl Debug for NameTransferInfo"],["impl Debug for PaymentInfo"],["impl Debug for PaymentVoucher"],["impl Debug for RenewalPaymentVoucher"],["impl Debug for RenewalVoucher"],["impl Debug for SecondarySaleVoucher"],["impl Debug for TokenRenewalInfo"],["impl Debug for TokenizationVoucher"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[6541]} \ No newline at end of file diff --git a/docs/trait.impl/core/marker/trait.Freeze.js b/docs/trait.impl/core/marker/trait.Freeze.js new file mode 100644 index 0000000..fb55bf3 --- /dev/null +++ b/docs/trait.impl/core/marker/trait.Freeze.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl !Freeze for BaseController",1,["casper_name_contracts::contracts::controller::BaseController"]],["impl !Freeze for Controller",1,["casper_name_contracts::contracts::controller::Controller"]],["impl !Freeze for SecondaryMarket",1,["casper_name_contracts::contracts::marketplace::SecondaryMarket"]],["impl !Freeze for NameToken",1,["casper_name_contracts::contracts::name_token::NameToken"]],["impl !Freeze for Registrar",1,["casper_name_contracts::contracts::registrar::Registrar"]],["impl !Freeze for DefaultResolver",1,["casper_name_contracts::contracts::resolver::DefaultResolver"]],["impl !Freeze for ReverseResolver",1,["casper_name_contracts::contracts::reverse_resolver::ReverseResolver"]],["impl Freeze for ControllerError",1,["casper_name_contracts::contracts::controller::ControllerError"]],["impl Freeze for NameTokenError",1,["casper_name_contracts::contracts::name_token::NameTokenError"]],["impl Freeze for RegistrarError",1,["casper_name_contracts::contracts::registrar::RegistrarError"]],["impl Freeze for ResolverError",1,["casper_name_contracts::contracts::resolver::ResolverError"]],["impl Freeze for NameTokenError",1,["casper_name_contracts::data_structures::NameTokenError"]],["impl Freeze for BaseControllerContractRef",1,["casper_name_contracts::contracts::controller::BaseControllerContractRef"]],["impl Freeze for BaseControllerHostRef",1,["casper_name_contracts::contracts::controller::__base_controller_test_parts::BaseControllerHostRef"]],["impl Freeze for ControllerContractRef",1,["casper_name_contracts::contracts::controller::ControllerContractRef"]],["impl Freeze for ControllerHostRef",1,["casper_name_contracts::contracts::controller::__controller_test_parts::ControllerHostRef"]],["impl Freeze for ControllerInitArgs",1,["casper_name_contracts::contracts::controller::__controller_test_parts::ControllerInitArgs"]],["impl Freeze for PaymentFulfilled",1,["casper_name_contracts::contracts::controller::PaymentFulfilled"]],["impl Freeze for SignerPublicKeyChanged",1,["casper_name_contracts::contracts::controller::SignerPublicKeyChanged"]],["impl Freeze for TreasuryAddressChanged",1,["casper_name_contracts::contracts::controller::TreasuryAddressChanged"]],["impl Freeze for SecondaryMarketContractRef",1,["casper_name_contracts::contracts::marketplace::SecondaryMarketContractRef"]],["impl Freeze for SecondaryMarketHostRef",1,["casper_name_contracts::contracts::marketplace::__secondary_market_test_parts::SecondaryMarketHostRef"]],["impl Freeze for SecondaryMarketInitArgs",1,["casper_name_contracts::contracts::marketplace::__secondary_market_test_parts::SecondaryMarketInitArgs"]],["impl Freeze for NameTokenContractRef",1,["casper_name_contracts::contracts::name_token::NameTokenContractRef"]],["impl Freeze for NameTokenHostRef",1,["casper_name_contracts::contracts::name_token::__name_token_test_parts::NameTokenHostRef"]],["impl Freeze for NameTokenInitArgs",1,["casper_name_contracts::contracts::name_token::__name_token_test_parts::NameTokenInitArgs"]],["impl Freeze for GracePeriodChanged",1,["casper_name_contracts::contracts::registrar::GracePeriodChanged"]],["impl Freeze for RegistrarContractRef",1,["casper_name_contracts::contracts::registrar::RegistrarContractRef"]],["impl Freeze for RegistrarHostRef",1,["casper_name_contracts::contracts::registrar::__registrar_test_parts::RegistrarHostRef"]],["impl Freeze for RegistrarInitArgs",1,["casper_name_contracts::contracts::registrar::__registrar_test_parts::RegistrarInitArgs"]],["impl Freeze for DefaultResolverContractRef",1,["casper_name_contracts::contracts::resolver::DefaultResolverContractRef"]],["impl Freeze for DefaultResolverHostRef",1,["casper_name_contracts::contracts::resolver::__default_resolver_test_parts::DefaultResolverHostRef"]],["impl Freeze for DefaultResolverInitArgs",1,["casper_name_contracts::contracts::resolver::__default_resolver_test_parts::DefaultResolverInitArgs"]],["impl Freeze for NameTokenAddressChanged",1,["casper_name_contracts::contracts::resolver::NameTokenAddressChanged"]],["impl Freeze for ResolutionChanged",1,["casper_name_contracts::contracts::resolver::ResolutionChanged"]],["impl Freeze for ResolutionCleared",1,["casper_name_contracts::contracts::resolver::ResolutionCleared"]],["impl Freeze for ResolverContractRef",1,["casper_name_contracts::contracts::resolver::ResolverContractRef"]],["impl Freeze for ResolverHostRef",1,["casper_name_contracts::contracts::resolver::__resolver_test_parts::ResolverHostRef"]],["impl Freeze for PrimaryNameChanged",1,["casper_name_contracts::contracts::reverse_resolver::PrimaryNameChanged"]],["impl Freeze for ReverseResolverContractRef",1,["casper_name_contracts::contracts::reverse_resolver::ReverseResolverContractRef"]],["impl Freeze for ReverseResolverHostRef",1,["casper_name_contracts::contracts::reverse_resolver::__reverse_resolver_test_parts::ReverseResolverHostRef"]],["impl Freeze for ReverseResolverInitArgs",1,["casper_name_contracts::contracts::reverse_resolver::__reverse_resolver_test_parts::ReverseResolverInitArgs"]],["impl Freeze for NameMintInfo",1,["casper_name_contracts::data_structures::NameMintInfo"]],["impl Freeze for NameTokenMetadata",1,["casper_name_contracts::data_structures::NameTokenMetadata"]],["impl Freeze for NameTransferInfo",1,["casper_name_contracts::data_structures::NameTransferInfo"]],["impl Freeze for PaymentInfo",1,["casper_name_contracts::data_structures::PaymentInfo"]],["impl Freeze for PaymentVoucher",1,["casper_name_contracts::data_structures::PaymentVoucher"]],["impl Freeze for RenewalPaymentVoucher",1,["casper_name_contracts::data_structures::RenewalPaymentVoucher"]],["impl Freeze for RenewalVoucher",1,["casper_name_contracts::data_structures::RenewalVoucher"]],["impl Freeze for SecondarySaleVoucher",1,["casper_name_contracts::data_structures::SecondarySaleVoucher"]],["impl Freeze for TokenRenewalInfo",1,["casper_name_contracts::data_structures::TokenRenewalInfo"]],["impl Freeze for TokenizationVoucher",1,["casper_name_contracts::data_structures::TokenizationVoucher"]]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[22648]} \ No newline at end of file diff --git a/docs/trait.impl/core/marker/trait.Send.js b/docs/trait.impl/core/marker/trait.Send.js new file mode 100644 index 0000000..1a58a76 --- /dev/null +++ b/docs/trait.impl/core/marker/trait.Send.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl !Send for BaseController",1,["casper_name_contracts::contracts::controller::BaseController"]],["impl !Send for BaseControllerContractRef",1,["casper_name_contracts::contracts::controller::BaseControllerContractRef"]],["impl !Send for BaseControllerHostRef",1,["casper_name_contracts::contracts::controller::__base_controller_test_parts::BaseControllerHostRef"]],["impl !Send for Controller",1,["casper_name_contracts::contracts::controller::Controller"]],["impl !Send for ControllerContractRef",1,["casper_name_contracts::contracts::controller::ControllerContractRef"]],["impl !Send for ControllerHostRef",1,["casper_name_contracts::contracts::controller::__controller_test_parts::ControllerHostRef"]],["impl !Send for SecondaryMarket",1,["casper_name_contracts::contracts::marketplace::SecondaryMarket"]],["impl !Send for SecondaryMarketContractRef",1,["casper_name_contracts::contracts::marketplace::SecondaryMarketContractRef"]],["impl !Send for SecondaryMarketHostRef",1,["casper_name_contracts::contracts::marketplace::__secondary_market_test_parts::SecondaryMarketHostRef"]],["impl !Send for NameToken",1,["casper_name_contracts::contracts::name_token::NameToken"]],["impl !Send for NameTokenContractRef",1,["casper_name_contracts::contracts::name_token::NameTokenContractRef"]],["impl !Send for NameTokenHostRef",1,["casper_name_contracts::contracts::name_token::__name_token_test_parts::NameTokenHostRef"]],["impl !Send for Registrar",1,["casper_name_contracts::contracts::registrar::Registrar"]],["impl !Send for RegistrarContractRef",1,["casper_name_contracts::contracts::registrar::RegistrarContractRef"]],["impl !Send for RegistrarHostRef",1,["casper_name_contracts::contracts::registrar::__registrar_test_parts::RegistrarHostRef"]],["impl !Send for DefaultResolver",1,["casper_name_contracts::contracts::resolver::DefaultResolver"]],["impl !Send for DefaultResolverContractRef",1,["casper_name_contracts::contracts::resolver::DefaultResolverContractRef"]],["impl !Send for DefaultResolverHostRef",1,["casper_name_contracts::contracts::resolver::__default_resolver_test_parts::DefaultResolverHostRef"]],["impl !Send for ResolverContractRef",1,["casper_name_contracts::contracts::resolver::ResolverContractRef"]],["impl !Send for ResolverHostRef",1,["casper_name_contracts::contracts::resolver::__resolver_test_parts::ResolverHostRef"]],["impl !Send for ReverseResolver",1,["casper_name_contracts::contracts::reverse_resolver::ReverseResolver"]],["impl !Send for ReverseResolverContractRef",1,["casper_name_contracts::contracts::reverse_resolver::ReverseResolverContractRef"]],["impl !Send for ReverseResolverHostRef",1,["casper_name_contracts::contracts::reverse_resolver::__reverse_resolver_test_parts::ReverseResolverHostRef"]],["impl Send for ControllerError",1,["casper_name_contracts::contracts::controller::ControllerError"]],["impl Send for NameTokenError",1,["casper_name_contracts::contracts::name_token::NameTokenError"]],["impl Send for RegistrarError",1,["casper_name_contracts::contracts::registrar::RegistrarError"]],["impl Send for ResolverError",1,["casper_name_contracts::contracts::resolver::ResolverError"]],["impl Send for NameTokenError",1,["casper_name_contracts::data_structures::NameTokenError"]],["impl Send for ControllerInitArgs",1,["casper_name_contracts::contracts::controller::__controller_test_parts::ControllerInitArgs"]],["impl Send for PaymentFulfilled",1,["casper_name_contracts::contracts::controller::PaymentFulfilled"]],["impl Send for SignerPublicKeyChanged",1,["casper_name_contracts::contracts::controller::SignerPublicKeyChanged"]],["impl Send for TreasuryAddressChanged",1,["casper_name_contracts::contracts::controller::TreasuryAddressChanged"]],["impl Send for SecondaryMarketInitArgs",1,["casper_name_contracts::contracts::marketplace::__secondary_market_test_parts::SecondaryMarketInitArgs"]],["impl Send for NameTokenInitArgs",1,["casper_name_contracts::contracts::name_token::__name_token_test_parts::NameTokenInitArgs"]],["impl Send for GracePeriodChanged",1,["casper_name_contracts::contracts::registrar::GracePeriodChanged"]],["impl Send for RegistrarInitArgs",1,["casper_name_contracts::contracts::registrar::__registrar_test_parts::RegistrarInitArgs"]],["impl Send for DefaultResolverInitArgs",1,["casper_name_contracts::contracts::resolver::__default_resolver_test_parts::DefaultResolverInitArgs"]],["impl Send for NameTokenAddressChanged",1,["casper_name_contracts::contracts::resolver::NameTokenAddressChanged"]],["impl Send for ResolutionChanged",1,["casper_name_contracts::contracts::resolver::ResolutionChanged"]],["impl Send for ResolutionCleared",1,["casper_name_contracts::contracts::resolver::ResolutionCleared"]],["impl Send for PrimaryNameChanged",1,["casper_name_contracts::contracts::reverse_resolver::PrimaryNameChanged"]],["impl Send for ReverseResolverInitArgs",1,["casper_name_contracts::contracts::reverse_resolver::__reverse_resolver_test_parts::ReverseResolverInitArgs"]],["impl Send for NameMintInfo",1,["casper_name_contracts::data_structures::NameMintInfo"]],["impl Send for NameTokenMetadata",1,["casper_name_contracts::data_structures::NameTokenMetadata"]],["impl Send for NameTransferInfo",1,["casper_name_contracts::data_structures::NameTransferInfo"]],["impl Send for PaymentInfo",1,["casper_name_contracts::data_structures::PaymentInfo"]],["impl Send for PaymentVoucher",1,["casper_name_contracts::data_structures::PaymentVoucher"]],["impl Send for RenewalPaymentVoucher",1,["casper_name_contracts::data_structures::RenewalPaymentVoucher"]],["impl Send for RenewalVoucher",1,["casper_name_contracts::data_structures::RenewalVoucher"]],["impl Send for SecondarySaleVoucher",1,["casper_name_contracts::data_structures::SecondarySaleVoucher"]],["impl Send for TokenRenewalInfo",1,["casper_name_contracts::data_structures::TokenRenewalInfo"]],["impl Send for TokenizationVoucher",1,["casper_name_contracts::data_structures::TokenizationVoucher"]]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[22352]} \ No newline at end of file diff --git a/docs/trait.impl/core/marker/trait.StructuralPartialEq.js b/docs/trait.impl/core/marker/trait.StructuralPartialEq.js new file mode 100644 index 0000000..253e424 --- /dev/null +++ b/docs/trait.impl/core/marker/trait.StructuralPartialEq.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl StructuralPartialEq for PaymentFulfilled"],["impl StructuralPartialEq for SignerPublicKeyChanged"],["impl StructuralPartialEq for TreasuryAddressChanged"],["impl StructuralPartialEq for GracePeriodChanged"],["impl StructuralPartialEq for NameTokenAddressChanged"],["impl StructuralPartialEq for ResolutionChanged"],["impl StructuralPartialEq for ResolutionCleared"],["impl StructuralPartialEq for PrimaryNameChanged"],["impl StructuralPartialEq for NameMintInfo"],["impl StructuralPartialEq for NameTokenMetadata"],["impl StructuralPartialEq for NameTransferInfo"],["impl StructuralPartialEq for PaymentInfo"],["impl StructuralPartialEq for PaymentVoucher"],["impl StructuralPartialEq for RenewalPaymentVoucher"],["impl StructuralPartialEq for RenewalVoucher"],["impl StructuralPartialEq for SecondarySaleVoucher"],["impl StructuralPartialEq for TokenRenewalInfo"],["impl StructuralPartialEq for TokenizationVoucher"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[7082]} \ No newline at end of file diff --git a/docs/trait.impl/core/marker/trait.Sync.js b/docs/trait.impl/core/marker/trait.Sync.js new file mode 100644 index 0000000..d8a525c --- /dev/null +++ b/docs/trait.impl/core/marker/trait.Sync.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl !Sync for BaseController",1,["casper_name_contracts::contracts::controller::BaseController"]],["impl !Sync for BaseControllerContractRef",1,["casper_name_contracts::contracts::controller::BaseControllerContractRef"]],["impl !Sync for BaseControllerHostRef",1,["casper_name_contracts::contracts::controller::__base_controller_test_parts::BaseControllerHostRef"]],["impl !Sync for Controller",1,["casper_name_contracts::contracts::controller::Controller"]],["impl !Sync for ControllerContractRef",1,["casper_name_contracts::contracts::controller::ControllerContractRef"]],["impl !Sync for ControllerHostRef",1,["casper_name_contracts::contracts::controller::__controller_test_parts::ControllerHostRef"]],["impl !Sync for SecondaryMarket",1,["casper_name_contracts::contracts::marketplace::SecondaryMarket"]],["impl !Sync for SecondaryMarketContractRef",1,["casper_name_contracts::contracts::marketplace::SecondaryMarketContractRef"]],["impl !Sync for SecondaryMarketHostRef",1,["casper_name_contracts::contracts::marketplace::__secondary_market_test_parts::SecondaryMarketHostRef"]],["impl !Sync for NameToken",1,["casper_name_contracts::contracts::name_token::NameToken"]],["impl !Sync for NameTokenContractRef",1,["casper_name_contracts::contracts::name_token::NameTokenContractRef"]],["impl !Sync for NameTokenHostRef",1,["casper_name_contracts::contracts::name_token::__name_token_test_parts::NameTokenHostRef"]],["impl !Sync for Registrar",1,["casper_name_contracts::contracts::registrar::Registrar"]],["impl !Sync for RegistrarContractRef",1,["casper_name_contracts::contracts::registrar::RegistrarContractRef"]],["impl !Sync for RegistrarHostRef",1,["casper_name_contracts::contracts::registrar::__registrar_test_parts::RegistrarHostRef"]],["impl !Sync for DefaultResolver",1,["casper_name_contracts::contracts::resolver::DefaultResolver"]],["impl !Sync for DefaultResolverContractRef",1,["casper_name_contracts::contracts::resolver::DefaultResolverContractRef"]],["impl !Sync for DefaultResolverHostRef",1,["casper_name_contracts::contracts::resolver::__default_resolver_test_parts::DefaultResolverHostRef"]],["impl !Sync for ResolverContractRef",1,["casper_name_contracts::contracts::resolver::ResolverContractRef"]],["impl !Sync for ResolverHostRef",1,["casper_name_contracts::contracts::resolver::__resolver_test_parts::ResolverHostRef"]],["impl !Sync for ReverseResolver",1,["casper_name_contracts::contracts::reverse_resolver::ReverseResolver"]],["impl !Sync for ReverseResolverContractRef",1,["casper_name_contracts::contracts::reverse_resolver::ReverseResolverContractRef"]],["impl !Sync for ReverseResolverHostRef",1,["casper_name_contracts::contracts::reverse_resolver::__reverse_resolver_test_parts::ReverseResolverHostRef"]],["impl Sync for ControllerError",1,["casper_name_contracts::contracts::controller::ControllerError"]],["impl Sync for NameTokenError",1,["casper_name_contracts::contracts::name_token::NameTokenError"]],["impl Sync for RegistrarError",1,["casper_name_contracts::contracts::registrar::RegistrarError"]],["impl Sync for ResolverError",1,["casper_name_contracts::contracts::resolver::ResolverError"]],["impl Sync for NameTokenError",1,["casper_name_contracts::data_structures::NameTokenError"]],["impl Sync for ControllerInitArgs",1,["casper_name_contracts::contracts::controller::__controller_test_parts::ControllerInitArgs"]],["impl Sync for PaymentFulfilled",1,["casper_name_contracts::contracts::controller::PaymentFulfilled"]],["impl Sync for SignerPublicKeyChanged",1,["casper_name_contracts::contracts::controller::SignerPublicKeyChanged"]],["impl Sync for TreasuryAddressChanged",1,["casper_name_contracts::contracts::controller::TreasuryAddressChanged"]],["impl Sync for SecondaryMarketInitArgs",1,["casper_name_contracts::contracts::marketplace::__secondary_market_test_parts::SecondaryMarketInitArgs"]],["impl Sync for NameTokenInitArgs",1,["casper_name_contracts::contracts::name_token::__name_token_test_parts::NameTokenInitArgs"]],["impl Sync for GracePeriodChanged",1,["casper_name_contracts::contracts::registrar::GracePeriodChanged"]],["impl Sync for RegistrarInitArgs",1,["casper_name_contracts::contracts::registrar::__registrar_test_parts::RegistrarInitArgs"]],["impl Sync for DefaultResolverInitArgs",1,["casper_name_contracts::contracts::resolver::__default_resolver_test_parts::DefaultResolverInitArgs"]],["impl Sync for NameTokenAddressChanged",1,["casper_name_contracts::contracts::resolver::NameTokenAddressChanged"]],["impl Sync for ResolutionChanged",1,["casper_name_contracts::contracts::resolver::ResolutionChanged"]],["impl Sync for ResolutionCleared",1,["casper_name_contracts::contracts::resolver::ResolutionCleared"]],["impl Sync for PrimaryNameChanged",1,["casper_name_contracts::contracts::reverse_resolver::PrimaryNameChanged"]],["impl Sync for ReverseResolverInitArgs",1,["casper_name_contracts::contracts::reverse_resolver::__reverse_resolver_test_parts::ReverseResolverInitArgs"]],["impl Sync for NameMintInfo",1,["casper_name_contracts::data_structures::NameMintInfo"]],["impl Sync for NameTokenMetadata",1,["casper_name_contracts::data_structures::NameTokenMetadata"]],["impl Sync for NameTransferInfo",1,["casper_name_contracts::data_structures::NameTransferInfo"]],["impl Sync for PaymentInfo",1,["casper_name_contracts::data_structures::PaymentInfo"]],["impl Sync for PaymentVoucher",1,["casper_name_contracts::data_structures::PaymentVoucher"]],["impl Sync for RenewalPaymentVoucher",1,["casper_name_contracts::data_structures::RenewalPaymentVoucher"]],["impl Sync for RenewalVoucher",1,["casper_name_contracts::data_structures::RenewalVoucher"]],["impl Sync for SecondarySaleVoucher",1,["casper_name_contracts::data_structures::SecondarySaleVoucher"]],["impl Sync for TokenRenewalInfo",1,["casper_name_contracts::data_structures::TokenRenewalInfo"]],["impl Sync for TokenizationVoucher",1,["casper_name_contracts::data_structures::TokenizationVoucher"]]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[22352]} \ No newline at end of file diff --git a/docs/trait.impl/core/marker/trait.Unpin.js b/docs/trait.impl/core/marker/trait.Unpin.js new file mode 100644 index 0000000..ff6db13 --- /dev/null +++ b/docs/trait.impl/core/marker/trait.Unpin.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl Unpin for ControllerError",1,["casper_name_contracts::contracts::controller::ControllerError"]],["impl Unpin for NameTokenError",1,["casper_name_contracts::contracts::name_token::NameTokenError"]],["impl Unpin for RegistrarError",1,["casper_name_contracts::contracts::registrar::RegistrarError"]],["impl Unpin for ResolverError",1,["casper_name_contracts::contracts::resolver::ResolverError"]],["impl Unpin for NameTokenError",1,["casper_name_contracts::data_structures::NameTokenError"]],["impl Unpin for BaseController",1,["casper_name_contracts::contracts::controller::BaseController"]],["impl Unpin for BaseControllerContractRef",1,["casper_name_contracts::contracts::controller::BaseControllerContractRef"]],["impl Unpin for BaseControllerHostRef",1,["casper_name_contracts::contracts::controller::__base_controller_test_parts::BaseControllerHostRef"]],["impl Unpin for Controller",1,["casper_name_contracts::contracts::controller::Controller"]],["impl Unpin for ControllerContractRef",1,["casper_name_contracts::contracts::controller::ControllerContractRef"]],["impl Unpin for ControllerHostRef",1,["casper_name_contracts::contracts::controller::__controller_test_parts::ControllerHostRef"]],["impl Unpin for ControllerInitArgs",1,["casper_name_contracts::contracts::controller::__controller_test_parts::ControllerInitArgs"]],["impl Unpin for PaymentFulfilled",1,["casper_name_contracts::contracts::controller::PaymentFulfilled"]],["impl Unpin for SignerPublicKeyChanged",1,["casper_name_contracts::contracts::controller::SignerPublicKeyChanged"]],["impl Unpin for TreasuryAddressChanged",1,["casper_name_contracts::contracts::controller::TreasuryAddressChanged"]],["impl Unpin for SecondaryMarket",1,["casper_name_contracts::contracts::marketplace::SecondaryMarket"]],["impl Unpin for SecondaryMarketContractRef",1,["casper_name_contracts::contracts::marketplace::SecondaryMarketContractRef"]],["impl Unpin for SecondaryMarketHostRef",1,["casper_name_contracts::contracts::marketplace::__secondary_market_test_parts::SecondaryMarketHostRef"]],["impl Unpin for SecondaryMarketInitArgs",1,["casper_name_contracts::contracts::marketplace::__secondary_market_test_parts::SecondaryMarketInitArgs"]],["impl Unpin for NameToken",1,["casper_name_contracts::contracts::name_token::NameToken"]],["impl Unpin for NameTokenContractRef",1,["casper_name_contracts::contracts::name_token::NameTokenContractRef"]],["impl Unpin for NameTokenHostRef",1,["casper_name_contracts::contracts::name_token::__name_token_test_parts::NameTokenHostRef"]],["impl Unpin for NameTokenInitArgs",1,["casper_name_contracts::contracts::name_token::__name_token_test_parts::NameTokenInitArgs"]],["impl Unpin for GracePeriodChanged",1,["casper_name_contracts::contracts::registrar::GracePeriodChanged"]],["impl Unpin for Registrar",1,["casper_name_contracts::contracts::registrar::Registrar"]],["impl Unpin for RegistrarContractRef",1,["casper_name_contracts::contracts::registrar::RegistrarContractRef"]],["impl Unpin for RegistrarHostRef",1,["casper_name_contracts::contracts::registrar::__registrar_test_parts::RegistrarHostRef"]],["impl Unpin for RegistrarInitArgs",1,["casper_name_contracts::contracts::registrar::__registrar_test_parts::RegistrarInitArgs"]],["impl Unpin for DefaultResolver",1,["casper_name_contracts::contracts::resolver::DefaultResolver"]],["impl Unpin for DefaultResolverContractRef",1,["casper_name_contracts::contracts::resolver::DefaultResolverContractRef"]],["impl Unpin for DefaultResolverHostRef",1,["casper_name_contracts::contracts::resolver::__default_resolver_test_parts::DefaultResolverHostRef"]],["impl Unpin for DefaultResolverInitArgs",1,["casper_name_contracts::contracts::resolver::__default_resolver_test_parts::DefaultResolverInitArgs"]],["impl Unpin for NameTokenAddressChanged",1,["casper_name_contracts::contracts::resolver::NameTokenAddressChanged"]],["impl Unpin for ResolutionChanged",1,["casper_name_contracts::contracts::resolver::ResolutionChanged"]],["impl Unpin for ResolutionCleared",1,["casper_name_contracts::contracts::resolver::ResolutionCleared"]],["impl Unpin for ResolverContractRef",1,["casper_name_contracts::contracts::resolver::ResolverContractRef"]],["impl Unpin for ResolverHostRef",1,["casper_name_contracts::contracts::resolver::__resolver_test_parts::ResolverHostRef"]],["impl Unpin for PrimaryNameChanged",1,["casper_name_contracts::contracts::reverse_resolver::PrimaryNameChanged"]],["impl Unpin for ReverseResolver",1,["casper_name_contracts::contracts::reverse_resolver::ReverseResolver"]],["impl Unpin for ReverseResolverContractRef",1,["casper_name_contracts::contracts::reverse_resolver::ReverseResolverContractRef"]],["impl Unpin for ReverseResolverHostRef",1,["casper_name_contracts::contracts::reverse_resolver::__reverse_resolver_test_parts::ReverseResolverHostRef"]],["impl Unpin for ReverseResolverInitArgs",1,["casper_name_contracts::contracts::reverse_resolver::__reverse_resolver_test_parts::ReverseResolverInitArgs"]],["impl Unpin for NameMintInfo",1,["casper_name_contracts::data_structures::NameMintInfo"]],["impl Unpin for NameTokenMetadata",1,["casper_name_contracts::data_structures::NameTokenMetadata"]],["impl Unpin for NameTransferInfo",1,["casper_name_contracts::data_structures::NameTransferInfo"]],["impl Unpin for PaymentInfo",1,["casper_name_contracts::data_structures::PaymentInfo"]],["impl Unpin for PaymentVoucher",1,["casper_name_contracts::data_structures::PaymentVoucher"]],["impl Unpin for RenewalPaymentVoucher",1,["casper_name_contracts::data_structures::RenewalPaymentVoucher"]],["impl Unpin for RenewalVoucher",1,["casper_name_contracts::data_structures::RenewalVoucher"]],["impl Unpin for SecondarySaleVoucher",1,["casper_name_contracts::data_structures::SecondarySaleVoucher"]],["impl Unpin for TokenRenewalInfo",1,["casper_name_contracts::data_structures::TokenRenewalInfo"]],["impl Unpin for TokenizationVoucher",1,["casper_name_contracts::data_structures::TokenizationVoucher"]]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[22485]} \ No newline at end of file diff --git a/docs/trait.impl/core/marker/trait.UnsafeUnpin.js b/docs/trait.impl/core/marker/trait.UnsafeUnpin.js new file mode 100644 index 0000000..305431d --- /dev/null +++ b/docs/trait.impl/core/marker/trait.UnsafeUnpin.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl UnsafeUnpin for ControllerError",1,["casper_name_contracts::contracts::controller::ControllerError"]],["impl UnsafeUnpin for NameTokenError",1,["casper_name_contracts::contracts::name_token::NameTokenError"]],["impl UnsafeUnpin for RegistrarError",1,["casper_name_contracts::contracts::registrar::RegistrarError"]],["impl UnsafeUnpin for ResolverError",1,["casper_name_contracts::contracts::resolver::ResolverError"]],["impl UnsafeUnpin for NameTokenError",1,["casper_name_contracts::data_structures::NameTokenError"]],["impl UnsafeUnpin for BaseController",1,["casper_name_contracts::contracts::controller::BaseController"]],["impl UnsafeUnpin for BaseControllerContractRef",1,["casper_name_contracts::contracts::controller::BaseControllerContractRef"]],["impl UnsafeUnpin for BaseControllerHostRef",1,["casper_name_contracts::contracts::controller::__base_controller_test_parts::BaseControllerHostRef"]],["impl UnsafeUnpin for Controller",1,["casper_name_contracts::contracts::controller::Controller"]],["impl UnsafeUnpin for ControllerContractRef",1,["casper_name_contracts::contracts::controller::ControllerContractRef"]],["impl UnsafeUnpin for ControllerHostRef",1,["casper_name_contracts::contracts::controller::__controller_test_parts::ControllerHostRef"]],["impl UnsafeUnpin for ControllerInitArgs",1,["casper_name_contracts::contracts::controller::__controller_test_parts::ControllerInitArgs"]],["impl UnsafeUnpin for PaymentFulfilled",1,["casper_name_contracts::contracts::controller::PaymentFulfilled"]],["impl UnsafeUnpin for SignerPublicKeyChanged",1,["casper_name_contracts::contracts::controller::SignerPublicKeyChanged"]],["impl UnsafeUnpin for TreasuryAddressChanged",1,["casper_name_contracts::contracts::controller::TreasuryAddressChanged"]],["impl UnsafeUnpin for SecondaryMarket",1,["casper_name_contracts::contracts::marketplace::SecondaryMarket"]],["impl UnsafeUnpin for SecondaryMarketContractRef",1,["casper_name_contracts::contracts::marketplace::SecondaryMarketContractRef"]],["impl UnsafeUnpin for SecondaryMarketHostRef",1,["casper_name_contracts::contracts::marketplace::__secondary_market_test_parts::SecondaryMarketHostRef"]],["impl UnsafeUnpin for SecondaryMarketInitArgs",1,["casper_name_contracts::contracts::marketplace::__secondary_market_test_parts::SecondaryMarketInitArgs"]],["impl UnsafeUnpin for NameToken",1,["casper_name_contracts::contracts::name_token::NameToken"]],["impl UnsafeUnpin for NameTokenContractRef",1,["casper_name_contracts::contracts::name_token::NameTokenContractRef"]],["impl UnsafeUnpin for NameTokenHostRef",1,["casper_name_contracts::contracts::name_token::__name_token_test_parts::NameTokenHostRef"]],["impl UnsafeUnpin for NameTokenInitArgs",1,["casper_name_contracts::contracts::name_token::__name_token_test_parts::NameTokenInitArgs"]],["impl UnsafeUnpin for GracePeriodChanged",1,["casper_name_contracts::contracts::registrar::GracePeriodChanged"]],["impl UnsafeUnpin for Registrar",1,["casper_name_contracts::contracts::registrar::Registrar"]],["impl UnsafeUnpin for RegistrarContractRef",1,["casper_name_contracts::contracts::registrar::RegistrarContractRef"]],["impl UnsafeUnpin for RegistrarHostRef",1,["casper_name_contracts::contracts::registrar::__registrar_test_parts::RegistrarHostRef"]],["impl UnsafeUnpin for RegistrarInitArgs",1,["casper_name_contracts::contracts::registrar::__registrar_test_parts::RegistrarInitArgs"]],["impl UnsafeUnpin for DefaultResolver",1,["casper_name_contracts::contracts::resolver::DefaultResolver"]],["impl UnsafeUnpin for DefaultResolverContractRef",1,["casper_name_contracts::contracts::resolver::DefaultResolverContractRef"]],["impl UnsafeUnpin for DefaultResolverHostRef",1,["casper_name_contracts::contracts::resolver::__default_resolver_test_parts::DefaultResolverHostRef"]],["impl UnsafeUnpin for DefaultResolverInitArgs",1,["casper_name_contracts::contracts::resolver::__default_resolver_test_parts::DefaultResolverInitArgs"]],["impl UnsafeUnpin for NameTokenAddressChanged",1,["casper_name_contracts::contracts::resolver::NameTokenAddressChanged"]],["impl UnsafeUnpin for ResolutionChanged",1,["casper_name_contracts::contracts::resolver::ResolutionChanged"]],["impl UnsafeUnpin for ResolutionCleared",1,["casper_name_contracts::contracts::resolver::ResolutionCleared"]],["impl UnsafeUnpin for ResolverContractRef",1,["casper_name_contracts::contracts::resolver::ResolverContractRef"]],["impl UnsafeUnpin for ResolverHostRef",1,["casper_name_contracts::contracts::resolver::__resolver_test_parts::ResolverHostRef"]],["impl UnsafeUnpin for PrimaryNameChanged",1,["casper_name_contracts::contracts::reverse_resolver::PrimaryNameChanged"]],["impl UnsafeUnpin for ReverseResolver",1,["casper_name_contracts::contracts::reverse_resolver::ReverseResolver"]],["impl UnsafeUnpin for ReverseResolverContractRef",1,["casper_name_contracts::contracts::reverse_resolver::ReverseResolverContractRef"]],["impl UnsafeUnpin for ReverseResolverHostRef",1,["casper_name_contracts::contracts::reverse_resolver::__reverse_resolver_test_parts::ReverseResolverHostRef"]],["impl UnsafeUnpin for ReverseResolverInitArgs",1,["casper_name_contracts::contracts::reverse_resolver::__reverse_resolver_test_parts::ReverseResolverInitArgs"]],["impl UnsafeUnpin for NameMintInfo",1,["casper_name_contracts::data_structures::NameMintInfo"]],["impl UnsafeUnpin for NameTokenMetadata",1,["casper_name_contracts::data_structures::NameTokenMetadata"]],["impl UnsafeUnpin for NameTransferInfo",1,["casper_name_contracts::data_structures::NameTransferInfo"]],["impl UnsafeUnpin for PaymentInfo",1,["casper_name_contracts::data_structures::PaymentInfo"]],["impl UnsafeUnpin for PaymentVoucher",1,["casper_name_contracts::data_structures::PaymentVoucher"]],["impl UnsafeUnpin for RenewalPaymentVoucher",1,["casper_name_contracts::data_structures::RenewalPaymentVoucher"]],["impl UnsafeUnpin for RenewalVoucher",1,["casper_name_contracts::data_structures::RenewalVoucher"]],["impl UnsafeUnpin for SecondarySaleVoucher",1,["casper_name_contracts::data_structures::SecondarySaleVoucher"]],["impl UnsafeUnpin for TokenRenewalInfo",1,["casper_name_contracts::data_structures::TokenRenewalInfo"]],["impl UnsafeUnpin for TokenizationVoucher",1,["casper_name_contracts::data_structures::TokenizationVoucher"]]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[15985]} \ No newline at end of file diff --git a/docs/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js b/docs/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js new file mode 100644 index 0000000..9a4d4ea --- /dev/null +++ b/docs/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl !RefUnwindSafe for BaseController",1,["casper_name_contracts::contracts::controller::BaseController"]],["impl !RefUnwindSafe for BaseControllerContractRef",1,["casper_name_contracts::contracts::controller::BaseControllerContractRef"]],["impl !RefUnwindSafe for BaseControllerHostRef",1,["casper_name_contracts::contracts::controller::__base_controller_test_parts::BaseControllerHostRef"]],["impl !RefUnwindSafe for Controller",1,["casper_name_contracts::contracts::controller::Controller"]],["impl !RefUnwindSafe for ControllerContractRef",1,["casper_name_contracts::contracts::controller::ControllerContractRef"]],["impl !RefUnwindSafe for ControllerHostRef",1,["casper_name_contracts::contracts::controller::__controller_test_parts::ControllerHostRef"]],["impl !RefUnwindSafe for SecondaryMarket",1,["casper_name_contracts::contracts::marketplace::SecondaryMarket"]],["impl !RefUnwindSafe for SecondaryMarketContractRef",1,["casper_name_contracts::contracts::marketplace::SecondaryMarketContractRef"]],["impl !RefUnwindSafe for SecondaryMarketHostRef",1,["casper_name_contracts::contracts::marketplace::__secondary_market_test_parts::SecondaryMarketHostRef"]],["impl !RefUnwindSafe for NameToken",1,["casper_name_contracts::contracts::name_token::NameToken"]],["impl !RefUnwindSafe for NameTokenContractRef",1,["casper_name_contracts::contracts::name_token::NameTokenContractRef"]],["impl !RefUnwindSafe for NameTokenHostRef",1,["casper_name_contracts::contracts::name_token::__name_token_test_parts::NameTokenHostRef"]],["impl !RefUnwindSafe for Registrar",1,["casper_name_contracts::contracts::registrar::Registrar"]],["impl !RefUnwindSafe for RegistrarContractRef",1,["casper_name_contracts::contracts::registrar::RegistrarContractRef"]],["impl !RefUnwindSafe for RegistrarHostRef",1,["casper_name_contracts::contracts::registrar::__registrar_test_parts::RegistrarHostRef"]],["impl !RefUnwindSafe for DefaultResolver",1,["casper_name_contracts::contracts::resolver::DefaultResolver"]],["impl !RefUnwindSafe for DefaultResolverContractRef",1,["casper_name_contracts::contracts::resolver::DefaultResolverContractRef"]],["impl !RefUnwindSafe for DefaultResolverHostRef",1,["casper_name_contracts::contracts::resolver::__default_resolver_test_parts::DefaultResolverHostRef"]],["impl !RefUnwindSafe for ResolverContractRef",1,["casper_name_contracts::contracts::resolver::ResolverContractRef"]],["impl !RefUnwindSafe for ResolverHostRef",1,["casper_name_contracts::contracts::resolver::__resolver_test_parts::ResolverHostRef"]],["impl !RefUnwindSafe for ReverseResolver",1,["casper_name_contracts::contracts::reverse_resolver::ReverseResolver"]],["impl !RefUnwindSafe for ReverseResolverContractRef",1,["casper_name_contracts::contracts::reverse_resolver::ReverseResolverContractRef"]],["impl !RefUnwindSafe for ReverseResolverHostRef",1,["casper_name_contracts::contracts::reverse_resolver::__reverse_resolver_test_parts::ReverseResolverHostRef"]],["impl RefUnwindSafe for ControllerError",1,["casper_name_contracts::contracts::controller::ControllerError"]],["impl RefUnwindSafe for NameTokenError",1,["casper_name_contracts::contracts::name_token::NameTokenError"]],["impl RefUnwindSafe for RegistrarError",1,["casper_name_contracts::contracts::registrar::RegistrarError"]],["impl RefUnwindSafe for ResolverError",1,["casper_name_contracts::contracts::resolver::ResolverError"]],["impl RefUnwindSafe for NameTokenError",1,["casper_name_contracts::data_structures::NameTokenError"]],["impl RefUnwindSafe for ControllerInitArgs",1,["casper_name_contracts::contracts::controller::__controller_test_parts::ControllerInitArgs"]],["impl RefUnwindSafe for PaymentFulfilled",1,["casper_name_contracts::contracts::controller::PaymentFulfilled"]],["impl RefUnwindSafe for SignerPublicKeyChanged",1,["casper_name_contracts::contracts::controller::SignerPublicKeyChanged"]],["impl RefUnwindSafe for TreasuryAddressChanged",1,["casper_name_contracts::contracts::controller::TreasuryAddressChanged"]],["impl RefUnwindSafe for SecondaryMarketInitArgs",1,["casper_name_contracts::contracts::marketplace::__secondary_market_test_parts::SecondaryMarketInitArgs"]],["impl RefUnwindSafe for NameTokenInitArgs",1,["casper_name_contracts::contracts::name_token::__name_token_test_parts::NameTokenInitArgs"]],["impl RefUnwindSafe for GracePeriodChanged",1,["casper_name_contracts::contracts::registrar::GracePeriodChanged"]],["impl RefUnwindSafe for RegistrarInitArgs",1,["casper_name_contracts::contracts::registrar::__registrar_test_parts::RegistrarInitArgs"]],["impl RefUnwindSafe for DefaultResolverInitArgs",1,["casper_name_contracts::contracts::resolver::__default_resolver_test_parts::DefaultResolverInitArgs"]],["impl RefUnwindSafe for NameTokenAddressChanged",1,["casper_name_contracts::contracts::resolver::NameTokenAddressChanged"]],["impl RefUnwindSafe for ResolutionChanged",1,["casper_name_contracts::contracts::resolver::ResolutionChanged"]],["impl RefUnwindSafe for ResolutionCleared",1,["casper_name_contracts::contracts::resolver::ResolutionCleared"]],["impl RefUnwindSafe for PrimaryNameChanged",1,["casper_name_contracts::contracts::reverse_resolver::PrimaryNameChanged"]],["impl RefUnwindSafe for ReverseResolverInitArgs",1,["casper_name_contracts::contracts::reverse_resolver::__reverse_resolver_test_parts::ReverseResolverInitArgs"]],["impl RefUnwindSafe for NameMintInfo",1,["casper_name_contracts::data_structures::NameMintInfo"]],["impl RefUnwindSafe for NameTokenMetadata",1,["casper_name_contracts::data_structures::NameTokenMetadata"]],["impl RefUnwindSafe for NameTransferInfo",1,["casper_name_contracts::data_structures::NameTransferInfo"]],["impl RefUnwindSafe for PaymentInfo",1,["casper_name_contracts::data_structures::PaymentInfo"]],["impl RefUnwindSafe for PaymentVoucher",1,["casper_name_contracts::data_structures::PaymentVoucher"]],["impl RefUnwindSafe for RenewalPaymentVoucher",1,["casper_name_contracts::data_structures::RenewalPaymentVoucher"]],["impl RefUnwindSafe for RenewalVoucher",1,["casper_name_contracts::data_structures::RenewalVoucher"]],["impl RefUnwindSafe for SecondarySaleVoucher",1,["casper_name_contracts::data_structures::SecondarySaleVoucher"]],["impl RefUnwindSafe for TokenRenewalInfo",1,["casper_name_contracts::data_structures::TokenRenewalInfo"]],["impl RefUnwindSafe for TokenizationVoucher",1,["casper_name_contracts::data_structures::TokenizationVoucher"]]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[24952]} \ No newline at end of file diff --git a/docs/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js b/docs/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js new file mode 100644 index 0000000..4b60cde --- /dev/null +++ b/docs/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl !UnwindSafe for BaseController",1,["casper_name_contracts::contracts::controller::BaseController"]],["impl !UnwindSafe for BaseControllerContractRef",1,["casper_name_contracts::contracts::controller::BaseControllerContractRef"]],["impl !UnwindSafe for BaseControllerHostRef",1,["casper_name_contracts::contracts::controller::__base_controller_test_parts::BaseControllerHostRef"]],["impl !UnwindSafe for Controller",1,["casper_name_contracts::contracts::controller::Controller"]],["impl !UnwindSafe for ControllerContractRef",1,["casper_name_contracts::contracts::controller::ControllerContractRef"]],["impl !UnwindSafe for ControllerHostRef",1,["casper_name_contracts::contracts::controller::__controller_test_parts::ControllerHostRef"]],["impl !UnwindSafe for SecondaryMarket",1,["casper_name_contracts::contracts::marketplace::SecondaryMarket"]],["impl !UnwindSafe for SecondaryMarketContractRef",1,["casper_name_contracts::contracts::marketplace::SecondaryMarketContractRef"]],["impl !UnwindSafe for SecondaryMarketHostRef",1,["casper_name_contracts::contracts::marketplace::__secondary_market_test_parts::SecondaryMarketHostRef"]],["impl !UnwindSafe for NameToken",1,["casper_name_contracts::contracts::name_token::NameToken"]],["impl !UnwindSafe for NameTokenContractRef",1,["casper_name_contracts::contracts::name_token::NameTokenContractRef"]],["impl !UnwindSafe for NameTokenHostRef",1,["casper_name_contracts::contracts::name_token::__name_token_test_parts::NameTokenHostRef"]],["impl !UnwindSafe for Registrar",1,["casper_name_contracts::contracts::registrar::Registrar"]],["impl !UnwindSafe for RegistrarContractRef",1,["casper_name_contracts::contracts::registrar::RegistrarContractRef"]],["impl !UnwindSafe for RegistrarHostRef",1,["casper_name_contracts::contracts::registrar::__registrar_test_parts::RegistrarHostRef"]],["impl !UnwindSafe for DefaultResolver",1,["casper_name_contracts::contracts::resolver::DefaultResolver"]],["impl !UnwindSafe for DefaultResolverContractRef",1,["casper_name_contracts::contracts::resolver::DefaultResolverContractRef"]],["impl !UnwindSafe for DefaultResolverHostRef",1,["casper_name_contracts::contracts::resolver::__default_resolver_test_parts::DefaultResolverHostRef"]],["impl !UnwindSafe for ResolverContractRef",1,["casper_name_contracts::contracts::resolver::ResolverContractRef"]],["impl !UnwindSafe for ResolverHostRef",1,["casper_name_contracts::contracts::resolver::__resolver_test_parts::ResolverHostRef"]],["impl !UnwindSafe for ReverseResolver",1,["casper_name_contracts::contracts::reverse_resolver::ReverseResolver"]],["impl !UnwindSafe for ReverseResolverContractRef",1,["casper_name_contracts::contracts::reverse_resolver::ReverseResolverContractRef"]],["impl !UnwindSafe for ReverseResolverHostRef",1,["casper_name_contracts::contracts::reverse_resolver::__reverse_resolver_test_parts::ReverseResolverHostRef"]],["impl UnwindSafe for ControllerError",1,["casper_name_contracts::contracts::controller::ControllerError"]],["impl UnwindSafe for NameTokenError",1,["casper_name_contracts::contracts::name_token::NameTokenError"]],["impl UnwindSafe for RegistrarError",1,["casper_name_contracts::contracts::registrar::RegistrarError"]],["impl UnwindSafe for ResolverError",1,["casper_name_contracts::contracts::resolver::ResolverError"]],["impl UnwindSafe for NameTokenError",1,["casper_name_contracts::data_structures::NameTokenError"]],["impl UnwindSafe for ControllerInitArgs",1,["casper_name_contracts::contracts::controller::__controller_test_parts::ControllerInitArgs"]],["impl UnwindSafe for PaymentFulfilled",1,["casper_name_contracts::contracts::controller::PaymentFulfilled"]],["impl UnwindSafe for SignerPublicKeyChanged",1,["casper_name_contracts::contracts::controller::SignerPublicKeyChanged"]],["impl UnwindSafe for TreasuryAddressChanged",1,["casper_name_contracts::contracts::controller::TreasuryAddressChanged"]],["impl UnwindSafe for SecondaryMarketInitArgs",1,["casper_name_contracts::contracts::marketplace::__secondary_market_test_parts::SecondaryMarketInitArgs"]],["impl UnwindSafe for NameTokenInitArgs",1,["casper_name_contracts::contracts::name_token::__name_token_test_parts::NameTokenInitArgs"]],["impl UnwindSafe for GracePeriodChanged",1,["casper_name_contracts::contracts::registrar::GracePeriodChanged"]],["impl UnwindSafe for RegistrarInitArgs",1,["casper_name_contracts::contracts::registrar::__registrar_test_parts::RegistrarInitArgs"]],["impl UnwindSafe for DefaultResolverInitArgs",1,["casper_name_contracts::contracts::resolver::__default_resolver_test_parts::DefaultResolverInitArgs"]],["impl UnwindSafe for NameTokenAddressChanged",1,["casper_name_contracts::contracts::resolver::NameTokenAddressChanged"]],["impl UnwindSafe for ResolutionChanged",1,["casper_name_contracts::contracts::resolver::ResolutionChanged"]],["impl UnwindSafe for ResolutionCleared",1,["casper_name_contracts::contracts::resolver::ResolutionCleared"]],["impl UnwindSafe for PrimaryNameChanged",1,["casper_name_contracts::contracts::reverse_resolver::PrimaryNameChanged"]],["impl UnwindSafe for ReverseResolverInitArgs",1,["casper_name_contracts::contracts::reverse_resolver::__reverse_resolver_test_parts::ReverseResolverInitArgs"]],["impl UnwindSafe for NameMintInfo",1,["casper_name_contracts::data_structures::NameMintInfo"]],["impl UnwindSafe for NameTokenMetadata",1,["casper_name_contracts::data_structures::NameTokenMetadata"]],["impl UnwindSafe for NameTransferInfo",1,["casper_name_contracts::data_structures::NameTransferInfo"]],["impl UnwindSafe for PaymentInfo",1,["casper_name_contracts::data_structures::PaymentInfo"]],["impl UnwindSafe for PaymentVoucher",1,["casper_name_contracts::data_structures::PaymentVoucher"]],["impl UnwindSafe for RenewalPaymentVoucher",1,["casper_name_contracts::data_structures::RenewalPaymentVoucher"]],["impl UnwindSafe for RenewalVoucher",1,["casper_name_contracts::data_structures::RenewalVoucher"]],["impl UnwindSafe for SecondarySaleVoucher",1,["casper_name_contracts::data_structures::SecondarySaleVoucher"]],["impl UnwindSafe for TokenRenewalInfo",1,["casper_name_contracts::data_structures::TokenRenewalInfo"]],["impl UnwindSafe for TokenizationVoucher",1,["casper_name_contracts::data_structures::TokenizationVoucher"]]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[24484]} \ No newline at end of file diff --git a/docs/trait.impl/odra_core/contract/trait.OdraContract.js b/docs/trait.impl/odra_core/contract/trait.OdraContract.js new file mode 100644 index 0000000..3a46b80 --- /dev/null +++ b/docs/trait.impl/odra_core/contract/trait.OdraContract.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl OdraContract for BaseController"],["impl OdraContract for Controller"],["impl OdraContract for SecondaryMarket"],["impl OdraContract for NameToken"],["impl OdraContract for Registrar"],["impl OdraContract for DefaultResolver"],["impl OdraContract for ReverseResolver"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1556]} \ No newline at end of file diff --git a/docs/trait.impl/odra_core/contract_def/trait.HasEntrypoints.js b/docs/trait.impl/odra_core/contract_def/trait.HasEntrypoints.js new file mode 100644 index 0000000..aa73ca8 --- /dev/null +++ b/docs/trait.impl/odra_core/contract_def/trait.HasEntrypoints.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl HasEntrypoints for BaseController"],["impl HasEntrypoints for Controller"],["impl HasEntrypoints for SecondaryMarket"],["impl HasEntrypoints for NameToken"],["impl HasEntrypoints for Registrar"],["impl HasEntrypoints for DefaultResolver"],["impl HasEntrypoints for ReverseResolver"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1570]} \ No newline at end of file diff --git a/docs/trait.impl/odra_core/contract_def/trait.HasEvents.js b/docs/trait.impl/odra_core/contract_def/trait.HasEvents.js new file mode 100644 index 0000000..47a41f4 --- /dev/null +++ b/docs/trait.impl/odra_core/contract_def/trait.HasEvents.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl HasEvents for BaseController"],["impl HasEvents for Controller"],["impl HasEvents for SecondaryMarket"],["impl HasEvents for NameToken"],["impl HasEvents for Registrar"],["impl HasEvents for DefaultResolver"],["impl HasEvents for ReverseResolver"],["impl HasEvents for NameMintInfo"],["impl HasEvents for NameTransferInfo"],["impl HasEvents for PaymentInfo"],["impl HasEvents for PaymentVoucher"],["impl HasEvents for RenewalPaymentVoucher"],["impl HasEvents for RenewalVoucher"],["impl HasEvents for SecondarySaleVoucher"],["impl HasEvents for TokenRenewalInfo"],["impl HasEvents for TokenizationVoucher"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[3458]} \ No newline at end of file diff --git a/docs/trait.impl/odra_core/contract_def/trait.HasIdent.js b/docs/trait.impl/odra_core/contract_def/trait.HasIdent.js new file mode 100644 index 0000000..022de8d --- /dev/null +++ b/docs/trait.impl/odra_core/contract_def/trait.HasIdent.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl HasIdent for BaseController"],["impl HasIdent for BaseControllerHostRef"],["impl HasIdent for Controller"],["impl HasIdent for ControllerHostRef"],["impl HasIdent for SecondaryMarket"],["impl HasIdent for SecondaryMarketHostRef"],["impl HasIdent for NameToken"],["impl HasIdent for NameTokenHostRef"],["impl HasIdent for Registrar"],["impl HasIdent for RegistrarHostRef"],["impl HasIdent for DefaultResolver"],["impl HasIdent for DefaultResolverHostRef"],["impl HasIdent for ReverseResolver"],["impl HasIdent for ReverseResolverHostRef"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[3176]} \ No newline at end of file diff --git a/docs/trait.impl/odra_core/contract_env/trait.ContractRef.js b/docs/trait.impl/odra_core/contract_env/trait.ContractRef.js new file mode 100644 index 0000000..3d598c3 --- /dev/null +++ b/docs/trait.impl/odra_core/contract_env/trait.ContractRef.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl ContractRef for BaseControllerContractRef"],["impl ContractRef for ControllerContractRef"],["impl ContractRef for SecondaryMarketContractRef"],["impl ContractRef for NameTokenContractRef"],["impl ContractRef for RegistrarContractRef"],["impl ContractRef for DefaultResolverContractRef"],["impl ContractRef for ResolverContractRef"],["impl ContractRef for ReverseResolverContractRef"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2012]} \ No newline at end of file diff --git a/docs/trait.impl/odra_core/host/trait.EntryPointsCallerProvider.js b/docs/trait.impl/odra_core/host/trait.EntryPointsCallerProvider.js new file mode 100644 index 0000000..95f2a27 --- /dev/null +++ b/docs/trait.impl/odra_core/host/trait.EntryPointsCallerProvider.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl EntryPointsCallerProvider for BaseControllerHostRef"],["impl EntryPointsCallerProvider for ControllerHostRef"],["impl EntryPointsCallerProvider for SecondaryMarketHostRef"],["impl EntryPointsCallerProvider for NameTokenHostRef"],["impl EntryPointsCallerProvider for RegistrarHostRef"],["impl EntryPointsCallerProvider for DefaultResolverHostRef"],["impl EntryPointsCallerProvider for ReverseResolverHostRef"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1794]} \ No newline at end of file diff --git a/docs/trait.impl/odra_core/host/trait.HostRef.js b/docs/trait.impl/odra_core/host/trait.HostRef.js new file mode 100644 index 0000000..46f283e --- /dev/null +++ b/docs/trait.impl/odra_core/host/trait.HostRef.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl HostRef for BaseControllerHostRef"],["impl HostRef for ControllerHostRef"],["impl HostRef for SecondaryMarketHostRef"],["impl HostRef for NameTokenHostRef"],["impl HostRef for RegistrarHostRef"],["impl HostRef for DefaultResolverHostRef"],["impl HostRef for ResolverHostRef"],["impl HostRef for ReverseResolverHostRef"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1884]} \ No newline at end of file diff --git a/docs/trait.impl/odra_core/host/trait.InitArgs.js b/docs/trait.impl/odra_core/host/trait.InitArgs.js new file mode 100644 index 0000000..80838fd --- /dev/null +++ b/docs/trait.impl/odra_core/host/trait.InitArgs.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl InitArgs for ControllerInitArgs"],["impl InitArgs for SecondaryMarketInitArgs"],["impl InitArgs for NameTokenInitArgs"],["impl InitArgs for RegistrarInitArgs"],["impl InitArgs for DefaultResolverInitArgs"],["impl InitArgs for ReverseResolverInitArgs"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1454]} \ No newline at end of file diff --git a/docs/trait.impl/odra_core/module/trait.Module.js b/docs/trait.impl/odra_core/module/trait.Module.js new file mode 100644 index 0000000..044273e --- /dev/null +++ b/docs/trait.impl/odra_core/module/trait.Module.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl Module for BaseController"],["impl Module for Controller"],["impl Module for SecondaryMarket"],["impl Module for NameToken"],["impl Module for Registrar"],["impl Module for DefaultResolver"],["impl Module for ReverseResolver"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1514]} \ No newline at end of file diff --git a/docs/trait.impl/odra_schema/trait.SchemaCustomElement.js b/docs/trait.impl/odra_schema/trait.SchemaCustomElement.js new file mode 100644 index 0000000..8eb5eeb --- /dev/null +++ b/docs/trait.impl/odra_schema/trait.SchemaCustomElement.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl SchemaCustomElement for NameMintInfo"],["impl SchemaCustomElement for NameTransferInfo"],["impl SchemaCustomElement for PaymentInfo"],["impl SchemaCustomElement for PaymentVoucher"],["impl SchemaCustomElement for RenewalPaymentVoucher"],["impl SchemaCustomElement for RenewalVoucher"],["impl SchemaCustomElement for SecondarySaleVoucher"],["impl SchemaCustomElement for TokenRenewalInfo"],["impl SchemaCustomElement for TokenizationVoucher"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2040]} \ No newline at end of file diff --git a/docs/trait.impl/odra_schema/trait.SchemaCustomTypes.js b/docs/trait.impl/odra_schema/trait.SchemaCustomTypes.js new file mode 100644 index 0000000..027b802 --- /dev/null +++ b/docs/trait.impl/odra_schema/trait.SchemaCustomTypes.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl SchemaCustomTypes for BaseController"],["impl SchemaCustomTypes for Controller"],["impl SchemaCustomTypes for PaymentFulfilled"],["impl SchemaCustomTypes for SignerPublicKeyChanged"],["impl SchemaCustomTypes for TreasuryAddressChanged"],["impl SchemaCustomTypes for SecondaryMarket"],["impl SchemaCustomTypes for NameToken"],["impl SchemaCustomTypes for GracePeriodChanged"],["impl SchemaCustomTypes for Registrar"],["impl SchemaCustomTypes for DefaultResolver"],["impl SchemaCustomTypes for NameTokenAddressChanged"],["impl SchemaCustomTypes for ResolutionChanged"],["impl SchemaCustomTypes for ResolutionCleared"],["impl SchemaCustomTypes for PrimaryNameChanged"],["impl SchemaCustomTypes for ReverseResolver"],["impl SchemaCustomTypes for NameMintInfo"],["impl SchemaCustomTypes for NameTransferInfo"],["impl SchemaCustomTypes for PaymentInfo"],["impl SchemaCustomTypes for PaymentVoucher"],["impl SchemaCustomTypes for RenewalPaymentVoucher"],["impl SchemaCustomTypes for RenewalVoucher"],["impl SchemaCustomTypes for SecondarySaleVoucher"],["impl SchemaCustomTypes for TokenRenewalInfo"],["impl SchemaCustomTypes for TokenizationVoucher"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[5523]} \ No newline at end of file diff --git a/docs/trait.impl/odra_schema/trait.SchemaEntrypoints.js b/docs/trait.impl/odra_schema/trait.SchemaEntrypoints.js new file mode 100644 index 0000000..0e2a1a2 --- /dev/null +++ b/docs/trait.impl/odra_schema/trait.SchemaEntrypoints.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl SchemaEntrypoints for BaseController"],["impl SchemaEntrypoints for Controller"],["impl SchemaEntrypoints for SecondaryMarket"],["impl SchemaEntrypoints for NameToken"],["impl SchemaEntrypoints for Registrar"],["impl SchemaEntrypoints for DefaultResolver"],["impl SchemaEntrypoints for ReverseResolver"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[1591]} \ No newline at end of file diff --git a/docs/trait.impl/odra_schema/trait.SchemaErrors.js b/docs/trait.impl/odra_schema/trait.SchemaErrors.js new file mode 100644 index 0000000..7cf72e5 --- /dev/null +++ b/docs/trait.impl/odra_schema/trait.SchemaErrors.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl SchemaErrors for ControllerError"],["impl SchemaErrors for NameTokenError"],["impl SchemaErrors for RegistrarError"],["impl SchemaErrors for ResolverError"],["impl SchemaErrors for NameTokenError"],["impl SchemaErrors for BaseController"],["impl SchemaErrors for BaseControllerContractRef"],["impl SchemaErrors for Controller"],["impl SchemaErrors for ControllerContractRef"],["impl SchemaErrors for SecondaryMarket"],["impl SchemaErrors for SecondaryMarketContractRef"],["impl SchemaErrors for NameToken"],["impl SchemaErrors for NameTokenContractRef"],["impl SchemaErrors for Registrar"],["impl SchemaErrors for RegistrarContractRef"],["impl SchemaErrors for DefaultResolver"],["impl SchemaErrors for DefaultResolverContractRef"],["impl SchemaErrors for ResolverContractRef"],["impl SchemaErrors for ReverseResolver"],["impl SchemaErrors for ReverseResolverContractRef"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[4612]} \ No newline at end of file diff --git a/docs/trait.impl/odra_schema/trait.SchemaEvents.js b/docs/trait.impl/odra_schema/trait.SchemaEvents.js new file mode 100644 index 0000000..48b6c18 --- /dev/null +++ b/docs/trait.impl/odra_schema/trait.SchemaEvents.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl SchemaEvents for BaseController"],["impl SchemaEvents for BaseControllerContractRef"],["impl SchemaEvents for Controller"],["impl SchemaEvents for ControllerContractRef"],["impl SchemaEvents for SecondaryMarket"],["impl SchemaEvents for SecondaryMarketContractRef"],["impl SchemaEvents for NameToken"],["impl SchemaEvents for NameTokenContractRef"],["impl SchemaEvents for Registrar"],["impl SchemaEvents for RegistrarContractRef"],["impl SchemaEvents for DefaultResolver"],["impl SchemaEvents for DefaultResolverContractRef"],["impl SchemaEvents for ResolverContractRef"],["impl SchemaEvents for ReverseResolver"],["impl SchemaEvents for ReverseResolverContractRef"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[3549]} \ No newline at end of file diff --git a/docs/trait.impl/odra_schema/ty/trait.NamedCLTyped.js b/docs/trait.impl/odra_schema/ty/trait.NamedCLTyped.js new file mode 100644 index 0000000..8c2c1c7 --- /dev/null +++ b/docs/trait.impl/odra_schema/ty/trait.NamedCLTyped.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl NamedCLTyped for PaymentFulfilled"],["impl NamedCLTyped for SignerPublicKeyChanged"],["impl NamedCLTyped for TreasuryAddressChanged"],["impl NamedCLTyped for GracePeriodChanged"],["impl NamedCLTyped for NameTokenAddressChanged"],["impl NamedCLTyped for ResolutionChanged"],["impl NamedCLTyped for ResolutionCleared"],["impl NamedCLTyped for PrimaryNameChanged"],["impl NamedCLTyped for NameMintInfo"],["impl NamedCLTyped for NameTransferInfo"],["impl NamedCLTyped for PaymentInfo"],["impl NamedCLTyped for PaymentVoucher"],["impl NamedCLTyped for RenewalPaymentVoucher"],["impl NamedCLTyped for RenewalVoucher"],["impl NamedCLTyped for SecondarySaleVoucher"],["impl NamedCLTyped for TokenRenewalInfo"],["impl NamedCLTyped for TokenizationVoucher"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[3874]} \ No newline at end of file diff --git a/docs/trait.impl/serde/de/trait.Deserialize.js b/docs/trait.impl/serde/de/trait.Deserialize.js new file mode 100644 index 0000000..b882745 --- /dev/null +++ b/docs/trait.impl/serde/de/trait.Deserialize.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl<'de> Deserialize<'de> for NameTokenMetadata"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[401]} \ No newline at end of file diff --git a/docs/trait.impl/serde/ser/trait.Serialize.js b/docs/trait.impl/serde/ser/trait.Serialize.js new file mode 100644 index 0000000..8d319ec --- /dev/null +++ b/docs/trait.impl/serde/ser/trait.Serialize.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["casper_name_contracts",[["impl Serialize for NameTokenMetadata"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[375]} \ No newline at end of file diff --git a/justfile b/justfile index 40959e6..768e7b9 100644 --- a/justfile +++ b/justfile @@ -5,4 +5,20 @@ deploy-example: cargo odra build cargo run --bin deploy-example -F livenet - \ No newline at end of file +lint: + cargo fmt + +show-structs-as-bytes: + cargo run --bin structs-as-bytes + +cli *ARGS: + cargo run --bin casper-name-cli -- {{ARGS}} + +rebuild-docs: + mv docs/sequence-diagrams sequence-diagrams-tmp + rm -rf docs + cargo doc -p casper-name-contracts --lib --no-deps + cp -r target/doc docs + echo "" > docs/index.html + mv sequence-diagrams-tmp docs/sequence-diagrams + diff --git a/resources/casper_contract_schemas/register_schema.json b/resources/casper_contract_schemas/controller_schema.json similarity index 62% rename from resources/casper_contract_schemas/register_schema.json rename to resources/casper_contract_schemas/controller_schema.json index 5e8a0c0..5260292 100644 --- a/resources/casper_contract_schemas/register_schema.json +++ b/resources/casper_contract_schemas/controller_schema.json @@ -1,29 +1,34 @@ { "casper_contract_schema_version": 1, - "toolchain": "rustc 1.77.0-nightly (5bd5d214e 2024-01-25)", + "toolchain": "rustc 1.85.0-nightly (d117b7f21 2024-12-31)", "authors": [], "repository": null, "homepage": null, - "contract_name": "Register", + "contract_name": "Controller", "contract_version": "0.1.0", "types": [ { "struct": { - "name": "Approval", + "name": "NameMintInfo", "description": null, "members": [ + { + "name": "label", + "description": null, + "ty": "String" + }, { "name": "owner", "description": null, "ty": "Key" }, { - "name": "spender", + "name": "token_expiration", "description": null, - "ty": "Key" + "ty": "U64" }, { - "name": "token_id", + "name": "asset_uri", "description": null, "ty": "String" } @@ -32,16 +37,11 @@ }, { "struct": { - "name": "ApprovalForAll", + "name": "Paused", "description": null, "members": [ { - "name": "owner", - "description": null, - "ty": "Key" - }, - { - "name": "operator", + "name": "account", "description": null, "ty": "Key" } @@ -50,100 +50,96 @@ }, { "struct": { - "name": "ApprovalRevoked", + "name": "PaymentFulfilled", "description": null, "members": [ { - "name": "owner", + "name": "payment_id", + "description": null, + "ty": "String" + }, + { + "name": "buyer", "description": null, "ty": "Key" }, { - "name": "token_id", + "name": "amount", "description": null, - "ty": "String" + "ty": "U512" } ] } }, { "struct": { - "name": "Burn", + "name": "PaymentInfo", "description": null, "members": [ { - "name": "owner", + "name": "buyer", "description": null, "ty": "Key" }, { - "name": "token_id", + "name": "payment_id", "description": null, "ty": "String" }, { - "name": "burner", + "name": "amount", "description": null, - "ty": "Key" + "ty": "U512" } ] } }, { "struct": { - "name": "MetadataUpdated", + "name": "PaymentVoucher", "description": null, "members": [ { - "name": "token_id", + "name": "payment", "description": null, - "ty": "String" + "ty": "PaymentInfo" }, { - "name": "data", + "name": "names", "description": null, - "ty": "String" - } - ] - } - }, - { - "struct": { - "name": "Mint", - "description": null, - "members": [ - { - "name": "recipient", - "description": null, - "ty": "Key" - }, - { - "name": "token_id", - "description": null, - "ty": "String" + "ty": { + "List": "NameMintInfo" + } }, { - "name": "data", + "name": "voucher_expiration", "description": null, - "ty": "String" + "ty": "U64" } ] } }, { "struct": { - "name": "RevokedForAll", + "name": "RenewalPaymentVoucher", "description": null, "members": [ { - "name": "owner", + "name": "payment", "description": null, - "ty": "Key" + "ty": "PaymentInfo" }, { - "name": "operator", + "name": "tokens", "description": null, - "ty": "Key" + "ty": { + "List": "TokenRenewalInfo" + } + }, + { + "name": "voucher_expiration", + "description": null, + "ty": "U64" } ] } @@ -229,43 +225,68 @@ }, { "struct": { - "name": "Transfer", + "name": "SignerPublicKeyChanged", "description": null, "members": [ { - "name": "owner", + "name": "new_signer_public_key", "description": null, - "ty": "Key" - }, + "ty": "PublicKey" + } + ] + } + }, + { + "struct": { + "name": "TokenRenewalInfo", + "description": null, + "members": [ { - "name": "spender", + "name": "token_id", "description": null, - "ty": { - "Option": "Key" - } + "ty": "U256" }, { - "name": "recipient", + "name": "token_expiration", "description": null, - "ty": "Key" - }, + "ty": "U64" + } + ] + } + }, + { + "struct": { + "name": "TreasuryAddressChanged", + "description": null, + "members": [ { - "name": "token_id", + "name": "new_treasury_address", "description": null, - "ty": "String" + "ty": "Key" } ] } }, { "struct": { - "name": "VariablesSet", + "name": "Unpaused", "description": null, - "members": [] + "members": [ + { + "name": "account", + "description": null, + "ty": "Key" + } + ] } } ], "errors": [ + { + "name": "BuyerMustBeCaller", + "description": "", + "discriminant": 1104 + }, { "name": "CallerNotTheNewOwner", "description": "The caller is not the new owner.", @@ -276,6 +297,26 @@ "description": "The caller is not the owner.", "discriminant": 20001 }, + { + "name": "ContractAddressExpected", + "description": "", + "discriminant": 1107 + }, + { + "name": "FeeCollectorNotSet", + "description": "", + "discriminant": 1102 + }, + { + "name": "InsufficientPayment", + "description": "", + "discriminant": 1105 + }, + { + "name": "InvalidSignature", + "description": "", + "discriminant": 1101 + }, { "name": "MissingRole", "description": "The role is missing.", @@ -286,34 +327,50 @@ "description": "The owner is not set.", "discriminant": 20000 }, + { + "name": "PausedRequired", + "description": "Contract needs to be paused first.", + "discriminant": 21000 + }, + { + "name": "PaymentTooLarge", + "description": "", + "discriminant": 1106 + }, + { + "name": "RegistrarNotSet", + "description": "", + "discriminant": 1103 + }, { "name": "RoleRenounceForAnotherAddress", "description": "The role cannot be renounced for another address.", "discriminant": 20004 + }, + { + "name": "UnpausedRequired", + "description": "Contract needs to be unpaused first.", + "discriminant": 21001 } ], "entry_points": [ { - "name": "mint", - "description": "", + "name": "buy", + "description": "Payable. Buys new name tokens.", "is_mutable": true, "arguments": [ { - "name": "to", + "name": "voucher", "description": null, - "ty": "Key", + "ty": "PaymentVoucher", "optional": false }, { - "name": "label", + "name": "signature", "description": null, - "ty": "String", - "optional": false - }, - { - "name": "expiration", - "description": null, - "ty": "U64", + "ty": { + "List": "U8" + }, "optional": false } ], @@ -323,19 +380,21 @@ }, { "name": "renew", - "description": "", + "description": "Payable. Renews name tokens.", "is_mutable": true, "arguments": [ { - "name": "token_hash", + "name": "voucher", "description": null, - "ty": "String", + "ty": "RenewalPaymentVoucher", "optional": false }, { - "name": "expiration", + "name": "signature", "description": null, - "ty": "U64", + "ty": { + "List": "U8" + }, "optional": false } ], @@ -344,223 +403,156 @@ "access": "public" }, { - "name": "admin_burn", - "description": "", + "name": "buy_and_renew", + "description": "Payable. Buys new name tokens and renews existing ones.", "is_mutable": true, "arguments": [ { - "name": "token_hash", + "name": "payment_voucher", "description": null, - "ty": "String", + "ty": "PaymentVoucher", "optional": false - } - ], - "return_ty": "Unit", - "is_contract_context": true, - "access": "public" - }, - { - "name": "burn", - "description": "", - "is_mutable": false, - "arguments": [], - "return_ty": "Unit", - "is_contract_context": true, - "access": "public" - }, - { - "name": "set_token_metadata", - "description": "", - "is_mutable": true, - "arguments": [], - "return_ty": "Unit", - "is_contract_context": true, - "access": "public" - }, - { - "name": "get_collection_name", - "description": "Delegated. See `self.token.get_collection_name()` for details.", - "is_mutable": false, - "arguments": [], - "return_ty": "String", - "is_contract_context": true, - "access": "public" - }, - { - "name": "get_collection_symbol", - "description": "Delegated. See `self.token.get_collection_symbol()` for details.", - "is_mutable": false, - "arguments": [], - "return_ty": "String", - "is_contract_context": true, - "access": "public" - }, - { - "name": "transfer", - "description": "Delegated. See `self.token.transfer()` for details.", - "is_mutable": true, - "arguments": [ - { - "name": "token_id", - "description": null, - "ty": "U64", - "optional": true }, { - "name": "token_hash", + "name": "payment_signature", "description": null, - "ty": "String", - "optional": true + "ty": { + "List": "U8" + }, + "optional": false }, { - "name": "source_key", + "name": "renewal_voucher", "description": null, - "ty": "Key", + "ty": "RenewalPaymentVoucher", "optional": false }, { - "name": "target_key", + "name": "renewal_signature", "description": null, - "ty": "Key", + "ty": { + "List": "U8" + }, "optional": false } ], - "return_ty": { - "Tuple2": [ - "String", - "Key" - ] - }, + "return_ty": "Unit", "is_contract_context": true, "access": "public" }, { - "name": "approve", - "description": "Delegated. See `self.token.approve()` for details.", - "is_mutable": true, + "name": "resolve", + "description": "Try to resolve a full domain name to an address.", + "is_mutable": false, "arguments": [ { - "name": "spender", - "description": null, - "ty": "Key", - "optional": false - }, - { - "name": "token_id", - "description": null, - "ty": "U64", - "optional": true - }, - { - "name": "token_hash", + "name": "full_domain", "description": null, "ty": "String", - "optional": true + "optional": false } ], - "return_ty": "Unit", + "return_ty": { + "Option": "Key" + }, "is_contract_context": true, "access": "public" }, { - "name": "set_approval_for_all", - "description": "Delegated. See `self.token.set_approval_for_all()` for details.", - "is_mutable": true, + "name": "has_role", + "description": "Delegated. See `self.controller.has_role()` for details.", + "is_mutable": false, "arguments": [ { - "name": "approve_all", + "name": "role", "description": null, - "ty": "Bool", + "ty": { + "ByteArray": 32 + }, "optional": false }, { - "name": "operator", + "name": "address", "description": null, "ty": "Key", "optional": false } ], - "return_ty": "Unit", + "return_ty": "Bool", "is_contract_context": true, "access": "public" }, { - "name": "balance_of", - "description": "Delegated. See `self.token.balance_of()` for details.", + "name": "grant_role", + "description": "Delegated. See `self.controller.grant_role()` for details.", "is_mutable": true, "arguments": [ { - "name": "token_owner", + "name": "role", + "description": null, + "ty": { + "ByteArray": 32 + }, + "optional": false + }, + { + "name": "address", "description": null, "ty": "Key", "optional": false } ], - "return_ty": "U64", + "return_ty": "Unit", "is_contract_context": true, "access": "public" }, { - "name": "owner_of", - "description": "Delegated. See `self.token.owner_of()` for details.", - "is_mutable": false, + "name": "revoke_role", + "description": "Delegated. See `self.controller.revoke_role()` for details.", + "is_mutable": true, "arguments": [ { - "name": "token_id", + "name": "role", "description": null, - "ty": "U64", - "optional": true + "ty": { + "ByteArray": 32 + }, + "optional": false }, { - "name": "token_hash", + "name": "address", "description": null, - "ty": "String", - "optional": true + "ty": "Key", + "optional": false } ], - "return_ty": "Key", + "return_ty": "Unit", "is_contract_context": true, "access": "public" }, { - "name": "get_approved", - "description": "Delegated. See `self.token.get_approved()` for details.", + "name": "set_signer_public_key", + "description": "Delegated. See `self.controller.set_signer_public_key()` for details.", "is_mutable": true, "arguments": [ { - "name": "token_id", - "description": null, - "ty": "U64", - "optional": true - }, - { - "name": "token_hash", + "name": "signer", "description": null, - "ty": "String", - "optional": true + "ty": "PublicKey", + "optional": false } ], - "return_ty": { - "Option": "Key" - }, + "return_ty": "Unit", "is_contract_context": true, "access": "public" }, { - "name": "grant_role", - "description": "Delegated. See `self.access_control.grant_role()` for details.", + "name": "set_treasury", + "description": "Delegated. See `self.controller.set_treasury()` for details.", "is_mutable": true, "arguments": [ { - "name": "role", - "description": null, - "ty": { - "ByteArray": 32 - }, - "optional": false - }, - { - "name": "address", + "name": "treasury", "description": null, "ty": "Key", "optional": false @@ -569,36 +561,52 @@ "return_ty": "Unit", "is_contract_context": true, "access": "public" - } - ], - "events": [ - { - "name": "Approval", - "ty": "Approval" }, { - "name": "ApprovalForAll", - "ty": "ApprovalForAll" + "name": "signer_public_key", + "description": "Delegated. See `self.controller.signer_public_key()` for details.", + "is_mutable": false, + "arguments": [], + "return_ty": "PublicKey", + "is_contract_context": true, + "access": "public" }, { - "name": "ApprovalRevoked", - "ty": "ApprovalRevoked" + "name": "pause", + "description": "Delegated. See `self.controller.pause()` for details.", + "is_mutable": true, + "arguments": [], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" }, { - "name": "Burn", - "ty": "Burn" + "name": "unpause", + "description": "Delegated. See `self.controller.unpause()` for details.", + "is_mutable": true, + "arguments": [], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" }, { - "name": "MetadataUpdated", - "ty": "MetadataUpdated" - }, + "name": "is_paused", + "description": "Delegated. See `self.controller.is_paused()` for details.", + "is_mutable": false, + "arguments": [], + "return_ty": "Bool", + "is_contract_context": true, + "access": "public" + } + ], + "events": [ { - "name": "Mint", - "ty": "Mint" + "name": "Paused", + "ty": "Paused" }, { - "name": "RevokedForAll", - "ty": "RevokedForAll" + "name": "PaymentFulfilled", + "ty": "PaymentFulfilled" }, { "name": "RoleAdminChanged", @@ -613,17 +621,21 @@ "ty": "RoleRevoked" }, { - "name": "Transfer", - "ty": "Transfer" + "name": "SignerPublicKeyChanged", + "ty": "SignerPublicKeyChanged" }, { - "name": "VariablesSet", - "ty": "VariablesSet" + "name": "TreasuryAddressChanged", + "ty": "TreasuryAddressChanged" + }, + { + "name": "Unpaused", + "ty": "Unpaused" } ], "call": { - "wasm_file_name": "Register.wasm", - "description": "", + "wasm_file_name": "Controller.wasm", + "description": "Initializes the controller with the registrar contract address, the", "arguments": [ { "name": "odra_cfg_package_hash_key_name", @@ -633,7 +645,7 @@ }, { "name": "odra_cfg_allow_key_override", - "description": "The arg name for the allow key override.", + "description": "If true and the key specified in odra_cfg_package_hash_key_name already exists, it will be overwritten.", "ty": "Bool", "optional": false }, @@ -644,15 +656,21 @@ "optional": false }, { - "name": "name", + "name": "registrar", "description": null, - "ty": "String", + "ty": "Key", "optional": false }, { - "name": "symbol", + "name": "signer", "description": null, - "ty": "String", + "ty": "PublicKey", + "optional": false + }, + { + "name": "treasury", + "description": null, + "ty": "Key", "optional": false } ] diff --git a/resources/casper_contract_schemas/default_resolver_schema.json b/resources/casper_contract_schemas/default_resolver_schema.json new file mode 100644 index 0000000..57542e4 --- /dev/null +++ b/resources/casper_contract_schemas/default_resolver_schema.json @@ -0,0 +1,402 @@ +{ + "casper_contract_schema_version": 1, + "toolchain": "rustc 1.85.0-nightly (d117b7f21 2024-12-31)", + "authors": [], + "repository": null, + "homepage": null, + "contract_name": "DefaultResolver", + "contract_version": "0.1.0", + "types": [ + { + "struct": { + "name": "NameTokenAddressChanged", + "description": null, + "members": [ + { + "name": "new_name_token", + "description": null, + "ty": "Key" + } + ] + } + }, + { + "struct": { + "name": "ResolutionChanged", + "description": null, + "members": [ + { + "name": "full_domain", + "description": null, + "ty": "String" + }, + { + "name": "address", + "description": null, + "ty": { + "Option": "Key" + } + } + ] + } + }, + { + "struct": { + "name": "ResolutionCleared", + "description": null, + "members": [ + { + "name": "token_id", + "description": null, + "ty": "U256" + } + ] + } + }, + { + "struct": { + "name": "RoleAdminChanged", + "description": null, + "members": [ + { + "name": "role", + "description": null, + "ty": { + "ByteArray": 32 + } + }, + { + "name": "previous_admin_role", + "description": null, + "ty": { + "ByteArray": 32 + } + }, + { + "name": "new_admin_role", + "description": null, + "ty": { + "ByteArray": 32 + } + } + ] + } + }, + { + "struct": { + "name": "RoleGranted", + "description": null, + "members": [ + { + "name": "role", + "description": null, + "ty": { + "ByteArray": 32 + } + }, + { + "name": "address", + "description": null, + "ty": "Key" + }, + { + "name": "sender", + "description": null, + "ty": "Key" + } + ] + } + }, + { + "struct": { + "name": "RoleRevoked", + "description": null, + "members": [ + { + "name": "role", + "description": null, + "ty": { + "ByteArray": 32 + } + }, + { + "name": "address", + "description": null, + "ty": "Key" + }, + { + "name": "sender", + "description": null, + "ty": "Key" + } + ] + } + } + ], + "errors": [ + { + "name": "CallerNotTheNewOwner", + "description": "The caller is not the new owner.", + "discriminant": 20002 + }, + { + "name": "CallerNotTheOwner", + "description": "The caller is not the owner.", + "discriminant": 20001 + }, + { + "name": "InvalidDomain", + "description": "", + "discriminant": 1405 + }, + { + "name": "InvalidSubdomainFormat", + "description": "", + "discriminant": 1406 + }, + { + "name": "InvalidTokenName", + "description": "", + "discriminant": 1407 + }, + { + "name": "MissingRole", + "description": "The role is missing.", + "discriminant": 20003 + }, + { + "name": "OwnerNotSet", + "description": "The owner is not set.", + "discriminant": 20000 + }, + { + "name": "ResolutionSetByInvalidOwner", + "description": "", + "discriminant": 1402 + }, + { + "name": "ResolutionSetWithInvalidToken", + "description": "", + "discriminant": 1401 + }, + { + "name": "RoleRenounceForAnotherAddress", + "description": "The role cannot be renounced for another address.", + "discriminant": 20004 + }, + { + "name": "UnauthorizedInvalidation", + "description": "", + "discriminant": 1403 + }, + { + "name": "UnauthorizedTokenAddressUpdate", + "description": "", + "discriminant": 1404 + } + ], + "entry_points": [ + { + "name": "set_name_token", + "description": "Admin only. Sets the name token contract address.", + "is_mutable": true, + "arguments": [ + { + "name": "name_token", + "description": null, + "ty": "Key", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "set_resolution", + "description": "Token owner only. Sets the resolution for a domain to an address.", + "is_mutable": true, + "arguments": [ + { + "name": "full_domain", + "description": null, + "ty": "String", + "optional": false + }, + { + "name": "address", + "description": null, + "ty": { + "Option": "Key" + }, + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "resolve", + "description": "Resolves a domain to an address.", + "is_mutable": false, + "arguments": [ + { + "name": "full_domain", + "description": null, + "ty": "String", + "optional": false + } + ], + "return_ty": { + "Option": "Key" + }, + "is_contract_context": true, + "access": "public" + }, + { + "name": "invalidate_resolutions", + "description": "Invalidates all the resolutions for a token. Only the token owner or the admin can do this.", + "is_mutable": true, + "arguments": [ + { + "name": "token_id", + "description": null, + "ty": "U256", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "has_role", + "description": "Delegated. See `self.access_control.has_role()` for details.", + "is_mutable": false, + "arguments": [ + { + "name": "role", + "description": null, + "ty": { + "ByteArray": 32 + }, + "optional": false + }, + { + "name": "address", + "description": null, + "ty": "Key", + "optional": false + } + ], + "return_ty": "Bool", + "is_contract_context": true, + "access": "public" + }, + { + "name": "grant_role", + "description": "Delegated. See `self.access_control.grant_role()` for details.", + "is_mutable": true, + "arguments": [ + { + "name": "role", + "description": null, + "ty": { + "ByteArray": 32 + }, + "optional": false + }, + { + "name": "address", + "description": null, + "ty": "Key", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "revoke_role", + "description": "Delegated. See `self.access_control.revoke_role()` for details.", + "is_mutable": true, + "arguments": [ + { + "name": "role", + "description": null, + "ty": { + "ByteArray": 32 + }, + "optional": false + }, + { + "name": "address", + "description": null, + "ty": "Key", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + } + ], + "events": [ + { + "name": "NameTokenAddressChanged", + "ty": "NameTokenAddressChanged" + }, + { + "name": "ResolutionChanged", + "ty": "ResolutionChanged" + }, + { + "name": "ResolutionCleared", + "ty": "ResolutionCleared" + }, + { + "name": "RoleAdminChanged", + "ty": "RoleAdminChanged" + }, + { + "name": "RoleGranted", + "ty": "RoleGranted" + }, + { + "name": "RoleRevoked", + "ty": "RoleRevoked" + } + ], + "call": { + "wasm_file_name": "DefaultResolver.wasm", + "description": "Initializes the default resolver with the name token contract address.", + "arguments": [ + { + "name": "odra_cfg_package_hash_key_name", + "description": "The arg name for the package hash key name.", + "ty": "String", + "optional": false + }, + { + "name": "odra_cfg_allow_key_override", + "description": "If true and the key specified in odra_cfg_package_hash_key_name already exists, it will be overwritten.", + "ty": "Bool", + "optional": false + }, + { + "name": "odra_cfg_is_upgradable", + "description": "The arg name for the contract upgradeability setting.", + "ty": "Bool", + "optional": false + }, + { + "name": "name_token", + "description": null, + "ty": "Key", + "optional": false + } + ] + } +} \ No newline at end of file diff --git a/resources/casper_contract_schemas/name_token_schema.json b/resources/casper_contract_schemas/name_token_schema.json new file mode 100644 index 0000000..14f5ff4 --- /dev/null +++ b/resources/casper_contract_schemas/name_token_schema.json @@ -0,0 +1,952 @@ +{ + "casper_contract_schema_version": 1, + "toolchain": "rustc 1.85.0-nightly (d117b7f21 2024-12-31)", + "authors": [], + "repository": null, + "homepage": null, + "contract_name": "NameToken", + "contract_version": "0.1.0", + "types": [ + { + "struct": { + "name": "Approval", + "description": null, + "members": [ + { + "name": "owner", + "description": null, + "ty": "Key" + }, + { + "name": "spender", + "description": null, + "ty": "Key" + }, + { + "name": "token_id", + "description": null, + "ty": "U256" + } + ] + } + }, + { + "struct": { + "name": "ApprovalForAll", + "description": null, + "members": [ + { + "name": "owner", + "description": null, + "ty": "Key" + }, + { + "name": "operator", + "description": null, + "ty": "Key" + } + ] + } + }, + { + "struct": { + "name": "Burn", + "description": null, + "members": [ + { + "name": "from", + "description": null, + "ty": "Key" + }, + { + "name": "token_id", + "description": null, + "ty": "U256" + } + ] + } + }, + { + "struct": { + "name": "MetadataUpdate", + "description": null, + "members": [ + { + "name": "token_id", + "description": null, + "ty": "U256" + } + ] + } + }, + { + "struct": { + "name": "Mint", + "description": null, + "members": [ + { + "name": "to", + "description": null, + "ty": "Key" + }, + { + "name": "token_id", + "description": null, + "ty": "U256" + } + ] + } + }, + { + "struct": { + "name": "OwnershipTransferStarted", + "description": null, + "members": [ + { + "name": "previous_owner", + "description": null, + "ty": { + "Option": "Key" + } + }, + { + "name": "new_owner", + "description": null, + "ty": { + "Option": "Key" + } + } + ] + } + }, + { + "struct": { + "name": "OwnershipTransferred", + "description": null, + "members": [ + { + "name": "previous_owner", + "description": null, + "ty": { + "Option": "Key" + } + }, + { + "name": "new_owner", + "description": null, + "ty": { + "Option": "Key" + } + } + ] + } + }, + { + "struct": { + "name": "RevokeApproval", + "description": null, + "members": [ + { + "name": "owner", + "description": null, + "ty": "Key" + }, + { + "name": "spender", + "description": null, + "ty": "Key" + }, + { + "name": "token_id", + "description": null, + "ty": "U256" + } + ] + } + }, + { + "struct": { + "name": "RevokeApprovalForAll", + "description": null, + "members": [ + { + "name": "owner", + "description": null, + "ty": "Key" + }, + { + "name": "operator", + "description": null, + "ty": "Key" + } + ] + } + }, + { + "struct": { + "name": "Transfer", + "description": null, + "members": [ + { + "name": "from", + "description": null, + "ty": "Key" + }, + { + "name": "to", + "description": null, + "ty": "Key" + }, + { + "name": "token_id", + "description": null, + "ty": "U256" + } + ] + } + } + ], + "errors": [ + { + "name": "ApprovalToCurrentOwner", + "description": "The approval is set to the current owner.", + "discriminant": 40003 + }, + { + "name": "ApproveToCaller", + "description": "The caller is the same as the operator.", + "discriminant": 40004 + }, + { + "name": "CallerNotTheNewOwner", + "description": "The caller is not the new owner.", + "discriminant": 20002 + }, + { + "name": "CallerNotTheOwner", + "description": "The caller is not the owner.", + "discriminant": 20001 + }, + { + "name": "ExpiredTokenTransfer", + "description": "", + "discriminant": 1303 + }, + { + "name": "InvalidResolver", + "description": "", + "discriminant": 1305 + }, + { + "name": "InvalidTokenId", + "description": "The token ID is invalid.", + "discriminant": 40005 + }, + { + "name": "InvalidTokenIdentifier", + "description": "", + "discriminant": 1304 + }, + { + "name": "InvalidTokenOwner", + "description": "", + "discriminant": 1302 + }, + { + "name": "MissingRole", + "description": "The role is missing.", + "discriminant": 20003 + }, + { + "name": "NotAnOwnerOrApproved", + "description": "The token ID is invalid.", + "discriminant": 40002 + }, + { + "name": "NotWhitelisted", + "description": "", + "discriminant": 1301 + }, + { + "name": "OwnerNotSet", + "description": "The owner is not set.", + "discriminant": 20000 + }, + { + "name": "RoleRenounceForAnotherAddress", + "description": "The role cannot be renounced for another address.", + "discriminant": 20004 + }, + { + "name": "TokenAlreadyExists", + "description": "The token with the given ID already exists.", + "discriminant": 40006 + }, + { + "name": "TokenSupplyDepleted", + "description": "", + "discriminant": 1306 + }, + { + "name": "TransferFailed", + "description": "The transfer failed.", + "discriminant": 40001 + }, + { + "name": "ValueNotSet", + "description": "The value is not set.", + "discriminant": 40000 + }, + { + "name": "WhitelistedAlready", + "description": "", + "discriminant": 1307 + } + ], + "entry_points": [ + { + "name": "token_exists", + "description": "", + "is_mutable": false, + "arguments": [ + { + "name": "token_id", + "description": null, + "ty": "U256", + "optional": false + } + ], + "return_ty": "Bool", + "is_contract_context": true, + "access": "public" + }, + { + "name": "mint", + "description": "", + "is_mutable": true, + "arguments": [ + { + "name": "recipient", + "description": null, + "ty": "Key", + "optional": false + }, + { + "name": "token_id", + "description": null, + "ty": "U256", + "optional": false + }, + { + "name": "token_metadata", + "description": null, + "ty": { + "List": { + "Tuple2": [ + "String", + "String" + ] + } + }, + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "burn", + "description": "", + "is_mutable": true, + "arguments": [ + { + "name": "token_id", + "description": null, + "ty": "U256", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "admin_transfer", + "description": "", + "is_mutable": true, + "arguments": [ + { + "name": "recipient", + "description": null, + "ty": "Key", + "optional": false + }, + { + "name": "token_ids", + "description": null, + "ty": { + "List": "U256" + }, + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "transfer_from", + "description": "", + "is_mutable": true, + "arguments": [ + { + "name": "from", + "description": null, + "ty": "Key", + "optional": false + }, + { + "name": "to", + "description": null, + "ty": "Key", + "optional": false + }, + { + "name": "token_id", + "description": null, + "ty": "U256", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "set_token_metadata", + "description": "", + "is_mutable": true, + "arguments": [ + { + "name": "token_id", + "description": null, + "ty": "U256", + "optional": false + }, + { + "name": "token_metadata", + "description": null, + "ty": { + "List": { + "Tuple2": [ + "String", + "String" + ] + } + }, + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "resolver", + "description": "", + "is_mutable": false, + "arguments": [ + { + "name": "token_id", + "description": null, + "ty": "U256", + "optional": false + } + ], + "return_ty": { + "Option": "Key" + }, + "is_contract_context": true, + "access": "public" + }, + { + "name": "set_resolver", + "description": "", + "is_mutable": true, + "arguments": [ + { + "name": "token_id", + "description": null, + "ty": "U256", + "optional": false + }, + { + "name": "resolver", + "description": null, + "ty": "Key", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "assert_is_owner", + "description": "", + "is_mutable": false, + "arguments": [ + { + "name": "token_id", + "description": null, + "ty": "U256", + "optional": false + }, + { + "name": "address", + "description": null, + "ty": "Key", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "is_token_valid", + "description": "", + "is_mutable": false, + "arguments": [ + { + "name": "token_id", + "description": null, + "ty": "U256", + "optional": false + } + ], + "return_ty": "Bool", + "is_contract_context": true, + "access": "public" + }, + { + "name": "set_default_resolver", + "description": "Only admin. Set the default resolver.", + "is_mutable": true, + "arguments": [ + { + "name": "resolver", + "description": null, + "ty": "Key", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "get_default_resolver", + "description": "Get the default resolver.", + "is_mutable": false, + "arguments": [], + "return_ty": "Key", + "is_contract_context": true, + "access": "public" + }, + { + "name": "whitelist", + "description": "", + "is_mutable": true, + "arguments": [ + { + "name": "address", + "description": null, + "ty": "Key", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "revoke_whitelist", + "description": "", + "is_mutable": true, + "arguments": [ + { + "name": "address", + "description": null, + "ty": "Key", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "name", + "description": "Delegated. See `self.token.name()` for details.", + "is_mutable": false, + "arguments": [], + "return_ty": "String", + "is_contract_context": true, + "access": "public" + }, + { + "name": "symbol", + "description": "Delegated. See `self.token.symbol()` for details.", + "is_mutable": false, + "arguments": [], + "return_ty": "String", + "is_contract_context": true, + "access": "public" + }, + { + "name": "balance_of", + "description": "Delegated. See `self.token.balance_of()` for details.", + "is_mutable": false, + "arguments": [ + { + "name": "owner", + "description": null, + "ty": "Key", + "optional": false + } + ], + "return_ty": "U256", + "is_contract_context": true, + "access": "public" + }, + { + "name": "owner_of", + "description": "Delegated. See `self.token.owner_of()` for details.", + "is_mutable": false, + "arguments": [ + { + "name": "token_id", + "description": null, + "ty": "U256", + "optional": false + } + ], + "return_ty": { + "Option": "Key" + }, + "is_contract_context": true, + "access": "public" + }, + { + "name": "safe_transfer_from", + "description": "Delegated. See `self.token.safe_transfer_from()` for details.", + "is_mutable": true, + "arguments": [ + { + "name": "from", + "description": null, + "ty": "Key", + "optional": false + }, + { + "name": "to", + "description": null, + "ty": "Key", + "optional": false + }, + { + "name": "token_id", + "description": null, + "ty": "U256", + "optional": false + }, + { + "name": "data", + "description": null, + "ty": { + "Option": { + "List": "U8" + } + }, + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "approve", + "description": "Delegated. See `self.token.approve()` for details.", + "is_mutable": true, + "arguments": [ + { + "name": "spender", + "description": null, + "ty": "Key", + "optional": false + }, + { + "name": "token_id", + "description": null, + "ty": "U256", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "revoke_approval", + "description": "Delegated. See `self.token.revoke_approval()` for details.", + "is_mutable": true, + "arguments": [ + { + "name": "token_id", + "description": null, + "ty": "U256", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "approved_for", + "description": "Delegated. See `self.token.approved_for()` for details.", + "is_mutable": false, + "arguments": [ + { + "name": "token_id", + "description": null, + "ty": "U256", + "optional": false + } + ], + "return_ty": { + "Option": "Key" + }, + "is_contract_context": true, + "access": "public" + }, + { + "name": "approve_for_all", + "description": "Delegated. See `self.token.approve_for_all()` for details.", + "is_mutable": true, + "arguments": [ + { + "name": "operator", + "description": null, + "ty": "Key", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "revoke_approval_for_all", + "description": "Delegated. See `self.token.revoke_approval_for_all()` for details.", + "is_mutable": true, + "arguments": [ + { + "name": "operator", + "description": null, + "ty": "Key", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "is_approved_for_all", + "description": "Delegated. See `self.token.is_approved_for_all()` for details.", + "is_mutable": false, + "arguments": [ + { + "name": "owner", + "description": null, + "ty": "Key", + "optional": false + }, + { + "name": "operator", + "description": null, + "ty": "Key", + "optional": false + } + ], + "return_ty": "Bool", + "is_contract_context": true, + "access": "public" + }, + { + "name": "token_metadata", + "description": "Delegated. See `self.token.token_metadata()` for details.", + "is_mutable": false, + "arguments": [ + { + "name": "token_id", + "description": null, + "ty": "U256", + "optional": false + } + ], + "return_ty": { + "List": { + "Tuple2": [ + "String", + "String" + ] + } + }, + "is_contract_context": true, + "access": "public" + }, + { + "name": "get_owner", + "description": "Delegated. See `self.ownable.get_owner()` for details.", + "is_mutable": false, + "arguments": [], + "return_ty": "Key", + "is_contract_context": true, + "access": "public" + }, + { + "name": "get_pending_owner", + "description": "Delegated. See `self.ownable.get_pending_owner()` for details.", + "is_mutable": false, + "arguments": [], + "return_ty": { + "Option": "Key" + }, + "is_contract_context": true, + "access": "public" + }, + { + "name": "transfer_ownership", + "description": "Delegated. See `self.ownable.transfer_ownership()` for details.", + "is_mutable": true, + "arguments": [ + { + "name": "new_owner", + "description": null, + "ty": "Key", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "accept_ownership", + "description": "Delegated. See `self.ownable.accept_ownership()` for details.", + "is_mutable": true, + "arguments": [], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "renounce_ownership", + "description": "Delegated. See `self.ownable.renounce_ownership()` for details.", + "is_mutable": true, + "arguments": [], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + } + ], + "events": [ + { + "name": "Approval", + "ty": "Approval" + }, + { + "name": "ApprovalForAll", + "ty": "ApprovalForAll" + }, + { + "name": "Burn", + "ty": "Burn" + }, + { + "name": "MetadataUpdate", + "ty": "MetadataUpdate" + }, + { + "name": "Mint", + "ty": "Mint" + }, + { + "name": "OwnershipTransferStarted", + "ty": "OwnershipTransferStarted" + }, + { + "name": "OwnershipTransferred", + "ty": "OwnershipTransferred" + }, + { + "name": "RevokeApproval", + "ty": "RevokeApproval" + }, + { + "name": "RevokeApprovalForAll", + "ty": "RevokeApprovalForAll" + }, + { + "name": "Transfer", + "ty": "Transfer" + } + ], + "call": { + "wasm_file_name": "NameToken.wasm", + "description": "Initializes CEP95 with the given name and symbol.", + "arguments": [ + { + "name": "odra_cfg_package_hash_key_name", + "description": "The arg name for the package hash key name.", + "ty": "String", + "optional": false + }, + { + "name": "odra_cfg_allow_key_override", + "description": "If true and the key specified in odra_cfg_package_hash_key_name already exists, it will be overwritten.", + "ty": "Bool", + "optional": false + }, + { + "name": "odra_cfg_is_upgradable", + "description": "The arg name for the contract upgradeability setting.", + "ty": "Bool", + "optional": false + }, + { + "name": "name", + "description": null, + "ty": "String", + "optional": false + }, + { + "name": "symbol", + "description": null, + "ty": "String", + "optional": false + }, + { + "name": "max_supply", + "description": null, + "ty": "U64", + "optional": false + } + ] + } +} \ No newline at end of file diff --git a/resources/casper_contract_schemas/registrar_schema.json b/resources/casper_contract_schemas/registrar_schema.json new file mode 100644 index 0000000..719620e --- /dev/null +++ b/resources/casper_contract_schemas/registrar_schema.json @@ -0,0 +1,668 @@ +{ + "casper_contract_schema_version": 1, + "toolchain": "rustc 1.85.0-nightly (d117b7f21 2024-12-31)", + "authors": [], + "repository": null, + "homepage": null, + "contract_name": "Registrar", + "contract_version": "0.1.0", + "types": [ + { + "struct": { + "name": "GracePeriodChanged", + "description": null, + "members": [ + { + "name": "new_grace_period", + "description": null, + "ty": "U64" + } + ] + } + }, + { + "struct": { + "name": "NameMintInfo", + "description": null, + "members": [ + { + "name": "label", + "description": null, + "ty": "String" + }, + { + "name": "owner", + "description": null, + "ty": "Key" + }, + { + "name": "token_expiration", + "description": null, + "ty": "U64" + }, + { + "name": "asset_uri", + "description": null, + "ty": "String" + } + ] + } + }, + { + "struct": { + "name": "Paused", + "description": null, + "members": [ + { + "name": "account", + "description": null, + "ty": "Key" + } + ] + } + }, + { + "struct": { + "name": "RenewalVoucher", + "description": null, + "members": [ + { + "name": "tokens", + "description": null, + "ty": { + "List": "TokenRenewalInfo" + } + }, + { + "name": "voucher_expiration", + "description": null, + "ty": "U64" + } + ] + } + }, + { + "struct": { + "name": "RoleAdminChanged", + "description": null, + "members": [ + { + "name": "role", + "description": null, + "ty": { + "ByteArray": 32 + } + }, + { + "name": "previous_admin_role", + "description": null, + "ty": { + "ByteArray": 32 + } + }, + { + "name": "new_admin_role", + "description": null, + "ty": { + "ByteArray": 32 + } + } + ] + } + }, + { + "struct": { + "name": "RoleGranted", + "description": null, + "members": [ + { + "name": "role", + "description": null, + "ty": { + "ByteArray": 32 + } + }, + { + "name": "address", + "description": null, + "ty": "Key" + }, + { + "name": "sender", + "description": null, + "ty": "Key" + } + ] + } + }, + { + "struct": { + "name": "RoleRevoked", + "description": null, + "members": [ + { + "name": "role", + "description": null, + "ty": { + "ByteArray": 32 + } + }, + { + "name": "address", + "description": null, + "ty": "Key" + }, + { + "name": "sender", + "description": null, + "ty": "Key" + } + ] + } + }, + { + "struct": { + "name": "TokenRenewalInfo", + "description": null, + "members": [ + { + "name": "token_id", + "description": null, + "ty": "U256" + }, + { + "name": "token_expiration", + "description": null, + "ty": "U64" + } + ] + } + }, + { + "struct": { + "name": "TokenizationVoucher", + "description": null, + "members": [ + { + "name": "names", + "description": null, + "ty": { + "List": "NameMintInfo" + } + }, + { + "name": "voucher_expiration", + "description": null, + "ty": "U64" + } + ] + } + }, + { + "struct": { + "name": "Unpaused", + "description": null, + "members": [ + { + "name": "account", + "description": null, + "ty": "Key" + } + ] + } + } + ], + "errors": [ + { + "name": "CallerNotTheNewOwner", + "description": "The caller is not the new owner.", + "discriminant": 20002 + }, + { + "name": "CallerNotTheOwner", + "description": "The caller is not the owner.", + "discriminant": 20001 + }, + { + "name": "ExpirationDateInThePast", + "description": "", + "discriminant": 1201 + }, + { + "name": "GracePeriodExpired", + "description": "", + "discriminant": 1203 + }, + { + "name": "GracePeriodTooLong", + "description": "", + "discriminant": 1206 + }, + { + "name": "MissingRole", + "description": "The role is missing.", + "discriminant": 20003 + }, + { + "name": "NameTokenIsNotValid", + "description": "", + "discriminant": 1207 + }, + { + "name": "OwnerNotSet", + "description": "The owner is not set.", + "discriminant": 20000 + }, + { + "name": "PausedRequired", + "description": "Contract needs to be paused first.", + "discriminant": 21000 + }, + { + "name": "RoleRenounceForAnotherAddress", + "description": "The role cannot be renounced for another address.", + "discriminant": 20004 + }, + { + "name": "TokenDoesNotExist", + "description": "", + "discriminant": 1205 + }, + { + "name": "TokenNameIsNotValid", + "description": "", + "discriminant": 1208 + }, + { + "name": "TokenNotExpired", + "description": "", + "discriminant": 1202 + }, + { + "name": "UnpausedRequired", + "description": "Contract needs to be unpaused first.", + "discriminant": 21001 + }, + { + "name": "VoucherExpired", + "description": "", + "discriminant": 1204 + } + ], + "entry_points": [ + { + "name": "pause", + "description": "Temporarily stops the contract.", + "is_mutable": true, + "arguments": [], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "unpause", + "description": "Returns to normal operation.", + "is_mutable": true, + "arguments": [], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "grace_period", + "description": "Returns the grace period.", + "is_mutable": false, + "arguments": [], + "return_ty": "U64", + "is_contract_context": true, + "access": "public" + }, + { + "name": "resolve", + "description": "Try to resolve a full domain name to an address.", + "is_mutable": false, + "arguments": [ + { + "name": "full_domain", + "description": null, + "ty": "String", + "optional": false + } + ], + "return_ty": { + "Option": "Key" + }, + "is_contract_context": true, + "access": "public" + }, + { + "name": "expire", + "description": "Expire a list of tokens if they are expired.", + "is_mutable": true, + "arguments": [ + { + "name": "token_ids", + "description": null, + "ty": { + "List": "U256" + }, + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "set_grace_period", + "description": "Admin only. Sets the grace period.", + "is_mutable": true, + "arguments": [ + { + "name": "period", + "description": null, + "ty": "U64", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "admin_transfer", + "description": "Admin only. Transfer ownership of a list of tokens.", + "is_mutable": true, + "arguments": [ + { + "name": "new_owner", + "description": null, + "ty": "Key", + "optional": false + }, + { + "name": "token_ids", + "description": null, + "ty": { + "List": "U256" + }, + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "admin_burn", + "description": "Admin only. Burn a list of tokens.", + "is_mutable": true, + "arguments": [ + { + "name": "token_ids", + "description": null, + "ty": { + "List": "U256" + }, + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "admin_prolong", + "description": "Admin only. Prolong the expiration date of a list of tokens.", + "is_mutable": true, + "arguments": [ + { + "name": "tokens", + "description": null, + "ty": { + "List": "TokenRenewalInfo" + }, + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "admin_register", + "description": "Admin only. Register a list of tokens.", + "is_mutable": true, + "arguments": [ + { + "name": "names", + "description": null, + "ty": { + "List": "NameMintInfo" + }, + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "admin_prolong_and_register", + "description": "Admin only. Prolong the expiration date of a list of tokens and register a list of tokens.", + "is_mutable": true, + "arguments": [ + { + "name": "renewal_tokens", + "description": null, + "ty": { + "List": "TokenRenewalInfo" + }, + "optional": false + }, + { + "name": "new_tokens", + "description": null, + "ty": { + "List": "NameMintInfo" + }, + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "controller_prolong", + "description": "Controller only. Prolong the expiration date of a list of tokens.", + "is_mutable": true, + "arguments": [ + { + "name": "voucher", + "description": null, + "ty": "RenewalVoucher", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "controller_register", + "description": "Controller only. Register a list of tokens.", + "is_mutable": true, + "arguments": [ + { + "name": "voucher", + "description": null, + "ty": "TokenizationVoucher", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "controller_prolong_and_register", + "description": "Controller only. Prolong the expiration date of a list of tokens and register a list of tokens.", + "is_mutable": true, + "arguments": [ + { + "name": "renewal_voucher", + "description": null, + "ty": "RenewalVoucher", + "optional": false + }, + { + "name": "tokenization_voucher", + "description": null, + "ty": "TokenizationVoucher", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "has_role", + "description": "Delegated. See `self.access_control.has_role()` for details.", + "is_mutable": false, + "arguments": [ + { + "name": "role", + "description": null, + "ty": { + "ByteArray": 32 + }, + "optional": false + }, + { + "name": "address", + "description": null, + "ty": "Key", + "optional": false + } + ], + "return_ty": "Bool", + "is_contract_context": true, + "access": "public" + }, + { + "name": "grant_role", + "description": "Delegated. See `self.access_control.grant_role()` for details.", + "is_mutable": true, + "arguments": [ + { + "name": "role", + "description": null, + "ty": { + "ByteArray": 32 + }, + "optional": false + }, + { + "name": "address", + "description": null, + "ty": "Key", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "revoke_role", + "description": "Delegated. See `self.access_control.revoke_role()` for details.", + "is_mutable": true, + "arguments": [ + { + "name": "role", + "description": null, + "ty": { + "ByteArray": 32 + }, + "optional": false + }, + { + "name": "address", + "description": null, + "ty": "Key", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "is_paused", + "description": "Delegated. See `self.pauseable.is_paused()` for details.", + "is_mutable": false, + "arguments": [], + "return_ty": "Bool", + "is_contract_context": true, + "access": "public" + } + ], + "events": [ + { + "name": "GracePeriodChanged", + "ty": "GracePeriodChanged" + }, + { + "name": "Paused", + "ty": "Paused" + }, + { + "name": "RoleAdminChanged", + "ty": "RoleAdminChanged" + }, + { + "name": "RoleGranted", + "ty": "RoleGranted" + }, + { + "name": "RoleRevoked", + "ty": "RoleRevoked" + }, + { + "name": "Unpaused", + "ty": "Unpaused" + } + ], + "call": { + "wasm_file_name": "Registrar.wasm", + "description": "Initializes the registrar with the name token contract address.", + "arguments": [ + { + "name": "odra_cfg_package_hash_key_name", + "description": "The arg name for the package hash key name.", + "ty": "String", + "optional": false + }, + { + "name": "odra_cfg_allow_key_override", + "description": "If true and the key specified in odra_cfg_package_hash_key_name already exists, it will be overwritten.", + "ty": "Bool", + "optional": false + }, + { + "name": "odra_cfg_is_upgradable", + "description": "The arg name for the contract upgradeability setting.", + "ty": "Bool", + "optional": false + }, + { + "name": "name_token", + "description": null, + "ty": "Key", + "optional": false + } + ] + } +} \ No newline at end of file diff --git a/resources/casper_contract_schemas/reverse_resolver_schema.json b/resources/casper_contract_schemas/reverse_resolver_schema.json new file mode 100644 index 0000000..64be3cd --- /dev/null +++ b/resources/casper_contract_schemas/reverse_resolver_schema.json @@ -0,0 +1,127 @@ +{ + "casper_contract_schema_version": 1, + "toolchain": "rustc 1.85.0-nightly (d117b7f21 2024-12-31)", + "authors": [], + "repository": null, + "homepage": null, + "contract_name": "ReverseResolver", + "contract_version": "0.1.0", + "types": [ + { + "struct": { + "name": "PrimaryNameChanged", + "description": null, + "members": [ + { + "name": "address", + "description": null, + "ty": "Key" + }, + { + "name": "old_primary_name", + "description": null, + "ty": { + "Option": "String" + } + }, + { + "name": "new_primary_name", + "description": null, + "ty": { + "Option": "String" + } + } + ] + } + } + ], + "errors": [ + { + "name": "InvalidResolutionAddress", + "description": "", + "discriminant": 1502 + }, + { + "name": "InvalidTokenName", + "description": "", + "discriminant": 1500 + }, + { + "name": "ResolutionForPrimaryNameNotFound", + "description": "", + "discriminant": 1501 + } + ], + "entry_points": [ + { + "name": "set_primary_name", + "description": "Sets the primary preferred reverse resolution address for the caller.", + "is_mutable": true, + "arguments": [ + { + "name": "primary_name", + "description": null, + "ty": "String", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "get_primary_name", + "description": "Returns the primary name for the address.", + "is_mutable": false, + "arguments": [ + { + "name": "address", + "description": null, + "ty": "Key", + "optional": false + } + ], + "return_ty": { + "Option": "String" + }, + "is_contract_context": true, + "access": "public" + } + ], + "events": [ + { + "name": "PrimaryNameChanged", + "ty": "PrimaryNameChanged" + } + ], + "call": { + "wasm_file_name": "ReverseResolver.wasm", + "description": "", + "arguments": [ + { + "name": "odra_cfg_package_hash_key_name", + "description": "The arg name for the package hash key name.", + "ty": "String", + "optional": false + }, + { + "name": "odra_cfg_allow_key_override", + "description": "If true and the key specified in odra_cfg_package_hash_key_name already exists, it will be overwritten.", + "ty": "Bool", + "optional": false + }, + { + "name": "odra_cfg_is_upgradable", + "description": "The arg name for the contract upgradeability setting.", + "ty": "Bool", + "optional": false + }, + { + "name": "name_token", + "description": null, + "ty": "Key", + "optional": false + } + ] + } +} \ No newline at end of file diff --git a/resources/casper_contract_schemas/secondary_market_schema.json b/resources/casper_contract_schemas/secondary_market_schema.json new file mode 100644 index 0000000..10dd236 --- /dev/null +++ b/resources/casper_contract_schemas/secondary_market_schema.json @@ -0,0 +1,545 @@ +{ + "casper_contract_schema_version": 1, + "toolchain": "rustc 1.85.0-nightly (d117b7f21 2024-12-31)", + "authors": [], + "repository": null, + "homepage": null, + "contract_name": "SecondaryMarket", + "contract_version": "0.1.0", + "types": [ + { + "struct": { + "name": "NameTransferInfo", + "description": null, + "members": [ + { + "name": "label", + "description": null, + "ty": "String" + }, + { + "name": "owner", + "description": null, + "ty": "Key" + } + ] + } + }, + { + "struct": { + "name": "Paused", + "description": null, + "members": [ + { + "name": "account", + "description": null, + "ty": "Key" + } + ] + } + }, + { + "struct": { + "name": "PaymentFulfilled", + "description": null, + "members": [ + { + "name": "payment_id", + "description": null, + "ty": "String" + }, + { + "name": "buyer", + "description": null, + "ty": "Key" + }, + { + "name": "amount", + "description": null, + "ty": "U512" + } + ] + } + }, + { + "struct": { + "name": "PaymentInfo", + "description": null, + "members": [ + { + "name": "buyer", + "description": null, + "ty": "Key" + }, + { + "name": "payment_id", + "description": null, + "ty": "String" + }, + { + "name": "amount", + "description": null, + "ty": "U512" + } + ] + } + }, + { + "struct": { + "name": "RoleAdminChanged", + "description": null, + "members": [ + { + "name": "role", + "description": null, + "ty": { + "ByteArray": 32 + } + }, + { + "name": "previous_admin_role", + "description": null, + "ty": { + "ByteArray": 32 + } + }, + { + "name": "new_admin_role", + "description": null, + "ty": { + "ByteArray": 32 + } + } + ] + } + }, + { + "struct": { + "name": "RoleGranted", + "description": null, + "members": [ + { + "name": "role", + "description": null, + "ty": { + "ByteArray": 32 + } + }, + { + "name": "address", + "description": null, + "ty": "Key" + }, + { + "name": "sender", + "description": null, + "ty": "Key" + } + ] + } + }, + { + "struct": { + "name": "RoleRevoked", + "description": null, + "members": [ + { + "name": "role", + "description": null, + "ty": { + "ByteArray": 32 + } + }, + { + "name": "address", + "description": null, + "ty": "Key" + }, + { + "name": "sender", + "description": null, + "ty": "Key" + } + ] + } + }, + { + "struct": { + "name": "SecondarySaleVoucher", + "description": null, + "members": [ + { + "name": "payment", + "description": null, + "ty": "PaymentInfo" + }, + { + "name": "names", + "description": null, + "ty": { + "List": "NameTransferInfo" + } + }, + { + "name": "voucher_expiration", + "description": null, + "ty": "U64" + } + ] + } + }, + { + "struct": { + "name": "SignerPublicKeyChanged", + "description": null, + "members": [ + { + "name": "new_signer_public_key", + "description": null, + "ty": "PublicKey" + } + ] + } + }, + { + "struct": { + "name": "TreasuryAddressChanged", + "description": null, + "members": [ + { + "name": "new_treasury_address", + "description": null, + "ty": "Key" + } + ] + } + }, + { + "struct": { + "name": "Unpaused", + "description": null, + "members": [ + { + "name": "account", + "description": null, + "ty": "Key" + } + ] + } + } + ], + "errors": [ + { + "name": "BuyerMustBeCaller", + "description": "", + "discriminant": 1104 + }, + { + "name": "CallerNotTheNewOwner", + "description": "The caller is not the new owner.", + "discriminant": 20002 + }, + { + "name": "CallerNotTheOwner", + "description": "The caller is not the owner.", + "discriminant": 20001 + }, + { + "name": "ContractAddressExpected", + "description": "", + "discriminant": 1107 + }, + { + "name": "FeeCollectorNotSet", + "description": "", + "discriminant": 1102 + }, + { + "name": "InsufficientPayment", + "description": "", + "discriminant": 1105 + }, + { + "name": "InvalidSignature", + "description": "", + "discriminant": 1101 + }, + { + "name": "MissingRole", + "description": "The role is missing.", + "discriminant": 20003 + }, + { + "name": "OwnerNotSet", + "description": "The owner is not set.", + "discriminant": 20000 + }, + { + "name": "PausedRequired", + "description": "Contract needs to be paused first.", + "discriminant": 21000 + }, + { + "name": "PaymentTooLarge", + "description": "", + "discriminant": 1106 + }, + { + "name": "RegistrarNotSet", + "description": "", + "discriminant": 1103 + }, + { + "name": "RoleRenounceForAnotherAddress", + "description": "The role cannot be renounced for another address.", + "discriminant": 20004 + }, + { + "name": "UnpausedRequired", + "description": "Contract needs to be unpaused first.", + "discriminant": 21001 + } + ], + "entry_points": [ + { + "name": "buy", + "description": "Payable. Buys name tokens from the secondary market.", + "is_mutable": true, + "arguments": [ + { + "name": "voucher", + "description": null, + "ty": "SecondarySaleVoucher", + "optional": false + }, + { + "name": "signature", + "description": null, + "ty": { + "List": "U8" + }, + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "has_role", + "description": "Delegated. See `self.controller.has_role()` for details.", + "is_mutable": false, + "arguments": [ + { + "name": "role", + "description": null, + "ty": { + "ByteArray": 32 + }, + "optional": false + }, + { + "name": "address", + "description": null, + "ty": "Key", + "optional": false + } + ], + "return_ty": "Bool", + "is_contract_context": true, + "access": "public" + }, + { + "name": "grant_role", + "description": "Delegated. See `self.controller.grant_role()` for details.", + "is_mutable": true, + "arguments": [ + { + "name": "role", + "description": null, + "ty": { + "ByteArray": 32 + }, + "optional": false + }, + { + "name": "address", + "description": null, + "ty": "Key", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "revoke_role", + "description": "Delegated. See `self.controller.revoke_role()` for details.", + "is_mutable": true, + "arguments": [ + { + "name": "role", + "description": null, + "ty": { + "ByteArray": 32 + }, + "optional": false + }, + { + "name": "address", + "description": null, + "ty": "Key", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "set_signer_public_key", + "description": "Delegated. See `self.controller.set_signer_public_key()` for details.", + "is_mutable": true, + "arguments": [ + { + "name": "signer", + "description": null, + "ty": "PublicKey", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "set_treasury", + "description": "Delegated. See `self.controller.set_treasury()` for details.", + "is_mutable": true, + "arguments": [ + { + "name": "treasury", + "description": null, + "ty": "Key", + "optional": false + } + ], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "signer_public_key", + "description": "Delegated. See `self.controller.signer_public_key()` for details.", + "is_mutable": false, + "arguments": [], + "return_ty": "PublicKey", + "is_contract_context": true, + "access": "public" + }, + { + "name": "pause", + "description": "Delegated. See `self.controller.pause()` for details.", + "is_mutable": true, + "arguments": [], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "unpause", + "description": "Delegated. See `self.controller.unpause()` for details.", + "is_mutable": true, + "arguments": [], + "return_ty": "Unit", + "is_contract_context": true, + "access": "public" + }, + { + "name": "is_paused", + "description": "Delegated. See `self.controller.is_paused()` for details.", + "is_mutable": false, + "arguments": [], + "return_ty": "Bool", + "is_contract_context": true, + "access": "public" + } + ], + "events": [ + { + "name": "Paused", + "ty": "Paused" + }, + { + "name": "PaymentFulfilled", + "ty": "PaymentFulfilled" + }, + { + "name": "RoleAdminChanged", + "ty": "RoleAdminChanged" + }, + { + "name": "RoleGranted", + "ty": "RoleGranted" + }, + { + "name": "RoleRevoked", + "ty": "RoleRevoked" + }, + { + "name": "SignerPublicKeyChanged", + "ty": "SignerPublicKeyChanged" + }, + { + "name": "TreasuryAddressChanged", + "ty": "TreasuryAddressChanged" + }, + { + "name": "Unpaused", + "ty": "Unpaused" + } + ], + "call": { + "wasm_file_name": "SecondaryMarket.wasm", + "description": "Initializes the secondary market with the signer public key, the treasury", + "arguments": [ + { + "name": "odra_cfg_package_hash_key_name", + "description": "The arg name for the package hash key name.", + "ty": "String", + "optional": false + }, + { + "name": "odra_cfg_allow_key_override", + "description": "If true and the key specified in odra_cfg_package_hash_key_name already exists, it will be overwritten.", + "ty": "Bool", + "optional": false + }, + { + "name": "odra_cfg_is_upgradable", + "description": "The arg name for the contract upgradeability setting.", + "ty": "Bool", + "optional": false + }, + { + "name": "signer", + "description": null, + "ty": "PublicKey", + "optional": false + }, + { + "name": "treasury", + "description": null, + "ty": "Key", + "optional": false + }, + { + "name": "name_token", + "description": null, + "ty": "Key", + "optional": false + } + ] + } +} \ No newline at end of file diff --git a/resources/contracts.toml b/resources/contracts.toml new file mode 100644 index 0000000..6652ee9 --- /dev/null +++ b/resources/contracts.toml @@ -0,0 +1,25 @@ +time = "2025-06-27T17:58:16Z" + +[[contracts]] +name = "NameToken" +package_hash = "hash-96a231a77e02052b227e6935c28ecd6ee976bad203d772b5b9920f1124bab91f" + +[[contracts]] +name = "DefaultResolver" +package_hash = "hash-4667be06e3da9d43b52ce9caf1bf44a44910c297c64d51dc71b5d30edc0afd73" + +[[contracts]] +name = "Registrar" +package_hash = "hash-2585656c35ae8337a86f5e9e4c26ca6a9c56a13f84522c458c9a54d35e48149c" + +[[contracts]] +name = "Controller" +package_hash = "hash-9c12c0eafd3315c17e6b23ee25e1f62f2c55c50b5dbd7835d359e281123c4b9f" + +[[contracts]] +name = "SecondaryMarket" +package_hash = "hash-bf93814cd184f66c914dc6506f1b8188f7e35330307f51012588f033fae0a747" + +[[contracts]] +name = "ReverseResolver" +package_hash = "hash-d7c924514b8650d1bed85ad97c6715c3424b4c710e91f46b9d3e0cef464cea13" diff --git a/resources/legacy/controller_schema.json b/resources/legacy/controller_schema.json new file mode 100644 index 0000000..eb1edff --- /dev/null +++ b/resources/legacy/controller_schema.json @@ -0,0 +1,453 @@ +{ + "name": "Controller", + "events": [ + { + "name": "PaymentFulfilled", + "args": [ + { + "name": "payment_id", + "ty": "String", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "buyer", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "amount", + "ty": "U512", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "SignerPublicKeyChanged", + "args": [ + { + "name": "new_signer_public_key", + "ty": "PublicKey", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "TreasuryAddressChanged", + "args": [ + { + "name": "new_treasury_address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "RoleAdminChanged", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "previous_admin_role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "new_admin_role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "RoleGranted", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "sender", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "RoleRevoked", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "sender", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "Paused", + "args": [ + { + "name": "account", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "Unpaused", + "args": [ + { + "name": "account", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + } + ], + "entrypoints": [ + { + "name": "init", + "args": [ + { + "name": "registrar", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "signer", + "ty": "PublicKey", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "treasury", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Constructor", + "attributes": [] + }, + { + "name": "buy", + "args": [ + { + "name": "voucher", + "ty": "Any", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "signature", + "ty": { + "List": "U8" + }, + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [ + "Payable" + ] + }, + { + "name": "renew", + "args": [ + { + "name": "voucher", + "ty": "Any", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "signature", + "ty": { + "List": "U8" + }, + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [ + "Payable" + ] + }, + { + "name": "buy_and_renew", + "args": [ + { + "name": "payment_voucher", + "ty": "Any", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "payment_signature", + "ty": { + "List": "U8" + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "renewal_voucher", + "ty": "Any", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "renewal_signature", + "ty": { + "List": "U8" + }, + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [ + "Payable" + ] + }, + { + "name": "resolve", + "args": [ + { + "name": "full_domain", + "ty": "String", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": false, + "return_ty": { + "Option": "Key" + }, + "ty": "Public", + "attributes": [] + }, + { + "name": "has_role", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": false, + "return_ty": "Bool", + "ty": "Public", + "attributes": [] + }, + { + "name": "grant_role", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "revoke_role", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "set_signer_public_key", + "args": [ + { + "name": "signer", + "ty": "PublicKey", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "set_treasury", + "args": [ + { + "name": "treasury", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "signer_public_key", + "args": [], + "is_mutable": false, + "return_ty": "PublicKey", + "ty": "Public", + "attributes": [] + }, + { + "name": "pause", + "args": [], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "unpause", + "args": [], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "is_paused", + "args": [], + "is_mutable": false, + "return_ty": "Bool", + "ty": "Public", + "attributes": [] + } + ] +} \ No newline at end of file diff --git a/resources/legacy/default_resolver_schema.json b/resources/legacy/default_resolver_schema.json new file mode 100644 index 0000000..73f3977 --- /dev/null +++ b/resources/legacy/default_resolver_schema.json @@ -0,0 +1,306 @@ +{ + "name": "DefaultResolver", + "events": [ + { + "name": "ResolutionChanged", + "args": [ + { + "name": "full_domain", + "ty": "String", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "address", + "ty": { + "Option": "Key" + }, + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "ResolutionCleared", + "args": [ + { + "name": "token_id", + "ty": "U256", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "NameTokenAddressChanged", + "args": [ + { + "name": "new_name_token", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "RoleAdminChanged", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "previous_admin_role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "new_admin_role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "RoleGranted", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "sender", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "RoleRevoked", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "sender", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + } + ], + "entrypoints": [ + { + "name": "init", + "args": [ + { + "name": "name_token", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Constructor", + "attributes": [] + }, + { + "name": "set_name_token", + "args": [ + { + "name": "name_token", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "set_resolution", + "args": [ + { + "name": "full_domain", + "ty": "String", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "address", + "ty": { + "Option": "Key" + }, + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "resolve", + "args": [ + { + "name": "full_domain", + "ty": "String", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": false, + "return_ty": { + "Option": "Key" + }, + "ty": "Public", + "attributes": [] + }, + { + "name": "invalidate_resolutions", + "args": [ + { + "name": "token_id", + "ty": "U256", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "has_role", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": false, + "return_ty": "Bool", + "ty": "Public", + "attributes": [] + }, + { + "name": "grant_role", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "revoke_role", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + } + ] +} \ No newline at end of file diff --git a/resources/legacy/register_schema.json b/resources/legacy/name_token_schema.json similarity index 59% rename from resources/legacy/register_schema.json rename to resources/legacy/name_token_schema.json index 04d4703..f7b22ac 100644 --- a/resources/legacy/register_schema.json +++ b/resources/legacy/name_token_schema.json @@ -1,32 +1,26 @@ { - "name": "Register", + "name": "NameToken", "events": [ { - "name": "RoleAdminChanged", + "name": "Transfer", "args": [ { - "name": "role", - "ty": { - "ByteArray": 32 - }, + "name": "from", + "ty": "Key", "is_ref": false, "is_slice": false, "is_required": true }, { - "name": "previous_admin_role", - "ty": { - "ByteArray": 32 - }, + "name": "to", + "ty": "Key", "is_ref": false, "is_slice": false, "is_required": true }, { - "name": "new_admin_role", - "ty": { - "ByteArray": 32 - }, + "name": "token_id", + "ty": "U256", "is_ref": false, "is_slice": false, "is_required": true @@ -34,27 +28,25 @@ ] }, { - "name": "RoleGranted", + "name": "Approval", "args": [ { - "name": "role", - "ty": { - "ByteArray": 32 - }, + "name": "owner", + "ty": "Key", "is_ref": false, "is_slice": false, "is_required": true }, { - "name": "address", + "name": "spender", "ty": "Key", "is_ref": false, "is_slice": false, "is_required": true }, { - "name": "sender", - "ty": "Key", + "name": "token_id", + "ty": "U256", "is_ref": false, "is_slice": false, "is_required": true @@ -62,27 +54,25 @@ ] }, { - "name": "RoleRevoked", + "name": "RevokeApproval", "args": [ { - "name": "role", - "ty": { - "ByteArray": 32 - }, + "name": "owner", + "ty": "Key", "is_ref": false, "is_slice": false, "is_required": true }, { - "name": "address", + "name": "spender", "ty": "Key", "is_ref": false, "is_slice": false, "is_required": true }, { - "name": "sender", - "ty": "Key", + "name": "token_id", + "ty": "U256", "is_ref": false, "is_slice": false, "is_required": true @@ -90,7 +80,7 @@ ] }, { - "name": "Approval", + "name": "ApprovalForAll", "args": [ { "name": "owner", @@ -100,23 +90,16 @@ "is_required": true }, { - "name": "spender", + "name": "operator", "ty": "Key", "is_ref": false, "is_slice": false, "is_required": true - }, - { - "name": "token_id", - "ty": "String", - "is_ref": false, - "is_slice": false, - "is_required": true } ] }, { - "name": "ApprovalForAll", + "name": "RevokeApprovalForAll", "args": [ { "name": "owner", @@ -135,10 +118,10 @@ ] }, { - "name": "ApprovalRevoked", + "name": "Mint", "args": [ { - "name": "owner", + "name": "to", "ty": "Key", "is_ref": false, "is_slice": false, @@ -146,7 +129,7 @@ }, { "name": "token_id", - "ty": "String", + "ty": "U256", "is_ref": false, "is_slice": false, "is_required": true @@ -157,7 +140,7 @@ "name": "Burn", "args": [ { - "name": "owner", + "name": "from", "ty": "Key", "is_ref": false, "is_slice": false, @@ -165,14 +148,19 @@ }, { "name": "token_id", - "ty": "String", + "ty": "U256", "is_ref": false, "is_slice": false, "is_required": true - }, + } + ] + }, + { + "name": "MetadataUpdate", + "args": [ { - "name": "burner", - "ty": "Key", + "name": "token_id", + "ty": "U256", "is_ref": false, "is_slice": false, "is_required": true @@ -180,18 +168,22 @@ ] }, { - "name": "MetadataUpdated", + "name": "OwnershipTransferStarted", "args": [ { - "name": "token_id", - "ty": "String", + "name": "previous_owner", + "ty": { + "Option": "Key" + }, "is_ref": false, "is_slice": false, "is_required": true }, { - "name": "data", - "ty": "String", + "name": "new_owner", + "ty": { + "Option": "Key" + }, "is_ref": false, "is_slice": false, "is_required": true @@ -199,71 +191,166 @@ ] }, { - "name": "Mint", + "name": "OwnershipTransferred", "args": [ { - "name": "recipient", - "ty": "Key", + "name": "previous_owner", + "ty": { + "Option": "Key" + }, "is_ref": false, "is_slice": false, "is_required": true }, { - "name": "token_id", + "name": "new_owner", + "ty": { + "Option": "Key" + }, + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + } + ], + "entrypoints": [ + { + "name": "init", + "args": [ + { + "name": "name", "ty": "String", "is_ref": false, "is_slice": false, "is_required": true }, { - "name": "data", + "name": "symbol", "ty": "String", "is_ref": false, "is_slice": false, "is_required": true + }, + { + "name": "max_supply", + "ty": "U64", + "is_ref": false, + "is_slice": false, + "is_required": true } - ] + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Constructor", + "attributes": [] }, { - "name": "RevokedForAll", + "name": "token_exists", "args": [ { - "name": "owner", + "name": "token_id", + "ty": "U256", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": false, + "return_ty": "Bool", + "ty": "Public", + "attributes": [] + }, + { + "name": "mint", + "args": [ + { + "name": "recipient", "ty": "Key", "is_ref": false, "is_slice": false, "is_required": true }, { - "name": "operator", - "ty": "Key", + "name": "token_id", + "ty": "U256", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "token_metadata", + "ty": { + "List": { + "Tuple2": [ + "String", + "String" + ] + } + }, "is_ref": false, "is_slice": false, "is_required": true } - ] + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] }, { - "name": "Transfer", + "name": "burn", "args": [ { - "name": "owner", + "name": "token_id", + "ty": "U256", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "admin_transfer", + "args": [ + { + "name": "recipient", "ty": "Key", "is_ref": false, "is_slice": false, "is_required": true }, { - "name": "spender", + "name": "token_ids", "ty": { - "Option": "Key" + "List": "U256" }, "is_ref": false, "is_slice": false, "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "transfer_from", + "args": [ + { + "name": "from", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true }, { - "name": "recipient", + "name": "to", "ty": "Key", "is_ref": false, "is_slice": false, @@ -271,32 +358,37 @@ }, { "name": "token_id", - "ty": "String", + "ty": "U256", "is_ref": false, "is_slice": false, "is_required": true } - ] + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] }, { - "name": "VariablesSet", - "args": [] - } - ], - "entrypoints": [ - { - "name": "init", + "name": "set_token_metadata", "args": [ { - "name": "name", - "ty": "String", + "name": "token_id", + "ty": "U256", "is_ref": false, "is_slice": false, "is_required": true }, { - "name": "symbol", - "ty": "String", + "name": "token_metadata", + "ty": { + "List": { + "Tuple2": [ + "String", + "String" + ] + } + }, "is_ref": false, "is_slice": false, "is_required": true @@ -304,29 +396,40 @@ ], "is_mutable": true, "return_ty": "Unit", - "ty": "Constructor", + "ty": "Public", "attributes": [] }, { - "name": "mint", + "name": "resolver", "args": [ { - "name": "to", - "ty": "Key", + "name": "token_id", + "ty": "U256", "is_ref": false, "is_slice": false, "is_required": true - }, + } + ], + "is_mutable": false, + "return_ty": { + "Option": "Key" + }, + "ty": "Public", + "attributes": [] + }, + { + "name": "set_resolver", + "args": [ { - "name": "label", - "ty": "String", + "name": "token_id", + "ty": "U256", "is_ref": false, "is_slice": false, "is_required": true }, { - "name": "expiration", - "ty": "U64", + "name": "resolver", + "ty": "Key", "is_ref": false, "is_slice": false, "is_required": true @@ -338,34 +441,50 @@ "attributes": [] }, { - "name": "renew", + "name": "assert_is_owner", "args": [ { - "name": "token_hash", - "ty": "String", + "name": "token_id", + "ty": "U256", "is_ref": false, "is_slice": false, "is_required": true }, { - "name": "expiration", - "ty": "U64", + "name": "address", + "ty": "Key", "is_ref": false, "is_slice": false, "is_required": true } ], - "is_mutable": true, + "is_mutable": false, "return_ty": "Unit", "ty": "Public", "attributes": [] }, { - "name": "admin_burn", + "name": "is_token_valid", "args": [ { - "name": "token_hash", - "ty": "String", + "name": "token_id", + "ty": "U256", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": false, + "return_ty": "Bool", + "ty": "Public", + "attributes": [] + }, + { + "name": "set_default_resolver", + "args": [ + { + "name": "resolver", + "ty": "Key", "is_ref": false, "is_slice": false, "is_required": true @@ -377,23 +496,47 @@ "attributes": [] }, { - "name": "burn", + "name": "get_default_resolver", "args": [], "is_mutable": false, + "return_ty": "Key", + "ty": "Public", + "attributes": [] + }, + { + "name": "whitelist", + "args": [ + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, "return_ty": "Unit", "ty": "Public", "attributes": [] }, { - "name": "set_token_metadata", - "args": [], + "name": "revoke_whitelist", + "args": [ + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], "is_mutable": true, "return_ty": "Unit", "ty": "Public", "attributes": [] }, { - "name": "get_collection_name", + "name": "name", "args": [], "is_mutable": false, "return_ty": "String", @@ -401,7 +544,7 @@ "attributes": [] }, { - "name": "get_collection_symbol", + "name": "symbol", "args": [], "is_mutable": false, "return_ty": "String", @@ -409,44 +552,77 @@ "attributes": [] }, { - "name": "transfer", + "name": "balance_of", + "args": [ + { + "name": "owner", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": false, + "return_ty": "U256", + "ty": "Public", + "attributes": [] + }, + { + "name": "owner_of", "args": [ { "name": "token_id", - "ty": "U64", + "ty": "U256", "is_ref": false, "is_slice": false, - "is_required": false - }, + "is_required": true + } + ], + "is_mutable": false, + "return_ty": { + "Option": "Key" + }, + "ty": "Public", + "attributes": [] + }, + { + "name": "safe_transfer_from", + "args": [ { - "name": "token_hash", - "ty": "String", + "name": "from", + "ty": "Key", "is_ref": false, "is_slice": false, - "is_required": false + "is_required": true }, { - "name": "source_key", + "name": "to", "ty": "Key", "is_ref": false, "is_slice": false, "is_required": true }, { - "name": "target_key", - "ty": "Key", + "name": "token_id", + "ty": "U256", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "data", + "ty": { + "Option": { + "List": "U8" + } + }, "is_ref": false, "is_slice": false, "is_required": true } ], "is_mutable": true, - "return_ty": { - "Tuple2": [ - "String", - "Key" - ] - }, + "return_ty": "Unit", "ty": "Public", "attributes": [] }, @@ -462,17 +638,26 @@ }, { "name": "token_id", - "ty": "U64", + "ty": "U256", "is_ref": false, "is_slice": false, - "is_required": false - }, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "revoke_approval", + "args": [ { - "name": "token_hash", - "ty": "String", + "name": "token_id", + "ty": "U256", "is_ref": false, "is_slice": false, - "is_required": false + "is_required": true } ], "is_mutable": true, @@ -481,15 +666,26 @@ "attributes": [] }, { - "name": "set_approval_for_all", + "name": "approved_for", "args": [ { - "name": "approve_all", - "ty": "Bool", + "name": "token_id", + "ty": "U256", "is_ref": false, "is_slice": false, "is_required": true - }, + } + ], + "is_mutable": false, + "return_ty": { + "Option": "Key" + }, + "ty": "Public", + "attributes": [] + }, + { + "name": "approve_for_all", + "args": [ { "name": "operator", "ty": "Key", @@ -504,10 +700,10 @@ "attributes": [] }, { - "name": "balance_of", + "name": "revoke_approval_for_all", "args": [ { - "name": "token_owner", + "name": "operator", "ty": "Key", "is_ref": false, "is_slice": false, @@ -515,52 +711,68 @@ } ], "is_mutable": true, - "return_ty": "U64", + "return_ty": "Unit", "ty": "Public", "attributes": [] }, { - "name": "owner_of", + "name": "is_approved_for_all", "args": [ { - "name": "token_id", - "ty": "U64", + "name": "owner", + "ty": "Key", "is_ref": false, "is_slice": false, - "is_required": false + "is_required": true }, { - "name": "token_hash", - "ty": "String", + "name": "operator", + "ty": "Key", "is_ref": false, "is_slice": false, - "is_required": false + "is_required": true } ], "is_mutable": false, - "return_ty": "Key", + "return_ty": "Bool", "ty": "Public", "attributes": [] }, { - "name": "get_approved", + "name": "token_metadata", "args": [ { "name": "token_id", - "ty": "U64", + "ty": "U256", "is_ref": false, "is_slice": false, - "is_required": false - }, - { - "name": "token_hash", - "ty": "String", - "is_ref": false, - "is_slice": false, - "is_required": false + "is_required": true } ], - "is_mutable": true, + "is_mutable": false, + "return_ty": { + "List": { + "Tuple2": [ + "String", + "String" + ] + } + }, + "ty": "Public", + "attributes": [] + }, + { + "name": "get_owner", + "args": [], + "is_mutable": false, + "return_ty": "Key", + "ty": "Public", + "attributes": [] + }, + { + "name": "get_pending_owner", + "args": [], + "is_mutable": false, "return_ty": { "Option": "Key" }, @@ -568,19 +780,10 @@ "attributes": [] }, { - "name": "grant_role", + "name": "transfer_ownership", "args": [ { - "name": "role", - "ty": { - "ByteArray": 32 - }, - "is_ref": false, - "is_slice": false, - "is_required": true - }, - { - "name": "address", + "name": "new_owner", "ty": "Key", "is_ref": false, "is_slice": false, @@ -591,6 +794,22 @@ "return_ty": "Unit", "ty": "Public", "attributes": [] + }, + { + "name": "accept_ownership", + "args": [], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "renounce_ownership", + "args": [], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] } ] } \ No newline at end of file diff --git a/resources/legacy/registrar_schema.json b/resources/legacy/registrar_schema.json new file mode 100644 index 0000000..5652f52 --- /dev/null +++ b/resources/legacy/registrar_schema.json @@ -0,0 +1,467 @@ +{ + "name": "Registrar", + "events": [ + { + "name": "GracePeriodChanged", + "args": [ + { + "name": "new_grace_period", + "ty": "U64", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "RoleAdminChanged", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "previous_admin_role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "new_admin_role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "RoleGranted", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "sender", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "RoleRevoked", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "sender", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "Paused", + "args": [ + { + "name": "account", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "Unpaused", + "args": [ + { + "name": "account", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + } + ], + "entrypoints": [ + { + "name": "init", + "args": [ + { + "name": "name_token", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Constructor", + "attributes": [] + }, + { + "name": "pause", + "args": [], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "unpause", + "args": [], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "grace_period", + "args": [], + "is_mutable": false, + "return_ty": "U64", + "ty": "Public", + "attributes": [] + }, + { + "name": "resolve", + "args": [ + { + "name": "full_domain", + "ty": "String", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": false, + "return_ty": { + "Option": "Key" + }, + "ty": "Public", + "attributes": [] + }, + { + "name": "expire", + "args": [ + { + "name": "token_ids", + "ty": { + "List": "U256" + }, + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "set_grace_period", + "args": [ + { + "name": "period", + "ty": "U64", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "admin_transfer", + "args": [ + { + "name": "new_owner", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "token_ids", + "ty": { + "List": "U256" + }, + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "admin_burn", + "args": [ + { + "name": "token_ids", + "ty": { + "List": "U256" + }, + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "admin_prolong", + "args": [ + { + "name": "tokens", + "ty": { + "List": "Any" + }, + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "admin_register", + "args": [ + { + "name": "names", + "ty": { + "List": "Any" + }, + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "admin_prolong_and_register", + "args": [ + { + "name": "renewal_tokens", + "ty": { + "List": "Any" + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "new_tokens", + "ty": { + "List": "Any" + }, + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "controller_prolong", + "args": [ + { + "name": "voucher", + "ty": "Any", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "controller_register", + "args": [ + { + "name": "voucher", + "ty": "Any", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "controller_prolong_and_register", + "args": [ + { + "name": "renewal_voucher", + "ty": "Any", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "tokenization_voucher", + "ty": "Any", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "has_role", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": false, + "return_ty": "Bool", + "ty": "Public", + "attributes": [] + }, + { + "name": "grant_role", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "revoke_role", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "is_paused", + "args": [], + "is_mutable": false, + "return_ty": "Bool", + "ty": "Public", + "attributes": [] + } + ] +} \ No newline at end of file diff --git a/resources/legacy/reverse_resolver_schema.json b/resources/legacy/reverse_resolver_schema.json new file mode 100644 index 0000000..885f95f --- /dev/null +++ b/resources/legacy/reverse_resolver_schema.json @@ -0,0 +1,87 @@ +{ + "name": "ReverseResolver", + "events": [ + { + "name": "PrimaryNameChanged", + "args": [ + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "old_primary_name", + "ty": { + "Option": "String" + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "new_primary_name", + "ty": { + "Option": "String" + }, + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + } + ], + "entrypoints": [ + { + "name": "init", + "args": [ + { + "name": "name_token", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Constructor", + "attributes": [] + }, + { + "name": "set_primary_name", + "args": [ + { + "name": "primary_name", + "ty": "String", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "get_primary_name", + "args": [ + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": false, + "return_ty": { + "Option": "String" + }, + "ty": "Public", + "attributes": [] + } + ] +} \ No newline at end of file diff --git a/resources/legacy/secondary_market_schema.json b/resources/legacy/secondary_market_schema.json new file mode 100644 index 0000000..48f5854 --- /dev/null +++ b/resources/legacy/secondary_market_schema.json @@ -0,0 +1,365 @@ +{ + "name": "SecondaryMarket", + "events": [ + { + "name": "PaymentFulfilled", + "args": [ + { + "name": "payment_id", + "ty": "String", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "buyer", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "amount", + "ty": "U512", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "SignerPublicKeyChanged", + "args": [ + { + "name": "new_signer_public_key", + "ty": "PublicKey", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "TreasuryAddressChanged", + "args": [ + { + "name": "new_treasury_address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "RoleAdminChanged", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "previous_admin_role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "new_admin_role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "RoleGranted", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "sender", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "RoleRevoked", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "sender", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "Paused", + "args": [ + { + "name": "account", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + }, + { + "name": "Unpaused", + "args": [ + { + "name": "account", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ] + } + ], + "entrypoints": [ + { + "name": "init", + "args": [ + { + "name": "signer", + "ty": "PublicKey", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "treasury", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "name_token", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Constructor", + "attributes": [] + }, + { + "name": "buy", + "args": [ + { + "name": "voucher", + "ty": "Any", + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "signature", + "ty": { + "List": "U8" + }, + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [ + "Payable" + ] + }, + { + "name": "has_role", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": false, + "return_ty": "Bool", + "ty": "Public", + "attributes": [] + }, + { + "name": "grant_role", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "revoke_role", + "args": [ + { + "name": "role", + "ty": { + "ByteArray": 32 + }, + "is_ref": false, + "is_slice": false, + "is_required": true + }, + { + "name": "address", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "set_signer_public_key", + "args": [ + { + "name": "signer", + "ty": "PublicKey", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "set_treasury", + "args": [ + { + "name": "treasury", + "ty": "Key", + "is_ref": false, + "is_slice": false, + "is_required": true + } + ], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "signer_public_key", + "args": [], + "is_mutable": false, + "return_ty": "PublicKey", + "ty": "Public", + "attributes": [] + }, + { + "name": "pause", + "args": [], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "unpause", + "args": [], + "is_mutable": true, + "return_ty": "Unit", + "ty": "Public", + "attributes": [] + }, + { + "name": "is_paused", + "args": [], + "is_mutable": false, + "return_ty": "Bool", + "ty": "Public", + "attributes": [] + } + ] +} \ No newline at end of file diff --git a/rust-toolchain b/rust-toolchain index c15a151..09a243d 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2024-01-26 +nightly-2025-01-01 diff --git a/src/register.rs b/src/register.rs deleted file mode 100644 index 568063b..0000000 --- a/src/register.rs +++ /dev/null @@ -1,278 +0,0 @@ -use odra::args::Maybe; -use odra::prelude::*; -use odra::{Address, SubModule, UnwrapOrRevert}; -use odra_modules::cep78::modalities::{ - BurnMode, EventsMode, MetadataMutability, MintingMode, NFTHolderMode, NFTIdentifierMode, - NFTKind, NFTMetadataKind, OwnershipMode, WhitelistMode, -}; -use odra_modules::{ - access::{AccessControl, Role, DEFAULT_ADMIN_ROLE}, - cep78::token::Cep78, -}; -use serde::{Deserialize, Serialize}; - -type TokenHash = odra::prelude::String; - -// TODO: Match roles from the Solidity code. -pub const MINTER_ROLE: Role = [1; 32]; -pub const OPERATOR_ROLE: Role = [2; 32]; - -#[odra::odra_error] -#[derive(Debug)] -pub enum RegisterError { - EmptyTLD = 1001, - TLDNotSupported = 1002, - PastExpirationDate = 1003, - EmptyLabel = 1004, - SLDDoesNotExist = 1005, - SerializationError = 1006, - DeserializationError = 1007, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)] -pub struct SLDMetadata { - pub label: String, - pub expiration: u64, -} - -impl SLDMetadata { - pub fn new(label: String, expiration: u64) -> Self { - Self { - label, - expiration, - } - } - - pub fn to_json(&self) -> Result { - serde_json_wasm::to_string(self).map_err(|_| RegisterError::SerializationError) - } - - pub fn from_json(json: &str) -> Result { - serde_json_wasm::from_str(json).map_err(|_| RegisterError::DeserializationError) - } -} - -#[odra::odra_type] -pub struct NameMintInfo { - label: String, - expiration_time: u64, - owner: Address -} - -impl NameMintInfo { - pub fn new(label: &str, expiration_time: u64, owner: Address) -> Self { - Self { - label: String::from(label), - expiration_time, - owner - } - } -} - -#[odra::module] -pub struct Register { - access_control: SubModule, - token: SubModule, -} - -#[odra::module] -impl Register { - pub fn init(&mut self, name: String, symbol: String) { - let caller = self.env().caller(); - - // Setup access control. - self.access_control - .unchecked_grant_role(&DEFAULT_ADMIN_ROLE, &caller); - self.access_control - .set_admin_role(&MINTER_ROLE, &DEFAULT_ADMIN_ROLE); - self.access_control - .set_admin_role(&OPERATOR_ROLE, &DEFAULT_ADMIN_ROLE); - - // Setup CEP78 token. - let max_total_supply = 1_000_000u64; - let ownership_mode = OwnershipMode::Transferable; - let nft_kind = NFTKind::Digital; - let identifier_mode = NFTIdentifierMode::Hash; - let nft_metadata_kind = NFTMetadataKind::Raw; - let metadata_mutability = MetadataMutability::Mutable; - let receipt_name = String::new(); - let allow_minting = Maybe::Some(true); - let minting_mode = Maybe::Some(MintingMode::Public); - let holder_mode = Maybe::Some(NFTHolderMode::Mixed); - let whitelist_mode = Maybe::Some(WhitelistMode::Unlocked); - let acl_white_list = Maybe::None; - let json_schema = Maybe::None; - let burn_mode = Maybe::Some(BurnMode::Burnable); - let operator_burn_mode = Maybe::None; // ? - let owner_reverse_lookup_mode = Maybe::None; // ? - let events_mode = Maybe::Some(EventsMode::CES); - let transfer_filter_contract_contract = Maybe::None; // ? - let additional_required_metadata = Maybe::None; // ? - let optional_metadata = Maybe::Some(vec![]); // ? - self.token.init( - name, - symbol, - max_total_supply, - ownership_mode, - nft_kind, - identifier_mode, - nft_metadata_kind, - metadata_mutability, - receipt_name, - allow_minting, - minting_mode, - holder_mode, - whitelist_mode, - acl_white_list, - json_schema, - burn_mode, - operator_burn_mode, - owner_reverse_lookup_mode, - events_mode, - transfer_filter_contract_contract, - additional_required_metadata, - optional_metadata, - ); - } - - // TODO: merge check and get. - pub fn mint(&mut self, to: Address, label: String, expiration: u64) { - self.assert_minter_role(); - self.require_future_expiration_date(expiration); - - if label.is_empty() { - self.env().revert(RegisterError::EmptyLabel); - } - - let token_hash = self.compute_namehash(&label); - - if self.token_exists(&token_hash) && self.is_token_expired(&token_hash) { - self.burn_single(token_hash.clone(), self.env().caller()); - } - - self.mint_single(to, label, &token_hash, expiration); - } - - pub fn bulk_mint(&mut self, names: Vec) { - self.assert_minter_role(); - for name in names { - self.mint(name.owner, name.label, name.expiration_time); - } - } - - pub fn renew(&mut self, token_hash: TokenHash, expiration: u64) { - self.assert_minter_role(); - self.require_future_expiration_date(expiration); - self.require_token_minted(&token_hash); - self.set_expiration(&token_hash, expiration); - } - - pub fn admin_burn(&mut self, token_hash: TokenHash) { - self.assert_operator_role(); - self.burn_single(token_hash, self.env().caller()); - } - - delegate! { - to self.token { - fn get_collection_name(&self) -> String; - fn get_collection_symbol(&self) -> String; - fn transfer( - &mut self, - token_id: Maybe, - token_hash: Maybe, - source_key: Address, - target_key: Address - ) -> (String, Address); - fn approve(&mut self, spender: Address, token_id: Maybe, token_hash: Maybe); - fn set_approval_for_all(&mut self, approve_all: bool, operator: Address); - fn balance_of(&mut self, token_owner: Address) -> u64; - fn owner_of(&self, token_id: Maybe, token_hash: Maybe) -> Address; - fn get_approved( - &mut self, - token_id: Maybe, - token_hash: Maybe - ) -> Option
; - fn metadata(&self, token_id: Maybe, token_hash: Maybe) -> String; - } - - to self.access_control { - fn grant_role(&mut self, role: &Role, address: &Address); - // TODO: Decide on role management public functions. - } - } - - pub fn burn(&self) {} - pub fn set_token_metadata(&mut self) {} - - // TODO: Read metadata. - // pub fn metadata(&self) {} -} - -impl Register { - // TODO: Make sure this implementation is sufficient. - fn compute_namehash(&self, label: &str) -> TokenHash { - let hash = self.env().hash(label); - hex::encode(hash) - } - - fn require_future_expiration_date(&self, expiration: u64) { - if expiration < self.env().get_block_time() { - self.env().revert(RegisterError::PastExpirationDate); - } - } - - fn require_token_minted(&self, token_hash: &TokenHash) { - if !self.token_exists(token_hash) { - self.env().revert(RegisterError::SLDDoesNotExist); - } - } - - fn token_exists(&self, token_hash: &TokenHash) -> bool { - self.token.token_exists_by_hash(token_hash) - } - - fn is_token_expired(&self, token_hash: &TokenHash) -> bool { - self.expiration(token_hash) < self.env().get_block_time() - } - - fn burn_single(&mut self, token_hash: TokenHash, burner: Address) { - self.token.burn_token_unchecked(token_hash, burner); - } - - fn mint_single(&mut self, to: Address, label: String, token_hash: &TokenHash, expiration: u64) { - let metadata = SLDMetadata::new(label, expiration); - let metadata = metadata.to_json().unwrap_or_revert(&self.env()); - let token_hash = Maybe::Some(token_hash.clone()); - self.token.mint(to, metadata, token_hash); - } - - fn assert_minter_role(&self) { - self.access_control - .check_role(&MINTER_ROLE, &self.env().caller()); - } - - fn assert_operator_role(&self) { - self.access_control - .check_role(&OPERATOR_ROLE, &self.env().caller()); - } - - fn expiration(&self, token_hash: &TokenHash) -> u64 { - let metadata = self.get_metadata(token_hash); - metadata.expiration - } - - fn set_expiration(&mut self, token_hash: &TokenHash, expiration: u64) { - let mut metadata = self.get_metadata(token_hash); - metadata.expiration = expiration; - let metadata = metadata.to_json().unwrap_or_revert(&self.env()); - self.token - .set_token_metadata_unchecked(token_hash, metadata); - } - - fn get_metadata(&self, token_hash: &TokenHash) -> SLDMetadata { - let metadata = self - .token - .metadata(Maybe::None, Maybe::Some(String::from(token_hash))); - SLDMetadata::from_json(&metadata).unwrap_or_revert(&self.env()) - } -} diff --git a/src/register_tests.rs b/src/register_tests.rs deleted file mode 100644 index 208218c..0000000 --- a/src/register_tests.rs +++ /dev/null @@ -1,299 +0,0 @@ -use blake2::{digest::VariableOutput, Blake2bVar}; -use crate::register::{RegisterHostRef, RegisterInitArgs, SLDMetadata, MINTER_ROLE, OPERATOR_ROLE}; -use odra::{args::Maybe, host::{Deployer, HostEnv, HostRef}, Address}; -use odra_modules::cep78::events::{Burn, MetadataUpdated, Mint}; -use odra_modules::access::errors::Error as AccessControlError; -use std::io::Write; - -const NFT_NAME: &'static str = "D3 Tokens"; -const NFT_SYMBOL: &'static str = "D3"; -const TEST_LABEL: &'static str = "test-label"; -const TEST_LABEL_BLAKE2B: &'static str = - "44b7dfe6596e4668313215e4f12ee9650d911a59087944b077d5c087212b89b1"; -const BASE_URI: &'static str = "https://storage.test/"; -const ONE_DAY: u64 = 60 * 60 * 24 * 100; - -struct RegisterTestContext { - pub register: RegisterHostRef, - pub env: HostEnv, - pub owner: Address, - pub operator: Address, - pub minter: Address, - pub user: Address, -} - -impl RegisterTestContext { - fn new() -> Self { - let env = odra_test::env(); - let owner = env.get_account(0); - let operator = env.get_account(1); - let minter = env.get_account(2); - let user = env.get_account(3); - let register = RegisterHostRef::deploy( - &env, - RegisterInitArgs { - name: String::from(NFT_NAME), - symbol: String::from(NFT_SYMBOL), - }, - ); - Self { - register, - env, - owner, - operator, - minter, - user, - } - } - - pub fn add_minter_role(&mut self) { - self.register.grant_role(&MINTER_ROLE, &self.minter); - } - - pub fn add_operator_role(&mut self) { - self.register.grant_role(&OPERATOR_ROLE, &self.operator); - } - - pub fn mint_token(&mut self) -> (String, u64) { - self.add_minter_role(); - self.env.set_caller(self.minter); - let token_id = blake2b(TEST_LABEL); - let expiration_time = self.get_token_expiration(); - - self.register - .mint(self.user, String::from(TEST_LABEL), expiration_time); - // self.env.advance_block_time(1); - (token_id, expiration_time) - } - - pub fn assert_token_minted(&self, token_id: &str, expiration_time: u64, label: &str) { - self.env.emitted_event(self.register.address(), &Mint::new( - self.user, - String::from(token_id), - SLDMetadata::new(String::from(label), expiration_time).to_json().unwrap(), - )); - - // Token URI - // TODO: Test non existing tokens. - - // Make sure token owner is correct - let owner = self.register.owner_of(Maybe::None, Maybe::Some(String::from(token_id))); - assert_eq!(owner, self.user); - - // Verify correct expiration date is set - let metadata = self.register.metadata(Maybe::None, Maybe::Some(String::from(token_id))); - let metadata = SLDMetadata::from_json(&metadata).unwrap(); - assert_eq!(metadata.expiration, expiration_time); - assert_eq!(metadata.label, label); - } - - pub fn get_token_expiration(&self) -> u64 { - let now = self.env.block_time(); - now + ONE_DAY - } - -} - -fn blake2b>(data: T) -> String { - let mut result = [0u8; 32]; - let mut hasher = ::new(32).expect("should create hasher"); - let _ = hasher.write(data.as_ref()); - hasher - .finalize_variable(&mut result) - .expect("should copy hash to the result array"); - hex::encode(result) -} - -mod initialize { - - use odra_modules::access::{events::{RoleAdminChanged, RoleGranted}, DEFAULT_ADMIN_ROLE}; - - use super::*; - - #[test] - fn should_set_correct_name_and_symbol() { - let ctx = RegisterTestContext::new(); - assert_eq!(ctx.register.get_collection_name(), NFT_NAME); - assert_eq!(ctx.register.get_collection_symbol(), NFT_SYMBOL); - } - - #[test] - fn should_emit_correct_events() { - let ctx = RegisterTestContext::new(); - - // First event. - ctx.env.emitted_event(ctx.register.address(), &RoleGranted { - role: DEFAULT_ADMIN_ROLE, - address: ctx.owner, - sender: ctx.owner, - }); - - // Second event. - ctx.env.emitted_event(ctx.register.address(), &RoleAdminChanged { - role: MINTER_ROLE, - previous_admin_role: DEFAULT_ADMIN_ROLE, - new_admin_role: DEFAULT_ADMIN_ROLE, - }); - - // Third event. - ctx.env.emitted_event(ctx.register.address(), &RoleAdminChanged { - role: OPERATOR_ROLE, - previous_admin_role: DEFAULT_ADMIN_ROLE, - new_admin_role: DEFAULT_ADMIN_ROLE, - }); - - - assert_eq!(ctx.env.events_count(ctx.register.address()), 3); - } -} - -mod supports_interface { - #[test] - #[ignore] - fn should_support_erc721() {} -} - -mod mint { - use odra_modules::cep78::error::CEP78Error; - - use crate::register::RegisterError; - - use super::*; - - #[test] - fn should_mint_sld_nft() { - let mut ctx = RegisterTestContext::new(); - - let (token_id, expiration_time) = ctx.mint_token(); - ctx.assert_token_minted(&token_id, expiration_time, TEST_LABEL); - } - - #[test] - fn should_fail_when_called_by_a_non_minter() { - let mut ctx = RegisterTestContext::new(); - ctx.env.set_caller(ctx.user); - let result = ctx.register - .try_mint(ctx.user, String::from(TEST_LABEL), ONE_DAY); - assert_eq!(result.unwrap_err(), AccessControlError::MissingRole.into()); - } - - #[test] - #[ignore] - fn should_fail_when_tld_is_not_supported() {} - - #[test] - fn should_fail_when_label_is_empty() { - let mut ctx = RegisterTestContext::new(); - ctx.add_minter_role(); - ctx.env.set_caller(ctx.minter); - let result = ctx.register - .try_mint(ctx.user, String::from(""), ONE_DAY); - assert_eq!(result.unwrap_err(), RegisterError::EmptyLabel.into()); - } - - #[test] - fn should_fail_when_expiration_date_is_in_the_past() { - let mut ctx = RegisterTestContext::new(); - ctx.add_minter_role(); - ctx.env.advance_block_time(1); - ctx.env.set_caller(ctx.minter); - let result = ctx.register - .try_mint(ctx.user, String::from(TEST_LABEL), 0); - assert_eq!(result.unwrap_err(), RegisterError::PastExpirationDate.into()); - } - - #[test] - fn should_fail_when_sld_already_minted() { - let mut ctx = RegisterTestContext::new(); - ctx.mint_token(); - - ctx.env.set_caller(ctx.minter); - let result = ctx.register - .try_mint(ctx.user, String::from(TEST_LABEL), ctx.get_token_expiration()); - - assert_eq!(result.unwrap_err(), CEP78Error::DuplicateIdentifier.into()); - } -} - -mod bulk_mint { - use crate::register::NameMintInfo; - - use super::*; - #[test] - fn should_mint_slds_in_bulk() { - let mut ctx = RegisterTestContext::new(); - ctx.add_minter_role(); - - let first_expiration_time = ctx.get_token_expiration(); - let first_token_id = blake2b(TEST_LABEL); - let first_name = NameMintInfo::new(TEST_LABEL, first_expiration_time, ctx.user); - - let second_expiration_time = ctx.get_token_expiration(); - let second_token_label = "test-label-2"; - let second_token_id = blake2b(second_token_label); - let second_name = NameMintInfo::new(second_token_label, second_expiration_time, ctx.user); - - ctx.env.set_caller(ctx.minter); - ctx.register.bulk_mint(vec![first_name, second_name]); - - ctx.assert_token_minted(&first_token_id, first_expiration_time, TEST_LABEL); - ctx.assert_token_minted(&second_token_id, second_expiration_time, second_token_label); - } -} - -#[test] -fn should_mint_renew_and_burn() { - let mut ctx = RegisterTestContext::new(); - ctx.add_minter_role(); - ctx.add_operator_role(); - let token_id = String::from(TEST_LABEL_BLAKE2B); - - // Test mint. - ctx.env.set_caller(ctx.minter); - ctx.register - .mint(ctx.user, String::from(TEST_LABEL), ONE_DAY); - let event: Mint = ctx.register.get_event(-1).unwrap(); - let metadata = SLDMetadata::new( - String::from(TEST_LABEL), - ONE_DAY, - ); - let expected = Mint::new(ctx.user, token_id.clone(), metadata.to_json().unwrap()); - assert_eq!(event, expected); - - // Test renew. - ctx.register.renew(token_id.clone(), ONE_DAY * 2); - let event: MetadataUpdated = ctx.register.get_event(-1).unwrap(); - let metadata = SLDMetadata::new( - String::from(TEST_LABEL), - ONE_DAY * 2, - ); - let expected = MetadataUpdated::new(token_id.clone(), metadata.to_json().unwrap()); - assert_eq!(event, expected); - - ctx.env.set_caller(ctx.operator); - ctx.register.admin_burn(token_id.clone()); - let event: Burn = ctx.register.get_event(-1).unwrap(); - let expected = Burn::new(ctx.user, token_id, ctx.operator); - assert_eq!(event, expected); -} - -#[test] -#[ignore] -fn test_metadata_serialization() { - let expected = r#"{ - "token_hash": "44b7dfe6596e4668313215e4f12ee9650d911a59087944b077d5c087212b89b1", - "to": "account-hash-88048a339fa20a4a17d746716aec4e1391be2ffdae4c60b1125320a0a07a3755", - "label": "test-label", - "expiration": 86400 - }"#.replace(" ", "").replace("\n", ""); - - let metadata = SLDMetadata::new( - String::from(TEST_LABEL), - ONE_DAY - ); - - assert_eq!(expected, metadata.to_json().unwrap()); - - let deserialized = SLDMetadata::from_json(&expected).unwrap(); - assert_eq!(metadata, deserialized); -}