diff --git a/Cargo.lock b/Cargo.lock index ea1f4dc391..4151d6b2a2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -592,6 +592,15 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "core-foundation" version = "0.9.3" @@ -654,6 +663,16 @@ dependencies = [ "typenum", ] +[[package]] +name = "ctor" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37e366bff8cd32dd8754b0991fb66b279dc48f598c3a18914852a6673deef583" +dependencies = [ + "quote", + "syn 2.0.38", +] + [[package]] name = "ctr" version = "0.9.2" @@ -1704,6 +1723,22 @@ dependencies = [ "zeroize", ] +[[package]] +name = "iota-sdk-nodejs" +version = "0.1.0" +dependencies = [ + "async-trait", + "iota-sdk-bindings-core", + "log", + "napi", + "napi-build", + "napi-derive", + "once_cell", + "serde_json", + "thiserror", + "tokio", +] + [[package]] name = "iota_stronghold" version = "2.0.0" @@ -1977,6 +2012,61 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "napi" +version = "2.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd063c93b900149304e3ba96ce5bf210cd4f81ef5eb80ded0d100df3e85a3ac0" +dependencies = [ + "bitflags 2.4.1", + "ctor", + "napi-derive", + "napi-sys", + "once_cell", + "tokio", +] + +[[package]] +name = "napi-build" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "882a73d9ef23e8dc2ebbffb6a6ae2ef467c0f18ac10711e4cc59c5485d41df0e" + +[[package]] +name = "napi-derive" +version = "2.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da1c6a8fa84d549aa8708fcd062372bf8ec6e849de39016ab921067d21bde367" +dependencies = [ + "cfg-if", + "convert_case", + "napi-derive-backend", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "napi-derive-backend" +version = "1.0.52" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20bbc7c69168d06a848f925ec5f0e0997f98e8c8d4f2cc30157f0da51c009e17" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "napi-sys" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "166b5ef52a3ab5575047a9fe8d4a030cdd0f63c96f071cd6907674453b07bae3" +dependencies = [ + "libloading", +] + [[package]] name = "nibble_vec" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index fafb3f78f8..527f5a4068 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,8 +2,7 @@ resolver = "2" members = [ "bindings/core", - # TODO: issue #1424 - #"bindings/nodejs", + "bindings/nodejs", # TODO: issue #1423 #"bindings/python", # TODO: issue #1425 diff --git a/bindings/core/src/lib.rs b/bindings/core/src/lib.rs index ea1bac6fdd..f4fbfce8bb 100644 --- a/bindings/core/src/lib.rs +++ b/bindings/core/src/lib.rs @@ -17,6 +17,8 @@ use fern_logger::{logger_init, LoggerConfig, LoggerOutputConfigBuilder}; pub use iota_sdk; use iota_sdk::{ client::secret::{SecretManager, SecretManagerDto}, + types::block::address::Bech32Address, + utils::serde::bip44::option_bip44, wallet::{ClientOptions, Wallet}, }; use serde::Deserialize; @@ -27,7 +29,7 @@ pub use self::method_handler::listen_mqtt; pub use self::method_handler::CallMethod; pub use self::{ error::{Error, Result}, - method::{ClientMethod, SecretManagerMethod, UtilsMethod, WalletCommandMethod, WalletMethod}, + method::{ClientMethod, SecretManagerMethod, UtilsMethod, WalletMethod}, method_handler::{call_client_method, call_secret_manager_method, call_utils_method, call_wallet_method}, response::Response, }; @@ -42,21 +44,24 @@ pub fn init_logger(config: String) -> std::result::Result<(), fern_logger::Error #[derivative(Debug)] #[serde(rename_all = "camelCase")] pub struct WalletOptions { - pub storage_path: Option, - pub client_options: Option, + pub address: Option, + pub alias: Option, + #[serde(with = "option_bip44", default)] pub bip_path: Option, + pub client_options: Option, #[derivative(Debug(format_with = "OmittedDebug::omitted_fmt"))] pub secret_manager: Option, + pub storage_path: Option, } impl WalletOptions { - pub fn with_storage_path(mut self, storage_path: impl Into>) -> Self { - self.storage_path = storage_path.into(); + pub fn with_address(mut self, address: impl Into>) -> Self { + self.address = address.into(); self } - pub fn with_client_options(mut self, client_options: impl Into>) -> Self { - self.client_options = client_options.into(); + pub fn with_alias(mut self, alias: impl Into>) -> Self { + self.alias = alias.into(); self } @@ -65,16 +70,28 @@ impl WalletOptions { self } + pub fn with_client_options(mut self, client_options: impl Into>) -> Self { + self.client_options = client_options.into(); + self + } + pub fn with_secret_manager(mut self, secret_manager: impl Into>) -> Self { self.secret_manager = secret_manager.into(); self } + pub fn with_storage_path(mut self, storage_path: impl Into>) -> Self { + self.storage_path = storage_path.into(); + self + } + pub async fn build(self) -> iota_sdk::wallet::Result { log::debug!("wallet options: {self:?}"); let mut builder = Wallet::builder() - .with_client_options(self.client_options) - .with_bip_path(self.bip_path); + .with_address(self.address) + .with_alias(self.alias) + .with_bip_path(self.bip_path) + .with_client_options(self.client_options); #[cfg(feature = "storage")] if let Some(storage_path) = &self.storage_path { diff --git a/bindings/core/src/method/mod.rs b/bindings/core/src/method/mod.rs index 7aaf0baa5a..6e47c80767 100644 --- a/bindings/core/src/method/mod.rs +++ b/bindings/core/src/method/mod.rs @@ -5,9 +5,5 @@ mod client; mod secret_manager; mod utils; mod wallet; -mod wallet_command; -pub use self::{ - client::ClientMethod, secret_manager::SecretManagerMethod, utils::UtilsMethod, wallet::WalletMethod, - wallet_command::WalletCommandMethod, -}; +pub use self::{client::ClientMethod, secret_manager::SecretManagerMethod, utils::UtilsMethod, wallet::WalletMethod}; diff --git a/bindings/core/src/method/secret_manager.rs b/bindings/core/src/method/secret_manager.rs index c538f3aec2..b70c10db53 100644 --- a/bindings/core/src/method/secret_manager.rs +++ b/bindings/core/src/method/secret_manager.rs @@ -36,7 +36,7 @@ pub enum SecretManagerMethod { SignatureUnlock { /// Transaction signing hash transaction_signing_hash: String, - /// Chain to sign the hash with + /// Chain used to sign the hash #[serde(with = "Bip44Def")] chain: Bip44, }, @@ -44,7 +44,7 @@ pub enum SecretManagerMethod { SignEd25519 { /// The message to sign, hex encoded String message: String, - /// Chain to sign the message with + /// Chain used to sign the message #[serde(with = "Bip44Def")] chain: Bip44, }, @@ -52,7 +52,7 @@ pub enum SecretManagerMethod { SignSecp256k1Ecdsa { /// The message to sign, hex encoded String message: String, - /// Chain to sign the message with + /// Chain used to sign the message #[serde(with = "Bip44Def")] chain: Bip44, }, @@ -66,7 +66,7 @@ pub enum SecretManagerMethod { #[serde(rename_all = "camelCase")] SignBlock { unsigned_block: UnsignedBlockDto, - /// Chain to sign the essence hash with + /// Chain used to sign the block #[serde(with = "Bip44Def")] chain: Bip44, }, diff --git a/bindings/core/src/method/wallet.rs b/bindings/core/src/method/wallet.rs index e99dfa1831..f65467ae52 100644 --- a/bindings/core/src/method/wallet.rs +++ b/bindings/core/src/method/wallet.rs @@ -7,15 +7,33 @@ use std::path::PathBuf; use derivative::Derivative; #[cfg(feature = "events")] use iota_sdk::wallet::events::types::{WalletEvent, WalletEventType}; +#[cfg(feature = "participation")] use iota_sdk::{ - client::{node_manager::node::NodeAuth, secret::GenerateAddressOptions}, - types::block::address::Hrp, - wallet::{ClientOptions, SyncOptions}, + client::node_manager::node::Node, + types::api::plugins::participation::types::{ParticipationEventId, ParticipationEventType}, + wallet::types::participation::ParticipationEventRegistrationOptions, +}; +use iota_sdk::{ + client::{ + api::{input_selection::Burn, PreparedTransactionDataDto, SignedTransactionDataDto}, + node_manager::node::NodeAuth, + secret::GenerateAddressOptions, + }, + types::block::{ + address::{Bech32Address, Hrp}, + output::{dto::OutputDto, OutputId, TokenId}, + payload::signed_transaction::TransactionId, + }, + wallet::{ + ClientOptions, ConsolidationParams, CreateAccountParams, CreateNativeTokenParams, FilterOptions, MintNftParams, + OutputParams, OutputsToClaim, SendNativeTokensParams, SendNftParams, SendParams, SyncOptions, + TransactionOptions, + }, + U256, }; use serde::{Deserialize, Serialize}; use url::Url; -use crate::method::WalletCommandMethod; #[cfg(feature = "stronghold")] use crate::OmittedDebug; @@ -25,13 +43,9 @@ use crate::OmittedDebug; #[serde(tag = "name", content = "data", rename_all = "camelCase")] #[non_exhaustive] pub enum WalletMethod { - /// Consume a wallet command method. - /// Returns [`Response`](crate::Response) - #[serde(rename_all = "camelCase")] - CallMethod { - /// The wallet command method to call. - method: WalletCommandMethod, - }, + /// Returns the accounts of the wallet. + /// Expected response: [`OutputsData`](crate::Response::OutputsData) + Accounts, /// Backup storage. Password must be the current one, when Stronghold is used as SecretManager. /// Expected response: [`Ok`](crate::Response::Ok) #[cfg(feature = "stronghold")] @@ -43,28 +57,6 @@ pub enum WalletMethod { #[derivative(Debug(format_with = "OmittedDebug::omitted_fmt"))] password: String, }, - /// Change the Stronghold password to another one and also re-encrypt the values in the loaded snapshot with it. - /// Expected response: [`Ok`](crate::Response::Ok) - #[cfg(feature = "stronghold")] - #[cfg_attr(docsrs, doc(cfg(feature = "stronghold")))] - #[serde(rename_all = "camelCase")] - ChangeStrongholdPassword { - #[derivative(Debug(format_with = "OmittedDebug::omitted_fmt"))] - current_password: String, - #[derivative(Debug(format_with = "OmittedDebug::omitted_fmt"))] - new_password: String, - }, - /// Clears the Stronghold password from memory. - /// Expected response: [`Ok`](crate::Response::Ok) - #[cfg(feature = "stronghold")] - #[cfg_attr(docsrs, doc(cfg(feature = "stronghold")))] - ClearStrongholdPassword, - /// Checks if the Stronghold password is available. - /// Expected response: - /// [`Bool`](crate::Response::Bool) - #[cfg(feature = "stronghold")] - #[cfg_attr(docsrs, doc(cfg(feature = "stronghold")))] - IsStrongholdPasswordAvailable, /// Restore a backup from a Stronghold file /// Replaces client_options, coin_type, secret_manager and wallet. Returns an error if the wallet was already /// created If Stronghold is used as secret_manager, the existing Stronghold file will be overwritten. If a @@ -95,6 +87,332 @@ pub enum WalletMethod { /// Expected response: [`Ok`](crate::Response::Ok) #[serde(rename_all = "camelCase")] SetClientOptions { client_options: Box }, + /// Start background syncing. + /// Expected response: [`Ok`](crate::Response::Ok) + #[serde(rename_all = "camelCase")] + StartBackgroundSync { + /// Sync options + options: Option, + /// Interval in milliseconds + interval_in_milliseconds: Option, + }, + /// Stop background syncing. + /// Expected response: [`Ok`](crate::Response::Ok) + StopBackgroundSync, + // Remove all listeners of this type. Empty vec clears all listeners + /// Expected response: [`Ok`](crate::Response::Ok) + #[cfg(feature = "events")] + #[cfg_attr(docsrs, doc(cfg(feature = "events")))] + #[serde(rename_all = "camelCase")] + ClearListeners { event_types: Vec }, + /// Update the authentication for the provided node. + /// Expected response: [`Ok`](crate::Response::Ok) + UpdateNodeAuth { + /// Node url + url: Url, + /// Authentication options + auth: Option, + }, + /// Get outputs with additional unlock conditions + /// Expected response: [`OutputIds`](crate::Response::OutputIds) + #[serde(rename_all = "camelCase")] + ClaimableOutputs { outputs_to_claim: OutputsToClaim }, + /// Claim outputs. + /// Expected response: [`SentTransaction`](crate::Response::SentTransaction) + #[serde(rename_all = "camelCase")] + ClaimOutputs { output_ids_to_claim: Vec }, + /// Removes a previously registered participation event from local storage. + /// Expected response: [`Ok`](crate::Response::Ok) + #[cfg(feature = "participation")] + #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] + #[serde(rename_all = "camelCase")] + DeregisterParticipationEvent { event_id: ParticipationEventId }, + /// Get the wallet address. + /// Expected response: [`Address`](crate::Response::Address) + GetAddress, + /// Get wallet balance information. + /// Expected response: [`Balance`](crate::Response::Balance) + GetBalance, + /// Get the [`Output`](iota_sdk::types::block::output::Output) that minted a native token by its TokenId + /// Expected response: [`Output`](crate::Response::Output) + #[serde(rename_all = "camelCase")] + GetFoundryOutput { token_id: TokenId }, + /// Get the transaction with inputs of an incoming transaction stored in the wallet + /// List might not be complete, if the node pruned the data already + /// Expected response: [`Transaction`](crate::Response::Transaction) + #[serde(rename_all = "camelCase")] + GetIncomingTransaction { transaction_id: TransactionId }, + /// Get the [`OutputData`](iota_sdk::wallet::types::OutputData) of an output stored in the wallet + /// Expected response: [`OutputData`](crate::Response::OutputData) + #[serde(rename_all = "camelCase")] + GetOutput { output_id: OutputId }, + /// Expected response: [`ParticipationEvent`](crate::Response::ParticipationEvent) + #[cfg(feature = "participation")] + #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] + #[serde(rename_all = "camelCase")] + GetParticipationEvent { event_id: ParticipationEventId }, + /// Expected response: [`ParticipationEventIds`](crate::Response::ParticipationEventIds) + #[cfg(feature = "participation")] + #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] + #[serde(rename_all = "camelCase")] + GetParticipationEventIds { + node: Node, + event_type: Option, + }, + /// Expected response: + /// [`ParticipationEventStatus`](crate::Response::ParticipationEventStatus) + #[cfg(feature = "participation")] + #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] + #[serde(rename_all = "camelCase")] + GetParticipationEventStatus { event_id: ParticipationEventId }, + /// Expected response: [`ParticipationEvents`](crate::Response::ParticipationEvents) + #[cfg(feature = "participation")] + #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] + GetParticipationEvents, + /// Calculates a participation overview for the wallet. If event_ids are provided, only return outputs and tracked + /// participations for them. + /// Expected response: + /// [`ParticipationOverview`](crate::Response::ParticipationOverview) + #[cfg(feature = "participation")] + #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] + #[serde(rename_all = "camelCase")] + GetParticipationOverview { + event_ids: Option>, + }, + /// Get the [`Transaction`](iota_sdk::wallet::types::Transaction) of a transaction stored in the wallet + /// Expected response: [`Transaction`](crate::Response::Transaction) + #[serde(rename_all = "camelCase")] + GetTransaction { transaction_id: TransactionId }, + /// Get the wallet's total voting power (voting or NOT voting). + /// Expected response: [`VotingPower`](crate::Response::VotingPower) + #[cfg(feature = "participation")] + #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] + GetVotingPower, + /// Returns the implicit account creation address of the wallet if it is Ed25519 based. + /// Expected response: [`Bech32Address`](crate::Response::Bech32Address) + ImplicitAccountCreationAddress, + /// Returns the implicit accounts of the wallet. + /// Expected response: [`OutputsData`](crate::Response::OutputsData) + ImplicitAccounts, + /// Returns all incoming transactions of the wallet + /// Expected response: + /// [`Transactions`](crate::Response::Transactions) + IncomingTransactions, + /// Returns all outputs of the wallet + /// Expected response: [`OutputsData`](crate::Response::OutputsData) + #[serde(rename_all = "camelCase")] + Outputs { filter_options: Option }, + /// Returns all pending transactions of the wallet + /// Expected response: [`Transactions`](crate::Response::Transactions) + PendingTransactions, + /// A generic function that can be used to burn native tokens, nfts, foundries and accounts. + /// + /// Note that burning **native tokens** doesn't require the foundry output which minted them, but will not + /// increase the foundries `melted_tokens` field, which makes it impossible to destroy the foundry output. + /// Therefore it's recommended to use melting, if the foundry output is available. + /// + /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) + PrepareBurn { + burn: Burn, + options: Option, + }, + /// Consolidate outputs. + /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) + PrepareConsolidateOutputs { params: ConsolidationParams }, + /// Create an alias output. + /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) + PrepareCreateAccountOutput { + params: Option, + options: Option, + }, + /// Prepare to create a native token. + /// Expected response: + /// [`PreparedCreateNativeTokenTransaction`](crate::Response::PreparedCreateNativeTokenTransaction) + PrepareCreateNativeToken { + params: CreateNativeTokenParams, + options: Option, + }, + /// Reduces a wallet's "voting power" by a given amount. + /// This will stop voting, but the voting data isn't lost and calling `Vote` without parameters will revote. + /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) + #[cfg(feature = "participation")] + #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] + PrepareDecreaseVotingPower { + #[serde(with = "iota_sdk::utils::serde::string")] + amount: u64, + }, + /// Designates a given amount of tokens towards a wallet's "voting power" by creating a + /// special output, which is really a basic one with some metadata. + /// This will stop voting in most cases (if there is a remainder output), but the voting data isn't lost and + /// calling `Vote` without parameters will revote. Expected response: + /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) + #[cfg(feature = "participation")] + #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] + PrepareIncreaseVotingPower { + #[serde(with = "iota_sdk::utils::serde::string")] + amount: u64, + }, + /// Prepare to melt native tokens. This happens with the foundry output which minted them, by increasing it's + /// `melted_tokens` field. + /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) + #[serde(rename_all = "camelCase")] + PrepareMeltNativeToken { + /// Native token id + token_id: TokenId, + /// To be melted amount + melt_amount: U256, + options: Option, + }, + /// Prepare to mint additional native tokens. + /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) + #[serde(rename_all = "camelCase")] + PrepareMintNativeToken { + /// Native token id + token_id: TokenId, + /// To be minted amount + mint_amount: U256, + options: Option, + }, + /// Prepare to mint NFTs. + /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) + PrepareMintNfts { + params: Vec, + options: Option, + }, + /// Prepare an output. + /// Expected response: [`Output`](crate::Response::Output) + #[serde(rename_all = "camelCase")] + PrepareOutput { + params: Box, + transaction_options: Option, + }, + /// Prepare to send base coins. + /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) + PrepareSend { + params: Vec, + options: Option, + }, + /// Prepare to send native tokens. + /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) + PrepareSendNativeTokens { + params: Vec, + options: Option, + }, + /// Prepare to Send nft. + /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) + PrepareSendNft { + params: Vec, + options: Option, + }, + /// Stop participating for an event. + /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) + #[cfg(feature = "participation")] + #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] + #[serde(rename_all = "camelCase")] + PrepareStopParticipating { event_id: ParticipationEventId }, + /// Prepare transaction. + /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) + PrepareTransaction { + outputs: Vec, + options: Option, + }, + /// Vote for a participation event. + /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) + #[cfg(feature = "participation")] + #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] + #[serde(rename_all = "camelCase")] + PrepareVote { + event_id: Option, + answers: Option>, + }, + /// Stores participation information locally and returns the event. + /// + /// This will NOT store the node url and auth inside the client options. + /// Expected response: [`ParticipationEvents`](crate::Response::ParticipationEvents) + #[cfg(feature = "participation")] + #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] + RegisterParticipationEvents { + options: ParticipationEventRegistrationOptions, + }, + /// Reissues a transaction sent from the wallet for a provided transaction id until it's + /// included (referenced by a milestone). Returns the included block id. + /// Expected response: [`BlockId`](crate::Response::BlockId) + #[serde(rename_all = "camelCase")] + ReissueTransactionUntilIncluded { + /// Transaction id + transaction_id: TransactionId, + /// Interval + interval: Option, + /// Maximum attempts + max_attempts: Option, + }, + /// Send base coins. + /// Expected response: [`SentTransaction`](crate::Response::SentTransaction) + Send { + #[serde(with = "iota_sdk::utils::serde::string")] + amount: u64, + address: Bech32Address, + options: Option, + }, + /// Send base coins to multiple addresses, or with additional parameters. + /// Expected response: [`SentTransaction`](crate::Response::SentTransaction) + SendWithParams { + params: Vec, + options: Option, + }, + /// Send outputs in a transaction. + /// Expected response: [`SentTransaction`](crate::Response::SentTransaction) + SendOutputs { + outputs: Vec, + options: Option, + }, + /// Set the alias of the wallet. + /// Expected response: [`Ok`](crate::Response::Ok) + SetAlias { alias: String }, + /// Set the fallback SyncOptions for wallet syncing. + /// If storage is enabled, will persist during restarts. + /// Expected response: [`Ok`](crate::Response::Ok) + SetDefaultSyncOptions { options: SyncOptions }, + /// Validate the transaction, sign it, submit it to a node and store it in the wallet. + /// Expected response: [`SentTransaction`](crate::Response::SentTransaction) + #[serde(rename_all = "camelCase")] + SignAndSubmitTransaction { + prepared_transaction_data: PreparedTransactionDataDto, + }, + /// Sign a prepared transaction. + /// Expected response: [`SignedTransactionData`](crate::Response::SignedTransactionData) + #[serde(rename_all = "camelCase")] + SignTransaction { + prepared_transaction_data: PreparedTransactionDataDto, + }, + /// Validate the transaction, submit it to a node and store it in the wallet. + /// Expected response: [`SentTransaction`](crate::Response::SentTransaction) + #[serde(rename_all = "camelCase")] + SubmitAndStoreTransaction { + signed_transaction_data: SignedTransactionDataDto, + }, + /// Sync the wallet by fetching new information from the nodes. Will also reissue pending transactions + /// if necessary. A custom default can be set using SetDefaultSyncOptions. + /// Expected response: [`Balance`](crate::Response::Balance) + Sync { + /// Sync options + options: Option, + }, + /// Returns all transactions of the wallet + /// Expected response: [`Transactions`](crate::Response::Transactions) + Transactions, + /// Returns all unspent outputs of the wallet + /// Expected response: [`OutputsData`](crate::Response::OutputsData) + #[serde(rename_all = "camelCase")] + UnspentOutputs { filter_options: Option }, + + /// Emits an event for testing if the event system is working + /// Expected response: [`Ok`](crate::Response::Ok) + #[cfg(feature = "events")] + #[cfg_attr(docsrs, doc(cfg(feature = "events")))] + EmitTestEvent { event: WalletEvent }, + + // TODO: reconsider whether to have the following methods on the wallet /// Generate an address without storing it /// Expected response: [`Bech32Address`](crate::Response::Bech32Address) #[serde(rename_all = "camelCase")] @@ -135,35 +453,26 @@ pub enum WalletMethod { #[derivative(Debug(format_with = "OmittedDebug::omitted_fmt"))] mnemonic: String, }, - /// Start background syncing. + /// Change the Stronghold password to another one and also re-encrypt the values in the loaded snapshot with it. /// Expected response: [`Ok`](crate::Response::Ok) + #[cfg(feature = "stronghold")] + #[cfg_attr(docsrs, doc(cfg(feature = "stronghold")))] #[serde(rename_all = "camelCase")] - StartBackgroundSync { - /// Sync options - options: Option, - /// Interval in milliseconds - interval_in_milliseconds: Option, + ChangeStrongholdPassword { + #[derivative(Debug(format_with = "OmittedDebug::omitted_fmt"))] + current_password: String, + #[derivative(Debug(format_with = "OmittedDebug::omitted_fmt"))] + new_password: String, }, - /// Stop background syncing. - /// Expected response: [`Ok`](crate::Response::Ok) - StopBackgroundSync, - /// Emits an event for testing if the event system is working - /// Expected response: [`Ok`](crate::Response::Ok) - #[cfg(feature = "events")] - #[cfg_attr(docsrs, doc(cfg(feature = "events")))] - EmitTestEvent { event: WalletEvent }, - // Remove all listeners of this type. Empty vec clears all listeners - /// Expected response: [`Ok`](crate::Response::Ok) - #[cfg(feature = "events")] - #[cfg_attr(docsrs, doc(cfg(feature = "events")))] - #[serde(rename_all = "camelCase")] - ClearListeners { event_types: Vec }, - /// Update the authentication for the provided node. + /// Clears the Stronghold password from memory. /// Expected response: [`Ok`](crate::Response::Ok) - UpdateNodeAuth { - /// Node url - url: Url, - /// Authentication options - auth: Option, - }, + #[cfg(feature = "stronghold")] + #[cfg_attr(docsrs, doc(cfg(feature = "stronghold")))] + ClearStrongholdPassword, + /// Checks if the Stronghold password is available. + /// Expected response: + /// [`Bool`](crate::Response::Bool) + #[cfg(feature = "stronghold")] + #[cfg_attr(docsrs, doc(cfg(feature = "stronghold")))] + IsStrongholdPasswordAvailable, } diff --git a/bindings/core/src/method/wallet_command.rs b/bindings/core/src/method/wallet_command.rs deleted file mode 100644 index 72aa622eaf..0000000000 --- a/bindings/core/src/method/wallet_command.rs +++ /dev/null @@ -1,316 +0,0 @@ -// Copyright 2023 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use iota_sdk::{ - client::api::{input_selection::Burn, PreparedTransactionDataDto, SignedTransactionDataDto}, - types::block::{ - address::Bech32Address, - output::{dto::OutputDto, OutputId, TokenId}, - payload::signed_transaction::TransactionId, - }, - wallet::{ - ConsolidationParams, CreateAccountParams, CreateNativeTokenParams, FilterOptions, MintNftParams, OutputParams, - OutputsToClaim, SendNativeTokensParams, SendNftParams, SendParams, SyncOptions, TransactionOptions, - }, - U256, -}; -#[cfg(feature = "participation")] -use iota_sdk::{ - client::node_manager::node::Node, - types::api::plugins::participation::types::{ParticipationEventId, ParticipationEventType}, - wallet::types::participation::ParticipationEventRegistrationOptions, -}; -use serde::{Deserialize, Serialize}; - -/// Each public wallet command method. -#[derive(Clone, Debug, Serialize, Deserialize)] -#[serde(tag = "name", content = "data", rename_all = "camelCase")] -#[non_exhaustive] -pub enum WalletCommandMethod { - /// Get outputs with additional unlock conditions - /// Expected response: [`OutputIds`](crate::Response::OutputIds) - #[serde(rename_all = "camelCase")] - ClaimableOutputs { outputs_to_claim: OutputsToClaim }, - /// Claim outputs. - /// Expected response: [`SentTransaction`](crate::Response::SentTransaction) - #[serde(rename_all = "camelCase")] - ClaimOutputs { output_ids_to_claim: Vec }, - /// Removes a previously registered participation event from local storage. - /// Expected response: [`Ok`](crate::Response::Ok) - #[cfg(feature = "participation")] - #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] - #[serde(rename_all = "camelCase")] - DeregisterParticipationEvent { event_id: ParticipationEventId }, - /// Get the wallet address. - /// Expected response: [`Address`](crate::Response::Address) - GetAddress, - /// Get wallet balance information. - /// Expected response: [`Balance`](crate::Response::Balance) - GetBalance, - /// Get the [`Output`](iota_sdk::types::block::output::Output) that minted a native token by its TokenId - /// Expected response: [`Output`](crate::Response::Output) - #[serde(rename_all = "camelCase")] - GetFoundryOutput { token_id: TokenId }, - /// Get the transaction with inputs of an incoming transaction stored in the wallet - /// List might not be complete, if the node pruned the data already - /// Expected response: [`Transaction`](crate::Response::Transaction) - #[serde(rename_all = "camelCase")] - GetIncomingTransaction { transaction_id: TransactionId }, - /// Get the [`OutputData`](iota_sdk::wallet::types::OutputData) of an output stored in the wallet - /// Expected response: [`OutputData`](crate::Response::OutputData) - #[serde(rename_all = "camelCase")] - GetOutput { output_id: OutputId }, - /// Expected response: [`ParticipationEvent`](crate::Response::ParticipationEvent) - #[cfg(feature = "participation")] - #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] - #[serde(rename_all = "camelCase")] - GetParticipationEvent { event_id: ParticipationEventId }, - /// Expected response: [`ParticipationEventIds`](crate::Response::ParticipationEventIds) - #[cfg(feature = "participation")] - #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] - #[serde(rename_all = "camelCase")] - GetParticipationEventIds { - node: Node, - event_type: Option, - }, - /// Expected response: - /// [`ParticipationEventStatus`](crate::Response::ParticipationEventStatus) - #[cfg(feature = "participation")] - #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] - #[serde(rename_all = "camelCase")] - GetParticipationEventStatus { event_id: ParticipationEventId }, - /// Expected response: [`ParticipationEvents`](crate::Response::ParticipationEvents) - #[cfg(feature = "participation")] - #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] - GetParticipationEvents, - /// Calculates a participation overview for the wallet. If event_ids are provided, only return outputs and tracked - /// participations for them. - /// Expected response: - /// [`ParticipationOverview`](crate::Response::ParticipationOverview) - #[cfg(feature = "participation")] - #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] - #[serde(rename_all = "camelCase")] - GetParticipationOverview { - event_ids: Option>, - }, - /// Get the [`Transaction`](iota_sdk::wallet::types::Transaction) of a transaction stored in the wallet - /// Expected response: [`Transaction`](crate::Response::Transaction) - #[serde(rename_all = "camelCase")] - GetTransaction { transaction_id: TransactionId }, - /// Get the wallet's total voting power (voting or NOT voting). - /// Expected response: [`VotingPower`](crate::Response::VotingPower) - #[cfg(feature = "participation")] - #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] - GetVotingPower, - /// Returns all incoming transactions of the wallet - /// Expected response: - /// [`Transactions`](crate::Response::Transactions) - IncomingTransactions, - /// Returns all outputs of the wallet - /// Expected response: [`OutputsData`](crate::Response::OutputsData) - #[serde(rename_all = "camelCase")] - Outputs { filter_options: Option }, - /// Returns all pending transactions of the wallet - /// Expected response: [`Transactions`](crate::Response::Transactions) - PendingTransactions, - /// A generic function that can be used to burn native tokens, nfts, foundries and accounts. - /// - /// Note that burning **native tokens** doesn't require the foundry output which minted them, but will not - /// increase the foundries `melted_tokens` field, which makes it impossible to destroy the foundry output. - /// Therefore it's recommended to use melting, if the foundry output is available. - /// - /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) - PrepareBurn { - burn: Burn, - options: Option, - }, - /// Consolidate outputs. - /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) - PrepareConsolidateOutputs { params: ConsolidationParams }, - /// Create an alias output. - /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) - PrepareCreateAccountOutput { - params: Option, - options: Option, - }, - /// Prepare to create a native token. - /// Expected response: - /// [`PreparedCreateNativeTokenTransaction`](crate::Response::PreparedCreateNativeTokenTransaction) - PrepareCreateNativeToken { - params: CreateNativeTokenParams, - options: Option, - }, - /// Reduces a wallet's "voting power" by a given amount. - /// This will stop voting, but the voting data isn't lost and calling `Vote` without parameters will revote. - /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) - #[cfg(feature = "participation")] - #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] - PrepareDecreaseVotingPower { - #[serde(with = "iota_sdk::utils::serde::string")] - amount: u64, - }, - /// Designates a given amount of tokens towards a wallet's "voting power" by creating a - /// special output, which is really a basic one with some metadata. - /// This will stop voting in most cases (if there is a remainder output), but the voting data isn't lost and - /// calling `Vote` without parameters will revote. Expected response: - /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) - #[cfg(feature = "participation")] - #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] - PrepareIncreaseVotingPower { - #[serde(with = "iota_sdk::utils::serde::string")] - amount: u64, - }, - /// Prepare to melt native tokens. This happens with the foundry output which minted them, by increasing it's - /// `melted_tokens` field. - /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) - #[serde(rename_all = "camelCase")] - PrepareMeltNativeToken { - /// Native token id - token_id: TokenId, - /// To be melted amount - melt_amount: U256, - options: Option, - }, - /// Prepare to mint additional native tokens. - /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) - #[serde(rename_all = "camelCase")] - PrepareMintNativeToken { - /// Native token id - token_id: TokenId, - /// To be minted amount - mint_amount: U256, - options: Option, - }, - /// Prepare to mint NFTs. - /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) - PrepareMintNfts { - params: Vec, - options: Option, - }, - /// Prepare an output. - /// Expected response: [`Output`](crate::Response::Output) - #[serde(rename_all = "camelCase")] - PrepareOutput { - params: Box, - transaction_options: Option, - }, - /// Prepare to send base coins. - /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) - PrepareSend { - params: Vec, - options: Option, - }, - /// Prepare to send native tokens. - /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) - PrepareSendNativeTokens { - params: Vec, - options: Option, - }, - /// Prepare to Send nft. - /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) - PrepareSendNft { - params: Vec, - options: Option, - }, - /// Stop participating for an event. - /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) - #[cfg(feature = "participation")] - #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] - #[serde(rename_all = "camelCase")] - PrepareStopParticipating { event_id: ParticipationEventId }, - /// Prepare transaction. - /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) - PrepareTransaction { - outputs: Vec, - options: Option, - }, - /// Vote for a participation event. - /// Expected response: [`PreparedTransaction`](crate::Response::PreparedTransaction) - #[cfg(feature = "participation")] - #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] - #[serde(rename_all = "camelCase")] - PrepareVote { - event_id: Option, - answers: Option>, - }, - /// Stores participation information locally and returns the event. - /// - /// This will NOT store the node url and auth inside the client options. - /// Expected response: [`ParticipationEvents`](crate::Response::ParticipationEvents) - #[cfg(feature = "participation")] - #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] - RegisterParticipationEvents { - options: ParticipationEventRegistrationOptions, - }, - /// Reissues a transaction sent from the wallet for a provided transaction id until it's - /// included (referenced by a milestone). Returns the included block id. - /// Expected response: [`BlockId`](crate::Response::BlockId) - #[serde(rename_all = "camelCase")] - ReissueTransactionUntilIncluded { - /// Transaction id - transaction_id: TransactionId, - /// Interval - interval: Option, - /// Maximum attempts - max_attempts: Option, - }, - /// Send base coins. - /// Expected response: [`SentTransaction`](crate::Response::SentTransaction) - Send { - #[serde(with = "iota_sdk::utils::serde::string")] - amount: u64, - address: Bech32Address, - options: Option, - }, - /// Send base coins to multiple addresses, or with additional parameters. - /// Expected response: [`SentTransaction`](crate::Response::SentTransaction) - SendWithParams { - params: Vec, - options: Option, - }, - /// Send outputs in a transaction. - /// Expected response: [`SentTransaction`](crate::Response::SentTransaction) - SendOutputs { - outputs: Vec, - options: Option, - }, - /// Set the alias of the wallet. - /// Expected response: [`Ok`](crate::Response::Ok) - SetAlias { alias: String }, - /// Set the fallback SyncOptions for wallet syncing. - /// If storage is enabled, will persist during restarts. - /// Expected response: [`Ok`](crate::Response::Ok) - SetDefaultSyncOptions { options: SyncOptions }, - /// Validate the transaction, sign it, submit it to a node and store it in the wallet. - /// Expected response: [`SentTransaction`](crate::Response::SentTransaction) - #[serde(rename_all = "camelCase")] - SignAndSubmitTransaction { - prepared_transaction_data: PreparedTransactionDataDto, - }, - /// Sign a prepared transaction. - /// Expected response: [`SignedTransactionData`](crate::Response::SignedTransactionData) - #[serde(rename_all = "camelCase")] - SignTransaction { - prepared_transaction_data: PreparedTransactionDataDto, - }, - /// Validate the transaction, submit it to a node and store it in the wallet. - /// Expected response: [`SentTransaction`](crate::Response::SentTransaction) - #[serde(rename_all = "camelCase")] - SubmitAndStoreTransaction { - signed_transaction_data: SignedTransactionDataDto, - }, - /// Sync the wallet by fetching new information from the nodes. Will also reissue pending transactions - /// if necessary. A custom default can be set using SetDefaultSyncOptions. - /// Expected response: [`Balance`](crate::Response::Balance) - Sync { - /// Sync options - options: Option, - }, - /// Returns all transactions of the wallet - /// Expected response: [`Transactions`](crate::Response::Transactions) - Transactions, - /// Returns all unspent outputs of the wallet - /// Expected response: [`OutputsData`](crate::Response::OutputsData) - #[serde(rename_all = "camelCase")] - UnspentOutputs { filter_options: Option }, -} diff --git a/bindings/core/src/method_handler/mod.rs b/bindings/core/src/method_handler/mod.rs index 35bccfbbc6..5b39e211fa 100644 --- a/bindings/core/src/method_handler/mod.rs +++ b/bindings/core/src/method_handler/mod.rs @@ -6,7 +6,6 @@ mod client; mod secret_manager; mod utils; mod wallet; -mod wallet_command; pub use call_method::{ call_client_method, call_secret_manager_method, call_utils_method, call_wallet_method, CallMethod, diff --git a/bindings/core/src/method_handler/secret_manager.rs b/bindings/core/src/method_handler/secret_manager.rs index cfdde9882c..75d6ddbbfb 100644 --- a/bindings/core/src/method_handler/secret_manager.rs +++ b/bindings/core/src/method_handler/secret_manager.rs @@ -8,7 +8,7 @@ use iota_sdk::client::secret::stronghold::StrongholdSecretManager; use iota_sdk::{ client::{ api::{GetAddressesOptions, PreparedTransactionData}, - secret::{DowncastSecretManager, SecretManage, SignBlock}, + secret::{DowncastSecretManager, SecretManage, SecretManager, SignBlock}, }, types::{ block::{address::ToBech32Ext, core::UnsignedBlock, unlock::Unlock, SignedBlockDto}, @@ -124,6 +124,13 @@ where if let Some(secret_manager) = secret_manager.downcast::() { secret_manager.store_mnemonic(mnemonic).await?; Response::Ok + } else if let Some(secret_manager) = secret_manager.downcast::() { + if let SecretManager::Stronghold(secret_manager) = secret_manager { + secret_manager.store_mnemonic(mnemonic).await?; + Response::Ok + } else { + return Err(iota_sdk::client::Error::SecretManagerMismatch.into()); + } } else { return Err(iota_sdk::client::Error::SecretManagerMismatch.into()); } diff --git a/bindings/core/src/method_handler/wallet.rs b/bindings/core/src/method_handler/wallet.rs index b24ac505d7..ee8102677d 100644 --- a/bindings/core/src/method_handler/wallet.rs +++ b/bindings/core/src/method_handler/wallet.rs @@ -3,15 +3,29 @@ use std::time::Duration; -use iota_sdk::{types::block::address::ToBech32Ext, wallet::Wallet}; +use iota_sdk::{ + client::api::{ + PreparedTransactionData, PreparedTransactionDataDto, SignedTransactionData, SignedTransactionDataDto, + }, + types::{ + block::{ + address::ToBech32Ext, + output::{dto::OutputDto, Output}, + }, + TryFromDto, + }, + wallet::{types::TransactionWithMetadataDto, OutputDataDto, PreparedCreateNativeTokenTransactionDto, Wallet}, +}; -use super::wallet_command::call_wallet_command_method_internal; use crate::{method::WalletMethod, response::Response, Result}; /// Call a wallet method. pub(crate) async fn call_wallet_method_internal(wallet: &Wallet, method: WalletMethod) -> Result { let response = match method { - WalletMethod::CallMethod { method } => call_wallet_command_method_internal(&wallet, method).await?, + WalletMethod::Accounts => { + let accounts = wallet.accounts().await; + Response::OutputsData(accounts.iter().map(OutputDataDto::from).collect()) + } #[cfg(feature = "stronghold")] WalletMethod::Backup { destination, password } => { wallet.backup(destination, password).await?; @@ -124,6 +138,273 @@ pub(crate) async fn call_wallet_method_internal(wallet: &Wallet, method: WalletM wallet.update_node_auth(url, auth).await?; Response::Ok } + WalletMethod::ClaimableOutputs { outputs_to_claim } => { + let output_ids = wallet.claimable_outputs(outputs_to_claim).await?; + Response::OutputIds(output_ids) + } + WalletMethod::ClaimOutputs { output_ids_to_claim } => { + let transaction = wallet.claim_outputs(output_ids_to_claim.to_vec()).await?; + Response::SentTransaction(TransactionWithMetadataDto::from(&transaction)) + } + #[cfg(feature = "participation")] + WalletMethod::DeregisterParticipationEvent { event_id } => { + wallet.deregister_participation_event(&event_id).await?; + Response::Ok + } + WalletMethod::GetAddress => { + let address = wallet.address().await; + Response::Address(address) + } + WalletMethod::GetBalance => Response::Balance(wallet.balance().await?), + WalletMethod::GetFoundryOutput { token_id } => { + let output = wallet.get_foundry_output(token_id).await?; + Response::Output(OutputDto::from(&output)) + } + WalletMethod::GetIncomingTransaction { transaction_id } => { + let transaction = wallet.get_incoming_transaction(&transaction_id).await; + + transaction.map_or_else( + || Response::Transaction(None), + |transaction| Response::Transaction(Some(Box::new(TransactionWithMetadataDto::from(&transaction)))), + ) + } + WalletMethod::GetOutput { output_id } => { + let output_data = wallet.get_output(&output_id).await; + Response::OutputData(output_data.as_ref().map(OutputDataDto::from).map(Box::new)) + } + #[cfg(feature = "participation")] + WalletMethod::GetParticipationEvent { event_id } => { + let event_and_nodes = wallet.get_participation_event(event_id).await?; + Response::ParticipationEvent(event_and_nodes) + } + #[cfg(feature = "participation")] + WalletMethod::GetParticipationEventIds { node, event_type } => { + let event_ids = wallet.get_participation_event_ids(&node, event_type).await?; + Response::ParticipationEventIds(event_ids) + } + #[cfg(feature = "participation")] + WalletMethod::GetParticipationEventStatus { event_id } => { + let event_status = wallet.get_participation_event_status(&event_id).await?; + Response::ParticipationEventStatus(event_status) + } + #[cfg(feature = "participation")] + WalletMethod::GetParticipationEvents => { + let events = wallet.get_participation_events().await?; + Response::ParticipationEvents(events) + } + #[cfg(feature = "participation")] + WalletMethod::GetParticipationOverview { event_ids } => { + let overview = wallet.get_participation_overview(event_ids).await?; + Response::ParticipationOverview(overview) + } + WalletMethod::GetTransaction { transaction_id } => { + let transaction = wallet.get_transaction(&transaction_id).await; + Response::Transaction(transaction.as_ref().map(TransactionWithMetadataDto::from).map(Box::new)) + } + #[cfg(feature = "participation")] + WalletMethod::GetVotingPower => { + let voting_power = wallet.get_voting_power().await?; + Response::VotingPower(voting_power.to_string()) + } + WalletMethod::ImplicitAccountCreationAddress => { + let implicit_account_creation_address = wallet.implicit_account_creation_address().await?; + Response::Bech32Address(implicit_account_creation_address) + } + WalletMethod::ImplicitAccounts => { + let implicit_accounts = wallet.implicit_accounts().await; + Response::OutputsData(implicit_accounts.iter().map(OutputDataDto::from).collect()) + } + WalletMethod::IncomingTransactions => { + let transactions = wallet.incoming_transactions().await; + Response::Transactions(transactions.iter().map(TransactionWithMetadataDto::from).collect()) + } + WalletMethod::Outputs { filter_options } => { + let outputs = wallet.outputs(filter_options).await; + Response::OutputsData(outputs.iter().map(OutputDataDto::from).collect()) + } + WalletMethod::PendingTransactions => { + let transactions = wallet.pending_transactions().await; + Response::Transactions(transactions.iter().map(TransactionWithMetadataDto::from).collect()) + } + WalletMethod::PrepareBurn { burn, options } => { + let data = wallet.prepare_burn(burn, options).await?; + Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) + } + WalletMethod::PrepareConsolidateOutputs { params } => { + let data = wallet.prepare_consolidate_outputs(params).await?; + Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) + } + WalletMethod::PrepareCreateAccountOutput { params, options } => { + let data = wallet.prepare_create_account_output(params, options).await?; + Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) + } + WalletMethod::PrepareMeltNativeToken { + token_id, + melt_amount, + options, + } => { + let data = wallet.prepare_melt_native_token(token_id, melt_amount, options).await?; + Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) + } + #[cfg(feature = "participation")] + WalletMethod::PrepareDecreaseVotingPower { amount } => { + let data = wallet.prepare_decrease_voting_power(amount).await?; + Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) + } + WalletMethod::PrepareMintNativeToken { + token_id, + mint_amount, + options, + } => { + let data = wallet.prepare_mint_native_token(token_id, mint_amount, options).await?; + Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) + } + #[cfg(feature = "participation")] + WalletMethod::PrepareIncreaseVotingPower { amount } => { + let data = wallet.prepare_increase_voting_power(amount).await?; + Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) + } + WalletMethod::PrepareMintNfts { params, options } => { + let data = wallet.prepare_mint_nfts(params, options).await?; + Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) + } + WalletMethod::PrepareCreateNativeToken { params, options } => { + let data = wallet.prepare_create_native_token(params, options).await?; + Response::PreparedCreateNativeTokenTransaction(PreparedCreateNativeTokenTransactionDto::from(&data)) + } + WalletMethod::PrepareOutput { + params, + transaction_options, + } => { + let output = wallet.prepare_output(*params, transaction_options).await?; + Response::Output(OutputDto::from(&output)) + } + WalletMethod::PrepareSend { params, options } => { + let data = wallet.prepare_send(params, options).await?; + Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) + } + WalletMethod::PrepareSendNativeTokens { params, options } => { + let data = wallet.prepare_send_native_tokens(params.clone(), options).await?; + Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) + } + WalletMethod::PrepareSendNft { params, options } => { + let data = wallet.prepare_send_nft(params.clone(), options).await?; + Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) + } + #[cfg(feature = "participation")] + WalletMethod::PrepareStopParticipating { event_id } => { + let data = wallet.prepare_stop_participating(event_id).await?; + Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) + } + WalletMethod::PrepareTransaction { outputs, options } => { + let token_supply = wallet.client().get_token_supply().await?; + let data = wallet + .prepare_transaction( + outputs + .into_iter() + .map(|o| Ok(Output::try_from_dto_with_params(o, token_supply)?)) + .collect::>>()?, + options, + ) + .await?; + Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) + } + #[cfg(feature = "participation")] + WalletMethod::PrepareVote { event_id, answers } => { + let data = wallet.prepare_vote(event_id, answers).await?; + Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) + } + #[cfg(feature = "participation")] + WalletMethod::RegisterParticipationEvents { options } => { + let events = wallet.register_participation_events(&options).await?; + Response::ParticipationEvents(events) + } + WalletMethod::ReissueTransactionUntilIncluded { + transaction_id, + interval, + max_attempts, + } => { + let block_id = wallet + .reissue_transaction_until_included(&transaction_id, interval, max_attempts) + .await?; + Response::BlockId(block_id) + } + WalletMethod::Send { + amount, + address, + options, + } => { + let transaction = wallet.send(amount, address, options).await?; + Response::SentTransaction(TransactionWithMetadataDto::from(&transaction)) + } + WalletMethod::SendWithParams { params, options } => { + let transaction = wallet.send_with_params(params, options).await?; + Response::SentTransaction(TransactionWithMetadataDto::from(&transaction)) + } + WalletMethod::SendOutputs { outputs, options } => { + let token_supply = wallet.client().get_token_supply().await?; + let transaction = wallet + .send_outputs( + outputs + .into_iter() + .map(|o| Ok(Output::try_from_dto_with_params(o, token_supply)?)) + .collect::>>()?, + options, + ) + .await?; + Response::SentTransaction(TransactionWithMetadataDto::from(&transaction)) + } + WalletMethod::SetAlias { alias } => { + wallet.set_alias(&alias).await?; + Response::Ok + } + WalletMethod::SetDefaultSyncOptions { options } => { + wallet.set_default_sync_options(options).await?; + Response::Ok + } + WalletMethod::SignAndSubmitTransaction { + prepared_transaction_data, + } => { + let transaction = wallet + .sign_and_submit_transaction( + PreparedTransactionData::try_from_dto_with_params( + prepared_transaction_data, + wallet.client().get_protocol_parameters().await?, + )?, + None, + ) + .await?; + Response::SentTransaction(TransactionWithMetadataDto::from(&transaction)) + } + WalletMethod::SignTransaction { + prepared_transaction_data, + } => { + let signed_transaction_data = wallet + .sign_transaction(&PreparedTransactionData::try_from_dto(prepared_transaction_data)?) + .await?; + Response::SignedTransactionData(SignedTransactionDataDto::from(&signed_transaction_data)) + } + WalletMethod::SubmitAndStoreTransaction { + signed_transaction_data, + } => { + let signed_transaction_data = SignedTransactionData::try_from_dto_with_params( + signed_transaction_data, + wallet.client().get_protocol_parameters().await?, + )?; + let transaction = wallet + .submit_and_store_transaction(signed_transaction_data, None) + .await?; + Response::SentTransaction(TransactionWithMetadataDto::from(&transaction)) + } + WalletMethod::Sync { options } => Response::Balance(wallet.sync(options).await?), + WalletMethod::Transactions => { + let transactions = wallet.transactions().await; + Response::Transactions(transactions.iter().map(TransactionWithMetadataDto::from).collect()) + } + WalletMethod::UnspentOutputs { filter_options } => { + let outputs = wallet.unspent_outputs(filter_options).await; + Response::OutputsData(outputs.iter().map(OutputDataDto::from).collect()) + } }; Ok(response) } diff --git a/bindings/core/src/method_handler/wallet_command.rs b/bindings/core/src/method_handler/wallet_command.rs deleted file mode 100644 index 562cdd370f..0000000000 --- a/bindings/core/src/method_handler/wallet_command.rs +++ /dev/null @@ -1,283 +0,0 @@ -// Copyright 2023 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use iota_sdk::{ - client::api::{ - PreparedTransactionData, PreparedTransactionDataDto, SignedTransactionData, SignedTransactionDataDto, - }, - types::{ - block::output::{dto::OutputDto, Output}, - TryFromDto, - }, - wallet::{types::TransactionWithMetadataDto, OutputDataDto, PreparedCreateNativeTokenTransactionDto, Wallet}, -}; - -use crate::{method::WalletCommandMethod, Response, Result}; - -pub(crate) async fn call_wallet_command_method_internal( - wallet: &Wallet, - method: WalletCommandMethod, -) -> Result { - let response = match method { - WalletCommandMethod::ClaimableOutputs { outputs_to_claim } => { - let output_ids = wallet.claimable_outputs(outputs_to_claim).await?; - Response::OutputIds(output_ids) - } - WalletCommandMethod::ClaimOutputs { output_ids_to_claim } => { - let transaction = wallet.claim_outputs(output_ids_to_claim.to_vec()).await?; - Response::SentTransaction(TransactionWithMetadataDto::from(&transaction)) - } - #[cfg(feature = "participation")] - WalletCommandMethod::DeregisterParticipationEvent { event_id } => { - wallet.deregister_participation_event(&event_id).await?; - Response::Ok - } - WalletCommandMethod::GetAddress => { - let address = wallet.address().await; - Response::Address(address) - } - WalletCommandMethod::GetBalance => Response::Balance(wallet.balance().await?), - WalletCommandMethod::GetFoundryOutput { token_id } => { - let output = wallet.get_foundry_output(token_id).await?; - Response::Output(OutputDto::from(&output)) - } - WalletCommandMethod::GetIncomingTransaction { transaction_id } => { - let transaction = wallet.get_incoming_transaction(&transaction_id).await; - - transaction.map_or_else( - || Response::Transaction(None), - |transaction| Response::Transaction(Some(Box::new(TransactionWithMetadataDto::from(&transaction)))), - ) - } - WalletCommandMethod::GetOutput { output_id } => { - let output_data = wallet.get_output(&output_id).await; - Response::OutputData(output_data.as_ref().map(OutputDataDto::from).map(Box::new)) - } - #[cfg(feature = "participation")] - WalletCommandMethod::GetParticipationEvent { event_id } => { - let event_and_nodes = wallet.get_participation_event(event_id).await?; - Response::ParticipationEvent(event_and_nodes) - } - #[cfg(feature = "participation")] - WalletCommandMethod::GetParticipationEventIds { node, event_type } => { - let event_ids = wallet.get_participation_event_ids(&node, event_type).await?; - Response::ParticipationEventIds(event_ids) - } - #[cfg(feature = "participation")] - WalletCommandMethod::GetParticipationEventStatus { event_id } => { - let event_status = wallet.get_participation_event_status(&event_id).await?; - Response::ParticipationEventStatus(event_status) - } - #[cfg(feature = "participation")] - WalletCommandMethod::GetParticipationEvents => { - let events = wallet.get_participation_events().await?; - Response::ParticipationEvents(events) - } - #[cfg(feature = "participation")] - WalletCommandMethod::GetParticipationOverview { event_ids } => { - let overview = wallet.get_participation_overview(event_ids).await?; - Response::ParticipationOverview(overview) - } - WalletCommandMethod::GetTransaction { transaction_id } => { - let transaction = wallet.get_transaction(&transaction_id).await; - Response::Transaction(transaction.as_ref().map(TransactionWithMetadataDto::from).map(Box::new)) - } - #[cfg(feature = "participation")] - WalletCommandMethod::GetVotingPower => { - let voting_power = wallet.get_voting_power().await?; - Response::VotingPower(voting_power.to_string()) - } - WalletCommandMethod::IncomingTransactions => { - let transactions = wallet.incoming_transactions().await; - Response::Transactions(transactions.iter().map(TransactionWithMetadataDto::from).collect()) - } - WalletCommandMethod::Outputs { filter_options } => { - let outputs = wallet.outputs(filter_options).await?; - Response::OutputsData(outputs.iter().map(OutputDataDto::from).collect()) - } - WalletCommandMethod::PendingTransactions => { - let transactions = wallet.pending_transactions().await; - Response::Transactions(transactions.iter().map(TransactionWithMetadataDto::from).collect()) - } - WalletCommandMethod::PrepareBurn { burn, options } => { - let data = wallet.prepare_burn(burn, options).await?; - Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) - } - WalletCommandMethod::PrepareConsolidateOutputs { params } => { - let data = wallet.prepare_consolidate_outputs(params).await?; - Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) - } - WalletCommandMethod::PrepareCreateAccountOutput { params, options } => { - let data = wallet.prepare_create_account_output(params, options).await?; - Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) - } - WalletCommandMethod::PrepareMeltNativeToken { - token_id, - melt_amount, - options, - } => { - let data = wallet.prepare_melt_native_token(token_id, melt_amount, options).await?; - Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) - } - #[cfg(feature = "participation")] - WalletCommandMethod::PrepareDecreaseVotingPower { amount } => { - let data = wallet.prepare_decrease_voting_power(amount).await?; - Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) - } - WalletCommandMethod::PrepareMintNativeToken { - token_id, - mint_amount, - options, - } => { - let data = wallet.prepare_mint_native_token(token_id, mint_amount, options).await?; - Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) - } - #[cfg(feature = "participation")] - WalletCommandMethod::PrepareIncreaseVotingPower { amount } => { - let data = wallet.prepare_increase_voting_power(amount).await?; - Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) - } - WalletCommandMethod::PrepareMintNfts { params, options } => { - let data = wallet.prepare_mint_nfts(params, options).await?; - Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) - } - WalletCommandMethod::PrepareCreateNativeToken { params, options } => { - let data = wallet.prepare_create_native_token(params, options).await?; - Response::PreparedCreateNativeTokenTransaction(PreparedCreateNativeTokenTransactionDto::from(&data)) - } - WalletCommandMethod::PrepareOutput { - params, - transaction_options, - } => { - let output = wallet.prepare_output(*params, transaction_options).await?; - Response::Output(OutputDto::from(&output)) - } - WalletCommandMethod::PrepareSend { params, options } => { - let data = wallet.prepare_send(params, options).await?; - Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) - } - WalletCommandMethod::PrepareSendNativeTokens { params, options } => { - let data = wallet.prepare_send_native_tokens(params.clone(), options).await?; - Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) - } - WalletCommandMethod::PrepareSendNft { params, options } => { - let data = wallet.prepare_send_nft(params.clone(), options).await?; - Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) - } - #[cfg(feature = "participation")] - WalletCommandMethod::PrepareStopParticipating { event_id } => { - let data = wallet.prepare_stop_participating(event_id).await?; - Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) - } - WalletCommandMethod::PrepareTransaction { outputs, options } => { - let token_supply = wallet.client().get_token_supply().await?; - let data = wallet - .prepare_transaction( - outputs - .into_iter() - .map(|o| Ok(Output::try_from_dto_with_params(o, token_supply)?)) - .collect::>>()?, - options, - ) - .await?; - Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) - } - #[cfg(feature = "participation")] - WalletCommandMethod::PrepareVote { event_id, answers } => { - let data = wallet.prepare_vote(event_id, answers).await?; - Response::PreparedTransaction(PreparedTransactionDataDto::from(&data)) - } - #[cfg(feature = "participation")] - WalletCommandMethod::RegisterParticipationEvents { options } => { - let events = wallet.register_participation_events(&options).await?; - Response::ParticipationEvents(events) - } - WalletCommandMethod::ReissueTransactionUntilIncluded { - transaction_id, - interval, - max_attempts, - } => { - let block_id = wallet - .reissue_transaction_until_included(&transaction_id, interval, max_attempts) - .await?; - Response::BlockId(block_id) - } - WalletCommandMethod::Send { - amount, - address, - options, - } => { - let transaction = wallet.send(amount, address, options).await?; - Response::SentTransaction(TransactionWithMetadataDto::from(&transaction)) - } - WalletCommandMethod::SendWithParams { params, options } => { - let transaction = wallet.send_with_params(params, options).await?; - Response::SentTransaction(TransactionWithMetadataDto::from(&transaction)) - } - WalletCommandMethod::SendOutputs { outputs, options } => { - let token_supply = wallet.client().get_token_supply().await?; - let transaction = wallet - .send_outputs( - outputs - .into_iter() - .map(|o| Ok(Output::try_from_dto_with_params(o, token_supply)?)) - .collect::>>()?, - options, - ) - .await?; - Response::SentTransaction(TransactionWithMetadataDto::from(&transaction)) - } - WalletCommandMethod::SetAlias { alias } => { - wallet.set_alias(&alias).await?; - Response::Ok - } - WalletCommandMethod::SetDefaultSyncOptions { options } => { - wallet.set_default_sync_options(options).await?; - Response::Ok - } - WalletCommandMethod::SignAndSubmitTransaction { - prepared_transaction_data, - } => { - let transaction = wallet - .sign_and_submit_transaction( - PreparedTransactionData::try_from_dto_with_params( - prepared_transaction_data, - wallet.client().get_protocol_parameters().await?, - )?, - None, - ) - .await?; - Response::SentTransaction(TransactionWithMetadataDto::from(&transaction)) - } - WalletCommandMethod::SignTransaction { - prepared_transaction_data, - } => { - let signed_transaction_data = wallet - .sign_transaction(&PreparedTransactionData::try_from_dto(prepared_transaction_data)?) - .await?; - Response::SignedTransactionData(SignedTransactionDataDto::from(&signed_transaction_data)) - } - WalletCommandMethod::SubmitAndStoreTransaction { - signed_transaction_data, - } => { - let signed_transaction_data = SignedTransactionData::try_from_dto_with_params( - signed_transaction_data, - wallet.client().get_protocol_parameters().await?, - )?; - let transaction = wallet - .submit_and_store_transaction(signed_transaction_data, None) - .await?; - Response::SentTransaction(TransactionWithMetadataDto::from(&transaction)) - } - WalletCommandMethod::Sync { options } => Response::Balance(wallet.sync(options).await?), - WalletCommandMethod::Transactions => { - let transactions = wallet.transactions().await; - Response::Transactions(transactions.iter().map(TransactionWithMetadataDto::from).collect()) - } - WalletCommandMethod::UnspentOutputs { filter_options } => { - let outputs = wallet.unspent_outputs(filter_options).await?; - Response::OutputsData(outputs.iter().map(OutputDataDto::from).collect()) - } - }; - Ok(response) -} diff --git a/bindings/core/src/response.rs b/bindings/core/src/response.rs index 7a67f1076d..da8d25c5d2 100644 --- a/bindings/core/src/response.rs +++ b/bindings/core/src/response.rs @@ -198,14 +198,15 @@ pub enum Response { /// - [`BuildBasicOutput`](crate::method::ClientMethod::BuildBasicOutput) /// - [`BuildFoundryOutput`](crate::method::ClientMethod::BuildFoundryOutput) /// - [`BuildNftOutput`](crate::method::ClientMethod::BuildNftOutput) - /// - [`GetFoundryOutput`](crate::method::WalletCommandMethod::GetFoundryOutput) - /// - [`PrepareOutput`](crate::method::WalletCommandMethod::PrepareOutput) + /// - [`GetFoundryOutput`](crate::method::WalletMethod::GetFoundryOutput) + /// - [`PrepareOutput`](crate::method::WalletMethod::PrepareOutput) Output(OutputDto), /// Response for: /// - [`AccountIdToBech32`](crate::method::ClientMethod::AccountIdToBech32) /// - [`HexPublicKeyToBech32Address`](crate::method::ClientMethod::HexPublicKeyToBech32Address) /// - [`HexToBech32`](crate::method::ClientMethod::HexToBech32) /// - [`NftIdToBech32`](crate::method::ClientMethod::NftIdToBech32) + /// - [`ImplicitAccountCreationAddress`](crate::method::WalletMethod::ImplicitAccountCreationAddress) Bech32Address(Bech32Address), /// - [`Faucet`](crate::method::ClientMethod::RequestFundsFromFaucet) Faucet(String), @@ -221,7 +222,7 @@ pub enum Response { /// - [`BlockId`](crate::method::UtilsMethod::BlockId) /// - [`PostBlock`](crate::method::ClientMethod::PostBlock) /// - [`PostBlockRaw`](crate::method::ClientMethod::PostBlockRaw) - /// - [`ReissueTransactionUntilIncluded`](crate::method::WalletCommandMethod::ReissueTransactionUntilIncluded) + /// - [`ReissueTransactionUntilIncluded`](crate::method::WalletMethod::ReissueTransactionUntilIncluded) BlockId(BlockId), /// Response for: /// - [`GetHealth`](crate::method::ClientMethod::GetHealth) @@ -233,12 +234,12 @@ pub enum Response { /// - [`Backup`](crate::method::WalletMethod::Backup), /// - [`ClearListeners`](crate::method::WalletMethod::ClearListeners) /// - [`ClearStrongholdPassword`](crate::method::WalletMethod::ClearStrongholdPassword), - /// - [`DeregisterParticipationEvent`](crate::method::WalletCommandMethod::DeregisterParticipationEvent), + /// - [`DeregisterParticipationEvent`](crate::method::WalletMethod::DeregisterParticipationEvent), /// - [`EmitTestEvent`](crate::method::WalletMethod::EmitTestEvent), /// - [`RestoreBackup`](crate::method::WalletMethod::RestoreBackup), - /// - [`SetAlias`](crate::method::WalletCommandMethod::SetAlias), + /// - [`SetAlias`](crate::method::WalletMethod::SetAlias), /// - [`SetClientOptions`](crate::method::WalletMethod::SetClientOptions), - /// - [`SetDefaultSyncOptions`](crate::method::WalletCommandMethod::SetDefaultSyncOptions), + /// - [`SetDefaultSyncOptions`](crate::method::WalletMethod::SetDefaultSyncOptions), /// - [`SetStrongholdPassword`](crate::method::WalletMethod::SetStrongholdPassword), /// - [`SetStrongholdPasswordClearInterval`](crate::method::WalletMethod::SetStrongholdPasswordClearInterval), /// - [`StartBackgroundSync`](crate::method::WalletMethod::StartBackgroundSync), @@ -252,92 +253,92 @@ pub enum Response { // wallet responses /// Response for: - /// - [`GetAddress`](crate::method::WalletCommandMethod::GetAddress) + /// - [`GetAddress`](crate::method::WalletMethod::GetAddress) Address(Bech32Address), /// Response for: /// - [`MinimumRequiredStorageDeposit`](crate::method::ClientMethod::MinimumRequiredStorageDeposit) /// - [`ComputeStorageDeposit`](crate::method::UtilsMethod::ComputeStorageDeposit) MinimumRequiredStorageDeposit(String), /// Response for: - /// - [`ClaimableOutputs`](crate::method::WalletCommandMethod::ClaimableOutputs) + /// - [`ClaimableOutputs`](crate::method::WalletMethod::ClaimableOutputs) OutputIds(Vec), /// Response for: - /// - [`GetOutput`](crate::method::WalletCommandMethod::GetOutput) + /// - [`GetOutput`](crate::method::WalletMethod::GetOutput) OutputData(Option>), /// Response for: - /// - [`Outputs`](crate::method::WalletCommandMethod::Outputs), - /// - [`UnspentOutputs`](crate::method::WalletCommandMethod::UnspentOutputs) + /// - [`Outputs`](crate::method::WalletMethod::Outputs), + /// - [`UnspentOutputs`](crate::method::WalletMethod::UnspentOutputs) OutputsData(Vec), /// Response for: - /// - [`PrepareBurn`](crate::method::WalletCommandMethod::PrepareBurn), - /// - [`PrepareConsolidateOutputs`](crate::method::WalletCommandMethod::PrepareConsolidateOutputs) - /// - [`PrepareCreateAccountOutput`](crate::method::WalletCommandMethod::PrepareCreateAccountOutput) - /// - [`PrepareDecreaseVotingPower`](crate::method::WalletCommandMethod::PrepareDecreaseVotingPower) - /// - [`PrepareIncreaseVotingPower`](crate::method::WalletCommandMethod::PrepareIncreaseVotingPower) - /// - [`PrepareMeltNativeToken`](crate::method::WalletCommandMethod::PrepareMeltNativeToken) - /// - [`PrepareMintNativeToken`](crate::method::WalletCommandMethod::PrepareMintNativeToken), - /// - [`PrepareMintNfts`](crate::method::WalletCommandMethod::PrepareMintNfts), - /// - [`PrepareSend`](crate::method::WalletCommandMethod::PrepareSend), - /// - [`PrepareSendNativeTokens`](crate::method::WalletCommandMethod::PrepareSendNativeTokens), - /// - [`PrepareSendNft`](crate::method::WalletCommandMethod::PrepareSendNft), - /// - [`PrepareStopParticipating`](crate::method::WalletCommandMethod::PrepareStopParticipating) - /// - [`PrepareTransaction`](crate::method::WalletCommandMethod::PrepareTransaction) - /// - [`PrepareVote`](crate::method::WalletCommandMethod::PrepareVote) + /// - [`PrepareBurn`](crate::method::WalletMethod::PrepareBurn), + /// - [`PrepareConsolidateOutputs`](crate::method::WalletMethod::PrepareConsolidateOutputs) + /// - [`PrepareCreateAccountOutput`](crate::method::WalletMethod::PrepareCreateAccountOutput) + /// - [`PrepareDecreaseVotingPower`](crate::method::WalletMethod::PrepareDecreaseVotingPower) + /// - [`PrepareIncreaseVotingPower`](crate::method::WalletMethod::PrepareIncreaseVotingPower) + /// - [`PrepareMeltNativeToken`](crate::method::WalletMethod::PrepareMeltNativeToken) + /// - [`PrepareMintNativeToken`](crate::method::WalletMethod::PrepareMintNativeToken), + /// - [`PrepareMintNfts`](crate::method::WalletMethod::PrepareMintNfts), + /// - [`PrepareSend`](crate::method::WalletMethod::PrepareSend), + /// - [`PrepareSendNativeTokens`](crate::method::WalletMethod::PrepareSendNativeTokens), + /// - [`PrepareSendNft`](crate::method::WalletMethod::PrepareSendNft), + /// - [`PrepareStopParticipating`](crate::method::WalletMethod::PrepareStopParticipating) + /// - [`PrepareTransaction`](crate::method::WalletMethod::PrepareTransaction) + /// - [`PrepareVote`](crate::method::WalletMethod::PrepareVote) PreparedTransaction(PreparedTransactionDataDto), /// Response for: - /// - [`PrepareCreateNativeToken`](crate::method::WalletCommandMethod::PrepareCreateNativeToken), + /// - [`PrepareCreateNativeToken`](crate::method::WalletMethod::PrepareCreateNativeToken), PreparedCreateNativeTokenTransaction(PreparedCreateNativeTokenTransactionDto), /// Response for: - /// - [`GetIncomingTransaction`](crate::method::WalletCommandMethod::GetIncomingTransaction) - /// - [`GetTransaction`](crate::method::WalletCommandMethod::GetTransaction), + /// - [`GetIncomingTransaction`](crate::method::WalletMethod::GetIncomingTransaction) + /// - [`GetTransaction`](crate::method::WalletMethod::GetTransaction), Transaction(Option>), /// Response for: - /// - [`IncomingTransactions`](crate::method::WalletCommandMethod::IncomingTransactions) - /// - [`PendingTransactions`](crate::method::WalletCommandMethod::PendingTransactions), - /// - [`Transactions`](crate::method::WalletCommandMethod::Transactions), + /// - [`IncomingTransactions`](crate::method::WalletMethod::IncomingTransactions) + /// - [`PendingTransactions`](crate::method::WalletMethod::PendingTransactions), + /// - [`Transactions`](crate::method::WalletMethod::Transactions), Transactions(Vec), /// Response for: - /// - [`SignTransaction`](crate::method::WalletCommandMethod::SignTransaction) + /// - [`SignTransaction`](crate::method::WalletMethod::SignTransaction) SignedTransactionData(SignedTransactionDataDto), /// Response for: - /// - [`GetBalance`](crate::method::WalletCommandMethod::GetBalance), - /// - [`Sync`](crate::method::WalletCommandMethod::Sync) + /// - [`GetBalance`](crate::method::WalletMethod::GetBalance), + /// - [`Sync`](crate::method::WalletMethod::Sync) Balance(Balance), /// Response for: - /// - [`ClaimOutputs`](crate::method::WalletCommandMethod::ClaimOutputs) - /// - [`Send`](crate::method::WalletCommandMethod::Send) - /// - [`SendOutputs`](crate::method::WalletCommandMethod::SendOutputs) - /// - [`SignAndSubmitTransaction`](crate::method::WalletCommandMethod::SignAndSubmitTransaction) - /// - [`SubmitAndStoreTransaction`](crate::method::WalletCommandMethod::SubmitAndStoreTransaction) + /// - [`ClaimOutputs`](crate::method::WalletMethod::ClaimOutputs) + /// - [`Send`](crate::method::WalletMethod::Send) + /// - [`SendOutputs`](crate::method::WalletMethod::SendOutputs) + /// - [`SignAndSubmitTransaction`](crate::method::WalletMethod::SignAndSubmitTransaction) + /// - [`SubmitAndStoreTransaction`](crate::method::WalletMethod::SubmitAndStoreTransaction) SentTransaction(TransactionWithMetadataDto), /// Response for: - /// - [`GetParticipationEvent`](crate::method::WalletCommandMethod::GetParticipationEvent) + /// - [`GetParticipationEvent`](crate::method::WalletMethod::GetParticipationEvent) #[cfg(feature = "participation")] #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] ParticipationEvent(Option), /// Response for: - /// - [`GetParticipationEventIds`](crate::method::WalletCommandMethod::GetParticipationEventIds) + /// - [`GetParticipationEventIds`](crate::method::WalletMethod::GetParticipationEventIds) #[cfg(feature = "participation")] #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] ParticipationEventIds(Vec), /// Response for: - /// - [`GetParticipationEventStatus`](crate::method::WalletCommandMethod::GetParticipationEventStatus) + /// - [`GetParticipationEventStatus`](crate::method::WalletMethod::GetParticipationEventStatus) #[cfg(feature = "participation")] #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] ParticipationEventStatus(ParticipationEventStatus), /// Response for: - /// - [`GetParticipationEvents`](crate::method::WalletCommandMethod::GetParticipationEvents) - /// - [`RegisterParticipationEvents`](crate::method::WalletCommandMethod::RegisterParticipationEvents) + /// - [`GetParticipationEvents`](crate::method::WalletMethod::GetParticipationEvents) + /// - [`RegisterParticipationEvents`](crate::method::WalletMethod::RegisterParticipationEvents) #[cfg(feature = "participation")] #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] ParticipationEvents(HashMap), /// Response for: - /// - [`GetVotingPower`](crate::method::WalletCommandMethod::GetVotingPower) + /// - [`GetVotingPower`](crate::method::WalletMethod::GetVotingPower) #[cfg(feature = "participation")] #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] VotingPower(String), /// Response for: - /// - [`GetParticipationOverview`](crate::method::WalletCommandMethod::GetParticipationOverview) + /// - [`GetParticipationOverview`](crate::method::WalletMethod::GetParticipationOverview) #[cfg(feature = "participation")] #[cfg_attr(docsrs, doc(cfg(feature = "participation")))] ParticipationOverview(ParticipationOverview), diff --git a/bindings/core/tests/combined.rs b/bindings/core/tests/combined.rs index 7025bf713e..79d838ed83 100644 --- a/bindings/core/tests/combined.rs +++ b/bindings/core/tests/combined.rs @@ -20,7 +20,7 @@ use iota_sdk::{ }; use iota_sdk_bindings_core::{ call_client_method, call_secret_manager_method, CallMethod, ClientMethod, Response, Result, SecretManagerMethod, - WalletCommandMethod, WalletMethod, WalletOptions, + WalletMethod, WalletOptions, }; use pretty_assertions::assert_eq; @@ -49,9 +49,7 @@ async fn create_wallet() -> Result<()> { .await?; let response = wallet - .call_method(WalletMethod::CallMethod { - method: WalletCommandMethod::UnspentOutputs { filter_options: None }, - }) + .call_method(WalletMethod::UnspentOutputs { filter_options: None }) .await; match response { diff --git a/bindings/core/tests/secrets_debug.rs b/bindings/core/tests/secrets_debug.rs index 25fdc1438c..6f57d1eba5 100644 --- a/bindings/core/tests/secrets_debug.rs +++ b/bindings/core/tests/secrets_debug.rs @@ -26,6 +26,6 @@ fn method_interface_secrets_debug() { let wallet_options = WalletOptions::default().with_secret_manager(SecretManagerDto::Placeholder); assert_eq!( format!("{:?}", wallet_options), - "WalletOptions { storage_path: None, client_options: None, bip_path: None, secret_manager: Some() }" + "WalletOptions { address: None, alias: None, bip_path: None, client_options: None, secret_manager: Some(), storage_path: None }" ); } diff --git a/bindings/nodejs/Cargo.toml b/bindings/nodejs/Cargo.toml index 1f3e6d8dd0..cf4f515cb1 100644 --- a/bindings/nodejs/Cargo.toml +++ b/bindings/nodejs/Cargo.toml @@ -18,6 +18,7 @@ crate-type = ["cdylib"] doc = false [dependencies] +async-trait = { version = "0.1.73", default-features = false } iota-sdk-bindings-core = { path = "../core", default-features = false, features = [ "events", "ledger_nano", @@ -28,17 +29,17 @@ iota-sdk-bindings-core = { path = "../core", default-features = false, features "mqtt", "private_key_secret_manager", ] } - log = { version = "0.4.20", default-features = false } -neon = { version = "0.10.1", default-features = false, features = [ - "napi-6", - "event-queue-api", - "promise-api", -] } +napi = { version = "2.13.3", default-features = false, features = ["async"] } +napi-derive = { version = "2.13.0", default-features = false } once_cell = { version = "1.18.0", default-features = false } serde_json = { version = "1.0.107", default-features = false } +thiserror = { version = "1.0.49", default-features = false } tokio = { version = "1.33.0", default-features = false } +[build-dependencies] +napi-build = { version = "2.0.1", default-features = false } + [profile.production] codegen-units = 1 inherits = "release" diff --git a/bindings/nodejs/README.md b/bindings/nodejs/README.md index d47c54c055..1c560ab0d4 100644 --- a/bindings/nodejs/README.md +++ b/bindings/nodejs/README.md @@ -73,8 +73,7 @@ If you have already installed the project and only want to run the build, run th npm run build ``` -This command uses the [cargo-cp-artifact](https://github.com/neon-bindings/cargo-cp-artifact) utility to run the Rust -build and copy the built library into `./build/Release/index.node`. +This command uses the napi build utility to run the Rust build and copy the built library into `./build/Release/index.node`. Prebuild requires that the binary is in `build/Release` as though it was built with node-gyp. ## Client Usage diff --git a/bindings/nodejs/build.rs b/bindings/nodejs/build.rs new file mode 100644 index 0000000000..64d36cbed1 --- /dev/null +++ b/bindings/nodejs/build.rs @@ -0,0 +1,8 @@ +// Copyright 2023 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +extern crate napi_build; + +fn main() { + napi_build::setup(); +} diff --git a/bindings/nodejs/examples/how_tos/accounts_and_addresses/create-account.ts b/bindings/nodejs/examples/how_tos/accounts_and_addresses/create-wallet.ts similarity index 53% rename from bindings/nodejs/examples/how_tos/accounts_and_addresses/create-account.ts rename to bindings/nodejs/examples/how_tos/accounts_and_addresses/create-wallet.ts index 6c4d08f274..d6fdfa4553 100644 --- a/bindings/nodejs/examples/how_tos/accounts_and_addresses/create-account.ts +++ b/bindings/nodejs/examples/how_tos/accounts_and_addresses/create-wallet.ts @@ -1,15 +1,21 @@ // Copyright 2023 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { Wallet, CoinType, initLogger, WalletOptions } from '@iota/sdk'; +import { + Wallet, + CoinType, + initLogger, + WalletOptions, + SecretManager, +} from '@iota/sdk'; // This example uses secrets in environment variables for simplicity which should not be done in production. require('dotenv').config({ path: '.env' }); // Run with command: -// yarn run-example ./how_tos/accounts_and_addresses/create-account.ts +// yarn run-example ./how_tos/accounts_and_addresses/create-wallet.ts -// This example creates a new database and account. +// This example creates a new database and wallet. async function run() { initLogger(); for (const envVar of [ @@ -24,32 +30,47 @@ async function run() { } try { + const strongholdSecretManager = { + stronghold: { + snapshotPath: process.env.STRONGHOLD_SNAPSHOT_PATH, + password: process.env.STRONGHOLD_PASSWORD, + }, + }; + + const secretManager = new SecretManager(strongholdSecretManager); + + // A mnemonic can be generated with `Utils.generateMnemonic()`. + // Store the mnemonic in the Stronghold snapshot, this needs to be done only the first time. + // The mnemonic can't be retrieved from the Stronghold file, so make a backup in a secure place! + await secretManager.storeMnemonic(process.env.MNEMONIC as string); + + const wallet_address = await secretManager.generateEd25519Addresses({ + coinType: CoinType.IOTA, + accountIndex: 0, + range: { + start: 0, + end: 1, + }, + bech32Hrp: 'tst', + }); + const walletOptions: WalletOptions = { + address: wallet_address[0], storagePath: process.env.WALLET_DB_PATH, clientOptions: { nodes: [process.env.NODE_URL as string], }, - coinType: CoinType.Shimmer, - secretManager: { - stronghold: { - snapshotPath: process.env.STRONGHOLD_SNAPSHOT_PATH, - password: process.env.STRONGHOLD_PASSWORD, - }, + bipPath: { + coinType: CoinType.IOTA, }, + secretManager: strongholdSecretManager, }; const wallet = new Wallet(walletOptions); - // A mnemonic can be generated with `Utils.generateMnemonic()`. - // Store the mnemonic in the Stronghold snapshot, this needs to be done only the first time. - // The mnemonic can't be retrieved from the Stronghold file, so make a backup in a secure place! - await wallet.storeMnemonic(process.env.MNEMONIC as string); - - // Create a new account - const account = await wallet.createAccount({ - alias: 'Alice', - }); - console.log('Generated new account:', account.getMetadata().alias); + console.log( + 'Generated wallet with address: ' + (await wallet.address()), + ); } catch (error) { console.error('Error: ', error); } diff --git a/bindings/nodejs/examples/package-lock.json b/bindings/nodejs/examples/package-lock.json index aebd0a66e0..8f721e37f8 100644 --- a/bindings/nodejs/examples/package-lock.json +++ b/bindings/nodejs/examples/package-lock.json @@ -23,7 +23,6 @@ "dependencies": { "@iota/types": "^1.0.0-beta.15", "@types/node": "^18.15.12", - "cargo-cp-artifact": "^0.1.6", "prebuild-install": "^7.1.1", "typescript": "^4.9.4" }, @@ -85,7 +84,6 @@ "@types/node": "^18.15.12", "@typescript-eslint/eslint-plugin": "^5.30.7", "@typescript-eslint/parser": "^5.30.7", - "cargo-cp-artifact": "^0.1.6", "dotenv": "^16.0.3", "electron-build-env": "^0.2.0", "eslint": "^8.20.0", diff --git a/bindings/nodejs/examples/yarn.lock b/bindings/nodejs/examples/yarn.lock index e784520517..8225206635 100644 --- a/bindings/nodejs/examples/yarn.lock +++ b/bindings/nodejs/examples/yarn.lock @@ -679,11 +679,6 @@ call-bind@^1.0.0, call-bind@^1.0.2: function-bind "^1.1.1" get-intrinsic "^1.0.2" -cargo-cp-artifact@^0.1.6: - version "0.1.8" - resolved "https://registry.yarnpkg.com/cargo-cp-artifact/-/cargo-cp-artifact-0.1.8.tgz#353814f49f6aa76601a4bcb3ea5f3071180b90de" - integrity sha512-3j4DaoTrsCD1MRkTF2Soacii0Nx7UHCce0EwUf4fHnggwiE4fbmF2AbnfzayR36DF8KGadfh7M/Yfy625kgPlA== - caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" @@ -888,9 +883,9 @@ destroy@1.2.0: integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== detect-libc@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.1.tgz#e1897aa88fa6ad197862937fbc0441ef352ee0cd" - integrity sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w== + version "2.0.2" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.2.tgz#8ccf2ba9315350e1241b88d0ac3b0e1fbd99605d" + integrity sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw== diff@^4.0.1: version "4.0.2" @@ -1797,9 +1792,9 @@ next-tick@^1.1.0: integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== node-abi@^3.3.0: - version "3.45.0" - resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.45.0.tgz#f568f163a3bfca5aacfce1fbeee1fa2cc98441f5" - integrity sha512-iwXuFrMAcFVi/ZoZiqq8BzAdsLw9kxDfTC0HMyjXfSL/6CSDAGD5UmR7azrAgWV1zKYq7dUUMj4owusBWKLsiQ== + version "3.51.0" + resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.51.0.tgz#970bf595ef5a26a271307f8a4befa02823d4e87d" + integrity sha512-SQkEP4hmNWjlniS5zdnfIXTk1x7Ome85RDzHlTbBtzE97Gfwz/Ipw4v/Ryk20DWIy3yCNVLVlGKApCnmvYoJbA== dependencies: semver "^7.3.5" @@ -2129,9 +2124,9 @@ secp256k1@^4.0.1: node-gyp-build "^4.2.0" semver@^7.3.5: - version "7.5.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.2.tgz#5b851e66d1be07c1cdaf37dfc856f543325a2beb" - integrity sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ== + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== dependencies: lru-cache "^6.0.0" diff --git a/bindings/nodejs/lib/bindings.ts b/bindings/nodejs/lib/bindings.ts index 7ab5f8fd21..a709d81841 100644 --- a/bindings/nodejs/lib/bindings.ts +++ b/bindings/nodejs/lib/bindings.ts @@ -1,12 +1,7 @@ // Copyright 2023 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { WalletEventType } from './types/wallet'; -import { Event } from './types/wallet'; -import type { WalletMethodHandler } from './wallet/wallet-method-handler'; import { __UtilsMethods__ } from './types/utils'; -import type { SecretManagerMethodHandler } from './secret_manager/secret-manager-method-handler'; -import type { ClientMethodHandler } from './client/client-method-handler'; // @ts-ignore: path is set to match runtime transpiled js path import addon = require('../build/Release/index.node'); @@ -29,38 +24,6 @@ const { migrateStrongholdSnapshotV2ToV3, } = addon; -const callClientMethodAsync = ( - method: string, - handler: ClientMethodHandler, -): Promise => - new Promise((resolve, reject) => { - callClientMethod(method, handler, (error: any, result: string) => { - if (error) { - reject(error); - } else { - resolve(result); - } - }); - }); - -const callSecretManagerMethodAsync = ( - method: string, - handler: SecretManagerMethodHandler, -): Promise => - new Promise((resolve, reject) => { - callSecretManagerMethod( - method, - handler, - (error: any, result: string) => { - if (error) { - reject(error); - } else { - resolve(result); - } - }, - ); - }); - const callUtilsMethod = (method: __UtilsMethods__): any => { const response = JSON.parse(callUtilsMethodRust(JSON.stringify(method))); if (response.type == 'error' || response.type == 'panic') { @@ -70,54 +33,18 @@ const callUtilsMethod = (method: __UtilsMethods__): any => { } }; -const listenWalletAsync = ( - eventTypes: WalletEventType[], - callback: (error: Error, event: Event) => void, - handler: WalletMethodHandler, -): Promise => { - return new Promise((resolve) => { - listenWallet( - eventTypes, - function (err: any, data: string) { - const parsed = JSON.parse(data); - callback( - // Send back raw error instead of parsing - err, - new Event(parsed.accountIndex, parsed.event), - ); - }, - handler, - ); - resolve(); - }); -}; - -const callWalletMethodAsync = ( - method: string, - handler: WalletMethodHandler, -): Promise => - new Promise((resolve, reject) => { - callWalletMethod(method, handler, (error: any, result: string) => { - if (error) { - reject(error); - } else { - resolve(result); - } - }); - }); - export { initLogger, createClient, destroyClient, createSecretManager, createWallet, - callClientMethodAsync, - callSecretManagerMethodAsync, + callClientMethod, + callSecretManagerMethod, callUtilsMethod, - callWalletMethodAsync, - listenWalletAsync, + callWalletMethod, destroyWallet, + listenWallet, getClientFromWallet, getSecretManagerFromWallet, listenMqtt, diff --git a/bindings/nodejs/lib/client/client-method-handler.ts b/bindings/nodejs/lib/client/client-method-handler.ts index 5fc500873b..3cb3c5dbd6 100644 --- a/bindings/nodejs/lib/client/client-method-handler.ts +++ b/bindings/nodejs/lib/client/client-method-handler.ts @@ -3,10 +3,10 @@ import { errorHandle } from '..'; import { - callClientMethodAsync, + callClientMethod, createClient, - listenMqtt as listenMqttRust, - destroyClient, + listenMqtt, + destroyClient } from '../bindings'; import type { IClientOptions, __ClientMethods__ } from '../types/client'; @@ -47,17 +47,7 @@ export class ClientMethodHandler { * @returns A promise that resolves to a JSON string response holding the result of the client method. */ async callMethod(method: __ClientMethods__): Promise { - return callClientMethodAsync( - // mapToObject is required to convert maps to array since they otherwise get serialized as `[{}]` even if not empty - JSON.stringify(method, function mapToObject(_key, value) { - if (value instanceof Map) { - return Object.fromEntries(value); - } else { - return value; - } - }), - this.methodHandler, - ).catch((error: any) => { + return callClientMethod(this.methodHandler, JSON.stringify(method)).catch((error: any) => { throw errorHandle(error); }); } @@ -73,7 +63,7 @@ export class ClientMethodHandler { callback: (error: Error, result: string) => void, ): void { try { - listenMqttRust(topics, callback, this.methodHandler); + listenMqtt(this.methodHandler, topics, callback); } catch (error: any) { throw errorHandle(error); } diff --git a/bindings/nodejs/lib/secret_manager/secret-manager-method-handler.ts b/bindings/nodejs/lib/secret_manager/secret-manager-method-handler.ts index 7e502f4b22..518e2d7778 100644 --- a/bindings/nodejs/lib/secret_manager/secret-manager-method-handler.ts +++ b/bindings/nodejs/lib/secret_manager/secret-manager-method-handler.ts @@ -3,7 +3,7 @@ import { errorHandle } from '..'; import { - callSecretManagerMethodAsync, + callSecretManagerMethod, createSecretManager, migrateStrongholdSnapshotV2ToV3, } from '../bindings'; @@ -41,16 +41,9 @@ export class SecretManagerMethodHandler { * @returns The JSON response of the method. */ async callMethod(method: __SecretManagerMethods__): Promise { - return callSecretManagerMethodAsync( - // mapToObject is required to convert maps to array since they otherwise get serialized as `[{}]` even if not empty - JSON.stringify(method, function mapToObject(_key, value) { - if (value instanceof Map) { - return Object.fromEntries(value); - } else { - return value; - } - }), + return callSecretManagerMethod( this.methodHandler, + JSON.stringify(method), ).catch((error: any) => { throw errorHandle(error); }); diff --git a/bindings/nodejs/lib/types/block/address.ts b/bindings/nodejs/lib/types/block/address.ts index 748fa3a6b5..b5b7c4889a 100644 --- a/bindings/nodejs/lib/types/block/address.ts +++ b/bindings/nodejs/lib/types/block/address.ts @@ -208,7 +208,7 @@ class RestrictedAddress extends Address { /** * The allowed capabilities bitflags. */ - private allowedCapabilities: HexEncodedString = '0x'; + private allowedCapabilities?: HexEncodedString; /** * @param address An address. */ @@ -227,7 +227,7 @@ class RestrictedAddress extends Address { allowedCapabilities.byteLength, ).toString('hex'); } else { - this.allowedCapabilities = '0x'; + this.allowedCapabilities = undefined; } } @@ -239,13 +239,20 @@ class RestrictedAddress extends Address { } getAllowedCapabilities(): Uint8Array { - return Uint8Array.from( - Buffer.from(this.allowedCapabilities.substring(2), 'hex'), - ); + return this.allowedCapabilities !== undefined + ? Uint8Array.from( + Buffer.from(this.allowedCapabilities.substring(2), 'hex'), + ) + : new Uint8Array(); } toString(): string { - return this.address.toString() + this.allowedCapabilities.substring(2); + return ( + this.address.toString() + + (this.allowedCapabilities !== undefined + ? this.allowedCapabilities.substring(2) + : '') + ); } } diff --git a/bindings/nodejs/lib/types/block/payload/signed_transaction/transaction.ts b/bindings/nodejs/lib/types/block/payload/signed_transaction/transaction.ts index e6e217c52e..0ab9c74689 100644 --- a/bindings/nodejs/lib/types/block/payload/signed_transaction/transaction.ts +++ b/bindings/nodejs/lib/types/block/payload/signed_transaction/transaction.ts @@ -44,7 +44,7 @@ class Transaction { readonly allotments: ManaAllotment[]; - private capabilities: HexEncodedString = '0x'; + private capabilities?: HexEncodedString; @Type(() => Payload, { discriminator: PayloadDiscriminator, @@ -91,7 +91,7 @@ class Transaction { capabilities.byteLength, ).toString('hex'); } else { - this.capabilities = '0x'; + this.capabilities = undefined; } } @@ -102,9 +102,11 @@ class Transaction { /** Get the capability bitflags of the transaction. */ getCapabilities(): Uint8Array { - return Uint8Array.from( - Buffer.from(this.capabilities.substring(2), 'hex'), - ); + return this.capabilities !== undefined + ? Uint8Array.from( + Buffer.from(this.capabilities.substring(2), 'hex'), + ) + : new Uint8Array(); } } diff --git a/bindings/nodejs/lib/types/wallet/account.ts b/bindings/nodejs/lib/types/wallet/account.ts deleted file mode 100644 index 5c4b947b0a..0000000000 --- a/bindings/nodejs/lib/types/wallet/account.ts +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright 2021-2023 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -import type { Bip44Address, AddressWithUnspentOutputs } from './address'; -import { AccountId, FoundryId, NftId } from '../block/id'; -import type { OutputData } from './output'; -import type { TransactionWithMetadata } from './transaction'; -import { CoinType } from '../../client'; -import { HexEncodedString, u256, u64 } from '../utils'; -import { Bech32Address } from '../block/address'; - -/** - * Account identifier - * Could be the account index (number) or account alias (string) - */ -export type AccountIdentifier = number | string; - -/** A balance */ -export interface Balance { - /** The balance of the base coin */ - baseCoin: BaseCoinBalance; - /** The required storage deposit for the outputs */ - requiredStorageDeposit: RequiredStorageDeposit; - /** The balance of the native tokens */ - nativeTokens: NativeTokenBalance[]; - /** Nft outputs */ - nfts: string[]; - /** Account outputs */ - accounts: string[]; - /** Foundry outputs */ - foundries: string[]; - /** - * Outputs with multiple unlock conditions and if they can currently be spent or not. If there is a - * TimelockUnlockCondition or ExpirationUnlockCondition this can change at any time - */ - potentiallyLockedOutputs: { [outputId: string]: boolean }; -} - -/** The balance of the base coin */ -export interface BaseCoinBalance { - /** The total amount of the outputs */ - total: u64; - /** The amount of the outputs that aren't used in a transaction */ - available: u64; - /** Voting power */ - votingPower: string; -} - -/** The required storage deposit per output type */ -export interface RequiredStorageDeposit { - /** The required amount for Alias outputs. */ - account: u64; - /** The required amount for Basic outputs. */ - basic: u64; - /** The required amount for Foundry outputs. */ - foundry: u64; - /** The required amount for NFT outputs. */ - nft: u64; -} - -/** The balance of a native token */ -export interface NativeTokenBalance { - /** The native token id. */ - tokenId: HexEncodedString; - /** Some metadata of the native token. */ - metadata?: string; - /** The total native token balance. */ - total: u256; - /** The available amount of the total native token balance. */ - available: u256; -} - -/** Sync options for an account */ -export interface SyncOptions { - /** - * Specific Bech32 encoded addresses of the account to sync, if addresses are provided, - * then `address_start_index` will be ignored - */ - addresses?: Bech32Address[]; - /** - * Address index from which to start syncing addresses. 0 by default, using a higher index will be faster because - * addresses with a lower index will be skipped, but could result in a wrong balance for that reason - */ - addressStartIndex?: number; - /** - * Address index from which to start syncing internal addresses. 0 by default, using a higher index will be faster - * because addresses with a lower index will be skipped, but could result in a wrong balance for that reason - */ - addressStartIndexInternal?: number; - /** - * Usually syncing is skipped if it's called in between 200ms, because there can only be new changes every - * milestone and calling it twice "at the same time" will not return new data - * When this to true, we will sync anyways, even if it's called 0ms after the las sync finished. Default: false. - */ - forceSyncing?: boolean; - /// Try to sync transactions from incoming outputs with their inputs. Some data may not be obtained if it has been - /// pruned. - syncIncomingTransactions?: boolean; - /** Checks pending transactions and reissues them if necessary. Default: true. */ - syncPendingTransactions?: boolean; - /** Specifies what outputs should be synced for the ed25519 addresses from the account. */ - account?: AccountSyncOptions; - /** Specifies what outputs should be synced for the address of an account output. */ - // TODO Rename when we are done with Account changes https://github.com/iotaledger/iota-sdk/issues/647. - alias?: AliasSyncOptions; - /** Specifies what outputs should be synced for the address of an nft output. */ - nft?: NftSyncOptions; - /** Specifies if only basic outputs with an AddressUnlockCondition alone should be synced, will overwrite `account`, `alias` and `nft` options. Default: false. */ - syncOnlyMostBasicOutputs?: boolean; - /** Sync native token foundries, so their metadata can be returned in the balance. Default: false. */ - syncNativeTokenFoundries?: boolean; -} - -/** Specifies what outputs should be synced for the ed25519 addresses from the account. */ -export interface AccountSyncOptions { - /** Whether to sync Basic outputs. */ - basicOutputs?: boolean; - /** Whether to sync Account outputs. */ - accountOutputs?: boolean; - /** Whether to sync NFT outputs. */ - nftOutputs?: boolean; -} - -/** Specifies what outputs should be synced for the address of an account output. */ -export interface AliasSyncOptions { - /** Whether to sync Basic outputs. */ - basicOutputs?: boolean; - /** Whether to sync Account outputs. */ - accountOutputs?: boolean; - /** Whether to sync NFT outputs. */ - nftOutputs?: boolean; - /** Whether to sync foundry outputs. */ - foundryOutputs?: boolean; -} - -/** Specifies what outputs should be synced for the address of an nft output. */ -export interface NftSyncOptions { - /** Whether to sync Basic outputs. */ - basicOutputs?: boolean; - /** Whether to sync Account outputs. */ - accountOutputs?: boolean; - /** Whether to sync NFT outputs. */ - nftOutputs?: boolean; -} - -/** The account object. */ -export interface AccountMeta { - /** The account index. */ - index: number; - /** The type of coin managed with the account. */ - coinType: CoinType; - /** The alias name of the account. */ - alias: string; - /** All public addresses. */ - publicAddresses: Bip44Address[]; - /** All internal addresses. */ - internalAddresses: Bip44Address[]; - /** All addresses with unspent outputs. */ - addressesWithUnspentOutputs: AddressWithUnspentOutputs[]; - /** All outputs of the account. */ - outputs: { [outputId: string]: OutputData }; - /** All IDs of unspent outputs that are currently used as inputs for transactions. */ - lockedOutputs: Set; - /** All unspent outputs of the account. */ - unspentOutputs: { [outputId: string]: OutputData }; - /** All transactions of the account. */ - transactions: { [transactionId: string]: TransactionWithMetadata }; - /** All pending transactions of the account. */ - pendingTransactions: Set; - /** All incoming transactions of the account (with their inputs if available and not already pruned). */ - incomingTransactions: { - [transactionId: string]: [TransactionWithMetadata]; - }; -} - -/** The account metadata. */ -export interface AccountMetadata { - /** The account alias */ - alias: string; - /** The used coin type */ - coinType: CoinType; - /** The account index which will be used in the BIP32 path */ - index: number; -} - -/** Options for account creation. */ -export interface CreateAccountPayload { - /** An account alias name. */ - alias?: string; - /** The Bech32 HRP (human readable part) to use. */ - bech32Hrp?: string; - /** BIP44 addresses to use. */ - addresses?: Bip44Address[]; -} - -/** Options to filter outputs */ -export interface FilterOptions { - /** Filter all outputs where the booked milestone index is below the specified timestamp */ - lowerBoundBookedTimestamp?: number; - /** Filter all outputs where the booked milestone index is above the specified timestamp */ - upperBoundBookedTimestamp?: number; - /** Filter all outputs for the provided types (Basic = 3, Account = 4, Foundry = 5, NFT = 6) */ - outputTypes?: number[]; - /** Return all account outputs matching these IDs. */ - accountIds?: AccountId[]; - /** Return all foundry outputs matching these IDs. */ - foundryIds?: FoundryId[]; - /** Return all NFT outputs matching these IDs. */ - nftIds?: NftId[]; -} diff --git a/bindings/nodejs/lib/types/wallet/address.ts b/bindings/nodejs/lib/types/wallet/address.ts index 72cb2566b4..04bc9b84b0 100644 --- a/bindings/nodejs/lib/types/wallet/address.ts +++ b/bindings/nodejs/lib/types/wallet/address.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { SlotIndex } from '../block/slot'; -import { Bech32Address, NftId, OutputId, TokenId } from '../block'; +import { Bech32Address, NftId, TokenId } from '../block'; import { NumericString, u256, u64 } from '../utils'; /** A Bip44 address */ @@ -35,18 +35,6 @@ export interface SendParams { expiration?: SlotIndex; } -/** Address with unspent outputs */ -export interface AddressWithUnspentOutputs { - /** The Bech32 address. */ - address: Bech32Address; - /** The address key index. */ - keyIndex: number; - /** Whether the address is a public or an internal (change) address. */ - internal: boolean; - /** The IDs of associated unspent outputs. */ - outputIds: OutputId[]; -} - /** Address with native tokens */ export interface SendNativeTokensParams { /** The Bech32 address. */ diff --git a/bindings/nodejs/lib/types/wallet/bridge/account.ts b/bindings/nodejs/lib/types/wallet/bridge/account.ts index 8c4b8cf6eb..a347917568 100644 --- a/bindings/nodejs/lib/types/wallet/bridge/account.ts +++ b/bindings/nodejs/lib/types/wallet/bridge/account.ts @@ -1,7 +1,6 @@ // Copyright 2023 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import type { SyncOptions, FilterOptions } from '../account'; import type { SendParams, SendNativeTokensParams, @@ -25,10 +24,12 @@ import type { } from '../participation'; import type { ConsolidationParams } from '../consolidation-params'; import { + FilterOptions, HexEncodedAmount, NumericString, Output, OutputId, + SyncOptions, TokenId, TransactionId, } from '../../'; @@ -145,6 +146,18 @@ export type __PendingTransactionsMethod__ = { name: 'pendingTransactions'; }; +export type __ImplicitAccountCreationAddressMethod__ = { + name: 'implicitAccountCreationAddress'; +}; + +export type __AccountsMethod__ = { + name: 'accounts'; +}; + +export type __ImplicitAccountsMethod__ = { + name: 'implicitAccounts'; +}; + export type __IncomingTransactionsMethod__ = { name: 'incomingTransactions'; }; diff --git a/bindings/nodejs/lib/types/wallet/bridge/index.ts b/bindings/nodejs/lib/types/wallet/bridge/index.ts index fc96daea69..2869168102 100644 --- a/bindings/nodejs/lib/types/wallet/bridge/index.ts +++ b/bindings/nodejs/lib/types/wallet/bridge/index.ts @@ -1,20 +1,19 @@ -import type { AccountIdentifier } from '../account'; import type { __PrepareBurnMethod__, __ClaimOutputsMethod__, __PrepareConsolidateOutputsMethod__, __PrepareCreateAccountOutputMethod__, __DeregisterParticipationEventMethod__, - __GenerateEd25519AddressesMethod__, __GetBalanceMethod__, __GetOutputMethod__, __GetFoundryOutputMethod__, __ClaimableOutputsMethod__, __GetTransactionMethod__, - __AddressesMethod__, - __AddressesWithUnspentOutputsMethod__, __OutputsMethod__, __PendingTransactionsMethod__, + __ImplicitAccountCreationAddressMethod__, + __AccountsMethod__, + __ImplicitAccountsMethod__, __IncomingTransactionsMethod__, __TransactionsMethod__, __UnspentOutputsMethod__, @@ -48,23 +47,14 @@ import type { __PrepareIncreaseVotingPowerMethod__, __PrepareDecreaseVotingPowerMethod__, __PrepareStopParticipatingMethod__, -} from './account'; -import type { __BackupMethod__, __ChangeStrongholdPasswordMethod__, __ClearStrongholdPasswordMethod__, __ClearListenersMethod__, - __CreateAccountMethod__, __EmitTestEventMethod__, __GenerateMnemonicMethod__, - __GetAccountMethod__, - __GetAccountIndexesMethod__, - __GetAccountsMethod__, __GetLedgerNanoStatusMethod__, - __GenerateEd25519AddressMethod__, __IsStrongholdPasswordAvailableMethod__, - __RecoverAccountsMethod__, - __RemoveLatestAccountMethod__, __RestoreBackupMethod__, __SetClientOptionsMethod__, __SetStrongholdPasswordClearIntervalMethod__, @@ -73,15 +63,15 @@ import type { __StopBackgroundSyncMethod__, __StoreMnemonicMethod__, __UpdateNodeAuthMethod__, + __AddressMethod__, } from './wallet'; -export type __AccountMethod__ = +export type __WalletMethod__ = | __PrepareBurnMethod__ | __ClaimOutputsMethod__ | __PrepareConsolidateOutputsMethod__ | __PrepareCreateAccountOutputMethod__ | __DeregisterParticipationEventMethod__ - | __GenerateEd25519AddressesMethod__ | __GetBalanceMethod__ | __GetOutputMethod__ | __GetIncomingTransactionMethod__ @@ -92,10 +82,11 @@ export type __AccountMethod__ = | __GetParticipationEventsMethod__ | __GetParticipationEventStatusMethod__ | __GetTransactionMethod__ - | __AddressesMethod__ - | __AddressesWithUnspentOutputsMethod__ | __OutputsMethod__ | __PendingTransactionsMethod__ + | __ImplicitAccountCreationAddressMethod__ + | __AccountsMethod__ + | __ImplicitAccountsMethod__ | __IncomingTransactionsMethod__ | __TransactionsMethod__ | __UnspentOutputsMethod__ @@ -123,33 +114,15 @@ export type __AccountMethod__ = | __PrepareStopParticipatingMethod__ | __GetParticipationOverviewMethod__ | __PrepareIncreaseVotingPowerMethod__ - | __PrepareDecreaseVotingPowerMethod__; - -export type __CallAccountMethodMethod__ = { - name: 'callAccountMethod'; - data: { - accountId: AccountIdentifier; - method: __AccountMethod__; - }; -}; - -export type __Method__ = + | __PrepareDecreaseVotingPowerMethod__ | __BackupMethod__ - | __CallAccountMethodMethod__ | __ChangeStrongholdPasswordMethod__ | __ClearListenersMethod__ | __ClearStrongholdPasswordMethod__ - | __CreateAccountMethod__ | __EmitTestEventMethod__ | __GenerateMnemonicMethod__ - | __GetAccountMethod__ - | __GetAccountIndexesMethod__ - | __GetAccountsMethod__ | __GetLedgerNanoStatusMethod__ - | __GenerateEd25519AddressMethod__ | __IsStrongholdPasswordAvailableMethod__ - | __RecoverAccountsMethod__ - | __RemoveLatestAccountMethod__ | __RestoreBackupMethod__ | __SetClientOptionsMethod__ | __SetStrongholdPasswordClearIntervalMethod__ @@ -157,4 +130,5 @@ export type __Method__ = | __StartBackgroundSyncMethod__ | __StopBackgroundSyncMethod__ | __StoreMnemonicMethod__ - | __UpdateNodeAuthMethod__; + | __UpdateNodeAuthMethod__ + | __AddressMethod__; diff --git a/bindings/nodejs/lib/types/wallet/bridge/wallet.ts b/bindings/nodejs/lib/types/wallet/bridge/wallet.ts index 473050a7cb..63dc52caa8 100644 --- a/bindings/nodejs/lib/types/wallet/bridge/wallet.ts +++ b/bindings/nodejs/lib/types/wallet/bridge/wallet.ts @@ -1,11 +1,44 @@ -import type { - AccountIdentifier, - CreateAccountPayload, - SyncOptions, -} from '../account'; -import type { GenerateAddressOptions } from '../address'; +import type { SyncOptions, FilterOptions } from '../wallet'; import type { WalletEventType, WalletEvent } from '../event'; -import type { IAuth, IClientOptions } from '../../client'; +import type { + IAuth, + IClientOptions, + Burn, + INode, + PreparedTransactionData, +} from '../../client'; +import type { + SendParams, + SendNativeTokensParams, + SendNftParams, +} from '../address'; +import type { OutputParams } from '../output-params'; +import type { OutputsToClaim } from '../output'; +import type { SignedTransactionData } from '../signed-transaction-data'; +import type { + AccountOutputParams, + CreateNativeTokenParams, + TransactionOptions, + MintNftParams, +} from '../transaction-options'; +import type { + ParticipationEventId, + ParticipationEventRegistrationOptions, + ParticipationEventType, +} from '../participation'; +import type { ConsolidationParams } from '../consolidation-params'; +import { + HexEncodedAmount, + NumericString, + Output, + OutputId, + TokenId, + TransactionId, +} from '../../'; + +export type __AccountsMethod__ = { + name: 'accounts'; +}; export type __BackupMethod__ = { name: 'backup'; @@ -32,11 +65,6 @@ export type __ClearListenersMethod__ = { data: { eventTypes: WalletEventType[] }; }; -export type __CreateAccountMethod__ = { - name: 'createAccount'; - data: CreateAccountPayload; -}; - export type __EmitTestEventMethod__ = { name: 'emitTestEvent'; data: { event: WalletEvent }; @@ -46,51 +74,14 @@ export type __GenerateMnemonicMethod__ = { name: 'generateMnemonic'; }; -export type __GetAccountIndexesMethod__ = { - name: 'getAccountIndexes'; -}; - -export type __GetAccountsMethod__ = { - name: 'getAccounts'; -}; - -export type __GetAccountMethod__ = { - name: 'getAccount'; - data: { accountId: AccountIdentifier }; -}; - export type __GetLedgerNanoStatusMethod__ = { name: 'getLedgerNanoStatus'; }; -export type __GenerateEd25519AddressMethod__ = { - name: 'generateEd25519Address'; - data: { - accountIndex: number; - addressIndex: number; - options?: GenerateAddressOptions; - bech32Hrp?: string; - }; -}; - export type __IsStrongholdPasswordAvailableMethod__ = { name: 'isStrongholdPasswordAvailable'; }; -export type __RecoverAccountsMethod__ = { - name: 'recoverAccounts'; - data: { - accountStartIndex: number; - accountGapLimit: number; - addressGapLimit: number; - syncOptions?: SyncOptions; - }; -}; - -export type __RemoveLatestAccountMethod__ = { - name: 'removeLatestAccount'; -}; - export type __RestoreBackupMethod__ = { name: 'restoreBackup'; data: { @@ -137,3 +128,336 @@ export type __UpdateNodeAuthMethod__ = { name: 'updateNodeAuth'; data: { url: string; auth?: IAuth }; }; + +export type __PrepareBurnMethod__ = { + name: 'prepareBurn'; + data: { + burn: Burn; + options?: TransactionOptions; + }; +}; + +export type __ClaimOutputsMethod__ = { + name: 'claimOutputs'; + data: { + outputIdsToClaim: OutputId[]; + }; +}; + +export type __PrepareConsolidateOutputsMethod__ = { + name: 'prepareConsolidateOutputs'; + data: { + params: ConsolidationParams; + }; +}; + +export type __PrepareCreateAccountOutputMethod__ = { + name: 'prepareCreateAccountOutput'; + data: { + params?: AccountOutputParams; + options?: TransactionOptions; + }; +}; + +export type __PrepareMeltNativeTokenMethod__ = { + name: 'prepareMeltNativeToken'; + data: { + tokenId: TokenId; + meltAmount: HexEncodedAmount; + options?: TransactionOptions; + }; +}; + +export type __DeregisterParticipationEventMethod__ = { + name: 'deregisterParticipationEvent'; + data: { + eventId: ParticipationEventId; + }; +}; + +export type __GetBalanceMethod__ = { + name: 'getBalance'; +}; + +export type __GetIncomingTransactionMethod__ = { + name: 'getIncomingTransaction'; + data: { + transactionId: TransactionId; + }; +}; + +export type __GetOutputMethod__ = { + name: 'getOutput'; + data: { + outputId: OutputId; + }; +}; + +export type __GetFoundryOutputMethod__ = { + name: 'getFoundryOutput'; + data: { + tokenId: TokenId; + }; +}; + +export type __ClaimableOutputsMethod__ = { + name: 'claimableOutputs'; + data: { + outputsToClaim: OutputsToClaim; + }; +}; + +export type __GetTransactionMethod__ = { + name: 'getTransaction'; + data: { + transactionId: TransactionId; + }; +}; + +export type __AddressMethod__ = { + name: 'getAddress'; +}; + +export type __OutputsMethod__ = { + name: 'outputs'; + data: { + filterOptions?: FilterOptions; + }; +}; + +export type __PendingTransactionsMethod__ = { + name: 'pendingTransactions'; +}; + +export type __ImplicitAccountCreationAddressMethod__ = { + name: 'implicitAccountCreationAddress'; +}; + +export type __ImplicitAccountsMethod__ = { + name: 'implicitAccounts'; +}; + +export type __IncomingTransactionsMethod__ = { + name: 'incomingTransactions'; +}; + +export type __TransactionsMethod__ = { + name: 'transactions'; +}; + +export type __UnspentOutputsMethod__ = { + name: 'unspentOutputs'; + data: { + filterOptions?: FilterOptions; + }; +}; + +export type __PrepareMintNativeTokenMethod__ = { + name: 'prepareMintNativeToken'; + data: { + tokenId: TokenId; + mintAmount: HexEncodedAmount; + options?: TransactionOptions; + }; +}; + +export type __PrepareCreateNativeTokenMethod__ = { + name: 'prepareCreateNativeToken'; + data: { + params: CreateNativeTokenParams; + options?: TransactionOptions; + }; +}; + +export type __PrepareMintNftsMethod__ = { + name: 'prepareMintNfts'; + data: { + params: MintNftParams[]; + options?: TransactionOptions; + }; +}; + +export type __PrepareOutputMethod__ = { + name: 'prepareOutput'; + data: { + params: OutputParams; + transactionOptions?: TransactionOptions; + }; +}; + +export type __PrepareSendMethod__ = { + name: 'prepareSend'; + data: { + params: SendParams[]; + options?: TransactionOptions; + }; +}; + +export type __PrepareTransactionMethod__ = { + name: 'prepareTransaction'; + data: { + outputs: Output[]; + options?: TransactionOptions; + }; +}; + +export type __RegisterParticipationEventsMethod__ = { + name: 'registerParticipationEvents'; + data: { + options: ParticipationEventRegistrationOptions; + }; +}; + +export type __ReissueTransactionUntilIncludedMethod__ = { + name: 'reissueTransactionUntilIncluded'; + data: { + transactionId: TransactionId; + interval?: number; + maxAttempts?: number; + }; +}; + +export type __SendMethod__ = { + name: 'send'; + data: { + amount: NumericString; + address: string; + options?: TransactionOptions; + }; +}; + +export type __SendWithParamsMethod__ = { + name: 'sendWithParams'; + data: { + params: SendParams[]; + options?: TransactionOptions; + }; +}; + +export type __PrepareSendNativeTokensMethod__ = { + name: 'prepareSendNativeTokens'; + data: { + params: SendNativeTokensParams[]; + options?: TransactionOptions; + }; +}; + +export type __PrepareSendNftMethod__ = { + name: 'prepareSendNft'; + data: { + params: SendNftParams[]; + options?: TransactionOptions; + }; +}; + +export type __SendOutputsMethod__ = { + name: 'sendOutputs'; + data: { + outputs: Output[]; + options?: TransactionOptions; + }; +}; + +export type __SetAliasMethod__ = { + name: 'setAlias'; + data: { + alias: string; + }; +}; + +export type __SetDefaultSyncOptionsMethod__ = { + name: 'setDefaultSyncOptions'; + data: { + options: SyncOptions; + }; +}; + +export type __SignTransactionMethod__ = { + name: 'signTransaction'; + data: { + preparedTransactionData: PreparedTransactionData; + }; +}; + +export type __SignAndSubmitTransactionMethod__ = { + name: 'signAndSubmitTransaction'; + data: { + preparedTransactionData: PreparedTransactionData; + }; +}; + +export type __SubmitAndStoreTransactionMethod__ = { + name: 'submitAndStoreTransaction'; + data: { + signedTransactionData: SignedTransactionData; + }; +}; + +export type __SyncAccountMethod__ = { + name: 'sync'; + data: { + options?: SyncOptions; + }; +}; + +export type __PrepareVoteMethod__ = { + name: 'prepareVote'; + data: { + eventId?: ParticipationEventId; + answers?: number[]; + }; +}; + +export type __PrepareStopParticipatingMethod__ = { + name: 'prepareStopParticipating'; + data: { + eventId: ParticipationEventId; + }; +}; + +export type __GetParticipationOverviewMethod__ = { + name: 'getParticipationOverview'; + data: { + eventIds?: ParticipationEventId[]; + }; +}; + +export type __PrepareIncreaseVotingPowerMethod__ = { + name: 'prepareIncreaseVotingPower'; + data: { + amount: NumericString; + }; +}; + +export type __GetParticipationEventMethod__ = { + name: 'getParticipationEvent'; + data: { + eventId: ParticipationEventId; + }; +}; + +export type __GetParticipationEventIdsMethod__ = { + name: 'getParticipationEventIds'; + data: { + node: INode; + eventType?: ParticipationEventType; + }; +}; + +export type __GetParticipationEventsMethod__ = { + name: 'getParticipationEvents'; +}; + +export type __GetParticipationEventStatusMethod__ = { + name: 'getParticipationEventStatus'; + data: { + eventId: ParticipationEventId; + }; +}; + +export type __PrepareDecreaseVotingPowerMethod__ = { + name: 'prepareDecreaseVotingPower'; + data: { + amount: NumericString; + }; +}; diff --git a/bindings/nodejs/lib/types/wallet/index.ts b/bindings/nodejs/lib/types/wallet/index.ts index f60a142026..4f217263fd 100644 --- a/bindings/nodejs/lib/types/wallet/index.ts +++ b/bindings/nodejs/lib/types/wallet/index.ts @@ -1,7 +1,6 @@ // Copyright 2023 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -export * from './account'; export * from './wallet'; export * from './address'; export * from './bridge'; diff --git a/bindings/nodejs/lib/types/wallet/prepared-create-token-transaction.ts b/bindings/nodejs/lib/types/wallet/prepared-create-token-transaction.ts index 0e708f812a..9fe0e0d726 100644 --- a/bindings/nodejs/lib/types/wallet/prepared-create-token-transaction.ts +++ b/bindings/nodejs/lib/types/wallet/prepared-create-token-transaction.ts @@ -1,8 +1,7 @@ // Copyright 2021-2023 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { Account, PreparedCreateNativeTokenTransactionData } from '../..'; - +import { Wallet, PreparedCreateNativeTokenTransactionData } from '../..'; import { PreparedTransaction } from './prepared-transaction'; /* @@ -13,13 +12,13 @@ export class PreparedCreateNativeTokenTransaction extends PreparedTransaction { /** * @param preparedData Prepared data to create a Native Token. - * @param account A wallet account. + * @param wallet A wallet. */ constructor( preparedData: PreparedCreateNativeTokenTransactionData, - account: Account, + wallet: Wallet, ) { - super(preparedData.transaction, account); + super(preparedData.transaction, wallet); this._tokenId = preparedData.tokenId; } diff --git a/bindings/nodejs/lib/types/wallet/prepared-transaction.ts b/bindings/nodejs/lib/types/wallet/prepared-transaction.ts index 41e1cc62d3..89ca2cfaaa 100644 --- a/bindings/nodejs/lib/types/wallet/prepared-transaction.ts +++ b/bindings/nodejs/lib/types/wallet/prepared-transaction.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { - Account, + Wallet, PreparedTransactionData, SignedTransactionData, TransactionWithMetadata, @@ -11,20 +11,20 @@ import { /** * PreparedTransaction` is a class that represents prepared transaction data, which * is useful for offline signing. It contains the prepared transaction data and an - * `Account` object. It provides methods to retrieve the prepared transaction data, sign + * `Wallet` object. It provides methods to retrieve the prepared transaction data, sign * the transaction and sign+submit/send the transaction. */ export class PreparedTransaction { readonly _preparedData: PreparedTransactionData; - readonly _account: Account; + readonly _wallet: Wallet; /** * @param preparedData Prepared data to sign and submit a transaction. - * @param account A wallet account. + * @param wallet A wallet. */ - constructor(preparedData: PreparedTransactionData, account: Account) { + constructor(preparedData: PreparedTransactionData, wallet: Wallet) { this._preparedData = preparedData; - this._account = account; + this._wallet = wallet; } /** @@ -53,7 +53,7 @@ export class PreparedTransaction { } /** - * This function signs a prepared transaction using the account's private key and returns + * This function signs a prepared transaction using the wallet's private key and returns * the signed transaction. * * Returns: @@ -61,7 +61,7 @@ export class PreparedTransaction { * A `Promise` that resolves to a `SignedTransactionData` object. */ public async sign(): Promise { - return this._account.signTransaction(this.preparedTransactionData()); + return this._wallet.signTransaction(this.preparedTransactionData()); } /** @@ -72,7 +72,7 @@ export class PreparedTransaction { * A Promise that resolves to a TransactionWithMetadata object. */ public async signAndSubmitTransaction(): Promise { - return this._account.signAndSubmitTransaction( + return this._wallet.signAndSubmitTransaction( this.preparedTransactionData(), ); } diff --git a/bindings/nodejs/lib/types/wallet/wallet.ts b/bindings/nodejs/lib/types/wallet/wallet.ts index 6b4c48451b..e40cc53203 100644 --- a/bindings/nodejs/lib/types/wallet/wallet.ts +++ b/bindings/nodejs/lib/types/wallet/wallet.ts @@ -1,14 +1,154 @@ -import { IClientOptions, CoinType } from '../client'; -import { SecretManagerType } from '../secret_manager/secret-manager'; +// Copyright 2021-2023 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +import { AccountId, DelegationId, FoundryId, NftId } from '../block/id'; +import { HexEncodedString, u256, u64 } from '../utils'; +import { IClientOptions } from '../client'; +import { Bip44, SecretManagerType } from '../secret_manager/secret-manager'; +import { Bech32Address } from '../block'; /** Options for the Wallet builder. */ export interface WalletOptions { - /** The path to the wallet database. */ - storagePath?: string; + /** The wallet address. */ + address?: Bech32Address; + /** The alias of the wallet. */ + alias?: string; + /** The the BIP44 path of the wallet. */ + bipPath?: Bip44; /** The node client options. */ clientOptions?: IClientOptions; - /** The type of coin stored with the wallet. */ - coinType?: CoinType; /** The secret manager to use. */ secretManager?: SecretManagerType; + /** The path to the wallet database. */ + storagePath?: string; +} + +/** A balance */ +export interface Balance { + /** The balance of the base coin */ + baseCoin: BaseCoinBalance; + /** The required storage deposit for the outputs */ + requiredStorageDeposit: RequiredStorageDeposit; + /** The balance of the native tokens */ + nativeTokens: NativeTokenBalance[]; + /** Nft outputs */ + nfts: string[]; + /** Account outputs */ + accounts: string[]; + /** Foundry outputs */ + foundries: string[]; + /** + * Outputs with multiple unlock conditions and if they can currently be spent or not. If there is a + * TimelockUnlockCondition or ExpirationUnlockCondition this can change at any time + */ + potentiallyLockedOutputs: { [outputId: string]: boolean }; +} + +/** The balance of the base coin */ +export interface BaseCoinBalance { + /** The total amount of the outputs */ + total: u64; + /** The amount of the outputs that aren't used in a transaction */ + available: u64; + /** Voting power */ + votingPower: string; +} + +/** The required storage deposit per output type */ +export interface RequiredStorageDeposit { + /** The required amount for Alias outputs. */ + account: u64; + /** The required amount for Basic outputs. */ + basic: u64; + /** The required amount for Foundry outputs. */ + foundry: u64; + /** The required amount for NFT outputs. */ + nft: u64; +} + +/** The balance of a native token */ +export interface NativeTokenBalance { + /** The native token id. */ + tokenId: HexEncodedString; + /** Some metadata of the native token. */ + metadata?: string; + /** The total native token balance. */ + total: u256; + /** The available amount of the total native token balance. */ + available: u256; +} + +/** Sync options for an account */ +export interface SyncOptions { + /** + * Usually syncing is skipped if it's called in between 200ms, because there can only be new changes every + * milestone and calling it twice "at the same time" will not return new data + * When this to true, we will sync anyways, even if it's called 0ms after the las sync finished. Default: false. + */ + forceSyncing?: boolean; + /// Try to sync transactions from incoming outputs with their inputs. Some data may not be obtained if it has been + /// pruned. + syncIncomingTransactions?: boolean; + /** Checks pending transactions and reissues them if necessary. Default: true. */ + syncPendingTransactions?: boolean; + /** Specifies what outputs should be synced for the ed25519 address from the wallet. */ + wallet?: WalletSyncOptions; + /** Specifies what outputs should be synced for the address of an account output. */ + account?: AccountSyncOptions; + /** Specifies what outputs should be synced for the address of an nft output. */ + nft?: NftSyncOptions; + /** Specifies if only basic outputs with an AddressUnlockCondition alone should be synced, will overwrite `wallet`, `account` and `nft` options. Default: false. */ + syncOnlyMostBasicOutputs?: boolean; + /** Sync native token foundries, so their metadata can be returned in the balance. Default: false. */ + syncNativeTokenFoundries?: boolean; +} + +/** Specifies what outputs should be synced for the ed25519 address from the wallet. */ +export interface WalletSyncOptions { + /** Whether to sync Basic outputs. */ + basicOutputs?: boolean; + /** Whether to sync Account outputs. */ + accountOutputs?: boolean; + /** Whether to sync NFT outputs. */ + nftOutputs?: boolean; +} + +/** Specifies what outputs should be synced for the address of an account output. */ +export interface AccountSyncOptions { + /** Whether to sync Basic outputs. */ + basicOutputs?: boolean; + /** Whether to sync Account outputs. */ + accountOutputs?: boolean; + /** Whether to sync NFT outputs. */ + nftOutputs?: boolean; + /** Whether to sync foundry outputs. */ + foundryOutputs?: boolean; +} + +/** Specifies what outputs should be synced for the address of an nft output. */ +export interface NftSyncOptions { + /** Whether to sync Basic outputs. */ + basicOutputs?: boolean; + /** Whether to sync Account outputs. */ + accountOutputs?: boolean; + /** Whether to sync NFT outputs. */ + nftOutputs?: boolean; +} + +/** Options to filter outputs */ +export interface FilterOptions { + /** Filter all outputs where the booked milestone index is below the specified timestamp */ + lowerBoundBookedTimestamp?: number; + /** Filter all outputs where the booked milestone index is above the specified timestamp */ + upperBoundBookedTimestamp?: number; + /** Filter all outputs for the provided types (Basic = 3, Account = 4, Foundry = 5, NFT = 6) */ + outputTypes?: number[]; + /** Return all account outputs matching these IDs. */ + accountIds?: AccountId[]; + /** Return all foundry outputs matching these IDs. */ + foundryIds?: FoundryId[]; + /** Return all NFT outputs matching these IDs. */ + nftIds?: NftId[]; + /** Return all delegation outputs matching these IDs. */ + delegationIds?: DelegationId[]; } diff --git a/bindings/nodejs/lib/wallet/account.ts b/bindings/nodejs/lib/wallet/account.ts deleted file mode 100644 index 7f292745e9..0000000000 --- a/bindings/nodejs/lib/wallet/account.ts +++ /dev/null @@ -1,1595 +0,0 @@ -// Copyright 2023 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -import type { WalletMethodHandler } from './wallet-method-handler'; -import { - Balance, - AccountMetadata, - SyncOptions, - AccountMeta, - Bip44Address, - SendParams, - SendNativeTokensParams, - SendNftParams, - AddressWithUnspentOutputs, - AccountOutputParams, - FilterOptions, - GenerateAddressOptions, - CreateNativeTokenParams, - MintNftParams, - OutputData, - OutputParams, - OutputsToClaim, - TransactionWithMetadata, - TransactionOptions, - ParticipationOverview, - ParticipationEventId, - ParticipationEventStatus, - ParticipationEventType, - ParticipationEventWithNodes, - ParticipationEventRegistrationOptions, - ParticipationEventMap, - SignedTransactionData, - PreparedTransaction, - PreparedCreateNativeTokenTransactionData, - ConsolidationParams, -} from '../types/wallet'; -import { INode, Burn, PreparedTransactionData } from '../client'; -import { - Output, - FoundryOutput, - Response, - PreparedCreateNativeTokenTransaction, - u64, - u256, - NftId, - TokenId, - OutputId, - AccountId, - FoundryId, - TransactionId, - NumericString, - Bech32Address, -} from '../types'; -import { plainToInstance } from 'class-transformer'; -import { bigIntToHex, hexToBigInt } from '../types/utils/hex-encoding'; - -/** The Account class. */ -export class Account { - // private because the data isn't updated - private meta: AccountMeta; - private methodHandler: WalletMethodHandler; - - /** - * @param accountMeta An instance of `AccountMeta`. - * @param methodHandler A instance of `WalletMethodHandler`. - */ - constructor(accountMeta: AccountMeta, methodHandler: WalletMethodHandler) { - this.meta = accountMeta; - this.methodHandler = methodHandler; - } - - /** - * A generic function that can be used to burn native tokens, nfts, foundries and accounts. - * @param burn The outputs or native tokens to burn - * @param transactionOptions Additional transaction options - * or custom inputs. - * @returns The transaction. - */ - async burn( - burn: Burn, - transactionOptions?: TransactionOptions, - ): Promise { - return (await this.prepareBurn(burn, transactionOptions)).send(); - } - - /** - * A generic function that can be used to prepare to burn native tokens, nfts, foundries and accounts. - * @param burn The outputs or native tokens to burn - * @param transactionOptions Additional transaction options - * @returns The prepared transaction. - */ - async prepareBurn( - burn: Burn, - transactionOptions?: TransactionOptions, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'prepareBurn', - data: { - burn, - options: transactionOptions, - }, - }, - ); - const parsed = JSON.parse( - response, - ) as Response; - return new PreparedTransaction( - plainToInstance(PreparedTransactionData, parsed.payload), - this, - ); - } - - /** - * Burn native tokens. This doesn't require the foundry output which minted them, but will not increase - * the foundries `melted_tokens` field, which makes it impossible to destroy the foundry output. Therefore it's - * recommended to use melting, if the foundry output is available. - * @param tokenId The native token id. - * @param burnAmount The to be burned amount. - * @param transactionOptions Additional transaction options - * or custom inputs. - * @returns The prepared transaction. - */ - async prepareBurnNativeToken( - tokenId: TokenId, - burnAmount: u256, - transactionOptions?: TransactionOptions, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'prepareBurn', - data: { - burn: { - nativeTokens: new Map([[tokenId, burnAmount]]), - }, - options: transactionOptions, - }, - }, - ); - const parsed = JSON.parse( - response, - ) as Response; - return new PreparedTransaction( - plainToInstance(PreparedTransactionData, parsed.payload), - this, - ); - } - - /** - * Burn an nft output. - * @param nftId The NftId. - * @param transactionOptions Additional transaction options - * or custom inputs. - * @returns The prepared transaction. - */ - async prepareBurnNft( - nftId: NftId, - transactionOptions?: TransactionOptions, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'prepareBurn', - data: { - burn: { - nfts: [nftId], - }, - options: transactionOptions, - }, - }, - ); - const parsed = JSON.parse( - response, - ) as Response; - return new PreparedTransaction( - plainToInstance(PreparedTransactionData, parsed.payload), - this, - ); - } - - /** - * Claim basic or nft outputs that have additional unlock conditions - * to their `AddressUnlockCondition` from the account. - * @param outputIds The outputs to claim. - * @returns The resulting transaction. - */ - async claimOutputs( - outputIds: OutputId[], - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'claimOutputs', - data: { - outputIdsToClaim: outputIds, - }, - }, - ); - const parsed = JSON.parse( - response, - ) as Response; - return plainToInstance(TransactionWithMetadata, parsed.payload); - } - - /** - * Consolidate basic outputs with only an `AddressUnlockCondition` from an account - * by sending them to an own address again if the output amount is greater or - * equal to the output consolidation threshold. - * @param params Consolidation options. - * @returns The consolidation transaction. - */ - async consolidateOutputs( - params: ConsolidationParams, - ): Promise { - return (await this.prepareConsolidateOutputs(params)).send(); - } - - /** - * Consolidate basic outputs with only an `AddressUnlockCondition` from an account - * by sending them to an own address again if the output amount is greater or - * equal to the output consolidation threshold. - * @param params Consolidation options. - * @returns The prepared consolidation transaction. - */ - async prepareConsolidateOutputs( - params: ConsolidationParams, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'prepareConsolidateOutputs', - data: { - params, - }, - }, - ); - const parsed = JSON.parse( - response, - ) as Response; - return new PreparedTransaction( - plainToInstance(PreparedTransactionData, parsed.payload), - this, - ); - } - - /** - * Creates an account output. - * @param params The account output options. - * @param transactionOptions Additional transaction options - * or custom inputs. - * @returns The transaction. - */ - async createAccountOutput( - params?: AccountOutputParams, - transactionOptions?: TransactionOptions, - ): Promise { - return ( - await this.prepareCreateAccountOutput(params, transactionOptions) - ).send(); - } - - /** - * Creates an account output. - * @param params The account output options. - * @param transactionOptions Additional transaction options - * or custom inputs. - * @returns The prepared transaction. - */ - async prepareCreateAccountOutput( - params?: AccountOutputParams, - transactionOptions?: TransactionOptions, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'prepareCreateAccountOutput', - data: { - params, - options: transactionOptions, - }, - }, - ); - const parsed = JSON.parse( - response, - ) as Response; - return new PreparedTransaction( - plainToInstance(PreparedTransactionData, parsed.payload), - this, - ); - } - - /** - * Melt native tokens. This happens with the foundry output which minted them, by increasing its - * `melted_tokens` field. - * @param tokenId The native token id. - * @param meltAmount To be melted amount. - * @param transactionOptions Additional transaction options - * or custom inputs. - * @returns The transaction. - */ - async meltNativeToken( - tokenId: TokenId, - meltAmount: bigint, - transactionOptions?: TransactionOptions, - ): Promise { - return ( - await this.prepareMeltNativeToken( - tokenId, - meltAmount, - transactionOptions, - ) - ).send(); - } - - /** - * Melt native tokens. This happens with the foundry output which minted them, by increasing its - * `melted_tokens` field. - * @param tokenId The native token id. - * @param meltAmount To be melted amount. - * @param transactionOptions Additional transaction options - * or custom inputs. - * @returns The prepared transaction. - */ - async prepareMeltNativeToken( - tokenId: TokenId, - meltAmount: u256, - transactionOptions?: TransactionOptions, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'prepareMeltNativeToken', - data: { - tokenId, - meltAmount: bigIntToHex(meltAmount), - options: transactionOptions, - }, - }, - ); - const parsed = JSON.parse( - response, - ) as Response; - return new PreparedTransaction( - plainToInstance(PreparedTransactionData, parsed.payload), - this, - ); - } - - /** - * Deregister a participation event. - * - * @param eventId The id of the participation event to deregister. - */ - async deregisterParticipationEvent( - eventId: ParticipationEventId, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'deregisterParticipationEvent', - data: { - eventId, - }, - }, - ); - return JSON.parse(response).payload; - } - - /** - * Destroy an account output. - * - * @param accountId The AccountId. - * @param transactionOptions Additional transaction options - * or custom inputs. - * @returns The prepared transaction. - */ - async prepareDestroyAccount( - accountId: AccountId, - transactionOptions?: TransactionOptions, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'prepareBurn', - data: { - burn: { - accounts: [accountId], - }, - options: transactionOptions, - }, - }, - ); - const parsed = JSON.parse( - response, - ) as Response; - return new PreparedTransaction( - plainToInstance(PreparedTransactionData, parsed.payload), - this, - ); - } - - /** - * Function to destroy a foundry output with a circulating supply of 0. - * Native tokens in the foundry (minted by other foundries) will be transacted to the controlling account. - * @param foundryId The FoundryId. - * @param transactionOptions Additional transaction options - * or custom inputs. - * @returns The prepared transaction. - */ - async prepareDestroyFoundry( - foundryId: FoundryId, - transactionOptions?: TransactionOptions, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'prepareBurn', - data: { - burn: { - foundries: [foundryId], - }, - options: transactionOptions, - }, - }, - ); - const parsed = JSON.parse( - response, - ) as Response; - return new PreparedTransaction( - plainToInstance(PreparedTransactionData, parsed.payload), - this, - ); - } - - /** - * Generate new unused Ed25519 addresses. - * - * @param amount The amount of addresses to generate. - * @param options Options for address generation. - * @returns The addresses. - */ - async generateEd25519Addresses( - amount: number, - options?: GenerateAddressOptions, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'generateEd25519Addresses', - data: { - amount, - options, - }, - }, - ); - return JSON.parse(response).payload; - } - - /** - * Get the account balance. - * - * @returns The account balance. - */ - async getBalance(): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'getBalance', - }, - ); - const payload = JSON.parse(response).payload; - return this.adjustBalancePayload(payload); - } - - /** - * Converts hex encoded or decimal strings of amounts to `bigint` - * for the balance payload. - */ - private adjustBalancePayload(payload: any): Balance { - for (let i = 0; i < payload.nativeTokens.length; i++) { - payload.nativeTokens[i].total = hexToBigInt( - payload.nativeTokens[i].total, - ); - payload.nativeTokens[i].available = hexToBigInt( - payload.nativeTokens[i].available, - ); - } - payload.baseCoin.total = BigInt(payload.baseCoin.total); - payload.baseCoin.available = BigInt(payload.baseCoin.available); - - payload.requiredStorageDeposit.account = BigInt( - payload.requiredStorageDeposit.account, - ); - payload.requiredStorageDeposit.basic = BigInt( - payload.requiredStorageDeposit.basic, - ); - payload.requiredStorageDeposit.foundry = BigInt( - payload.requiredStorageDeposit.foundry, - ); - payload.requiredStorageDeposit.nft = BigInt( - payload.requiredStorageDeposit.nft, - ); - - return payload; - } - - /** - * Get the data for an output. - * @param outputId The output to get. - * @returns The `OutputData`. - */ - async getOutput(outputId: OutputId): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'getOutput', - data: { - outputId, - }, - }, - ); - const parsed = JSON.parse(response) as Response; - return plainToInstance(OutputData, parsed.payload); - } - - /** - * Get a participation event. - * - * @param eventId The ID of the event to get. - */ - async getParticipationEvent( - eventId: ParticipationEventId, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'getParticipationEvent', - data: { - eventId, - }, - }, - ); - return JSON.parse(response).payload; - } - - /** - * Get IDs of participation events of a certain type. - * - * @param node The node to get events from. - * @param eventType The type of events to get. - */ - async getParticipationEventIds( - node: INode, - eventType?: ParticipationEventType, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'getParticipationEventIds', - data: { - node, - eventType, - }, - }, - ); - return JSON.parse(response).payload; - } - - /** - * Get all participation events. - */ - async getParticipationEvents(): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'getParticipationEvents', - }, - ); - return JSON.parse(response).payload; - } - - /** - * Get the participation event status by its ID. - * - * @param eventId The ID of the event status to get. - */ - async getParticipationEventStatus( - eventId: ParticipationEventId, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'getParticipationEventStatus', - data: { - eventId, - }, - }, - ); - return JSON.parse(response).payload; - } - - /** - * Get a `FoundryOutput` by native token ID. It will try to get the foundry from - * the account, if it isn't in the account it will try to get it from the node. - * - * @param tokenId The native token ID to get the foundry for. - * @returns The `FoundryOutput` that minted the token. - */ - async getFoundryOutput(tokenId: TokenId): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'getFoundryOutput', - data: { - tokenId, - }, - }, - ); - return Output.parse(JSON.parse(response).payload) as FoundryOutput; - } - - /** - * Get outputs with additional unlock conditions. - * - * @param outputs The type of outputs to claim. - * @returns The output IDs of the unlockable outputs. - */ - async claimableOutputs(outputs: OutputsToClaim): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'claimableOutputs', - data: { - outputsToClaim: outputs, - }, - }, - ); - return JSON.parse(response).payload; - } - - /** - * Get a transaction stored in the account. - * - * @param transactionId The ID of the transaction to get. - * @returns The transaction. - */ - async getTransaction( - transactionId: TransactionId, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'getTransaction', - data: { - transactionId, - }, - }, - ); - const parsed = JSON.parse( - response, - ) as Response; - return plainToInstance(TransactionWithMetadata, parsed.payload); - } - - /** - * Get the transaction with inputs of an incoming transaction stored in the account - * List might not be complete, if the node pruned the data already - * - * @param transactionId The ID of the transaction to get. - * @returns The transaction. - */ - async getIncomingTransaction( - transactionId: TransactionId, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'getIncomingTransaction', - data: { - transactionId, - }, - }, - ); - const parsed = JSON.parse( - response, - ) as Response; - return plainToInstance(TransactionWithMetadata, parsed.payload); - } - - /** - * List all the addresses of the account. - * - * @returns The addresses. - */ - async addresses(): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'addresses', - }, - ); - - return JSON.parse(response).payload; - } - - /** - * List the addresses of the account with unspent outputs. - * - * @returns The addresses. - */ - async addressesWithUnspentOutputs(): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'addressesWithUnspentOutputs', - }, - ); - - return JSON.parse(response).payload; - } - - /** - * List all outputs of the account. - * - * @param filterOptions Options to filter the to be returned outputs. - * @returns The outputs with metadata. - */ - async outputs(filterOptions?: FilterOptions): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'outputs', - data: { filterOptions }, - }, - ); - - const parsed = JSON.parse(response) as Response; - return plainToInstance(OutputData, parsed.payload); - } - - /** - * List all the pending transactions of the account. - * - * @returns The transactions. - */ - async pendingTransactions(): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'pendingTransactions', - }, - ); - const parsed = JSON.parse(response) as Response< - TransactionWithMetadata[] - >; - return plainToInstance(TransactionWithMetadata, parsed.payload); - } - - /** - * List all incoming transactions of the account. - * - * @returns The incoming transactions with their inputs. - */ - async incomingTransactions(): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'incomingTransactions', - }, - ); - const parsed = JSON.parse(response) as Response< - TransactionWithMetadata[] - >; - return plainToInstance(TransactionWithMetadata, parsed.payload); - } - - /** - * List all the transactions of the account. - * - * @returns The transactions. - */ - async transactions(): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'transactions', - }, - ); - const parsed = JSON.parse(response) as Response< - TransactionWithMetadata[] - >; - return plainToInstance(TransactionWithMetadata, parsed.payload); - } - - /** - * List all the unspent outputs of the account. - * - * @param filterOptions Options to filter the to be returned outputs. - * @returns The outputs with metadata. - */ - async unspentOutputs(filterOptions?: FilterOptions): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'unspentOutputs', - data: { filterOptions }, - }, - ); - const parsed = JSON.parse(response) as Response; - return plainToInstance(OutputData, parsed.payload); - } - - /** - * Get the accounts metadata. - * - * @returns The accounts metadata. - */ - getMetadata(): AccountMetadata { - return { - alias: this.meta.alias, - coinType: this.meta.coinType, - index: this.meta.index, - }; - } - - /** - * Mint additional native tokens. - * - * @param tokenId The native token id. - * @param mintAmount To be minted amount. - * @param transactionOptions Additional transaction options - * or custom inputs. - * @returns The minting transaction. - */ - async mintNativeToken( - tokenId: TokenId, - mintAmount: bigint, - transactionOptions?: TransactionOptions, - ): Promise { - return ( - await this.prepareMintNativeToken( - tokenId, - mintAmount, - transactionOptions, - ) - ).send(); - } - - /** - * Mint additional native tokens. - * - * @param tokenId The native token id. - * @param mintAmount To be minted amount. - * @param transactionOptions Additional transaction options - * or custom inputs. - * @returns The prepared minting transaction. - */ - async prepareMintNativeToken( - tokenId: string, - mintAmount: u256, - transactionOptions?: TransactionOptions, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'prepareMintNativeToken', - data: { - tokenId, - mintAmount: bigIntToHex(mintAmount), - options: transactionOptions, - }, - }, - ); - - const parsed = JSON.parse( - response, - ) as Response; - return new PreparedTransaction( - plainToInstance(PreparedTransactionData, parsed.payload), - this, - ); - } - - /** - * Create a native token. - * - * @param params The options for creating a native token. - * @param transactionOptions Additional transaction options - * or custom inputs. - * @returns The created transaction. - */ - async createNativeToken( - params: CreateNativeTokenParams, - transactionOptions?: TransactionOptions, - ): Promise { - return ( - await this.prepareCreateNativeToken(params, transactionOptions) - ).send(); - } - - /** - * Create a native token. - * - * @param params The options for creating a native token. - * @param transactionOptions Additional transaction options - * or custom inputs. - * @returns The created transaction and the token ID. - */ - async prepareCreateNativeToken( - params: CreateNativeTokenParams, - transactionOptions?: TransactionOptions, - ): Promise { - const adjustedParams: any = params; - adjustedParams.circulatingSupply = bigIntToHex( - params.circulatingSupply, - ); - adjustedParams.maximumSupply = bigIntToHex(params.maximumSupply); - - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'prepareCreateNativeToken', - data: { - params: adjustedParams, - options: transactionOptions, - }, - }, - ); - - const parsed = JSON.parse( - response, - ) as Response; - return new PreparedCreateNativeTokenTransaction( - plainToInstance( - PreparedCreateNativeTokenTransactionData, - parsed.payload, - ), - this, - ); - } - - /** - * Mint NFTs. - * - * @param params The options for minting nfts. - * @param transactionOptions Additional transaction options - * or custom inputs. - * @returns The minting transaction. - */ - async mintNfts( - params: MintNftParams[], - transactionOptions?: TransactionOptions, - ): Promise { - return (await this.prepareMintNfts(params, transactionOptions)).send(); - } - - /** - * Mint NFTs. - * - * @param params The options for minting nfts. - * @param transactionOptions Additional transaction options - * or custom inputs. - * @returns The prepared minting transaction. - */ - async prepareMintNfts( - params: MintNftParams[], - transactionOptions?: TransactionOptions, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'prepareMintNfts', - data: { - params, - options: transactionOptions, - }, - }, - ); - - const parsed = JSON.parse( - response, - ) as Response; - return new PreparedTransaction( - plainToInstance(PreparedTransactionData, parsed.payload), - this, - ); - } - - /** - * Prepare an output for sending, useful for offline signing. - * - * @param options The options for preparing an output. If the amount is - * below the minimum required storage deposit, by default the remaining - * amount will automatically be added with a `StorageDepositReturn` `UnlockCondition`, - * when setting the `ReturnStrategy` to `gift`, the full minimum required - * storage deposit will be sent to the recipient. When the assets contain - * an nft id, the data from the existing `NftOutput` will be used, just with - * the address unlock conditions replaced. - * @param transactionOptions Additional transaction options - * or custom inputs. - * @returns The prepared output. - */ - async prepareOutput( - params: OutputParams, - transactionOptions?: TransactionOptions, - ): Promise { - if (typeof params.amount === 'bigint') { - params.amount = params.amount.toString(10); - } - - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'prepareOutput', - data: { - params, - transactionOptions, - }, - }, - ); - - return Output.parse(JSON.parse(response).payload); - } - - /** - * Prepare to send base coins, useful for offline signing. - * - * @param params Address with amounts to send. - * @param options Additional transaction options - * or custom inputs. - * @returns The prepared transaction data. - */ - async prepareSend( - params: SendParams[], - options?: TransactionOptions, - ): Promise { - for (let i = 0; i < params.length; i++) { - if (typeof params[i].amount === 'bigint') { - params[i].amount = params[i].amount.toString(10); - } - } - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'prepareSend', - data: { - params, - options, - }, - }, - ); - const parsed = JSON.parse( - response, - ) as Response; - return new PreparedTransaction( - plainToInstance(PreparedTransactionData, parsed.payload), - this, - ); - } - - /** - * Send a transaction. - * - * @param outputs Outputs to use in the transaction. - * @param options Additional transaction options - * or custom inputs. - * @returns The transaction data. - */ - async sendTransaction( - outputs: Output[], - options?: TransactionOptions, - ): Promise { - return (await this.prepareTransaction(outputs, options)).send(); - } - - /** - * Prepare a transaction, useful for offline signing. - * - * @param outputs Outputs to use in the transaction. - * @param options Additional transaction options - * or custom inputs. - * @returns The prepared transaction data. - */ - async prepareTransaction( - outputs: Output[], - options?: TransactionOptions, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'prepareTransaction', - data: { - outputs, - options, - }, - }, - ); - const parsed = JSON.parse( - response, - ) as Response; - return new PreparedTransaction( - plainToInstance(PreparedTransactionData, parsed.payload), - this, - ); - } - - /** - * Register participation events. - * - * @param options Options to register participation events. - * @returns A mapping between event IDs and their corresponding event data. - */ - async registerParticipationEvents( - options: ParticipationEventRegistrationOptions, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'registerParticipationEvents', - data: { - options, - }, - }, - ); - return JSON.parse(response).payload; - } - - /** - * Reissues a transaction sent from the account for a provided transaction id until it's - * included (referenced by a milestone). Returns the included block id. - */ - async reissueTransactionUntilIncluded( - transactionId: string, - interval?: number, - maxAttempts?: number, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'reissueTransactionUntilIncluded', - data: { - transactionId, - interval, - maxAttempts, - }, - }, - ); - return JSON.parse(response).payload; - } - - /** - * Send base coins to an address. - * - * @param amount Amount of coins. - * @param address Receiving address. - * @param transactionOptions Additional transaction options - * or custom inputs. - * @returns The sent transaction. - */ - async send( - amount: u64 | NumericString, - address: Bech32Address, - transactionOptions?: TransactionOptions, - ): Promise { - if (typeof amount === 'bigint') { - amount = amount.toString(10); - } - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'send', - data: { - amount, - address, - options: transactionOptions, - }, - }, - ); - const parsed = JSON.parse( - response, - ) as Response; - return plainToInstance(TransactionWithMetadata, parsed.payload); - } - - /** - * Send base coins with amounts from input addresses. - * - * @param params Addresses with amounts. - * @param transactionOptions Additional transaction options - * or custom inputs. - * @returns The sent transaction. - */ - async sendWithParams( - params: SendParams[], - transactionOptions?: TransactionOptions, - ): Promise { - for (let i = 0; i < params.length; i++) { - if (typeof params[i].amount === 'bigint') { - params[i].amount = params[i].amount.toString(10); - } - } - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'sendWithParams', - data: { - params, - options: transactionOptions, - }, - }, - ); - const parsed = JSON.parse( - response, - ) as Response; - return plainToInstance(TransactionWithMetadata, parsed.payload); - } - - /** - * Send native tokens. - * - * @param params Addresses amounts and native tokens. - * @param transactionOptions Additional transaction options - * or custom inputs. - * @returns The transaction. - */ - async sendNativeTokens( - params: SendNativeTokensParams[], - transactionOptions?: TransactionOptions, - ): Promise { - return ( - await this.prepareSendNativeTokens(params, transactionOptions) - ).send(); - } - - /** - * Send native tokens. - * - * @param params Addresses amounts and native tokens. - * @param transactionOptions Additional transaction options - * or custom inputs. - * @returns The prepared transaction. - */ - async prepareSendNativeTokens( - params: SendNativeTokensParams[], - transactionOptions?: TransactionOptions, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'prepareSendNativeTokens', - data: { - params, - options: transactionOptions, - }, - }, - ); - const parsed = JSON.parse( - response, - ) as Response; - return new PreparedTransaction( - plainToInstance(PreparedTransactionData, parsed.payload), - this, - ); - } - - /** - * Send NFT. - * - * @param params Addresses and nft ids. - * @param transactionOptions Additional transaction options - * or custom inputs. - * @returns The transaction. - */ - async sendNft( - params: SendNftParams[], - transactionOptions?: TransactionOptions, - ): Promise { - return (await this.prepareSendNft(params, transactionOptions)).send(); - } - - /** - * Send NFT. - * - * @param params Addresses and nft ids. - * @param transactionOptions Additional transaction options - * or custom inputs. - * @returns The prepared transaction. - */ - async prepareSendNft( - params: SendNftParams[], - transactionOptions?: TransactionOptions, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'prepareSendNft', - data: { - params, - options: transactionOptions, - }, - }, - ); - const parsed = JSON.parse( - response, - ) as Response; - return new PreparedTransaction( - plainToInstance(PreparedTransactionData, parsed.payload), - this, - ); - } - - /** - * Send outputs in a transaction. - * - * @param outputs The outputs to send. - * @param transactionOptions Additional transaction options - * or custom inputs. - * @returns The sent transaction. - */ - async sendOutputs( - outputs: Output[], - transactionOptions?: TransactionOptions, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'sendOutputs', - data: { - outputs, - options: transactionOptions, - }, - }, - ); - - const parsed = JSON.parse( - response, - ) as Response; - return plainToInstance(TransactionWithMetadata, parsed.payload); - } - - /** - * Set the alias for the account - * - * @param alias The account alias to set. - */ - async setAlias(alias: string): Promise { - await this.methodHandler.callAccountMethod(this.meta.index, { - name: 'setAlias', - data: { - alias, - }, - }); - } - - /** - * Set the fallback SyncOptions for account syncing. - * If storage is enabled, will persist during restarts. - * - * @param options The sync options to set. - */ - async setDefaultSyncOptions(options: SyncOptions): Promise { - await this.methodHandler.callAccountMethod(this.meta.index, { - name: 'setDefaultSyncOptions', - data: { - options, - }, - }); - } - - /** - * Sign a prepared transaction, useful for offline signing. - * - * @param preparedTransactionData The prepared transaction data to sign. - * @returns The signed transaction. - */ - async signTransaction( - preparedTransactionData: PreparedTransactionData, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'signTransaction', - data: { - preparedTransactionData, - }, - }, - ); - const parsed = JSON.parse(response) as Response; - return plainToInstance(SignedTransactionData, parsed.payload); - } - - /** - * Sign a prepared transaction, and send it. - * - * @param preparedTransactionData The prepared transaction data to sign and submit. - * @returns The transaction. - */ - async signAndSubmitTransaction( - preparedTransactionData: PreparedTransactionData, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'signAndSubmitTransaction', - data: { - preparedTransactionData, - }, - }, - ); - const parsed = JSON.parse( - response, - ) as Response; - return plainToInstance(TransactionWithMetadata, parsed.payload); - } - - /** - * Validate the transaction, submit it to a node and store it in the account. - * - * @param signedTransactionData A signed transaction to submit and store. - * @returns The sent transaction. - */ - async submitAndStoreTransaction( - signedTransactionData: SignedTransactionData, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'submitAndStoreTransaction', - data: { - signedTransactionData, - }, - }, - ); - const parsed = JSON.parse( - response, - ) as Response; - return plainToInstance(TransactionWithMetadata, parsed.payload); - } - - /** - * Sync the account by fetching new information from the nodes. - * Will also reissue pending transactions if necessary. - * A custom default can be set using setDefaultSyncOptions. - * - * @param options Optional synchronization options. - * @returns The account balance. - */ - async sync(options?: SyncOptions): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'sync', - data: { - options, - }, - }, - ); - const payload = JSON.parse(response).payload; - return this.adjustBalancePayload(payload); - } - - /** - * Prepare a vote. - * - * @param eventId The participation event ID. - * @param answers Answers for a voting event, can be empty. - * @returns An instance of `PreparedTransaction`. - */ - async prepareVote( - eventId?: ParticipationEventId, - answers?: number[], - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'prepareVote', - data: { - eventId, - answers, - }, - }, - ); - const parsed = JSON.parse( - response, - ) as Response; - return new PreparedTransaction( - plainToInstance(PreparedTransactionData, parsed.payload), - this, - ); - } - - /** - * Prepare stop participating in an event. - * - * @param eventId The event ID to stop participating in. - * @returns An instance of `PreparedTransaction`. - */ - async prepareStopParticipating( - eventId: ParticipationEventId, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'prepareStopParticipating', - data: { - eventId, - }, - }, - ); - const parsed = JSON.parse( - response, - ) as Response; - return new PreparedTransaction( - plainToInstance(PreparedTransactionData, parsed.payload), - this, - ); - } - - /** - * Calculates the voting overview of an account. - * - * @param eventIds Optional, filters participations only for provided events. - * @returns An instance of `ParticipationOverview` - */ - async getParticipationOverview( - eventIds?: ParticipationEventId[], - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'getParticipationOverview', - data: { - eventIds, - }, - }, - ); - return JSON.parse(response).payload; - } - - /** - * Prepare to increase the voting power. - * - * @param amount The amount to increase the voting power by. - * @returns An instance of `PreparedTransaction`. - */ - async prepareIncreaseVotingPower( - amount: NumericString, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'prepareIncreaseVotingPower', - data: { - amount, - }, - }, - ); - const parsed = JSON.parse( - response, - ) as Response; - return new PreparedTransaction( - plainToInstance(PreparedTransactionData, parsed.payload), - this, - ); - } - - /** - * Prepare to decrease the voting power. - * - * @param amount The amount to decrease the voting power by. - * @returns An instance of `PreparedTransaction`. - */ - async prepareDecreaseVotingPower( - amount: NumericString, - ): Promise { - const response = await this.methodHandler.callAccountMethod( - this.meta.index, - { - name: 'prepareDecreaseVotingPower', - data: { - amount, - }, - }, - ); - const parsed = JSON.parse( - response, - ) as Response; - return new PreparedTransaction( - plainToInstance(PreparedTransactionData, parsed.payload), - this, - ); - } -} diff --git a/bindings/nodejs/lib/wallet/index.ts b/bindings/nodejs/lib/wallet/index.ts index 8b1189339e..47fd932e03 100644 --- a/bindings/nodejs/lib/wallet/index.ts +++ b/bindings/nodejs/lib/wallet/index.ts @@ -1,7 +1,6 @@ // Copyright 2023 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -export * from './account'; export * from './wallet'; export * from './wallet-method-handler'; export * from '../types/wallet'; diff --git a/bindings/nodejs/lib/wallet/wallet-method-handler.ts b/bindings/nodejs/lib/wallet/wallet-method-handler.ts index 6588f1512f..d36502b160 100644 --- a/bindings/nodejs/lib/wallet/wallet-method-handler.ts +++ b/bindings/nodejs/lib/wallet/wallet-method-handler.ts @@ -2,19 +2,16 @@ // SPDX-License-Identifier: Apache-2.0 import { - callWalletMethodAsync, + callWalletMethod, createWallet, - listenWalletAsync, - destroyWallet, + listenWallet, getClientFromWallet, getSecretManagerFromWallet, } from '../bindings'; -import type { +import { WalletEventType, WalletOptions, - __Method__, - __AccountMethod__, - AccountIdentifier, + __WalletMethod__, Event, } from '../types/wallet'; import { Client } from '../client'; @@ -30,23 +27,8 @@ export class WalletMethodHandler { * @param options The wallet options. */ constructor(options?: WalletOptions) { - const walletOptions = { - storagePath: options?.storagePath, - clientOptions: options?.clientOptions, - coinType: options?.coinType, - secretManager: options?.secretManager, - }; - try { - this.methodHandler = createWallet(JSON.stringify(walletOptions)); - } catch (error: any) { - throw errorHandle(error); - } - } - - destroy(): void { - try { - destroyWallet(this.methodHandler); + this.methodHandler = createWallet(JSON.stringify(options)); } catch (error: any) { throw errorHandle(error); } @@ -58,8 +40,9 @@ export class WalletMethodHandler { * @param method The wallet method to call. * @returns A promise that resolves to a JSON string response holding the result of the wallet method. */ - async callMethod(method: __Method__): Promise { - return callWalletMethodAsync( + async callMethod(method: __WalletMethod__): Promise { + return callWalletMethod( + this.methodHandler, // mapToObject is required to convert maps to array since they otherwise get serialized as `[{}]` even if not empty JSON.stringify(method, function mapToObject(_key, value) { if (value instanceof Map) { @@ -74,25 +57,6 @@ export class WalletMethodHandler { }); } - /** - * Call an account method on the Rust backend. - * - * @param accountIndex The account index. - * @param method The account method to call. - */ - async callAccountMethod( - accountIndex: AccountIdentifier, - method: __AccountMethod__, - ): Promise { - return this.callMethod({ - name: 'callAccountMethod', - data: { - accountId: accountIndex, - method, - }, - }); - } - /** * Listen to wallet events. * @@ -103,12 +67,13 @@ export class WalletMethodHandler { eventTypes: WalletEventType[], callback: (error: Error, event: Event) => void, ): Promise { - return listenWalletAsync( - eventTypes, - callback, - this.methodHandler, - ).catch((error: any) => { - throw errorHandle(error); + return listenWallet(this.methodHandler, eventTypes, function (err: any, data: string) { + const parsed = JSON.parse(data); + callback( + // Send back raw error instead of parsing + err, + new Event(parsed.accountIndex, parsed.event), + ); }); } diff --git a/bindings/nodejs/lib/wallet/wallet.ts b/bindings/nodejs/lib/wallet/wallet.ts index d2ac1b7df8..fd3608b9ab 100644 --- a/bindings/nodejs/lib/wallet/wallet.ts +++ b/bindings/nodejs/lib/wallet/wallet.ts @@ -2,20 +2,59 @@ // SPDX-License-Identifier: Apache-2.0 import { WalletMethodHandler } from './wallet-method-handler'; -import { Account } from './account'; - +import { + Balance, + SyncOptions, + SendParams, + SendNativeTokensParams, + SendNftParams, + AccountOutputParams, + FilterOptions, + CreateNativeTokenParams, + MintNftParams, + OutputData, + OutputParams, + OutputsToClaim, + TransactionWithMetadata, + TransactionOptions, + ParticipationOverview, + ParticipationEventId, + ParticipationEventStatus, + ParticipationEventType, + ParticipationEventWithNodes, + ParticipationEventRegistrationOptions, + ParticipationEventMap, + SignedTransactionData, + PreparedTransaction, + PreparedCreateNativeTokenTransactionData, + ConsolidationParams, +} from '../types/wallet'; +import { Client, INode, Burn, PreparedTransactionData } from '../client'; +import { + Output, + FoundryOutput, + Response, + PreparedCreateNativeTokenTransaction, + u64, + u256, + NftId, + TokenId, + OutputId, + AccountId, + FoundryId, + TransactionId, + NumericString, + Bech32Address, +} from '../types'; +import { plainToInstance } from 'class-transformer'; +import { bigIntToHex, hexToBigInt } from '../types/utils/hex-encoding'; import type { - AccountIdentifier, WalletOptions, - CreateAccountPayload, WalletEventType, - GenerateAddressOptions, - SyncOptions, WalletEvent, Event, } from '../types/wallet'; import { IAuth, IClientOptions, LedgerNanoStatus } from '../types/client'; -import { Client } from '../client'; import { SecretManager } from '../secret_manager'; /** The Wallet class. */ @@ -67,17 +106,6 @@ export class Wallet { }); } - /** - * Create a new account. - */ - async createAccount(data: CreateAccountPayload): Promise { - const response = await this.methodHandler.callMethod({ - name: 'createAccount', - data, - }); - return new Account(JSON.parse(response).payload, this.methodHandler); - } - /** * Destroy the Wallet and drop its database connection. */ @@ -95,52 +123,6 @@ export class Wallet { }); } - /** - * Get an account by its alias or index. - */ - async getAccount(accountId: AccountIdentifier): Promise { - const response = await this.methodHandler.callMethod({ - name: 'getAccount', - data: { accountId }, - }); - - const account = new Account( - JSON.parse(response).payload, - this.methodHandler, - ); - - return account; - } - - /** - * Get all account indexes. - */ - async getAccountIndexes(): Promise { - const response = await this.methodHandler.callMethod({ - name: 'getAccountIndexes', - }); - - return JSON.parse(response).payload; - } - - /** - * Get all accounts. - */ - async getAccounts(): Promise { - const response = await this.methodHandler.callMethod({ - name: 'getAccounts', - }); - - const { payload } = JSON.parse(response); - - const accounts: Account[] = []; - - for (const account of payload) { - accounts.push(new Account(account, this.methodHandler)); - } - return accounts; - } - /** * Get client. */ @@ -155,27 +137,6 @@ export class Wallet { return this.methodHandler.getSecretManager(); } - /** - * Generate an address without storing it. - */ - async generateEd25519Address( - accountIndex: number, - addressIndex: number, - options?: GenerateAddressOptions, - bech32Hrp?: string, - ): Promise { - const response = await this.methodHandler.callMethod({ - name: 'generateEd25519Address', - data: { - accountIndex, - addressIndex, - options, - bech32Hrp, - }, - }); - return JSON.parse(response).payload; - } - /** * Get the status for a Ledger Nano. */ @@ -217,41 +178,6 @@ export class Wallet { return JSON.parse(response).payload; } - /** - * Find accounts with unspent outputs. - */ - async recoverAccounts( - accountStartIndex: number, - accountGapLimit: number, - addressGapLimit: number, - syncOptions: SyncOptions, - ): Promise { - const response = await this.methodHandler.callMethod({ - name: 'recoverAccounts', - data: { - accountStartIndex, - accountGapLimit, - addressGapLimit, - syncOptions, - }, - }); - const accounts: Account[] = []; - - for (const account of JSON.parse(response).payload) { - accounts.push(new Account(account, this.methodHandler)); - } - return accounts; - } - - /** - * Delete the latest account. - */ - async removeLatestAccount(): Promise { - await this.methodHandler.callMethod({ - name: 'removeLatestAccount', - }); - } - /** * Restore a backup from a Stronghold file * Replaces client_options, coin_type, secret_manager and accounts. Returns an error if accounts were already created @@ -354,4 +280,1372 @@ export class Wallet { data: { url, auth }, }); } + + /** + * Returns the accounts of the wallet. + * + * @returns The accounts of the wallet. + */ + async accounts(): Promise { + const response = await this.methodHandler.callMethod({ + name: 'accounts', + }); + + const parsed = JSON.parse(response) as Response; + return plainToInstance(OutputData, parsed.payload); + } + + /** + * A generic function that can be used to burn native tokens, nfts, foundries and accounts. + * @param burn The outputs or native tokens to burn + * @param transactionOptions Additional transaction options + * or custom inputs. + * @returns The transaction. + */ + async burn( + burn: Burn, + transactionOptions?: TransactionOptions, + ): Promise { + return (await this.prepareBurn(burn, transactionOptions)).send(); + } + + /** + * A generic function that can be used to prepare to burn native tokens, nfts, foundries and accounts. + * @param burn The outputs or native tokens to burn + * @param transactionOptions Additional transaction options + * @returns The prepared transaction. + */ + async prepareBurn( + burn: Burn, + transactionOptions?: TransactionOptions, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'prepareBurn', + data: { + burn, + options: transactionOptions, + }, + }); + const parsed = JSON.parse( + response, + ) as Response; + return new PreparedTransaction( + plainToInstance(PreparedTransactionData, parsed.payload), + this, + ); + } + + /** + * Burn native tokens. This doesn't require the foundry output which minted them, but will not increase + * the foundries `melted_tokens` field, which makes it impossible to destroy the foundry output. Therefore it's + * recommended to use melting, if the foundry output is available. + * @param tokenId The native token id. + * @param burnAmount The to be burned amount. + * @param transactionOptions Additional transaction options + * or custom inputs. + * @returns The prepared transaction. + */ + async prepareBurnNativeToken( + tokenId: TokenId, + burnAmount: u256, + transactionOptions?: TransactionOptions, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'prepareBurn', + data: { + burn: { + nativeTokens: new Map([[tokenId, burnAmount]]), + }, + options: transactionOptions, + }, + }); + const parsed = JSON.parse( + response, + ) as Response; + return new PreparedTransaction( + plainToInstance(PreparedTransactionData, parsed.payload), + this, + ); + } + + /** + * Burn an nft output. + * @param nftId The NftId. + * @param transactionOptions Additional transaction options + * or custom inputs. + * @returns The prepared transaction. + */ + async prepareBurnNft( + nftId: NftId, + transactionOptions?: TransactionOptions, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'prepareBurn', + data: { + burn: { + nfts: [nftId], + }, + options: transactionOptions, + }, + }); + const parsed = JSON.parse( + response, + ) as Response; + return new PreparedTransaction( + plainToInstance(PreparedTransactionData, parsed.payload), + this, + ); + } + + /** + * Claim basic or nft outputs that have additional unlock conditions + * to their `AddressUnlockCondition` from the account. + * @param outputIds The outputs to claim. + * @returns The resulting transaction. + */ + async claimOutputs( + outputIds: OutputId[], + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'claimOutputs', + data: { + outputIdsToClaim: outputIds, + }, + }); + const parsed = JSON.parse( + response, + ) as Response; + return plainToInstance(TransactionWithMetadata, parsed.payload); + } + + /** + * Consolidate basic outputs with only an `AddressUnlockCondition` from an account + * by sending them to an own address again if the output amount is greater or + * equal to the output consolidation threshold. + * @param params Consolidation options. + * @returns The consolidation transaction. + */ + async consolidateOutputs( + params: ConsolidationParams, + ): Promise { + return (await this.prepareConsolidateOutputs(params)).send(); + } + + /** + * Consolidate basic outputs with only an `AddressUnlockCondition` from an account + * by sending them to an own address again if the output amount is greater or + * equal to the output consolidation threshold. + * @param params Consolidation options. + * @returns The prepared consolidation transaction. + */ + async prepareConsolidateOutputs( + params: ConsolidationParams, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'prepareConsolidateOutputs', + data: { + params, + }, + }); + const parsed = JSON.parse( + response, + ) as Response; + return new PreparedTransaction( + plainToInstance(PreparedTransactionData, parsed.payload), + this, + ); + } + + /** + * Creates an account output. + * @param params The account output options. + * @param transactionOptions Additional transaction options + * or custom inputs. + * @returns The transaction. + */ + async createAccountOutput( + params?: AccountOutputParams, + transactionOptions?: TransactionOptions, + ): Promise { + return ( + await this.prepareCreateAccountOutput(params, transactionOptions) + ).send(); + } + + /** + * Creates an account output. + * @param params The account output options. + * @param transactionOptions Additional transaction options + * or custom inputs. + * @returns The prepared transaction. + */ + async prepareCreateAccountOutput( + params?: AccountOutputParams, + transactionOptions?: TransactionOptions, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'prepareCreateAccountOutput', + data: { + params, + options: transactionOptions, + }, + }); + const parsed = JSON.parse( + response, + ) as Response; + return new PreparedTransaction( + plainToInstance(PreparedTransactionData, parsed.payload), + this, + ); + } + + /** + * Melt native tokens. This happens with the foundry output which minted them, by increasing its + * `melted_tokens` field. + * @param tokenId The native token id. + * @param meltAmount To be melted amount. + * @param transactionOptions Additional transaction options + * or custom inputs. + * @returns The transaction. + */ + async meltNativeToken( + tokenId: TokenId, + meltAmount: bigint, + transactionOptions?: TransactionOptions, + ): Promise { + return ( + await this.prepareMeltNativeToken( + tokenId, + meltAmount, + transactionOptions, + ) + ).send(); + } + + /** + * Melt native tokens. This happens with the foundry output which minted them, by increasing its + * `melted_tokens` field. + * @param tokenId The native token id. + * @param meltAmount To be melted amount. + * @param transactionOptions Additional transaction options + * or custom inputs. + * @returns The prepared transaction. + */ + async prepareMeltNativeToken( + tokenId: TokenId, + meltAmount: u256, + transactionOptions?: TransactionOptions, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'prepareMeltNativeToken', + data: { + tokenId, + meltAmount: bigIntToHex(meltAmount), + options: transactionOptions, + }, + }); + const parsed = JSON.parse( + response, + ) as Response; + return new PreparedTransaction( + plainToInstance(PreparedTransactionData, parsed.payload), + this, + ); + } + + /** + * Deregister a participation event. + * + * @param eventId The id of the participation event to deregister. + */ + async deregisterParticipationEvent( + eventId: ParticipationEventId, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'deregisterParticipationEvent', + data: { + eventId, + }, + }); + return JSON.parse(response).payload; + } + + /** + * Destroy an account output. + * + * @param accountId The AccountId. + * @param transactionOptions Additional transaction options + * or custom inputs. + * @returns The prepared transaction. + */ + async prepareDestroyAccount( + accountId: AccountId, + transactionOptions?: TransactionOptions, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'prepareBurn', + data: { + burn: { + accounts: [accountId], + }, + options: transactionOptions, + }, + }); + const parsed = JSON.parse( + response, + ) as Response; + return new PreparedTransaction( + plainToInstance(PreparedTransactionData, parsed.payload), + this, + ); + } + + /** + * Function to destroy a foundry output with a circulating supply of 0. + * Native tokens in the foundry (minted by other foundries) will be transacted to the controlling account. + * @param foundryId The FoundryId. + * @param transactionOptions Additional transaction options + * or custom inputs. + * @returns The prepared transaction. + */ + async prepareDestroyFoundry( + foundryId: FoundryId, + transactionOptions?: TransactionOptions, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'prepareBurn', + data: { + burn: { + foundries: [foundryId], + }, + options: transactionOptions, + }, + }); + const parsed = JSON.parse( + response, + ) as Response; + return new PreparedTransaction( + plainToInstance(PreparedTransactionData, parsed.payload), + this, + ); + } + + /** + * Get the account balance. + * + * @returns The account balance. + */ + async getBalance(): Promise { + const response = await this.methodHandler.callMethod({ + name: 'getBalance', + }); + const payload = JSON.parse(response).payload; + return this.adjustBalancePayload(payload); + } + + /** + * Converts hex encoded or decimal strings of amounts to `bigint` + * for the balance payload. + */ + private adjustBalancePayload(payload: any): Balance { + for (let i = 0; i < payload.nativeTokens.length; i++) { + payload.nativeTokens[i].total = hexToBigInt( + payload.nativeTokens[i].total, + ); + payload.nativeTokens[i].available = hexToBigInt( + payload.nativeTokens[i].available, + ); + } + payload.baseCoin.total = BigInt(payload.baseCoin.total); + payload.baseCoin.available = BigInt(payload.baseCoin.available); + + payload.requiredStorageDeposit.account = BigInt( + payload.requiredStorageDeposit.account, + ); + payload.requiredStorageDeposit.basic = BigInt( + payload.requiredStorageDeposit.basic, + ); + payload.requiredStorageDeposit.foundry = BigInt( + payload.requiredStorageDeposit.foundry, + ); + payload.requiredStorageDeposit.nft = BigInt( + payload.requiredStorageDeposit.nft, + ); + + return payload; + } + + /** + * Get the data for an output. + * @param outputId The output to get. + * @returns The `OutputData`. + */ + async getOutput(outputId: OutputId): Promise { + const response = await this.methodHandler.callMethod({ + name: 'getOutput', + data: { + outputId, + }, + }); + const parsed = JSON.parse(response) as Response; + return plainToInstance(OutputData, parsed.payload); + } + + /** + * Get a participation event. + * + * @param eventId The ID of the event to get. + */ + async getParticipationEvent( + eventId: ParticipationEventId, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'getParticipationEvent', + data: { + eventId, + }, + }); + return JSON.parse(response).payload; + } + + /** + * Get IDs of participation events of a certain type. + * + * @param node The node to get events from. + * @param eventType The type of events to get. + */ + async getParticipationEventIds( + node: INode, + eventType?: ParticipationEventType, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'getParticipationEventIds', + data: { + node, + eventType, + }, + }); + return JSON.parse(response).payload; + } + + /** + * Get all participation events. + */ + async getParticipationEvents(): Promise { + const response = await this.methodHandler.callMethod({ + name: 'getParticipationEvents', + }); + return JSON.parse(response).payload; + } + + /** + * Get the participation event status by its ID. + * + * @param eventId The ID of the event status to get. + */ + async getParticipationEventStatus( + eventId: ParticipationEventId, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'getParticipationEventStatus', + data: { + eventId, + }, + }); + return JSON.parse(response).payload; + } + + /** + * Get a `FoundryOutput` by native token ID. It will try to get the foundry from + * the account, if it isn't in the account it will try to get it from the node. + * + * @param tokenId The native token ID to get the foundry for. + * @returns The `FoundryOutput` that minted the token. + */ + async getFoundryOutput(tokenId: TokenId): Promise { + const response = await this.methodHandler.callMethod({ + name: 'getFoundryOutput', + data: { + tokenId, + }, + }); + return Output.parse(JSON.parse(response).payload) as FoundryOutput; + } + + /** + * Get outputs with additional unlock conditions. + * + * @param outputs The type of outputs to claim. + * @returns The output IDs of the unlockable outputs. + */ + async claimableOutputs(outputs: OutputsToClaim): Promise { + const response = await this.methodHandler.callMethod({ + name: 'claimableOutputs', + data: { + outputsToClaim: outputs, + }, + }); + return JSON.parse(response).payload; + } + + /** + * Get a transaction stored in the account. + * + * @param transactionId The ID of the transaction to get. + * @returns The transaction. + */ + async getTransaction( + transactionId: TransactionId, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'getTransaction', + data: { + transactionId, + }, + }); + const parsed = JSON.parse( + response, + ) as Response; + return plainToInstance(TransactionWithMetadata, parsed.payload); + } + + /** + * Get the transaction with inputs of an incoming transaction stored in the account + * List might not be complete, if the node pruned the data already + * + * @param transactionId The ID of the transaction to get. + * @returns The transaction. + */ + async getIncomingTransaction( + transactionId: TransactionId, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'getIncomingTransaction', + data: { + transactionId, + }, + }); + const parsed = JSON.parse( + response, + ) as Response; + return plainToInstance(TransactionWithMetadata, parsed.payload); + } + + /** + * Get the address of the wallet. + * + * @returns The address. + */ + async address(): Promise { + const response = await this.methodHandler.callMethod({ + name: 'getAddress', + }); + + return JSON.parse(response).payload; + } + + /** + * List all outputs of the wallet. + * + * @param filterOptions Options to filter the to be returned outputs. + * @returns The outputs with metadata. + */ + async outputs(filterOptions?: FilterOptions): Promise { + const response = await this.methodHandler.callMethod({ + name: 'outputs', + data: { filterOptions }, + }); + + const parsed = JSON.parse(response) as Response; + return plainToInstance(OutputData, parsed.payload); + } + + /** + * List all the pending transactions of the wallet. + * + * @returns The transactions. + */ + async pendingTransactions(): Promise { + const response = await this.methodHandler.callMethod({ + name: 'pendingTransactions', + }); + const parsed = JSON.parse(response) as Response< + TransactionWithMetadata[] + >; + return plainToInstance(TransactionWithMetadata, parsed.payload); + } + + /** + * Returns the implicit account creation address of the wallet if it is Ed25519 based. + * + * @returns The implicit account creation address. + */ + async implicitAccountCreationAddress(): Promise { + const response = await this.methodHandler.callMethod({ + name: 'implicitAccountCreationAddress', + }); + + return JSON.parse(response).payload; + } + + /** + * Returns the implicit accounts of the wallet. + * + * @returns The implicit accounts of the wallet. + */ + async implicitAccounts(): Promise { + const response = await this.methodHandler.callMethod({ + name: 'implicitAccounts', + }); + + const parsed = JSON.parse(response) as Response; + return plainToInstance(OutputData, parsed.payload); + } + + /** + * List all incoming transactions of the wallet. + * + * @returns The incoming transactions with their inputs. + */ + async incomingTransactions(): Promise { + const response = await this.methodHandler.callMethod({ + name: 'incomingTransactions', + }); + const parsed = JSON.parse(response) as Response< + TransactionWithMetadata[] + >; + return plainToInstance(TransactionWithMetadata, parsed.payload); + } + + /** + * List all the transactions of the wallet. + * + * @returns The transactions. + */ + async transactions(): Promise { + const response = await this.methodHandler.callMethod({ + name: 'transactions', + }); + const parsed = JSON.parse(response) as Response< + TransactionWithMetadata[] + >; + return plainToInstance(TransactionWithMetadata, parsed.payload); + } + + /** + * List all the unspent outputs of the wallet. + * + * @param filterOptions Options to filter the to be returned outputs. + * @returns The outputs with metadata. + */ + async unspentOutputs(filterOptions?: FilterOptions): Promise { + const response = await this.methodHandler.callMethod({ + name: 'unspentOutputs', + data: { filterOptions }, + }); + const parsed = JSON.parse(response) as Response; + return plainToInstance(OutputData, parsed.payload); + } + + /** + * Mint additional native tokens. + * + * @param tokenId The native token id. + * @param mintAmount To be minted amount. + * @param transactionOptions Additional transaction options + * or custom inputs. + * @returns The minting transaction. + */ + async mintNativeToken( + tokenId: TokenId, + mintAmount: bigint, + transactionOptions?: TransactionOptions, + ): Promise { + return ( + await this.prepareMintNativeToken( + tokenId, + mintAmount, + transactionOptions, + ) + ).send(); + } + + /** + * Mint additional native tokens. + * + * @param tokenId The native token id. + * @param mintAmount To be minted amount. + * @param transactionOptions Additional transaction options + * or custom inputs. + * @returns The prepared minting transaction. + */ + async prepareMintNativeToken( + tokenId: string, + mintAmount: u256, + transactionOptions?: TransactionOptions, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'prepareMintNativeToken', + data: { + tokenId, + mintAmount: bigIntToHex(mintAmount), + options: transactionOptions, + }, + }); + + const parsed = JSON.parse( + response, + ) as Response; + return new PreparedTransaction( + plainToInstance(PreparedTransactionData, parsed.payload), + this, + ); + } + + /** + * Create a native token. + * + * @param params The options for creating a native token. + * @param transactionOptions Additional transaction options + * or custom inputs. + * @returns The created transaction. + */ + async createNativeToken( + params: CreateNativeTokenParams, + transactionOptions?: TransactionOptions, + ): Promise { + return ( + await this.prepareCreateNativeToken(params, transactionOptions) + ).send(); + } + + /** + * Create a native token. + * + * @param params The options for creating a native token. + * @param transactionOptions Additional transaction options + * or custom inputs. + * @returns The created transaction and the token ID. + */ + async prepareCreateNativeToken( + params: CreateNativeTokenParams, + transactionOptions?: TransactionOptions, + ): Promise { + const adjustedParams: any = params; + adjustedParams.circulatingSupply = bigIntToHex( + params.circulatingSupply, + ); + adjustedParams.maximumSupply = bigIntToHex(params.maximumSupply); + + const response = await this.methodHandler.callMethod({ + name: 'prepareCreateNativeToken', + data: { + params: adjustedParams, + options: transactionOptions, + }, + }); + + const parsed = JSON.parse( + response, + ) as Response; + return new PreparedCreateNativeTokenTransaction( + plainToInstance( + PreparedCreateNativeTokenTransactionData, + parsed.payload, + ), + this, + ); + } + + /** + * Mint NFTs. + * + * @param params The options for minting nfts. + * @param transactionOptions Additional transaction options + * or custom inputs. + * @returns The minting transaction. + */ + async mintNfts( + params: MintNftParams[], + transactionOptions?: TransactionOptions, + ): Promise { + return (await this.prepareMintNfts(params, transactionOptions)).send(); + } + + /** + * Mint NFTs. + * + * @param params The options for minting nfts. + * @param transactionOptions Additional transaction options + * or custom inputs. + * @returns The prepared minting transaction. + */ + async prepareMintNfts( + params: MintNftParams[], + transactionOptions?: TransactionOptions, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'prepareMintNfts', + data: { + params, + options: transactionOptions, + }, + }); + + const parsed = JSON.parse( + response, + ) as Response; + return new PreparedTransaction( + plainToInstance(PreparedTransactionData, parsed.payload), + this, + ); + } + + /** + * Prepare an output for sending, useful for offline signing. + * + * @param options The options for preparing an output. If the amount is + * below the minimum required storage deposit, by default the remaining + * amount will automatically be added with a `StorageDepositReturn` `UnlockCondition`, + * when setting the `ReturnStrategy` to `gift`, the full minimum required + * storage deposit will be sent to the recipient. When the assets contain + * an nft id, the data from the existing `NftOutput` will be used, just with + * the address unlock conditions replaced. + * @param transactionOptions Additional transaction options + * or custom inputs. + * @returns The prepared output. + */ + async prepareOutput( + params: OutputParams, + transactionOptions?: TransactionOptions, + ): Promise { + if (typeof params.amount === 'bigint') { + params.amount = params.amount.toString(10); + } + + const response = await this.methodHandler.callMethod({ + name: 'prepareOutput', + data: { + params, + transactionOptions, + }, + }); + + return Output.parse(JSON.parse(response).payload); + } + + /** + * Prepare to send base coins, useful for offline signing. + * + * @param params Address with amounts to send. + * @param options Additional transaction options + * or custom inputs. + * @returns The prepared transaction data. + */ + async prepareSend( + params: SendParams[], + options?: TransactionOptions, + ): Promise { + for (let i = 0; i < params.length; i++) { + if (typeof params[i].amount === 'bigint') { + params[i].amount = params[i].amount.toString(10); + } + } + const response = await this.methodHandler.callMethod({ + name: 'prepareSend', + data: { + params, + options, + }, + }); + const parsed = JSON.parse( + response, + ) as Response; + return new PreparedTransaction( + plainToInstance(PreparedTransactionData, parsed.payload), + this, + ); + } + + /** + * Send a transaction. + * + * @param outputs Outputs to use in the transaction. + * @param options Additional transaction options + * or custom inputs. + * @returns The transaction data. + */ + async sendTransaction( + outputs: Output[], + options?: TransactionOptions, + ): Promise { + return (await this.prepareTransaction(outputs, options)).send(); + } + + /** + * Prepare a transaction, useful for offline signing. + * + * @param outputs Outputs to use in the transaction. + * @param options Additional transaction options + * or custom inputs. + * @returns The prepared transaction data. + */ + async prepareTransaction( + outputs: Output[], + options?: TransactionOptions, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'prepareTransaction', + data: { + outputs, + options, + }, + }); + const parsed = JSON.parse( + response, + ) as Response; + return new PreparedTransaction( + plainToInstance(PreparedTransactionData, parsed.payload), + this, + ); + } + + /** + * Register participation events. + * + * @param options Options to register participation events. + * @returns A mapping between event IDs and their corresponding event data. + */ + async registerParticipationEvents( + options: ParticipationEventRegistrationOptions, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'registerParticipationEvents', + data: { + options, + }, + }); + return JSON.parse(response).payload; + } + + /** + * Reissues a transaction sent from the account for a provided transaction id until it's + * included (referenced by a milestone). Returns the included block id. + */ + async reissueTransactionUntilIncluded( + transactionId: string, + interval?: number, + maxAttempts?: number, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'reissueTransactionUntilIncluded', + data: { + transactionId, + interval, + maxAttempts, + }, + }); + return JSON.parse(response).payload; + } + + /** + * Send base coins to an address. + * + * @param amount Amount of coins. + * @param address Receiving address. + * @param transactionOptions Additional transaction options + * or custom inputs. + * @returns The sent transaction. + */ + async send( + amount: u64 | NumericString, + address: Bech32Address, + transactionOptions?: TransactionOptions, + ): Promise { + if (typeof amount === 'bigint') { + amount = amount.toString(10); + } + const response = await this.methodHandler.callMethod({ + name: 'send', + data: { + amount, + address, + options: transactionOptions, + }, + }); + const parsed = JSON.parse( + response, + ) as Response; + return plainToInstance(TransactionWithMetadata, parsed.payload); + } + + /** + * Send base coins with amounts from input addresses. + * + * @param params Addresses with amounts. + * @param transactionOptions Additional transaction options + * or custom inputs. + * @returns The sent transaction. + */ + async sendWithParams( + params: SendParams[], + transactionOptions?: TransactionOptions, + ): Promise { + for (let i = 0; i < params.length; i++) { + if (typeof params[i].amount === 'bigint') { + params[i].amount = params[i].amount.toString(10); + } + } + const response = await this.methodHandler.callMethod({ + name: 'sendWithParams', + data: { + params, + options: transactionOptions, + }, + }); + const parsed = JSON.parse( + response, + ) as Response; + return plainToInstance(TransactionWithMetadata, parsed.payload); + } + + /** + * Send native tokens. + * + * @param params Addresses amounts and native tokens. + * @param transactionOptions Additional transaction options + * or custom inputs. + * @returns The transaction. + */ + async sendNativeTokens( + params: SendNativeTokensParams[], + transactionOptions?: TransactionOptions, + ): Promise { + return ( + await this.prepareSendNativeTokens(params, transactionOptions) + ).send(); + } + + /** + * Send native tokens. + * + * @param params Addresses amounts and native tokens. + * @param transactionOptions Additional transaction options + * or custom inputs. + * @returns The prepared transaction. + */ + async prepareSendNativeTokens( + params: SendNativeTokensParams[], + transactionOptions?: TransactionOptions, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'prepareSendNativeTokens', + data: { + params, + options: transactionOptions, + }, + }); + const parsed = JSON.parse( + response, + ) as Response; + return new PreparedTransaction( + plainToInstance(PreparedTransactionData, parsed.payload), + this, + ); + } + + /** + * Send NFT. + * + * @param params Addresses and nft ids. + * @param transactionOptions Additional transaction options + * or custom inputs. + * @returns The transaction. + */ + async sendNft( + params: SendNftParams[], + transactionOptions?: TransactionOptions, + ): Promise { + return (await this.prepareSendNft(params, transactionOptions)).send(); + } + + /** + * Send NFT. + * + * @param params Addresses and nft ids. + * @param transactionOptions Additional transaction options + * or custom inputs. + * @returns The prepared transaction. + */ + async prepareSendNft( + params: SendNftParams[], + transactionOptions?: TransactionOptions, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'prepareSendNft', + data: { + params, + options: transactionOptions, + }, + }); + const parsed = JSON.parse( + response, + ) as Response; + return new PreparedTransaction( + plainToInstance(PreparedTransactionData, parsed.payload), + this, + ); + } + + /** + * Send outputs in a transaction. + * + * @param outputs The outputs to send. + * @param transactionOptions Additional transaction options + * or custom inputs. + * @returns The sent transaction. + */ + async sendOutputs( + outputs: Output[], + transactionOptions?: TransactionOptions, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'sendOutputs', + data: { + outputs, + options: transactionOptions, + }, + }); + + const parsed = JSON.parse( + response, + ) as Response; + return plainToInstance(TransactionWithMetadata, parsed.payload); + } + + /** + * Set the alias for the account + * + * @param alias The account alias to set. + */ + async setAlias(alias: string): Promise { + await this.methodHandler.callMethod({ + name: 'setAlias', + data: { + alias, + }, + }); + } + + /** + * Set the fallback SyncOptions for account syncing. + * If storage is enabled, will persist during restarts. + * + * @param options The sync options to set. + */ + async setDefaultSyncOptions(options: SyncOptions): Promise { + await this.methodHandler.callMethod({ + name: 'setDefaultSyncOptions', + data: { + options, + }, + }); + } + + /** + * Sign a prepared transaction, useful for offline signing. + * + * @param preparedTransactionData The prepared transaction data to sign. + * @returns The signed transaction. + */ + async signTransaction( + preparedTransactionData: PreparedTransactionData, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'signTransaction', + data: { + preparedTransactionData, + }, + }); + const parsed = JSON.parse(response) as Response; + return plainToInstance(SignedTransactionData, parsed.payload); + } + + /** + * Sign a prepared transaction, and send it. + * + * @param preparedTransactionData The prepared transaction data to sign and submit. + * @returns The transaction. + */ + async signAndSubmitTransaction( + preparedTransactionData: PreparedTransactionData, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'signAndSubmitTransaction', + data: { + preparedTransactionData, + }, + }); + const parsed = JSON.parse( + response, + ) as Response; + return plainToInstance(TransactionWithMetadata, parsed.payload); + } + + /** + * Validate the transaction, submit it to a node and store it in the account. + * + * @param signedTransactionData A signed transaction to submit and store. + * @returns The sent transaction. + */ + async submitAndStoreTransaction( + signedTransactionData: SignedTransactionData, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'submitAndStoreTransaction', + data: { + signedTransactionData, + }, + }); + const parsed = JSON.parse( + response, + ) as Response; + return plainToInstance(TransactionWithMetadata, parsed.payload); + } + + /** + * Sync the account by fetching new information from the nodes. + * Will also reissue pending transactions if necessary. + * A custom default can be set using setDefaultSyncOptions. + * + * @param options Optional synchronization options. + * @returns The account balance. + */ + async sync(options?: SyncOptions): Promise { + const response = await this.methodHandler.callMethod({ + name: 'sync', + data: { + options, + }, + }); + const payload = JSON.parse(response).payload; + return this.adjustBalancePayload(payload); + } + + /** + * Prepare a vote. + * + * @param eventId The participation event ID. + * @param answers Answers for a voting event, can be empty. + * @returns An instance of `PreparedTransaction`. + */ + async prepareVote( + eventId?: ParticipationEventId, + answers?: number[], + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'prepareVote', + data: { + eventId, + answers, + }, + }); + const parsed = JSON.parse( + response, + ) as Response; + return new PreparedTransaction( + plainToInstance(PreparedTransactionData, parsed.payload), + this, + ); + } + + /** + * Prepare stop participating in an event. + * + * @param eventId The event ID to stop participating in. + * @returns An instance of `PreparedTransaction`. + */ + async prepareStopParticipating( + eventId: ParticipationEventId, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'prepareStopParticipating', + data: { + eventId, + }, + }); + const parsed = JSON.parse( + response, + ) as Response; + return new PreparedTransaction( + plainToInstance(PreparedTransactionData, parsed.payload), + this, + ); + } + + /** + * Calculates the voting overview of an account. + * + * @param eventIds Optional, filters participations only for provided events. + * @returns An instance of `ParticipationOverview` + */ + async getParticipationOverview( + eventIds?: ParticipationEventId[], + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'getParticipationOverview', + data: { + eventIds, + }, + }); + return JSON.parse(response).payload; + } + + /** + * Prepare to increase the voting power. + * + * @param amount The amount to increase the voting power by. + * @returns An instance of `PreparedTransaction`. + */ + async prepareIncreaseVotingPower( + amount: NumericString, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'prepareIncreaseVotingPower', + data: { + amount, + }, + }); + const parsed = JSON.parse( + response, + ) as Response; + return new PreparedTransaction( + plainToInstance(PreparedTransactionData, parsed.payload), + this, + ); + } + + /** + * Prepare to decrease the voting power. + * + * @param amount The amount to decrease the voting power by. + * @returns An instance of `PreparedTransaction`. + */ + async prepareDecreaseVotingPower( + amount: NumericString, + ): Promise { + const response = await this.methodHandler.callMethod({ + name: 'prepareDecreaseVotingPower', + data: { + amount, + }, + }); + const parsed = JSON.parse( + response, + ) as Response; + return new PreparedTransaction( + plainToInstance(PreparedTransactionData, parsed.payload), + this, + ); + } } diff --git a/bindings/nodejs/package-lock.json b/bindings/nodejs/package-lock.json index b46ade0065..4094d96ed9 100644 --- a/bindings/nodejs/package-lock.json +++ b/bindings/nodejs/package-lock.json @@ -11,13 +11,13 @@ "license": "Apache-2.0", "dependencies": { "@types/node": "^18.15.12", - "cargo-cp-artifact": "^0.1.6", "class-transformer": "^0.5.1", "prebuild-install": "^7.1.1", "reflect-metadata": "^0.1.13", "typescript": "^4.9.4" }, "devDependencies": { + "@napi-rs/cli": "^1.0.0", "@types/jest": "^29.4.0", "@typescript-eslint/eslint-plugin": "^5.30.7", "@typescript-eslint/parser": "^5.30.7", @@ -59,12 +59,12 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz", - "integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==", + "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.10", + "@babel/highlight": "^7.22.13", "chalk": "^2.4.2" }, "engines": { @@ -197,12 +197,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz", - "integrity": "sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==", + "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.22.10", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -237,22 +237,22 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "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.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "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.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" @@ -344,9 +344,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "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" @@ -376,12 +376,12 @@ } }, "node_modules/@babel/highlight": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz", - "integrity": "sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==", + "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.5", + "@babel/helper-validator-identifier": "^7.22.20", "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, @@ -461,9 +461,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.10.tgz", - "integrity": "sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==", + "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" @@ -650,33 +650,33 @@ } }, "node_modules/@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "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.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@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.22.10", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.10.tgz", - "integrity": "sha512-Q/urqV4pRByiNNpb/f5OSv28ZlGJiFiiTh+GAHktbIrkPhPbl90+uW6SmpoLyZqutrg9AEaEf3Q/ZBRHBXgxig==", + "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.10", - "@babel/generator": "^7.22.10", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", + "@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.22.10", - "@babel/types": "^7.22.10", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -694,13 +694,13 @@ } }, "node_modules/@babel/types": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz", - "integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==", + "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.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -1255,6 +1255,25 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@napi-rs/cli": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@napi-rs/cli/-/cli-1.3.5.tgz", + "integrity": "sha512-Z0KZIciemioYODTyO908v2AtL8Zg4sohQDD+dyHeHmOiOfaez/y/xQ8XnpOHc2W5fRidKUW+MVWyTtpLTbKsqw==", + "dev": true, + "dependencies": { + "inquirer": "^8.1.3" + }, + "bin": { + "napi": "scripts/index.js" + }, + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -2288,6 +2307,18 @@ "readable-stream": "^3.0.1" } }, + "node_modules/block-stream": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha512-OorbnJVPII4DuUKbjARAe8u8EfqOmkEEaSFIyoQ7OjTHn6kafxWl0wLgoZ2rXaYd7MyLcDaU4TmhfxtwgcccMQ==", + "dev": true, + "dependencies": { + "inherits": "~2.0.0" + }, + "engines": { + "node": "0.4 || >=0.5.8" + } + }, "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -2460,14 +2491,6 @@ } ] }, - "node_modules/cargo-cp-artifact": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/cargo-cp-artifact/-/cargo-cp-artifact-0.1.8.tgz", - "integrity": "sha512-3j4DaoTrsCD1MRkTF2Soacii0Nx7UHCce0EwUf4fHnggwiE4fbmF2AbnfzayR36DF8KGadfh7M/Yfy625kgPlA==", - "bin": { - "cargo-cp-artifact": "bin/cargo-cp-artifact.js" - } - }, "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -2511,6 +2534,12 @@ "node": ">=10" } }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, "node_modules/chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", @@ -2551,6 +2580,39 @@ "resolved": "https://registry.npmjs.org/class-transformer/-/class-transformer-0.5.1.tgz", "integrity": "sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw==" }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.1.tgz", + "integrity": "sha512-jHgecW0pxkonBJdrKsqxgRX9AcG+u/5k0Q7WPDfi8AogLAdwxEkyYYNWwZ5GvVFoFx2uiY1eNcSK00fh+1+FyQ==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -2588,6 +2650,15 @@ "node": ">=8" } }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, "node_modules/clone-deep": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", @@ -2997,6 +3068,18 @@ "node": ">=0.10.0" } }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -3579,6 +3662,20 @@ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", @@ -3661,6 +3758,30 @@ "bser": "2.1.1" } }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/figures/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/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -4150,6 +4271,18 @@ "through2": "~0.6.3" } }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -4242,6 +4375,69 @@ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, + "node_modules/inquirer": { + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz", + "integrity": "sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==", + "dev": true, + "dependencies": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^6.0.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/inquirer/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/inquirer/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/inquirer/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/interpret": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", @@ -4320,6 +4516,15 @@ "node": ">=0.10.0" } }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-iojs": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-iojs/-/is-iojs-1.1.0.tgz", @@ -4374,6 +4579,18 @@ "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", "dev": true }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -5281,6 +5498,22 @@ "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==", "dev": true }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -5502,6 +5735,12 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, "node_modules/napi-build-utils": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", @@ -5532,9 +5771,9 @@ "dev": true }, "node_modules/node-abi": { - "version": "3.46.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.46.0.tgz", - "integrity": "sha512-LXvP3AqTIrtvH/jllXjkNVbYifpRbt9ThTtymSMSuHmhugQLAWr99QQFTm+ZRht9ziUvdGOgB+esme1C6iE6Lg==", + "version": "3.51.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.51.0.tgz", + "integrity": "sha512-SQkEP4hmNWjlniS5zdnfIXTk1x7Ome85RDzHlTbBtzE97Gfwz/Ipw4v/Ryk20DWIy3yCNVLVlGKApCnmvYoJbA==", "dependencies": { "semver": "^7.3.5" }, @@ -5691,6 +5930,18 @@ "semver": "bin/semver" } }, + "node_modules/node-ninja/node_modules/tar": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", + "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", + "deprecated": "This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.", + "dev": true, + "dependencies": { + "block-stream": "*", + "fstream": "^1.0.12", + "inherits": "2" + } + }, "node_modules/node-ninja/node_modules/which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -5886,6 +6137,18 @@ "semver": "bin/semver" } }, + "node_modules/nw-gyp/node_modules/tar": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", + "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", + "deprecated": "This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.", + "dev": true, + "dependencies": { + "block-stream": "*", + "fstream": "^1.0.12", + "inherits": "2" + } + }, "node_modules/nw-gyp/node_modules/which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -5956,6 +6219,40 @@ "node": ">= 0.8.0" } }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, "node_modules/os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", @@ -6574,6 +6871,19 @@ "node": ">=10" } }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -6608,6 +6918,15 @@ "node": "0.12.* || 4.* || 6.* || >= 7.*" } }, + "node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -6651,6 +6970,21 @@ } ] }, + "node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/rxjs/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -6901,9 +7235,9 @@ "dev": true }, "node_modules/sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", + "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", "dev": true, "dependencies": { "asn1": "~0.2.3", @@ -7248,6 +7582,12 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, "node_modules/through2": { "version": "0.6.5", "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", @@ -7282,6 +7622,18 @@ "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", "dev": true }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -7818,6 +8170,15 @@ "node": ">=10.13.0" } }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "dependencies": { + "defaults": "^1.0.3" + } + }, "node_modules/webpack": { "version": "5.88.2", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.88.2.tgz", @@ -8152,12 +8513,12 @@ } }, "@babel/code-frame": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz", - "integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==", + "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.10", + "@babel/highlight": "^7.22.13", "chalk": "^2.4.2" }, "dependencies": { @@ -8263,12 +8624,12 @@ } }, "@babel/generator": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz", - "integrity": "sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==", + "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.22.10", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -8296,19 +8657,19 @@ } }, "@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "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.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "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.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" } }, "@babel/helper-hoist-variables": { @@ -8373,9 +8734,9 @@ "dev": true }, "@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "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": { @@ -8396,12 +8757,12 @@ } }, "@babel/highlight": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz", - "integrity": "sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==", + "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.5", + "@babel/helper-validator-identifier": "^7.22.20", "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, @@ -8465,9 +8826,9 @@ } }, "@babel/parser": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.10.tgz", - "integrity": "sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==", + "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": { @@ -8597,30 +8958,30 @@ } }, "@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "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.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" } }, "@babel/traverse": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.10.tgz", - "integrity": "sha512-Q/urqV4pRByiNNpb/f5OSv28ZlGJiFiiTh+GAHktbIrkPhPbl90+uW6SmpoLyZqutrg9AEaEf3Q/ZBRHBXgxig==", + "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.10", - "@babel/generator": "^7.22.10", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", + "@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.22.10", - "@babel/types": "^7.22.10", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -8634,13 +8995,13 @@ } }, "@babel/types": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz", - "integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==", + "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.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" } }, @@ -9069,6 +9430,15 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "@napi-rs/cli": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@napi-rs/cli/-/cli-1.3.5.tgz", + "integrity": "sha512-Z0KZIciemioYODTyO908v2AtL8Zg4sohQDD+dyHeHmOiOfaez/y/xQ8XnpOHc2W5fRidKUW+MVWyTtpLTbKsqw==", + "dev": true, + "requires": { + "inquirer": "^8.1.3" + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -9891,6 +10261,15 @@ "readable-stream": "^3.0.1" } }, + "block-stream": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha512-OorbnJVPII4DuUKbjARAe8u8EfqOmkEEaSFIyoQ7OjTHn6kafxWl0wLgoZ2rXaYd7MyLcDaU4TmhfxtwgcccMQ==", + "dev": true, + "requires": { + "inherits": "~2.0.0" + } + }, "bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -9997,11 +10376,6 @@ "integrity": "sha512-fnx1grfpEOvDGH+V17eccmNjucGUnCbP6KL+l5KqBIerp26WK/+RQ7CIDE37KGJjaPyqWXXlFUyKiWmvdNNKmQ==", "dev": true }, - "cargo-cp-artifact": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/cargo-cp-artifact/-/cargo-cp-artifact-0.1.8.tgz", - "integrity": "sha512-3j4DaoTrsCD1MRkTF2Soacii0Nx7UHCce0EwUf4fHnggwiE4fbmF2AbnfzayR36DF8KGadfh7M/Yfy625kgPlA==" - }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -10033,6 +10407,12 @@ "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, "chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", @@ -10061,6 +10441,27 @@ "resolved": "https://registry.npmjs.org/class-transformer/-/class-transformer-0.5.1.tgz", "integrity": "sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw==" }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-spinners": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.1.tgz", + "integrity": "sha512-jHgecW0pxkonBJdrKsqxgRX9AcG+u/5k0Q7WPDfi8AogLAdwxEkyYYNWwZ5GvVFoFx2uiY1eNcSK00fh+1+FyQ==", + "dev": true + }, + "cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true + }, "cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -10091,6 +10492,12 @@ } } }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true + }, "clone-deep": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", @@ -10426,6 +10833,15 @@ "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true }, + "defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "requires": { + "clone": "^1.0.2" + } + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -10876,6 +11292,17 @@ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", @@ -10948,6 +11375,23 @@ "bser": "2.1.1" } }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "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 + } + } + }, "file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -11334,6 +11778,15 @@ "through2": "~0.6.3" } }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, "ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -11391,6 +11844,59 @@ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, + "inquirer": { + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz", + "integrity": "sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^6.0.1" + }, + "dependencies": { + "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 + }, + "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" + } + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + } + } + }, "interpret": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", @@ -11448,6 +11954,12 @@ "is-extglob": "^2.1.1" } }, + "is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true + }, "is-iojs": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-iojs/-/is-iojs-1.1.0.tgz", @@ -11487,6 +11999,12 @@ "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", "dev": true }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -12204,6 +12722,16 @@ "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==", "dev": true }, + "log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + } + }, "lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -12385,6 +12913,12 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, "napi-build-utils": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", @@ -12415,9 +12949,9 @@ "dev": true }, "node-abi": { - "version": "3.46.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.46.0.tgz", - "integrity": "sha512-LXvP3AqTIrtvH/jllXjkNVbYifpRbt9ThTtymSMSuHmhugQLAWr99QQFTm+ZRht9ziUvdGOgB+esme1C6iE6Lg==", + "version": "3.51.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.51.0.tgz", + "integrity": "sha512-SQkEP4hmNWjlniS5zdnfIXTk1x7Ome85RDzHlTbBtzE97Gfwz/Ipw4v/Ryk20DWIy3yCNVLVlGKApCnmvYoJbA==", "requires": { "semver": "^7.3.5" } @@ -12543,6 +13077,16 @@ "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true }, + "tar": { + "version": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", + "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", + "dev": true, + "requires": { + "block-stream": "*", + "fstream": "^1.0.12", + "inherits": "2" + } + }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -12696,6 +13240,16 @@ "integrity": "sha512-mfmm3/H9+67MCVix1h+IXTpDwL6710LyHuk7+cWC9T1mE0qz4iHhh6r4hU2wrIT9iTsAAC2XQRvfblL028cpLw==", "dev": true }, + "tar": { + "version": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", + "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", + "dev": true, + "requires": { + "block-stream": "*", + "fstream": "^1.0.12", + "inherits": "2" + } + }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -12750,6 +13304,36 @@ "type-check": "^0.4.0" } }, + "ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "requires": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "dependencies": { + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + } + } + }, "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", @@ -13201,6 +13785,16 @@ "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", "dev": true }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, "reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -13222,6 +13816,12 @@ "integrity": "sha512-OfWGQTb9vnwRjwtA2QwpG2ICclHC3pgXZO5xt8H2EfgDquO0qVdSb5T88L4qJVAEugbS56pAuV4XZM58UX8ulw==", "dev": true }, + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true + }, "run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -13237,6 +13837,23 @@ "integrity": "sha512-iFPgh7SatHXOG1ClcpdwHI63geV3Hc/iL6crGSyBlH2PY7Rm/za+zoKz6FfY/Qlw5K7JwSol8pseO8fN6CMhhQ==", "dev": true }, + "rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "requires": { + "tslib": "^2.1.0" + }, + "dependencies": { + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + } + } + }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -13415,9 +14032,9 @@ "dev": true }, "sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", + "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", "dev": true, "requires": { "asn1": "~0.2.3", @@ -13674,6 +14291,12 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, "through2": { "version": "0.6.5", "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", @@ -13710,6 +14333,15 @@ } } }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, "tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -14109,6 +14741,15 @@ "graceful-fs": "^4.1.2" } }, + "wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "requires": { + "defaults": "^1.0.3" + } + }, "webpack": { "version": "5.88.2", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.88.2.tgz", diff --git a/bindings/nodejs/package.json b/bindings/nodejs/package.json index 0983e95fea..717c95b1b1 100644 --- a/bindings/nodejs/package.json +++ b/bindings/nodejs/package.json @@ -5,19 +5,19 @@ "main": "out/index.js", "types": "out/index.d.ts", "scripts": { + "build": "napi build --release && tsc", + "build:debug": "napi build", "lint": "eslint --ignore-path .eslintignore --ext .js,.ts .", "format": "prettier --ignore-path .eslintignore -w \"{,*/**/}*.{ts,js,json}\"", "format-check": "prettier --ignore-path .eslintignore -c \"{,*/**/}*.{ts,js,json}\"", - "build": "node scripts/neon-build && tsc", - "build:neon": "cargo-cp-artifact -ac iota-sdk-nodejs ./index.node -- cargo build --profile=production --message-format=json-render-diagnostics", - "prebuild-x64": "prebuild --runtime napi --target 6 --prepack scripts/neon-build.js --strip --arch x64", - "prebuild-macos-arm64": "prebuild --runtime napi --target 6 --prepack 'yarn run neon-build-macos-arm64' --strip --arch arm64", - "neon-build-macos-arm64": "cargo-cp-artifact -ac iota-sdk-nodejs ./index.node -- cargo build --profile=production --message-format=json-render-diagnostics --target aarch64-apple-darwin && node -e \"require('./scripts/move-artifact.js')()\"", - "prebuild-linux-arm64": "prebuild --runtime napi --target 6 --prepack 'yarn run neon-build-linux-arm64' --strip --arch arm64", - "neon-build-linux-arm64": "cargo-cp-artifact -ac iota-sdk-nodejs ./index.node -- cargo build --profile=production --message-format=json-render-diagnostics --target aarch64-unknown-linux-gnu && node -e \"require('./scripts/move-artifact.js')()\"", - "prebuild-windows-arm64": "prebuild --runtime napi --target 6 --prepack 'yarn run neon-build-windows-arm64' --strip --arch arm64", - "neon-build-windows-arm64": "cargo-cp-artifact -ac iota-sdk-nodejs ./index.node -- cargo build --profile=production --message-format=json-render-diagnostics --target aarch64-pc-windows-msvc && node -e \"require('./scripts/move-artifact.js')()\"", - "rebuild": "node scripts/neon-build && tsc && node scripts/strip.js", + "prebuild-x64": "prebuild --runtime napi --target 6 --prepack scripts/build.js --strip --arch x64", + "prebuild-macos-arm64": "prebuild --runtime napi --target 6 --prepack 'yarn run napi-build-macos-arm64' --strip --arch arm64", + "napi-build-macos-arm64": "napi build --cargo-flags=--profile=production --target aarch64-apple-darwin", + "prebuild-linux-arm64": "prebuild --runtime napi --target 6 --prepack 'yarn run napi-build-linux-arm64' --strip --arch arm64", + "napi-build-linux-arm64": "napi build --cargo-flags=--profile=production --target aarch64-unknown-linux-gnu", + "prebuild-windows-arm64": "prebuild --runtime napi --target 6 --prepack 'yarn run napi-build-windows-arm64' --strip --arch arm64", + "napi-build-windows-arm64": "napi build --cargo-flags=--profile=production --target aarch64-pc-windows-msvc", + "rebuild": "node scripts/build && tsc && node scripts/strip.js", "install": "prebuild-install --runtime napi --tag-prefix=iota-sdk-nodejs-v && tsc || npm run rebuild", "test": "jest", "test-webpack": "cd tests/webpack && webpack-cli build --config ./webpack.config.js ", @@ -27,7 +27,6 @@ "license": "Apache-2.0", "dependencies": { "@types/node": "^18.15.12", - "cargo-cp-artifact": "^0.1.6", "class-transformer": "^0.5.1", "prebuild-install": "^7.1.1", "reflect-metadata": "^0.1.13", @@ -49,7 +48,8 @@ "typedoc": "^0.24.6", "typedoc-plugin-markdown": "^3.14.0", "webpack": "^5.88.2", - "webpack-cli": "^5.1.4" + "webpack-cli": "^5.1.4", + "@napi-rs/cli": "^1.0.0" }, "overrides": { "tar@<=4.4.17": "^4.4.19", @@ -75,5 +75,8 @@ "bugs": { "url": "https://github.com/iotaledger/iota-sdk/issues" }, - "homepage": "https://github.com/iotaledger/iota-sdk#readme" + "homepage": "https://github.com/iotaledger/iota-sdk#readme", + "napi": { + "name": "build/Release/index" + } } diff --git a/bindings/nodejs/scripts/neon-build.js b/bindings/nodejs/scripts/build.js similarity index 61% rename from bindings/nodejs/scripts/neon-build.js rename to bindings/nodejs/scripts/build.js index 742bc2868c..6397cb0966 100644 --- a/bindings/nodejs/scripts/neon-build.js +++ b/bindings/nodejs/scripts/build.js @@ -1,10 +1,9 @@ const { resolve } = require('path'); const { spawnSync } = require('child_process'); -const moveArtifact = require('./move-artifact'); -// Passing "--prepack 'yarn build:neon'" causes problems on Windows, so this is a workaround +// Passing "--prepack 'yarn build'" causes problems on Windows, so this is a workaround -const { status } = spawnSync(process.platform === 'win32' ? 'yarn.cmd' : 'yarn', ['build:neon'], { +const { status } = spawnSync(process.platform === 'win32' ? 'yarn.cmd' : 'yarn', ['build'], { stdio: 'inherit', cwd: resolve(__dirname, '../'), }); @@ -14,5 +13,3 @@ if (status === null) { } else if (status > 0) { process.exit(status); } - -moveArtifact(); diff --git a/bindings/nodejs/scripts/move-artifact.js b/bindings/nodejs/scripts/move-artifact.js deleted file mode 100644 index 7b63c5e122..0000000000 --- a/bindings/nodejs/scripts/move-artifact.js +++ /dev/null @@ -1,15 +0,0 @@ -const { existsSync, mkdirSync, renameSync } = require('fs'); -const { resolve } = require('path'); - -// Prebuild requires that the binary be in `build/Release` as though it was built with node-gyp - -const moveArtifact = () => { - const path = resolve(__dirname, '../build/Release'); - - if (!existsSync(path)) { - mkdirSync(path, { recursive: true }); - } - renameSync(resolve(__dirname, '../index.node'), resolve(path, 'index.node')); -}; - -module.exports = moveArtifact; diff --git a/bindings/nodejs/scripts/strip.js b/bindings/nodejs/scripts/strip.js index fa99aa5360..944f1b350f 100644 --- a/bindings/nodejs/scripts/strip.js +++ b/bindings/nodejs/scripts/strip.js @@ -1,3 +1,4 @@ +// Removes symbols and debug information from the binary to reduce its size. const { resolve } = require('path'); const { spawnSync } = require('child_process'); diff --git a/bindings/nodejs/src/client.rs b/bindings/nodejs/src/client.rs index c170e1b94a..cba9423f74 100644 --- a/bindings/nodejs/src/client.rs +++ b/bindings/nodejs/src/client.rs @@ -6,140 +6,81 @@ use std::sync::{Arc, RwLock}; use iota_sdk_bindings_core::{ call_client_method as rust_call_client_method, iota_sdk::client::{mqtt::Topic, Client, ClientBuilder}, - listen_mqtt as rust_listen_mqtt, ClientMethod, Response, Result, + listen_mqtt as rust_listen_mqtt, ClientMethod, Response, }; -use neon::prelude::*; - -use crate::binding_glue; - -type JsCallback = Root>; - -pub type SharedClientMethodHandler = Arc>>; - -#[derive(Clone)] -pub struct ClientMethodHandler { - channel: Channel, - client: Client, -} - -impl Finalize for ClientMethodHandler {} - -impl ClientMethodHandler { - pub fn new(channel: Channel, options: String) -> Result { - let runtime = tokio::runtime::Runtime::new().expect("error initializing client"); - let client = runtime.block_on(ClientBuilder::new().from_json(&options)?.finish())?; - - Ok(Self { channel, client }) - } - - pub(crate) fn new_with_client(channel: Channel, client: Client) -> Self { - Self { channel, client } - } - - async fn call_method(&self, serialized_method: String) -> (String, bool) { - match serde_json::from_str::(&serialized_method) { - Ok(method) => { - let res = rust_call_client_method(&self.client, method).await; - let mut is_err = matches!(res, Response::Error(_) | Response::Panic(_)); - - let msg = match serde_json::to_string(&res) { - Ok(msg) => msg, - Err(e) => { - is_err = true; - serde_json::to_string(&Response::Error(e.into())).expect("json to string error") - } - }; - - (msg, is_err) - } - Err(e) => ( - serde_json::to_string(&Response::Error(e.into())).expect("json to string error"), - true, - ), - } - } +use napi::{bindgen_prelude::External, threadsafe_function::ThreadsafeFunction, Error, Result, Status}; +use napi_derive::napi; +use tokio::sync::RwLock; + +use crate::NodejsError; + +pub type ClientMethodHandler = Arc>>; + +#[napi(js_name = "createClient")] +pub fn create_client(options: String) -> Result> { + let runtime = tokio::runtime::Runtime::new().map_err(NodejsError::from)?; + let client = runtime + .block_on( + ClientBuilder::new() + .from_json(&options) + .map_err(NodejsError::from)? + .finish(), + ) + .map_err(NodejsError::from)?; + Ok(External::new(Arc::new(RwLock::new(Some(client))))) } -pub fn create_client(mut cx: FunctionContext) -> JsResult> { - let options = cx.argument::(0)?; - let options = options.value(&mut cx); - let channel = cx.channel(); - let method_handler = ClientMethodHandler::new(channel, options) - .or_else(|e| cx.throw_error(serde_json::to_string(&Response::Error(e)).expect("json to string error")))?; - Ok(cx.boxed(Arc::new(RwLock::new(Some(method_handler))))) +#[napi(js_name = "destroyClient")] +pub async fn destroy_client(client: External) { + *client.as_ref().write().await = None; } -pub fn destroy_client(mut cx: FunctionContext) -> JsResult { - match cx.argument::>(0)?.write() { - Ok(mut lock) => *lock = None, - Err(e) => { - return cx - .throw_error(serde_json::to_string(&Response::Panic(e.to_string())).expect("json to string error")); +#[napi(js_name = "callClientMethod")] +pub async fn call_client_method(client: External, method: String) -> Result { + let client_method = serde_json::from_str::(&method).map_err(NodejsError::from)?; + + if let Some(client) = &*client.as_ref().read().await { + let res = rust_call_client_method(client, client_method).await; + if matches!(res, Response::Error(_) | Response::Panic(_)) { + return Err(Error::new( + Status::GenericFailure, + serde_json::to_string(&res).map_err(NodejsError::from)?, + )); } - } - Ok(cx.undefined()) -} - -pub fn call_client_method(mut cx: FunctionContext) -> JsResult { - let method_handler = cx.argument::>(1); - let method = cx.argument::(0)?; - let method = method.value(&mut cx); - let callback = cx.argument::(2)?.root(&mut cx); - - binding_glue!(cx, method, method_handler, callback, "Client") -} - -// MQTT -pub fn listen_mqtt(mut cx: FunctionContext) -> JsResult { - let js_arr_handle: Handle = cx.argument(0)?; - let vec: Vec> = js_arr_handle.to_vec(&mut cx)?; - let mut topics = Vec::with_capacity(vec.len()); - for topic_string in vec { - let topic = topic_string.downcast::(&mut cx).unwrap(); - topics.push(Topic::new(topic.value(&mut cx).as_str()).or_else(|e| { - cx.throw_error(serde_json::to_string(&Response::Error(e.into())).expect("json to string error")) - })?); - } - - let callback = Arc::new(cx.argument::(1)?.root(&mut cx)); - match cx.argument::>(2)?.read() { - Ok(lock) => { - let method_handler = lock.clone(); - if let Some(method_handler) = method_handler { - crate::RUNTIME.spawn(async move { - rust_listen_mqtt(&method_handler.client, topics, move |event_data| { - call_event_callback(&method_handler.channel, event_data, callback.clone()) - }) - .await; - }); - Ok(cx.undefined()) - } else { - // Notify that the client was destroyed - cx.throw_error( - serde_json::to_string(&Response::Panic("Client was destroyed".to_string())) - .expect("json to string error"), - ) - } - } - Err(e) => cx.throw_error(serde_json::to_string(&Response::Panic(e.to_string())).expect("json to string error")), + Ok(serde_json::to_string(&res).map_err(NodejsError::from)?) + } else { + Err(Error::new( + Status::GenericFailure, + serde_json::to_string(&Response::Panic("Client got destroyed".to_string())).map_err(NodejsError::from)?, + )) } } -fn call_event_callback(channel: &neon::event::Channel, event_data: String, callback: Arc) { - channel.send(move |mut cx| { - let cb = (*callback).to_inner(&mut cx); - // instance of class we call on, its a global fn so "undefined" - let this = cx.undefined(); - - // callback is fn(err, event) - let args = [ - cx.undefined().upcast::(), - cx.string(event_data).upcast::(), - ]; - - cb.call(&mut cx, this, args)?; +#[napi(js_name = "listenMqtt")] +pub async fn listen_mqtt( + client: External, + topics: Vec, + callback: ThreadsafeFunction, +) -> Result<()> { + let mut validated_topics = Vec::with_capacity(topics.len()); + for topic_string in topics { + validated_topics.push(Topic::new(topic_string).map_err(NodejsError::from)?); + } + if let Some(client) = &*client.as_ref().read().await { + rust_listen_mqtt(client, validated_topics, move |event_data| { + callback.call( + Ok(event_data), + napi::threadsafe_function::ThreadsafeFunctionCallMode::NonBlocking, + ); + }) + .await; Ok(()) - }); + } else { + Err(Error::new( + Status::GenericFailure, + serde_json::to_string(&Response::Panic("Client got destroyed".to_string())).map_err(NodejsError::from)?, + )) + } } diff --git a/bindings/nodejs/src/lib.rs b/bindings/nodejs/src/lib.rs index bcf9827617..9228744cf7 100644 --- a/bindings/nodejs/src/lib.rs +++ b/bindings/nodejs/src/lib.rs @@ -1,71 +1,67 @@ // Copyright 2023 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -mod client; -mod secret_manager; -mod wallet; + +pub mod client; +pub mod secret_manager; +pub mod wallet; use iota_sdk_bindings_core::{ call_utils_method as rust_call_utils_method, init_logger as rust_init_logger, Response, UtilsMethod, }; -use neon::prelude::*; -use once_cell::sync::Lazy; -use tokio::runtime::Runtime; +use napi::{Error, Result, Status}; +use napi_derive::napi; + +#[derive(Debug, thiserror::Error)] +#[non_exhaustive] +pub enum NodejsError { + /// Bindings core errors. + #[error(transparent)] + Core(#[from] iota_sdk_bindings_core::Error), + /// Client errors. + #[error(transparent)] + Client(#[from] iota_sdk_bindings_core::iota_sdk::client::Error), + /// Mqtt errors. + #[error(transparent)] + Mqtt(#[from] iota_sdk_bindings_core::iota_sdk::client::node_api::mqtt::Error), + /// SerdeJson errors. + #[error(transparent)] + SerdeJson(#[from] serde_json::error::Error), + /// IO error. + #[error(transparent)] + Io(#[from] std::io::Error), + /// Wallet errors. + #[error(transparent)] + Wallet(#[from] iota_sdk_bindings_core::iota_sdk::wallet::Error), +} -pub static RUNTIME: Lazy = Lazy::new(|| Runtime::new().unwrap()); +impl From for Error { + fn from(error: NodejsError) -> Self { + Error::new(Status::GenericFailure, error.to_string()) + } +} -pub fn init_logger(mut cx: FunctionContext) -> JsResult { - let config = cx.argument::(0)?.value(&mut cx); +#[napi(js_name = "initLogger")] +pub fn init_logger(config: String) -> Result<()> { match rust_init_logger(config) { - Ok(_) => Ok(cx.undefined()), - Err(err) => { - cx.throw_error(serde_json::to_string(&Response::Panic(err.to_string())).expect("json to string error")) - } + Ok(_) => Ok(()), + Err(err) => Err(Error::new( + Status::GenericFailure, + serde_json::to_string(&Response::Panic(err.to_string())).map_err(NodejsError::from)?, + )), } } -pub fn call_utils_method(mut cx: FunctionContext) -> JsResult { - let method = cx.argument::(0)?.value(&mut cx); - let method = match serde_json::from_str::(&method) { +#[napi(js_name = "callUtilsMethodRust")] +pub fn call_utils_method(method_json: String) -> Result { + let method = match serde_json::from_str::(&method_json) { Ok(method) => method, Err(err) => { - return Ok(cx.string(serde_json::to_string(&Response::Error(err.into())).expect("json to string error"))); + return Ok(serde_json::to_string(&Response::Error(err.into())).map_err(NodejsError::from)?); } }; let response = rust_call_utils_method(method); - Ok(cx.string(serde_json::to_string(&response).unwrap())) -} - -#[neon::main] -fn main(mut cx: ModuleContext) -> NeonResult<()> { - cx.export_function("initLogger", init_logger)?; - - cx.export_function("callUtilsMethodRust", call_utils_method)?; - - // Client - cx.export_function("callClientMethod", client::call_client_method)?; - cx.export_function("createClient", client::create_client)?; - cx.export_function("destroyClient", client::destroy_client)?; - - // MQTT - cx.export_function("listenMqtt", client::listen_mqtt)?; - - cx.export_function("callSecretManagerMethod", secret_manager::call_secret_manager_method)?; - cx.export_function("createSecretManager", secret_manager::create_secret_manager)?; - cx.export_function( - "migrateStrongholdSnapshotV2ToV3", - secret_manager::migrate_stronghold_snapshot_v2_to_v3, - )?; - - // Wallet - cx.export_function("callWalletMethod", wallet::call_wallet_method)?; - cx.export_function("createWallet", wallet::create_wallet)?; - cx.export_function("destroyWallet", wallet::destroy_wallet)?; - cx.export_function("getClientFromWallet", wallet::get_client)?; - cx.export_function("getSecretManagerFromWallet", wallet::get_secret_manager)?; - cx.export_function("listenWallet", wallet::listen_wallet)?; - - Ok(()) + Ok(serde_json::to_string(&response).map_err(NodejsError::from)?) } #[macro_export] diff --git a/bindings/nodejs/src/secret_manager.rs b/bindings/nodejs/src/secret_manager.rs index dc15b5f0b4..b7c39c4071 100644 --- a/bindings/nodejs/src/secret_manager.rs +++ b/bindings/nodejs/src/secret_manager.rs @@ -1,7 +1,7 @@ // Copyright 2023 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use std::{ops::Deref, sync::Arc}; +use std::sync::Arc; use iota_sdk_bindings_core::{ call_secret_manager_method as rust_call_secret_manager_method, @@ -9,135 +9,64 @@ use iota_sdk_bindings_core::{ secret::{SecretManager, SecretManagerDto}, stronghold::StrongholdAdapter, }, - Response, Result, SecretManagerMethod, + Response, SecretManagerMethod, }; -use neon::prelude::*; +use napi::{bindgen_prelude::External, Error, Result, Status}; +use napi_derive::napi; use tokio::sync::RwLock; -pub struct SecretManagerMethodHandler { - channel: Channel, - secret_manager: Arc>, -} - -impl Finalize for SecretManagerMethodHandler {} +use crate::NodejsError; -impl SecretManagerMethodHandler { - fn new(channel: Channel, options: String) -> Result> { - let secret_manager_dto = serde_json::from_str::(&options)?; - let secret_manager = SecretManager::try_from(secret_manager_dto)?; +pub type SecretManagerMethodHandler = Arc>; - Ok(Arc::new(Self { - channel, - secret_manager: Arc::new(RwLock::new(secret_manager)), - })) - } - - pub fn new_with_secret_manager(channel: Channel, secret_manager: Arc>) -> Arc { - Arc::new(Self { - channel, - secret_manager, - }) - } +#[napi(js_name = "createSecretManager")] +pub fn create_secret_manager(options: String) -> Result> { + let secret_manager_dto = serde_json::from_str::(&options).map_err(NodejsError::from)?; + let secret_manager = SecretManager::try_from(secret_manager_dto).map_err(NodejsError::from)?; - async fn call_method(&self, method: String) -> (String, bool) { - match serde_json::from_str::(&method) { - Ok(method) => { - let res = { - let secret_manager = self.secret_manager.read().await; - rust_call_secret_manager_method(&*secret_manager, method).await - }; - let mut is_err = matches!(res, Response::Error(_) | Response::Panic(_)); - - let msg = match serde_json::to_string(&res) { - Ok(msg) => msg, - Err(e) => { - is_err = true; - serde_json::to_string(&Response::Error(e.into())).expect("json to string error") - } - }; - - (msg, is_err) - } - Err(e) => { - log::error!("{:?}", e); - (format!("Couldn't parse to method with error - {e:?}"), true) - } - } - } + Ok(External::new(Arc::new(RwLock::new(secret_manager)))) } -pub fn create_secret_manager(mut cx: FunctionContext) -> JsResult>> { - let options = cx.argument::(0)?; - let options = options.value(&mut cx); - let channel = cx.channel(); - - let method_handler = SecretManagerMethodHandler::new(channel, options) - .or_else(|e| cx.throw_error(serde_json::to_string(&Response::Error(e)).expect("json to string error")))?; - - Ok(cx.boxed(method_handler)) -} - -pub fn call_secret_manager_method(mut cx: FunctionContext) -> JsResult { - let method = cx.argument::(0)?; - let method = method.value(&mut cx); - let method_handler = Arc::clone(cx.argument::>>(1)?.deref()); - let callback = cx.argument::(2)?.root(&mut cx); - - crate::RUNTIME.spawn(async move { - let (response, is_error) = method_handler.call_method(method).await; - method_handler.channel.send(move |mut cx| { - let cb = callback.into_inner(&mut cx); - let this = cx.undefined(); - - let args = vec![ - if is_error { - cx.error(response.clone())?.upcast::() - } else { - cx.undefined().upcast::() - }, - cx.string(response).upcast::(), - ]; - - cb.call(&mut cx, this, args)?; - - Ok(()) - }); - }); +#[napi(js_name = "callSecretManagerMethod")] +pub async fn call_secret_manager_method( + secret_manager: External, + method: String, +) -> Result { + let secret_manager_method = serde_json::from_str::(&method).map_err(NodejsError::from)?; + + let res = rust_call_secret_manager_method(&*secret_manager.as_ref().read().await, secret_manager_method).await; + if matches!(res, Response::Error(_) | Response::Panic(_)) { + return Err(Error::new( + Status::GenericFailure, + serde_json::to_string(&res).map_err(NodejsError::from)?, + )); + } - Ok(cx.undefined()) + Ok(serde_json::to_string(&res).map_err(NodejsError::from)?) } -pub fn migrate_stronghold_snapshot_v2_to_v3(mut cx: FunctionContext) -> JsResult { - let current_path = cx.argument::(0)?.value(&mut cx); - let current_password = cx.argument::(1)?.value(&mut cx).into(); - let salt = cx.argument::(2)?.value(&mut cx); - let rounds = cx.argument::(3)?.value(&mut cx); - let new_path = cx - .argument_opt(4) - .map(|opt| opt.downcast_or_throw::(&mut cx)) - .transpose()? - .map(|opt| opt.value(&mut cx)); - let new_password = cx - .argument_opt(5) - .map(|opt| opt.downcast_or_throw::(&mut cx)) - .transpose()? - .map(|opt| opt.value(&mut cx)) - .map(Into::into); +#[napi(js_name = "migrateStrongholdSnapshotV2ToV3")] +pub fn migrate_stronghold_snapshot_v2_to_v3( + current_path: String, + current_password: String, + salt: String, + rounds: u32, + new_path: Option, + new_password: Option, +) -> Result<()> { + let current_password = current_password.into(); + let new_password = new_password.map(Into::into); StrongholdAdapter::migrate_snapshot_v2_to_v3( ¤t_path, current_password, salt, - rounds as u32, + rounds, new_path.as_ref(), new_password, ) - .or_else(|e| { - cx.throw_error( - serde_json::to_string(&Response::Error(e.into())) - .expect("the response is generated manually, so unwrap is safe."), - ) - })?; + .map_err(iota_sdk_bindings_core::iota_sdk::client::Error::from) + .map_err(NodejsError::from)?; - Ok(cx.undefined()) + Ok(()) } diff --git a/bindings/nodejs/src/wallet.rs b/bindings/nodejs/src/wallet.rs index 118730bcb1..d07bf0e38c 100644 --- a/bindings/nodejs/src/wallet.rs +++ b/bindings/nodejs/src/wallet.rs @@ -5,189 +5,104 @@ use std::sync::{Arc, RwLock}; use iota_sdk_bindings_core::{ call_wallet_method as rust_call_wallet_method, - iota_sdk::wallet::{ - events::types::{Event, WalletEventType}, - Wallet, - }, - Response, Result, WalletMethod, WalletOptions, + iota_sdk::wallet::{events::WalletEventType, Wallet}, + Response, WalletMethod, WalletOptions, }; -use neon::prelude::*; +use napi::{bindgen_prelude::External, threadsafe_function::ThreadsafeFunction, Error, Result, Status}; +use napi_derive::napi; +use tokio::sync::RwLock; -use crate::{ - client::{ClientMethodHandler, SharedClientMethodHandler}, - secret_manager::SecretManagerMethodHandler, binding_glue, -}; - -pub type SharedWalletMethodHandler = Arc>>; - -#[derive(Clone)] -pub struct WalletMethodHandler { - channel: Channel, - wallet: Wallet, -} - -impl Finalize for WalletMethodHandler {} +use crate::{client::ClientMethodHandler, secret_manager::SecretManagerMethodHandler, NodejsError}; -type JsCallback = Root>; - -impl WalletMethodHandler { - fn new(channel: Channel, options: String) -> Result { - let wallet_options = serde_json::from_str::(&options)?; - - let wallet = crate::RUNTIME.block_on(async move { wallet_options.build().await })?; - - Ok(Self { channel, wallet }) - } +pub type WalletMethodHandler = Arc>>; - async fn call_method(&self, method: String) -> (String, bool) { - match serde_json::from_str::(&method) { - Ok(method) => { - let res = rust_call_wallet_method(&self.wallet, method).await; - let mut is_err = matches!(res, Response::Error(_) | Response::Panic(_)); +#[napi(js_name = "createWallet")] +pub fn create_wallet(options: String) -> Result> { + let wallet_options = serde_json::from_str::(&options).map_err(NodejsError::from)?; + let runtime = tokio::runtime::Runtime::new().map_err(NodejsError::from)?; + let wallet = runtime.block_on(wallet_options.build()).map_err(NodejsError::from)?; - let msg = match serde_json::to_string(&res) { - Ok(msg) => msg, - Err(e) => { - is_err = true; - serde_json::to_string(&Response::Error(e.into())).expect("json to string error") - } - }; - - (msg, is_err) - } - Err(e) => ( - serde_json::to_string(&Response::Error(e.into())).expect("json to string error"), - true, - ), - } - } + Ok(External::new(Arc::new(RwLock::new(Some(wallet))))) } -fn call_event_callback(channel: &neon::event::Channel, event_data: Event, callback: Arc) { - channel.send(move |mut cx| { - let cb = (*callback).to_inner(&mut cx); - let this = cx.undefined(); - let args = [ - cx.undefined().upcast::(), - cx.string(serde_json::to_string(&event_data).unwrap()) - .upcast::(), - ]; - - cb.call(&mut cx, this, args)?; - - Ok(()) - }); +#[napi(js_name = "destroyWallet")] +pub async fn destroy_wallet(wallet: External) { + *wallet.as_ref().write().await = None; } -pub fn create_wallet(mut cx: FunctionContext) -> JsResult> { - let options = cx.argument::(0)?; - let options = options.value(&mut cx); - let channel = cx.channel(); - let method_handler = WalletMethodHandler::new(channel, options) - .or_else(|e| cx.throw_error(serde_json::to_string(&Response::Error(e)).expect("json to string error")))?; - - Ok(cx.boxed(Arc::new(RwLock::new(Some(method_handler))))) -} - -pub fn call_wallet_method(mut cx: FunctionContext) -> JsResult { - let method_handler = cx.argument::>(1); - let method = cx.argument::(0)?; - let method = method.value(&mut cx); - let callback = cx.argument::(2)?.root(&mut cx); - - binding_glue!(cx, method, method_handler, callback, "Wallet") -} +#[napi(js_name = "callWalletMethod")] +pub async fn call_wallet_method(wallet: External, method: String) -> Result { + let wallet_method = serde_json::from_str::(&method).map_err(NodejsError::from)?; + + if let Some(wallet) = &*wallet.as_ref().read().await { + let res = rust_call_wallet_method(wallet, wallet_method).await; + if matches!(res, Response::Error(_) | Response::Panic(_)) { + return Err(Error::new( + Status::GenericFailure, + serde_json::to_string(&res).map_err(NodejsError::from)?, + )); + } -pub fn listen_wallet(mut cx: FunctionContext) -> JsResult { - let js_arr_handle: Handle = cx.argument(0)?; - let vec: Vec> = js_arr_handle.to_vec(&mut cx)?; - let mut event_types = Vec::with_capacity(vec.len()); - for event_string in vec { - let event_type = event_string.downcast_or_throw::(&mut cx)?; - let wallet_event_type = - WalletEventType::try_from(event_type.value(&mut cx) as u8).or_else(|e| cx.throw_error(e))?; - event_types.push(wallet_event_type); + Ok(serde_json::to_string(&res).map_err(NodejsError::from)?) + } else { + Err(Error::new( + Status::GenericFailure, + serde_json::to_string(&Response::Panic("Wallet got destroyed".to_string())).map_err(NodejsError::from)?, + )) } - let callback = Arc::new(cx.argument::(1)?.root(&mut cx)); - - match cx.argument::>(2)?.read() { - Ok(lock) => { - let method_handler = lock.clone(); - if let Some(method_handler) = method_handler { - crate::RUNTIME.spawn(async move { - method_handler - .wallet - .listen(event_types, move |event_data| { - call_event_callback(&method_handler.channel, event_data.clone(), callback.clone()) - }) - .await; - }); +} - Ok(cx.undefined()) - } else { - // Notify that the wallet was destroyed - cx.throw_error( - serde_json::to_string(&Response::Panic("Wallet was destroyed".to_string())) - .expect("json to string error"), - ) - } - } - Err(e) => cx.throw_error(serde_json::to_string(&Response::Panic(e.to_string())).expect("json to string error")), +#[napi(js_name = "listenWallet")] +pub async fn listen_wallet( + wallet: External, + event_types: Vec, + callback: ThreadsafeFunction, +) -> Result<()> { + let mut validated_event_types = Vec::with_capacity(event_types.len()); + for event_type in event_types { + validated_event_types.push(WalletEventType::try_from(event_type).map_err(NodejsError::from)?); } -} -pub fn destroy_wallet(mut cx: FunctionContext) -> JsResult { - match cx.argument::>(0)?.write() { - Ok(mut lock) => *lock = None, - Err(e) => { - return cx - .throw_error(serde_json::to_string(&Response::Panic(e.to_string())).expect("json to string error")); - } + if let Some(wallet) = &*wallet.as_ref().read().await { + wallet + .listen(validated_event_types, move |event_data| { + callback.call( + serde_json::to_string(event_data) + .map_err(NodejsError::from) + .map_err(Error::from), + napi::threadsafe_function::ThreadsafeFunctionCallMode::NonBlocking, + ); + }) + .await; + Ok(()) + } else { + Err(Error::new( + Status::GenericFailure, + serde_json::to_string(&Response::Panic("Wallet got destroyed".to_string())).map_err(NodejsError::from)?, + )) } - Ok(cx.undefined()) } -pub fn get_client(mut cx: FunctionContext) -> JsResult> { - match cx.argument::>(0)?.read() { - Ok(lock) => { - if let Some(method_handler) = &*lock { - let client_method_handler = - ClientMethodHandler::new_with_client(cx.channel(), method_handler.wallet.client().clone()); - - Ok(cx.boxed(Arc::new(RwLock::new(Some(client_method_handler))))) - } else { - // Notify that the wallet was destroyed - cx.throw_error( - serde_json::to_string(&Response::Panic("Wallet was destroyed".to_string())) - .expect("json to string error"), - ) - } - } - Err(e) => cx.throw_error(serde_json::to_string(&Response::Panic(e.to_string())).expect("json to string error")), +#[napi(js_name = "getClient")] +pub async fn get_client(wallet: External) -> Result> { + if let Some(wallet) = &*wallet.as_ref().read().await { + Ok(External::new(Arc::new(RwLock::new(Some(wallet.client().clone()))))) + } else { + Err(Error::new( + Status::GenericFailure, + serde_json::to_string(&Response::Panic("Wallet got destroyed".to_string())).map_err(NodejsError::from)?, + )) } } -pub fn get_secret_manager(mut cx: FunctionContext) -> JsResult>> { - match cx.argument::>(0)?.read() { - Ok(lock) => { - if let Some(method_handler) = &*lock { - let secret_manager_method_handler = SecretManagerMethodHandler::new_with_secret_manager( - cx.channel(), - method_handler.wallet.get_secret_manager().clone(), - ); - - Ok(cx.boxed(secret_manager_method_handler)) - } else { - // Notify that the wallet was destroyed - cx.throw_error( - serde_json::to_string(&Response::Panic("Wallet was destroyed".to_string())) - .expect("json to string error"), - ) - } - } - Err(e) => { - return cx - .throw_error(serde_json::to_string(&Response::Panic(e.to_string())).expect("json to string error")); - } +#[napi(js_name = "getSecretManager")] +pub async fn get_secret_manager(wallet: External) -> Result> { + if let Some(wallet) = &*wallet.as_ref().read().await { + Ok(External::new(wallet.get_secret_manager().clone())) + } else { + Err(Error::new( + Status::GenericFailure, + serde_json::to_string(&Response::Panic("Wallet got destroyed".to_string())).map_err(NodejsError::from)?, + )) } } diff --git a/bindings/nodejs/yarn.lock b/bindings/nodejs/yarn.lock index a9463d9696..ba918689f7 100644 --- a/bindings/nodejs/yarn.lock +++ b/bindings/nodejs/yarn.lock @@ -4,54 +4,54 @@ "@aashutoshrathi/word-wrap@^1.2.3": version "1.2.6" - resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" + resolved "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz" integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== "@ampproject/remapping@^2.2.0": version "2.2.1" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" + resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz" integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg== dependencies: "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.13": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.10", "@babel/code-frame@^7.22.13": version "7.22.13" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz" integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w== dependencies: "@babel/highlight" "^7.22.13" chalk "^2.4.2" "@babel/compat-data@^7.22.9": - version "7.23.2" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.2.tgz#6a12ced93455827037bfb5ed8492820d60fc32cc" - integrity sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ== + version "7.22.9" + resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz" + integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ== "@babel/core@^7.11.6", "@babel/core@^7.12.3": - version "7.23.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.2.tgz#ed10df0d580fff67c5f3ee70fd22e2e4c90a9f94" - integrity sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ== + version "7.22.10" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.22.10.tgz" + integrity sha512-fTmqbbUBAwCcre6zPzNngvsI0aNrPZe77AeqvDxWM9Nm+04RrJ3CAmGHA9f7lJQY6ZMhRztNemy4uslDxTX4Qw== dependencies: "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.22.13" - "@babel/generator" "^7.23.0" - "@babel/helper-compilation-targets" "^7.22.15" - "@babel/helper-module-transforms" "^7.23.0" - "@babel/helpers" "^7.23.2" - "@babel/parser" "^7.23.0" - "@babel/template" "^7.22.15" - "@babel/traverse" "^7.23.2" - "@babel/types" "^7.23.0" - convert-source-map "^2.0.0" + "@babel/code-frame" "^7.22.10" + "@babel/generator" "^7.22.10" + "@babel/helper-compilation-targets" "^7.22.10" + "@babel/helper-module-transforms" "^7.22.9" + "@babel/helpers" "^7.22.10" + "@babel/parser" "^7.22.10" + "@babel/template" "^7.22.5" + "@babel/traverse" "^7.22.10" + "@babel/types" "^7.22.10" + convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" - json5 "^2.2.3" + json5 "^2.2.2" semver "^6.3.1" -"@babel/generator@^7.23.0", "@babel/generator@^7.7.2": +"@babel/generator@^7.22.10", "@babel/generator@^7.23.0", "@babel/generator@^7.7.2": version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.0.tgz#df5c386e2218be505b34837acbcb874d7a983420" + resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz" integrity sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g== dependencies: "@babel/types" "^7.23.0" @@ -59,25 +59,25 @@ "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" -"@babel/helper-compilation-targets@^7.22.15": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz#0698fc44551a26cf29f18d4662d5bf545a6cfc52" - integrity sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw== +"@babel/helper-compilation-targets@^7.22.10": + version "7.22.10" + resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.10.tgz" + integrity sha512-JMSwHD4J7SLod0idLq5PKgI+6g/hLD/iuWBq08ZX49xE14VpVEojJ5rHWptpirV2j020MvypRLAXAO50igCJ5Q== dependencies: "@babel/compat-data" "^7.22.9" - "@babel/helper-validator-option" "^7.22.15" + "@babel/helper-validator-option" "^7.22.5" browserslist "^4.21.9" lru-cache "^5.1.1" semver "^6.3.1" -"@babel/helper-environment-visitor@^7.22.20": +"@babel/helper-environment-visitor@^7.22.20", "@babel/helper-environment-visitor@^7.22.5": version "7.22.20" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" + resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz" integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== "@babel/helper-function-name@^7.23.0": version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" + resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz" integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== dependencies: "@babel/template" "^7.22.15" @@ -85,196 +85,196 @@ "@babel/helper-hoist-variables@^7.22.5": version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" + resolved "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz" integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== dependencies: "@babel/types" "^7.22.5" -"@babel/helper-module-imports@^7.22.15": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz#16146307acdc40cc00c3b2c647713076464bdbf0" - integrity sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w== +"@babel/helper-module-imports@^7.22.5": + version "7.22.5" + resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz" + integrity sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg== dependencies: - "@babel/types" "^7.22.15" + "@babel/types" "^7.22.5" -"@babel/helper-module-transforms@^7.23.0": - version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz#3ec246457f6c842c0aee62a01f60739906f7047e" - integrity sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw== +"@babel/helper-module-transforms@^7.22.9": + version "7.22.9" + resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz" + integrity sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ== dependencies: - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-module-imports" "^7.22.15" + "@babel/helper-environment-visitor" "^7.22.5" + "@babel/helper-module-imports" "^7.22.5" "@babel/helper-simple-access" "^7.22.5" "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/helper-validator-identifier" "^7.22.20" + "@babel/helper-validator-identifier" "^7.22.5" "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0": version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295" + resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz" integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== "@babel/helper-simple-access@^7.22.5": version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz#4938357dc7d782b80ed6dbb03a0fba3d22b1d5de" + resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz" integrity sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w== dependencies: "@babel/types" "^7.22.5" "@babel/helper-split-export-declaration@^7.22.6": version "7.22.6" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" + resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz" integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== dependencies: "@babel/types" "^7.22.5" "@babel/helper-string-parser@^7.22.5": version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" + resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz" integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== -"@babel/helper-validator-identifier@^7.22.20": +"@babel/helper-validator-identifier@^7.22.20", "@babel/helper-validator-identifier@^7.22.5": version "7.22.20" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" + resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz" integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== -"@babel/helper-validator-option@^7.22.15": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz#694c30dfa1d09a6534cdfcafbe56789d36aba040" - integrity sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA== +"@babel/helper-validator-option@^7.22.5": + version "7.22.5" + resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz" + integrity sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw== -"@babel/helpers@^7.23.2": - version "7.23.2" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.2.tgz#2832549a6e37d484286e15ba36a5330483cac767" - integrity sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ== +"@babel/helpers@^7.22.10": + version "7.22.10" + resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.10.tgz" + integrity sha512-a41J4NW8HyZa1I1vAndrraTlPZ/eZoga2ZgS7fEr0tZJGVU4xqdE80CEm0CcNjha5EZ8fTBYLKHF0kqDUuAwQw== dependencies: - "@babel/template" "^7.22.15" - "@babel/traverse" "^7.23.2" - "@babel/types" "^7.23.0" + "@babel/template" "^7.22.5" + "@babel/traverse" "^7.22.10" + "@babel/types" "^7.22.10" "@babel/highlight@^7.22.13": version "7.22.20" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.20.tgz#4ca92b71d80554b01427815e06f2df965b9c1f54" + resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz" integrity sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg== dependencies: "@babel/helper-validator-identifier" "^7.22.20" chalk "^2.4.2" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.15", "@babel/parser@^7.23.0": +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.10", "@babel/parser@^7.22.15", "@babel/parser@^7.23.0": version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz" integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz" integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-bigint@^7.8.3": version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz" integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-class-properties@^7.8.3": version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz" integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== dependencies: "@babel/helper-plugin-utils" "^7.12.13" "@babel/plugin-syntax-import-meta@^7.8.3": version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" + 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== dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-json-strings@^7.8.3": version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz" integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-jsx@^7.7.2": version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz#a6b68e84fb76e759fc3b93e901876ffabbe1d918" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz" integrity sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" + 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== dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" + 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== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-numeric-separator@^7.8.3": version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" + 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== dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-object-rest-spread@^7.8.3": version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + 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== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-optional-catch-binding@^7.8.3": version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" + 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== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-optional-chaining@^7.8.3": version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz" integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-top-level-await@^7.8.3": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" + 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== dependencies: "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript@^7.7.2": version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz#aac8d383b062c5072c647a31ef990c1d0af90272" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz" integrity sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ== dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/template@^7.22.15", "@babel/template@^7.3.3": +"@babel/template@^7.22.15", "@babel/template@^7.22.5", "@babel/template@^7.3.3": version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" + resolved "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz" integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w== dependencies: "@babel/code-frame" "^7.22.13" "@babel/parser" "^7.22.15" "@babel/types" "^7.22.15" -"@babel/traverse@^7.23.2": +"@babel/traverse@^7.22.10": version "7.23.2" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8" + resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz" integrity sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw== dependencies: "@babel/code-frame" "^7.22.13" @@ -288,9 +288,9 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.3.3": +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.10", "@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.3.3": version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.0.tgz#8c1f020c9df0e737e4e247c0619f58c68458aaeb" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz" integrity sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg== dependencies: "@babel/helper-string-parser" "^7.22.5" @@ -299,29 +299,29 @@ "@bcoe/v8-coverage@^0.2.3": version "0.2.3" - resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" + resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== "@discoveryjs/json-ext@^0.5.0": version "0.5.7" - resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" + resolved "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz" integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" - resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" + resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz" integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== dependencies: eslint-visitor-keys "^3.3.0" "@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.1": - version "4.10.0" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" - integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== + version "4.6.2" + resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz" + integrity sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw== "@eslint/eslintrc@^2.1.2": version "2.1.2" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.2.tgz#c6936b4b328c64496692f76944e755738be62396" + resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz" integrity sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g== dependencies: ajv "^6.12.4" @@ -334,33 +334,33 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.52.0": - version "8.52.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.52.0.tgz#78fe5f117840f69dc4a353adf9b9cd926353378c" - integrity sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA== +"@eslint/js@^8.47.0": + version "8.47.0" + resolved "https://registry.npmjs.org/@eslint/js/-/js-8.47.0.tgz" + integrity sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og== -"@humanwhocodes/config-array@^0.11.13": - version "0.11.13" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.13.tgz#075dc9684f40a531d9b26b0822153c1e832ee297" - integrity sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ== +"@humanwhocodes/config-array@^0.11.10": + version "0.11.10" + resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz" + integrity sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ== dependencies: - "@humanwhocodes/object-schema" "^2.0.1" + "@humanwhocodes/object-schema" "^1.2.1" debug "^4.1.1" minimatch "^3.0.5" "@humanwhocodes/module-importer@^1.0.1": version "1.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + resolved "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz#e5211452df060fa8522b55c7b3c0c4d1981cb044" - integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw== +"@humanwhocodes/object-schema@^1.2.1": + 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== "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" - resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" + resolved "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz" integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== dependencies: camelcase "^5.3.1" @@ -371,112 +371,112 @@ "@istanbuljs/schema@^0.1.2": version "0.1.3" - resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + resolved "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== -"@jest/console@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.7.0.tgz#cd4822dbdb84529265c5a2bdb529a3c9cc950ffc" - integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg== +"@jest/console@^29.6.2": + version "29.6.2" + resolved "https://registry.npmjs.org/@jest/console/-/console-29.6.2.tgz" + integrity sha512-0N0yZof5hi44HAR2pPS+ikJ3nzKNoZdVu8FffRf3wy47I7Dm7etk/3KetMdRUqzVd16V4O2m2ISpNTbnIuqy1w== dependencies: - "@jest/types" "^29.6.3" + "@jest/types" "^29.6.1" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" + jest-message-util "^29.6.2" + jest-util "^29.6.2" slash "^3.0.0" -"@jest/core@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.7.0.tgz#b6cccc239f30ff36609658c5a5e2291757ce448f" - integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg== +"@jest/core@^29.6.2": + version "29.6.2" + resolved "https://registry.npmjs.org/@jest/core/-/core-29.6.2.tgz" + integrity sha512-Oj+5B+sDMiMWLhPFF+4/DvHOf+U10rgvCLGPHP8Xlsy/7QxS51aU/eBngudHlJXnaWD5EohAgJ4js+T6pa+zOg== dependencies: - "@jest/console" "^29.7.0" - "@jest/reporters" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" + "@jest/console" "^29.6.2" + "@jest/reporters" "^29.6.2" + "@jest/test-result" "^29.6.2" + "@jest/transform" "^29.6.2" + "@jest/types" "^29.6.1" "@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.7.0" - jest-config "^29.7.0" - jest-haste-map "^29.7.0" - jest-message-util "^29.7.0" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-resolve-dependencies "^29.7.0" - jest-runner "^29.7.0" - jest-runtime "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" - jest-watcher "^29.7.0" + jest-changed-files "^29.5.0" + jest-config "^29.6.2" + jest-haste-map "^29.6.2" + jest-message-util "^29.6.2" + jest-regex-util "^29.4.3" + jest-resolve "^29.6.2" + jest-resolve-dependencies "^29.6.2" + jest-runner "^29.6.2" + jest-runtime "^29.6.2" + jest-snapshot "^29.6.2" + jest-util "^29.6.2" + jest-validate "^29.6.2" + jest-watcher "^29.6.2" micromatch "^4.0.4" - pretty-format "^29.7.0" + pretty-format "^29.6.2" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.7.0.tgz#24d61f54ff1f786f3cd4073b4b94416383baf2a7" - integrity sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw== +"@jest/environment@^29.6.2": + version "29.6.2" + resolved "https://registry.npmjs.org/@jest/environment/-/environment-29.6.2.tgz" + integrity sha512-AEcW43C7huGd/vogTddNNTDRpO6vQ2zaQNrttvWV18ArBx9Z56h7BIsXkNFJVOO4/kblWEQz30ckw0+L3izc+Q== dependencies: - "@jest/fake-timers" "^29.7.0" - "@jest/types" "^29.6.3" + "@jest/fake-timers" "^29.6.2" + "@jest/types" "^29.6.1" "@types/node" "*" - jest-mock "^29.7.0" + jest-mock "^29.6.2" -"@jest/expect-utils@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6" - integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA== +"@jest/expect-utils@^29.6.2": + version "29.6.2" + resolved "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.6.2.tgz" + integrity sha512-6zIhM8go3RV2IG4aIZaZbxwpOzz3ZiM23oxAlkquOIole+G6TrbeXnykxWYlqF7kz2HlBjdKtca20x9atkEQYg== dependencies: - jest-get-type "^29.6.3" + jest-get-type "^29.4.3" -"@jest/expect@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.7.0.tgz#76a3edb0cb753b70dfbfe23283510d3d45432bf2" - integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ== +"@jest/expect@^29.6.2": + version "29.6.2" + resolved "https://registry.npmjs.org/@jest/expect/-/expect-29.6.2.tgz" + integrity sha512-m6DrEJxVKjkELTVAztTLyS/7C92Y2b0VYqmDROYKLLALHn8T/04yPs70NADUYPrV3ruI+H3J0iUIuhkjp7vkfg== dependencies: - expect "^29.7.0" - jest-snapshot "^29.7.0" + expect "^29.6.2" + jest-snapshot "^29.6.2" -"@jest/fake-timers@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565" - integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ== +"@jest/fake-timers@^29.6.2": + version "29.6.2" + resolved "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.6.2.tgz" + integrity sha512-euZDmIlWjm1Z0lJ1D0f7a0/y5Kh/koLFMUBE5SUYWrmy8oNhJpbTBDAP6CxKnadcMLDoDf4waRYCe35cH6G6PA== dependencies: - "@jest/types" "^29.6.3" + "@jest/types" "^29.6.1" "@sinonjs/fake-timers" "^10.0.2" "@types/node" "*" - jest-message-util "^29.7.0" - jest-mock "^29.7.0" - jest-util "^29.7.0" + jest-message-util "^29.6.2" + jest-mock "^29.6.2" + jest-util "^29.6.2" -"@jest/globals@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d" - integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ== +"@jest/globals@^29.6.2": + version "29.6.2" + resolved "https://registry.npmjs.org/@jest/globals/-/globals-29.6.2.tgz" + integrity sha512-cjuJmNDjs6aMijCmSa1g2TNG4Lby/AeU7/02VtpW+SLcZXzOLK2GpN2nLqcFjmhy3B3AoPeQVx7BnyOf681bAw== dependencies: - "@jest/environment" "^29.7.0" - "@jest/expect" "^29.7.0" - "@jest/types" "^29.6.3" - jest-mock "^29.7.0" + "@jest/environment" "^29.6.2" + "@jest/expect" "^29.6.2" + "@jest/types" "^29.6.1" + jest-mock "^29.6.2" -"@jest/reporters@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7" - integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg== +"@jest/reporters@^29.6.2": + version "29.6.2" + resolved "https://registry.npmjs.org/@jest/reporters/-/reporters-29.6.2.tgz" + integrity sha512-sWtijrvIav8LgfJZlrGCdN0nP2EWbakglJY49J1Y5QihcQLfy7ovyxxjJBRXMNltgt4uPtEcFmIMbVshEDfFWw== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" + "@jest/console" "^29.6.2" + "@jest/test-result" "^29.6.2" + "@jest/transform" "^29.6.2" + "@jest/types" "^29.6.1" "@jridgewell/trace-mapping" "^0.3.18" "@types/node" "*" chalk "^4.0.0" @@ -485,81 +485,81 @@ glob "^7.1.3" graceful-fs "^4.2.9" istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^6.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.7.0" - jest-util "^29.7.0" - jest-worker "^29.7.0" + jest-message-util "^29.6.2" + jest-util "^29.6.2" + jest-worker "^29.6.2" slash "^3.0.0" string-length "^4.0.1" strip-ansi "^6.0.0" v8-to-istanbul "^9.0.1" -"@jest/schemas@^29.6.3": - version "29.6.3" - resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" - integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== +"@jest/schemas@^29.6.0": + version "29.6.0" + resolved "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.0.tgz" + integrity sha512-rxLjXyJBTL4LQeJW3aKo0M/+GkCOXsO+8i9Iu7eDb6KwtP65ayoDsitrdPBtujxQ88k4wI2FNYfa6TOGwSn6cQ== dependencies: "@sinclair/typebox" "^0.27.8" -"@jest/source-map@^29.6.3": - version "29.6.3" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.6.3.tgz#d90ba772095cf37a34a5eb9413f1b562a08554c4" - integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw== +"@jest/source-map@^29.6.0": + version "29.6.0" + resolved "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.0.tgz" + integrity sha512-oA+I2SHHQGxDCZpbrsCQSoMLb3Bz547JnM+jUr9qEbuw0vQlWZfpPS7CO9J7XiwKicEz9OFn/IYoLkkiUD7bzA== dependencies: "@jridgewell/trace-mapping" "^0.3.18" callsites "^3.0.0" graceful-fs "^4.2.9" -"@jest/test-result@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.7.0.tgz#8db9a80aa1a097bb2262572686734baed9b1657c" - integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA== +"@jest/test-result@^29.6.2": + version "29.6.2" + resolved "https://registry.npmjs.org/@jest/test-result/-/test-result-29.6.2.tgz" + integrity sha512-3VKFXzcV42EYhMCsJQURptSqnyjqCGbtLuX5Xxb6Pm6gUf1wIRIl+mandIRGJyWKgNKYF9cnstti6Ls5ekduqw== dependencies: - "@jest/console" "^29.7.0" - "@jest/types" "^29.6.3" + "@jest/console" "^29.6.2" + "@jest/types" "^29.6.1" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz#6cef977ce1d39834a3aea887a1726628a6f072ce" - integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw== +"@jest/test-sequencer@^29.6.2": + version "29.6.2" + resolved "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.6.2.tgz" + integrity sha512-GVYi6PfPwVejO7slw6IDO0qKVum5jtrJ3KoLGbgBWyr2qr4GaxFV6su+ZAjdTX75Sr1DkMFRk09r2ZVa+wtCGw== dependencies: - "@jest/test-result" "^29.7.0" + "@jest/test-result" "^29.6.2" graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" + jest-haste-map "^29.6.2" slash "^3.0.0" -"@jest/transform@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.7.0.tgz#df2dd9c346c7d7768b8a06639994640c642e284c" - integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== +"@jest/transform@^29.6.2": + version "29.6.2" + resolved "https://registry.npmjs.org/@jest/transform/-/transform-29.6.2.tgz" + integrity sha512-ZqCqEISr58Ce3U+buNFJYUktLJZOggfyvR+bZMaiV1e8B1SIvJbwZMrYz3gx/KAPn9EXmOmN+uB08yLCjWkQQg== dependencies: "@babel/core" "^7.11.6" - "@jest/types" "^29.6.3" + "@jest/types" "^29.6.1" "@jridgewell/trace-mapping" "^0.3.18" 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.7.0" - jest-regex-util "^29.6.3" - jest-util "^29.7.0" + jest-haste-map "^29.6.2" + jest-regex-util "^29.4.3" + jest-util "^29.6.2" micromatch "^4.0.4" pirates "^4.0.4" slash "^3.0.0" write-file-atomic "^4.0.2" -"@jest/types@^29.6.3": - version "29.6.3" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" - integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== +"@jest/types@^29.6.1": + version "29.6.1" + resolved "https://registry.npmjs.org/@jest/types/-/types-29.6.1.tgz" + integrity sha512-tPKQNMPuXgvdOn2/Lg9HNfUvjYVGolt04Hp03f5hAk878uwOLikN+JzeLY0HcVgKgFl9Hs3EIqpu3WX27XNhnw== dependencies: - "@jest/schemas" "^29.6.3" + "@jest/schemas" "^29.6.0" "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" "@types/node" "*" @@ -568,7 +568,7 @@ "@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": version "0.3.3" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" + resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz" integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== dependencies: "@jridgewell/set-array" "^1.0.1" @@ -577,17 +577,17 @@ "@jridgewell/resolve-uri@^3.1.0": version "3.1.1" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" + resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz" integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== "@jridgewell/set-array@^1.0.1": version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== "@jridgewell/source-map@^0.3.3": version "0.3.5" - resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.5.tgz#a3bb4d5c6825aab0d281268f47f6ad5853431e91" + resolved "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz" integrity sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ== dependencies: "@jridgewell/gen-mapping" "^0.3.0" @@ -595,20 +595,27 @@ "@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": version "1.4.15" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.20" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz#72e45707cf240fa6b081d0366f8265b0cd10197f" - integrity sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q== + version "0.3.19" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz" + integrity sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw== dependencies: "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@napi-rs/cli@^1.0.0": + version "1.3.5" + resolved "https://registry.npmjs.org/@napi-rs/cli/-/cli-1.3.5.tgz" + integrity sha512-Z0KZIciemioYODTyO908v2AtL8Zg4sohQDD+dyHeHmOiOfaez/y/xQ8XnpOHc2W5fRidKUW+MVWyTtpLTbKsqw== + dependencies: + inquirer "^8.1.3" + "@nodelib/fs.scandir@2.1.5": version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== dependencies: "@nodelib/fs.stat" "2.0.5" @@ -616,12 +623,12 @@ "@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== "@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": version "1.2.8" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== dependencies: "@nodelib/fs.scandir" "2.1.5" @@ -629,27 +636,27 @@ "@sinclair/typebox@^0.27.8": version "0.27.8" - resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" + resolved "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz" integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== "@sinonjs/commons@^3.0.0": version "3.0.0" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.0.tgz#beb434fe875d965265e04722ccfc21df7f755d72" + resolved "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz" integrity sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA== dependencies: type-detect "4.0.8" "@sinonjs/fake-timers@^10.0.2": version "10.3.0" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz#55fdff1ecab9f354019129daf4df0dd4d923ea66" + resolved "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz" integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== dependencies: "@sinonjs/commons" "^3.0.0" "@types/babel__core@^7.1.14": - version "7.20.3" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.3.tgz#d5625a50b6f18244425a1359a858c73d70340778" - integrity sha512-54fjTSeSHwfan8AyHWrKbfBWiEUrNTZsUwPTDSNaaP1QDQIZbeNUg3a59E9D+375MzUw/x1vx2/0F5LBz+AeYA== + version "7.20.1" + resolved "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz" + integrity sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw== dependencies: "@babel/parser" "^7.20.7" "@babel/types" "^7.20.7" @@ -658,126 +665,117 @@ "@types/babel__traverse" "*" "@types/babel__generator@*": - version "7.6.6" - resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.6.tgz#676f89f67dc8ddaae923f70ebc5f1fa800c031a8" - integrity sha512-66BXMKb/sUWbMdBNdMvajU7i/44RkrA3z/Yt1c7R5xejt8qh84iU54yUWCtm0QwGJlDcf/gg4zd/x4mpLAlb/w== + 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== dependencies: "@babel/types" "^7.0.0" "@types/babel__template@*": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.3.tgz#db9ac539a2fe05cfe9e168b24f360701bde41f5f" - integrity sha512-ciwyCLeuRfxboZ4isgdNZi/tkt06m8Tw6uGbBSBgWrnnZGNXiEyM27xc/PjXGQLqlZ6ylbgHMnm7ccF9tCkOeQ== + version "7.4.1" + resolved "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz" + integrity sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g== dependencies: "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" "@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.20.3" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.3.tgz#a971aa47441b28ef17884ff945d0551265a2d058" - integrity sha512-Lsh766rGEFbaxMIDH7Qa+Yha8cMVI3qAK6CHt3OR0YfxOIn5Z54iHiyDRycHrBqeIiqGa20Kpsv1cavfBKkRSw== + version "7.20.1" + resolved "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.1.tgz" + integrity sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg== dependencies: "@babel/types" "^7.20.7" "@types/eslint-scope@^3.7.3": - version "3.7.6" - resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.6.tgz#585578b368ed170e67de8aae7b93f54a1b2fdc26" - integrity sha512-zfM4ipmxVKWdxtDaJ3MP3pBurDXOCoyjvlpE3u6Qzrmw4BPbfm4/ambIeTk/r/J0iq/+2/xp0Fmt+gFvXJY2PQ== + version "3.7.5" + resolved "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.5.tgz" + integrity sha512-JNvhIEyxVW6EoMIFIvj93ZOywYFatlpu9deeH6eSx6PE3WHYvHaQtmHmQeNw7aA81bYGBPPQqdtBm6b1SsQMmA== dependencies: "@types/eslint" "*" "@types/estree" "*" "@types/eslint@*": - version "8.44.6" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.44.6.tgz#60e564551966dd255f4c01c459f0b4fb87068603" - integrity sha512-P6bY56TVmX8y9J87jHNgQh43h6VVU+6H7oN7hgvivV81K2XY8qJZ5vqPy/HdUoVIelii2kChYVzQanlswPWVFw== + version "8.44.3" + resolved "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.3.tgz" + integrity sha512-iM/WfkwAhwmPff3wZuPLYiHX18HI24jU8k1ZSH7P8FHwxTjZ2P6CoX2wnF43oprR+YXJM6UUxATkNvyv/JHd+g== dependencies: "@types/estree" "*" "@types/json-schema" "*" "@types/estree@*", "@types/estree@^1.0.0": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.3.tgz#2be19e759a3dd18c79f9f436bd7363556c1a73dd" - integrity sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ== + version "1.0.2" + resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.2.tgz" + integrity sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA== "@types/graceful-fs@^4.1.3": - version "4.1.8" - resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.8.tgz#417e461e4dc79d957dc3107f45fe4973b09c2915" - integrity sha512-NhRH7YzWq8WiNKVavKPBmtLYZHxNY19Hh+az28O/phfp68CF45pMFud+ZzJ8ewnxnC5smIdF3dqFeiSUQ5I+pw== + version "4.1.6" + resolved "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz" + integrity sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw== dependencies: "@types/node" "*" "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz#fdfdd69fa16d530047d9963635bd77c71a08c068" - integrity sha512-zONci81DZYCZjiLe0r6equvZut0b+dBRPBN5kBDjsONnutYNtJMoWQ9uR2RkL1gLG9NMTzvf+29e5RFfPbeKhQ== + 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== "@types/istanbul-lib-report@*": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.2.tgz#394798d5f727402eb5ec99eb9618ffcd2b7645a1" - integrity sha512-8toY6FgdltSdONav1XtUHl4LN1yTmLza+EuDazb/fEmRNCwjyqNVIQWs2IfC74IqjHkREs/nQ2FWq5kZU9IC0w== + 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== dependencies: "@types/istanbul-lib-coverage" "*" "@types/istanbul-reports@^3.0.0": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.3.tgz#0313e2608e6d6955d195f55361ddeebd4b74c6e7" - integrity sha512-1nESsePMBlf0RPRffLZi5ujYh7IH1BWL4y9pr+Bn3cJBdxz+RTP8bUFljLz9HvzhhOSWKdyBZ4DIivdL6rvgZg== + version "3.0.1" + resolved "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz" + integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw== dependencies: "@types/istanbul-lib-report" "*" "@types/jest@^29.4.0": - version "29.5.6" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.6.tgz#f4cf7ef1b5b0bfc1aa744e41b24d9cc52533130b" - integrity sha512-/t9NnzkOpXb4Nfvg17ieHE6EeSjDS2SGSpNYfoLbUAeL/EOueU/RSdOWFpfQTXBEM7BguYW1XQ0EbM+6RlIh6w== + version "29.5.3" + resolved "https://registry.npmjs.org/@types/jest/-/jest-29.5.3.tgz" + integrity sha512-1Nq7YrO/vJE/FYnqYyw0FS8LdrjExSgIiHyKg7xPpn+yi8Q4huZryKnkJatN1ZRH89Kw2v33/8ZMB7DuZeSLlA== dependencies: expect "^29.0.0" pretty-format "^29.0.0" "@types/json-schema@*", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": - version "7.0.14" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.14.tgz#74a97a5573980802f32c8e47b663530ab3b6b7d1" - integrity sha512-U3PUjAudAdJBeC2pgN8uTIKgxrb4nlDF3SF0++EldXQvQBGkpFZMSnwQiIoDU77tv45VgNkl/L4ouD+rEomujw== + version "7.0.12" + resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz" + integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA== -"@types/node@*": - version "20.8.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.9.tgz#646390b4fab269abce59c308fc286dcd818a2b08" - integrity sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg== - dependencies: - undici-types "~5.26.4" - -"@types/node@^18.15.12": - version "18.18.7" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.18.7.tgz#bb3a7068dc4ba421b6968f2a259298b3a4e129e8" - integrity sha512-bw+lEsxis6eqJYW8Ql6+yTqkE6RuFtsQPSe5JxXbqYRFQEER5aJA9a5UH9igqDWm3X4iLHIKOHlnAXLM4mi7uQ== - dependencies: - undici-types "~5.26.4" +"@types/node@*", "@types/node@^18.15.12": + version "18.17.5" + resolved "https://registry.npmjs.org/@types/node/-/node-18.17.5.tgz" + integrity sha512-xNbS75FxH6P4UXTPUJp/zNPq6/xsfdJKussCWNOnz4aULWIRwMgP1LgaB5RiBnMX1DPCYenuqGZfnIAx5mbFLA== "@types/semver@^7.3.12": - version "7.5.4" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.4.tgz#0a41252ad431c473158b22f9bfb9a63df7541cff" - integrity sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ== + version "7.5.0" + resolved "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz" + integrity sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw== "@types/stack-utils@^2.0.0": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.2.tgz#01284dde9ef4e6d8cef6422798d9a3ad18a66f8b" - integrity sha512-g7CK9nHdwjK2n0ymT2CW698FuWJRIx+RP6embAzZ2Qi8/ilIrA1Imt2LVSeHUzKvpoi7BhmmQcXz95eS0f2JXw== + version "2.0.1" + resolved "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz" + integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== "@types/yargs-parser@*": - version "21.0.2" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.2.tgz#7bd04c5da378496ef1695a1008bf8f71847a8b8b" - integrity sha512-5qcvofLPbfjmBfKaLfj/+f+Sbd6pN4zl7w7VSVI5uz7m9QZTuB2aZAa2uo1wHFBNN2x6g/SoTkXmd8mQnQF2Cw== + version "21.0.0" + resolved "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz" + integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== "@types/yargs@^17.0.8": - version "17.0.29" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.29.tgz#06aabc72497b798c643c812a8b561537fea760cf" - integrity sha512-nacjqA3ee9zRF/++a3FUY1suHTFKZeHba2n8WeDw9cCVdmzmHpIxyzOJBcpHvvEmS8E9KqWlSnWHUkOrkhWcvA== + version "17.0.24" + resolved "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.24.tgz" + integrity sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw== dependencies: "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^5.30.7": version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db" + resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz" integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag== dependencies: "@eslint-community/regexpp" "^4.4.0" @@ -793,7 +791,7 @@ "@typescript-eslint/parser@^5.30.7": version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7" + resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz" integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA== dependencies: "@typescript-eslint/scope-manager" "5.62.0" @@ -803,7 +801,7 @@ "@typescript-eslint/scope-manager@5.62.0": version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c" + resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz" integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w== dependencies: "@typescript-eslint/types" "5.62.0" @@ -811,7 +809,7 @@ "@typescript-eslint/type-utils@5.62.0": version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz#286f0389c41681376cdad96b309cedd17d70346a" + resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz" integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew== dependencies: "@typescript-eslint/typescript-estree" "5.62.0" @@ -821,12 +819,12 @@ "@typescript-eslint/types@5.62.0": version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" + resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz" integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== "@typescript-eslint/typescript-estree@5.62.0": version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" + resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz" integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== dependencies: "@typescript-eslint/types" "5.62.0" @@ -839,7 +837,7 @@ "@typescript-eslint/utils@5.62.0": version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" + resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz" integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== dependencies: "@eslint-community/eslint-utils" "^4.2.0" @@ -853,20 +851,15 @@ "@typescript-eslint/visitor-keys@5.62.0": version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" + resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz" integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw== dependencies: "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" -"@ungap/structured-clone@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" - integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== - "@webassemblyjs/ast@1.11.6", "@webassemblyjs/ast@^1.11.5": version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.6.tgz#db046555d3c413f8966ca50a95176a0e2c642e24" + resolved "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz" integrity sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q== dependencies: "@webassemblyjs/helper-numbers" "1.11.6" @@ -874,22 +867,22 @@ "@webassemblyjs/floating-point-hex-parser@1.11.6": version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz#dacbcb95aff135c8260f77fa3b4c5fea600a6431" + resolved "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz" integrity sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw== "@webassemblyjs/helper-api-error@1.11.6": version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz#6132f68c4acd59dcd141c44b18cbebbd9f2fa768" + resolved "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz" integrity sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q== "@webassemblyjs/helper-buffer@1.11.6": version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz#b66d73c43e296fd5e88006f18524feb0f2c7c093" + resolved "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz" integrity sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA== "@webassemblyjs/helper-numbers@1.11.6": version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz#cbce5e7e0c1bd32cf4905ae444ef64cea919f1b5" + resolved "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz" integrity sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g== dependencies: "@webassemblyjs/floating-point-hex-parser" "1.11.6" @@ -898,12 +891,12 @@ "@webassemblyjs/helper-wasm-bytecode@1.11.6": version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz#bb2ebdb3b83aa26d9baad4c46d4315283acd51e9" + resolved "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz" integrity sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA== "@webassemblyjs/helper-wasm-section@1.11.6": version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz#ff97f3863c55ee7f580fd5c41a381e9def4aa577" + resolved "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz" integrity sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g== dependencies: "@webassemblyjs/ast" "1.11.6" @@ -913,26 +906,26 @@ "@webassemblyjs/ieee754@1.11.6": version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz#bb665c91d0b14fffceb0e38298c329af043c6e3a" + resolved "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz" integrity sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg== dependencies: "@xtuc/ieee754" "^1.2.0" "@webassemblyjs/leb128@1.11.6": version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.6.tgz#70e60e5e82f9ac81118bc25381a0b283893240d7" + resolved "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz" integrity sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ== dependencies: "@xtuc/long" "4.2.2" "@webassemblyjs/utf8@1.11.6": version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.6.tgz#90f8bc34c561595fe156603be7253cdbcd0fab5a" + resolved "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz" integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA== "@webassemblyjs/wasm-edit@^1.11.5": version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz#c72fa8220524c9b416249f3d94c2958dfe70ceab" + resolved "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz" integrity sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw== dependencies: "@webassemblyjs/ast" "1.11.6" @@ -946,7 +939,7 @@ "@webassemblyjs/wasm-gen@1.11.6": version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz#fb5283e0e8b4551cc4e9c3c0d7184a65faf7c268" + resolved "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz" integrity sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA== dependencies: "@webassemblyjs/ast" "1.11.6" @@ -957,7 +950,7 @@ "@webassemblyjs/wasm-opt@1.11.6": version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz#d9a22d651248422ca498b09aa3232a81041487c2" + resolved "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz" integrity sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g== dependencies: "@webassemblyjs/ast" "1.11.6" @@ -967,7 +960,7 @@ "@webassemblyjs/wasm-parser@1.11.6", "@webassemblyjs/wasm-parser@^1.11.5": version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz#bb85378c527df824004812bbdb784eea539174a1" + resolved "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz" integrity sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ== dependencies: "@webassemblyjs/ast" "1.11.6" @@ -979,7 +972,7 @@ "@webassemblyjs/wast-printer@1.11.6": version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz#a7bf8dd7e362aeb1668ff43f35cb849f188eff20" + resolved "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz" integrity sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A== dependencies: "@webassemblyjs/ast" "1.11.6" @@ -987,62 +980,62 @@ "@webpack-cli/configtest@^2.1.1": version "2.1.1" - resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-2.1.1.tgz#3b2f852e91dac6e3b85fb2a314fb8bef46d94646" + resolved "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz" integrity sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw== "@webpack-cli/info@^2.0.2": version "2.0.2" - resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-2.0.2.tgz#cc3fbf22efeb88ff62310cf885c5b09f44ae0fdd" + resolved "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz" integrity sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A== "@webpack-cli/serve@^2.0.5": version "2.0.5" - resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e" + resolved "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz" integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ== "@xtuc/ieee754@^1.2.0": version "1.2.0" - resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + resolved "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz" integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== "@xtuc/long@4.2.2": version "4.2.2" - resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" + resolved "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== abbrev@1: version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + resolved "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== acorn-import-assertions@^1.9.0: version "1.9.0" - resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" + resolved "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz" integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== acorn-jsx@^5.3.2: version "5.3.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn@^8.7.1, acorn@^8.8.2, acorn@^8.9.0: version "8.10.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz" integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== after@~0.8.1: version "0.8.2" - resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" + resolved "https://registry.npmjs.org/after/-/after-0.8.2.tgz" integrity sha512-QbJ0NTQ/I9DI3uSJA4cbexiwQeRAfjPScqIbSjUDd9TOrcg6pTkdgziesOqxBMBzit8vFCTwrP27t13vFOORRA== ajv-keywords@^3.5.2: version "3.5.2" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" + resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== dependencies: fast-deep-equal "^3.1.1" @@ -1052,58 +1045,58 @@ ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: amdefine@>=0.0.4: version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + resolved "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz" integrity sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg== ansi-escapes@^4.2.1: version "4.3.2" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== dependencies: type-fest "^0.21.3" ansi-regex@^2.0.0: version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" integrity sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA== ansi-regex@^5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-sequence-parser@^1.1.0: version "1.1.1" - resolved "https://registry.yarnpkg.com/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz#e0aa1cdcbc8f8bb0b5bca625aac41f5f056973cf" + resolved "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz" integrity sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg== ansi-styles@^3.2.1: version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== dependencies: color-convert "^1.9.0" ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: color-convert "^2.0.1" ansi-styles@^5.0.0: version "5.2.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== ansi@^0.3.0, ansi@~0.3.0, ansi@~0.3.1: version "0.3.1" - resolved "https://registry.yarnpkg.com/ansi/-/ansi-0.3.1.tgz#0c42d4fb17160d5a9af1e484bace1c66922c1b21" + resolved "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz" integrity sha512-iFY7JCgHbepc0b82yLaw4IMortylNb6wG4kL+4R0C3iv6i+RHGHux/yUX5BTiRvSX/shMnngjR1YyNMnXEFh5A== anymatch@^3.0.3: version "3.1.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz" integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== dependencies: normalize-path "^3.0.0" @@ -1111,12 +1104,12 @@ anymatch@^3.0.3: aproba@^1.0.3: version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + resolved "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz" integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== are-we-there-yet@~1.0.0: version "1.0.6" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.0.6.tgz#a2d28c93102aa6cc96245a26cb954de06ec53f0c" + resolved "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.0.6.tgz" integrity sha512-Zfw6bteqM9gQXZ1BIWOgM8xEwMrUGoyL8nW13+O+OOgNX3YhuDN1GDgg1NzdTlmm3j+9sHy7uBZ12r+z9lXnZQ== dependencies: delegates "^1.0.0" @@ -1124,7 +1117,7 @@ are-we-there-yet@~1.0.0: are-we-there-yet@~1.1.2: version "1.1.7" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz#b15474a932adab4ff8a50d9adfa7e4e926f21146" + resolved "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz" integrity sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g== dependencies: delegates "^1.0.0" @@ -1132,19 +1125,19 @@ are-we-there-yet@~1.1.2: argparse@^1.0.7: version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== dependencies: sprintf-js "~1.0.2" argparse@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== array-index@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/array-index/-/array-index-1.0.0.tgz#ec56a749ee103e4e08c790b9c353df16055b97f9" + resolved "https://registry.npmjs.org/array-index/-/array-index-1.0.0.tgz" integrity sha512-jesyNbBkLQgGZMSwA1FanaFjalb1mZUGxGeUEkSDidzgrbjBGhvizJkaItdhkt8eIHFOJC7nDsrXk+BaehTdRw== dependencies: debug "^2.2.0" @@ -1152,52 +1145,52 @@ array-index@^1.0.0: array-union@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== asn1@~0.2.3: version "0.2.6" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" + resolved "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz" integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== dependencies: safer-buffer "~2.1.0" assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + resolved "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== asynckit@^0.4.0: version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== aws-sign2@~0.7.0: version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + resolved "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz" integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== aws4@^1.8.0: version "1.12.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3" + resolved "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz" integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== -babel-jest@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" - integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== +babel-jest@^29.6.2: + version "29.6.2" + resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-29.6.2.tgz" + integrity sha512-BYCzImLos6J3BH/+HvUCHG1dTf2MzmAB4jaVxHV+29RZLjR29XuYTmsf2sdDwkrb+FczkGo3kOhE7ga6sI0P4A== dependencies: - "@jest/transform" "^29.7.0" + "@jest/transform" "^29.6.2" "@types/babel__core" "^7.1.14" babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^29.6.3" + babel-preset-jest "^29.5.0" chalk "^4.0.0" graceful-fs "^4.2.9" slash "^3.0.0" babel-plugin-istanbul@^6.1.1: version "6.1.1" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" + resolved "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz" integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" @@ -1206,10 +1199,10 @@ babel-plugin-istanbul@^6.1.1: istanbul-lib-instrument "^5.0.4" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz#aadbe943464182a8922c3c927c3067ff40d24626" - integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg== +babel-plugin-jest-hoist@^29.5.0: + version "29.5.0" + resolved "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.5.0.tgz" + integrity sha512-zSuuuAlTMT4mzLj2nPnUm6fsE6270vdOfnpbJ+RmruU75UhLFvL0N2NgI7xpeS7NaB6hGqmd5pVpGTDYvi4Q3w== dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" @@ -1218,7 +1211,7 @@ babel-plugin-jest-hoist@^29.6.3: babel-preset-current-node-syntax@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" + 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== dependencies: "@babel/plugin-syntax-async-generators" "^7.8.4" @@ -1234,47 +1227,47 @@ babel-preset-current-node-syntax@^1.0.0: "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-top-level-await" "^7.8.3" -babel-preset-jest@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz#fa05fa510e7d493896d7b0dd2033601c840f171c" - integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA== +babel-preset-jest@^29.5.0: + version "29.5.0" + resolved "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.5.0.tgz" + integrity sha512-JOMloxOqdiBSxMAzjRaH023/vvcaSaec49zvg+2LmNsktC7ei39LTJGw02J+9uUtTZUq6xbLyJ4dxe9sSmIuAg== dependencies: - babel-plugin-jest-hoist "^29.6.3" + babel-plugin-jest-hoist "^29.5.0" babel-preset-current-node-syntax "^1.0.0" balanced-match@^1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== base64-js@^1.3.1: version "1.5.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== bcrypt-pbkdf@^1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + resolved "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz" integrity sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w== dependencies: tweetnacl "^0.14.3" big-integer@^1.6.17: version "1.6.51" - resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686" + resolved "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz" integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg== binary@~0.3.0: version "0.3.0" - resolved "https://registry.yarnpkg.com/binary/-/binary-0.3.0.tgz#9f60553bc5ce8c3386f3b553cff47462adecaa79" + resolved "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz" integrity sha512-D4H1y5KYwpJgK8wk1Cue5LLPgmwHKYSChkbspQg5JtVuR5ulGckxfR62H3AE9UDkdMC8yyXlqYihuz3Aqg2XZg== dependencies: buffers "~0.1.1" chainsaw "~0.1.0" -bl@^4.0.3: +bl@^4.0.3, bl@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" + resolved "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz" integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== dependencies: buffer "^5.5.0" @@ -1283,24 +1276,24 @@ bl@^4.0.3: bl@~3.0.0: version "3.0.1" - resolved "https://registry.yarnpkg.com/bl/-/bl-3.0.1.tgz#1cbb439299609e419b5a74d7fce2f8b37d8e5c6f" + resolved "https://registry.npmjs.org/bl/-/bl-3.0.1.tgz" integrity sha512-jrCW5ZhfQ/Vt07WX1Ngs+yn9BDqPL/gw28S7s9H6QK/gupnizNzJAss5akW20ISgOrbLTlXOOCTJeNUQqruAWQ== dependencies: readable-stream "^3.0.1" bluebird@^3: version "3.7.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== bluebird@~3.4.1: version "3.4.7" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.7.tgz#f72d760be09b7f76d08ed8fae98b289a8d05fab3" + resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz" integrity sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA== brace-expansion@^1.1.7: version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== dependencies: balanced-match "^1.0.0" @@ -1308,65 +1301,65 @@ brace-expansion@^1.1.7: brace-expansion@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz" integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== dependencies: balanced-match "^1.0.0" braces@^3.0.2: version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== dependencies: fill-range "^7.0.1" browserslist@^4.14.5, browserslist@^4.21.9: - version "4.22.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.1.tgz#ba91958d1a59b87dab6fed8dfbcb3da5e2e9c619" - integrity sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ== + version "4.21.10" + resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz" + integrity sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ== dependencies: - caniuse-lite "^1.0.30001541" - electron-to-chromium "^1.4.535" + caniuse-lite "^1.0.30001517" + electron-to-chromium "^1.4.477" node-releases "^2.0.13" - update-browserslist-db "^1.0.13" + update-browserslist-db "^1.0.11" bs-logger@0.x: version "0.2.6" - resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" + resolved "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz" integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== dependencies: fast-json-stable-stringify "2.x" bser@2.1.1: version "2.1.1" - resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" + resolved "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz" integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== dependencies: node-int64 "^0.4.0" buffer-from@^0.1.1: version "0.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-0.1.2.tgz#15f4b9bcef012044df31142c14333caf6e0260d0" + resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-0.1.2.tgz" integrity sha512-RiWIenusJsmI2KcvqQABB83tLxCByE3upSP8QU3rJDMVFGPWLvPQJt/O1Su9moRWeH7d+Q2HYb68f6+v+tw2vg== buffer-from@^1.0.0: version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== buffer-indexof-polyfill@~1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz#d2732135c5999c64b277fcf9b1abe3498254729c" + resolved "https://registry.npmjs.org/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz" integrity sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A== buffer-shims@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" + resolved "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz" integrity sha512-Zy8ZXMyxIT6RMTeY7OP/bDndfj6bwCan7SS98CEndS6deHwWPpseeHlwarNcBim+etXnF9HBc1non5JgDaJU1g== buffer@^5.5.0: version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + resolved "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz" integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== dependencies: base64-js "^1.3.1" @@ -1374,63 +1367,58 @@ buffer@^5.5.0: buffers@~0.1.1: version "0.1.1" - resolved "https://registry.yarnpkg.com/buffers/-/buffers-0.1.1.tgz#b24579c3bed4d6d396aeee6d9a8ae7f5482ab7bb" + resolved "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz" integrity sha512-9q/rDEGSb/Qsvv2qvzIzdluL5k7AaJOTrw23z9reQthrbF7is4CtlT0DXyO1oei2DCp4uojjzQ7igaSHp1kAEQ== callsites@^3.0.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== camelcase@^2.0.1: version "2.1.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz" integrity sha512-DLIsRzJVBQu72meAKPkWQOLcujdXT32hwdfnkI1frSiSRMK1MofjKHf+MEx0SB6fjEFXL8fBDv1dKymBlOp4Qw== camelcase@^5.3.1: version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== camelcase@^6.2.0: version "6.3.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001541: - version "1.0.30001554" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001554.tgz#ba80d88dff9acbc0cd4b7535fc30e0191c5e2e2a" - integrity sha512-A2E3U//MBwbJVzebddm1YfNp7Nud5Ip+IPn4BozBmn4KqVX7AvluoIDFWjsv5OkGnKUXQVmMSoMKLa3ScCblcQ== - -cargo-cp-artifact@^0.1.6: - version "0.1.8" - resolved "https://registry.yarnpkg.com/cargo-cp-artifact/-/cargo-cp-artifact-0.1.8.tgz#353814f49f6aa76601a4bcb3ea5f3071180b90de" - integrity sha512-3j4DaoTrsCD1MRkTF2Soacii0Nx7UHCce0EwUf4fHnggwiE4fbmF2AbnfzayR36DF8KGadfh7M/Yfy625kgPlA== +caniuse-lite@^1.0.30001517: + version "1.0.30001521" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001521.tgz" + integrity sha512-fnx1grfpEOvDGH+V17eccmNjucGUnCbP6KL+l5KqBIerp26WK/+RQ7CIDE37KGJjaPyqWXXlFUyKiWmvdNNKmQ== caseless@~0.12.0: version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + resolved "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz" integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== chainsaw@~0.1.0: version "0.1.0" - resolved "https://registry.yarnpkg.com/chainsaw/-/chainsaw-0.1.0.tgz#5eab50b28afe58074d0d58291388828b5e5fbc98" + resolved "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz" integrity sha512-75kWfWt6MEKNC8xYXIdRpDehRYY/tNSgwKaJq+dbbDcxORuVrrQ+SEHoWsniVn9XPYfP4gmdWIeDk/4YNp1rNQ== dependencies: traverse ">=0.3.0 <0.4" chalk@^2.4.2: version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== dependencies: ansi-styles "^3.2.1" escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0: +chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1: version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== dependencies: ansi-styles "^4.1.0" @@ -1438,37 +1426,59 @@ chalk@^4.0.0: char-regex@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" + resolved "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz" integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + chownr@^1.1.1, chownr@^1.1.4: version "1.1.4" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + resolved "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== chrome-trace-event@^1.0.2: version "1.0.3" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" + resolved "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz" integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== ci-info@^3.2.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" - integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== + version "3.8.0" + resolved "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz" + integrity sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw== cjs-module-lexer@^1.0.0: version "1.2.3" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz#6c370ab19f8a3394e318fe682686ec0ac684d107" + resolved "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz" integrity sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ== class-transformer@^0.5.1: version "0.5.1" - resolved "https://registry.yarnpkg.com/class-transformer/-/class-transformer-0.5.1.tgz#24147d5dffd2a6cea930a3250a677addf96ab336" + resolved "https://registry.npmjs.org/class-transformer/-/class-transformer-0.5.1.tgz" integrity sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw== +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + +cli-spinners@^2.5.0: + version "2.9.1" + resolved "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.1.tgz" + integrity sha512-jHgecW0pxkonBJdrKsqxgRX9AcG+u/5k0Q7WPDfi8AogLAdwxEkyYYNWwZ5GvVFoFx2uiY1eNcSK00fh+1+FyQ== + +cli-width@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz" + integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== + cliui@^3.0.3: version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + resolved "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz" integrity sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w== dependencies: string-width "^1.0.1" @@ -1477,7 +1487,7 @@ cliui@^3.0.3: cliui@^8.0.1: version "8.0.1" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + resolved "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz" integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== dependencies: string-width "^4.2.0" @@ -1486,16 +1496,21 @@ cliui@^8.0.1: clone-deep@^4.0.1: version "4.0.1" - resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" + resolved "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz" integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== dependencies: is-plain-object "^2.0.4" kind-of "^6.0.2" shallow-clone "^3.0.0" +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz" + integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== + cmake-js@~5.2.0: version "5.2.0" - resolved "https://registry.yarnpkg.com/cmake-js/-/cmake-js-5.2.0.tgz#6d72014269a5d23a754a6d170cde9ed2d75eb411" + resolved "https://registry.npmjs.org/cmake-js/-/cmake-js-5.2.0.tgz" integrity sha512-/HLhzoBEOLKGdE1FLwH5ggzRt67AWTb4IErg4rm+bTC+R0DKUobojDyp17dSswDVPosdoPmHXjKxbJiyBZfQeg== dependencies: bluebird "^3" @@ -1518,113 +1533,100 @@ cmake-js@~5.2.0: co@^4.6.0: version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz" integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== code-point-at@^1.0.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + resolved "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz" integrity sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA== collect-v8-coverage@^1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9" + resolved "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz" integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q== color-convert@^1.9.0: version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== dependencies: color-name "1.1.3" color-convert@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== dependencies: color-name "~1.1.4" color-name@1.1.3: version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== color-name@~1.1.4: version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== colorette@^2.0.14: version "2.0.20" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" + resolved "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz" integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== dependencies: delayed-stream "~1.0.0" commander@2.9.x: version "2.9.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" + resolved "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz" integrity sha512-bmkUukX8wAOjHdN26xj5c4ctEV22TQ7dQYhSmuckKhToXrkUn0iIaolHdIxYYqD55nhpSPA9zPQ1yP57GdXP2A== dependencies: graceful-readlink ">= 1.0.0" commander@^10.0.1: version "10.0.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" + resolved "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz" integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== commander@^2.20.0, commander@^2.9.0: version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== concat-map@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + resolved "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz" integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== +convert-source-map@^1.6.0, convert-source-map@^1.7.0: + 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== + convert-source-map@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" + resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== -core-util-is@1.0.2: +core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== -core-util-is@~1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" - integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== - -create-jest@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" - integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q== - dependencies: - "@jest/types" "^29.6.3" - chalk "^4.0.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - jest-config "^29.7.0" - jest-util "^29.7.0" - prompts "^2.0.1" - cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== dependencies: path-key "^3.1.0" @@ -1633,7 +1635,7 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3: d@1, d@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + resolved "https://registry.npmjs.org/d/-/d-1.0.1.tgz" integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== dependencies: es5-ext "^0.10.50" @@ -1641,28 +1643,28 @@ d@1, d@^1.0.1: dashdash@^1.12.0: version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + resolved "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz" integrity sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g== dependencies: assert-plus "^1.0.0" debug@^2.2.0: version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" debug@^4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" decamelize@^1.1.1: version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== decompress-response@^3.3.0: @@ -1674,90 +1676,97 @@ decompress-response@^3.3.0: dedent@^1.0.0: version "1.5.1" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.1.tgz#4f3fc94c8b711e9bb2800d185cd6ad20f2a90aff" + resolved "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz" integrity sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg== deep-extend@^0.6.0: version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + resolved "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz" integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== deep-is@^0.1.3: version "0.1.4" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== deepmerge@^4.2.2: version "4.3.1" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" + resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz" integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== +defaults@^1.0.3: + version "1.0.4" + resolved "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz" + integrity sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A== + dependencies: + clone "^1.0.2" + delayed-stream@~1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== delegates@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + resolved "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz" integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== detect-libc@^2.0.0: version "2.0.2" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.2.tgz#8ccf2ba9315350e1241b88d0ac3b0e1fbd99605d" + resolved "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz" integrity sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw== detect-newline@^3.0.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" + resolved "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== -diff-sequences@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" - integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== +diff-sequences@^29.4.3: + version "29.4.3" + resolved "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.4.3.tgz" + integrity sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA== dir-glob@^3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== dependencies: path-type "^4.0.0" doctrine@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz" integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== dependencies: esutils "^2.0.2" dotenv@^16.0.3: version "16.3.1" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e" + resolved "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz" integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ== duplexer2@~0.0.2: version "0.0.2" - resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" + resolved "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz" integrity sha512-+AWBwjGadtksxjOQSFDhPNQbed7icNXApT4+2BNpsXzcCBiInq2H9XW0O8sfHFaPmnQRs7cg/P0fAr2IWQSW0g== dependencies: readable-stream "~1.1.9" duplexer2@~0.1.4: version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" + resolved "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz" integrity sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA== dependencies: readable-stream "^2.0.2" each-series-async@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/each-series-async/-/each-series-async-1.0.1.tgz#7e3f8dfa5af934663960e5a17561362909b34328" + resolved "https://registry.npmjs.org/each-series-async/-/each-series-async-1.0.1.tgz" integrity sha512-G4zip/Ewpwr6JQxW7+2RNgkPd09h/UNec5UlvA/xKwl4qf5blyBNK6a/zjQc3MojgsxaOb93B9v3T92QU6IMVg== ecc-jsbn@~0.1.1: version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + resolved "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz" integrity sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw== dependencies: jsbn "~0.1.0" @@ -1765,37 +1774,37 @@ ecc-jsbn@~0.1.1: electron-build-env@^0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/electron-build-env/-/electron-build-env-0.2.0.tgz#5649ee3e5fd006e267086caa945b77a1fa220b92" + resolved "https://registry.npmjs.org/electron-build-env/-/electron-build-env-0.2.0.tgz" integrity sha512-L431TbXtXe6iw3ko7ITr/qCu+jumVKLAhCDyhqfab6421LGlawVcT88Ws/DHR57+1lkLN1POQqwNOkjPwQJQmQ== dependencies: commander "^2.9.0" mkdirp "^0.5.1" -electron-to-chromium@^1.4.535: - version "1.4.566" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.566.tgz#5c5ba1d2dc895f4887043f0cc7e61798c7e5919a" - integrity sha512-mv+fAy27uOmTVlUULy15U3DVJ+jg+8iyKH1bpwboCRhtDC69GKf1PPTZvEIhCyDr81RFqfxZJYrbgp933a1vtg== +electron-to-chromium@^1.4.477: + version "1.4.492" + resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.492.tgz" + integrity sha512-36K9b/6skMVwAIEsC7GiQ8I8N3soCALVSHqWHzNDtGemAcI9Xu8hP02cywWM0A794rTHm0b0zHPeLJHtgFVamQ== emittery@^0.13.1: version "0.13.1" - resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" + resolved "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz" integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== emoji-regex@^8.0.0: version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== end-of-stream@^1.1.0, end-of-stream@^1.4.1: version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + resolved "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== dependencies: once "^1.4.0" enhanced-resolve@^5.15.0: version "5.15.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35" + resolved "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz" integrity sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg== dependencies: graceful-fs "^4.2.4" @@ -1803,29 +1812,29 @@ enhanced-resolve@^5.15.0: env-paths@^2.2.0: version "2.2.1" - resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" + resolved "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz" integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== envinfo@^7.7.3: version "7.10.0" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.10.0.tgz#55146e3909cc5fe63c22da63fb15b05aeac35b13" + resolved "https://registry.npmjs.org/envinfo/-/envinfo-7.10.0.tgz" integrity sha512-ZtUjZO6l5mwTHvc1L9+1q5p/R3wTopcfqMW8r5t8SJSKqeVI/LtajORwRFEKpEFuekjD0VBjwu1HMxL4UalIRw== error-ex@^1.3.1: version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== dependencies: is-arrayish "^0.2.1" es-module-lexer@^1.2.1: version "1.3.1" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.3.1.tgz#c1b0dd5ada807a3b3155315911f364dc4e909db1" + resolved "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.1.tgz" integrity sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q== es5-ext@^0.10.35, es5-ext@^0.10.50: version "0.10.62" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" + resolved "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz" integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA== dependencies: es6-iterator "^2.0.3" @@ -1834,7 +1843,7 @@ es5-ext@^0.10.35, es5-ext@^0.10.50: es6-iterator@^2.0.3: version "2.0.3" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + resolved "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz" integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== dependencies: d "1" @@ -1843,7 +1852,7 @@ es6-iterator@^2.0.3: es6-symbol@^3.0.2, es6-symbol@^3.1.1, es6-symbol@^3.1.3: version "3.1.3" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + resolved "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz" integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== dependencies: d "^1.0.1" @@ -1851,32 +1860,32 @@ es6-symbol@^3.0.2, es6-symbol@^3.1.1, es6-symbol@^3.1.3: escalade@^3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== escape-string-regexp@^1.0.5: version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== escape-string-regexp@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== escape-string-regexp@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== eslint-config-prettier@^8.5.0: version "8.10.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" + resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz" integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== eslint-scope@5.1.1, eslint-scope@^5.1.1: version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== dependencies: esrecurse "^4.3.0" @@ -1884,7 +1893,7 @@ eslint-scope@5.1.1, eslint-scope@^5.1.1: eslint-scope@^7.2.2: version "7.2.2" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz" integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== dependencies: esrecurse "^4.3.0" @@ -1892,22 +1901,21 @@ eslint-scope@^7.2.2: eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: version "3.4.3" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== eslint@^8.20.0: - version "8.52.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.52.0.tgz#d0cd4a1fac06427a61ef9242b9353f36ea7062fc" - integrity sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg== + version "8.47.0" + resolved "https://registry.npmjs.org/eslint/-/eslint-8.47.0.tgz" + integrity sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" "@eslint/eslintrc" "^2.1.2" - "@eslint/js" "8.52.0" - "@humanwhocodes/config-array" "^0.11.13" + "@eslint/js" "^8.47.0" + "@humanwhocodes/config-array" "^0.11.10" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" - "@ungap/structured-clone" "^1.2.0" ajv "^6.12.4" chalk "^4.0.0" cross-spawn "^7.0.2" @@ -1941,7 +1949,7 @@ eslint@^8.20.0: espree@^9.6.0, espree@^9.6.1: version "9.6.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" + resolved "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz" integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== dependencies: acorn "^8.9.0" @@ -1950,46 +1958,46 @@ espree@^9.6.0, espree@^9.6.1: esprima@^4.0.0: version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== esquery@^1.4.2: version "1.5.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" + resolved "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz" integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== dependencies: estraverse "^5.1.0" esrecurse@^4.3.0: version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== dependencies: estraverse "^5.2.0" estraverse@^4.1.1: version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== estraverse@^5.1.0, estraverse@^5.2.0: version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== esutils@^2.0.2: version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== events@^3.2.0: version "3.3.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + resolved "https://registry.npmjs.org/events/-/events-3.3.0.tgz" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== execa@^5.0.0: version "5.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + resolved "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz" integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== dependencies: cross-spawn "^7.0.3" @@ -2004,62 +2012,67 @@ execa@^5.0.0: execspawn@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/execspawn/-/execspawn-1.0.1.tgz#8286f9dde7cecde7905fbdc04e24f368f23f8da6" + resolved "https://registry.npmjs.org/execspawn/-/execspawn-1.0.1.tgz" integrity sha512-s2k06Jy9i8CUkYe0+DxRlvtkZoOkwwfhB+Xxo5HGUtrISVW2m98jO2tr67DGRFxZwkjQqloA3v/tNtjhBRBieg== dependencies: util-extend "^1.0.1" exit@^0.1.2: version "0.1.2" - resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + resolved "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz" integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== expand-template@^2.0.3: version "2.0.3" - resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" + resolved "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz" integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== -expect@^29.0.0, expect@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" - integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== +expect@^29.0.0, expect@^29.6.2: + version "29.6.2" + resolved "https://registry.npmjs.org/expect/-/expect-29.6.2.tgz" + integrity sha512-iAErsLxJ8C+S02QbLAwgSGSezLQK+XXRDt8IuFXFpwCNw2ECmzZSmjKcCaFVp5VRMk+WAvz6h6jokzEzBFZEuA== dependencies: - "@jest/expect-utils" "^29.7.0" - jest-get-type "^29.6.3" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" + "@jest/expect-utils" "^29.6.2" + "@types/node" "*" + jest-get-type "^29.4.3" + jest-matcher-utils "^29.6.2" + jest-message-util "^29.6.2" + jest-util "^29.6.2" ext@^1.1.2: version "1.7.0" - resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" + resolved "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz" integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== dependencies: type "^2.7.2" extend@~3.0.2: version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + resolved "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== -extsprintf@1.3.0: +external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + +extsprintf@1.3.0, extsprintf@^1.2.0: version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz" integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== -extsprintf@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" - integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== - fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== fast-glob@^3.2.9: version "3.3.1" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4" + resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz" integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg== dependencies: "@nodelib/fs.stat" "^2.0.2" @@ -2070,50 +2083,57 @@ fast-glob@^3.2.9: fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== fast-levenshtein@^2.0.6: version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== fastest-levenshtein@^1.0.12: version "1.0.16" - resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" + resolved "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz" integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== fastq@^1.6.0: version "1.15.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" + resolved "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz" integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== dependencies: reusify "^1.0.4" fb-watchman@^2.0.0: version "2.0.2" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" + resolved "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz" integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== dependencies: bser "2.1.1" +figures@^3.0.0: + version "3.2.0" + resolved "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== + dependencies: + escape-string-regexp "^1.0.5" + file-entry-cache@^6.0.1: version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz" integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== dependencies: flat-cache "^3.0.4" fill-range@^7.0.1: version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz" integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== dependencies: to-regex-range "^5.0.1" find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== dependencies: locate-path "^5.0.0" @@ -2121,39 +2141,33 @@ find-up@^4.0.0, find-up@^4.1.0: find-up@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== dependencies: locate-path "^6.0.0" path-exists "^4.0.0" flat-cache@^3.0.4: - version "3.1.1" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.1.1.tgz#a02a15fdec25a8f844ff7cc658f03dd99eb4609b" - integrity sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q== + version "3.0.4" + resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz" + integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== dependencies: - flatted "^3.2.9" - keyv "^4.5.3" + flatted "^3.1.0" rimraf "^3.0.2" -flat@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" - integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== - -flatted@^3.2.9: - version "3.2.9" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf" - integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ== +flatted@^3.1.0: + version "3.2.7" + resolved "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz" + integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== forever-agent@~0.6.1: version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + resolved "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz" integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== form-data@~2.3.2: version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + resolved "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz" integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== dependencies: asynckit "^0.4.0" @@ -2162,12 +2176,12 @@ form-data@~2.3.2: fs-constants@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" + resolved "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== fs-extra@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-5.0.0.tgz#414d0110cdd06705734d055652c5411260c31abd" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz" integrity sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ== dependencies: graceful-fs "^4.1.2" @@ -2176,14 +2190,14 @@ fs-extra@^5.0.0: fs-minipass@^1.2.7: version "1.2.7" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + resolved "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz" integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== dependencies: minipass "^2.6.0" fs.realpath@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== fsevents@^2.3.2: @@ -2193,7 +2207,7 @@ fsevents@^2.3.2: fstream@^1.0.0, fstream@~1.0.10: version "1.0.12" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.12.tgz#4e8ba8ee2d48be4f7d0de505455548eae5932045" + resolved "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz" integrity sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg== dependencies: graceful-fs "^4.1.2" @@ -2201,14 +2215,14 @@ fstream@^1.0.0, fstream@~1.0.10: mkdirp ">=0.5 0" rimraf "2" -function-bind@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" - integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== gauge@~1.2.0, gauge@~1.2.5: version "1.2.7" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-1.2.7.tgz#e9cec5483d3d4ee0ef44b60a7d99e4935e136d93" + resolved "https://registry.npmjs.org/gauge/-/gauge-1.2.7.tgz" integrity sha512-fVbU2wRE91yDvKUnrIaQlHKAWKY5e08PmztCrwuH5YVQ+Z/p3d0ny2T48o6uvAAXHIUnfaQdHkmxYbQft1eHVA== dependencies: ansi "^0.3.0" @@ -2219,7 +2233,7 @@ gauge@~1.2.0, gauge@~1.2.5: gauge@~2.7.3: version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + resolved "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz" integrity sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg== dependencies: aproba "^1.0.3" @@ -2233,34 +2247,34 @@ gauge@~2.7.3: gensync@^1.0.0-beta.2: version "1.0.0-beta.2" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== get-caller-file@^2.0.5: version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== get-package-type@^0.1.0: version "0.1.0" - resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" + resolved "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== get-stream@^6.0.0: version "6.0.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== getpass@^0.1.1: version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + resolved "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz" integrity sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng== dependencies: assert-plus "^1.0.0" ghreleases@^3.0.2: version "3.0.2" - resolved "https://registry.yarnpkg.com/ghreleases/-/ghreleases-3.0.2.tgz#1bdb6d31ec03a24a0d80f58f5e9a84a4db725818" + resolved "https://registry.npmjs.org/ghreleases/-/ghreleases-3.0.2.tgz" integrity sha512-QiR9mIYvRG7hd8JuQYoxeBNOelVuTp2DpdiByRywbCDBSJufK9Vq7VuhD8B+5uviMxZx2AEkCzye61Us9gYgnw== dependencies: after "~0.8.1" @@ -2272,14 +2286,14 @@ ghreleases@^3.0.2: ghrepos@~2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/ghrepos/-/ghrepos-2.1.0.tgz#abaf558b690b722c70c7ad45076f6f9be8e495e1" + resolved "https://registry.npmjs.org/ghrepos/-/ghrepos-2.1.0.tgz" integrity sha512-6GM0ohSDTAv7xD6GsKfxJiV/CajoofRyUwu0E8l29d1o6lFAUxmmyMP/FH33afA20ZrXzxxcTtN6TsYvudMoAg== dependencies: ghutils "~3.2.0" ghutils@~3.2.0: version "3.2.6" - resolved "https://registry.yarnpkg.com/ghutils/-/ghutils-3.2.6.tgz#d43986e267da02787464d97a6489659e4609bb1f" + resolved "https://registry.npmjs.org/ghutils/-/ghutils-3.2.6.tgz" integrity sha512-WpYHgLQkqU7Cv147wKUEThyj6qKHCdnAG2CL9RRsRQImVdLGdVqblJ3JUnj3ToQwgm1ALPS+FXgR0448AgGPUg== dependencies: jsonist "~2.1.0" @@ -2287,31 +2301,31 @@ ghutils@~3.2.0: github-from-package@0.0.0: version "0.0.0" - resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" + resolved "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz" integrity sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw== glob-parent@^5.1.2: version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" glob-parent@^6.0.2: version "6.0.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== dependencies: is-glob "^4.0.3" glob-to-regexp@^0.4.1: version "0.4.1" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" + resolved "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== "glob@3 || 4 || 5 || 6 || 7", glob@^7.0.3, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" @@ -2323,7 +2337,7 @@ glob-to-regexp@^0.4.1: glob@5.0.x: version "5.0.15" - resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + resolved "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz" integrity sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA== dependencies: inflight "^1.0.4" @@ -2334,19 +2348,19 @@ glob@5.0.x: globals@^11.1.0: version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== globals@^13.19.0: - version "13.23.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.23.0.tgz#ef31673c926a0976e1f61dab4dca57e0c0a8af02" - integrity sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA== + version "13.21.0" + resolved "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz" + integrity sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg== dependencies: type-fest "^0.20.2" globby@^11.1.0: version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== dependencies: array-union "^2.1.0" @@ -2358,22 +2372,22 @@ globby@^11.1.0: graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.2, graceful-fs@^4.2.4, graceful-fs@^4.2.9: version "4.2.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== "graceful-readlink@>= 1.0.0": version "1.0.1" - resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + resolved "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz" integrity sha512-8tLu60LgxF6XpdbK8OW3FA+IfTNBn1ZHGHKF4KQbEeSkajYw5PlYJcKluntgegDPTg8UkHjpet1T82vk6TQ68w== graphemer@^1.4.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + resolved "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz" integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== handlebars@^4.7.7: version "4.7.8" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.8.tgz#41c42c18b1be2365439188c77c6afae71c0cd9e9" + resolved "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz" integrity sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ== dependencies: minimist "^1.2.5" @@ -2385,12 +2399,12 @@ handlebars@^4.7.7: har-schema@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + resolved "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz" integrity sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q== har-validator@~5.1.3: version "5.1.5" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + resolved "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz" integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== dependencies: ajv "^6.12.3" @@ -2398,34 +2412,34 @@ har-validator@~5.1.3: has-flag@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== has-flag@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== has-unicode@^2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + resolved "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz" integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== -hasown@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" - integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA== +has@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== dependencies: - function-bind "^1.1.2" + function-bind "^1.1.1" html-escaper@^2.0.0: version "2.0.2" - resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" + resolved "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== http-signature@~1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + resolved "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz" integrity sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ== dependencies: assert-plus "^1.0.0" @@ -2434,31 +2448,38 @@ http-signature@~1.2.0: human-signals@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== hyperquest@~2.1.3: version "2.1.3" - resolved "https://registry.yarnpkg.com/hyperquest/-/hyperquest-2.1.3.tgz#523127d7a343181b40bf324e231d2576edf52633" + resolved "https://registry.npmjs.org/hyperquest/-/hyperquest-2.1.3.tgz" integrity sha512-fUuDOrB47PqNK/BAMOS13v41UoaqIxqSLHX6CAbOD7OfT+/GCWO1/vPLfTNutOeXrv1ikuaZ3yux+33Z9vh+rw== dependencies: buffer-from "^0.1.1" duplexer2 "~0.0.2" through2 "~0.6.3" +iconv-lite@^0.4.24: + version "0.4.24" + resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + ieee754@^1.1.13: version "1.2.1" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== ignore@^5.2.0: version "5.2.4" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" + resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== import-fresh@^3.2.1: version "3.3.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== dependencies: parent-module "^1.0.0" @@ -2466,7 +2487,7 @@ import-fresh@^3.2.1: import-local@^3.0.2: version "3.1.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" + resolved "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz" integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== dependencies: pkg-dir "^4.2.0" @@ -2474,12 +2495,12 @@ import-local@^3.0.2: imurmurhash@^0.1.4: version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== inflight@^1.0.4: version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== dependencies: once "^1.3.0" @@ -2487,130 +2508,161 @@ inflight@^1.0.4: inherits@2, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== ini@~1.3.0: version "1.3.8" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + resolved "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== +inquirer@^8.1.3: + version "8.2.6" + resolved "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz" + integrity sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg== + dependencies: + ansi-escapes "^4.2.1" + chalk "^4.1.1" + cli-cursor "^3.1.0" + cli-width "^3.0.0" + external-editor "^3.0.3" + figures "^3.0.0" + lodash "^4.17.21" + mute-stream "0.0.8" + ora "^5.4.1" + run-async "^2.4.0" + rxjs "^7.5.5" + string-width "^4.1.0" + strip-ansi "^6.0.0" + through "^2.3.6" + wrap-ansi "^6.0.1" + interpret@^3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4" + resolved "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz" integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ== invert-kv@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + resolved "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz" integrity sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ== is-arrayish@^0.2.1: version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== is-core-module@^2.13.0: - version "2.13.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" - integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== + version "2.13.0" + resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz" + integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== dependencies: - hasown "^2.0.0" + has "^1.0.3" is-extglob@^2.1.1: version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== is-fullwidth-code-point@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz" integrity sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw== dependencies: number-is-nan "^1.0.0" is-fullwidth-code-point@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== is-generator-fn@^2.0.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" + resolved "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz" integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: is-extglob "^2.1.1" +is-interactive@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz" + integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== + is-iojs@^1.0.1: version "1.1.0" - resolved "https://registry.yarnpkg.com/is-iojs/-/is-iojs-1.1.0.tgz#4c11033b5d5d94d6eab3775dedc9be7d008325f1" + resolved "https://registry.npmjs.org/is-iojs/-/is-iojs-1.1.0.tgz" integrity sha512-tLn1j3wYSL6DkvEI+V/j0pKohpa5jk+ER74v6S4SgCXnjS0WA+DoZbwZBrrhgwksMvtuwndyGeG5F8YMsoBzSA== is-number@^7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== is-path-inside@^3.0.3: version "3.0.3" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + resolved "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== is-plain-object@^2.0.4: version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + resolved "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz" integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== dependencies: isobject "^3.0.1" is-stream@^2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== is-typedarray@~1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + isarray@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + resolved "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== isarray@~1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== isexe@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== isobject@^3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + resolved "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz" integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== isstream@~0.1.2: version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + resolved "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: version "3.2.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" + resolved "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz" integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== -istanbul-lib-instrument@^5.0.4: +istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: version "5.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" + resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz" integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== dependencies: "@babel/core" "^7.12.3" @@ -2619,20 +2671,9 @@ istanbul-lib-instrument@^5.0.4: istanbul-lib-coverage "^3.2.0" semver "^6.3.0" -istanbul-lib-instrument@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.1.tgz#71e87707e8041428732518c6fb5211761753fbdf" - integrity sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA== - dependencies: - "@babel/core" "^7.12.3" - "@babel/parser" "^7.14.7" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.2.0" - semver "^7.5.4" - istanbul-lib-report@^3.0.0: version "3.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" + resolved "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz" integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== dependencies: istanbul-lib-coverage "^3.0.0" @@ -2641,7 +2682,7 @@ istanbul-lib-report@^3.0.0: istanbul-lib-source-maps@^4.0.0: version "4.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" + resolved "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz" integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== dependencies: debug "^4.1.1" @@ -2650,387 +2691,387 @@ istanbul-lib-source-maps@^4.0.0: istanbul-reports@^3.1.3: version "3.1.6" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.6.tgz#2544bcab4768154281a2f0870471902704ccaa1a" + resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz" integrity sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg== dependencies: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -jest-changed-files@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a" - integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w== +jest-changed-files@^29.5.0: + version "29.5.0" + resolved "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.5.0.tgz" + integrity sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag== dependencies: execa "^5.0.0" - jest-util "^29.7.0" p-limit "^3.1.0" -jest-circus@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.7.0.tgz#b6817a45fcc835d8b16d5962d0c026473ee3668a" - integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw== +jest-circus@^29.6.2: + version "29.6.2" + resolved "https://registry.npmjs.org/jest-circus/-/jest-circus-29.6.2.tgz" + integrity sha512-G9mN+KOYIUe2sB9kpJkO9Bk18J4dTDArNFPwoZ7WKHKel55eKIS/u2bLthxgojwlf9NLCVQfgzM/WsOVvoC6Fw== dependencies: - "@jest/environment" "^29.7.0" - "@jest/expect" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" + "@jest/environment" "^29.6.2" + "@jest/expect" "^29.6.2" + "@jest/test-result" "^29.6.2" + "@jest/types" "^29.6.1" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" dedent "^1.0.0" is-generator-fn "^2.0.0" - jest-each "^29.7.0" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-runtime "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" + jest-each "^29.6.2" + jest-matcher-utils "^29.6.2" + jest-message-util "^29.6.2" + jest-runtime "^29.6.2" + jest-snapshot "^29.6.2" + jest-util "^29.6.2" p-limit "^3.1.0" - pretty-format "^29.7.0" + pretty-format "^29.6.2" pure-rand "^6.0.0" slash "^3.0.0" stack-utils "^2.0.3" -jest-cli@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.7.0.tgz#5592c940798e0cae677eec169264f2d839a37995" - integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg== +jest-cli@^29.6.2: + version "29.6.2" + resolved "https://registry.npmjs.org/jest-cli/-/jest-cli-29.6.2.tgz" + integrity sha512-TT6O247v6dCEX2UGHGyflMpxhnrL0DNqP2fRTKYm3nJJpCTfXX3GCMQPGFjXDoj0i5/Blp3jriKXFgdfmbYB6Q== dependencies: - "@jest/core" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" + "@jest/core" "^29.6.2" + "@jest/test-result" "^29.6.2" + "@jest/types" "^29.6.1" chalk "^4.0.0" - create-jest "^29.7.0" exit "^0.1.2" + graceful-fs "^4.2.9" import-local "^3.0.2" - jest-config "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" + jest-config "^29.6.2" + jest-util "^29.6.2" + jest-validate "^29.6.2" + prompts "^2.0.1" yargs "^17.3.1" -jest-config@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.7.0.tgz#bcbda8806dbcc01b1e316a46bb74085a84b0245f" - integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ== +jest-config@^29.6.2: + version "29.6.2" + resolved "https://registry.npmjs.org/jest-config/-/jest-config-29.6.2.tgz" + integrity sha512-VxwFOC8gkiJbuodG9CPtMRjBUNZEHxwfQXmIudSTzFWxaci3Qub1ddTRbFNQlD/zUeaifLndh/eDccFX4wCMQw== dependencies: "@babel/core" "^7.11.6" - "@jest/test-sequencer" "^29.7.0" - "@jest/types" "^29.6.3" - babel-jest "^29.7.0" + "@jest/test-sequencer" "^29.6.2" + "@jest/types" "^29.6.1" + babel-jest "^29.6.2" 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.7.0" - jest-environment-node "^29.7.0" - jest-get-type "^29.6.3" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-runner "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" + jest-circus "^29.6.2" + jest-environment-node "^29.6.2" + jest-get-type "^29.4.3" + jest-regex-util "^29.4.3" + jest-resolve "^29.6.2" + jest-runner "^29.6.2" + jest-util "^29.6.2" + jest-validate "^29.6.2" micromatch "^4.0.4" parse-json "^5.2.0" - pretty-format "^29.7.0" + pretty-format "^29.6.2" slash "^3.0.0" strip-json-comments "^3.1.1" -jest-diff@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" - integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== +jest-diff@^29.6.2: + version "29.6.2" + resolved "https://registry.npmjs.org/jest-diff/-/jest-diff-29.6.2.tgz" + integrity sha512-t+ST7CB9GX5F2xKwhwCf0TAR17uNDiaPTZnVymP9lw0lssa9vG+AFyDZoeIHStU3WowFFwT+ky+er0WVl2yGhA== dependencies: chalk "^4.0.0" - diff-sequences "^29.6.3" - jest-get-type "^29.6.3" - pretty-format "^29.7.0" + diff-sequences "^29.4.3" + jest-get-type "^29.4.3" + pretty-format "^29.6.2" -jest-docblock@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.7.0.tgz#8fddb6adc3cdc955c93e2a87f61cfd350d5d119a" - integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g== +jest-docblock@^29.4.3: + version "29.4.3" + resolved "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.4.3.tgz" + integrity sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg== dependencies: detect-newline "^3.0.0" -jest-each@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.7.0.tgz#162a9b3f2328bdd991beaabffbb74745e56577d1" - integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ== +jest-each@^29.6.2: + version "29.6.2" + resolved "https://registry.npmjs.org/jest-each/-/jest-each-29.6.2.tgz" + integrity sha512-MsrsqA0Ia99cIpABBc3izS1ZYoYfhIy0NNWqPSE0YXbQjwchyt6B1HD2khzyPe1WiJA7hbxXy77ZoUQxn8UlSw== dependencies: - "@jest/types" "^29.6.3" + "@jest/types" "^29.6.1" chalk "^4.0.0" - jest-get-type "^29.6.3" - jest-util "^29.7.0" - pretty-format "^29.7.0" - -jest-environment-node@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" - integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/fake-timers" "^29.7.0" - "@jest/types" "^29.6.3" + jest-get-type "^29.4.3" + jest-util "^29.6.2" + pretty-format "^29.6.2" + +jest-environment-node@^29.6.2: + version "29.6.2" + resolved "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.6.2.tgz" + integrity sha512-YGdFeZ3T9a+/612c5mTQIllvWkddPbYcN2v95ZH24oWMbGA4GGS2XdIF92QMhUhvrjjuQWYgUGW2zawOyH63MQ== + dependencies: + "@jest/environment" "^29.6.2" + "@jest/fake-timers" "^29.6.2" + "@jest/types" "^29.6.1" "@types/node" "*" - jest-mock "^29.7.0" - jest-util "^29.7.0" + jest-mock "^29.6.2" + jest-util "^29.6.2" -jest-get-type@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" - integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw== +jest-get-type@^29.4.3: + version "29.4.3" + resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.4.3.tgz" + integrity sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg== -jest-haste-map@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz#3c2396524482f5a0506376e6c858c3bbcc17b104" - integrity sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA== +jest-haste-map@^29.6.2: + version "29.6.2" + resolved "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.6.2.tgz" + integrity sha512-+51XleTDAAysvU8rT6AnS1ZJ+WHVNqhj1k6nTvN2PYP+HjU3kqlaKQ1Lnw3NYW3bm2r8vq82X0Z1nDDHZMzHVA== dependencies: - "@jest/types" "^29.6.3" + "@jest/types" "^29.6.1" "@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.6.3" - jest-util "^29.7.0" - jest-worker "^29.7.0" + jest-regex-util "^29.4.3" + jest-util "^29.6.2" + jest-worker "^29.6.2" micromatch "^4.0.4" walker "^1.0.8" optionalDependencies: fsevents "^2.3.2" -jest-leak-detector@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728" - integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw== +jest-leak-detector@^29.6.2: + version "29.6.2" + resolved "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.6.2.tgz" + integrity sha512-aNqYhfp5uYEO3tdWMb2bfWv6f0b4I0LOxVRpnRLAeque2uqOVVMLh6khnTcE2qJ5wAKop0HcreM1btoysD6bPQ== dependencies: - jest-get-type "^29.6.3" - pretty-format "^29.7.0" + jest-get-type "^29.4.3" + pretty-format "^29.6.2" -jest-matcher-utils@^29.5.0, jest-matcher-utils@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12" - integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g== +jest-matcher-utils@^29.5.0, jest-matcher-utils@^29.6.2: + version "29.6.2" + resolved "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.6.2.tgz" + integrity sha512-4LiAk3hSSobtomeIAzFTe+N8kL6z0JtF3n6I4fg29iIW7tt99R7ZcIFW34QkX+DuVrf+CUe6wuVOpm7ZKFJzZQ== dependencies: chalk "^4.0.0" - jest-diff "^29.7.0" - jest-get-type "^29.6.3" - pretty-format "^29.7.0" + jest-diff "^29.6.2" + jest-get-type "^29.4.3" + pretty-format "^29.6.2" -jest-message-util@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3" - integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w== +jest-message-util@^29.6.2: + version "29.6.2" + resolved "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.6.2.tgz" + integrity sha512-vnIGYEjoPSuRqV8W9t+Wow95SDp6KPX2Uf7EoeG9G99J2OVh7OSwpS4B6J0NfpEIpfkBNHlBZpA2rblEuEFhZQ== dependencies: "@babel/code-frame" "^7.12.13" - "@jest/types" "^29.6.3" + "@jest/types" "^29.6.1" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.9" micromatch "^4.0.4" - pretty-format "^29.7.0" + pretty-format "^29.6.2" slash "^3.0.0" stack-utils "^2.0.3" -jest-mock@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347" - integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw== +jest-mock@^29.6.2: + version "29.6.2" + resolved "https://registry.npmjs.org/jest-mock/-/jest-mock-29.6.2.tgz" + integrity sha512-hoSv3lb3byzdKfwqCuT6uTscan471GUECqgNYykg6ob0yiAw3zYc7OrPnI9Qv8Wwoa4lC7AZ9hyS4AiIx5U2zg== dependencies: - "@jest/types" "^29.6.3" + "@jest/types" "^29.6.1" "@types/node" "*" - jest-util "^29.7.0" + jest-util "^29.6.2" jest-pnp-resolver@^1.2.2: version "1.2.3" - resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" + resolved "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz" integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== -jest-regex-util@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52" - integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== +jest-regex-util@^29.4.3: + 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== -jest-resolve-dependencies@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz#1b04f2c095f37fc776ff40803dc92921b1e88428" - integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA== +jest-resolve-dependencies@^29.6.2: + version "29.6.2" + resolved "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.6.2.tgz" + integrity sha512-LGqjDWxg2fuQQm7ypDxduLu/m4+4Lb4gczc13v51VMZbVP5tSBILqVx8qfWcsdP8f0G7aIqByIALDB0R93yL+w== dependencies: - jest-regex-util "^29.6.3" - jest-snapshot "^29.7.0" + jest-regex-util "^29.4.3" + jest-snapshot "^29.6.2" -jest-resolve@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.7.0.tgz#64d6a8992dd26f635ab0c01e5eef4399c6bcbc30" - integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== +jest-resolve@^29.6.2: + version "29.6.2" + resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.6.2.tgz" + integrity sha512-G/iQUvZWI5e3SMFssc4ug4dH0aZiZpsDq9o1PtXTV1210Ztyb2+w+ZgQkB3iOiC5SmAEzJBOHWz6Hvrd+QnNPw== dependencies: chalk "^4.0.0" graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" + jest-haste-map "^29.6.2" jest-pnp-resolver "^1.2.2" - jest-util "^29.7.0" - jest-validate "^29.7.0" + jest-util "^29.6.2" + jest-validate "^29.6.2" resolve "^1.20.0" resolve.exports "^2.0.0" slash "^3.0.0" -jest-runner@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.7.0.tgz#809af072d408a53dcfd2e849a4c976d3132f718e" - integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ== +jest-runner@^29.6.2: + version "29.6.2" + resolved "https://registry.npmjs.org/jest-runner/-/jest-runner-29.6.2.tgz" + integrity sha512-wXOT/a0EspYgfMiYHxwGLPCZfC0c38MivAlb2lMEAlwHINKemrttu1uSbcGbfDV31sFaPWnWJPmb2qXM8pqZ4w== dependencies: - "@jest/console" "^29.7.0" - "@jest/environment" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" + "@jest/console" "^29.6.2" + "@jest/environment" "^29.6.2" + "@jest/test-result" "^29.6.2" + "@jest/transform" "^29.6.2" + "@jest/types" "^29.6.1" "@types/node" "*" chalk "^4.0.0" emittery "^0.13.1" graceful-fs "^4.2.9" - jest-docblock "^29.7.0" - jest-environment-node "^29.7.0" - jest-haste-map "^29.7.0" - jest-leak-detector "^29.7.0" - jest-message-util "^29.7.0" - jest-resolve "^29.7.0" - jest-runtime "^29.7.0" - jest-util "^29.7.0" - jest-watcher "^29.7.0" - jest-worker "^29.7.0" + jest-docblock "^29.4.3" + jest-environment-node "^29.6.2" + jest-haste-map "^29.6.2" + jest-leak-detector "^29.6.2" + jest-message-util "^29.6.2" + jest-resolve "^29.6.2" + jest-runtime "^29.6.2" + jest-util "^29.6.2" + jest-watcher "^29.6.2" + jest-worker "^29.6.2" p-limit "^3.1.0" source-map-support "0.5.13" -jest-runtime@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.7.0.tgz#efecb3141cf7d3767a3a0cc8f7c9990587d3d817" - integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/fake-timers" "^29.7.0" - "@jest/globals" "^29.7.0" - "@jest/source-map" "^29.6.3" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" +jest-runtime@^29.6.2: + version "29.6.2" + resolved "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.6.2.tgz" + integrity sha512-2X9dqK768KufGJyIeLmIzToDmsN0m7Iek8QNxRSI/2+iPFYHF0jTwlO3ftn7gdKd98G/VQw9XJCk77rbTGZnJg== + dependencies: + "@jest/environment" "^29.6.2" + "@jest/fake-timers" "^29.6.2" + "@jest/globals" "^29.6.2" + "@jest/source-map" "^29.6.0" + "@jest/test-result" "^29.6.2" + "@jest/transform" "^29.6.2" + "@jest/types" "^29.6.1" "@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.7.0" - jest-message-util "^29.7.0" - jest-mock "^29.7.0" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" + jest-haste-map "^29.6.2" + jest-message-util "^29.6.2" + jest-mock "^29.6.2" + jest-regex-util "^29.4.3" + jest-resolve "^29.6.2" + jest-snapshot "^29.6.2" + jest-util "^29.6.2" slash "^3.0.0" strip-bom "^4.0.0" -jest-snapshot@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz#c2c574c3f51865da1bb329036778a69bf88a6be5" - integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw== +jest-snapshot@^29.6.2: + version "29.6.2" + resolved "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.6.2.tgz" + integrity sha512-1OdjqvqmRdGNvWXr/YZHuyhh5DeaLp1p/F8Tht/MrMw4Kr1Uu/j4lRG+iKl1DAqUJDWxtQBMk41Lnf/JETYBRA== 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/types" "^7.3.3" - "@jest/expect-utils" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" + "@jest/expect-utils" "^29.6.2" + "@jest/transform" "^29.6.2" + "@jest/types" "^29.6.1" babel-preset-current-node-syntax "^1.0.0" chalk "^4.0.0" - expect "^29.7.0" + expect "^29.6.2" graceful-fs "^4.2.9" - jest-diff "^29.7.0" - jest-get-type "^29.6.3" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" + jest-diff "^29.6.2" + jest-get-type "^29.4.3" + jest-matcher-utils "^29.6.2" + jest-message-util "^29.6.2" + jest-util "^29.6.2" natural-compare "^1.4.0" - pretty-format "^29.7.0" + pretty-format "^29.6.2" semver "^7.5.3" -jest-util@^29.0.0, jest-util@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" - integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== +jest-util@^29.0.0, jest-util@^29.6.2: + version "29.6.2" + resolved "https://registry.npmjs.org/jest-util/-/jest-util-29.6.2.tgz" + integrity sha512-3eX1qb6L88lJNCFlEADKOkjpXJQyZRiavX1INZ4tRnrBVr2COd3RgcTLyUiEXMNBlDU/cgYq6taUS0fExrWW4w== dependencies: - "@jest/types" "^29.6.3" + "@jest/types" "^29.6.1" "@types/node" "*" chalk "^4.0.0" ci-info "^3.2.0" graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-validate@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c" - integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw== +jest-validate@^29.6.2: + version "29.6.2" + resolved "https://registry.npmjs.org/jest-validate/-/jest-validate-29.6.2.tgz" + integrity sha512-vGz0yMN5fUFRRbpJDPwxMpgSXW1LDKROHfBopAvDcmD6s+B/s8WJrwi+4bfH4SdInBA5C3P3BI19dBtKzx1Arg== dependencies: - "@jest/types" "^29.6.3" + "@jest/types" "^29.6.1" camelcase "^6.2.0" chalk "^4.0.0" - jest-get-type "^29.6.3" + jest-get-type "^29.4.3" leven "^3.1.0" - pretty-format "^29.7.0" + pretty-format "^29.6.2" -jest-watcher@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.7.0.tgz#7810d30d619c3a62093223ce6bb359ca1b28a2f2" - integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g== +jest-watcher@^29.6.2: + version "29.6.2" + resolved "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.6.2.tgz" + integrity sha512-GZitlqkMkhkefjfN/p3SJjrDaxPflqxEAv3/ik10OirZqJGYH5rPiIsgVcfof0Tdqg3shQGdEIxDBx+B4tuLzA== dependencies: - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" + "@jest/test-result" "^29.6.2" + "@jest/types" "^29.6.1" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" emittery "^0.13.1" - jest-util "^29.7.0" + jest-util "^29.6.2" string-length "^4.0.1" jest-worker@^27.4.5: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" + resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz" integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== dependencies: "@types/node" "*" merge-stream "^2.0.0" supports-color "^8.0.0" -jest-worker@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a" - integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== +jest-worker@^29.6.2: + version "29.6.2" + resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-29.6.2.tgz" + integrity sha512-l3ccBOabTdkng8I/ORCkADz4eSMKejTYv1vB/Z83UiubqhC1oQ5Li6dWCyqOIvSifGjUBxuvxvlm6KGK2DtuAQ== dependencies: "@types/node" "*" - jest-util "^29.7.0" + jest-util "^29.6.2" merge-stream "^2.0.0" supports-color "^8.0.0" jest@^29.4.2: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-29.7.0.tgz#994676fc24177f088f1c5e3737f5697204ff2613" - integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== + version "29.6.2" + resolved "https://registry.npmjs.org/jest/-/jest-29.6.2.tgz" + integrity sha512-8eQg2mqFbaP7CwfsTpCxQ+sHzw1WuNWL5UUvjnWP4hx2riGz9fPSzYOaU5q8/GqWn1TfgZIVTqYJygbGbWAANg== dependencies: - "@jest/core" "^29.7.0" - "@jest/types" "^29.6.3" + "@jest/core" "^29.6.2" + "@jest/types" "^29.6.1" import-local "^3.0.2" - jest-cli "^29.7.0" + jest-cli "^29.6.2" js-tokens@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@^3.13.1: version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== dependencies: argparse "^1.0.7" @@ -3038,71 +3079,66 @@ js-yaml@^3.13.1: js-yaml@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: argparse "^2.0.1" jsbn@~0.1.0: version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + resolved "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz" integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== jsesc@^2.5.1: version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== -json-buffer@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" - integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== - json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: version "2.3.1" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + 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== json-schema-traverse@^0.4.1: version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== json-schema@0.4.0: version "0.4.0" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" + resolved "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz" integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== json-stringify-safe@~5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== -json5@^2.2.3: +json5@^2.2.2, json5@^2.2.3: version "2.2.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== jsonc-parser@^3.2.0: version "3.2.0" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" + resolved "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz" integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== jsonfile@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz" integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== optionalDependencies: graceful-fs "^4.1.6" jsonist@~2.1.0: version "2.1.2" - resolved "https://registry.yarnpkg.com/jsonist/-/jsonist-2.1.2.tgz#c1377311e8fc857abe7aa3df197116a911f95324" + resolved "https://registry.npmjs.org/jsonist/-/jsonist-2.1.2.tgz" integrity sha512-8yqmWJAC2VaYoSKQAbsfgCpGY5o/1etWzx6ZxaZrC4iGaHrHUZEo+a2MyF8w+2uTavTlHdLWaZUoR19UfBstxQ== dependencies: bl "~3.0.0" @@ -3112,7 +3148,7 @@ jsonist@~2.1.0: jsprim@^1.2.2: version "1.4.2" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" + resolved "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz" integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== dependencies: assert-plus "1.0.0" @@ -3120,38 +3156,31 @@ jsprim@^1.2.2: json-schema "0.4.0" verror "1.10.0" -keyv@^4.5.3: - version "4.5.4" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" - integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== - dependencies: - json-buffer "3.0.1" - kind-of@^6.0.2: version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== kleur@^3.0.3: version "3.0.3" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" + resolved "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== lcid@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + resolved "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz" integrity sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw== dependencies: invert-kv "^1.0.0" leven@^3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" + resolved "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz" integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== levn@^0.4.1: version "0.4.1" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== dependencies: prelude-ls "^1.2.1" @@ -3159,131 +3188,139 @@ levn@^0.4.1: lines-and-columns@^1.1.6: version "1.2.4" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== listenercount@~1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/listenercount/-/listenercount-1.0.1.tgz#84c8a72ab59c4725321480c975e6508342e70937" + resolved "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz" integrity sha512-3mk/Zag0+IJxeDrxSgaDPy4zZ3w05PRZeJNnlWhzFz5OkX49J4krc+A8X2d2M69vGMBEX0uyl8M+W+8gH+kBqQ== loader-runner@^4.2.0: version "4.3.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" + resolved "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz" integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== locate-path@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== dependencies: p-locate "^4.1.0" locate-path@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== dependencies: p-locate "^5.0.0" lodash.memoize@4.x: version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + resolved "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz" integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== lodash.merge@^4.6.2: version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== lodash.pad@^4.1.0: version "4.5.1" - resolved "https://registry.yarnpkg.com/lodash.pad/-/lodash.pad-4.5.1.tgz#4330949a833a7c8da22cc20f6a26c4d59debba70" + resolved "https://registry.npmjs.org/lodash.pad/-/lodash.pad-4.5.1.tgz" integrity sha512-mvUHifnLqM+03YNzeTBS1/Gr6JRFjd3rRx88FHWUvamVaT9k2O/kXha3yBSOwB9/DTQrSTLJNHvLBBt2FdX7Mg== lodash.padend@^4.1.0: version "4.6.1" - resolved "https://registry.yarnpkg.com/lodash.padend/-/lodash.padend-4.6.1.tgz#53ccba047d06e158d311f45da625f4e49e6f166e" + resolved "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.6.1.tgz" integrity sha512-sOQs2aqGpbl27tmCS1QNZA09Uqp01ZzWfDUoD+xzTii0E7dSQfRKcRetFwa+uXaxaqL+TKm7CgD2JdKP7aZBSw== lodash.padstart@^4.1.0: version "4.6.1" - resolved "https://registry.yarnpkg.com/lodash.padstart/-/lodash.padstart-4.6.1.tgz#d2e3eebff0d9d39ad50f5cbd1b52a7bce6bb611b" + resolved "https://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.6.1.tgz" integrity sha512-sW73O6S8+Tg66eY56DBk85aQzzUJDtpoXFBgELMd5P/SotAguo+1kYO6RuYgXxA4HJH3LFTFPASX6ET6bjfriw== lodash.uniq@^4.5.0: version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" + resolved "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz" integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ== -lodash@^4: +lodash@^4, lodash@^4.17.21: version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== +log-symbols@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + lru-cache@^5.1.1: version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz" integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== dependencies: yallist "^3.0.2" lru-cache@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== dependencies: yallist "^4.0.0" lunr@^2.3.9: version "2.3.9" - resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" + resolved "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz" integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== make-dir@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" + resolved "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz" integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== dependencies: semver "^7.5.3" make-error@1.x: version "1.3.6" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== makeerror@1.0.12: version "1.0.12" - resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" + resolved "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz" integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== dependencies: tmpl "1.0.5" marked@^4.3.0: version "4.3.0" - resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" + resolved "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz" integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== memory-stream@0: version "0.0.3" - resolved "https://registry.yarnpkg.com/memory-stream/-/memory-stream-0.0.3.tgz#ebe8dd1c3b8bc38c0e7941e9ddd5aebe6b4de83f" + resolved "https://registry.npmjs.org/memory-stream/-/memory-stream-0.0.3.tgz" integrity sha512-q0D3m846qY6ZkIt+19ZemU5vH56lpOZZwoJc3AICARKh/menBuayQUjAGPrqtHQQMUYERSdOrej92J9kz7LgYA== dependencies: readable-stream "~1.0.26-2" merge-stream@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== micromatch@^4.0.4: version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz" integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== dependencies: braces "^3.0.2" @@ -3291,19 +3328,19 @@ micromatch@^4.0.4: mime-db@1.52.0: version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== mime-types@^2.1.12, mime-types@^2.1.27, mime-types@~2.1.19: version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + 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" mimic-fn@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== mimic-response@^1.0.0: @@ -3313,26 +3350,26 @@ mimic-response@^1.0.0: "minimatch@2 || 3", minimatch@3, minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" minimatch@^9.0.0: version "9.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz" integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== dependencies: brace-expansion "^2.0.1" minimist@^1.1.2, minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6: version "1.2.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== minipass@^2.6.0, minipass@^2.9.0: version "2.9.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" + resolved "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz" integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== dependencies: safe-buffer "^5.1.2" @@ -3340,68 +3377,73 @@ minipass@^2.6.0, minipass@^2.9.0: minizlib@^1.3.3: version "1.3.3" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" + resolved "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz" integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== dependencies: minipass "^2.9.0" mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: version "0.5.3" - resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" + resolved "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz" integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.5: version "0.5.6" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz" integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== dependencies: minimist "^1.2.6" ms@2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== ms@2.1.2: version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +mute-stream@0.0.8: + version "0.0.8" + resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz" + integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== + napi-build-utils@^1.0.1: version "1.0.2" - resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" + resolved "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz" integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== natural-compare-lite@^1.4.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" + resolved "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz" integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== natural-compare@^1.4.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== neo-async@^2.6.2: version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + resolved "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== next-tick@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" + resolved "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz" integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== node-abi@^3.0.0, node-abi@^3.3.0: version "3.51.0" - resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.51.0.tgz#970bf595ef5a26a271307f8a4befa02823d4e87d" + resolved "https://registry.npmjs.org/node-abi/-/node-abi-3.51.0.tgz" integrity sha512-SQkEP4hmNWjlniS5zdnfIXTk1x7Ome85RDzHlTbBtzE97Gfwz/Ipw4v/Ryk20DWIy3yCNVLVlGKApCnmvYoJbA== dependencies: semver "^7.3.5" node-gyp@^6.0.1: version "6.1.0" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-6.1.0.tgz#64e31c61a4695ad304c1d5b82cf6b7c79cc79f3f" + resolved "https://registry.npmjs.org/node-gyp/-/node-gyp-6.1.0.tgz" integrity sha512-h4A2zDlOujeeaaTx06r4Vy+8MZ1679lU+wbCKDS4ZtvY2A37DESo37oejIw0mtmR3+rvNwts5B6Kpt1KrNYdNw== dependencies: env-paths "^2.2.0" @@ -3418,12 +3460,12 @@ node-gyp@^6.0.1: node-int64@^0.4.0: version "0.4.0" - resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + resolved "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== node-ninja@^1.0.1: version "1.0.2" - resolved "https://registry.yarnpkg.com/node-ninja/-/node-ninja-1.0.2.tgz#20a09e57b92e2df591993d4bf098ac3e727062b6" + resolved "https://registry.npmjs.org/node-ninja/-/node-ninja-1.0.2.tgz" integrity sha512-wMtWsG2QZI1Z5V7GciX9OI2DVT0PuDRIDQfe3L3rJsQ1qN1Gm3QQhoNtb4PMRi7gq4ByvEIYtPwHC7YbEf5yxw== dependencies: fstream "^1.0.0" @@ -3443,24 +3485,24 @@ node-ninja@^1.0.1: node-releases@^2.0.13: version "2.0.13" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d" + resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz" integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ== noop-logger@^0.1.0: version "0.1.1" - resolved "https://registry.yarnpkg.com/noop-logger/-/noop-logger-0.1.1.tgz#94a2b1633c4f1317553007d8966fd0e841b6a4c2" + resolved "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz" integrity sha512-6kM8CLXvuW5crTxsAtva2YLrRrDaiTIkIePWs9moLHqbFWT94WpNFjwS/5dfLfECg5i/lkmw3aoqVidxt23TEQ== "nopt@2 || 3": version "3.0.6" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + resolved "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz" integrity sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg== dependencies: abbrev "1" nopt@^4.0.1: version "4.0.3" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" + resolved "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz" integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== dependencies: abbrev "1" @@ -3468,26 +3510,26 @@ nopt@^4.0.1: normalize-path@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== npm-path@^2.0.2: version "2.0.4" - resolved "https://registry.yarnpkg.com/npm-path/-/npm-path-2.0.4.tgz#c641347a5ff9d6a09e4d9bce5580c4f505278e64" + resolved "https://registry.npmjs.org/npm-path/-/npm-path-2.0.4.tgz" integrity sha512-IFsj0R9C7ZdR5cP+ET342q77uSRdtWOlWpih5eC+lu29tIDbNEgDbzgVJ5UFvYHWhxDZ5TFkJafFioO0pPQjCw== dependencies: which "^1.2.10" npm-run-path@^4.0.1: version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz" integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== dependencies: path-key "^3.0.0" npm-which@^3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/npm-which/-/npm-which-3.0.1.tgz#9225f26ec3a285c209cae67c3b11a6b4ab7140aa" + resolved "https://registry.npmjs.org/npm-which/-/npm-which-3.0.1.tgz" integrity sha512-CM8vMpeFQ7MAPin0U3wzDhSGV0hMHNwHU0wjo402IVizPDrs45jSfSuoC+wThevY88LQti8VvaAnqYAeVy3I1A== dependencies: commander "^2.9.0" @@ -3496,7 +3538,7 @@ npm-which@^3.0.1: "npmlog@0 || 1 || 2": version "2.0.4" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-2.0.4.tgz#98b52530f2514ca90d09ec5b22c8846722375692" + resolved "https://registry.npmjs.org/npmlog/-/npmlog-2.0.4.tgz" integrity sha512-DaL6RTb8Qh4tMe2ttPT1qWccETy2Vi5/8p+htMpLBeXJTr2CAqnF5WQtSP2eFpvaNbhLZ5uilDb98mRm4Q+lZQ== dependencies: ansi "~0.3.1" @@ -3505,7 +3547,7 @@ npm-which@^3.0.1: "npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.1, npmlog@^4.1.2: version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + resolved "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz" integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== dependencies: are-we-there-yet "~1.1.2" @@ -3515,7 +3557,7 @@ npm-which@^3.0.1: npmlog@^1.2.0: version "1.2.1" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-1.2.1.tgz#28e7be619609b53f7ad1dd300a10d64d716268b6" + resolved "https://registry.npmjs.org/npmlog/-/npmlog-1.2.1.tgz" integrity sha512-1J5KqSRvESP6XbjPaXt2H6qDzgizLTM7x0y1cXIjP2PpvdCqyNC7TO3cPRKsuYlElbi/DwkzRRdG2zpmE0IktQ== dependencies: ansi "~0.3.0" @@ -3524,12 +3566,12 @@ npmlog@^1.2.0: number-is-nan@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + resolved "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" integrity sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ== nw-gyp@^3.6.3: version "3.6.6" - resolved "https://registry.yarnpkg.com/nw-gyp/-/nw-gyp-3.6.6.tgz#0231d603d09665053ea48843d6888d13a4b92fb1" + resolved "https://registry.npmjs.org/nw-gyp/-/nw-gyp-3.6.6.tgz" integrity sha512-FeMnpFQWtEEMJ1BrSfK3T62CjuxaNl0mNHqdrxFcIF5XQdC3gaZYW4n+77lQLk8PE3Upfknkl9VRo6gDKJIHuA== dependencies: fstream "^1.0.0" @@ -3548,31 +3590,31 @@ nw-gyp@^3.6.3: oauth-sign@~0.9.0: version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + resolved "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== object-assign@^4.1.0: version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" -onetime@^5.1.2: +onetime@^5.1.0, onetime@^5.1.2: version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + resolved "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz" integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== dependencies: mimic-fn "^2.1.0" optionator@^0.9.3: version "0.9.3" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" + resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz" integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== dependencies: "@aashutoshrathi/word-wrap" "^1.2.3" @@ -3582,26 +3624,41 @@ optionator@^0.9.3: prelude-ls "^1.2.1" type-check "^0.4.0" +ora@^5.4.1: + version "5.4.1" + resolved "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz" + integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== + dependencies: + bl "^4.1.0" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-spinners "^2.5.0" + is-interactive "^1.0.0" + is-unicode-supported "^0.1.0" + log-symbols "^4.1.0" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + os-homedir@^1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + resolved "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz" integrity sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ== os-locale@^1.4.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + resolved "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz" integrity sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g== dependencies: lcid "^1.0.0" -os-tmpdir@^1.0.0: +os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + resolved "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== osenv@0, osenv@^0.1.4: version "0.1.5" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + resolved "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz" integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== dependencies: os-homedir "^1.0.0" @@ -3609,47 +3666,47 @@ osenv@0, osenv@^0.1.4: p-limit@^2.2.0: version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== dependencies: p-try "^2.0.0" p-limit@^3.0.2, p-limit@^3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== dependencies: yocto-queue "^0.1.0" p-locate@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz" integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== dependencies: p-limit "^2.2.0" p-locate@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== dependencies: p-limit "^3.0.2" p-try@^2.0.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== parent-module@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== dependencies: callsites "^3.0.0" parse-json@^5.2.0: version "5.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz" integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== dependencies: "@babel/code-frame" "^7.0.0" @@ -3659,66 +3716,66 @@ parse-json@^5.2.0: path-array@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/path-array/-/path-array-1.0.1.tgz#7e2f0f35f07a2015122b868b7eac0eb2c4fec271" + resolved "https://registry.npmjs.org/path-array/-/path-array-1.0.1.tgz" integrity sha512-teWG2rJTJJZi2kINKOsHcdIuHP7jy3D7pAsVgdhxMq8kaL2RnS5sg7YTlrClMVCIItcVbPTPI6eMBEoNxYahLA== dependencies: array-index "^1.0.0" path-exists@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== path-is-absolute@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== path-key@^3.0.0, path-key@^3.1.0: version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== path-parse@^1.0.7: version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== path-type@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== performance-now@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + resolved "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz" integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== picocolors@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== pirates@^4.0.4: version "4.0.6" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" + resolved "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz" integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== pkg-dir@^4.2.0: version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== dependencies: find-up "^4.0.0" prebuild-install@^7.1.1: version "7.1.1" - resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.1.1.tgz#de97d5b34a70a0c81334fd24641f2a1702352e45" + resolved "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz" integrity sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw== dependencies: detect-libc "^2.0.0" @@ -3736,7 +3793,7 @@ prebuild-install@^7.1.1: prebuild@^11.0.4: version "11.0.4" - resolved "https://registry.yarnpkg.com/prebuild/-/prebuild-11.0.4.tgz#5e4a0659e2b98219ad58808b356c7938b0f9e326" + resolved "https://registry.npmjs.org/prebuild/-/prebuild-11.0.4.tgz" integrity sha512-n23Rzql2m8ldFpwcFyouGUrg9VByEF2IroEZlNvPLiQwTJWucTNxIaZEoyVe2AxPRzQb6Eph2ytObxVWm4FA7Q== dependencies: cmake-js "~5.2.0" @@ -3762,36 +3819,36 @@ prebuild@^11.0.4: prelude-ls@^1.2.1: version "1.2.1" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== prettier@^2.8.3: version "2.8.8" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" + resolved "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz" integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== -pretty-format@^29.0.0, pretty-format@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" - integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== +pretty-format@^29.0.0, pretty-format@^29.6.2: + version "29.6.2" + resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-29.6.2.tgz" + integrity sha512-1q0oC8eRveTg5nnBEWMXAU2qpv65Gnuf2eCQzSjxpWFkPaPARwqZZDGuNE0zPAZfTCHzIk3A8dIjwlQKKLphyg== dependencies: - "@jest/schemas" "^29.6.3" + "@jest/schemas" "^29.6.0" ansi-styles "^5.0.0" react-is "^18.0.0" process-nextick-args@~1.0.6: version "1.0.7" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" integrity sha512-yN0WQmuCX63LP/TMvAg31nvT6m4vDqJEiiv2CAZqWOGNWutc9DfDk1NPYYmKUFmaVM2UwDowH4u5AHWYP/jxKw== process-nextick-args@~2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== prompts@^2.0.1: version "2.4.2" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" + resolved "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz" integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== dependencies: kleur "^3.0.3" @@ -3804,7 +3861,7 @@ psl@^1.1.33: pump@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + resolved "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz" integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== dependencies: end-of-stream "^1.1.0" @@ -3812,17 +3869,17 @@ pump@^3.0.0: punycode@^2.1.0, punycode@^2.1.1: version "2.3.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" + resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz" integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== pure-rand@^6.0.0: - version "6.0.4" - resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.0.4.tgz#50b737f6a925468679bff00ad20eade53f37d5c7" - integrity sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA== + version "6.0.2" + resolved "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.2.tgz" + integrity sha512-6Yg0ekpKICSjPswYOuC5sku/TSWaRYlA0qsXqJgM/d/4pLPHPuTxK7Nbf7jFKzAeedUhR8C7K9Uv63FBsSo8xQ== qs@~6.5.2: version "6.5.3" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" + resolved "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz" integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== querystringify@^2.1.1: @@ -3832,19 +3889,19 @@ querystringify@^2.1.1: queue-microtask@^1.2.2: version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== randombytes@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== dependencies: safe-buffer "^5.1.0" rc@^1.0.3, rc@^1.2.7: version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + resolved "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz" integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== dependencies: deep-extend "^0.6.0" @@ -3854,12 +3911,12 @@ rc@^1.0.3, rc@^1.2.7: react-is@^18.0.0: version "18.2.0" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" + resolved "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== "readable-stream@>=1.0.33-1 <1.1.0-0", readable-stream@~1.0.26-2: version "1.0.34" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" integrity sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg== dependencies: core-util-is "~1.0.0" @@ -3867,9 +3924,9 @@ react-is@^18.0.0: isarray "0.0.1" string_decoder "~0.10.x" -"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.2, readable-stream@^2.0.6: +"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.6: version "2.3.8" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz" integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== dependencies: core-util-is "~1.0.0" @@ -3880,9 +3937,22 @@ react-is@^18.0.0: string_decoder "~1.1.1" util-deprecate "~1.0.1" +readable-stream@^2.0.2, readable-stream@~2.1.5: + version "2.1.5" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz" + integrity sha512-NkXT2AER7VKXeXtJNSaWLpWIhmtSE3K2PguaLEeWr4JILghcIKqoLt1A3wHrnpDC5+ekf8gfk1GKWkFXe4odMw== + dependencies: + buffer-shims "^1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + readable-stream@^3.0.1, readable-stream@^3.1.1, readable-stream@^3.4.0: version "3.6.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz" integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== dependencies: inherits "^2.0.3" @@ -3891,7 +3961,7 @@ readable-stream@^3.0.1, readable-stream@^3.1.1, readable-stream@^3.4.0: readable-stream@~1.1.9: version "1.1.14" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz" integrity sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ== dependencies: core-util-is "~1.0.0" @@ -3899,34 +3969,21 @@ readable-stream@~1.1.9: isarray "0.0.1" string_decoder "~0.10.x" -readable-stream@~2.1.5: - version "2.1.5" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" - integrity sha512-NkXT2AER7VKXeXtJNSaWLpWIhmtSE3K2PguaLEeWr4JILghcIKqoLt1A3wHrnpDC5+ekf8gfk1GKWkFXe4odMw== - dependencies: - buffer-shims "^1.0.0" - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - string_decoder "~0.10.x" - util-deprecate "~1.0.1" - rechoir@^0.8.0: version "0.8.0" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22" + resolved "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz" integrity sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ== dependencies: resolve "^1.20.0" reflect-metadata@^0.1.13: version "0.1.13" - resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.13.tgz#67ae3ca57c972a2aa1642b10fe363fe32d49dc08" + resolved "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz" integrity sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg== request@2, request@^2.54.0, request@^2.88.0: version "2.88.2" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + resolved "https://registry.npmjs.org/request/-/request-2.88.2.tgz" integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== dependencies: aws-sign2 "~0.7.0" @@ -3952,7 +4009,7 @@ request@2, request@^2.54.0, request@^2.88.0: require-directory@^2.1.1: version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== requires-port@^1.0.0: @@ -3962,96 +4019,116 @@ requires-port@^1.0.0: resolve-cwd@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + resolved "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz" integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== dependencies: resolve-from "^5.0.0" resolve-from@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== resolve-from@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== resolve.exports@^2.0.0: version "2.0.2" - resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" + resolved "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz" integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== resolve@^1.20.0: - version "1.22.8" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" - integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== + version "1.22.4" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz" + integrity sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg== dependencies: is-core-module "^2.13.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + reusify@^1.0.4: version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== rimraf@2, rimraf@^2.6.3: version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + resolved "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== dependencies: glob "^7.1.3" rimraf@^3.0.2: version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== dependencies: glob "^7.1.3" rsvp@^3.0.13: version "3.6.2" - resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a" + resolved "https://registry.npmjs.org/rsvp/-/rsvp-3.6.2.tgz" integrity sha512-OfWGQTb9vnwRjwtA2QwpG2ICclHC3pgXZO5xt8H2EfgDquO0qVdSb5T88L4qJVAEugbS56pAuV4XZM58UX8ulw== +run-async@^2.4.0: + version "2.4.1" + resolved "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz" + integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== + run-parallel@^1.1.9: version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== dependencies: queue-microtask "^1.2.2" run-waterfall@^1.1.6: version "1.1.7" - resolved "https://registry.yarnpkg.com/run-waterfall/-/run-waterfall-1.1.7.tgz#ae368b549b2f5171f86c2924492cab3352a6e9c5" + resolved "https://registry.npmjs.org/run-waterfall/-/run-waterfall-1.1.7.tgz" integrity sha512-iFPgh7SatHXOG1ClcpdwHI63geV3Hc/iL6crGSyBlH2PY7Rm/za+zoKz6FfY/Qlw5K7JwSol8pseO8fN6CMhhQ== +rxjs@^7.5.5: + version "7.8.1" + resolved "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz" + integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== + dependencies: + tslib "^2.1.0" + safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.2, safe-buffer@^5.2.1, safe-buffer@~5.2.0: version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== schema-utils@^3.1.1, schema-utils@^3.2.0: version "3.3.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe" + resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz" integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== dependencies: "@types/json-schema" "^7.0.8" ajv "^6.12.5" ajv-keywords "^3.5.2" -"semver@2.x || 3.x || 4 || 5", semver@^4.3.3, semver@^5.0.3, semver@^5.7.1, semver@^6.3.0, semver@^6.3.1, semver@^7.3.5, semver@^7.3.7, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4, semver@~5.3.0: +"semver@2.x || 3.x || 4 || 5", semver@^4.3.3, semver@^5.0.3, semver@^5.7.1, semver@^6.3.0, semver@^6.3.1, semver@^7.3.5, semver@^7.3.7, semver@^7.5.2, semver@^7.5.3, semver@~5.3.0: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -4060,58 +4137,58 @@ schema-utils@^3.1.1, schema-utils@^3.2.0: serialize-javascript@^6.0.1: version "6.0.1" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.1.tgz#b206efb27c3da0b0ab6b52f48d170b7996458e5c" + resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz" integrity sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w== dependencies: randombytes "^2.1.0" set-blocking@~2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== setimmediate@~1.0.4: version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + resolved "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz" integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== shallow-clone@^3.0.0: version "3.0.1" - resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" + resolved "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz" integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== dependencies: kind-of "^6.0.2" shebang-command@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== dependencies: shebang-regex "^3.0.0" shebang-regex@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== shiki@^0.14.1: - version "0.14.5" - resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.5.tgz#375dd214e57eccb04f0daf35a32aa615861deb93" - integrity sha512-1gCAYOcmCFONmErGTrS1fjzJLA7MGZmKzrBNX7apqSwhyITJg2O102uFzXUeBxNnEkDA9vHIKLyeKq0V083vIw== + version "0.14.3" + resolved "https://registry.npmjs.org/shiki/-/shiki-0.14.3.tgz" + integrity sha512-U3S/a+b0KS+UkTyMjoNojvTgrBHjgp7L6ovhFVZsXmBGnVdQ4K4U9oK0z63w538S91ATngv1vXigHCSWOwnr+g== dependencies: ansi-sequence-parser "^1.1.0" jsonc-parser "^3.2.0" vscode-oniguruma "^1.7.0" vscode-textmate "^8.0.0" -signal-exit@^3.0.0, signal-exit@^3.0.3, signal-exit@^3.0.7: +signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== simple-concat@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" + resolved "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz" integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== simple-get@^2.8.2, simple-get@^4.0.0: @@ -4125,22 +4202,22 @@ simple-get@^2.8.2, simple-get@^4.0.0: simple-mime@~0.1.0: version "0.1.0" - resolved "https://registry.yarnpkg.com/simple-mime/-/simple-mime-0.1.0.tgz#95f517c4f466d7cff561a71fc9dab2596ea9ef2e" + resolved "https://registry.npmjs.org/simple-mime/-/simple-mime-0.1.0.tgz" integrity sha512-2EoTElzj77w0hV4lW6nWdA+MR+81hviMBhEc/ppUi0+Q311EFCvwKrGS7dcxqvGRKnUdbAyqPJtBQbRYgmtmvQ== sisteransi@^1.0.5: version "1.0.5" - resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" + resolved "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz" integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== slash@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== source-map-support@0.5.13: version "0.5.13" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" + resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz" integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== dependencies: buffer-from "^1.0.0" @@ -4148,14 +4225,14 @@ source-map-support@0.5.13: source-map-support@~0.2.8: version "0.2.10" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.2.10.tgz#ea5a3900a1c1cb25096a0ae8cc5c2b4b10ded3dc" + resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.2.10.tgz" integrity sha512-gGKOSat73z0V8wBKo9AGxZZyekczBireh1hHktbt+kb9acsCB5OfVCF2DCWlztcQ3r5oNN7f2BL0B2xOcoJ/DQ== dependencies: source-map "0.1.32" source-map-support@~0.5.20: version "0.5.21" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== dependencies: buffer-from "^1.0.0" @@ -4163,29 +4240,29 @@ source-map-support@~0.5.20: source-map@0.1.32: version "0.1.32" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.32.tgz#c8b6c167797ba4740a8ea33252162ff08591b266" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.1.32.tgz" integrity sha512-htQyLrrRLkQ87Zfrir4/yN+vAUd6DNjVayEjTSHXu29AYQJw57I4/xEL/M6p6E/woPNJwvZt6rVlzc7gFEJccQ== dependencies: amdefine ">=0.0.4" source-map@^0.6.0, source-map@^0.6.1: version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== splitargs@0: version "0.0.7" - resolved "https://registry.yarnpkg.com/splitargs/-/splitargs-0.0.7.tgz#fe9f7ae657371b33b10cb80da143cf8249cf6b3b" + resolved "https://registry.npmjs.org/splitargs/-/splitargs-0.0.7.tgz" integrity sha512-UUFYD2oWbNwULH6WoVtLUOw8ch586B+HUqcsAjjjeoBQAM1bD4wZRXu01koaxyd8UeYpybWqW4h+lO1Okv40Tg== sprintf-js@~1.0.2: version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== sshpk@^1.7.0: version "1.18.0" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.18.0.tgz#1663e55cddf4d688b86a46b77f0d5fe363aba028" + resolved "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz" integrity sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ== dependencies: asn1 "~0.2.3" @@ -4200,31 +4277,31 @@ sshpk@^1.7.0: stack-utils@^2.0.3: version "2.0.6" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" + resolved "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz" integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== dependencies: escape-string-regexp "^2.0.0" string-length@^4.0.1: version "4.0.2" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" + resolved "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz" integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== dependencies: char-regex "^1.0.2" strip-ansi "^6.0.0" -string-width@^1.0.1: +string-width@^1.0.1, "string-width@^1.0.2 || 2 || 3 || 4": version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + resolved "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz" integrity sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw== dependencies: code-point-at "^1.0.0" is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== dependencies: emoji-regex "^8.0.0" @@ -4233,91 +4310,91 @@ string-width@^1.0.1: string_decoder@^1.1.1: version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== dependencies: safe-buffer "~5.2.0" string_decoder@~0.10.x: version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" integrity sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ== string_decoder@~1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== dependencies: safe-buffer "~5.1.0" strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" integrity sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg== dependencies: ansi-regex "^2.0.0" strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: ansi-regex "^5.0.1" strip-bom@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" + resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz" integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== strip-final-newline@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== strip-json-comments@^3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== strip-json-comments@~2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz" integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== supports-color@^5.3.0: version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== dependencies: has-flag "^3.0.0" supports-color@^7.1.0: version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" supports-color@^8.0.0: version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== dependencies: has-flag "^4.0.0" supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== tapable@^2.1.1, tapable@^2.2.0: version "2.2.1" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + resolved "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz" integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== tar-fs@^2.0.0: version "2.1.1" - resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" + resolved "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz" integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== dependencies: chownr "^1.1.1" @@ -4327,7 +4404,7 @@ tar-fs@^2.0.0: tar-stream@^2.1.0, tar-stream@^2.1.4: version "2.2.0" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" + resolved "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz" integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== dependencies: bl "^4.0.3" @@ -4338,7 +4415,7 @@ tar-stream@^2.1.0, tar-stream@^2.1.4: tar@^2.0.0, tar@^4, tar@^4.4.12, tar@^4.4.19: version "4.4.19" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" + resolved "https://registry.npmjs.org/tar/-/tar-4.4.19.tgz" integrity sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA== dependencies: chownr "^1.1.4" @@ -4351,7 +4428,7 @@ tar@^2.0.0, tar@^4, tar@^4.4.12, tar@^4.4.19: terser-webpack-plugin@^5.3.7: version "5.3.9" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz#832536999c51b46d468067f9e37662a3b96adfe1" + resolved "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz" integrity sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA== dependencies: "@jridgewell/trace-mapping" "^0.3.17" @@ -4361,9 +4438,9 @@ terser-webpack-plugin@^5.3.7: terser "^5.16.8" terser@^5.16.8: - version "5.22.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.22.0.tgz#4f18103f84c5c9437aafb7a14918273310a8a49d" - integrity sha512-hHZVLgRA2z4NWcN6aS5rQDc+7Dcy58HOf2zbYwmFcQ+ua3h6eEFf5lIDKTzbWwlazPyOZsFQO8V80/IjVNExEw== + version "5.20.0" + resolved "https://registry.npmjs.org/terser/-/terser-5.20.0.tgz" + integrity sha512-e56ETryaQDyebBwJIWYB2TT6f2EZ0fL0sW/JRXNMN26zZdKi2u/E/5my5lG6jNxym6qsrVXfFRmOdV42zlAgLQ== dependencies: "@jridgewell/source-map" "^0.3.3" acorn "^8.8.2" @@ -4372,7 +4449,7 @@ terser@^5.16.8: test-exclude@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" + resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz" integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== dependencies: "@istanbuljs/schema" "^0.1.2" @@ -4381,30 +4458,42 @@ test-exclude@^6.0.0: text-table@^0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== through2@~0.6.3: version "0.6.5" - resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" + resolved "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" integrity sha512-RkK/CCESdTKQZHdmKICijdKKsCRVHs5KsLZ6pACAmF/1GPUQhonHSXWNERctxEp7RmvjdNbZTL5z9V7nSCXKcg== dependencies: readable-stream ">=1.0.33-1 <1.1.0-0" xtend ">=4.0.0 <4.1.0-0" +through@^2.3.6: + version "2.3.8" + resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz" + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + tmpl@1.0.5: version "1.0.5" - resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" + resolved "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz" integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== to-fast-properties@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz" integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== to-regex-range@^5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== dependencies: is-number "^7.0.0" @@ -4421,7 +4510,7 @@ tough-cookie@^4.1.3, tough-cookie@~2.5.0: traceur@0.0.x: version "0.0.111" - resolved "https://registry.yarnpkg.com/traceur/-/traceur-0.0.111.tgz#c04de74d14696c3373427de4fc08ecaf913fc3a1" + resolved "https://registry.npmjs.org/traceur/-/traceur-0.0.111.tgz" integrity sha512-Zy0NCrl3+k1VZvDrZGQJHjLM4Hwz7XHSedhVTdsbV3RNWVtgw/GUP44Rl5WqqcctLkzyQ60eTU2jxfLrlrjWZQ== dependencies: commander "2.9.x" @@ -4432,12 +4521,12 @@ traceur@0.0.x: "traverse@>=0.3.0 <0.4": version "0.3.9" - resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.3.9.tgz#717b8f220cc0bb7b44e40514c22b2e8bbc70d8b9" + resolved "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz" integrity sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ== ts-jest@^29.0.5: version "29.1.1" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.1.tgz#f58fe62c63caf7bfcc5cc6472082f79180f0815b" + resolved "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.1.tgz" integrity sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA== dependencies: bs-logger "0.x" @@ -4451,70 +4540,75 @@ ts-jest@^29.0.5: tslib@^1.8.1: version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== +tslib@^2.1.0: + version "2.6.2" + resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== + tsutils@^3.21.0: version "3.21.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + resolved "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz" integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== dependencies: tslib "^1.8.1" tunnel-agent@^0.6.0: version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + resolved "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz" integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== dependencies: safe-buffer "^5.0.1" tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz" integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== dependencies: prelude-ls "^1.2.1" type-detect@4.0.8: version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== type-fest@^0.20.2: version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== type-fest@^0.21.3: version "0.21.3" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== type@^1.0.1: version "1.2.0" - resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" + resolved "https://registry.npmjs.org/type/-/type-1.2.0.tgz" integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== type@^2.7.2: version "2.7.2" - resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" + resolved "https://registry.npmjs.org/type/-/type-2.7.2.tgz" integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== typedoc-plugin-markdown@^3.14.0: - version "3.16.0" - resolved "https://registry.yarnpkg.com/typedoc-plugin-markdown/-/typedoc-plugin-markdown-3.16.0.tgz#98da250271aafade8b6740a8116a97cd3941abcd" - integrity sha512-eeiC78fDNGFwemPIHiwRC+mEC7W5jwt3fceUev2gJ2nFnXpVHo8eRrpC9BLWZDee6ehnz/sPmNjizbXwpfaTBw== + version "3.15.4" + resolved "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-3.15.4.tgz" + integrity sha512-KpjFL/NDrQAbY147oIoOgob2vAdEchsMcTVd6+e6H2lC1l5xhi48bhP/fMJI7qYQ8th5nubervgqw51z7gY66A== dependencies: handlebars "^4.7.7" typedoc@^0.24.6: version "0.24.8" - resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.24.8.tgz#cce9f47ba6a8d52389f5e583716a2b3b4335b63e" + resolved "https://registry.npmjs.org/typedoc/-/typedoc-0.24.8.tgz" integrity sha512-ahJ6Cpcvxwaxfu4KtjA8qZNqS43wYt6JL27wYiIgl1vd38WW/KWX11YuAeZhuz9v+ttrutSsgK+XO1CjL1kA3w== dependencies: lunr "^2.3.9" @@ -4524,22 +4618,17 @@ typedoc@^0.24.6: typescript@^4.9.4: version "4.9.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== uglify-js@^3.1.4: version "3.17.4" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" + resolved "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz" integrity sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g== -undici-types@~5.26.4: - version "5.26.5" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" - integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== - universalify@^0.1.0: version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + resolved "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== universalify@^0.2.0: @@ -4549,7 +4638,7 @@ universalify@^0.2.0: unzipper@^0.8.13: version "0.8.14" - resolved "https://registry.yarnpkg.com/unzipper/-/unzipper-0.8.14.tgz#ade0524cd2fc14d11b8de258be22f9d247d3f79b" + resolved "https://registry.npmjs.org/unzipper/-/unzipper-0.8.14.tgz" integrity sha512-8rFtE7EP5ssOwGpN2dt1Q4njl0N1hUXJ7sSPz0leU2hRdq6+pra57z4YPBlVqm40vcgv6ooKZEAx48fMTv9x4w== dependencies: big-integer "^1.6.17" @@ -4562,24 +4651,24 @@ unzipper@^0.8.13: readable-stream "~2.1.5" setimmediate "~1.0.4" -update-browserslist-db@^1.0.13: - version "1.0.13" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" - integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== +update-browserslist-db@^1.0.11: + version "1.0.11" + resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz" + integrity sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA== dependencies: escalade "^3.1.1" picocolors "^1.0.0" uri-js@^4.2.2: version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: punycode "^2.1.0" url-join@0: version "0.0.1" - resolved "https://registry.yarnpkg.com/url-join/-/url-join-0.0.1.tgz#1db48ad422d3402469a87f7d97bdebfe4fb1e3c8" + resolved "https://registry.npmjs.org/url-join/-/url-join-0.0.1.tgz" integrity sha512-H6dnQ/yPAAVzMQRvEvyz01hhfQL5qRWSEt7BX8t9DqnPw9BjMb64fjIRq76Uvf1hkHp+mTZvEVJ5guXOT0Xqaw== url-parse@^1.5.3: @@ -4592,36 +4681,36 @@ url-parse@^1.5.3: url-template@~2.0.6: version "2.0.8" - resolved "https://registry.yarnpkg.com/url-template/-/url-template-2.0.8.tgz#fc565a3cccbff7730c775f5641f9555791439f21" + resolved "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz" integrity sha512-XdVKMF4SJ0nP/O7XIPB0JwAEuT9lDIYnNsK8yGVe43y0AWoKeJNdv3ZNWh7ksJ6KqQFjOO6ox/VEitLnaVNufw== util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== util-extend@^1.0.1: version "1.0.3" - resolved "https://registry.yarnpkg.com/util-extend/-/util-extend-1.0.3.tgz#a7c216d267545169637b3b6edc6ca9119e2ff93f" + resolved "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz" integrity sha512-mLs5zAK+ctllYBj+iAQvlDCwoxU/WDOUaJkcFudeiAX6OajC6BKXJUa9a+tbtkC11dz2Ufb7h0lyvIOVn4LADA== uuid@^3.3.2: version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + resolved "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== v8-to-istanbul@^9.0.1: - version "9.1.3" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.1.3.tgz#ea456604101cd18005ac2cae3cdd1aa058a6306b" - integrity sha512-9lDD+EVI2fjFsMWXc6dy5JJzBsVTcQ2fVkfBvncZ6xJWG9wtBhOldG+mHkSL0+V1K/xgZz0JDO5UT5hFwHUghg== + version "9.1.0" + resolved "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz" + integrity sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA== dependencies: "@jridgewell/trace-mapping" "^0.3.12" "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^2.0.0" + convert-source-map "^1.6.0" verror@1.10.0: version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + resolved "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz" integrity sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw== dependencies: assert-plus "^1.0.0" @@ -4630,32 +4719,39 @@ verror@1.10.0: vscode-oniguruma@^1.7.0: version "1.7.0" - resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b" + resolved "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz" integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA== vscode-textmate@^8.0.0: version "8.0.0" - resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d" + resolved "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz" integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== walker@^1.0.8: version "1.0.8" - resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" + resolved "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz" integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== dependencies: makeerror "1.0.12" watchpack@^2.4.0: version "2.4.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" + resolved "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz" integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== dependencies: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" +wcwidth@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz" + integrity sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg== + dependencies: + defaults "^1.0.3" + webpack-cli@^5.1.4: version "5.1.4" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-5.1.4.tgz#c8e046ba7eaae4911d7e71e2b25b776fcc35759b" + resolved "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz" integrity sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg== dependencies: "@discoveryjs/json-ext" "^0.5.0" @@ -4673,23 +4769,22 @@ webpack-cli@^5.1.4: webpack-merge "^5.7.3" webpack-merge@^5.7.3: - version "5.10.0" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.10.0.tgz#a3ad5d773241e9c682803abf628d4cd62b8a4177" - integrity sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA== + version "5.9.0" + resolved "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.9.0.tgz" + integrity sha512-6NbRQw4+Sy50vYNTw7EyOn41OZItPiXB8GNv3INSoe3PSFaHJEz3SHTrYVaRm2LilNGnFUzh0FAwqPEmU/CwDg== dependencies: clone-deep "^4.0.1" - flat "^5.0.2" wildcard "^2.0.0" webpack-sources@^3.2.3: version "3.2.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" + resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== webpack@^5.88.2: - version "5.89.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.89.0.tgz#56b8bf9a34356e93a6625770006490bf3a7f32dc" - integrity sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw== + version "5.88.2" + resolved "https://registry.npmjs.org/webpack/-/webpack-5.88.2.tgz" + integrity sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ== dependencies: "@types/eslint-scope" "^3.7.3" "@types/estree" "^1.0.0" @@ -4718,33 +4813,33 @@ webpack@^5.88.2: which@1, which@^1.0.9, which@^1.2.10, which@^1.3.1: version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + resolved "https://registry.npmjs.org/which/-/which-1.3.1.tgz" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" which@^2.0.1: version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== dependencies: isexe "^2.0.0" wide-align@^1.1.0: version "1.1.5" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" + resolved "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz" integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== dependencies: string-width "^1.0.2 || 2 || 3 || 4" wildcard@^2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" + resolved "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz" integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== window-size@^0.1.4: version "0.1.4" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.4.tgz#f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876" + resolved "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz" integrity sha512-2thx4pB0cV3h+Bw7QmMXcEbdmOzv9t0HFplJH/Lz6yu60hXYy5RT8rUu+wlIreVxWsGN20mo+MHeCSfUpQBwPw== word-wrap@^1.2.4: @@ -4754,20 +4849,29 @@ word-wrap@^1.2.4: wordwrap@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== wrap-ansi@^2.0.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz" integrity sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw== dependencies: string-width "^1.0.1" strip-ansi "^3.0.1" +wrap-ansi@^6.0.1: + version "6.2.0" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== dependencies: ansi-styles "^4.0.0" @@ -4776,12 +4880,12 @@ wrap-ansi@^7.0.0: wrappy@1: version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== write-file-atomic@^4.0.2: version "4.0.2" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" + resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz" integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== dependencies: imurmurhash "^0.1.4" @@ -4789,37 +4893,37 @@ write-file-atomic@^4.0.2: "xtend@>=4.0.0 <4.1.0-0", xtend@~4.0.1: version "4.0.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== y18n@^3.2.0: version "3.2.2" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" + resolved "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz" integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== y18n@^5.0.5: version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== yallist@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== yargs-parser@^21.0.1, yargs-parser@^21.1.1: version "21.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== yargs@^17.3.1: version "17.7.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + resolved "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== dependencies: cliui "^8.0.1" @@ -4832,7 +4936,7 @@ yargs@^17.3.1: yargs@^3.6.0: version "3.32.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.32.0.tgz#03088e9ebf9e756b69751611d2a5ef591482c995" + resolved "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz" integrity sha512-ONJZiimStfZzhKamYvR/xvmgW3uEkAUFSP91y2caTEPhzF6uP2JfPiVZcq66b/YR0C3uitxSV7+T1x8p5bkmMg== dependencies: camelcase "^2.0.1" @@ -4845,5 +4949,5 @@ yargs@^3.6.0: yocto-queue@^0.1.0: version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/bindings/python/examples/how_tos/nft_collection/00_mint_issuer_nft.py b/bindings/python/examples/how_tos/nft_collection/00_mint_issuer_nft.py index 3d47fada8f..36e2897b9e 100644 --- a/bindings/python/examples/how_tos/nft_collection/00_mint_issuer_nft.py +++ b/bindings/python/examples/how_tos/nft_collection/00_mint_issuer_nft.py @@ -28,21 +28,21 @@ ) -transaction = account.mint_nfts([params]) +tx = account.mint_nfts([params]) # Wait for transaction to get included block_id = account.reissue_transaction_until_included( - transaction.transaction_id) + tx.transaction_id) print( f'Block sent: {os.environ["EXPLORER_URL"]}/block/{block_id}') -essence = transaction.payload["essence"] +transaction = tx.payload.transaction -for outputIndex, output in enumerate(essence["outputs"]): +for outputIndex, output in enumerate(transaction.outputs): # New minted NFT id is empty in the output if output["type"] == 6 and output["nftId"] == '0x0000000000000000000000000000000000000000000000000000000000000000': outputId = Utils.compute_output_id( - transaction.transaction_id, outputIndex) + tx.transaction_id, outputIndex) nftId = Utils.compute_nft_id(outputId) print(f'New minted NFT id: {nftId}') diff --git a/bindings/python/examples/wallet/offline_signing/2_sign_transaction.py b/bindings/python/examples/wallet/offline_signing/2_sign_transaction.py index 12c74dfe07..6bbfb52dc6 100644 --- a/bindings/python/examples/wallet/offline_signing/2_sign_transaction.py +++ b/bindings/python/examples/wallet/offline_signing/2_sign_transaction.py @@ -34,7 +34,7 @@ wallet.set_stronghold_password(os.environ["STRONGHOLD_PASSWORD"]) # Signs prepared transaction offline. -signed_transaction_data = account.sign_transaction_essence( +signed_transaction_data = account.sign_transaction( prepared_transaction_data) print("Signed transaction.") diff --git a/bindings/python/iota_sdk/__init__.py b/bindings/python/iota_sdk/__init__.py index 7b244a3be0..a08515c175 100644 --- a/bindings/python/iota_sdk/__init__.py +++ b/bindings/python/iota_sdk/__init__.py @@ -41,6 +41,7 @@ from .types.send_params import * from .types.token_scheme import * from .types.transaction import * +from .types.transaction_with_metadata import * from .types.transaction_data import * from .types.transaction_options import * from .types.unlock import * diff --git a/bindings/python/iota_sdk/client/client.py b/bindings/python/iota_sdk/client/client.py index 79736ad1f8..fbcd621509 100644 --- a/bindings/python/iota_sdk/client/client.py +++ b/bindings/python/iota_sdk/client/client.py @@ -5,24 +5,21 @@ from datetime import timedelta from typing import Any, Dict, List, Optional, Union import humps -from dacite import from_dict from iota_sdk.external import create_client, call_client_method, listen_mqtt from iota_sdk.client._node_core_api import NodeCoreAPI from iota_sdk.client._node_indexer_api import NodeIndexerAPI from iota_sdk.client._high_level_api import HighLevelAPI from iota_sdk.client._utils import ClientUtils -from iota_sdk.secret_manager.secret_manager import LedgerNanoSecretManager, MnemonicSecretManager, StrongholdSecretManager, SeedSecretManager from iota_sdk.types.block.signed_block import UnsignedBlock from iota_sdk.types.common import HexStr, Node from iota_sdk.types.feature import Feature from iota_sdk.types.native_token import NativeToken from iota_sdk.types.network_info import NetworkInfo from iota_sdk.types.output import AccountOutput, BasicOutput, FoundryOutput, NftOutput, deserialize_output -from iota_sdk.types.payload import Payload, TransactionPayload +from iota_sdk.types.payload import Payload from iota_sdk.types.token_scheme import SimpleTokenScheme from iota_sdk.types.unlock_condition import UnlockCondition -from iota_sdk.types.transaction_data import PreparedTransactionData class ClientError(Exception): @@ -373,21 +370,6 @@ def unhealthy_nodes(self) -> List[Dict[str, Any]]: """ return self._call_method('unhealthyNodes') - def sign_transaction( - self, - secret_manager: Union[LedgerNanoSecretManager, MnemonicSecretManager, SeedSecretManager, StrongholdSecretManager], - prepared_transaction_data: PreparedTransactionData) -> TransactionPayload: - """Sign a transaction. - - Args: - secret_manager: One of the supported secret managers. - prepared_transaction_data: a prepared transaction to sign. - """ - return from_dict(TransactionPayload, self._call_method('signTransaction', { - 'secretManager': secret_manager, - 'preparedTransactionData': prepared_transaction_data - })) - def build_basic_block( self, issuer_id: HexStr, diff --git a/bindings/python/iota_sdk/secret_manager/secret_manager.py b/bindings/python/iota_sdk/secret_manager/secret_manager.py index 97c9fec4cc..1aa65e9886 100644 --- a/bindings/python/iota_sdk/secret_manager/secret_manager.py +++ b/bindings/python/iota_sdk/secret_manager/secret_manager.py @@ -11,7 +11,7 @@ from iota_sdk.types.common import HexStr from iota_sdk.types.signature import Ed25519Signature, Bip44 from iota_sdk.types.transaction_data import PreparedTransactionData -from iota_sdk.types.payload import TransactionPayload +from iota_sdk.types.payload import SignedTransactionPayload class LedgerNanoSecretManager(dict): @@ -268,13 +268,13 @@ def sign_secp256k1_ecdsa(self, message: HexStr, chain: Bip44): }) def sign_transaction( - self, prepared_transaction_data: PreparedTransactionData) -> TransactionPayload: + self, prepared_transaction_data: PreparedTransactionData) -> SignedTransactionPayload: """Sign a transaction. Args: prepare_transaction_data: The prepared transaction data that needs to be signed. """ - return from_dict(TransactionPayload, self._call_method('signTransaction', { + return from_dict(SignedTransactionPayload, self._call_method('signTransaction', { 'preparedTransactionData': prepared_transaction_data.to_dict() })) diff --git a/bindings/python/iota_sdk/types/address.py b/bindings/python/iota_sdk/types/address.py index 4a12c3d75e..36697010b5 100644 --- a/bindings/python/iota_sdk/types/address.py +++ b/bindings/python/iota_sdk/types/address.py @@ -3,7 +3,7 @@ from enum import IntEnum from dataclasses import dataclass, field -from typing import Any, Dict, List, TypeAlias, Union +from typing import Any, Dict, List, Optional, TypeAlias, Union from iota_sdk.types.common import HexStr, json @@ -118,7 +118,7 @@ class RestrictedAddress: allowed_capabilities: The allowed capabilities bitflags. """ address: Union[Ed25519Address, AccountAddress, NFTAddress] - allowed_capabilities: HexStr = field(default='0x', init=False) + allowed_capabilities: Optional[HexStr] = field(default=None, init=False) type: int = field(default_factory=lambda: int( AddressType.RESTRICTED), init=False) @@ -127,7 +127,10 @@ def with_allowed_capabilities(self, capabilities: bytes): Attributes: capabilities: The allowed capabilities bitflags. """ - self.allowed_capabilities = '0x' + capabilities.hex() + if any(c != 0 for c in capabilities): + self.allowed_capabilities = '0x' + capabilities.hex() + else: + self.allowed_capabilities = None @json diff --git a/bindings/python/iota_sdk/types/balance.py b/bindings/python/iota_sdk/types/balance.py index 5144c0897b..791dbb96c3 100644 --- a/bindings/python/iota_sdk/types/balance.py +++ b/bindings/python/iota_sdk/types/balance.py @@ -5,7 +5,7 @@ from typing import List, Optional from dataclasses import dataclass, field from dataclasses_json import config -from iota_sdk.types.common import HexStr, json +from iota_sdk.types.common import hex_str_decoder, HexStr, json @json @@ -62,8 +62,14 @@ class NativeTokensBalance: metadata: Some metadata of the native token. """ token_id: HexStr - total: HexStr - available: HexStr + total: int = field(metadata=config( + encoder=hex, + decoder=hex_str_decoder, + )) + available: int = field(metadata=config( + encoder=hex, + decoder=hex_str_decoder, + )) metadata: Optional[HexStr] diff --git a/bindings/python/iota_sdk/types/block/basic.py b/bindings/python/iota_sdk/types/block/basic.py index 77495d54c8..b7c6661958 100644 --- a/bindings/python/iota_sdk/types/block/basic.py +++ b/bindings/python/iota_sdk/types/block/basic.py @@ -31,5 +31,5 @@ class BasicBlock: )) payload: Optional[Payload] = None type: int = field( - default_factory=lambda: BlockType.Basic, + default_factory=lambda: int(BlockType.Basic), init=False) diff --git a/bindings/python/iota_sdk/types/block/validation.py b/bindings/python/iota_sdk/types/block/validation.py index bd99ea61e1..9f9c070732 100644 --- a/bindings/python/iota_sdk/types/block/validation.py +++ b/bindings/python/iota_sdk/types/block/validation.py @@ -28,5 +28,5 @@ class ValidationBlock: highest_supported_version: int protocol_parameters_hash: HexStr type: int = field( - default_factory=lambda: BlockType.Validation, + default_factory=lambda: int(BlockType.Validation), init=False) diff --git a/bindings/python/iota_sdk/types/common.py b/bindings/python/iota_sdk/types/common.py index 261f62e3f2..3cd9ee4218 100644 --- a/bindings/python/iota_sdk/types/common.py +++ b/bindings/python/iota_sdk/types/common.py @@ -112,6 +112,11 @@ def opt_int_encoder(value): return None +def hex_str_decoder(value: str) -> int: + """Parses a given string as a hexadecimal integer.""" + return int(value, 16) + + @json @dataclass class AddressAndAmount(): diff --git a/bindings/python/iota_sdk/types/essence.py b/bindings/python/iota_sdk/types/essence.py deleted file mode 100644 index 32df2042e6..0000000000 --- a/bindings/python/iota_sdk/types/essence.py +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright 2023 IOTA Stiftung -# SPDX-License-Identifier: Apache-2.0 - -from __future__ import annotations -from enum import IntEnum -from typing import TYPE_CHECKING, Optional, List, TypeAlias - -from dataclasses import dataclass, field - -from iota_sdk.types.common import HexStr, json, SlotIndex -from iota_sdk.types.mana import ManaAllotment -from iota_sdk.types.input import UtxoInput -from iota_sdk.types.context_input import ContextInput -from iota_sdk.types.output import Output - -# Required to prevent circular import -if TYPE_CHECKING: - from iota_sdk.types.payload import Payload - - -class EssenceType(IntEnum): - """Block payload types. - - Attributes: - RegularTransactionEssence (2): A Regular Transaction Essence. - """ - RegularTransactionEssence = 2 - - -@json -@dataclass -class RegularTransactionEssence: - """Describes the essence data making up a transaction by defining its inputs, outputs, and an optional payload. - - Attributes: - network_id: The unique value denoting whether the block was meant for mainnet, shimmer, testnet, or a private network. - It consists of the first 8 bytes of the BLAKE2b-256 hash of the network name. - creation_slot: The slot index in which the transaction was created. - inputs: The inputs to consume in order to fund the outputs of the Transaction Payload. - inputs_commitment: BLAKE2b-256 hash serving as a commitment to the serialized outputs referenced by Inputs. - outputs: The outputs that are created by the Transaction Payload - context_inputs: The inputs that provide additional contextual information for the execution of a transaction. - allotments: The allotments of Mana which which will be added upon commitment of the slot. - capabilities: The capability bitflags of the transaction. - payload: An optional tagged data payload - """ - network_id: str - creation_slot: SlotIndex - inputs: List[UtxoInput] - inputs_commitment: HexStr - outputs: List[Output] - context_inputs: Optional[List[ContextInput]] = None - allotments: Optional[List[ManaAllotment]] = None - capabilities: HexStr = field(default='0x', init=False) - payload: Optional[Payload] = None - type: int = field( - default_factory=lambda: EssenceType.RegularTransactionEssence, - init=False) - - def with_capabilities(self, capabilities: bytes): - """Sets the transaction capabilities from a byte array. - Attributes: - capabilities: The transaction capabilities bitflags. - """ - self.capabilities = '0x' + capabilities.hex() - - -TransactionEssence: TypeAlias = RegularTransactionEssence diff --git a/bindings/python/iota_sdk/types/native_token.py b/bindings/python/iota_sdk/types/native_token.py index 7232f8dacc..c382c31070 100644 --- a/bindings/python/iota_sdk/types/native_token.py +++ b/bindings/python/iota_sdk/types/native_token.py @@ -1,9 +1,10 @@ # Copyright 2023 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 -from dataclasses import dataclass +from dataclasses import dataclass, field +from dataclasses_json import config -from iota_sdk.types.common import HexStr, json +from iota_sdk.types.common import hex_str_decoder, HexStr, json @json @@ -16,4 +17,7 @@ class NativeToken(): amount: The amount of native tokens. """ id: HexStr - amount: HexStr + amount: int = field(metadata=config( + encoder=hex, + decoder=hex_str_decoder, + )) diff --git a/bindings/python/iota_sdk/types/payload.py b/bindings/python/iota_sdk/types/payload.py index 9685c504d1..dd222b435a 100644 --- a/bindings/python/iota_sdk/types/payload.py +++ b/bindings/python/iota_sdk/types/payload.py @@ -6,7 +6,7 @@ from typing import Any, Dict, List, TypeAlias, Union from dataclasses import dataclass, field from iota_sdk.types.common import HexStr, json -from iota_sdk.types.essence import TransactionEssence +from iota_sdk.types.transaction import Transaction from iota_sdk.types.unlock import SignatureUnlock, ReferenceUnlock @@ -15,11 +15,11 @@ class PayloadType(IntEnum): Attributes: TaggedData (0): A tagged data payload. - Transaction (1): A transaction payload. + SignedTransaction (1): A signed transaction payload. CandidacyAnnouncement (2): A candidacy announcement payload. """ TaggedData = 0 - Transaction = 1 + SignedTransaction = 1 CandidacyAnnouncement = 2 @@ -42,18 +42,18 @@ class TaggedDataPayload: @json @dataclass -class TransactionPayload: - """A transaction payload. +class SignedTransactionPayload: + """A signed transaction payload. Attributes: - essence: The transaction essence. + transaction: The transaction. unlocks: The unlocks of the transaction. """ - essence: TransactionEssence + transaction: Transaction unlocks: List[Union[SignatureUnlock, ReferenceUnlock]] type: int = field( default_factory=lambda: int( - PayloadType.Transaction), + PayloadType.SignedTransaction), init=False) @@ -69,7 +69,7 @@ class CandidacyAnnouncementPayload: Payload: TypeAlias = Union[TaggedDataPayload, - TransactionPayload, CandidacyAnnouncementPayload] + SignedTransactionPayload, CandidacyAnnouncementPayload] def deserialize_payload(d: Dict[str, Any]) -> Payload: @@ -82,8 +82,8 @@ def deserialize_payload(d: Dict[str, Any]) -> Payload: payload_type = d['type'] if payload_type == PayloadType.TaggedData: return TaggedDataPayload.from_dict(d) - if payload_type == PayloadType.Transaction: - return TransactionPayload.from_dict(d) + if payload_type == PayloadType.SignedTransaction: + return SignedTransactionPayload.from_dict(d) if payload_type == PayloadType.CandidacyAnnouncement: return CandidacyAnnouncementPayload.from_dict(d) raise Exception(f'invalid payload type: {payload_type}') diff --git a/bindings/python/iota_sdk/types/send_params.py b/bindings/python/iota_sdk/types/send_params.py index 81036f1fea..cd3e404472 100644 --- a/bindings/python/iota_sdk/types/send_params.py +++ b/bindings/python/iota_sdk/types/send_params.py @@ -5,7 +5,7 @@ from dataclasses import dataclass, field from typing import Optional, List from dataclasses_json import config -from iota_sdk.types.common import HexStr, json +from iota_sdk.types.common import hex_str_decoder, HexStr, json from iota_sdk.types.native_token import NativeToken @@ -72,10 +72,12 @@ class CreateNativeTokenParams(): account_id: The ID of the corresponding account. """ circulating_supply: int = field(metadata=config( - encoder=str + encoder=hex, + decoder=hex_str_decoder, )) maximum_supply: int = field(metadata=config( - encoder=str + encoder=hex, + decoder=hex_str_decoder, )) foundry_metadata: Optional[str] = None account_id: Optional[str] = None diff --git a/bindings/python/iota_sdk/types/signature.py b/bindings/python/iota_sdk/types/signature.py index 0112b9a3f5..1ccf1b3551 100644 --- a/bindings/python/iota_sdk/types/signature.py +++ b/bindings/python/iota_sdk/types/signature.py @@ -18,7 +18,7 @@ class Ed25519Signature: """ public_key: HexStr signature: HexStr - type: int = field(default_factory=lambda: 0, init=False) + type: int = field(default=0, init=False) Signature: TypeAlias = Ed25519Signature diff --git a/bindings/python/iota_sdk/types/token_scheme.py b/bindings/python/iota_sdk/types/token_scheme.py index d243509d0c..3a60e9282d 100644 --- a/bindings/python/iota_sdk/types/token_scheme.py +++ b/bindings/python/iota_sdk/types/token_scheme.py @@ -1,9 +1,10 @@ # Copyright 2023 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 -from dataclasses import dataclass, field from typing import TypeAlias -from iota_sdk.types.common import HexStr, json +from dataclasses import dataclass, field +from dataclasses_json import config +from iota_sdk.types.common import hex_str_decoder, json @json @@ -17,10 +18,19 @@ class SimpleTokenScheme: maximum_supply: The maximum supply of the token. type: The type code of the token scheme. """ - minted_tokens: HexStr - melted_tokens: HexStr - maximum_supply: HexStr - type: int = field(default_factory=lambda: 0, init=False) + minted_tokens: int = field(metadata=config( + encoder=hex, + decoder=hex_str_decoder, + )) + melted_tokens: int = field(metadata=config( + encoder=hex, + decoder=hex_str_decoder, + )) + maximum_supply: int = field(metadata=config( + encoder=hex, + decoder=hex_str_decoder, + )) + type: int = field(default=0, init=False) TokenScheme: TypeAlias = SimpleTokenScheme diff --git a/bindings/python/iota_sdk/types/transaction.py b/bindings/python/iota_sdk/types/transaction.py index 7ae9266109..23d6304432 100644 --- a/bindings/python/iota_sdk/types/transaction.py +++ b/bindings/python/iota_sdk/types/transaction.py @@ -2,51 +2,52 @@ # SPDX-License-Identifier: Apache-2.0 from __future__ import annotations -from dataclasses import dataclass -from typing import List, Optional -from enum import Enum -from iota_sdk.types.common import HexStr, json -from iota_sdk.types.output_metadata import OutputWithMetadata -from iota_sdk.types.payload import TransactionPayload +from typing import TYPE_CHECKING, Optional, List +from dataclasses import dataclass, field -class InclusionState(str, Enum): - """Inclusion state variants of a transaction. +from iota_sdk.types.common import HexStr, json, SlotIndex +from iota_sdk.types.mana import ManaAllotment +from iota_sdk.types.input import UtxoInput +from iota_sdk.types.context_input import ContextInput +from iota_sdk.types.output import Output - Attributes: - Pending: The transaction is pending. - Confirmed: The transaction is confirmed. - Conflicting: The transaction is conflicting. - UnknownPruned: The transaction is unknown or already pruned. - """ - Pending = 'pending' - Confirmed = 'confirmed' - Conflicting = 'conflicting' - UnknownPruned = 'unknownPruned' +# Required to prevent circular import +if TYPE_CHECKING: + from iota_sdk.types.payload import Payload @json @dataclass class Transaction: - """A transaction with some metadata. + """A transaction consuming inputs, creating outputs and carrying an optional payload. Attributes: - payload: The transaction payload. - inclusion_state: The inclusion state of the transaction. - timestamp: The timestamp of the transaction. - transaction_id: The ID of the corresponding transaction. - network_id: The ID of the network this transaction was issued in. - incoming: Indicates whether the transaction was created by the wallet or whether it was sent by someone else and is incoming. - inputs: The inputs of the transaction. - note: A note attached to the transaction. - block_id: The ID of the block that holds the transaction. + network_id: The unique value denoting whether the block was meant for mainnet, shimmer, testnet, or a private network. + It consists of the first 8 bytes of the BLAKE2b-256 hash of the network name. + creation_slot: The slot index in which the transaction was created. + context_inputs: The inputs that provide additional contextual information for the execution of a transaction. + inputs: The inputs to consume in order to fund the outputs of the Transaction Payload. + allotments: The allotments of Mana which which will be added upon commitment of the slot. + capabilities: The capability bitflags of the transaction. + outputs: The outputs that are created by the Transaction Payload + payload: An optional tagged data payload """ - payload: TransactionPayload - inclusion_state: InclusionState - timestamp: int - transaction_id: HexStr - network_id: int - incoming: bool - inputs = List[OutputWithMetadata] - note: Optional[str] = None - block_id: Optional[HexStr] = None + network_id: str + creation_slot: SlotIndex + context_inputs: List[ContextInput] + inputs: List[UtxoInput] + allotments: List[ManaAllotment] + capabilities: Optional[HexStr] = field(default=None, init=False) + outputs: List[Output] + payload: Optional[Payload] = None + + def with_capabilities(self, capabilities: bytes): + """Sets the transaction capabilities from a byte array. + Attributes: + capabilities: The transaction capabilities bitflags. + """ + if any(c != 0 for c in capabilities): + self.capabilities = '0x' + capabilities.hex() + else: + self.capabilities = None diff --git a/bindings/python/iota_sdk/types/transaction_data.py b/bindings/python/iota_sdk/types/transaction_data.py index e7ab0f5092..0f38781bb4 100644 --- a/bindings/python/iota_sdk/types/transaction_data.py +++ b/bindings/python/iota_sdk/types/transaction_data.py @@ -7,8 +7,8 @@ from iota_sdk.types.address import Address from iota_sdk.types.output import Output from iota_sdk.types.output_metadata import OutputMetadata -from iota_sdk.types.essence import TransactionEssence -from iota_sdk.types.payload import TransactionPayload +from iota_sdk.types.transaction import Transaction +from iota_sdk.types.payload import SignedTransactionPayload from iota_sdk.types.signature import Bip44 from iota_sdk.types.common import json @@ -49,11 +49,11 @@ class PreparedTransactionData: """Helper class for offline signing. Attributes: - essence: The transaction essence. + transaction: The transaction. inputs_data: Data about the inputs which is required for signing. remainder: Data about a remainder. """ - essence: TransactionEssence + transaction: Transaction inputs_data: List[InputSigningData] remainder: Optional[RemainderData] = None @@ -64,8 +64,8 @@ class SignedTransactionData: """Helper class for offline signing. Attributes: - transaction_payload: The transaction payload. + payload: The transaction payload. inputs_data: Data about the inputs consumed in the transaction. """ - transaction_payload: TransactionPayload + payload: SignedTransactionPayload inputs_data: List[InputSigningData] diff --git a/bindings/python/iota_sdk/types/transaction_with_metadata.py b/bindings/python/iota_sdk/types/transaction_with_metadata.py new file mode 100644 index 0000000000..53dba6cd44 --- /dev/null +++ b/bindings/python/iota_sdk/types/transaction_with_metadata.py @@ -0,0 +1,52 @@ +# Copyright 2023 IOTA Stiftung +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations +from dataclasses import dataclass +from typing import List, Optional +from enum import Enum +from iota_sdk.types.common import HexStr, json +from iota_sdk.types.output_metadata import OutputWithMetadata +from iota_sdk.types.payload import SignedTransactionPayload + + +class InclusionState(str, Enum): + """Inclusion state variants of a transaction. + + Attributes: + Pending: The transaction is pending. + Confirmed: The transaction is confirmed. + Conflicting: The transaction is conflicting. + UnknownPruned: The transaction is unknown or already pruned. + """ + Pending = 'pending' + Confirmed = 'confirmed' + Conflicting = 'conflicting' + UnknownPruned = 'unknownPruned' + + +@json +@dataclass +class TransactionWithMetadata: + """A transaction with some metadata. + + Attributes: + payload: The transaction payload. + inclusion_state: The inclusion state of the transaction. + timestamp: The timestamp of the transaction. + transaction_id: The ID of the corresponding transaction. + network_id: The ID of the network this transaction was issued in. + incoming: Indicates whether the transaction was created by the wallet or whether it was sent by someone else and is incoming. + inputs: The inputs of the transaction. + note: A note attached to the transaction. + block_id: The ID of the block that holds the transaction. + """ + payload: SignedTransactionPayload + inclusion_state: InclusionState + timestamp: int + transaction_id: HexStr + network_id: int + incoming: bool + inputs = List[OutputWithMetadata] + note: Optional[str] = None + block_id: Optional[HexStr] = None diff --git a/bindings/python/iota_sdk/types/unlock.py b/bindings/python/iota_sdk/types/unlock.py index 4118ec5466..4a99672783 100644 --- a/bindings/python/iota_sdk/types/unlock.py +++ b/bindings/python/iota_sdk/types/unlock.py @@ -29,15 +29,7 @@ class UnlockType(IntEnum): @json @dataclass -class Unlock: - """Unlock type. - """ - type: int - - -@json -@dataclass -class SignatureUnlock(Unlock): +class SignatureUnlock: """An unlock holding a signature unlocking one or more inputs. """ signature: Ed25519Signature @@ -49,7 +41,7 @@ class SignatureUnlock(Unlock): @json @dataclass -class ReferenceUnlock(Unlock): +class ReferenceUnlock: """An unlock which must reference a previous unlock which unlocks also the input at the same index as this Reference Unlock. """ reference: int diff --git a/bindings/python/iota_sdk/utils.py b/bindings/python/iota_sdk/utils.py index e889f74cfb..687a507d9c 100644 --- a/bindings/python/iota_sdk/utils.py +++ b/bindings/python/iota_sdk/utils.py @@ -8,12 +8,12 @@ from iota_sdk.types.signature import Ed25519Signature from iota_sdk.types.address import Address, deserialize_address from iota_sdk.types.common import HexStr -from iota_sdk.types.essence import TransactionEssence +from iota_sdk.types.transaction import Transaction from iota_sdk.types.node_info import ProtocolParameters from iota_sdk.types.output_id import OutputId from iota_sdk.types.output import Output from iota_sdk.external import call_utils_method -from iota_sdk.types.payload import TransactionPayload +from iota_sdk.types.payload import SignedTransactionPayload # Required to prevent circular import if TYPE_CHECKING: @@ -177,19 +177,19 @@ def block_id(block: SignedBlock, params: ProtocolParameters) -> HexStr: }) @staticmethod - def transaction_id(transaction_payload: TransactionPayload) -> HexStr: + def transaction_id(payload: SignedTransactionPayload) -> HexStr: """ Compute the transaction ID (Blake2b256 hash of the provided transaction payload) of a transaction payload. """ return _call_method('transactionId', { - 'payload': transaction_payload.as_dict() + 'payload': payload.as_dict() }) @staticmethod - def transaction_signing_hash(essence: TransactionEssence) -> HexStr: + def transaction_signing_hash(transaction: Transaction) -> HexStr: """ Compute the signing hash of a transaction. """ return _call_method('transactionSigningHash', { - 'essence': essence.to_dict(), + 'transaction': transaction.to_dict(), }) @staticmethod diff --git a/bindings/python/iota_sdk/wallet/account.py b/bindings/python/iota_sdk/wallet/account.py index 4d434ea0cc..7219e560e9 100644 --- a/bindings/python/iota_sdk/wallet/account.py +++ b/bindings/python/iota_sdk/wallet/account.py @@ -20,7 +20,7 @@ from iota_sdk.types.output_params import OutputParams from iota_sdk.types.transaction_data import PreparedTransactionData, SignedTransactionData from iota_sdk.types.send_params import CreateAccountOutputParams, CreateNativeTokenParams, MintNftParams, SendNativeTokensParams, SendNftParams, SendParams -from iota_sdk.types.transaction import Transaction +from iota_sdk.types.transaction_with_metadata import TransactionWithMetadata from iota_sdk.types.transaction_options import TransactionOptions from iota_sdk.types.consolidation_params import ConsolidationParams @@ -82,7 +82,7 @@ def get_metadata(self) -> AccountMetadata: self.meta["alias"], self.meta["coinType"], self.meta["index"]) def burn( - self, burn: Burn, options: Optional[TransactionOptions] = None) -> Transaction: + self, burn: Burn, options: Optional[TransactionOptions] = None) -> TransactionWithMetadata: """A generic function that can be used to burn native tokens, nfts, foundries and aliases. """ return self.prepare_burn(burn, options).send() @@ -129,7 +129,7 @@ def prepare_burn_nft(self, return PreparedTransaction(self, prepared) def consolidate_outputs( - self, params: ConsolidationParams) -> Transaction: + self, params: ConsolidationParams) -> TransactionWithMetadata: """Consolidate outputs. """ return self.prepare_consolidate_outputs(params).send() @@ -147,7 +147,7 @@ def prepare_consolidate_outputs( def create_account_output(self, params: Optional[CreateAccountOutputParams] = None, - options: Optional[TransactionOptions] = None) -> Transaction: + options: Optional[TransactionOptions] = None) -> TransactionWithMetadata: """Create an account output. """ return self.prepare_create_account_output(params, options).send() @@ -221,10 +221,11 @@ def get_output(self, output_id: OutputId) -> OutputData: } )) - def get_transaction(self, transaction_id: HexStr) -> Transaction: + def get_transaction( + self, transaction_id: HexStr) -> TransactionWithMetadata: """Get transaction. """ - return Transaction.from_dict(self._call_account_method( + return TransactionWithMetadata.from_dict(self._call_account_method( 'getTransaction', { 'transactionId': transaction_id } @@ -270,21 +271,44 @@ def unspent_outputs( ) return [from_dict(OutputData, o) for o in outputs] - def incoming_transactions(self) -> List[Transaction]: + def implicit_account_creation_address(self) -> str: + """Returns the implicit account creation address of the wallet if it is Ed25519 based. + """ + return self._call_account_method( + 'implicitAccountCreationAddress' + ) + + def accounts(self) -> List[OutputData]: + """Returns the accounts of the wallet. + """ + outputs = self._call_account_method( + 'accounts' + ) + return [from_dict(OutputData, o) for o in outputs] + + def implicit_accounts(self) -> List[OutputData]: + """Returns the implicit accounts of the wallet. + """ + outputs = self._call_account_method( + 'implicitAccounts' + ) + return [from_dict(OutputData, o) for o in outputs] + + def incoming_transactions(self) -> List[TransactionWithMetadata]: """Returns all incoming transactions of the account. """ transactions = self._call_account_method( 'incomingTransactions' ) - return [Transaction.from_dict(tx) for tx in transactions] + return [TransactionWithMetadata.from_dict(tx) for tx in transactions] - def transactions(self) -> List[Transaction]: + def transactions(self) -> List[TransactionWithMetadata]: """Returns all transaction of the account. """ transactions = self._call_account_method( 'transactions' ) - return [Transaction.from_dict(tx) for tx in transactions] + return [TransactionWithMetadata.from_dict(tx) for tx in transactions] def pending_transactions(self): """Returns all pending transactions of the account. @@ -292,10 +316,10 @@ def pending_transactions(self): transactions = self._call_account_method( 'pendingTransactions' ) - return [Transaction.from_dict(tx) for tx in transactions] + return [TransactionWithMetadata.from_dict(tx) for tx in transactions] def create_native_token(self, params: CreateNativeTokenParams, - options: Optional[TransactionOptions] = None) -> Transaction: + options: Optional[TransactionOptions] = None) -> TransactionWithMetadata: """Create native token. """ return self.prepare_create_native_token(params, options).send() @@ -316,7 +340,7 @@ def prepare_create_native_token(self, params: CreateNativeTokenParams, def melt_native_token(self, token_id: HexStr, melt_amount: int, - options: Optional[TransactionOptions] = None) -> Transaction: + options: Optional[TransactionOptions] = None) -> TransactionWithMetadata: """Melt native tokens. This happens with the foundry output which minted them, by increasing it's `melted_tokens` field. """ @@ -340,7 +364,7 @@ def prepare_melt_native_token(self, return PreparedTransaction(self, prepared) def mint_native_token(self, token_id: HexStr, mint_amount: int, - options: Optional[TransactionOptions] = None) -> Transaction: + options: Optional[TransactionOptions] = None) -> TransactionWithMetadata: """Mint additional native tokens. """ return self.prepare_mint_native_token( @@ -360,7 +384,7 @@ def prepare_mint_native_token(self, token_id: HexStr, mint_amount: int, return PreparedTransaction(self, prepared) def mint_nfts(self, params: List[MintNftParams], - options: Optional[TransactionOptions] = None) -> Transaction: + options: Optional[TransactionOptions] = None) -> TransactionWithMetadata: """Mint NFTs. """ return self.prepare_mint_nfts(params, options).send() @@ -413,7 +437,7 @@ def prepare_send(self, params: List[SendParams], return PreparedTransaction(self, prepared) def send_transaction( - self, outputs: List[Output], options: Optional[TransactionOptions] = None) -> Transaction: + self, outputs: List[Output], options: Optional[TransactionOptions] = None) -> TransactionWithMetadata: """Send a transaction. """ return self.prepare_transaction(outputs, options).send() @@ -455,10 +479,10 @@ def sync(self, options: Optional[SyncOptions] = None) -> Balance: )) def send(self, amount: int, address: str, - options: Optional[TransactionOptions] = None) -> Transaction: + options: Optional[TransactionOptions] = None) -> TransactionWithMetadata: """Send base coins. """ - return Transaction.from_dict(self._call_account_method( + return TransactionWithMetadata.from_dict(self._call_account_method( 'send', { 'amount': str(amount), 'address': address, @@ -467,10 +491,10 @@ def send(self, amount: int, address: str, )) def send_with_params( - self, params: List[SendParams], options: Optional[TransactionOptions] = None) -> Transaction: + self, params: List[SendParams], options: Optional[TransactionOptions] = None) -> TransactionWithMetadata: """Send base coins to multiple addresses or with additional parameters. """ - return Transaction.from_dict(self._call_account_method( + return TransactionWithMetadata.from_dict(self._call_account_method( 'sendWithParams', { 'params': [param.to_dict() for param in params], 'options': options @@ -478,7 +502,7 @@ def send_with_params( )) def send_native_tokens( - self, params: List[SendNativeTokensParams], options: Optional[TransactionOptions] = None) -> Transaction: + self, params: List[SendNativeTokensParams], options: Optional[TransactionOptions] = None) -> TransactionWithMetadata: """Send native tokens. """ return self.prepare_send_native_tokens(params, options).send() @@ -498,7 +522,7 @@ def prepare_send_native_tokens( return PreparedTransaction(self, prepared) def send_nft(self, params: List[SendNftParams], - options: Optional[TransactionOptions] = None) -> Transaction: + options: Optional[TransactionOptions] = None) -> TransactionWithMetadata: """Send nft. """ return self.prepare_send_nft(params, options).send() @@ -534,51 +558,51 @@ def set_default_sync_options(self, options: SyncOptions): } ) - def sign_transaction_essence( + def sign_transaction( self, prepared_transaction_data: PreparedTransactionData) -> SignedTransactionData: - """Sign a transaction essence. + """Sign a transaction. """ return SignedTransactionData.from_dict(self._call_account_method( - 'signTransactionEssence', { + 'signTransaction', { 'preparedTransactionData': prepared_transaction_data } )) def sign_and_submit_transaction( - self, prepared_transaction_data: PreparedTransactionData) -> Transaction: + self, prepared_transaction_data: PreparedTransactionData) -> TransactionWithMetadata: """Validate the transaction, sign it, submit it to a node and store it in the account. """ - return Transaction.from_dict(self._call_account_method( + return TransactionWithMetadata.from_dict(self._call_account_method( 'signAndSubmitTransaction', { 'preparedTransactionData': prepared_transaction_data } )) def submit_and_store_transaction( - self, signed_transaction_data: SignedTransactionData) -> Transaction: + self, signed_transaction_data: SignedTransactionData) -> TransactionWithMetadata: """Submit and store transaction. """ - return Transaction.from_dict(self._call_account_method( + return TransactionWithMetadata.from_dict(self._call_account_method( 'submitAndStoreTransaction', { 'signedTransactionData': signed_transaction_data } )) def claim_outputs( - self, output_ids_to_claim: List[OutputId]) -> Transaction: + self, output_ids_to_claim: List[OutputId]) -> TransactionWithMetadata: """Claim outputs. """ - return Transaction.from_dict(self._call_account_method( + return TransactionWithMetadata.from_dict(self._call_account_method( 'claimOutputs', { 'outputIdsToClaim': output_ids_to_claim } )) def send_outputs( - self, outputs: List[Output], options: Optional[TransactionOptions] = None) -> Transaction: + self, outputs: List[Output], options: Optional[TransactionOptions] = None) -> TransactionWithMetadata: """Send outputs in a transaction. """ - return Transaction.from_dict(self._call_account_method( + return TransactionWithMetadata.from_dict(self._call_account_method( 'sendOutputs', { 'outputs': outputs, 'options': options, diff --git a/bindings/python/iota_sdk/wallet/prepared_transaction.py b/bindings/python/iota_sdk/wallet/prepared_transaction.py index c2a9e0b802..80c3fde12e 100644 --- a/bindings/python/iota_sdk/wallet/prepared_transaction.py +++ b/bindings/python/iota_sdk/wallet/prepared_transaction.py @@ -6,7 +6,7 @@ from typing import TYPE_CHECKING, Dict, Union from dacite import from_dict -from iota_sdk.types.transaction import Transaction +from iota_sdk.types.transaction_with_metadata import TransactionWithMetadata from iota_sdk.types.transaction_data import PreparedTransactionData # Required to prevent circular import @@ -42,7 +42,7 @@ def prepared_transaction_data(self) -> PreparedTransactionData: self.prepared_transaction_data_dto, PreparedTransactionData) else from_dict( PreparedTransactionData, self.prepared_transaction_data_dto) - def send(self) -> Transaction: + def send(self) -> TransactionWithMetadata: """Send a transaction. Internally just calls `sign_and_submit_transaction`. Returns: @@ -51,13 +51,13 @@ def send(self) -> Transaction: return self.sign_and_submit_transaction() def sign(self): - """Sign a prepared transaction essence using the account's private key and returns - the signed transaction essence. + """Sign a prepared transaction using the account's private key and returns + the signed transaction. """ - return self.account.sign_transaction_essence( + return self.account.sign_transaction( self.prepared_transaction_data()) - def sign_and_submit_transaction(self) -> Transaction: + def sign_and_submit_transaction(self) -> TransactionWithMetadata: """Sign and submit a transaction using prepared transaction data. Returns: diff --git a/bindings/python/iota_sdk/wallet/sync_options.py b/bindings/python/iota_sdk/wallet/sync_options.py index 324ab7c5c6..4e4526ebe7 100644 --- a/bindings/python/iota_sdk/wallet/sync_options.py +++ b/bindings/python/iota_sdk/wallet/sync_options.py @@ -1,7 +1,7 @@ # Copyright 2023 IOTA Stiftung # SPDX-License-Identifier: Apache-2.0 -from typing import List, Optional +from typing import Optional from dataclasses import dataclass from iota_sdk.types.common import json @@ -62,17 +62,6 @@ class SyncOptions(): """The synchronization options. **Attributes** - addresses : - Specific Bech32 encoded addresses of the account to sync. If addresses are provided, - then `address_start_index` will be ignored. - address_start_index : - Address index from which to start syncing addresses. 0 by default. - Using a higher index will be faster because addresses with a lower index will be skipped, - but this could result in a wrong balance for that reason. - address_start_index_internal : - Address index from which to start syncing internal addresses. 0 by default. - Using a higher index will be faster because addresses with a lower index will be skipped, - but this could result in a wrong balance for internal addresses for that reason. force_syncing : Usually syncing is skipped if it's called in between 200ms, because there can only be new changes every milestone and calling it twice "at the same time" will not return new data. @@ -96,9 +85,6 @@ class SyncOptions(): Sync native token foundries, so their metadata can be returned in the balance. """ - addresses: Optional[List[str]] = None - address_start_index: Optional[int] = None - address_start_index_internal: Optional[int] = None force_syncing: Optional[bool] = None sync_incoming_transactions: Optional[bool] = None sync_pending_transactions: Optional[bool] = None diff --git a/bindings/python/tests/test_block.py b/bindings/python/tests/test_block.py index 222af92562..8a76a91b87 100644 --- a/bindings/python/tests/test_block.py +++ b/bindings/python/tests/test_block.py @@ -85,22 +85,21 @@ def test_basic_block_with_tx_payload(): "shallowLikeParents": [], "maxBurnedMana": "180500", "payload": {"type": 1, - "essence": {"type": 1, - "networkId": "1856588631910923207", - "inputs": [{"type": 0, - "transactionId": "0xc6765035e75e319e9cd55ab16e7619f6cd658e7f421c71d9fe276c77fdf3f5b3", - "transactionOutputIndex": 1}], - "inputsCommitment": "0x2468f946993ac949c890d7f895797c6b86075dc1e1556f04f3772903eaf51932", - "outputs": [{"type": 3, - "amount": "1000000", - "unlockConditions": [{"type": 0, - "address": {"type": 0, - "pubKeyHash": "0xa119005b26d46fc74cf9188b3cef8d01623e68146741ee698cabefd425dc01be"}}]}, - {"type": 3, - "amount": "995000000", - "unlockConditions": [{"type": 0, - "address": {"type": 0, - "pubKeyHash": "0xa119005b26d46fc74cf9188b3cef8d01623e68146741ee698cabefd425dc01be"}}]}]}, + "transaction": { + "networkId": "1856588631910923207", + "inputs": [{"type": 0, + "transactionId": "0xc6765035e75e319e9cd55ab16e7619f6cd658e7f421c71d9fe276c77fdf3f5b3", + "transactionOutputIndex": 1}], + "outputs": [{"type": 3, + "amount": "1000000", + "unlockConditions": [{"type": 0, + "address": {"type": 0, + "pubKeyHash": "0xa119005b26d46fc74cf9188b3cef8d01623e68146741ee698cabefd425dc01be"}}]}, + {"type": 3, + "amount": "995000000", + "unlockConditions": [{"type": 0, + "address": {"type": 0, + "pubKeyHash": "0xa119005b26d46fc74cf9188b3cef8d01623e68146741ee698cabefd425dc01be"}}]}]}, "unlocks": [{"type": 0, "signature": {"type": 0, "publicKey": "0xa7af600976f440ec97d7bddbf17eacf0bfbf710e8cfb4ae3eae475d4ae8e1b16", @@ -108,7 +107,7 @@ def test_basic_block_with_tx_payload(): block = BasicBlock.from_dict(block_dict) assert block.to_dict() == block_dict assert isinstance(block.payload, get_args(Payload)) - assert block.payload.type == PayloadType.Transaction + assert block.payload.type == PayloadType.SignedTransaction @pytest.mark.skip(reason="https://github.com/iotaledger/iota-sdk/issues/1387") @@ -117,8 +116,8 @@ def test_basic_block_with_tx_payload_all_output_types(): "type": 0, "strongParents": [ "0x053296e7434e8a4d602f8db30a5aaf16c01140212fe79d8132137cda1c38a60a", "0x559ec1d9a31c55bd27588ada2ade70fb5b13764ddd600e29c3b018761ba30e15", "0xe78e8cdbbeda89e3408eed51b77e0db5ba035f5f3bf79a8365435bba40697693", "0xee9d6e45dbc080694e6c827fecbc31ad9f654cf57404bc98f4cbca033f8e3139"], "weakParents": [], "shallowLikeParents": [], "payload": { - "type": 1, "essence": { - "type": 1, "networkId": "1856588631910923207", "inputs": [ + "type": 1, "transaction": { + "networkId": "1856588631910923207", "inputs": [ { "type": 0, "transactionId": "0xa49f5a764c3fe22f702b5b238a75a648faae1863f61c14fac51ba58d26acb823", "transactionOutputIndex": 9}, { "type": 0, "transactionId": "0x6f23b39ebe433f8b522d2e4360186cd3e6b21baf46c0a591c801161e505330b4", "transactionOutputIndex": 0}, { @@ -249,7 +248,7 @@ def test_basic_block_with_tx_payload_all_output_types(): block = BasicBlock.from_dict(block_dict) assert block.to_dict() == block_dict assert isinstance(block.payload, get_args(Payload)) - assert block.payload.type == PayloadType.Transaction + assert block.payload.type == PayloadType.SignedTransaction @pytest.mark.skip(reason="https://github.com/iotaledger/iota-sdk/issues/1387") @@ -264,28 +263,28 @@ def test_basic_block_with_tx_payload_with_tagged_data_payload(): "shallowLikeParents": [], "maxBurnedMana": "180500", "payload": {"type": 1, - "essence": {"type": 1, - "networkId": "1856588631910923207", - "inputs": [{"type": 0, - "transactionId": "0xeccfbdb73c0a4c9c0301b53a17e5aa301fbf0b079db9e88ff0e32e9e64214b28", - "transactionOutputIndex": 5}, - {"type": 0, - "transactionId": "0xf8052938858750c9c69b92b615a685fa2bb5833912b264142fc724e9510b0d0e", - "transactionOutputIndex": 0}], - "inputsCommitment": "0x9702f2a625db14db2f67289828a9fdbe342477393572b9165b19964b2449061a", - "outputs": [{"type": 3, - "amount": "1000000", - "unlockConditions": [{"type": 0, - "address": {"type": 0, - "pubKeyHash": "0x60200bad8137a704216e84f8f9acfe65b972d9f4155becb4815282b03cef99fe"}}]}, - {"type": 3, - "amount": "50600", - "unlockConditions": [{"type": 0, - "address": {"type": 0, - "pubKeyHash": "0x74e8b1f10396eb5e8aeb16d666416802722436a88b5dd1a88e59c170b724c9cc"}}]}], - "payload": {"type": 5, - "tag": "0x746167", - "data": "0x64617461"}}, + "transaction": { + "networkId": "1856588631910923207", + "inputs": [{"type": 0, + "transactionId": "0xeccfbdb73c0a4c9c0301b53a17e5aa301fbf0b079db9e88ff0e32e9e64214b28", + "transactionOutputIndex": 5}, + {"type": 0, + "transactionId": "0xf8052938858750c9c69b92b615a685fa2bb5833912b264142fc724e9510b0d0e", + "transactionOutputIndex": 0}], + "inputsCommitment": "0x9702f2a625db14db2f67289828a9fdbe342477393572b9165b19964b2449061a", + "outputs": [{"type": 3, + "amount": "1000000", + "unlockConditions": [{"type": 0, + "address": {"type": 0, + "pubKeyHash": "0x60200bad8137a704216e84f8f9acfe65b972d9f4155becb4815282b03cef99fe"}}]}, + {"type": 3, + "amount": "50600", + "unlockConditions": [{"type": 0, + "address": {"type": 0, + "pubKeyHash": "0x74e8b1f10396eb5e8aeb16d666416802722436a88b5dd1a88e59c170b724c9cc"}}]}], + "payload": {"type": 5, + "tag": "0x746167", + "data": "0x64617461"}}, "unlocks": [{"type": 0, "signature": {"type": 0, "publicKey": "0x67b7fc3f78763c9394fc4fcdb52cf3a973b6e064bdc3defb40a6cb2c880e6f5c", @@ -295,4 +294,4 @@ def test_basic_block_with_tx_payload_with_tagged_data_payload(): block = BasicBlock.from_dict(block_dict) assert block.to_dict() == block_dict assert isinstance(block.payload, get_args(Payload)) - assert block.payload.type == PayloadType.Transaction + assert block.payload.type == PayloadType.SignedTransaction diff --git a/cli/src/cli.rs b/cli/src/cli.rs index 92aa7b4764..49a40fc799 100644 --- a/cli/src/cli.rs +++ b/cli/src/cli.rs @@ -27,7 +27,7 @@ use crate::{ }; const DEFAULT_LOG_LEVEL: &str = "debug"; -const DEFAULT_NODE_URL: &str = "https://api.testnet.shimmer.network"; +const DEFAULT_NODE_URL: &str = "http://localhost:8080"; const DEFAULT_STRONGHOLD_SNAPSHOT_PATH: &str = "./stardust-cli-wallet.stronghold"; const DEFAULT_WALLET_DATABASE_PATH: &str = "./stardust-cli-wallet-db"; diff --git a/cli/src/wallet_cli/completer.rs b/cli/src/wallet_cli/completer.rs index ea2abb4748..140183b0b6 100644 --- a/cli/src/wallet_cli/completer.rs +++ b/cli/src/wallet_cli/completer.rs @@ -9,6 +9,7 @@ use rustyline::{ }; const WALLET_COMMANDS: &[&str] = &[ + "accounts", "address", "balance", "burn-native-token", @@ -23,6 +24,8 @@ const WALLET_COMMANDS: &[&str] = &[ "destroy-foundry", "exit", "faucet", + "implicit-account-creation-address", + "implicit-accounts", "melt-native-token", "mint-native-token", "mint-nft", diff --git a/cli/src/wallet_cli/mod.rs b/cli/src/wallet_cli/mod.rs index 71b73dcb23..62dfbaec12 100644 --- a/cli/src/wallet_cli/mod.rs +++ b/cli/src/wallet_cli/mod.rs @@ -56,6 +56,8 @@ impl WalletCli { #[derive(Debug, Subcommand)] #[allow(clippy::large_enum_variant)] pub enum WalletCommand { + /// Lists the accounts of the wallet. + Accounts, /// Print the wallet address. Address, /// Print the wallet balance. @@ -113,9 +115,13 @@ pub enum WalletCommand { Faucet { /// Address the faucet sends the funds to, defaults to the wallet address. address: Option, - /// URL of the faucet, default to . + /// URL of the faucet, default to . url: Option, }, + /// Returns the implicit account creation address of the wallet if it is Ed25519 based. + ImplicitAccountCreationAddress, + /// Lists the implicit accounts of the wallet. + ImplicitAccounts, /// Mint additional native tokens. MintNativeToken { /// Token ID to be minted, e.g. 0x087d205988b733d97fb145ae340e27a8b19554d1ceee64574d7e5ff66c45f69e7a0100000000. @@ -300,6 +306,11 @@ impl FromStr for OutputSelector { } } +// `accounts` command +pub async fn accounts_command(wallet: &Wallet) -> Result<(), Error> { + print_outputs(wallet.accounts().await, "Accounts:").await +} + // `address` command pub async fn address_command(wallet: &Wallet) -> Result<(), Error> { print_wallet_address(wallet).await?; @@ -552,15 +563,25 @@ pub async fn faucet_command(wallet: &Wallet, address: Option, url wallet.address().await }; - let faucet_url = url - .as_deref() - .unwrap_or("https://faucet.testnet.shimmer.network/api/enqueue"); + let faucet_url = url.as_deref().unwrap_or("http://localhost:8088/api/enqueue"); println_log_info!("{}", request_funds_from_faucet(faucet_url, &address).await?); Ok(()) } +// `implicit-account-creation-address` command +pub async fn implicit_account_creation_address_command(wallet: &Wallet) -> Result<(), Error> { + println_log_info!("{}", wallet.implicit_account_creation_address().await?); + + Ok(()) +} + +// `implicit-accounts` command +pub async fn implicit_accounts_command(wallet: &Wallet) -> Result<(), Error> { + print_outputs(wallet.implicit_accounts().await, "Implicit accounts:").await +} + // `melt-native-token` command pub async fn melt_native_token_command(wallet: &Wallet, token_id: String, amount: String) -> Result<(), Error> { let transaction = wallet @@ -581,7 +602,7 @@ pub async fn melt_native_token_command(wallet: &Wallet, token_id: String, amount } // `mint-native-token` command -pub async fn mint_native_token(wallet: &Wallet, token_id: String, amount: String) -> Result<(), Error> { +pub async fn mint_native_token_command(wallet: &Wallet, token_id: String, amount: String) -> Result<(), Error> { let mint_transaction = wallet .mint_native_token( TokenId::from_str(&token_id)?, @@ -647,7 +668,7 @@ pub async fn output_command(wallet: &Wallet, selector: OutputSelector) -> Result let output = match selector { OutputSelector::Id(id) => wallet.get_output(&id).await, OutputSelector::Index(index) => { - let mut outputs = wallet.outputs(None).await?; + let mut outputs = wallet.outputs(None).await; outputs.sort_unstable_by(outputs_ordering); outputs.into_iter().nth(index) } @@ -664,7 +685,7 @@ pub async fn output_command(wallet: &Wallet, selector: OutputSelector) -> Result /// `outputs` command pub async fn outputs_command(wallet: &Wallet) -> Result<(), Error> { - print_outputs(wallet.outputs(None).await?, "Outputs:").await + print_outputs(wallet.outputs(None).await, "Outputs:").await } // `send` command @@ -710,7 +731,6 @@ pub async fn send_native_token_command( let transaction = if gift_storage_deposit.unwrap_or(false) { // Send native tokens together with the required storage deposit let rent_structure = wallet.client().get_rent_structure().await?; - let token_supply = wallet.client().get_token_supply().await?; wallet.client().bech32_hrp_matches(address.hrp()).await?; @@ -720,7 +740,7 @@ pub async fn send_native_token_command( TokenId::from_str(&token_id)?, U256::from_dec_str(&amount).map_err(|e| Error::Miscellaneous(e.to_string()))?, )?]) - .finish_output(token_supply)?]; + .finish_output()?]; wallet.send_outputs(outputs, None).await? } else { @@ -821,7 +841,7 @@ pub async fn transactions_command(wallet: &Wallet, show_details: bool) -> Result /// `unspent-outputs` command pub async fn unspent_outputs_command(wallet: &Wallet) -> Result<(), Error> { - print_outputs(wallet.unspent_outputs(None).await?, "Unspent outputs:").await + print_outputs(wallet.unspent_outputs(None).await, "Unspent outputs:").await } pub async fn vote_command(wallet: &Wallet, event_id: ParticipationEventId, answers: Vec) -> Result<(), Error> { @@ -910,7 +930,7 @@ async fn print_wallet_address(wallet: &Wallet) -> Result<(), Error> { address.inner() ); - let unspent_outputs = wallet.unspent_outputs(None).await?; + let unspent_outputs = wallet.unspent_outputs(None).await; let slot_index = wallet.client().get_slot_index().await?; let mut output_ids = Vec::new(); @@ -1043,6 +1063,7 @@ pub async fn prompt_internal( } }; match protocol_cli.command { + WalletCommand::Accounts => accounts_command(wallet).await, WalletCommand::Address => address_command(wallet).await, WalletCommand::Balance => balance_command(wallet).await, WalletCommand::BurnNativeToken { token_id, amount } => { @@ -1077,11 +1098,15 @@ pub async fn prompt_internal( return Ok(PromptResponse::Done); } WalletCommand::Faucet { address, url } => faucet_command(wallet, address, url).await, + WalletCommand::ImplicitAccountCreationAddress => { + implicit_account_creation_address_command(wallet).await + } + WalletCommand::ImplicitAccounts => implicit_accounts_command(wallet).await, WalletCommand::MeltNativeToken { token_id, amount } => { melt_native_token_command(wallet, token_id, amount).await } WalletCommand::MintNativeToken { token_id, amount } => { - mint_native_token(wallet, token_id, amount).await + mint_native_token_command(wallet, token_id, amount).await } WalletCommand::MintNft { address, diff --git a/sdk/Cargo.toml b/sdk/Cargo.toml index 0b83ce34c8..0a7e81eb33 100644 --- a/sdk/Cargo.toml +++ b/sdk/Cargo.toml @@ -126,7 +126,9 @@ wasm-bindgen-futures = { version = "0.4.37", default-features = false, optional [dev-dependencies] iota-sdk = { path = ".", default-features = false, features = ["rand"] } -pretty_assertions = { version = "1.4.0", default-features = false, features = [ "alloc" ] } +pretty_assertions = { version = "1.4.0", default-features = false, features = [ + "alloc", +] } dotenvy = { version = "0.15.7", default-features = false } fern-logger = { version = "0.5.0", default-features = false } @@ -340,6 +342,11 @@ name = "destroy_account_output" path = "examples/how_tos/account/destroy.rs" required-features = ["wallet", "stronghold"] +[[example]] +name = "implicit_account_creation" +path = "examples/how_tos/account/implicit_account_creation.rs" +required-features = ["wallet"] + # Outputs [[example]] diff --git a/sdk/examples/client/output/build_account_output.rs b/sdk/examples/client/output/build_account_output.rs index 3f6631f41a..6e5f8ed133 100644 --- a/sdk/examples/client/output/build_account_output.rs +++ b/sdk/examples/client/output/build_account_output.rs @@ -34,7 +34,6 @@ async fn main() -> Result<()> { .finish() .await?; - let token_supply = client.get_token_supply().await?; let rent_structure = client.get_rent_structure().await?; let address = std::env::args() @@ -49,7 +48,7 @@ async fn main() -> Result<()> { .add_immutable_feature(IssuerFeature::new(address.clone())) .add_immutable_feature(MetadataFeature::new(metadata)?) .add_unlock_condition(AddressUnlockCondition::new(address)) - .finish_output(token_supply)?; + .finish_output()?; println!("{account_output:#?}"); diff --git a/sdk/examples/client/output/build_basic_output.rs b/sdk/examples/client/output/build_basic_output.rs index 489ae2bbe6..5f92114e56 100644 --- a/sdk/examples/client/output/build_basic_output.rs +++ b/sdk/examples/client/output/build_basic_output.rs @@ -48,12 +48,12 @@ async fn main() -> Result<()> { let outputs = [ // most simple output - basic_output_builder.clone().finish_output(token_supply)?, + basic_output_builder.clone().finish_output()?, // with metadata feature block basic_output_builder .clone() .add_feature(MetadataFeature::new(METADATA)?) - .finish_output(token_supply)?, + .finish_output()?, // with storage deposit return basic_output_builder .clone() @@ -62,26 +62,26 @@ async fn main() -> Result<()> { 1_000_000, token_supply, )?) - .finish_output(token_supply)?, + .finish_output()?, // with expiration basic_output_builder .clone() .add_unlock_condition(ExpirationUnlockCondition::new(address.clone(), 1)?) - .finish_output(token_supply)?, + .finish_output()?, // with timelock basic_output_builder .clone() .add_unlock_condition(TimelockUnlockCondition::new(1)?) - .finish_output(token_supply)?, + .finish_output()?, // with tag feature basic_output_builder .clone() .add_feature(TagFeature::new(METADATA)?) - .finish_output(token_supply)?, + .finish_output()?, // with sender feature basic_output_builder .add_feature(SenderFeature::new(address)) - .finish_output(token_supply)?, + .finish_output()?, ]; println!("{outputs:#?}"); diff --git a/sdk/examples/client/output/build_nft_output.rs b/sdk/examples/client/output/build_nft_output.rs index 5dfafd8772..149ee6c284 100644 --- a/sdk/examples/client/output/build_nft_output.rs +++ b/sdk/examples/client/output/build_nft_output.rs @@ -34,7 +34,6 @@ async fn main() -> Result<()> { .finish() .await?; - let token_supply = client.get_token_supply().await?; let rent_structure = client.get_rent_structure().await?; let address = std::env::args() @@ -63,7 +62,7 @@ async fn main() -> Result<()> { .add_feature(TagFeature::new(TAG)?) .add_immutable_feature(IssuerFeature::new(address)) .add_immutable_feature(MetadataFeature::new(tip_27_immutable_metadata)?) - .finish_output(token_supply)?; + .finish_output()?; println!("{nft_output:#?}"); diff --git a/sdk/examples/how_tos/account/implicit_account_creation.rs b/sdk/examples/how_tos/account/implicit_account_creation.rs new file mode 100644 index 0000000000..9f565da0b8 --- /dev/null +++ b/sdk/examples/how_tos/account/implicit_account_creation.rs @@ -0,0 +1,38 @@ +// Copyright 2023 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +//! In this example, we create an implicit account creation address. +//! +//! Rename `.env.example` to `.env` first, then run the command: +//! ```sh +//! cargo run --release --all-features --example implicit_account_creation +//! ``` + +use iota_sdk::{ + client::{constants::SHIMMER_COIN_TYPE, secret::SecretManager}, + crypto::keys::bip44::Bip44, + wallet::{ClientOptions, Result, Wallet}, +}; + +#[tokio::main] +async fn main() -> Result<()> { + //  This example uses secrets in environment variables for simplicity which should not be done in production. + dotenvy::dotenv().ok(); + + let secret_manager = SecretManager::try_from_mnemonic(std::env::var("MNEMONIC").unwrap())?; + let client_options = ClientOptions::new().with_node("https://api.testnet.shimmer.network")?; + + let wallet = Wallet::builder() + .with_secret_manager(secret_manager) + .with_client_options(client_options) + .with_storage_path("implicit_account_creation") + .with_bip_path(Bip44::new(SHIMMER_COIN_TYPE)) + .finish() + .await?; + + let implicit_account_creation_address = wallet.implicit_account_creation_address().await?; + + println!("{implicit_account_creation_address}"); + + Ok(()) +} diff --git a/sdk/examples/how_tos/accounts_and_addresses/check_balance.rs b/sdk/examples/how_tos/accounts_and_addresses/check_balance.rs index e9ec8f0095..ab200fa677 100644 --- a/sdk/examples/how_tos/accounts_and_addresses/check_balance.rs +++ b/sdk/examples/how_tos/accounts_and_addresses/check_balance.rs @@ -11,7 +11,7 @@ //! cargo run --release --all-features --example check_balance //! ``` -use iota_sdk::{types::block::address::ToBech32Ext, wallet::Result, Wallet}; +use iota_sdk::{wallet::Result, Wallet}; #[tokio::main] async fn main() -> Result<()> { diff --git a/sdk/examples/how_tos/accounts_and_addresses/consolidate_outputs.rs b/sdk/examples/how_tos/accounts_and_addresses/consolidate_outputs.rs index 08fb4a564d..bb08f13690 100644 --- a/sdk/examples/how_tos/accounts_and_addresses/consolidate_outputs.rs +++ b/sdk/examples/how_tos/accounts_and_addresses/consolidate_outputs.rs @@ -42,7 +42,7 @@ async fn main() -> Result<()> { // unlock condition and it is an `AddressUnlockCondition`, and so they are valid for consolidation. They have the // same `AddressUnlockCondition`(the address of the wallet), so they will be consolidated into one // output. - let outputs = wallet.unspent_outputs(None).await?; + let outputs = wallet.unspent_outputs(None).await; println!("Outputs BEFORE consolidation:"); outputs.iter().enumerate().for_each(|(i, output_data)| { println!("OUTPUT #{i}"); @@ -78,7 +78,7 @@ async fn main() -> Result<()> { println!("Wallet synced"); // Outputs after consolidation - let outputs = wallet.unspent_outputs(None).await?; + let outputs = wallet.unspent_outputs(None).await; println!("Outputs AFTER consolidation:"); outputs.iter().enumerate().for_each(|(i, output_data)| { println!("OUTPUT #{i}"); diff --git a/sdk/examples/how_tos/accounts_and_addresses/list_outputs.rs b/sdk/examples/how_tos/accounts_and_addresses/list_outputs.rs index b125b8a051..9c732c4831 100644 --- a/sdk/examples/how_tos/accounts_and_addresses/list_outputs.rs +++ b/sdk/examples/how_tos/accounts_and_addresses/list_outputs.rs @@ -25,13 +25,13 @@ async fn main() -> Result<()> { // Print output ids println!("Output ids:"); - for output in wallet.outputs(None).await? { + for output in wallet.outputs(None).await { println!("{}", output.output_id); } // Print unspent output ids println!("Unspent output ids:"); - for output in wallet.unspent_outputs(None).await? { + for output in wallet.unspent_outputs(None).await { println!("{}", output.output_id); } diff --git a/sdk/examples/how_tos/advanced_transactions/advanced_transaction.rs b/sdk/examples/how_tos/advanced_transactions/advanced_transaction.rs index 17aa0c7792..7c9ba9c99a 100644 --- a/sdk/examples/how_tos/advanced_transactions/advanced_transaction.rs +++ b/sdk/examples/how_tos/advanced_transactions/advanced_transaction.rs @@ -48,7 +48,7 @@ async fn main() -> Result<()> { "rms1qpszqzadsym6wpppd6z037dvlejmjuke7s24hm95s9fg9vpua7vluaw60xu", )?)) .add_unlock_condition(TimelockUnlockCondition::new(slot_index)?) - .finish_output(wallet.client().get_token_supply().await?)?; + .finish_output()?; let transaction = wallet.send_outputs(vec![basic_output], None).await?; println!("Transaction sent: {}", transaction.transaction_id); diff --git a/sdk/examples/how_tos/nfts/mint_nft.rs b/sdk/examples/how_tos/nfts/mint_nft.rs index be2a795532..b1af051b4c 100644 --- a/sdk/examples/how_tos/nfts/mint_nft.rs +++ b/sdk/examples/how_tos/nfts/mint_nft.rs @@ -84,14 +84,13 @@ async fn main() -> Result<()> { println!("Minted NFT 1"); // Build an NFT manually by using the `NftOutputBuilder` - let token_supply = wallet.client().get_token_supply().await?; let outputs = [ // address of the owner of the NFT NftOutputBuilder::new_with_amount(NFT2_AMOUNT, NftId::null()) .add_unlock_condition(AddressUnlockCondition::new(sender_address.clone())) .add_feature(SenderFeature::new(sender_address.clone())) .add_immutable_feature(IssuerFeature::new(sender_address)) - .finish_output(token_supply)?, + .finish_output()?, ]; let transaction = wallet.send_outputs(outputs, None).await?; diff --git a/sdk/examples/how_tos/outputs/features.rs b/sdk/examples/how_tos/outputs/features.rs index 97ae44ceb9..95a7b2284d 100644 --- a/sdk/examples/how_tos/outputs/features.rs +++ b/sdk/examples/how_tos/outputs/features.rs @@ -31,7 +31,6 @@ async fn main() -> Result<()> { // Create a client instance. let client = Client::builder().with_node(&node_url)?.finish().await?; - let token_supply = client.get_token_supply().await?; let rent_structure = client.get_rent_structure().await?; let address = Address::try_from_bech32("rms1qpllaj0pyveqfkwxmnngz2c488hfdtmfrj3wfkgxtk4gtyrax0jaxzt70zy")?; @@ -44,26 +43,26 @@ async fn main() -> Result<()> { nft_output_builder .clone() .add_feature(SenderFeature::new(address.clone())) - .finish_output(token_supply)?, + .finish_output()?, // with issuer feature nft_output_builder .clone() .add_immutable_feature(IssuerFeature::new(address)) - .finish_output(token_supply)?, + .finish_output()?, // with metadata feature block nft_output_builder .clone() .add_feature(MetadataFeature::new("Hello, World!")?) - .finish_output(token_supply)?, + .finish_output()?, // with immutable metadata feature block nft_output_builder .clone() .add_immutable_feature(MetadataFeature::new("Hello, World!")?) - .finish_output(token_supply)?, + .finish_output()?, // with tag feature nft_output_builder .add_feature(TagFeature::new("Hello, World!")?) - .finish_output(token_supply)?, + .finish_output()?, ]; // Convert ouput array to json array diff --git a/sdk/examples/how_tos/outputs/unlock_conditions.rs b/sdk/examples/how_tos/outputs/unlock_conditions.rs index ae74660100..60f566af70 100644 --- a/sdk/examples/how_tos/outputs/unlock_conditions.rs +++ b/sdk/examples/how_tos/outputs/unlock_conditions.rs @@ -48,7 +48,7 @@ async fn main() -> Result<()> { let outputs = [ //// most simple output - basic_output_builder.clone().finish_output(token_supply)?, + basic_output_builder.clone().finish_output()?, // with storage deposit return unlock condition basic_output_builder .clone() @@ -57,22 +57,22 @@ async fn main() -> Result<()> { 1000000, token_supply, )?) - .finish_output(token_supply)?, + .finish_output()?, // with timeout unlock condition basic_output_builder .clone() .add_unlock_condition(TimelockUnlockCondition::new(1)?) - .finish_output(token_supply)?, + .finish_output()?, // with expiration unlock condition basic_output_builder .add_unlock_condition(ExpirationUnlockCondition::new(address.clone(), 1)?) - .finish_output(token_supply)?, + .finish_output()?, // with immutable account unlock condition foundry_output_builder .add_unlock_condition(ImmutableAccountAddressUnlockCondition::new( *account_address.as_account(), )) - .finish_output(token_supply)?, + .finish_output()?, ]; // Convert ouput array to json array diff --git a/sdk/examples/wallet/17_check_unlock_conditions.rs b/sdk/examples/wallet/17_check_unlock_conditions.rs index 6a40bd3cfc..f961427fb5 100644 --- a/sdk/examples/wallet/17_check_unlock_conditions.rs +++ b/sdk/examples/wallet/17_check_unlock_conditions.rs @@ -11,10 +11,7 @@ //! ``` use iota_sdk::{ - types::block::{ - address::Bech32Address, - output::{unlock_condition::AddressUnlockCondition, BasicOutputBuilder, UnlockCondition}, - }, + types::block::output::{unlock_condition::AddressUnlockCondition, BasicOutputBuilder, UnlockCondition}, wallet::Result, Wallet, }; @@ -38,7 +35,7 @@ async fn main() -> Result<()> { let output = BasicOutputBuilder::new_with_amount(AMOUNT) .add_unlock_condition(AddressUnlockCondition::new(wallet_address.clone())) - .finish_output(wallet.client().get_token_supply().await?)?; + .finish_output()?; let controlled_by_account = if let [UnlockCondition::Address(address_unlock_condition)] = output .unlock_conditions() diff --git a/sdk/examples/wallet/events.rs b/sdk/examples/wallet/events.rs index 9357ae6892..c2e2d99ec5 100644 --- a/sdk/examples/wallet/events.rs +++ b/sdk/examples/wallet/events.rs @@ -56,7 +56,7 @@ async fn main() -> Result<()> { // send transaction let outputs = [BasicOutputBuilder::new_with_amount(SEND_AMOUNT) .add_unlock_condition(AddressUnlockCondition::new(Address::try_from_bech32(RECV_ADDRESS)?)) - .finish_output(wallet.client().get_token_supply().await?)?]; + .finish_output()?]; let transaction = wallet.send_outputs(outputs, None).await?; println!("Transaction sent: {}", transaction.transaction_id); diff --git a/sdk/examples/wallet/offline_signing/0_generate_address.rs b/sdk/examples/wallet/offline_signing/0_generate_address.rs index bc5f4a8330..fa14f84112 100644 --- a/sdk/examples/wallet/offline_signing/0_generate_address.rs +++ b/sdk/examples/wallet/offline_signing/0_generate_address.rs @@ -10,7 +10,7 @@ use iota_sdk::{ client::{ - constants::{SHIMMER_BECH32_HRP, SHIMMER_COIN_TYPE}, + constants::SHIMMER_COIN_TYPE, secret::{stronghold::StrongholdSecretManager, SecretManager}, }, crypto::keys::{bip39::Mnemonic, bip44::Bip44}, diff --git a/sdk/examples/wallet/spammer.rs b/sdk/examples/wallet/spammer.rs index d16c621fea..9387836fd1 100644 --- a/sdk/examples/wallet/spammer.rs +++ b/sdk/examples/wallet/spammer.rs @@ -74,7 +74,7 @@ async fn main() -> Result<()> { output_types: Some(vec![BasicOutput::KIND]), ..Default::default() }) - .await? + .await .iter() .filter(|data| data.output.amount() >= SEND_AMOUNT) .count(); diff --git a/sdk/src/client/api/block_builder/input_selection/remainder.rs b/sdk/src/client/api/block_builder/input_selection/remainder.rs index f9bb877585..e7442dcdd0 100644 --- a/sdk/src/client/api/block_builder/input_selection/remainder.rs +++ b/sdk/src/client/api/block_builder/input_selection/remainder.rs @@ -75,12 +75,7 @@ impl InputSelection { remainder_builder = remainder_builder.with_native_tokens(native_tokens); } - Ok(( - remainder_builder - .finish_output(self.protocol_parameters.token_supply())? - .amount(), - native_tokens_remainder, - )) + Ok((remainder_builder.finish_output()?.amount(), native_tokens_remainder)) } pub(crate) fn remainder_and_storage_deposit_return_outputs( @@ -97,7 +92,7 @@ impl InputSelection { let diff = amount - output_sdr_amount; let srd_output = BasicOutputBuilder::new_with_amount(diff) .with_unlock_conditions([AddressUnlockCondition::new(address.clone())]) - .finish_output(self.protocol_parameters.token_supply())?; + .finish_output()?; // TODO verify_storage_deposit ? @@ -141,14 +136,11 @@ impl InputSelection { remainder_builder = remainder_builder.with_native_tokens(native_tokens); } - let remainder = remainder_builder.finish_output(self.protocol_parameters.token_supply())?; + let remainder = remainder_builder.finish_output()?; log::debug!("Created remainder output of {diff} for {remainder_address:?}"); - remainder.verify_storage_deposit( - self.protocol_parameters.rent_structure(), - self.protocol_parameters.token_supply(), - )?; + remainder.verify_storage_deposit(self.protocol_parameters.rent_structure())?; Ok(( Some(RemainderData { diff --git a/sdk/src/client/api/block_builder/input_selection/requirement/amount.rs b/sdk/src/client/api/block_builder/input_selection/requirement/amount.rs index c3a4d097a9..de78c4aaa9 100644 --- a/sdk/src/client/api/block_builder/input_selection/requirement/amount.rs +++ b/sdk/src/client/api/block_builder/input_selection/requirement/amount.rs @@ -249,13 +249,13 @@ impl InputSelection { let new_output = match output { Output::Account(output) => AccountOutputBuilder::from(&*output) .with_amount(new_amount) - .finish_output(self.protocol_parameters.token_supply())?, + .finish_output()?, Output::Foundry(output) => FoundryOutputBuilder::from(&*output) .with_amount(new_amount) - .finish_output(self.protocol_parameters.token_supply())?, + .finish_output()?, Output::Nft(output) => NftOutputBuilder::from(&*output) .with_amount(new_amount) - .finish_output(self.protocol_parameters.token_supply())?, + .finish_output()?, _ => panic!("only account, nft and foundry can be automatically created"), }; diff --git a/sdk/src/client/api/block_builder/input_selection/transition.rs b/sdk/src/client/api/block_builder/input_selection/transition.rs index 44141ff90c..18344028c6 100644 --- a/sdk/src/client/api/block_builder/input_selection/transition.rs +++ b/sdk/src/client/api/block_builder/input_selection/transition.rs @@ -60,7 +60,7 @@ impl InputSelection { .with_foundry_counter(u32::max(highest_foundry_serial_number, input.foundry_counter())) .with_features(features); - let output = builder.finish_output(self.protocol_parameters.token_supply())?; + let output = builder.finish_output()?; self.automatically_transitioned.insert(ChainId::from(account_id)); @@ -100,7 +100,7 @@ impl InputSelection { let output = NftOutputBuilder::from(input) .with_nft_id(nft_id) .with_features(features) - .finish_output(self.protocol_parameters.token_supply())?; + .finish_output()?; self.automatically_transitioned.insert(ChainId::from(nft_id)); @@ -138,7 +138,7 @@ impl InputSelection { return Ok(None); } - let output = FoundryOutputBuilder::from(input).finish_output(self.protocol_parameters.token_supply())?; + let output = FoundryOutputBuilder::from(input).finish_output()?; self.automatically_transitioned.insert(ChainId::from(foundry_id)); diff --git a/sdk/src/client/mod.rs b/sdk/src/client/mod.rs index 7f6d79f8a3..e7ec504a6b 100644 --- a/sdk/src/client/mod.rs +++ b/sdk/src/client/mod.rs @@ -7,21 +7,27 @@ //! //! ## Sending a block without a payload //! ```no_run -//! # use iota_sdk::client::{Client, Result}; +//! # use iota_sdk::{ +//! # client::{Client, secret::{mnemonic::MnemonicSecretManager, SignBlock}, constants::IOTA_COIN_TYPE}, +//! # types::block::IssuerId, crypto::keys::bip44::Bip44 +//! # }; //! # #[tokio::main] -//! # async fn main() -> Result<()> { +//! # async fn main() -> Result<(), Box> { //! let client = Client::builder() //! .with_node("http://localhost:14265")? //! .finish() //! .await?; -//! -//! let block = client -//! .block() -//! .finish() -//! .await?; -//! -//! println!("Block sent {}", block.id()); -//! # Ok(())} +//! let secret_manager = MnemonicSecretManager::try_from_mnemonic(std::env::var("MNEMONIC")?)?; +//! let protocol_params = client.get_protocol_parameters().await?; +//! let block_id = client +//! .build_basic_block(IssuerId::null(), None) +//! .await? +//! .sign_ed25519(&secret_manager, Bip44::new(IOTA_COIN_TYPE)) +//! .await? +//! .id(&protocol_params); +//! println!("Block sent {}", block_id); +//! # Ok(()) +//! # } //! ``` #[cfg(feature = "mqtt")] diff --git a/sdk/src/client/utils.rs b/sdk/src/client/utils.rs index ce7f79de12..da07957425 100644 --- a/sdk/src/client/utils.rs +++ b/sdk/src/client/utils.rs @@ -33,6 +33,7 @@ pub fn bech32_to_hex(bech32: impl ConvertTo) -> Result { Address::Nft(nft) => nft.to_string(), Address::Anchor(anchor) => anchor.to_string(), Address::ImplicitAccountCreation(implicit) => implicit.to_string(), + Address::Multi(multi) => multi.to_string(), Address::Restricted(restricted) => restricted.to_string(), }) } diff --git a/sdk/src/types/block/address/bech32.rs b/sdk/src/types/block/address/bech32.rs index dd0caa2e1e..cbc8d26d5b 100644 --- a/sdk/src/types/block/address/bech32.rs +++ b/sdk/src/types/block/address/bech32.rs @@ -7,6 +7,7 @@ use alloc::{ }; use core::str::FromStr; +use crypto::hashes::{blake2b::Blake2b256, Digest}; use derive_more::{AsRef, Deref, Display}; use packable::{ error::{UnpackError, UnpackErrorExt}, @@ -15,7 +16,10 @@ use packable::{ Packable, PackableExt, }; -use crate::types::block::{address::Address, ConvertTo, Error}; +use crate::types::block::{ + address::{Address, MultiAddress}, + ConvertTo, Error, +}; #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Deref, Display)] #[repr(transparent)] @@ -172,11 +176,16 @@ impl Bech32Address { impl core::fmt::Display for Bech32Address { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!( - f, - "{}", - bech32::encode::(self.hrp.0, &self.inner.pack_to_vec(),).unwrap() - ) + let bytes = if self.inner.is_multi() { + core::iter::once(MultiAddress::KIND) + .chain(Blake2b256::digest(self.inner.pack_to_vec())) + .collect() + } else { + self.inner.pack_to_vec() + }; + + // PANIC: unwrap is fine as the Bech32Address has been validated at construction. + write!(f, "{}", bech32::encode::(self.hrp.0, &bytes).unwrap()) } } diff --git a/sdk/src/types/block/address/implicit_account_creation.rs b/sdk/src/types/block/address/implicit_account_creation.rs index ecb900e7ab..2d27681af5 100644 --- a/sdk/src/types/block/address/implicit_account_creation.rs +++ b/sdk/src/types/block/address/implicit_account_creation.rs @@ -24,6 +24,11 @@ impl ImplicitAccountCreationAddress { pub fn new(address: [u8; Self::LENGTH]) -> Self { Self(Ed25519Address::new(address)) } + + /// Returns the inner [`Ed25519Address`] of the [`ImplicitAccountCreationAddress`]. + pub fn ed25519_address(&self) -> &Ed25519Address { + &self.0 + } } impl core::fmt::Debug for ImplicitAccountCreationAddress { diff --git a/sdk/src/types/block/address/mod.rs b/sdk/src/types/block/address/mod.rs index fa6dda1a84..4857bf4093 100644 --- a/sdk/src/types/block/address/mod.rs +++ b/sdk/src/types/block/address/mod.rs @@ -6,6 +6,7 @@ mod anchor; mod bech32; mod ed25519; mod implicit_account_creation; +mod multi; mod nft; mod restricted; @@ -14,12 +15,14 @@ use alloc::boxed::Box; use derive_more::{Display, From}; use packable::Packable; +pub(crate) use self::multi::WeightedAddressCount; pub use self::{ account::AccountAddress, anchor::AnchorAddress, bech32::{Bech32Address, Hrp}, ed25519::Ed25519Address, implicit_account_creation::ImplicitAccountCreationAddress, + multi::{MultiAddress, WeightedAddress}, nft::NftAddress, restricted::{AddressCapabilities, AddressCapabilityFlag, RestrictedAddress}, }; @@ -52,6 +55,9 @@ pub enum Address { /// An implicit account creation address. #[packable(tag = ImplicitAccountCreationAddress::KIND)] ImplicitAccountCreation(ImplicitAccountCreationAddress), + /// A multi address. + #[packable(tag = MultiAddress::KIND)] + Multi(MultiAddress), /// An address with restricted capabilities. #[packable(tag = RestrictedAddress::KIND)] #[from(ignore)] @@ -72,6 +78,7 @@ impl core::fmt::Debug for Address { Self::Nft(address) => address.fmt(f), Self::Anchor(address) => address.fmt(f), Self::ImplicitAccountCreation(address) => address.fmt(f), + Self::Multi(address) => address.fmt(f), Self::Restricted(address) => address.fmt(f), } } @@ -86,11 +93,12 @@ impl Address { Self::Nft(_) => NftAddress::KIND, Self::Anchor(_) => AnchorAddress::KIND, Self::ImplicitAccountCreation(_) => ImplicitAccountCreationAddress::KIND, + Self::Multi(_) => MultiAddress::KIND, Self::Restricted(_) => RestrictedAddress::KIND, } } - crate::def_is_as_opt!(Address: Ed25519, Account, Nft, Anchor, ImplicitAccountCreation, Restricted); + crate::def_is_as_opt!(Address: Ed25519, Account, Nft, Anchor, ImplicitAccountCreation, Multi, Restricted); /// Tries to create an [`Address`] from a bech32 encoded string. pub fn try_from_bech32(address: impl AsRef) -> Result { @@ -126,7 +134,7 @@ impl Address { context.unlocked_addresses.insert(self.clone()); } - (Self::Ed25519(_ed25519_address), Unlock::Reference(_unlock)) => { + (Self::Ed25519(_), Unlock::Reference(_)) => { // TODO actually check that it was unlocked by the same signature. if !context.unlocked_addresses.contains(self) { return Err(TransactionFailureReason::InvalidInputUnlock); @@ -160,6 +168,27 @@ impl Address { } // TODO maybe shouldn't be a semantic error but this function currently returns a TransactionFailureReason. (Self::Anchor(_), _) => return Err(TransactionFailureReason::SemanticValidationFailed), + (Self::ImplicitAccountCreation(implicit_account_creation_address), _) => { + return Self::from(*implicit_account_creation_address.ed25519_address()).unlock(unlock, context); + } + (Self::Multi(multi_address), Unlock::Multi(unlock)) => { + if multi_address.len() != unlock.len() { + return Err(TransactionFailureReason::InvalidInputUnlock); + } + + let mut cumulative_unlocked_weight = 0u16; + + for (address, unlock) in multi_address.addresses().iter().zip(unlock.unlocks()) { + if !unlock.is_empty() { + address.unlock(unlock, context)?; + cumulative_unlocked_weight += address.weight() as u16; + } + } + + if cumulative_unlocked_weight < multi_address.threshold() { + return Err(TransactionFailureReason::InvalidInputUnlock); + } + } _ => return Err(TransactionFailureReason::InvalidInputUnlock), } diff --git a/sdk/src/types/block/address/multi.rs b/sdk/src/types/block/address/multi.rs new file mode 100644 index 0000000000..36fdc297a0 --- /dev/null +++ b/sdk/src/types/block/address/multi.rs @@ -0,0 +1,238 @@ +// Copyright 2023 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +use alloc::{boxed::Box, string::ToString, vec::Vec}; +use core::{fmt, ops::RangeInclusive}; + +use derive_more::{AsRef, Deref, Display, From}; +use iterator_sorted::is_unique_sorted; +use packable::{ + bounded::BoundedU8, + error::{UnpackError, UnpackErrorExt}, + packer::Packer, + prefix::BoxedSlicePrefix, + unpacker::Unpacker, + Packable, +}; + +use crate::types::block::{address::Address, Error}; + +pub(crate) type WeightedAddressCount = + BoundedU8<{ *MultiAddress::ADDRESSES_COUNT.start() }, { *MultiAddress::ADDRESSES_COUNT.end() }>; + +/// An address with an assigned weight. +#[derive(Clone, Debug, Display, Eq, PartialEq, Ord, PartialOrd, Hash, From, AsRef, Deref, Packable)] +#[display(fmt = "{address}")] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct WeightedAddress { + /// The unlocked address. + #[deref] + #[packable(verify_with = verify_address)] + address: Address, + /// The weight of the unlocked address. + #[packable(verify_with = verify_weight)] + weight: u8, +} + +impl WeightedAddress { + /// Creates a new [`WeightedAddress`]. + pub fn new(address: Address, weight: u8) -> Result { + verify_address::(&address, &())?; + verify_weight::(&weight, &())?; + + Ok(Self { address, weight }) + } + + /// Returns the address of the [`WeightedAddress`]. + pub fn address(&self) -> &Address { + &self.address + } + + /// Returns the weight of the [`WeightedAddress`]. + pub fn weight(&self) -> u8 { + self.weight + } +} + +fn verify_address(address: &Address, _visitor: &()) -> Result<(), Error> { + if VERIFY { + if !matches!( + address, + Address::Ed25519(_) | Address::Account(_) | Address::Nft(_) | Address::Anchor(_) + ) { + return Err(Error::InvalidAddressKind(address.kind())); + } + } + Ok(()) +} + +fn verify_weight(weight: &u8, _visitor: &()) -> Result<(), Error> { + if VERIFY && *weight == 0 { + return Err(Error::InvalidAddressWeight(*weight)); + } else { + Ok(()) + } +} + +/// An address that consists of addresses with weights and a threshold value. +/// The Multi Address can be unlocked if the cumulative weight of all unlocked addresses is equal to or exceeds the +/// threshold. +#[derive(Clone, Debug, Deref, Eq, PartialEq, Ord, PartialOrd, Hash)] +pub struct MultiAddress { + /// The weighted unlocked addresses. + #[deref] + addresses: BoxedSlicePrefix, + /// The threshold that needs to be reached by the unlocked addresses in order to unlock the multi address. + threshold: u16, +} + +impl MultiAddress { + /// The [`Address`](crate::types::block::address::Address) kind of a [`MultiAddress`]. + pub const KIND: u8 = 40; + /// The allowed range of inner [`Address`]es. + pub const ADDRESSES_COUNT: RangeInclusive = 1..=10; + + /// Creates a new [`MultiAddress`]. + #[inline(always)] + pub fn new(addresses: impl IntoIterator, threshold: u16) -> Result { + let addresses = addresses.into_iter().collect::>(); + + verify_addresses::(&addresses, &())?; + verify_threshold::(&threshold, &())?; + + let addresses = BoxedSlicePrefix::::try_from(addresses) + .map_err(Error::InvalidWeightedAddressCount)?; + + verify_cumulative_weight::(&addresses, &threshold, &())?; + + Ok(Self { addresses, threshold }) + } + + /// Returns the addresses of a [`MultiAddress`]. + #[inline(always)] + pub fn addresses(&self) -> &[WeightedAddress] { + &self.addresses + } + + /// Returns the threshold of a [`MultiAddress`]. + #[inline(always)] + pub fn threshold(&self) -> u16 { + self.threshold + } +} + +impl Packable for MultiAddress { + type UnpackError = Error; + type UnpackVisitor = (); + + #[inline] + fn pack(&self, packer: &mut P) -> Result<(), P::Error> { + self.addresses.pack(packer)?; + self.threshold.pack(packer)?; + + Ok(()) + } + + #[inline] + fn unpack( + unpacker: &mut U, + visitor: &Self::UnpackVisitor, + ) -> Result> { + let addresses = + BoxedSlicePrefix::::unpack::<_, VERIFY>(unpacker, visitor) + .map_packable_err(|e| e.unwrap_item_err_or_else(|e| Error::InvalidWeightedAddressCount(e.into())))?; + + verify_addresses::(&addresses, &()).map_err(UnpackError::Packable)?; + + let threshold = u16::unpack::<_, VERIFY>(unpacker, visitor).coerce()?; + + verify_threshold::(&threshold, &()).map_err(UnpackError::Packable)?; + verify_cumulative_weight::(&addresses, &threshold, &()).map_err(UnpackError::Packable)?; + + Ok(Self { addresses, threshold }) + } +} + +fn verify_addresses(addresses: &[WeightedAddress], _visitor: &()) -> Result<(), Error> { + if VERIFY && !is_unique_sorted(addresses.iter().map(WeightedAddress::address)) { + return Err(Error::WeightedAddressesNotUniqueSorted); + } else { + Ok(()) + } +} + +fn verify_threshold(threshold: &u16, _visitor: &()) -> Result<(), Error> { + if VERIFY && *threshold == 0 { + return Err(Error::InvalidMultiAddressThreshold(*threshold)); + } else { + Ok(()) + } +} + +fn verify_cumulative_weight( + addresses: &[WeightedAddress], + threshold: &u16, + _visitor: &(), +) -> Result<(), Error> { + if VERIFY { + let cumulative_weight = addresses.iter().map(|address| address.weight as u16).sum::(); + + if cumulative_weight < *threshold { + return Err(Error::InvalidMultiAddressCumulativeWeight { + cumulative_weight, + threshold: *threshold, + }); + } + } + Ok(()) +} + +impl fmt::Display for MultiAddress { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!( + f, + "[{}]", + self.addresses() + .iter() + .map(|address| address.to_string()) + .collect::>() + .join(", ") + ) + } +} + +#[cfg(feature = "serde")] +mod dto { + use serde::{Deserialize, Serialize}; + + use super::*; + + #[derive(Serialize, Deserialize)] + #[serde(rename_all = "camelCase")] + struct MultiAddressDto { + #[serde(rename = "type")] + kind: u8, + addresses: Vec, + threshold: u16, + } + + impl From<&MultiAddress> for MultiAddressDto { + fn from(value: &MultiAddress) -> Self { + Self { + kind: MultiAddress::KIND, + addresses: value.addresses.to_vec(), + threshold: value.threshold, + } + } + } + + impl TryFrom for MultiAddress { + type Error = Error; + + fn try_from(value: MultiAddressDto) -> Result { + Self::new(value.addresses, value.threshold) + } + } + + crate::impl_serde_typed_dto!(MultiAddress, MultiAddressDto, "multi address"); +} diff --git a/sdk/src/types/block/address/restricted.rs b/sdk/src/types/block/address/restricted.rs index 0ef8024ca0..c2bd73cc3a 100644 --- a/sdk/src/types/block/address/restricted.rs +++ b/sdk/src/types/block/address/restricted.rs @@ -157,12 +157,9 @@ pub type AddressCapabilities = Capabilities; #[cfg(feature = "serde")] pub(crate) mod dto { - use alloc::boxed::Box; - use serde::{Deserialize, Serialize}; use super::*; - use crate::utils::serde::prefix_hex_bytes; #[derive(Serialize, Deserialize)] #[serde(rename_all = "camelCase")] @@ -170,8 +167,8 @@ pub(crate) mod dto { #[serde(rename = "type")] kind: u8, pub address: Address, - #[serde(with = "prefix_hex_bytes")] - pub allowed_capabilities: Box<[u8]>, + #[serde(default, skip_serializing_if = "AddressCapabilities::is_none")] + pub allowed_capabilities: AddressCapabilities, } impl core::ops::Deref for RestrictedAddressDto { @@ -187,7 +184,7 @@ pub(crate) mod dto { Self { kind: RestrictedAddress::KIND, address: value.address.clone(), - allowed_capabilities: value.allowed_capabilities.iter().copied().collect(), + allowed_capabilities: value.allowed_capabilities.clone(), } } } @@ -196,14 +193,7 @@ pub(crate) mod dto { type Error = Error; fn try_from(value: RestrictedAddressDto) -> Result { - Ok( - Self::new(value.address)?.with_allowed_capabilities(AddressCapabilities::from_bytes( - value - .allowed_capabilities - .try_into() - .map_err(Error::InvalidCapabilitiesCount)?, - )), - ) + Ok(Self::new(value.address)?.with_allowed_capabilities(value.allowed_capabilities)) } } diff --git a/sdk/src/types/block/capabilities.rs b/sdk/src/types/block/capabilities.rs index 1985e43aa6..d647be374c 100644 --- a/sdk/src/types/block/capabilities.rs +++ b/sdk/src/types/block/capabilities.rs @@ -6,11 +6,13 @@ use core::marker::PhantomData; use derive_more::Deref; use packable::{ - error::UnpackErrorExt, + error::{UnpackError, UnpackErrorExt}, prefix::{BoxedSlicePrefix, UnpackPrefixError}, Packable, }; +use crate::types::block::Error; + /// A list of bitflags that represent capabilities. #[derive(Debug, Deref)] #[repr(transparent)] @@ -21,13 +23,6 @@ pub struct Capabilities { } impl Capabilities { - pub(crate) fn from_bytes(bytes: BoxedSlicePrefix) -> Self { - Self { - bytes, - _flag: PhantomData, - } - } - /// Returns a [`Capabilities`] with every possible flag disabled. pub fn none() -> Self { Self::default() @@ -37,9 +32,44 @@ impl Capabilities { pub fn is_none(&self) -> bool { self.iter().all(|b| 0.eq(b)) } + + /// Disables every possible flag. + pub fn set_none(&mut self) -> &mut Self { + *self = Default::default(); + self + } } impl Capabilities { + /// Try to create capabilities from serialized bytes. Bytes with trailing zeroes are invalid. + pub fn from_bytes(bytes: impl Into>) -> Result { + Self::from_prefix_box_slice(bytes.into().try_into().map_err(Error::InvalidCapabilitiesCount)?) + } + + /// Try to create capabilities from serialized bytes. Bytes with trailing zeroes are invalid. + pub(crate) fn from_prefix_box_slice(bytes: BoxedSlicePrefix) -> Result { + // Check if there is a trailing zero. + if bytes.last().map(|b| *b == 0).unwrap_or_default() { + return Err(Error::TrailingCapabilityBytes); + } + // Check if the bytes are valid instances of the flag type. + for (index, &byte) in bytes.iter().enumerate() { + // Get the max value of the flags at this index + let mut b = 0; + for flag in Flag::all().filter(|f| f.index() == index) { + b |= flag.as_byte(); + } + // Check whether the byte contains erroneous bits by using the max value as a mask + if b | byte != b { + return Err(Error::InvalidCapabilityByte { index, byte }); + } + } + Ok(Self { + bytes, + _flag: PhantomData, + }) + } + /// Returns a [`Capabilities`] with every possible flag enabled. pub fn all() -> Self { let mut res = Self::default(); @@ -60,12 +90,6 @@ impl Capabilities { self } - /// Disables every possible flag. - pub fn set_none(&mut self) -> &mut Self { - *self = Default::default(); - self - } - /// Enables a given flag. pub fn add_capability(&mut self, flag: Flag) -> &mut Self { if self.bytes.len() <= flag.index() { @@ -168,30 +192,27 @@ impl, Flag: CapabilityFlag> From for Capabilitie } } -impl Packable for Capabilities { +impl Packable for Capabilities { type UnpackError = crate::types::block::Error; type UnpackVisitor = (); fn pack(&self, packer: &mut P) -> Result<(), P::Error> { - if !self.is_none() { - self.bytes.pack(packer)?; - } else { - 0_u8.pack(packer)?; - } + self.bytes.pack(packer)?; Ok(()) } fn unpack( unpacker: &mut U, visitor: &Self::UnpackVisitor, - ) -> Result> { - Ok(Self::from_bytes( + ) -> Result> { + Self::from_prefix_box_slice( BoxedSlicePrefix::unpack::<_, VERIFY>(unpacker, visitor) .map_packable_err(|e| match e { UnpackPrefixError::Item(i) | UnpackPrefixError::Prefix(i) => i, }) .coerce()?, - )) + ) + .map_err(UnpackError::Packable) } } @@ -207,3 +228,163 @@ pub trait CapabilityFlag { /// Returns an iterator over all flags. fn all() -> Self::Iterator; } + +#[cfg(feature = "serde")] +mod serde { + use ::serde::{Deserialize, Serialize}; + + use super::*; + + impl Serialize for Capabilities { + fn serialize(&self, serializer: S) -> Result + where + S: ::serde::Serializer, + { + crate::utils::serde::boxed_slice_prefix_hex_bytes::serialize(&self.bytes, serializer) + } + } + + impl<'de, Flag: CapabilityFlag> Deserialize<'de> for Capabilities { + fn deserialize(deserializer: D) -> Result + where + D: ::serde::Deserializer<'de>, + { + Self::from_prefix_box_slice(crate::utils::serde::boxed_slice_prefix_hex_bytes::deserialize( + deserializer, + )?) + .map_err(::serde::de::Error::custom) + } + } +} + +#[cfg(test)] +mod test { + use pretty_assertions::assert_eq; + + use super::*; + + #[derive(Debug)] + #[allow(unused)] + enum TestFlag { + Val1, + Val2, + Val3, + Val4, + Val5, + Val6, + Val7, + Val8, + Val9, + } + + impl TestFlag { + const VAL_1: u8 = 0b00000001; + const VAL_2: u8 = 0b00000010; + const VAL_3: u8 = 0b00000100; + const VAL_4: u8 = 0b00001000; + const VAL_5: u8 = 0b00010000; + const VAL_6: u8 = 0b00100000; + const VAL_7: u8 = 0b01000000; + const VAL_8: u8 = 0b10000000; + const VAL_9: u8 = 0b00000001; + } + + impl CapabilityFlag for TestFlag { + type Iterator = core::array::IntoIter; + + fn as_byte(&self) -> u8 { + match self { + TestFlag::Val1 => Self::VAL_1, + TestFlag::Val2 => Self::VAL_2, + TestFlag::Val3 => Self::VAL_3, + TestFlag::Val4 => Self::VAL_4, + TestFlag::Val5 => Self::VAL_5, + TestFlag::Val6 => Self::VAL_6, + TestFlag::Val7 => Self::VAL_7, + TestFlag::Val8 => Self::VAL_8, + TestFlag::Val9 => Self::VAL_9, + } + } + + fn index(&self) -> usize { + match self { + TestFlag::Val1 + | TestFlag::Val2 + | TestFlag::Val3 + | TestFlag::Val4 + | TestFlag::Val5 + | TestFlag::Val6 + | TestFlag::Val7 + | TestFlag::Val8 => 0, + TestFlag::Val9 => 1, + } + } + + fn all() -> Self::Iterator { + [ + Self::Val1, + Self::Val2, + Self::Val3, + Self::Val4, + Self::Val5, + Self::Val6, + Self::Val7, + Self::Val8, + Self::Val9, + ] + .into_iter() + } + } + + #[test] + fn test_valid() { + let capability_bytes = [TestFlag::VAL_1 | TestFlag::VAL_3 | TestFlag::VAL_4]; + let deser = Capabilities::::from_bytes(capability_bytes).unwrap(); + let built = Capabilities::default().with_capabilities([TestFlag::Val1, TestFlag::Val3, TestFlag::Val4]); + assert_eq!(deser, built); + + let capability_bytes = [0, TestFlag::VAL_9]; + let deser = Capabilities::::from_bytes(capability_bytes).unwrap(); + let built = Capabilities::default().with_capabilities([TestFlag::Val9]); + assert_eq!(deser, built); + } + + #[test] + fn test_out_of_range() { + let capability_bytes = [TestFlag::VAL_1 | TestFlag::VAL_4, TestFlag::VAL_9, TestFlag::VAL_3]; + assert_eq!( + Capabilities::::from_bytes(capability_bytes), + Err(Error::InvalidCapabilityByte { + index: 2, + byte: TestFlag::VAL_3 + }) + ); + } + + #[test] + fn test_trailing() { + let capability_bytes = [0, 0]; + assert_eq!( + Capabilities::::from_bytes(capability_bytes), + Err(Error::TrailingCapabilityBytes) + ); + + let capability_bytes = [TestFlag::VAL_1 | TestFlag::VAL_4, 0]; + assert_eq!( + Capabilities::::from_bytes(capability_bytes), + Err(Error::TrailingCapabilityBytes) + ); + } + + #[test] + fn test_invalid_byte() { + let capability_bytes = [TestFlag::VAL_1 | TestFlag::VAL_3, TestFlag::VAL_9 | TestFlag::VAL_2]; + assert_eq!( + Capabilities::::from_bytes(capability_bytes), + Err(Error::InvalidCapabilityByte { + index: 1, + byte: TestFlag::VAL_9 | TestFlag::VAL_2 + }) + ); + } +} diff --git a/sdk/src/types/block/error.rs b/sdk/src/types/block/error.rs index 33b23839be..7fb39b3728 100644 --- a/sdk/src/types/block/error.rs +++ b/sdk/src/types/block/error.rs @@ -11,6 +11,7 @@ use primitive_types::U256; use super::slot::EpochIndex; use crate::types::block::{ + address::WeightedAddressCount, context_input::RewardContextInputIndex, input::UtxoInput, mana::ManaAllotmentCount, @@ -22,7 +23,7 @@ use crate::types::block::{ }, payload::{ContextInputCount, InputCount, OutputCount, TagLength, TaggedDataLength}, protocol::ProtocolParametersHash, - unlock::{UnlockCount, UnlockIndex}, + unlock::{UnlockCount, UnlockIndex, UnlocksCount}, }; /// Error occurring when creating/parsing/validating blocks. @@ -70,6 +71,16 @@ pub enum Error { deposit: u64, required: u64, }, + InvalidAddressWeight(u8), + InvalidMultiAddressThreshold(u16), + InvalidMultiAddressCumulativeWeight { + cumulative_weight: u16, + threshold: u16, + }, + InvalidWeightedAddressCount(>::Error), + InvalidMultiUnlockCount(>::Error), + MultiUnlockRecursion, + WeightedAddressesNotUniqueSorted, InvalidContextInputKind(u8), InvalidContextInputCount(>::Error), InvalidFeatureCount(>::Error), @@ -85,6 +96,10 @@ pub enum Error { InvalidInputOutputIndex(>::Error), InvalidBech32Hrp(Bech32HrpError), InvalidCapabilitiesCount(>::Error), + InvalidCapabilityByte { + index: usize, + byte: u8, + }, InvalidSignedBlockLength(usize), InvalidStateMetadataLength(>::Error), InvalidManaValue(u64), @@ -184,6 +199,7 @@ pub enum Error { created: EpochIndex, target: EpochIndex, }, + TrailingCapabilityBytes, } #[cfg(feature = "std")] @@ -228,6 +244,9 @@ impl fmt::Display for Error { Self::InvalidAnchorIndex(index) => write!(f, "invalid anchor index: {index}"), Self::InvalidBech32Hrp(e) => write!(f, "invalid bech32 hrp: {e}"), Self::InvalidCapabilitiesCount(e) => write!(f, "invalid capabilities count: {e}"), + Self::InvalidCapabilityByte { index, byte } => { + write!(f, "invalid capability byte at index {index}: {byte:x}") + } Self::InvalidBlockKind(k) => write!(f, "invalid block kind: {k}"), Self::InvalidRewardInputIndex(idx) => write!(f, "invalid reward input index: {idx}"), Self::InvalidStorageDepositAmount(amount) => { @@ -253,6 +272,23 @@ impl fmt::Display for Error { "storage deposit return of {deposit} exceeds the original output amount of {amount}" ), Self::InvalidContextInputCount(count) => write!(f, "invalid context input count: {count}"), + Self::InvalidAddressWeight(w) => write!(f, "invalid address weight: {w}"), + Self::InvalidMultiAddressThreshold(t) => write!(f, "invalid multi address threshold: {t}"), + Self::InvalidMultiAddressCumulativeWeight { + cumulative_weight, + threshold, + } => { + write!( + f, + "invalid multi address cumulative weight {cumulative_weight} < threshold {threshold}" + ) + } + Self::InvalidWeightedAddressCount(count) => write!(f, "invalid weighted address count: {count}"), + Self::InvalidMultiUnlockCount(count) => write!(f, "invalid multi unlock count: {count}"), + Self::MultiUnlockRecursion => write!(f, "multi unlock recursion"), + Self::WeightedAddressesNotUniqueSorted => { + write!(f, "weighted addresses are not unique and/or sorted") + } Self::InvalidContextInputKind(k) => write!(f, "invalid context input kind: {k}"), Self::InvalidFeatureCount(count) => write!(f, "invalid feature count: {count}"), Self::InvalidFeatureKind(k) => write!(f, "invalid feature kind: {k}"), @@ -397,6 +433,7 @@ impl fmt::Display for Error { Self::InvalidEpochDelta { created, target } => { write!(f, "invalid epoch delta: created {created}, target {target}") } + Self::TrailingCapabilityBytes => write!(f, "capability bytes have trailing zeroes"), } } } diff --git a/sdk/src/types/block/output/account.rs b/sdk/src/types/block/output/account.rs index de27285b41..3dee4b05f3 100644 --- a/sdk/src/types/block/output/account.rs +++ b/sdk/src/types/block/output/account.rs @@ -19,9 +19,8 @@ use crate::types::{ unlock_condition::{ verify_allowed_unlock_conditions, UnlockCondition, UnlockConditionFlags, UnlockConditions, }, - verify_output_amount_min, verify_output_amount_packable, verify_output_amount_supply, ChainId, NativeToken, - NativeTokens, Output, OutputBuilderAmount, OutputId, Rent, RentStructure, StateTransitionError, - StateTransitionVerifier, + verify_output_amount_min, verify_output_amount_packable, ChainId, NativeToken, NativeTokens, Output, + OutputBuilderAmount, OutputId, Rent, RentStructure, StateTransitionError, StateTransitionVerifier, }, payload::signed_transaction::TransactionCapabilityFlag, protocol::ProtocolParameters, @@ -271,23 +270,9 @@ impl AccountOutputBuilder { Ok(output) } - /// - pub fn finish_with_params<'a>( - self, - params: impl Into> + Send, - ) -> Result { - let output = self.finish()?; - - if let Some(token_supply) = params.into().token_supply() { - verify_output_amount_supply(output.amount, token_supply)?; - } - - Ok(output) - } - /// Finishes the [`AccountOutputBuilder`] into an [`Output`]. - pub fn finish_output<'a>(self, params: impl Into> + Send) -> Result { - Ok(Output::Account(self.finish_with_params(params)?)) + pub fn finish_output(self) -> Result { + Ok(Output::Account(self.finish()?)) } } @@ -702,7 +687,7 @@ pub(crate) mod dto { builder = builder.add_unlock_condition(UnlockCondition::try_from_dto_with_params(u, ¶ms)?); } - builder.finish_with_params(params) + builder.finish() } } @@ -750,7 +735,7 @@ pub(crate) mod dto { builder = builder.with_immutable_features(immutable_features); } - builder.finish_with_params(params) + builder.finish() } } } @@ -816,7 +801,7 @@ mod tests { &protocol_parameters, ) .unwrap(); - assert_eq!(builder.finish_with_params(&protocol_parameters).unwrap(), output_split); + assert_eq!(builder.finish().unwrap(), output_split); }; let builder = AccountOutput::build_with_amount(100, account_id) diff --git a/sdk/src/types/block/output/anchor.rs b/sdk/src/types/block/output/anchor.rs index c54fd11901..8dccff6276 100644 --- a/sdk/src/types/block/output/anchor.rs +++ b/sdk/src/types/block/output/anchor.rs @@ -21,9 +21,8 @@ use crate::types::{ unlock_condition::{ verify_allowed_unlock_conditions, UnlockCondition, UnlockConditionFlags, UnlockConditions, }, - verify_output_amount_min, verify_output_amount_packable, verify_output_amount_supply, ChainId, NativeToken, - NativeTokens, Output, OutputBuilderAmount, OutputId, Rent, RentStructure, StateTransitionError, - StateTransitionVerifier, + verify_output_amount_min, verify_output_amount_packable, ChainId, NativeToken, NativeTokens, Output, + OutputBuilderAmount, OutputId, Rent, RentStructure, StateTransitionError, StateTransitionVerifier, }, payload::signed_transaction::TransactionCapabilityFlag, protocol::ProtocolParameters, @@ -320,20 +319,9 @@ impl AnchorOutputBuilder { Ok(output) } - /// - pub fn finish_with_params<'a>(self, params: impl Into> + Send) -> Result { - let output = self.finish()?; - - if let Some(token_supply) = params.into().token_supply() { - verify_output_amount_supply(output.amount, token_supply)?; - } - - Ok(output) - } - /// Finishes the [`AnchorOutputBuilder`] into an [`Output`]. - pub fn finish_output<'a>(self, params: impl Into> + Send) -> Result { - Ok(Output::Anchor(self.finish_with_params(params)?)) + pub fn finish_output(self) -> Result { + Ok(Output::Anchor(self.finish()?)) } } @@ -785,7 +773,7 @@ pub(crate) mod dto { builder = builder.add_unlock_condition(UnlockCondition::try_from_dto_with_params(u, ¶ms)?); } - builder.finish_with_params(params) + builder.finish() } } @@ -838,7 +826,7 @@ pub(crate) mod dto { builder = builder.with_immutable_features(immutable_features); } - builder.finish_with_params(params) + builder.finish() } } } @@ -905,7 +893,7 @@ mod tests { &protocol_parameters, ) .unwrap(); - assert_eq!(builder.finish_with_params(&protocol_parameters).unwrap(), output_split); + assert_eq!(builder.finish().unwrap(), output_split); }; let builder = AnchorOutput::build_with_amount(100, anchor_id) diff --git a/sdk/src/types/block/output/basic.rs b/sdk/src/types/block/output/basic.rs index 93da725189..7b99c1c574 100644 --- a/sdk/src/types/block/output/basic.rs +++ b/sdk/src/types/block/output/basic.rs @@ -13,8 +13,8 @@ use crate::types::{ unlock_condition::{ verify_allowed_unlock_conditions, UnlockCondition, UnlockConditionFlags, UnlockConditions, }, - verify_output_amount_min, verify_output_amount_packable, verify_output_amount_supply, NativeToken, - NativeTokens, Output, OutputBuilderAmount, OutputId, Rent, RentStructure, + verify_output_amount_min, verify_output_amount_packable, NativeToken, NativeTokens, Output, + OutputBuilderAmount, OutputId, Rent, RentStructure, }, protocol::ProtocolParameters, semantic::{SemanticValidationContext, TransactionFailureReason}, @@ -181,20 +181,9 @@ impl BasicOutputBuilder { Ok(output) } - /// - pub fn finish_with_params<'a>(self, params: impl Into> + Send) -> Result { - let output = self.finish()?; - - if let Some(token_supply) = params.into().token_supply() { - verify_output_amount_supply(output.amount, token_supply)?; - } - - Ok(output) - } - /// Finishes the [`BasicOutputBuilder`] into an [`Output`]. - pub fn finish_output<'a>(self, params: impl Into> + Send) -> Result { - Ok(Output::Basic(self.finish_with_params(params)?)) + pub fn finish_output(self) -> Result { + Ok(Output::Basic(self.finish()?)) } } @@ -312,14 +301,23 @@ impl BasicOutput { /// Simple deposit outputs are basic outputs with only an address unlock condition, no native tokens and no /// features. They are used to return storage deposits. pub fn simple_deposit_address(&self) -> Option<&Address> { - if let [UnlockCondition::Address(address)] = self.unlock_conditions().as_ref() { + if let [UnlockCondition::Address(uc)] = self.unlock_conditions().as_ref() { if self.mana == 0 && self.native_tokens.is_empty() && self.features.is_empty() { - return Some(address.address()); + return Some(uc.address()); } } None } + + /// Checks whether the basic output is an implicit account. + pub fn is_implicit_account(&self) -> bool { + if let [UnlockCondition::Address(uc)] = self.unlock_conditions().as_ref() { + uc.address().is_implicit_account_creation() && self.native_tokens.is_empty() && self.features.is_empty() + } else { + false + } + } } fn verify_unlock_conditions(unlock_conditions: &UnlockConditions) -> Result<(), Error> { @@ -411,7 +409,7 @@ pub(crate) mod dto { builder = builder.add_unlock_condition(UnlockCondition::try_from_dto_with_params(u, ¶ms)?); } - builder.finish_with_params(params) + builder.finish() } } @@ -447,7 +445,7 @@ pub(crate) mod dto { builder = builder.with_features(features); } - builder.finish_with_params(params) + builder.finish() } } } @@ -505,10 +503,7 @@ mod tests { protocol_parameters.token_supply(), ) .unwrap(); - assert_eq!( - builder.finish_with_params(protocol_parameters.token_supply()).unwrap(), - output_split - ); + assert_eq!(builder.finish().unwrap(), output_split); }; let builder = BasicOutput::build_with_amount(100) diff --git a/sdk/src/types/block/output/delegation.rs b/sdk/src/types/block/output/delegation.rs index 8a90cff520..0097d54dc4 100644 --- a/sdk/src/types/block/output/delegation.rs +++ b/sdk/src/types/block/output/delegation.rs @@ -3,12 +3,7 @@ use alloc::collections::BTreeSet; -use packable::{ - error::{UnpackError, UnpackErrorExt}, - packer::Packer, - unpacker::Unpacker, - Packable, -}; +use packable::Packable; use crate::types::{ block::{ @@ -18,8 +13,8 @@ use crate::types::{ unlock_condition::{ verify_allowed_unlock_conditions, UnlockCondition, UnlockConditionFlags, UnlockConditions, }, - verify_output_amount_min, verify_output_amount_packable, verify_output_amount_supply, Output, - OutputBuilderAmount, OutputId, Rent, RentStructure, StateTransitionError, StateTransitionVerifier, + verify_output_amount_min, verify_output_amount_packable, Output, OutputBuilderAmount, OutputId, Rent, + RentStructure, StateTransitionError, StateTransitionVerifier, }, protocol::ProtocolParameters, semantic::{SemanticValidationContext, TransactionFailureReason}, @@ -177,9 +172,7 @@ impl DelegationOutputBuilder { /// Finishes the builder into a [`DelegationOutput`] without parameters verification. pub fn finish(self) -> Result { - if self.validator_address.is_null() { - return Err(Error::NullDelegationValidatorId); - } + verify_validator_address::(&self.validator_address)?; let unlock_conditions = UnlockConditions::from_set(self.unlock_conditions)?; @@ -207,23 +200,9 @@ impl DelegationOutputBuilder { Ok(output) } - /// Finishes the builder into a [`DelegationOutput`] with parameters verification. - pub fn finish_with_params<'a>( - self, - params: impl Into> + Send, - ) -> Result { - let output = self.finish()?; - - if let Some(token_supply) = params.into().token_supply() { - verify_output_amount_supply(output.amount, token_supply)?; - } - - Ok(output) - } - /// Finishes the [`DelegationOutputBuilder`] into an [`Output`]. - pub fn finish_output(self, token_supply: u64) -> Result { - Ok(Output::Delegation(self.finish_with_params(token_supply)?)) + pub fn finish_output(self) -> Result { + Ok(Output::Delegation(self.finish()?)) } } @@ -242,21 +221,26 @@ impl From<&DelegationOutput> for DelegationOutputBuilder { } /// An output which delegates its contained IOTA coins as voting power to a validator. -#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] +#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Packable)] +#[packable(unpack_error = Error)] +#[packable(unpack_visitor = ProtocolParameters)] pub struct DelegationOutput { /// Amount of IOTA coins to deposit with this output. + #[packable(verify_with = verify_output_amount_packable)] amount: u64, /// Amount of delegated IOTA coins. delegated_amount: u64, /// Unique identifier of the delegation output. delegation_id: DelegationId, /// Account address of the validator to which this output is delegating. + #[packable(verify_with = verify_validator_address_packable)] validator_address: AccountAddress, /// Index of the first epoch for which this output delegates. start_epoch: EpochIndex, /// Index of the last epoch for which this output delegates. end_epoch: EpochIndex, /// Define how the output can be unlocked in a transaction. + #[packable(verify_with = verify_unlock_conditions_packable)] unlock_conditions: UnlockConditions, } @@ -411,54 +395,19 @@ impl StateTransitionVerifier for DelegationOutput { } } -impl Packable for DelegationOutput { - type UnpackError = Error; - type UnpackVisitor = ProtocolParameters; - - fn pack(&self, packer: &mut P) -> Result<(), P::Error> { - self.amount.pack(packer)?; - self.delegated_amount.pack(packer)?; - self.delegation_id.pack(packer)?; - self.validator_address.pack(packer)?; - self.start_epoch.pack(packer)?; - self.end_epoch.pack(packer)?; - self.unlock_conditions.pack(packer)?; - +fn verify_validator_address(validator_address: &AccountAddress) -> Result<(), Error> { + if VERIFY && validator_address.is_null() { + Err(Error::NullDelegationValidatorId) + } else { Ok(()) } +} - fn unpack( - unpacker: &mut U, - visitor: &Self::UnpackVisitor, - ) -> Result> { - let amount = u64::unpack::<_, VERIFY>(unpacker, &()).coerce()?; - - verify_output_amount_packable::(&amount, visitor).map_err(UnpackError::Packable)?; - - let delegated_amount = u64::unpack::<_, VERIFY>(unpacker, &()).coerce()?; - let delegation_id = DelegationId::unpack::<_, VERIFY>(unpacker, &()).coerce()?; - let validator_address = AccountAddress::unpack::<_, VERIFY>(unpacker, &()).coerce()?; - - if validator_address.is_null() { - return Err(UnpackError::Packable(Error::NullDelegationValidatorId)); - } - - let start_epoch = EpochIndex::unpack::<_, VERIFY>(unpacker, &()).coerce()?; - let end_epoch = EpochIndex::unpack::<_, VERIFY>(unpacker, &()).coerce()?; - let unlock_conditions = UnlockConditions::unpack::<_, VERIFY>(unpacker, visitor)?; - - verify_unlock_conditions::(&unlock_conditions).map_err(UnpackError::Packable)?; - - Ok(Self { - amount, - delegated_amount, - delegation_id, - validator_address, - start_epoch, - end_epoch, - unlock_conditions, - }) - } +fn verify_validator_address_packable( + validator_address: &AccountAddress, + _: &ProtocolParameters, +) -> Result<(), Error> { + verify_validator_address::(validator_address) } fn verify_unlock_conditions(unlock_conditions: &UnlockConditions) -> Result<(), Error> { @@ -473,6 +422,13 @@ fn verify_unlock_conditions(unlock_conditions: &UnlockCondit } } +fn verify_unlock_conditions_packable( + unlock_conditions: &UnlockConditions, + _: &ProtocolParameters, +) -> Result<(), Error> { + verify_unlock_conditions::(unlock_conditions) +} + #[cfg(feature = "serde")] pub(crate) mod dto { use alloc::vec::Vec; @@ -543,7 +499,7 @@ pub(crate) mod dto { builder = builder.add_unlock_condition(UnlockCondition::try_from_dto_with_params(u, ¶ms)?); } - builder.finish_with_params(params) + builder.finish() } } @@ -585,7 +541,7 @@ pub(crate) mod dto { .collect::, Error>>()?; builder = builder.with_unlock_conditions(unlock_conditions); - builder.finish_with_params(params) + builder.finish() } } } diff --git a/sdk/src/types/block/output/foundry.rs b/sdk/src/types/block/output/foundry.rs index e39f8053f9..f979bc1a5d 100644 --- a/sdk/src/types/block/output/foundry.rs +++ b/sdk/src/types/block/output/foundry.rs @@ -21,9 +21,9 @@ use crate::types::{ unlock_condition::{ verify_allowed_unlock_conditions, UnlockCondition, UnlockConditionFlags, UnlockConditions, }, - verify_output_amount_min, verify_output_amount_packable, verify_output_amount_supply, ChainId, NativeToken, - NativeTokens, Output, OutputBuilderAmount, OutputId, Rent, RentStructure, StateTransitionError, - StateTransitionVerifier, TokenId, TokenScheme, + verify_output_amount_min, verify_output_amount_packable, ChainId, NativeToken, NativeTokens, Output, + OutputBuilderAmount, OutputId, Rent, RentStructure, StateTransitionError, StateTransitionVerifier, TokenId, + TokenScheme, }, payload::signed_transaction::{TransactionCapabilities, TransactionCapabilityFlag}, protocol::ProtocolParameters, @@ -296,23 +296,9 @@ impl FoundryOutputBuilder { Ok(output) } - /// - pub fn finish_with_params<'a>( - self, - params: impl Into> + Send, - ) -> Result { - let output = self.finish()?; - - if let Some(token_supply) = params.into().token_supply() { - verify_output_amount_supply(output.amount, token_supply)?; - } - - Ok(output) - } - /// Finishes the [`FoundryOutputBuilder`] into an [`Output`]. - pub fn finish_output<'a>(self, params: impl Into> + Send) -> Result { - Ok(Output::Foundry(self.finish_with_params(params)?)) + pub fn finish_output(self) -> Result { + Ok(Output::Foundry(self.finish()?)) } } @@ -754,7 +740,7 @@ pub(crate) mod dto { builder = builder.add_unlock_condition(UnlockCondition::try_from_dto_with_params(u, ¶ms)?); } - builder.finish_with_params(params) + builder.finish() } } @@ -799,7 +785,7 @@ pub(crate) mod dto { builder = builder.with_immutable_features(immutable_features); } - builder.finish_with_params(params) + builder.finish() } } } @@ -851,10 +837,7 @@ mod tests { protocol_parameters.clone(), ) .unwrap(); - assert_eq!( - builder.finish_with_params(protocol_parameters.clone()).unwrap(), - output_split - ); + assert_eq!(builder.finish().unwrap(), output_split); }; let builder = FoundryOutput::build_with_amount(100, 123, rand_token_scheme()) diff --git a/sdk/src/types/block/output/mod.rs b/sdk/src/types/block/output/mod.rs index 38cb152b7c..74e285bba3 100644 --- a/sdk/src/types/block/output/mod.rs +++ b/sdk/src/types/block/output/mod.rs @@ -117,14 +117,14 @@ pub enum Output { Basic(BasicOutput), /// An account output. Account(AccountOutput), + /// An anchor output. + Anchor(AnchorOutput), /// A foundry output. Foundry(FoundryOutput), /// An NFT output. Nft(NftOutput), /// A delegation output. Delegation(DelegationOutput), - /// An anchor output. - Anchor(AnchorOutput), } impl core::fmt::Debug for Output { @@ -252,6 +252,15 @@ impl Output { } } + /// Checks whether the output is an implicit account. + pub fn is_implicit_account(&self) -> bool { + if let Output::Basic(output) = self { + output.is_implicit_account() + } else { + false + } + } + crate::def_is_as_opt!(Output: Basic, Account, Foundry, Nft, Delegation, Anchor); /// Returns the address that is required to unlock this [`Output`] and the account or nft address that gets @@ -338,7 +347,7 @@ impl Output { /// byte cost, given by [`RentStructure`]. /// If there is a [`StorageDepositReturnUnlockCondition`](unlock_condition::StorageDepositReturnUnlockCondition), /// its amount is also checked. - pub fn verify_storage_deposit(&self, rent_structure: RentStructure, token_supply: u64) -> Result<(), Error> { + pub fn verify_storage_deposit(&self, rent_structure: RentStructure) -> Result<(), Error> { let required_output_amount = self.rent_cost(rent_structure); if self.amount() < required_output_amount { @@ -361,8 +370,7 @@ impl Output { }); } - let minimum_deposit = - minimum_storage_deposit(return_condition.return_address(), rent_structure, token_supply); + let minimum_deposit = minimum_storage_deposit(return_condition.return_address(), rent_structure); // `Minimum Storage Deposit` ≤ `Return Amount` if return_condition.amount() < minimum_deposit { @@ -467,12 +475,12 @@ pub(crate) fn verify_output_amount_packable( /// Computes the minimum amount that a storage deposit has to match to allow creating a return [`Output`] back to the /// sender [`Address`]. -fn minimum_storage_deposit(address: &Address, rent_structure: RentStructure, token_supply: u64) -> u64 { +fn minimum_storage_deposit(address: &Address, rent_structure: RentStructure) -> u64 { // PANIC: This can never fail because the amount will always be within the valid range. Also, the actual value is // not important, we are only interested in the storage requirements of the type. BasicOutputBuilder::new_with_minimum_storage_deposit(rent_structure) .add_unlock_condition(AddressUnlockCondition::new(address.clone())) - .finish_with_params(token_supply) + .finish() .unwrap() .amount() } diff --git a/sdk/src/types/block/output/nft.rs b/sdk/src/types/block/output/nft.rs index 3f5224a52f..28c32ff138 100644 --- a/sdk/src/types/block/output/nft.rs +++ b/sdk/src/types/block/output/nft.rs @@ -18,9 +18,8 @@ use crate::types::{ unlock_condition::{ verify_allowed_unlock_conditions, UnlockCondition, UnlockConditionFlags, UnlockConditions, }, - verify_output_amount_min, verify_output_amount_packable, verify_output_amount_supply, ChainId, NativeToken, - NativeTokens, Output, OutputBuilderAmount, OutputId, Rent, RentStructure, StateTransitionError, - StateTransitionVerifier, + verify_output_amount_min, verify_output_amount_packable, ChainId, NativeToken, NativeTokens, Output, + OutputBuilderAmount, OutputId, Rent, RentStructure, StateTransitionError, StateTransitionVerifier, }, payload::signed_transaction::TransactionCapabilityFlag, protocol::ProtocolParameters, @@ -257,20 +256,9 @@ impl NftOutputBuilder { Ok(output) } - /// - pub fn finish_with_params<'a>(self, params: impl Into> + Send) -> Result { - let output = self.finish()?; - - if let Some(token_supply) = params.into().token_supply() { - verify_output_amount_supply(output.amount, token_supply)?; - } - - Ok(output) - } - /// Finishes the [`NftOutputBuilder`] into an [`Output`]. - pub fn finish_output<'a>(self, params: impl Into> + Send) -> Result { - Ok(Output::Nft(self.finish_with_params(params)?)) + pub fn finish_output(self) -> Result { + Ok(Output::Nft(self.finish()?)) } } @@ -607,7 +595,7 @@ pub(crate) mod dto { builder = builder.add_unlock_condition(UnlockCondition::try_from_dto_with_params(u, ¶ms)?); } - builder.finish_with_params(params) + builder.finish() } } @@ -650,7 +638,7 @@ pub(crate) mod dto { builder = builder.with_immutable_features(immutable_features); } - builder.finish_with_params(params) + builder.finish() } } } @@ -711,7 +699,7 @@ mod tests { &protocol_parameters, ) .unwrap(); - assert_eq!(builder.finish_with_params(&protocol_parameters).unwrap(), output_split); + assert_eq!(builder.finish().unwrap(), output_split); }; let builder = NftOutput::build_with_amount(100, NftId::null()) diff --git a/sdk/src/types/block/output/rent.rs b/sdk/src/types/block/output/rent.rs index a68346e76e..f3df1617ac 100644 --- a/sdk/src/types/block/output/rent.rs +++ b/sdk/src/types/block/output/rent.rs @@ -219,6 +219,6 @@ impl MinimumStorageDepositBasicOutput { } pub fn finish(self) -> Result { - Ok(self.builder.finish_output(self.token_supply)?.rent_cost(self.config)) + Ok(self.builder.finish_output()?.rent_cost(self.config)) } } diff --git a/sdk/src/types/block/payload/signed_transaction/transaction.rs b/sdk/src/types/block/payload/signed_transaction/transaction.rs index ea8ced1379..e8b05e5565 100644 --- a/sdk/src/types/block/payload/signed_transaction/transaction.rs +++ b/sdk/src/types/block/payload/signed_transaction/transaction.rs @@ -463,7 +463,7 @@ fn verify_outputs(outputs: &[Output], visitor: &ProtocolPara } } - output.verify_storage_deposit(visitor.rent_structure(), visitor.token_supply())?; + output.verify_storage_deposit(visitor.rent_structure())?; } } @@ -532,20 +532,14 @@ pub type TransactionCapabilities = Capabilities; #[cfg(feature = "serde")] pub(crate) mod dto { - use alloc::{ - boxed::Box, - string::{String, ToString}, - }; + use alloc::string::{String, ToString}; use serde::{Deserialize, Serialize}; use super::*; - use crate::{ - types::{ - block::{mana::ManaAllotmentDto, output::dto::OutputDto, payload::dto::PayloadDto, Error}, - TryFromDto, - }, - utils::serde::prefix_hex_bytes, + use crate::types::{ + block::{mana::ManaAllotmentDto, output::dto::OutputDto, payload::dto::PayloadDto, Error}, + TryFromDto, }; #[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] @@ -556,8 +550,8 @@ pub(crate) mod dto { pub context_inputs: Vec, pub inputs: Vec, pub allotments: Vec, - #[serde(with = "prefix_hex_bytes")] - pub capabilities: Box<[u8]>, + #[serde(default, skip_serializing_if = "TransactionCapabilities::is_none")] + pub capabilities: TransactionCapabilities, #[serde(default, skip_serializing_if = "Option::is_none")] pub payload: Option, pub outputs: Vec, @@ -571,7 +565,7 @@ pub(crate) mod dto { context_inputs: value.context_inputs().to_vec(), inputs: value.inputs().to_vec(), allotments: value.mana_allotments().iter().map(Into::into).collect(), - capabilities: value.capabilities().iter().copied().collect(), + capabilities: value.capabilities().clone(), payload: match value.payload() { Some(p @ Payload::TaggedData(_)) => Some(p.into()), Some(_) => unimplemented!(), @@ -607,9 +601,7 @@ pub(crate) mod dto { .with_context_inputs(dto.context_inputs) .with_inputs(dto.inputs) .with_mana_allotments(mana_allotments) - .with_capabilities(Capabilities::from_bytes( - dto.capabilities.try_into().map_err(Error::InvalidCapabilitiesCount)?, - )) + .with_capabilities(dto.capabilities) .with_outputs(outputs); builder = if let Some(p) = dto.payload { diff --git a/sdk/src/types/block/protocol.rs b/sdk/src/types/block/protocol.rs index 56c73ac7bc..25556c4fd2 100644 --- a/sdk/src/types/block/protocol.rs +++ b/sdk/src/types/block/protocol.rs @@ -41,6 +41,9 @@ pub struct ProtocolParameters { pub(crate) rent_structure: RentStructure, /// The work score parameters used by the node/network. pub(crate) work_score_parameters: WorkScoreParameters, + /// The parameters used for mana calculations. + #[getset(skip)] + pub(crate) mana_parameters: ManaParameters, /// TokenSupply defines the current token supply on the network. #[cfg_attr(feature = "serde", serde(with = "crate::utils::serde::string"))] pub(crate) token_supply: u64, @@ -51,18 +54,16 @@ pub struct ProtocolParameters { pub(crate) slot_duration_in_seconds: u8, /// The number of slots in an epoch expressed as an exponent of 2. pub(crate) slots_per_epoch_exponent: u8, - /// The parameters used for mana calculations. - #[getset(skip)] - pub(crate) mana_parameters: ManaParameters, /// The unbonding period in epochs before an account can stop staking. pub(crate) staking_unbonding_period: u32, /// The number of validation blocks that each validator should issue each slot. - pub(crate) validation_blocks_per_slot: u16, + pub(crate) validation_blocks_per_slot: u8, /// The number of epochs worth of Mana that a node is punished with for each additional validation block it issues. pub(crate) punishment_epochs: u32, - /// Liveness Threshold is used by tip-selection to determine if a block is eligible by evaluating issuingTimes and - /// commitments in its past-cone to Accepted Tangle Time and lastCommittedSlot respectively. - pub(crate) liveness_threshold: u32, + /// Used by tip-selection to determine if a block is eligible by evaluating issuing times. + pub(crate) liveness_threshold_lower_bound: u16, + /// Used by tip-selection to determine if a block is eligible by evaluating issuing times + pub(crate) liveness_threshold_upper_bound: u16, /// Minimum age relative to the accepted tangle time slot index that a slot can be committed. pub(crate) min_committable_age: u32, /// Maximum age for a slot commitment to be included in a block relative to the slot index of the block issuing @@ -77,6 +78,9 @@ pub struct ProtocolParameters { pub(crate) version_signaling: VersionSignalingParameters, /// Defines the parameters used for reward calculation. pub(crate) rewards_parameters: RewardsParameters, + /// Defines the target size of the committee. If there's fewer candidates the actual committee size could be + /// smaller in a given epoch. + pub(crate) target_committee_size: u8, } // This implementation is required to make [`ProtocolParameters`] a [`Packable`] visitor. @@ -105,12 +109,14 @@ impl Default for ProtocolParameters { staking_unbonding_period: 10, validation_blocks_per_slot: 10, punishment_epochs: 9, - liveness_threshold: 5, + liveness_threshold_lower_bound: 15, + liveness_threshold_upper_bound: 30, min_committable_age: 10, max_committable_age: 20, congestion_control_parameters: Default::default(), version_signaling: Default::default(), rewards_parameters: Default::default(), + target_committee_size: 32, } } } diff --git a/sdk/src/types/block/rand/output/mod.rs b/sdk/src/types/block/rand/output/mod.rs index f4d613f8ad..71f8a2a934 100644 --- a/sdk/src/types/block/rand/output/mod.rs +++ b/sdk/src/types/block/rand/output/mod.rs @@ -45,7 +45,7 @@ pub fn rand_basic_output(token_supply: u64) -> BasicOutput { BasicOutput::build_with_amount(rand_number_range(Output::AMOUNT_MIN..token_supply)) .with_features(rand_allowed_features(BasicOutput::ALLOWED_FEATURES)) .add_unlock_condition(rand_address_unlock_condition()) - .finish_with_params(token_supply) + .finish() .unwrap() } @@ -67,7 +67,7 @@ pub fn rand_account_output(token_supply: u64) -> AccountOutput { AccountOutput::build_with_amount(rand_number_range(Output::AMOUNT_MIN..token_supply), account_id) .with_features(rand_allowed_features(AccountOutput::ALLOWED_FEATURES)) .add_unlock_condition(rand_address_unlock_condition_different_from_account_id(&account_id)) - .finish_with_params(token_supply) + .finish() .unwrap() } @@ -85,7 +85,7 @@ pub fn rand_anchor_output(token_supply: u64) -> AnchorOutput { .add_unlock_condition(rand_state_controller_address_unlock_condition_different_from( &anchor_id, )) - .finish_with_params(token_supply) + .finish() .unwrap() } @@ -107,7 +107,7 @@ pub fn rand_foundry_output(token_supply: u64) -> FoundryOutput { ) .with_features(rand_allowed_features(FoundryOutput::ALLOWED_FEATURES)) .add_unlock_condition(ImmutableAccountAddressUnlockCondition::new(rand_account_address())) - .finish_with_params(token_supply) + .finish() .unwrap() } @@ -119,7 +119,7 @@ pub fn rand_nft_output(token_supply: u64) -> NftOutput { NftOutput::build_with_amount(rand_number_range(Output::AMOUNT_MIN..token_supply), nft_id) .with_features(rand_allowed_features(NftOutput::ALLOWED_FEATURES)) .add_unlock_condition(rand_address_unlock_condition_different_from(&nft_id)) - .finish_with_params(token_supply) + .finish() .unwrap() } diff --git a/sdk/src/types/block/unlock/empty.rs b/sdk/src/types/block/unlock/empty.rs new file mode 100644 index 0000000000..a4b89ff15a --- /dev/null +++ b/sdk/src/types/block/unlock/empty.rs @@ -0,0 +1,43 @@ +// Copyright 2023 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +/// Used to maintain correct index relationship between addresses and signatures when unlocking a +/// [`MultiAddress`](crate::types::block::address::MultiAddress) where not all addresses are unlocked. +#[derive(Clone, Debug, Eq, PartialEq, Hash, packable::Packable)] +pub struct EmptyUnlock; + +impl EmptyUnlock { + /// The [`Unlock`](crate::types::block::unlock::Unlock) kind of an [`EmptyUnlock`]. + pub const KIND: u8 = 6; +} + +mod dto { + use serde::{Deserialize, Serialize}; + + use super::*; + use crate::types::block::Error; + + #[derive(Serialize, Deserialize)] + struct EmptyUnlockDto { + #[serde(rename = "type")] + kind: u8, + } + + impl From<&EmptyUnlock> for EmptyUnlockDto { + fn from(_: &EmptyUnlock) -> Self { + Self { + kind: EmptyUnlock::KIND, + } + } + } + + impl TryFrom for EmptyUnlock { + type Error = Error; + + fn try_from(_: EmptyUnlockDto) -> Result { + Ok(Self) + } + } + + crate::impl_serde_typed_dto!(EmptyUnlock, EmptyUnlockDto, "empty unlock"); +} diff --git a/sdk/src/types/block/unlock/mod.rs b/sdk/src/types/block/unlock/mod.rs index 07e8c36273..fce07f8150 100644 --- a/sdk/src/types/block/unlock/mod.rs +++ b/sdk/src/types/block/unlock/mod.rs @@ -3,6 +3,8 @@ mod account; mod anchor; +mod empty; +mod multi; mod nft; mod reference; mod signature; @@ -14,9 +16,10 @@ use derive_more::{Deref, From}; use hashbrown::HashSet; use packable::{bounded::BoundedU16, prefix::BoxedSlicePrefix, Packable}; +pub(crate) use self::multi::UnlocksCount; pub use self::{ - account::AccountUnlock, anchor::AnchorUnlock, nft::NftUnlock, reference::ReferenceUnlock, - signature::SignatureUnlock, + account::AccountUnlock, anchor::AnchorUnlock, empty::EmptyUnlock, multi::MultiUnlock, nft::NftUnlock, + reference::ReferenceUnlock, signature::SignatureUnlock, }; use crate::types::block::{ input::{INPUT_COUNT_MAX, INPUT_COUNT_RANGE, INPUT_INDEX_MAX}, @@ -50,12 +53,18 @@ pub enum Unlock { /// An account unlock. #[packable(tag = AccountUnlock::KIND)] Account(AccountUnlock), - /// An Anchor unlock. + /// An anchor unlock. #[packable(tag = AnchorUnlock::KIND)] Anchor(AnchorUnlock), /// An NFT unlock. #[packable(tag = NftUnlock::KIND)] Nft(NftUnlock), + /// A multi unlock. + #[packable(tag = MultiUnlock::KIND)] + Multi(MultiUnlock), + /// An empty unlock. + #[packable(tag = EmptyUnlock::KIND)] + Empty(EmptyUnlock), } impl From for Unlock { @@ -72,6 +81,8 @@ impl core::fmt::Debug for Unlock { Self::Account(unlock) => unlock.fmt(f), Self::Anchor(unlock) => unlock.fmt(f), Self::Nft(unlock) => unlock.fmt(f), + Self::Multi(unlock) => unlock.fmt(f), + Self::Empty(unlock) => unlock.fmt(f), } } } @@ -85,10 +96,12 @@ impl Unlock { Self::Account(_) => AccountUnlock::KIND, Self::Anchor(_) => AnchorUnlock::KIND, Self::Nft(_) => NftUnlock::KIND, + Self::Multi(_) => MultiUnlock::KIND, + Self::Empty(_) => EmptyUnlock::KIND, } } - crate::def_is_as_opt!(Unlock: Signature, Reference, Account, Nft); + crate::def_is_as_opt!(Unlock: Signature, Reference, Account, Anchor, Nft, Multi, Empty); } pub(crate) type UnlockCount = BoundedU16<{ *UNLOCK_COUNT_RANGE.start() }, { *UNLOCK_COUNT_RANGE.end() }>; @@ -120,40 +133,62 @@ impl Unlocks { } } +/// Verifies the consistency of non-multi unlocks. +/// Will error on multi unlocks as they can't be nested. +fn verify_non_multi_unlock<'a>( + unlocks: &'a [Unlock], + unlock: &'a Unlock, + index: u16, + seen_signatures: &mut HashSet<&'a SignatureUnlock>, +) -> Result<(), Error> { + match unlock { + Unlock::Signature(signature) => { + if !seen_signatures.insert(signature.as_ref()) { + return Err(Error::DuplicateSignatureUnlock(index)); + } + } + Unlock::Reference(reference) => { + if index == 0 + || reference.index() >= index + || !matches!(unlocks[reference.index() as usize], Unlock::Signature(_)) + { + return Err(Error::InvalidUnlockReference(index)); + } + } + Unlock::Account(account) => { + if index == 0 || account.index() >= index { + return Err(Error::InvalidUnlockAccount(index)); + } + } + Unlock::Anchor(anchor) => { + if index == 0 || anchor.index() >= index { + return Err(Error::InvalidUnlockAnchor(index)); + } + } + Unlock::Nft(nft) => { + if index == 0 || nft.index() >= index { + return Err(Error::InvalidUnlockNft(index)); + } + } + Unlock::Multi(_) => return Err(Error::MultiUnlockRecursion), + Unlock::Empty(_) => {} + } + + Ok(()) +} + fn verify_unlocks(unlocks: &[Unlock], _: &()) -> Result<(), Error> { if VERIFY { let mut seen_signatures = HashSet::new(); for (index, unlock) in (0u16..).zip(unlocks.iter()) { match unlock { - Unlock::Signature(signature) => { - if !seen_signatures.insert(signature) { - return Err(Error::DuplicateSignatureUnlock(index)); - } - } - Unlock::Reference(reference) => { - if index == 0 - || reference.index() >= index - || !matches!(unlocks[reference.index() as usize], Unlock::Signature(_)) - { - return Err(Error::InvalidUnlockReference(index)); - } - } - Unlock::Account(account) => { - if index == 0 || account.index() >= index { - return Err(Error::InvalidUnlockAccount(index)); - } - } - Unlock::Anchor(anchor) => { - if index == 0 || anchor.index() >= index { - return Err(Error::InvalidUnlockAnchor(index)); - } - } - Unlock::Nft(nft) => { - if index == 0 || nft.index() >= index { - return Err(Error::InvalidUnlockNft(index)); + Unlock::Multi(multi) => { + for unlock in multi.unlocks() { + verify_non_multi_unlock(unlocks, unlock, index, &mut seen_signatures)? } } + _ => verify_non_multi_unlock(unlocks, unlock, index, &mut seen_signatures)?, } } } diff --git a/sdk/src/types/block/unlock/multi.rs b/sdk/src/types/block/unlock/multi.rs new file mode 100644 index 0000000000..024a9d8c88 --- /dev/null +++ b/sdk/src/types/block/unlock/multi.rs @@ -0,0 +1,79 @@ +// Copyright 2023 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +use alloc::{boxed::Box, vec::Vec}; + +use derive_more::Deref; +use packable::{prefix::BoxedSlicePrefix, Packable}; + +use crate::types::block::{address::WeightedAddressCount, unlock::Unlock, Error}; + +pub(crate) type UnlocksCount = WeightedAddressCount; + +/// Unlocks a [`MultiAddress`](crate::types::block::address::MultiAddress) with a list of other unlocks. +#[derive(Clone, Debug, Deref, Eq, PartialEq, Hash, Packable)] +#[packable(unpack_error = Error, with = |e| e.unwrap_item_err_or_else(|p| Error::InvalidMultiUnlockCount(p.into())))] +pub struct MultiUnlock(#[packable(verify_with = verify_unlocks)] BoxedSlicePrefix); + +impl MultiUnlock { + /// The [`Unlock`](crate::types::block::unlock::Unlock) kind of an [`MultiUnlock`]. + pub const KIND: u8 = 5; + + /// Creates a new [`MultiUnlock`]. + #[inline(always)] + pub fn new(unlocks: impl IntoIterator) -> Result { + let unlocks = unlocks.into_iter().collect::>(); + + verify_unlocks::(&unlocks, &())?; + + Ok(Self( + BoxedSlicePrefix::::try_from(unlocks).map_err(Error::InvalidMultiUnlockCount)?, + )) + } + + /// Return the inner unlocks of an [`MultiUnlock`]. + #[inline(always)] + pub fn unlocks(&self) -> &[Unlock] { + &self.0 + } +} + +fn verify_unlocks(unlocks: &[Unlock], _visitor: &()) -> Result<(), Error> { + if VERIFY && unlocks.iter().any(Unlock::is_multi) { + return Err(Error::MultiUnlockRecursion); + } else { + Ok(()) + } +} + +mod dto { + use serde::{Deserialize, Serialize}; + + use super::*; + + #[derive(Serialize, Deserialize)] + struct MultiUnlockDto { + #[serde(rename = "type")] + kind: u8, + unlocks: Vec, + } + + impl From<&MultiUnlock> for MultiUnlockDto { + fn from(value: &MultiUnlock) -> Self { + Self { + kind: MultiUnlock::KIND, + unlocks: value.0.to_vec(), + } + } + } + + impl TryFrom for MultiUnlock { + type Error = Error; + + fn try_from(value: MultiUnlockDto) -> Result { + Self::new(value.unlocks) + } + } + + crate::impl_serde_typed_dto!(MultiUnlock, MultiUnlockDto, "multi unlock"); +} diff --git a/sdk/src/wallet/core/mod.rs b/sdk/src/wallet/core/mod.rs index 568e26b4fc..d594b63ba4 100644 --- a/sdk/src/wallet/core/mod.rs +++ b/sdk/src/wallet/core/mod.rs @@ -32,16 +32,19 @@ use crate::{ }, types::{ block::{ - address::{Bech32Address, Hrp}, - output::{dto::FoundryOutputDto, AccountId, FoundryId, FoundryOutput, NftId, Output, OutputId, TokenId}, - payload::signed_transaction::{dto::TransactionDto, Transaction, TransactionId}, + address::{Address, Bech32Address, Hrp, ImplicitAccountCreationAddress}, + output::{ + dto::FoundryOutputDto, AccountId, AnchorId, DelegationId, FoundryId, FoundryOutput, NftId, Output, + OutputId, TokenId, + }, + payload::signed_transaction::TransactionId, }, TryFromDto, }, wallet::{ operations::syncing::SyncOptions, types::{OutputData, OutputDataDto}, - FilterOptions, Result, + Error, FilterOptions, Result, }, }; @@ -252,6 +255,20 @@ where self.data().await.address.clone() } + /// Returns the implicit account creation address of the wallet if it is Ed25519 based. + pub async fn implicit_account_creation_address(&self) -> Result { + let bech32_address = &self.data().await.address; + + if let Address::Ed25519(address) = bech32_address.inner() { + Ok(Bech32Address::new( + *bech32_address.hrp(), + ImplicitAccountCreationAddress::from(address.clone()), + )) + } else { + Err(Error::NonEd25519Address) + } + } + /// Get the wallet's configured Bech32 HRP. pub async fn bech32_hrp(&self) -> Hrp { self.data().await.address.hrp @@ -282,7 +299,7 @@ where &self, outputs: impl Iterator, filter: impl Into>, - ) -> Result> { + ) -> Vec { let filter = filter.into(); if let Some(filter) = filter { @@ -290,15 +307,24 @@ where for output in outputs { match &output.output { - Output::Account(alias) => { + Output::Account(account) => { if let Some(account_ids) = &filter.account_ids { - let account_id = alias.account_id_non_null(&output.output_id); + let account_id = account.account_id_non_null(&output.output_id); if account_ids.contains(&account_id) { filtered_outputs.push(output.clone()); continue; } } } + Output::Anchor(anchor) => { + if let Some(anchor_ids) = &filter.anchor_ids { + let anchor_id = anchor.anchor_id_non_null(&output.output_id); + if anchor_ids.contains(&anchor_id) { + filtered_outputs.push(output.clone()); + continue; + } + } + } Output::Foundry(foundry) => { if let Some(foundry_ids) = &filter.foundry_ids { let foundry_id = foundry.id(); @@ -317,6 +343,15 @@ where } } } + Output::Delegation(delegation) => { + if let Some(delegation_ids) = &filter.delegation_ids { + let delegation_id = delegation.delegation_id_non_null(&output.output_id); + if delegation_ids.contains(&delegation_id) { + filtered_outputs.push(output.clone()); + continue; + } + } + } _ => {} } @@ -338,56 +373,108 @@ where } } - // If ids are provided, only return them and no other outputs. - if filter.account_ids.is_none() && filter.foundry_ids.is_none() && filter.nft_ids.is_none() { + // Include the output if we're not filtering by IDs. + if filter.account_ids.is_none() + && filter.anchor_ids.is_none() + && filter.foundry_ids.is_none() + && filter.nft_ids.is_none() + && filter.delegation_ids.is_none() + { filtered_outputs.push(output.clone()); } } - Ok(filtered_outputs) + filtered_outputs } else { - Ok(outputs.cloned().collect()) + outputs.cloned().collect() } } /// Returns outputs of the wallet. - pub async fn outputs(&self, filter: impl Into> + Send) -> Result> { + pub async fn outputs(&self, filter: impl Into> + Send) -> Vec { self.filter_outputs(self.data().await.outputs.values(), filter) } /// Returns unspent outputs of the wallet. - pub async fn unspent_outputs(&self, filter: impl Into> + Send) -> Result> { + pub async fn unspent_outputs(&self, filter: impl Into> + Send) -> Vec { self.filter_outputs(self.data().await.unspent_outputs.values(), filter) } /// Gets the unspent account output matching the given ID. - pub async fn unspent_account_output(&self, account_id: &AccountId) -> Result> { + pub async fn unspent_account_output(&self, account_id: &AccountId) -> Option { self.unspent_outputs(FilterOptions { account_ids: Some([*account_id].into()), ..Default::default() }) .await - .map(|res| res.get(0).cloned()) + .first() + .cloned() + } + + /// Gets the unspent anchor output matching the given ID. + pub async fn unspent_anchor_output(&self, anchor_id: &AnchorId) -> Option { + self.unspent_outputs(FilterOptions { + anchor_ids: Some([*anchor_id].into()), + ..Default::default() + }) + .await + .first() + .cloned() } /// Gets the unspent foundry output matching the given ID. - pub async fn unspent_foundry_output(&self, foundry_id: &FoundryId) -> Result> { + pub async fn unspent_foundry_output(&self, foundry_id: &FoundryId) -> Option { self.unspent_outputs(FilterOptions { foundry_ids: Some([*foundry_id].into()), ..Default::default() }) .await - .map(|res| res.get(0).cloned()) + .first() + .cloned() } /// Gets the unspent nft output matching the given ID. - pub async fn unspent_nft_output(&self, nft_id: &NftId) -> Result> { + pub async fn unspent_nft_output(&self, nft_id: &NftId) -> Option { self.unspent_outputs(FilterOptions { nft_ids: Some([*nft_id].into()), ..Default::default() }) .await - .map(|res| res.get(0).cloned()) + .first() + .cloned() + } + + /// Gets the unspent delegation output matching the given ID. + pub async fn unspent_delegation_output(&self, delegation_id: &DelegationId) -> Option { + self.unspent_outputs(FilterOptions { + delegation_ids: Some([*delegation_id].into()), + ..Default::default() + }) + .await + .first() + .cloned() + } + + /// Returns implicit accounts of the wallet. + pub async fn implicit_accounts(&self) -> Vec { + self.data() + .await + .unspent_outputs + .values() + .filter(|output_data| output_data.output.is_implicit_account()) + .cloned() + .collect() + } + + /// Returns accounts of the wallet. + pub async fn accounts(&self) -> Vec { + self.data() + .await + .unspent_outputs + .values() + .filter(|output_data| output_data.output.is_account()) + .cloned() + .collect() } /// Returns all incoming transactions of the wallet @@ -621,7 +708,7 @@ mod test { let output = Output::Basic( BasicOutput::build_with_amount(amount) .add_unlock_condition(AddressUnlockCondition::new(address)) - .finish_with_params(protocol_parameters.clone()) + .finish() .unwrap(), ); let transaction = Transaction::builder(protocol_parameters.network_id()) diff --git a/sdk/src/wallet/error.rs b/sdk/src/wallet/error.rs index c8d7c3b469..e16408b6e7 100644 --- a/sdk/src/wallet/error.rs +++ b/sdk/src/wallet/error.rs @@ -45,6 +45,11 @@ pub enum Error { /// Insufficient funds to send transaction. #[error("insufficient funds {available}/{required} available")] InsufficientFunds { available: u64, required: u64 }, + /// Invalid event type. + #[cfg(feature = "events")] + #[cfg_attr(docsrs, doc(cfg(feature = "events")))] + #[error("invalid event type: {0}")] + InvalidEventType(u8), /// Invalid mnemonic error #[error("invalid mnemonic: {0}")] InvalidMnemonic(String), @@ -116,6 +121,9 @@ pub enum Error { /// Address not the wallet address #[error("address {0} is not the wallet address")] WalletAddressMismatch(Bech32Address), + /// Action requires the wallet to be Ed25519 address based + #[error("tried to perform an action that requires the wallet to be Ed25519 address based")] + NonEd25519Address, } // Serialize type with Display error diff --git a/sdk/src/wallet/events/types.rs b/sdk/src/wallet/events/types.rs index e01fba9bbe..7c60f5b8a0 100644 --- a/sdk/src/wallet/events/types.rs +++ b/sdk/src/wallet/events/types.rs @@ -13,7 +13,10 @@ use crate::{ payload::signed_transaction::{dto::SignedTransactionPayloadDto, TransactionId}, }, }, - wallet::types::{InclusionState, OutputDataDto}, + wallet::{ + types::{InclusionState, OutputDataDto}, + Error, + }, }; #[derive(Clone, Debug, Eq, PartialEq)] @@ -154,7 +157,7 @@ pub enum WalletEventType { } impl TryFrom for WalletEventType { - type Error = String; + type Error = Error; fn try_from(value: u8) -> Result { let event_type = match value { @@ -165,7 +168,7 @@ impl TryFrom for WalletEventType { 3 => Self::SpentOutput, 4 => Self::TransactionInclusion, 5 => Self::TransactionProgress, - _ => return Err(format!("invalid event type {value}")), + _ => return Err(Error::InvalidEventType(value)), }; Ok(event_type) } diff --git a/sdk/src/wallet/mod.rs b/sdk/src/wallet/mod.rs index 07160d4e38..258d5be150 100644 --- a/sdk/src/wallet/mod.rs +++ b/sdk/src/wallet/mod.rs @@ -73,7 +73,7 @@ use crate::{ types::{ api::core::OutputWithMetadataResponse, block::{ - output::{AccountId, FoundryId, NftId}, + output::{AccountId, AnchorId, DelegationId, FoundryId, NftId}, payload::signed_transaction::{SignedTransactionPayload, TransactionId}, }, }, @@ -95,10 +95,14 @@ pub struct FilterOptions { pub output_types: Option>, /// Return all account outputs matching these IDs. pub account_ids: Option>, + /// Return all anchor outputs matching these IDs. + pub anchor_ids: Option>, /// Return all foundry outputs matching these IDs. pub foundry_ids: Option>, /// Return all nft outputs matching these IDs. pub nft_ids: Option>, + /// Return all delegation outputs matching these IDs. + pub delegation_ids: Option>, } pub(crate) fn build_transaction_from_payload_and_inputs( diff --git a/sdk/src/wallet/operations/helpers/time.rs b/sdk/src/wallet/operations/helpers/time.rs index 3321adfa83..ebd3675688 100644 --- a/sdk/src/wallet/operations/helpers/time.rs +++ b/sdk/src/wallet/operations/helpers/time.rs @@ -3,7 +3,7 @@ use crate::{ types::block::{address::Address, output::Output, slot::SlotIndex}, - wallet::types::{AddressWithUnspentOutputs, OutputData}, + wallet::types::OutputData, }; // Check if an output can be unlocked by the wallet address at the current time diff --git a/sdk/src/wallet/operations/output_claiming.rs b/sdk/src/wallet/operations/output_claiming.rs index c36c37535a..b6db006558 100644 --- a/sdk/src/wallet/operations/output_claiming.rs +++ b/sdk/src/wallet/operations/output_claiming.rs @@ -278,7 +278,7 @@ where NftOutputBuilder::from(nft_output) .with_nft_id(nft_output.nft_id_non_null(&output_data.output_id)) .with_unlock_conditions([AddressUnlockCondition::new(wallet_address.clone())]) - .finish_output(token_supply)? + .finish_output()? } else { NftOutputBuilder::from(nft_output) .with_minimum_storage_deposit(rent_structure) @@ -286,7 +286,7 @@ where .with_unlock_conditions([AddressUnlockCondition::new(wallet_address.clone())]) // Set native tokens empty, we will collect them from all inputs later .with_native_tokens([]) - .finish_output(token_supply)? + .finish_output()? }; // Add required amount for the new output @@ -367,7 +367,7 @@ where outputs_to_send.push( BasicOutputBuilder::new_with_amount(return_amount) .add_unlock_condition(AddressUnlockCondition::new(return_address)) - .finish_output(token_supply)?, + .finish_output()?, ); } @@ -377,7 +377,7 @@ where BasicOutputBuilder::new_with_amount(available_amount - required_amount_for_nfts) .add_unlock_condition(AddressUnlockCondition::new(wallet_address)) .with_native_tokens(new_native_tokens.finish()?) - .finish_output(token_supply)?, + .finish_output()?, ); } else if !new_native_tokens.finish()?.is_empty() { return Err(crate::client::api::input_selection::Error::InsufficientAmount { diff --git a/sdk/src/wallet/operations/output_consolidation.rs b/sdk/src/wallet/operations/output_consolidation.rs index c38522b6f6..b1854a12b0 100644 --- a/sdk/src/wallet/operations/output_consolidation.rs +++ b/sdk/src/wallet/operations/output_consolidation.rs @@ -128,7 +128,6 @@ where #[cfg(feature = "participation")] let voting_output = self.get_voting_output().await?; let slot_index = self.client().get_slot_index().await?; - let token_supply = self.client().get_token_supply().await?; let mut outputs_to_consolidate = Vec::new(); let wallet_data = self.data().await; @@ -258,7 +257,7 @@ where .unwrap_or_else(|| outputs_to_consolidate[0].address.clone()), )) .with_native_tokens(total_native_tokens.finish()?) - .finish_output(token_supply)?]; + .finish_output()?]; let options = Some(TransactionOptions { custom_inputs: Some(custom_inputs), diff --git a/sdk/src/wallet/operations/participation/mod.rs b/sdk/src/wallet/operations/participation/mod.rs index 499135b53b..cd7154580d 100644 --- a/sdk/src/wallet/operations/participation/mod.rs +++ b/sdk/src/wallet/operations/participation/mod.rs @@ -71,7 +71,7 @@ where "[get_participation_overview] restored_spent_cached_outputs_len: {}", restored_spent_cached_outputs_len ); - let outputs = self.outputs(None).await?; + let outputs = self.outputs(None).await; let participation_outputs = outputs .into_iter() .filter(|output_data| { @@ -230,7 +230,7 @@ where log::debug!("[get_voting_output]"); Ok(self .unspent_outputs(None) - .await? + .await .iter() .filter(|output_data| is_valid_participation_output(&output_data.output)) .max_by_key(|output_data| output_data.output.amount()) diff --git a/sdk/src/wallet/operations/participation/voting.rs b/sdk/src/wallet/operations/participation/voting.rs index 3c16361609..cb6f097d1a 100644 --- a/sdk/src/wallet/operations/participation/voting.rs +++ b/sdk/src/wallet/operations/participation/voting.rs @@ -105,7 +105,7 @@ where Feature::Tag(TagFeature::new(PARTICIPATION_TAG)?), Feature::Metadata(MetadataFeature::new(participation_bytes.clone())?), ]) - .finish_output(self.client().get_token_supply().await?)?; + .finish_output()?; self.prepare_transaction( [new_output], @@ -177,7 +177,7 @@ where Feature::Tag(TagFeature::new(PARTICIPATION_TAG)?), Feature::Metadata(MetadataFeature::new(participation_bytes.clone())?), ]) - .finish_output(self.client().get_token_supply().await?)?; + .finish_output()?; self.prepare_transaction( [new_output], diff --git a/sdk/src/wallet/operations/participation/voting_power.rs b/sdk/src/wallet/operations/participation/voting_power.rs index 1d57151391..f2457cfe75 100644 --- a/sdk/src/wallet/operations/participation/voting_power.rs +++ b/sdk/src/wallet/operations/participation/voting_power.rs @@ -50,17 +50,14 @@ where /// Prepares the transaction for /// [Account::increase_voting_power()](crate::wallet::Account::increase_voting_power). pub async fn prepare_increase_voting_power(&self, amount: u64) -> Result { - let token_supply = self.client().get_token_supply().await?; - let (new_output, tx_options) = match self.get_voting_output().await? { Some(current_output_data) => { let output = current_output_data.output.as_basic(); let new_amount = output.amount().checked_add(amount).ok_or(Error::InvalidVotingPower)?; - let (new_output, tagged_data_payload) = self - .new_voting_output_and_tagged_data(output, new_amount, token_supply) - .await?; + let (new_output, tagged_data_payload) = + self.new_voting_output_and_tagged_data(output, new_amount).await?; ( new_output, @@ -76,7 +73,7 @@ where BasicOutputBuilder::new_with_amount(amount) .add_unlock_condition(AddressUnlockCondition::new(self.address().await)) .add_feature(TagFeature::new(PARTICIPATION_TAG)?) - .finish_output(token_supply)?, + .finish_output()?, None, ), }; @@ -102,7 +99,6 @@ where /// Prepares the transaction for /// [Account::decrease_voting_power()](crate::wallet::Account::decrease_voting_power). pub async fn prepare_decrease_voting_power(&self, amount: u64) -> Result { - let token_supply = self.client().get_token_supply().await?; let current_output_data = self .get_voting_output() .await? @@ -111,18 +107,11 @@ where // If the amount to decrease is the amount of the output, then we just remove the features. let (new_output, tagged_data_payload) = if amount == output.amount() { - ( - BasicOutputBuilder::from(output) - .clear_features() - .finish_output(token_supply)?, - None, - ) + (BasicOutputBuilder::from(output).clear_features().finish_output()?, None) } else { let new_amount = output.amount().checked_sub(amount).ok_or(Error::InvalidVotingPower)?; - let (new_output, tagged_data_payload) = self - .new_voting_output_and_tagged_data(output, new_amount, token_supply) - .await?; + let (new_output, tagged_data_payload) = self.new_voting_output_and_tagged_data(output, new_amount).await?; (new_output, Some(tagged_data_payload)) }; @@ -144,7 +133,6 @@ where &self, output: &BasicOutput, amount: u64, - token_supply: u64, ) -> Result<(Output, TaggedDataPayload)> { let mut output_builder = BasicOutputBuilder::from(output).with_amount(amount); let mut participation_bytes = output.features().metadata().map(|m| m.data()).unwrap_or(&[]); @@ -163,7 +151,7 @@ where }; Ok(( - output_builder.finish_output(token_supply)?, + output_builder.finish_output()?, TaggedDataPayload::new(PARTICIPATION_TAG.as_bytes().to_vec(), participation_bytes.to_vec())?, )) } diff --git a/sdk/src/wallet/operations/reissue.rs b/sdk/src/wallet/operations/reissue.rs index d5ef412e1e..ec1c120f36 100644 --- a/sdk/src/wallet/operations/reissue.rs +++ b/sdk/src/wallet/operations/reissue.rs @@ -1,8 +1,6 @@ // Copyright 2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use crypto::keys::bip44::Bip44; - use crate::{ client::{ secret::{SecretManage, SignBlock}, diff --git a/sdk/src/wallet/operations/syncing/mod.rs b/sdk/src/wallet/operations/syncing/mod.rs index 8757ff084e..abbbbb4d4e 100644 --- a/sdk/src/wallet/operations/syncing/mod.rs +++ b/sdk/src/wallet/operations/syncing/mod.rs @@ -99,7 +99,7 @@ where address: self.address().await, output_ids: self .unspent_outputs(None) - .await? + .await .into_iter() .map(|data| data.output_id) .collect::>(), diff --git a/sdk/src/wallet/operations/syncing/options.rs b/sdk/src/wallet/operations/syncing/options.rs index 658685f23c..38e733c1e1 100644 --- a/sdk/src/wallet/operations/syncing/options.rs +++ b/sdk/src/wallet/operations/syncing/options.rs @@ -3,9 +3,6 @@ use serde::{Deserialize, Serialize}; -use crate::types::block::address::Bech32Address; - -const DEFAULT_ADDRESS_START_INDEX: u32 = 0; const DEFAULT_FORCE_SYNCING: bool = false; const DEFAULT_SYNC_INCOMING_TRANSACTIONS: bool = false; const DEFAULT_SYNC_ONLY_MOST_BASIC_OUTPUTS: bool = false; @@ -16,18 +13,6 @@ const DEFAULT_SYNC_NATIVE_TOKEN_FOUNDRIES: bool = false; #[derive(Debug, Clone, Eq, PartialEq, Hash, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SyncOptions { - /// Specific Bech32 encoded addresses of the account to sync, if addresses are provided, then `address_start_index` - /// will be ignored - #[serde(default)] - pub addresses: Vec, - /// Address index from which to start syncing addresses. 0 by default, using a higher index will be faster because - /// addresses with a lower index will be skipped, but could result in a wrong balance for that reason - #[serde(default = "default_address_start_index")] - pub address_start_index: u32, - /// Address index from which to start syncing internal addresses. 0 by default, using a higher index will be faster - /// because addresses with a lower index will be skipped, but could result in a wrong balance for that reason - #[serde(default = "default_address_start_index")] - pub address_start_index_internal: u32, /// Usually syncing is skipped if it's called in between 200ms, because there can only be new changes every /// milestone and calling it twice "at the same time" will not return new data /// When this to true, we will sync anyways, even if it's called 0ms after the las sync finished. @@ -40,7 +25,7 @@ pub struct SyncOptions { /// Checks pending transactions and reissues them if necessary. #[serde(default = "default_sync_pending_transactions")] pub sync_pending_transactions: bool, - /// Specifies what outputs should be synced for the ed25519 addresses from the wallet. + /// Specifies what outputs should be synced for the ed25519 address from the wallet. #[serde(default)] pub wallet: WalletSyncOptions, /// Specifies what outputs should be synced for the address of an account output. @@ -50,7 +35,7 @@ pub struct SyncOptions { #[serde(default)] pub nft: NftSyncOptions, /// Specifies if only basic outputs with an AddressUnlockCondition alone should be synced, will overwrite - /// `account`, `alias` and `nft` options. + /// `wallet`, `account` and `nft` options. #[serde(default = "default_sync_only_most_basic_outputs")] pub sync_only_most_basic_outputs: bool, /// Sync native token foundries, so their metadata can be returned in the balance. @@ -58,10 +43,6 @@ pub struct SyncOptions { pub sync_native_token_foundries: bool, } -fn default_address_start_index() -> u32 { - DEFAULT_ADDRESS_START_INDEX -} - fn default_force_syncing() -> bool { DEFAULT_FORCE_SYNCING } @@ -85,9 +66,6 @@ fn default_sync_native_token_foundries() -> bool { impl Default for SyncOptions { fn default() -> Self { Self { - addresses: Vec::new(), - address_start_index: default_address_start_index(), - address_start_index_internal: default_address_start_index(), sync_incoming_transactions: default_sync_incoming_transactions(), sync_pending_transactions: default_sync_pending_transactions(), wallet: WalletSyncOptions::default(), diff --git a/sdk/src/wallet/operations/transaction/high_level/burning_melting/melt_native_token.rs b/sdk/src/wallet/operations/transaction/high_level/burning_melting/melt_native_token.rs index e17227e932..24f3963e2a 100644 --- a/sdk/src/wallet/operations/transaction/high_level/burning_melting/melt_native_token.rs +++ b/sdk/src/wallet/operations/transaction/high_level/burning_melting/melt_native_token.rs @@ -52,7 +52,6 @@ where let foundry_id = FoundryId::from(token_id); let account_id = *foundry_id.account_address().account_id(); - let token_supply = self.client().get_token_supply().await?; let (existing_account_output_data, existing_foundry_output) = self .find_account_and_foundry_output_data(account_id, foundry_id) @@ -66,7 +65,7 @@ where // Create the new account output with updated amount. let account_output = AccountOutputBuilder::from(account_output) .with_account_id(account_id) - .finish_output(token_supply)?; + .finish_output()?; let TokenScheme::Simple(token_scheme) = existing_foundry_output.token_scheme(); let outputs = [ @@ -77,7 +76,7 @@ where token_scheme.melted_tokens() + melt_amount, token_scheme.maximum_supply(), )?)) - .finish_output(token_supply)?, + .finish_output()?, ]; // Input selection will detect that we're melting native tokens and add the required inputs if available self.prepare_transaction(outputs, options).await diff --git a/sdk/src/wallet/operations/transaction/high_level/create_account.rs b/sdk/src/wallet/operations/transaction/high_level/create_account.rs index 4b9b318f20..9a9f69355c 100644 --- a/sdk/src/wallet/operations/transaction/high_level/create_account.rs +++ b/sdk/src/wallet/operations/transaction/high_level/create_account.rs @@ -75,7 +75,6 @@ where ) -> crate::wallet::Result { log::debug!("[TRANSACTION] prepare_create_account_output"); let rent_structure = self.client().get_rent_structure().await?; - let token_supply = self.client().get_token_supply().await?; let address = match params.as_ref().and_then(|options| options.address.as_ref()) { Some(bech32_address) => { @@ -104,7 +103,7 @@ where } } - let outputs = [account_output_builder.finish_output(token_supply)?]; + let outputs = [account_output_builder.finish_output()?]; self.prepare_transaction(outputs, options).await } diff --git a/sdk/src/wallet/operations/transaction/high_level/minting/create_native_token.rs b/sdk/src/wallet/operations/transaction/high_level/minting/create_native_token.rs index 9c08563832..93e2bb89f6 100644 --- a/sdk/src/wallet/operations/transaction/high_level/minting/create_native_token.rs +++ b/sdk/src/wallet/operations/transaction/high_level/minting/create_native_token.rs @@ -134,7 +134,6 @@ where ) -> crate::wallet::Result { log::debug!("[TRANSACTION] create_native_token"); let rent_structure = self.client().get_rent_structure().await?; - let token_supply = self.client().get_token_supply().await?; let (account_id, account_output) = self .get_account_output(params.account_id) @@ -156,7 +155,7 @@ where let token_id = TokenId::from(foundry_id); let outputs = [ - new_account_output_builder.finish_output(token_supply)?, + new_account_output_builder.finish_output()?, { let mut foundry_builder = FoundryOutputBuilder::new_with_minimum_storage_deposit( rent_structure, @@ -175,7 +174,7 @@ where foundry_builder = foundry_builder.add_immutable_feature(MetadataFeature::new(foundry_metadata)?) } - foundry_builder.finish_output(token_supply)? + foundry_builder.finish_output()? }, // Native Tokens will be added automatically in the remainder output in try_select_inputs() ]; diff --git a/sdk/src/wallet/operations/transaction/high_level/minting/mint_native_token.rs b/sdk/src/wallet/operations/transaction/high_level/minting/mint_native_token.rs index 19627bb6c4..a3f7fa7076 100644 --- a/sdk/src/wallet/operations/transaction/high_level/minting/mint_native_token.rs +++ b/sdk/src/wallet/operations/transaction/high_level/minting/mint_native_token.rs @@ -58,7 +58,6 @@ where let mint_amount = mint_amount.into(); let wallet_data = self.data().await; - let token_supply = self.client().get_token_supply().await?; let existing_foundry_output = wallet_data.unspent_outputs.values().find(|output_data| { if let Output::Foundry(output) = &output_data.output { TokenId::new(*output.id()) == token_id @@ -126,8 +125,8 @@ where FoundryOutputBuilder::from(&foundry_output).with_token_scheme(updated_token_scheme); let outputs = [ - new_account_output_builder.finish_output(token_supply)?, - new_foundry_output_builder.finish_output(token_supply)?, + new_account_output_builder.finish_output()?, + new_foundry_output_builder.finish_output()?, // Native Tokens will be added automatically in the remainder output in try_select_inputs() ]; diff --git a/sdk/src/wallet/operations/transaction/high_level/minting/mint_nfts.rs b/sdk/src/wallet/operations/transaction/high_level/minting/mint_nfts.rs index acd9b6807b..c9c4400023 100644 --- a/sdk/src/wallet/operations/transaction/high_level/minting/mint_nfts.rs +++ b/sdk/src/wallet/operations/transaction/high_level/minting/mint_nfts.rs @@ -162,7 +162,6 @@ where { log::debug!("[TRANSACTION] prepare_mint_nfts"); let rent_structure = self.client().get_rent_structure().await?; - let token_supply = self.client().get_token_supply().await?; let wallet_address = self.address().await.into_inner(); let mut outputs = Vec::new(); @@ -208,7 +207,7 @@ where nft_builder = nft_builder.add_immutable_feature(MetadataFeature::new(immutable_metadata)?); } - outputs.push(nft_builder.finish_output(token_supply)?); + outputs.push(nft_builder.finish_output()?); } self.prepare_transaction(outputs, options).await diff --git a/sdk/src/wallet/operations/transaction/high_level/send.rs b/sdk/src/wallet/operations/transaction/high_level/send.rs index dc055c1c06..235572f0e7 100644 --- a/sdk/src/wallet/operations/transaction/high_level/send.rs +++ b/sdk/src/wallet/operations/transaction/high_level/send.rs @@ -173,13 +173,13 @@ where // Get the minimum required amount for an output assuming it does not need a storage deposit. let output = BasicOutputBuilder::new_with_minimum_storage_deposit(rent_structure) .add_unlock_condition(AddressUnlockCondition::new(address)) - .finish_output(token_supply)?; + .finish_output()?; if amount >= output.amount() { outputs.push( BasicOutputBuilder::from(output.as_basic()) .with_amount(amount) - .finish_output(token_supply)?, + .finish_output()?, ) } else { let expiration_slot_index = expiration @@ -215,7 +215,7 @@ where )?, ) .add_unlock_condition(ExpirationUnlockCondition::new(return_address, expiration_slot_index)?) - .finish_output(token_supply)?, + .finish_output()?, ) } } diff --git a/sdk/src/wallet/operations/transaction/high_level/send_native_tokens.rs b/sdk/src/wallet/operations/transaction/high_level/send_native_tokens.rs index 55ef81733a..bf02fd7797 100644 --- a/sdk/src/wallet/operations/transaction/high_level/send_native_tokens.rs +++ b/sdk/src/wallet/operations/transaction/high_level/send_native_tokens.rs @@ -196,7 +196,7 @@ where )?, ) .add_unlock_condition(ExpirationUnlockCondition::new(return_address, expiration_slot_index)?) - .finish_output(token_supply)?, + .finish_output()?, ) } diff --git a/sdk/src/wallet/operations/transaction/high_level/send_nft.rs b/sdk/src/wallet/operations/transaction/high_level/send_nft.rs index 72560a5599..1eb3dc31f6 100644 --- a/sdk/src/wallet/operations/transaction/high_level/send_nft.rs +++ b/sdk/src/wallet/operations/transaction/high_level/send_nft.rs @@ -95,8 +95,7 @@ where { log::debug!("[TRANSACTION] prepare_send_nft"); - let unspent_outputs = self.unspent_outputs(None).await?; - let token_supply = self.client().get_token_supply().await?; + let unspent_outputs = self.unspent_outputs(None).await; let mut outputs = Vec::new(); @@ -116,7 +115,7 @@ where let nft_builder = NftOutputBuilder::from(nft_output) .with_nft_id(nft_id) .with_unlock_conditions([AddressUnlockCondition::new(address)]); - outputs.push(nft_builder.finish_output(token_supply)?); + outputs.push(nft_builder.finish_output()?); } } else { return Err(crate::wallet::Error::NftNotFoundInUnspentOutputs); diff --git a/sdk/src/wallet/operations/transaction/mod.rs b/sdk/src/wallet/operations/transaction/mod.rs index 8d00c142de..b3d49d954a 100644 --- a/sdk/src/wallet/operations/transaction/mod.rs +++ b/sdk/src/wallet/operations/transaction/mod.rs @@ -73,7 +73,7 @@ where // Check if the outputs have enough amount to cover the storage deposit for output in &outputs { - output.verify_storage_deposit(protocol_parameters.rent_structure(), protocol_parameters.token_supply())?; + output.verify_storage_deposit(protocol_parameters.rent_structure())?; } self.finish_transaction(outputs, options).await diff --git a/sdk/src/wallet/operations/transaction/prepare_output.rs b/sdk/src/wallet/operations/transaction/prepare_output.rs index 70c2e3a612..95c04aa37d 100644 --- a/sdk/src/wallet/operations/transaction/prepare_output.rs +++ b/sdk/src/wallet/operations/transaction/prepare_output.rs @@ -253,7 +253,7 @@ where ) } else { // Transition an existing NFT output - let unspent_nft_output = self.unspent_nft_output(nft_id).await?; + let unspent_nft_output = self.unspent_nft_output(nft_id).await; // Find nft output from the inputs let mut first_output_builder = if let Some(nft_output_data) = &unspent_nft_output { @@ -437,8 +437,8 @@ impl OutputBuilder { } fn finish_output(self, token_supply: u64) -> Result { match self { - Self::Basic(b) => b.finish_output(token_supply), - Self::Nft(b) => b.finish_output(token_supply), + Self::Basic(b) => b.finish_output(), + Self::Nft(b) => b.finish_output(), } } } diff --git a/sdk/src/wallet/operations/transaction/prepare_transaction.rs b/sdk/src/wallet/operations/transaction/prepare_transaction.rs index 833657c311..0b1906eddf 100644 --- a/sdk/src/wallet/operations/transaction/prepare_transaction.rs +++ b/sdk/src/wallet/operations/transaction/prepare_transaction.rs @@ -36,11 +36,10 @@ where let outputs = outputs.into(); let prepare_transaction_start_time = Instant::now(); let rent_structure = self.client().get_rent_structure().await?; - let token_supply = self.client().get_token_supply().await?; // Check if the outputs have enough amount to cover the storage deposit for output in &outputs { - output.verify_storage_deposit(rent_structure, token_supply)?; + output.verify_storage_deposit(rent_structure)?; } let is_burn_present = options.as_ref().map(|options| options.burn.is_some()).unwrap_or(false); diff --git a/sdk/src/wallet/operations/transaction/submit_transaction.rs b/sdk/src/wallet/operations/transaction/submit_transaction.rs index bf93b3d298..4ce30c6a8f 100644 --- a/sdk/src/wallet/operations/transaction/submit_transaction.rs +++ b/sdk/src/wallet/operations/transaction/submit_transaction.rs @@ -1,8 +1,6 @@ // Copyright 2021 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use crypto::keys::bip44::Bip44; - #[cfg(feature = "events")] use crate::wallet::events::types::{TransactionProgressEvent, WalletEvent}; use crate::{ diff --git a/sdk/src/wallet/storage/participation.rs b/sdk/src/wallet/storage/participation.rs index 1bd07332a1..0691874a91 100644 --- a/sdk/src/wallet/storage/participation.rs +++ b/sdk/src/wallet/storage/participation.rs @@ -25,13 +25,13 @@ impl StorageManager { let mut events = self .storage - .get::>(&format!("{PARTICIPATION_EVENTS}")) + .get::>(PARTICIPATION_EVENTS) .await? .unwrap_or_default(); events.insert(event_with_nodes.id, event_with_nodes); - self.storage.set(&format!("{PARTICIPATION_EVENTS}"), &events).await?; + self.storage.set(PARTICIPATION_EVENTS, &events).await?; Ok(()) } @@ -41,7 +41,7 @@ impl StorageManager { let mut events = match self .storage - .get::>(&format!("{PARTICIPATION_EVENTS}")) + .get::>(PARTICIPATION_EVENTS) .await? { Some(events) => events, @@ -50,7 +50,7 @@ impl StorageManager { events.remove(id); - self.storage.set(&format!("{PARTICIPATION_EVENTS}"), &events).await?; + self.storage.set(PARTICIPATION_EVENTS, &events).await?; Ok(()) } @@ -60,11 +60,7 @@ impl StorageManager { ) -> crate::wallet::Result> { log::debug!("get_participation_events"); - Ok(self - .storage - .get(&format!("{PARTICIPATION_EVENTS}")) - .await? - .unwrap_or_default()) + Ok(self.storage.get(PARTICIPATION_EVENTS).await?.unwrap_or_default()) } pub(crate) async fn set_cached_participation_output_status( @@ -74,7 +70,7 @@ impl StorageManager { log::debug!("set_cached_participation"); self.storage - .set(&format!("{PARTICIPATION_CACHED_OUTPUTS}"), outputs_participation) + .set(PARTICIPATION_CACHED_OUTPUTS, outputs_participation) .await?; Ok(()) @@ -87,7 +83,7 @@ impl StorageManager { Ok(self .storage - .get(&format!("{PARTICIPATION_CACHED_OUTPUTS}")) + .get(PARTICIPATION_CACHED_OUTPUTS) .await? .unwrap_or_default()) } diff --git a/sdk/tests/client/input_selection/account_outputs.rs b/sdk/tests/client/input_selection/account_outputs.rs index 3a550bfd2a..93469e6c4a 100644 --- a/sdk/tests/client/input_selection/account_outputs.rs +++ b/sdk/tests/client/input_selection/account_outputs.rs @@ -17,7 +17,7 @@ use crate::client::{ addresses, build_inputs, build_outputs, is_remainder_or_return, unsorted_eq, Build::{Account, Basic}, ACCOUNT_ID_0, ACCOUNT_ID_1, ACCOUNT_ID_2, BECH32_ADDRESS_ACCOUNT_1, BECH32_ADDRESS_ED25519_0, - BECH32_ADDRESS_ED25519_1, BECH32_ADDRESS_NFT_1, TOKEN_SUPPLY, + BECH32_ADDRESS_ED25519_1, BECH32_ADDRESS_NFT_1, }; #[test] @@ -495,7 +495,7 @@ fn account_in_output_and_sender() { Basic(1_000_000, BECH32_ADDRESS_ED25519_0, None, None, None, None, None, None), ]); let account_output = AccountOutputBuilder::from(inputs[0].output.as_account()) - .finish_output(TOKEN_SUPPLY) + .finish_output() .unwrap(); let mut outputs = build_outputs([Basic( 1_000_000, diff --git a/sdk/tests/client/input_selection/foundry_outputs.rs b/sdk/tests/client/input_selection/foundry_outputs.rs index 2958c9dc76..2e0039f571 100644 --- a/sdk/tests/client/input_selection/foundry_outputs.rs +++ b/sdk/tests/client/input_selection/foundry_outputs.rs @@ -23,7 +23,7 @@ use pretty_assertions::assert_eq; use crate::client::{ addresses, build_inputs, build_outputs, is_remainder_or_return, unsorted_eq, Build::{Account, Basic, Foundry}, - ACCOUNT_ID_1, ACCOUNT_ID_2, BECH32_ADDRESS_ED25519_0, TOKEN_SUPPLY, + ACCOUNT_ID_1, ACCOUNT_ID_2, BECH32_ADDRESS_ED25519_0, }; #[test] @@ -224,7 +224,7 @@ fn melt_native_tokens() { Address::try_from_bech32(BECH32_ADDRESS_ED25519_0).unwrap(), )) .with_foundry_counter(1) - .finish_output(protocol_parameters.token_supply()) + .finish_output() .unwrap(); inputs.push(InputSigningData { output: account_output, @@ -277,7 +277,7 @@ fn destroy_foundry_with_account_state_transition() { ]); let account_output = AccountOutputBuilder::from(inputs[0].output.as_account()) .with_amount(103_100) - .finish_output(TOKEN_SUPPLY) + .finish_output() .unwrap(); // Account output gets the amount from the foundry output added let outputs = [account_output]; @@ -429,7 +429,7 @@ fn simple_foundry_transition_basic_not_needed() { Address::try_from_bech32(BECH32_ADDRESS_ED25519_0).unwrap(), )) .with_foundry_counter(1) - .finish_output(protocol_parameters.token_supply()) + .finish_output() .unwrap(); inputs.push(InputSigningData { output: account_output, @@ -496,7 +496,7 @@ fn simple_foundry_transition_basic_not_needed_with_remainder() { Address::try_from_bech32(BECH32_ADDRESS_ED25519_0).unwrap(), )) .with_foundry_counter(1) - .finish_output(protocol_parameters.token_supply()) + .finish_output() .unwrap(); inputs.push(InputSigningData { output: account_output, @@ -638,7 +638,7 @@ fn mint_and_burn_at_the_same_time() { Address::try_from_bech32(BECH32_ADDRESS_ED25519_0).unwrap(), )) .with_foundry_counter(1) - .finish_output(protocol_parameters.token_supply()) + .finish_output() .unwrap(); inputs.push(InputSigningData { output: account_output, @@ -691,7 +691,7 @@ fn take_amount_from_account_and_foundry_to_fund_basic() { Address::try_from_bech32(BECH32_ADDRESS_ED25519_0).unwrap(), )) .with_foundry_counter(1) - .finish_output(protocol_parameters.token_supply()) + .finish_output() .unwrap(); inputs.push(InputSigningData { output: account_output, @@ -906,7 +906,7 @@ fn foundry_in_outputs_and_required() { Address::try_from_bech32(BECH32_ADDRESS_ED25519_0).unwrap(), )) .with_foundry_counter(1) - .finish_output(protocol_parameters.token_supply()) + .finish_output() .unwrap(); inputs.push(InputSigningData { output: account_output, @@ -963,7 +963,7 @@ fn melt_and_burn_native_tokens() { Address::try_from_bech32(BECH32_ADDRESS_ED25519_0).unwrap(), )) .with_foundry_counter(1) - .finish_output(protocol_parameters.token_supply()) + .finish_output() .unwrap(); inputs.push(InputSigningData { output: account_output, diff --git a/sdk/tests/client/input_selection/nft_outputs.rs b/sdk/tests/client/input_selection/nft_outputs.rs index f09ce99f55..5212407e81 100644 --- a/sdk/tests/client/input_selection/nft_outputs.rs +++ b/sdk/tests/client/input_selection/nft_outputs.rs @@ -1203,7 +1203,7 @@ fn changed_immutable_metadata() { .add_unlock_condition(AddressUnlockCondition::new( Address::try_from_bech32(BECH32_ADDRESS_ED25519_0).unwrap(), )) - .finish_output(protocol_parameters.token_supply()) + .finish_output() .unwrap(); let inputs = [InputSigningData { @@ -1226,7 +1226,7 @@ fn changed_immutable_metadata() { let updated_nft_output = NftOutputBuilder::from(nft_output.as_nft()) .with_minimum_storage_deposit(protocol_parameters.rent_structure()) .with_immutable_features(MetadataFeature::try_from(metadata)) - .finish_output(protocol_parameters.token_supply()) + .finish_output() .unwrap(); let outputs = [updated_nft_output]; diff --git a/sdk/tests/client/input_signing_data.rs b/sdk/tests/client/input_signing_data.rs index 956c1301f6..3af8a84422 100644 --- a/sdk/tests/client/input_signing_data.rs +++ b/sdk/tests/client/input_signing_data.rs @@ -33,7 +33,7 @@ fn input_signing_data_conversion() { .add_unlock_condition(AddressUnlockCondition::new( Address::try_from_bech32("rms1qpllaj0pyveqfkwxmnngz2c488hfdtmfrj3wfkgxtk4gtyrax0jaxzt70zy").unwrap(), )) - .finish_output(protocol_parameters.token_supply()) + .finish_output() .unwrap(); let input_signing_data = InputSigningData { diff --git a/sdk/tests/client/mod.rs b/sdk/tests/client/mod.rs index 44d55347f5..4d8db30740 100644 --- a/sdk/tests/client/mod.rs +++ b/sdk/tests/client/mod.rs @@ -131,7 +131,7 @@ fn build_basic_output( builder = builder.add_unlock_condition(ExpirationUnlockCondition::new(address, timestamp).unwrap()); } - builder.finish_output(TOKEN_SUPPLY).unwrap() + builder.finish_output().unwrap() } #[allow(clippy::too_many_arguments)] @@ -173,7 +173,7 @@ fn build_nft_output( builder = builder.add_unlock_condition(ExpirationUnlockCondition::new(address, timestamp).unwrap()); } - builder.finish_output(TOKEN_SUPPLY).unwrap() + builder.finish_output().unwrap() } #[allow(clippy::too_many_arguments)] @@ -204,7 +204,7 @@ fn build_account_output( builder = builder.add_immutable_feature(IssuerFeature::new(bech32_issuer)); } - builder.finish_output(TOKEN_SUPPLY).unwrap() + builder.finish_output().unwrap() } fn build_foundry_output( @@ -227,7 +227,7 @@ fn build_foundry_output( ); } - builder.finish_output(TOKEN_SUPPLY).unwrap() + builder.finish_output().unwrap() } fn build_output_inner(build: Build) -> (Output, Option) { diff --git a/sdk/tests/types/address/mod.rs b/sdk/tests/types/address/mod.rs index a19cff845d..fff6ac7d57 100644 --- a/sdk/tests/types/address/mod.rs +++ b/sdk/tests/types/address/mod.rs @@ -4,6 +4,7 @@ mod account; mod bech32; mod ed25519; +mod multi; mod nft; mod restricted; diff --git a/sdk/tests/types/address/multi.rs b/sdk/tests/types/address/multi.rs new file mode 100644 index 0000000000..ea767e5f69 --- /dev/null +++ b/sdk/tests/types/address/multi.rs @@ -0,0 +1,57 @@ +// Copyright 2023 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +use iota_sdk::types::block::address::{Address, ToBech32Ext}; + +#[test] +fn bech32() { + // Test from https://github.com/iotaledger/tips/blob/tip52/tips/TIP-0052/tip-0052.md#bech32 + + let multi_address_json = serde_json::json!({ + "type": 40, + "addresses": [ + { + "address": { + "type": 0, + "pubKeyHash": "0x52fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c649" + }, + "weight": 1 + }, + { + "address": { + "type": 0, + "pubKeyHash": "0x53fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c649" + }, + "weight": 1 + }, + { + "address": { + "type": 0, + "pubKeyHash": "0x54fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c649" + }, + "weight": 1 + }, + { + "address": { + "type": 8, + "accountId": "0x55fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c649" + }, + "weight": 2 + }, + { + "address": { + "type": 16, + "nftId": "0x56fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c649" + }, + "weight": 3 + } + ], + "threshold": 2 + }); + let multi_address = serde_json::from_value::
(multi_address_json).unwrap(); + + assert_eq!( + multi_address.to_bech32_unchecked("iota"), + "iota19qq0ezu97zl76wqnpdxxleuf55gk0eqhscjtdgqm5sqwav6gcarz6vvesnk" + ); +} diff --git a/sdk/tests/types/output/account.rs b/sdk/tests/types/output/account.rs index a8cc3b34a2..2b6f7e84f0 100644 --- a/sdk/tests/types/output/account.rs +++ b/sdk/tests/types/output/account.rs @@ -1,18 +1,15 @@ // Copyright 2023 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use iota_sdk::types::{ - block::{ - address::AccountAddress, - output::{AccountOutput, Feature, FoundryId, NativeToken, Output, Rent, SimpleTokenScheme, TokenId}, - protocol::protocol_parameters, - rand::output::{ - feature::{rand_issuer_feature, rand_metadata_feature, rand_sender_feature}, - rand_account_id, rand_account_output, - unlock_condition::rand_address_unlock_condition_different_from_account_id, - }, +use iota_sdk::types::block::{ + address::AccountAddress, + output::{AccountOutput, Feature, FoundryId, NativeToken, Output, Rent, SimpleTokenScheme, TokenId}, + protocol::protocol_parameters, + rand::output::{ + feature::{rand_issuer_feature, rand_metadata_feature, rand_sender_feature}, + rand_account_id, rand_account_output, + unlock_condition::rand_address_unlock_condition_different_from_account_id, }, - ValidationParams, }; use packable::PackableExt; use pretty_assertions::assert_eq; @@ -61,7 +58,7 @@ fn builder() { .add_unlock_condition(rand_address_unlock_condition_different_from_account_id(&account_id)) .with_features([Feature::from(metadata.clone()), sender_1.clone().into()]) .with_immutable_features([Feature::from(metadata.clone()), issuer_1.clone().into()]) - .finish_with_params(ValidationParams::default().with_protocol_parameters(protocol_parameters.clone())) + .finish() .unwrap(); assert_eq!( diff --git a/sdk/tests/types/output/basic.rs b/sdk/tests/types/output/basic.rs index d2dd05e845..24f81e4051 100644 --- a/sdk/tests/types/output/basic.rs +++ b/sdk/tests/types/output/basic.rs @@ -1,20 +1,17 @@ // Copyright 2023 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use iota_sdk::types::{ - block::{ - output::{BasicOutput, Feature, FoundryId, NativeToken, Output, Rent, SimpleTokenScheme, TokenId}, - protocol::protocol_parameters, - rand::{ - address::rand_account_address, - output::{ - feature::{rand_metadata_feature, rand_sender_feature}, - rand_basic_output, - unlock_condition::rand_address_unlock_condition, - }, +use iota_sdk::types::block::{ + output::{BasicOutput, Feature, FoundryId, NativeToken, Output, Rent, SimpleTokenScheme, TokenId}, + protocol::protocol_parameters, + rand::{ + address::rand_account_address, + output::{ + feature::{rand_metadata_feature, rand_sender_feature}, + rand_basic_output, + unlock_condition::rand_address_unlock_condition, }, }, - ValidationParams, }; use packable::PackableExt; use pretty_assertions::assert_eq; @@ -54,7 +51,7 @@ fn builder() { .with_minimum_storage_deposit(protocol_parameters.rent_structure()) .add_unlock_condition(rand_address_unlock_condition()) .with_features([Feature::from(metadata.clone()), sender_1.clone().into()]) - .finish_with_params(ValidationParams::default().with_protocol_parameters(protocol_parameters.clone())) + .finish() .unwrap(); assert_eq!( diff --git a/sdk/tests/types/output/foundry.rs b/sdk/tests/types/output/foundry.rs index 03e6b364fe..66859d0da2 100644 --- a/sdk/tests/types/output/foundry.rs +++ b/sdk/tests/types/output/foundry.rs @@ -54,7 +54,7 @@ fn builder() { let output = builder .with_minimum_storage_deposit(protocol_parameters.rent_structure()) .add_unlock_condition(ImmutableAccountAddressUnlockCondition::new(rand_account_address())) - .finish_with_params(&protocol_parameters) + .finish() .unwrap(); assert_eq!( diff --git a/sdk/tests/types/output/nft.rs b/sdk/tests/types/output/nft.rs index f07ad91442..437ae9fcf0 100644 --- a/sdk/tests/types/output/nft.rs +++ b/sdk/tests/types/output/nft.rs @@ -55,7 +55,7 @@ fn builder() { let output = builder .with_minimum_storage_deposit(protocol_parameters.rent_structure()) .add_unlock_condition(rand_address_unlock_condition()) - .finish_with_params(protocol_parameters.token_supply()) + .finish() .unwrap(); assert_eq!( diff --git a/sdk/tests/types/payload.rs b/sdk/tests/types/payload.rs index 58e4e8a6ff..b8a2ddafee 100644 --- a/sdk/tests/types/payload.rs +++ b/sdk/tests/types/payload.rs @@ -34,7 +34,7 @@ fn transaction() { let output = Output::Basic( BasicOutput::build_with_amount(amount) .add_unlock_condition(AddressUnlockCondition::new(address)) - .finish_with_params(&protocol_parameters) + .finish() .unwrap(), ); let transaction = Transaction::builder(protocol_parameters.network_id()) diff --git a/sdk/tests/types/signed_transaction_payload.rs b/sdk/tests/types/signed_transaction_payload.rs index 09e4762cb7..eef9a27afb 100644 --- a/sdk/tests/types/signed_transaction_payload.rs +++ b/sdk/tests/types/signed_transaction_payload.rs @@ -39,7 +39,7 @@ fn builder_too_few_unlocks() { let output = Output::Basic( BasicOutput::build_with_amount(amount) .add_unlock_condition(AddressUnlockCondition::new(address)) - .finish_with_params(protocol_parameters.token_supply()) + .finish() .unwrap(), ); let transaction = Transaction::builder(protocol_parameters.network_id()) @@ -75,7 +75,7 @@ fn builder_too_many_unlocks() { let output = Output::Basic( BasicOutput::build_with_amount(amount) .add_unlock_condition(AddressUnlockCondition::new(address)) - .finish_with_params(protocol_parameters.token_supply()) + .finish() .unwrap(), ); let transaction = Transaction::builder(protocol_parameters.network_id()) @@ -114,7 +114,7 @@ fn pack_unpack_valid() { let output = Output::Basic( BasicOutput::build_with_amount(amount) .add_unlock_condition(AddressUnlockCondition::new(address)) - .finish_with_params(protocol_parameters.token_supply()) + .finish() .unwrap(), ); let transaction = Transaction::builder(protocol_parameters.network_id()) @@ -155,7 +155,7 @@ fn getters() { let output = Output::Basic( BasicOutput::build_with_amount(amount) .add_unlock_condition(AddressUnlockCondition::new(address)) - .finish_with_params(protocol_parameters.token_supply()) + .finish() .unwrap(), ); let transaction = Transaction::builder(protocol_parameters.network_id()) diff --git a/sdk/tests/types/transaction.rs b/sdk/tests/types/transaction.rs index 81f5e492a1..5e696ac391 100644 --- a/sdk/tests/types/transaction.rs +++ b/sdk/tests/types/transaction.rs @@ -42,7 +42,7 @@ fn build_valid() { let output = Output::Basic( BasicOutput::build_with_amount(amount) .add_unlock_condition(AddressUnlockCondition::new(address)) - .finish_with_params(protocol_parameters.token_supply()) + .finish() .unwrap(), ); @@ -67,7 +67,7 @@ fn build_valid_with_payload() { let output = Output::Basic( BasicOutput::build_with_amount(amount) .add_unlock_condition(AddressUnlockCondition::new(address)) - .finish_with_params(protocol_parameters.token_supply()) + .finish() .unwrap(), ); @@ -93,7 +93,7 @@ fn build_valid_add_inputs_outputs() { let output = Output::Basic( BasicOutput::build_with_amount(amount) .add_unlock_condition(AddressUnlockCondition::new(address)) - .finish_with_params(protocol_parameters.token_supply()) + .finish() .unwrap(), ); @@ -119,7 +119,7 @@ fn build_invalid_payload_kind() { let output = Output::Basic( BasicOutput::build_with_amount(amount) .add_unlock_condition(AddressUnlockCondition::new(address)) - .finish_with_params(protocol_parameters.token_supply()) + .finish() .unwrap(), ); let transaction = Transaction::builder(protocol_parameters.network_id()) @@ -158,7 +158,7 @@ fn build_invalid_input_count_low() { let output = Output::Basic( BasicOutput::build_with_amount(amount) .add_unlock_condition(AddressUnlockCondition::new(address)) - .finish_with_params(protocol_parameters.token_supply()) + .finish() .unwrap(), ); @@ -184,7 +184,7 @@ fn build_invalid_input_count_high() { let output = Output::Basic( BasicOutput::build_with_amount(amount) .add_unlock_condition(AddressUnlockCondition::new(address)) - .finish_with_params(protocol_parameters.token_supply()) + .finish() .unwrap(), ); @@ -228,7 +228,7 @@ fn build_invalid_output_count_high() { let output = Output::Basic( BasicOutput::build_with_amount(amount) .add_unlock_condition(AddressUnlockCondition::new(address)) - .finish_with_params(protocol_parameters.token_supply()) + .finish() .unwrap(), ); @@ -255,7 +255,7 @@ fn build_invalid_duplicate_utxo() { let output = Output::Basic( BasicOutput::build_with_amount(amount) .add_unlock_condition(AddressUnlockCondition::new(address)) - .finish_with_params(protocol_parameters.token_supply()) + .finish() .unwrap(), ); @@ -280,7 +280,7 @@ fn build_invalid_accumulated_output() { let output1 = Output::Basic( BasicOutput::build_with_amount(amount1) .add_unlock_condition(AddressUnlockCondition::new(address1)) - .finish_with_params(protocol_parameters.token_supply()) + .finish() .unwrap(), ); @@ -290,7 +290,7 @@ fn build_invalid_accumulated_output() { let output2 = Output::Basic( BasicOutput::build_with_amount(amount2) .add_unlock_condition(AddressUnlockCondition::new(address2)) - .finish_with_params(protocol_parameters.token_supply()) + .finish() .unwrap(), ); @@ -315,7 +315,7 @@ fn getters() { let outputs = [Output::Basic( BasicOutput::build_with_amount(amount) .add_unlock_condition(AddressUnlockCondition::new(address)) - .finish_with_params(protocol_parameters.token_supply()) + .finish() .unwrap(), )]; let payload = Payload::from(rand_tagged_data_payload()); @@ -343,12 +343,12 @@ fn duplicate_output_nft() { let amount = 1_000_000; let basic = BasicOutput::build_with_amount(amount) .add_unlock_condition(AddressUnlockCondition::new(address.clone())) - .finish_output(protocol_parameters.token_supply()) + .finish_output() .unwrap(); let nft_id = NftId::from(bytes); let nft = NftOutput::build_with_amount(1_000_000, nft_id) .add_unlock_condition(AddressUnlockCondition::new(address)) - .finish_output(protocol_parameters.token_supply()) + .finish_output() .unwrap(); let transaction = Transaction::builder(protocol_parameters.network_id()) @@ -374,12 +374,12 @@ fn duplicate_output_nft_null() { let amount = 1_000_000; let basic = BasicOutput::build_with_amount(amount) .add_unlock_condition(AddressUnlockCondition::new(address.clone())) - .finish_output(protocol_parameters.token_supply()) + .finish_output() .unwrap(); let nft_id = NftId::null(); let nft = NftOutput::build_with_amount(1_000_000, nft_id) .add_unlock_condition(AddressUnlockCondition::new(address)) - .finish_output(protocol_parameters.token_supply()) + .finish_output() .unwrap(); let transaction = Transaction::builder(protocol_parameters.network_id()) @@ -402,12 +402,12 @@ fn duplicate_output_account() { let amount = 1_000_000; let basic = BasicOutput::build_with_amount(amount) .add_unlock_condition(AddressUnlockCondition::new(address.clone())) - .finish_output(protocol_parameters.token_supply()) + .finish_output() .unwrap(); let account_id = AccountId::from(bytes); let account = AccountOutput::build_with_amount(1_000_000, account_id) .add_unlock_condition(AddressUnlockCondition::new(address.clone())) - .finish_output(protocol_parameters.token_supply()) + .finish_output() .unwrap(); let transaction = Transaction::builder(protocol_parameters.network_id()) @@ -433,7 +433,7 @@ fn duplicate_output_foundry() { let amount = 1_000_000; let basic = BasicOutput::build_with_amount(amount) .add_unlock_condition(AddressUnlockCondition::new(address)) - .finish_output(protocol_parameters.token_supply()) + .finish_output() .unwrap(); let account_id = AccountId::from(bytes); let token_scheme = TokenScheme::Simple(SimpleTokenScheme::new(70, 0, 100).unwrap()); @@ -444,7 +444,7 @@ fn duplicate_output_foundry() { .add_unlock_condition(ImmutableAccountAddressUnlockCondition::new(AccountAddress::from( account_id, ))) - .finish_output(protocol_parameters.token_supply()) + .finish_output() .unwrap(); let transaction = Transaction::builder(protocol_parameters.network_id()) @@ -470,7 +470,7 @@ fn transactions_capabilities() { let output = Output::Basic( BasicOutput::build_with_amount(amount) .add_unlock_condition(AddressUnlockCondition::new(address)) - .finish_with_params(&protocol_parameters) + .finish() .unwrap(), ); let transaction = Transaction::builder(protocol_parameters.network_id()) diff --git a/sdk/tests/wallet/balance.rs b/sdk/tests/wallet/balance.rs index 6a2c28310f..bc926936e7 100644 --- a/sdk/tests/wallet/balance.rs +++ b/sdk/tests/wallet/balance.rs @@ -2,13 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 use iota_sdk::{ - types::block::{ - address::Bech32Address, - output::{ - feature::SenderFeature, - unlock_condition::{AddressUnlockCondition, ExpirationUnlockCondition}, - BasicOutputBuilder, UnlockCondition, - }, + types::block::output::{ + feature::SenderFeature, + unlock_condition::{AddressUnlockCondition, ExpirationUnlockCondition}, + BasicOutputBuilder, UnlockCondition, }, wallet::{types::Balance, Result}, }; @@ -107,7 +104,6 @@ async fn balance_expiration() -> Result<()> { request_funds(&wallet_0).await?; let slots_until_expired = 20; - let token_supply = wallet_0.client().get_token_supply().await?; let outputs = [BasicOutputBuilder::new_with_amount(1_000_000) // Send to account 1 with expiration to account 2, both have no amount yet .with_unlock_conditions([ @@ -118,7 +114,7 @@ async fn balance_expiration() -> Result<()> { )?), ]) .with_features([SenderFeature::new(wallet_0.address().await)]) - .finish_output(token_supply)?]; + .finish_output()?]; let balance_before_tx = wallet_0.balance().await?; let tx = wallet_0.send_outputs(outputs, None).await?; @@ -166,7 +162,7 @@ async fn balance_expiration() -> Result<()> { let outputs = [BasicOutputBuilder::new_with_amount(1_000_000) // Send to wallet 1 with expiration to wallet 2, both have no amount yet .with_unlock_conditions([AddressUnlockCondition::new(wallet_1.address().await)]) - .finish_output(token_supply)?]; + .finish_output()?]; let _tx = wallet_2.send_outputs(outputs, None).await?; tear_down(storage_path_0)?; diff --git a/sdk/tests/wallet/burn_outputs.rs b/sdk/tests/wallet/burn_outputs.rs index 1517d73c10..dff9359506 100644 --- a/sdk/tests/wallet/burn_outputs.rs +++ b/sdk/tests/wallet/burn_outputs.rs @@ -64,8 +64,6 @@ async fn mint_and_burn_expired_nft() -> Result<()> { let wallet_1 = make_wallet(storage_path, None, None).await?; request_funds(&wallet_0).await?; - let token_supply = wallet_0.client().get_token_supply().await?; - let amount = 1_000_000; let outputs = [NftOutputBuilder::new_with_amount(amount, NftId::null()) .with_unlock_conditions([ @@ -73,7 +71,7 @@ async fn mint_and_burn_expired_nft() -> Result<()> { // immediately expired to account_1 UnlockCondition::Expiration(ExpirationUnlockCondition::new(wallet_1.address().await, 1)?), ]) - .finish_output(token_supply)?]; + .finish_output()?]; let transaction = wallet_0.send_outputs(outputs, None).await?; wallet_0 diff --git a/sdk/tests/wallet/claim_outputs.rs b/sdk/tests/wallet/claim_outputs.rs index 271737075f..bc0366cff0 100644 --- a/sdk/tests/wallet/claim_outputs.rs +++ b/sdk/tests/wallet/claim_outputs.rs @@ -140,7 +140,6 @@ async fn claim_2_basic_outputs_no_outputs_in_claim_account() -> Result<()> { request_funds(&wallet_0).await?; - let token_supply = wallet_0.client().get_token_supply().await?; let rent_structure = wallet_0.client().get_rent_structure().await?; // TODO more fitting value let expiration_slot = wallet_0.client().get_slot_index().await? + 86400; @@ -151,7 +150,7 @@ async fn claim_2_basic_outputs_no_outputs_in_claim_account() -> Result<()> { wallet_0.address().await, expiration_slot, )?) - .finish_output(token_supply)?; + .finish_output()?; let amount = output.amount(); let outputs = vec![output; 2]; @@ -338,7 +337,6 @@ async fn claim_2_native_tokens_no_outputs_in_claim_account() -> Result<()> { wallet_0.sync(None).await?; let rent_structure = wallet_0.client().get_rent_structure().await?; - let token_supply = wallet_0.client().get_token_supply().await?; let tx = wallet_0 .send_outputs( @@ -350,7 +348,7 @@ async fn claim_2_native_tokens_no_outputs_in_claim_account() -> Result<()> { wallet_0.client().get_slot_index().await? + 5000, )?) .add_native_token(NativeToken::new(create_tx_0.token_id, native_token_amount)?) - .finish_output(token_supply)?, + .finish_output()?, BasicOutputBuilder::new_with_minimum_storage_deposit(rent_structure) .add_unlock_condition(AddressUnlockCondition::new(wallet_1.address().await)) .add_unlock_condition(ExpirationUnlockCondition::new( @@ -358,7 +356,7 @@ async fn claim_2_native_tokens_no_outputs_in_claim_account() -> Result<()> { wallet_0.client().get_slot_index().await? + 5000, )?) .add_native_token(NativeToken::new(create_tx_1.token_id, native_token_amount)?) - .finish_output(token_supply)?, + .finish_output()?, ], None, ) @@ -414,7 +412,6 @@ async fn claim_2_nft_outputs() -> Result<()> { request_funds(&wallet_0).await?; request_funds(&wallet_1).await?; - let token_supply = wallet_1.client().get_token_supply().await?; let outputs = [ // address of the owner of the NFT NftOutputBuilder::new_with_amount(1_000_000, NftId::null()) @@ -425,7 +422,7 @@ async fn claim_2_nft_outputs() -> Result<()> { wallet_1.client().get_slot_index().await? + 5000, )?), ]) - .finish_output(token_supply)?, + .finish_output()?, NftOutputBuilder::new_with_amount(1_000_000, NftId::null()) .with_unlock_conditions([ UnlockCondition::Address(AddressUnlockCondition::new(wallet_0.address().await)), @@ -434,7 +431,7 @@ async fn claim_2_nft_outputs() -> Result<()> { wallet_1.client().get_slot_index().await? + 5000, )?), ]) - .finish_output(token_supply)?, + .finish_output()?, ]; let tx = wallet_1.send_outputs(outputs, None).await?; @@ -476,7 +473,6 @@ async fn claim_2_nft_outputs_no_outputs_in_claim_account() -> Result<()> { request_funds(&wallet_0).await?; - let token_supply = wallet_0.client().get_token_supply().await?; let outputs = [ // address of the owner of the NFT NftOutputBuilder::new_with_amount(1_000_000, NftId::null()) @@ -487,7 +483,7 @@ async fn claim_2_nft_outputs_no_outputs_in_claim_account() -> Result<()> { wallet_0.client().get_slot_index().await? + 5000, )?), ]) - .finish_output(token_supply)?, + .finish_output()?, NftOutputBuilder::new_with_amount(1_000_000, NftId::null()) .with_unlock_conditions([ UnlockCondition::Address(AddressUnlockCondition::new(wallet_1.address().await)), @@ -496,7 +492,7 @@ async fn claim_2_nft_outputs_no_outputs_in_claim_account() -> Result<()> { wallet_0.client().get_slot_index().await? + 5000, )?), ]) - .finish_output(token_supply)?, + .finish_output()?, ]; let tx = wallet_0.send_outputs(outputs, None).await?; diff --git a/sdk/tests/wallet/consolidation.rs b/sdk/tests/wallet/consolidation.rs index 69f292f8d2..64b92e0753 100644 --- a/sdk/tests/wallet/consolidation.rs +++ b/sdk/tests/wallet/consolidation.rs @@ -31,7 +31,7 @@ async fn consolidation() -> Result<()> { let balance = wallet_1.sync(None).await.unwrap(); assert_eq!(balance.base_coin().available(), 10 * amount); - assert_eq!(wallet_1.unspent_outputs(None).await?.len(), 10); + assert_eq!(wallet_1.unspent_outputs(None).await.len(), 10); let tx = wallet_1 .consolidate_outputs(ConsolidationParams::new().with_force(true)) @@ -44,7 +44,7 @@ async fn consolidation() -> Result<()> { // Balance still the same assert_eq!(balance.base_coin().available(), 10 * amount); // Only one unspent output - assert_eq!(wallet_1.unspent_outputs(None).await?.len(), 1); + assert_eq!(wallet_1.unspent_outputs(None).await.len(), 1); tear_down(storage_path_0)?; tear_down(storage_path_1)?; diff --git a/sdk/tests/wallet/events.rs b/sdk/tests/wallet/events.rs index 481d3ba105..41abdac43c 100644 --- a/sdk/tests/wallet/events.rs +++ b/sdk/tests/wallet/events.rs @@ -95,7 +95,7 @@ fn wallet_events_serde() { let output = Output::Basic( BasicOutput::build_with_amount(amount) .add_unlock_condition(AddressUnlockCondition::new(address)) - .finish_with_params(protocol_parameters.token_supply()) + .finish() .unwrap(), ); let transaction = Transaction::builder(protocol_parameters.network_id()) diff --git a/sdk/tests/wallet/output_preparation.rs b/sdk/tests/wallet/output_preparation.rs index 5b0957c0ba..314d3558fa 100644 --- a/sdk/tests/wallet/output_preparation.rs +++ b/sdk/tests/wallet/output_preparation.rs @@ -429,7 +429,6 @@ async fn output_preparation_sdr() -> Result<()> { request_funds(&wallet).await?; let rent_structure = wallet.client().get_rent_structure().await?; - let token_supply = wallet.client().get_token_supply().await?; let recipient_address_bech32 = String::from("rms1qpszqzadsym6wpppd6z037dvlejmjuke7s24hm95s9fg9vpua7vluaw60xu"); // Roundtrip to get the correct bech32 HRP @@ -450,7 +449,7 @@ async fn output_preparation_sdr() -> Result<()> { ) .await?; // Check if the output has enough amount to cover the storage deposit - output.verify_storage_deposit(rent_structure, token_supply)?; + output.verify_storage_deposit(rent_structure)?; assert_eq!(output.amount(), 50601); // address and sdr unlock condition assert_eq!(output.unlock_conditions().unwrap().len(), 2); @@ -471,7 +470,7 @@ async fn output_preparation_sdr() -> Result<()> { ) .await?; // Check if the output has enough amount to cover the storage deposit - output.verify_storage_deposit(rent_structure, token_supply)?; + output.verify_storage_deposit(rent_structure)?; assert_eq!(output.amount(), 85199); // address and sdr unlock condition assert_eq!(output.unlock_conditions().unwrap().len(), 2); @@ -496,7 +495,7 @@ async fn output_preparation_sdr() -> Result<()> { ) .await?; // Check if the output has enough amount to cover the storage deposit - output.verify_storage_deposit(rent_structure, token_supply)?; + output.verify_storage_deposit(rent_structure)?; assert_eq!(output.amount(), 85199); // address and sdr unlock condition assert_eq!(output.unlock_conditions().unwrap().len(), 2); @@ -521,7 +520,7 @@ async fn output_preparation_sdr() -> Result<()> { ) .await?; // Check if the output has enough amount to cover the storage deposit - output.verify_storage_deposit(rent_structure, token_supply)?; + output.verify_storage_deposit(rent_structure)?; // The additional 1 amount will be added, because the storage deposit should be gifted and not returned assert_eq!(output.amount(), 42600); // storage deposit gifted, only address unlock condition @@ -655,7 +654,7 @@ async fn prepare_output_remainder_dust() -> Result<()> { .await?; // Check if the output has enough amount to cover the storage deposit - output.verify_storage_deposit(rent_structure, token_supply)?; + output.verify_storage_deposit(rent_structure)?; // The left over 21299 is too small to keep, so we donate it assert_eq!(output.amount(), balance.base_coin().available()); // storage deposit gifted, only address unlock condition @@ -699,7 +698,7 @@ async fn prepare_output_remainder_dust() -> Result<()> { .await?; // Check if the output has enough amount to cover the storage deposit - output.verify_storage_deposit(rent_structure, token_supply)?; + output.verify_storage_deposit(rent_structure)?; // We use excess if leftover is too small, so amount == all available balance assert_eq!(output.amount(), 63900); // storage deposit gifted, only address unlock condition @@ -723,7 +722,7 @@ async fn prepare_output_remainder_dust() -> Result<()> { .await?; // Check if the output has enough amount to cover the storage deposit - output.verify_storage_deposit(rent_structure, token_supply)?; + output.verify_storage_deposit(rent_structure)?; // We use excess if leftover is too small, so amount == all available balance assert_eq!(output.amount(), 63900); // storage deposit returned, address and SDR unlock condition @@ -766,7 +765,7 @@ async fn prepare_output_only_single_nft() -> Result<()> { let balance = wallet_1.sync(None).await?; assert_eq!(balance.nfts().len(), 1); - let nft_data = &wallet_1.unspent_outputs(None).await?[0]; + let nft_data = &wallet_1.unspent_outputs(None).await[0]; let nft_id = *balance.nfts().first().unwrap(); // Send NFT back to first wallet let output = wallet_1 diff --git a/sdk/tests/wallet/syncing.rs b/sdk/tests/wallet/syncing.rs index fedf45842f..6a417f379d 100644 --- a/sdk/tests/wallet/syncing.rs +++ b/sdk/tests/wallet/syncing.rs @@ -25,7 +25,7 @@ // assert_eq!(default_sync, wallet.default_sync_options().await); // let custom_options = SyncOptions { -// address_start_index: 10, +// sync_only_most_basic_outputs: true, // ..Default::default() // }; // wallet.set_default_sync_options(custom_options.clone()).await?;